-
-
Notifications
You must be signed in to change notification settings - Fork 2
feat(billing): add invoice_item_types to LineItemDetails #295
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,9 @@ message LineItemDetails { | |
| // Unique identifier for the line item. | ||
| string uid = 1; | ||
|
|
||
| // InvoiceItemType identifiers for this SKU, keyed by billing context. | ||
| InvoiceItemTypes invoice_item_types = 2; | ||
|
|
||
| // Customer-facing display name for the line item. | ||
| string customer_facing_name = 3; | ||
|
|
||
|
|
@@ -22,3 +25,19 @@ message LineItemDetails { | |
| // Defines how usage data is transformed into this line item. | ||
| BillableMetric billable_metric = 6; | ||
| } | ||
|
|
||
| // InvoiceItemType identifiers for a single SKU, split by billing context. | ||
| // Reserved, on-demand, and activated usage of the same SKU can each settle as a | ||
| // distinct InvoiceItemType, so every context carries its own identifier instead | ||
| // of collapsing into one. Contexts are optional because some SKUs (e.g. Seer) | ||
| // fold their usage irregularly and do not populate every context. | ||
| message InvoiceItemTypes { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's not clear to me why we would need to expose this in the proto as anything but an enum. We already have the I don't see why downstream services which need to generate a string like |
||
| // Type for reserved (prepaid) usage of this SKU. | ||
| optional string reserved = 1; | ||
|
dashed marked this conversation as resolved.
|
||
|
|
||
| // Type for on-demand (pay-as-you-go) usage of this SKU. | ||
| optional string ondemand = 2; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. according to the changelog, ondemand has been replaced with payg, can we keep this consistent? |
||
|
|
||
| // Type for activated usage of this SKU. | ||
| optional string activated = 3; | ||
|
Comment on lines
+41
to
+42
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is "activated usage"? what are the example values for it? |
||
| } | ||
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.
what is a SKU? Have we defined it somewhere?