-
Notifications
You must be signed in to change notification settings - Fork 74
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
Subscription Alignment #2210
Subscription Alignment #2210
Conversation
92ca733
to
3e04e75
Compare
f9fb574
to
e7b97b4
Compare
@@ -78,6 +78,7 @@ func (InvoiceLineManagedBy) Values() []string { | |||
|
|||
// Period represents a time period, in billing the time period is always interpreted as | |||
// [from, to) (i.e. from is inclusive, to is exclusive). | |||
// TODO: Lets merge this with recurrence.Period |
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.
👍
@@ -18,6 +18,8 @@ type SubscriptionItem struct { | |||
// The defacto cadence of the item is calculated and persisted after each change. | |||
models.CadencedModel `json:",inline"` | |||
|
|||
BillingBehaviorOverride BillingBehaviorOverride `json:"billingBehaviorOverride"` |
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.
nit: as far as I see we only use the Subscription level override, but not this one.
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.
This is part of the reset-anchor logic (that is partially implemented in this PR)
Overview
Alignment consists of 2 concepts:
This PR introduces a limited set of features working towards these goals
Contents:
Timing
concept: changes can take effect at some special enumerated times (e.g. end of billing cycle, immediately)alignment.BillablesMustAlign
for Subscriptions too: inherited from plan setting (or custom input), cannot be changed. If true, any phase with billable items can have at most 1BillingCycle
BillingPeriod
for a givenSubscriptionPhase
: dynamically calculated from subscription contents for alignment enforced subscriptionsChanges:
invoiceAt
times are used for the created linesrecurrence
package