-
Notifications
You must be signed in to change notification settings - Fork 461
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
Add support for billing thresholds #776
Conversation
01da3f0
to
77d0cfc
Compare
(like the other one, removing the approval to leave that to Brandur. Thanks for the review Clinton!) |
77d0cfc
to
74b524c
Compare
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.
A couple minor comments, but otherwise LGTM!
ptal @remi-stripe
invoice.go
Outdated
@@ -217,6 +219,19 @@ type InvoiceCustomField struct { | |||
Value string `json:"value"` | |||
} | |||
|
|||
// InvoiceThresholdReason is a structure representing a reason for a billing threshold. | |||
type InvoiceThresholdReason struct { | |||
AmountGte int64 `json:"amount_gte"` |
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.
I'm assuming gte = "greater than or equal". Can we upcase it in all instances to be GTE
? Things like ID
, PDF
, or URL
are pretty ubiquitous convention through the library.
invoice.go
Outdated
// InvoiceThresholdReasonItemReason is a structure representing the line items that | ||
// triggered an invoice. | ||
type InvoiceThresholdReasonItemReason struct { | ||
LineItemIds []string `json:"line_item_ids"` |
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.
And similarly here: IDs
.
74b524c
to
4a7fdb9
Compare
4a7fdb9
to
4d687a0
Compare
@brandur-stripe Fixed, PTAL (and thank you) |
LGTM! |
Released as 55.11.0. |
r? @brandur-stripe
cc @stripe/api-libraries
This one is a bit complex as it's across multiple resources and no specific test was added for it so we need to make sure it matches OpenAPI.
cc @clintonb-stripe Could you double check that I added the right set of properties too and I'm not missing any? (Java only lists properties, not parameters).
Docs: https://stripe.com/docs/billing/subscriptions/metered-billing/thresholds
Internal PR with gate removal: #126799