-
Notifications
You must be signed in to change notification settings - Fork 126
Feat(fixed_charges): Add GraphQL types, update Plan resolver and create mutation #4126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat(fixed_charges): Add GraphQL types, update Plan resolver and create mutation #4126
Conversation
GraduatedRangeInput and GraduatedPercentageRangeInput add missing specs
to charge models namespace, update references
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There is only a small comment about plans/create_input
, in case FE doesn't send us anything as fixed_charges
maybe we could make both |
I think once we have FE for the feature, fixed_charges will be sent always (an empty array by default), while now it's nil, and for charges - the same, as we have the FE, we always receive charges (or at least an empty array), and we shouldn't make it required |
make fixed_charges argument not required on Plans Create input allow us to release the backend changes before frontend implements fixed charges on plans, otherwise it would break...
…te mutation (#4126) ## Roadmap Task 👉 https://getlago.canny.io/feature-requests/p/allow-add-ons-to-be-added-to-subscription-invoices 👉 https://getlago.canny.io/feature-requests/p/define-quantities-for-plan-charges ## Context What is the current situation? **Option 1:** User has to create a one off invoice alongside the subscription, it will create 2 different invoices. **Option 2:** User can add a recurring billable metric and use event to have this fee invoice on subscription renewal, but it won’t appear on the first billing subscription. What problem are we trying to solve? At subscription creation or afterward, there is no clear way to invoice a fixed fee that is not tied to events, aside from the subscription fee itself. This fee could be either a one-time charge or a recurring one. ## Description Update graphQL type Plans::UpdateInput... - accept `bill_fixed_charges_monthly` - accept `fixed_charges` collection Update graphQL type FixedCharges::Input - accept `apply_units_immediately` Update graphQL type FixedCharges::Object - return `units` -> this was missed in a previous PR Add Plans::Update mutation spec scneario for fixed charges
Roadmap Task
👉 https://getlago.canny.io/feature-requests/p/allow-add-ons-to-be-added-to-subscription-invoices
👉 https://getlago.canny.io/feature-requests/p/define-quantities-for-plan-charges
Context
What is the current situation?
Option 1: User has to create a one off invoice alongside the
subscription, it will create 2 different invoices.
Option 2: User can add a recurring billable metric and use event to
have this fee invoice on subscription renewal, but it won’t appear on
the first billing subscription.
What problem are we trying to solve?
At subscription creation or afterward, there is no clear way to invoice
a fixed fee that is not tied to events, aside from the subscription fee
itself. This fee could be either a one-time charge or a recurring one.
Description
Update Plans::Create mutation and Plan resolver to include fixed charges data,
also, adds all required graphql types.