-
Notifications
You must be signed in to change notification settings - Fork 460
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 usage record summary #663
Conversation
d929b3d
to
c758af1
Compare
Okay confirmed the resources can't be expanded (invoice and subscription item) so ready to review. |
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 Remi, but thanks for biting off this work as usual :$
ptal @remi-stripe
usage_record_summary.go
Outdated
// See https://stripe.com/docs/api#usage_records | ||
type UsageRecordSummary struct { | ||
ID string `json:"id"` | ||
Live bool `json:"livemode"` |
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 think we agreed on the fully expanded Livemode
for these types of properties, but doh! I just noticed when grepping that we missed a couple places — usage records, issuer fraud records, and source transactions.
I'm not sure what to do with those ones right now, but can we make this one Livemode
?
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.
Damn nice catch, I copy/pasted from usagerecord and when I double checked I saw other matches and did not look further
usage_record_summary.go
Outdated
type UsageRecordSummary struct { | ||
ID string `json:"id"` | ||
Live bool `json:"livemode"` | ||
Invoice string `json:"invoice"` |
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.
Also, I think for most structs we went with pure alphabetical order — ID
and Livemode
don't get special treatment.
Again, it looks like usage records are a little weird in this respect.
usagerecordsummary/client.go
Outdated
"github.com/stripe/stripe-go/form" | ||
) | ||
|
||
// Client is used to invoke /plans APIs. |
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 think for most of these we went with something like:
// Client is used to invoke APIs related to usage record summaries.
c758af1
to
41be9fe
Compare
@brandur-stripe Nice catch on all this. I took this as an opportunity to fix all PTAL |
LGTM. Thanks! |
Released as 42.0.0. |
cc @stripe/api-libraries