Skip to content
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

Merged
merged 1 commit into from
Jan 17, 2019

Conversation

remi-stripe
Copy link
Contributor

@remi-stripe remi-stripe commented Jan 17, 2019

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

@remi-stripe
Copy link
Contributor Author

(like the other one, removing the approval to leave that to Brandur. Thanks for the review Clinton!)

@remi-stripe remi-stripe force-pushed the remi-add-billing-thresholds branch from 77d0cfc to 74b524c Compare January 17, 2019 06:14
Copy link
Contributor

@brandur-stripe brandur-stripe left a 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"`
Copy link
Contributor

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"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And similarly here: IDs.

@remi-stripe remi-stripe force-pushed the remi-add-billing-thresholds branch from 74b524c to 4a7fdb9 Compare January 17, 2019 16:59
@remi-stripe remi-stripe force-pushed the remi-add-billing-thresholds branch from 4a7fdb9 to 4d687a0 Compare January 17, 2019 17:03
@remi-stripe
Copy link
Contributor Author

@brandur-stripe Fixed, PTAL (and thank you)

@brandur-stripe
Copy link
Contributor

LGTM!

@brandur-stripe brandur-stripe merged commit 3004dbf into master Jan 17, 2019
@brandur-stripe brandur-stripe deleted the remi-add-billing-thresholds branch January 17, 2019 17:38
@brandur-stripe
Copy link
Contributor

Released as 55.11.0.

nadaismail-stripe added a commit that referenced this pull request Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants