Skip to content

MT-21887: Update account billing usage for marketing plan#39

Open
edwardhura wants to merge 2 commits into
mainfrom
MT-21887-expose-email-campaigns-usage-in-account-billing-API
Open

MT-21887: Update account billing usage for marketing plan#39
edwardhura wants to merge 2 commits into
mainfrom
MT-21887-expose-email-campaigns-usage-in-account-billing-API

Conversation

@edwardhura
Copy link
Copy Markdown

@edwardhura edwardhura commented May 11, 2026

Motivation

Changes

  • Update billing usage API to support marketing

How to test

N/A

Images and GIFs

N/A

Summary by CodeRabbit

  • Documentation
    • Expanded the account billing usage API to include Email Marketing (Campaigns) usage alongside Email Sandbox and Email Sending, exposing plan name and sent-message counts (current and limit).
    • Updated the example response to show the new marketing usage block.

Review Change Stack

@edwardhura edwardhura self-assigned this May 11, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e4cbc537-78b4-4e54-8fa2-c233eaae74e3

📥 Commits

Reviewing files that changed from the base of the PR and between 7e00d0b and e67ae98.

📒 Files selected for processing (1)
  • specs/account-management.openapi.yml

📝 Walkthrough

Walkthrough

The OpenAPI spec for GET /api/billing/usage now documents Email Marketing (Email Campaigns) alongside Email Sandbox and Email Sending: operation text updated, the 200 response description adjusted, the response schema adds a top-level marketing object with plan.name and usage.sent_messages_count.current/limit, and the 200 example includes a corresponding marketing block.

Changes

Email Campaigns Billing Usage Documentation

Layer / File(s) Summary
Operation description
specs/account-management.openapi.yml
getAccountBillingUsage operation text updated to mention Email Marketing (Email Campaigns) in addition to Email Sandbox and Email Sending.
Response description
specs/account-management.openapi.yml
200 response description updated to state the endpoint returns usage for Sandbox, Email Sending, and Email Marketing when available.
Response schema and example
specs/account-management.openapi.yml
200 response schema adds a top-level marketing object with plan.name and usage.sent_messages_count.current/limit; the 200 example payload is extended with a marketing block showing plan name and sent message counts.

🎯 3 (Moderate) | ⏱️ ~20 minutes

I hop through YAML lines with cheer,
Marketing counts now appear,
Plans and sends in one neat block,
Spec updated — a tidy tick-tock,
Rabbit trails of docs, sincere. 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is largely incomplete with missing motivation, minimal changes details, and N/A responses for testing and visuals, making it difficult to understand the full context and impact. Add clear motivation explaining why Email Marketing support is needed, expand changes with specific schema/endpoint details, and provide adequate testing guidance.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: updating the account billing usage endpoint to include marketing plan information, which aligns with the OpenAPI spec changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch MT-21887-expose-email-campaigns-usage-in-account-billing-API

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@edwardhura edwardhura requested review from VladimirTaytor and i7an May 11, 2026 10:33
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@specs/account-management.openapi.yml`:
- Line 877: Update the operation description that currently reads "Get current
billing cycle usage for Email Sandbox, Email Sending (Email API/SMTP), and Email
Campaigns." to use the official product name by replacing "Email Campaigns" with
"Email Marketing" (or "Marketing" if brevity is desired) so it reads for
example: "Get current billing cycle usage for Email Sandbox, Email Sending
(Email API/SMTP), and Email Marketing." Locate the description field in the same
OpenAPI operation and make this single-string replacement.
- Line 949: Update the OpenAPI response description that currently says "Email
Campaigns" to use the official product naming "Email Marketing" (or "Marketing")
instead; locate the description field in the response object (the description
property shown in the diff) and replace "Email Campaigns" with "Email Marketing"
so the sentence reads: "Returns an object with current billing cycle usage for
Sandbox, Email Sending (Email API/SMTP), and Email Marketing if available."
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9ad8ca32-ba4d-4519-809b-b51af178472f

📥 Commits

Reviewing files that changed from the base of the PR and between bce2ba6 and e9036a0.

📒 Files selected for processing (1)
  • specs/account-management.openapi.yml

Comment thread specs/account-management.openapi.yml Outdated
Comment thread specs/account-management.openapi.yml Outdated
@edwardhura edwardhura force-pushed the MT-21887-expose-email-campaigns-usage-in-account-billing-API branch from e9036a0 to 7e00d0b Compare May 15, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants