feat: add state field to billing plan model and request body - #493
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe protobuf contracts now include a Suggested reviewers: 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. Comment |
|
The latest Buf updates on your PR. Results from workflow Validate / validate (pull_request).
|
rohilsurana
force-pushed
the
feat/billing-plan-state
branch
from
July 28, 2026 06:31
a8eb30e to
21c3317
Compare
rohilsurana
marked this pull request as ready for review
July 28, 2026 06:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a
statefield ("active" or "inactive") to the billingPlanmodel and toPlanRequestBody.Why
The plan config file that the boot loader reads can already set a plan's state, and the loader applies it, so a plan can be marked inactive to retire it. The API could not carry that field.
PlanRequestBodyhad nostate, soCreatePlanandUpdatePlancould not set it, and thePlanmessage had nostate, so a read never returned it.This blocks managing plans through the API the same way the boot file does. A tool that reads the current plans and writes them back cannot keep a plan inactive, because it can neither read the state nor set it.
Change
Planmodel: addstring state = 9so a read returns the plan's state, matching howProductandPricealready exposestate.PlanRequestBody: addstring state = 8so create and update can set it.Both are new fields, so the change is backward compatible.
buf lint,buf build, andbuf breakingall pass.