-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[stripe] Use attributionId in stripe queries in usage #12755
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
Conversation
f036a1e
to
43fb82c
Compare
43fb82c
to
bba700f
Compare
cfe8ef9
to
713cf9b
Compare
713cf9b
to
c2d4b28
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.
Thanks! ❤️
}) | ||
if err != nil { | ||
return nil, fmt.Errorf("failed to register usage for customer %q on subscription item %s", customer.Name, subscriptionItemId) | ||
} | ||
|
||
return &UsageRecord{ | ||
SubscriptionItemID: subscriptionItemId, | ||
Quantity: summary.Credits, | ||
Quantity: credits, |
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: do we use this struct anywhere? the name UsageRecord
might be a bit confusing given we have records called Usage
.
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.
Fair. It was mostly to return something from the method but we can easily return a tuple instead.
Description
Customers in staging & prod have been udpated to additively contain
attributionId
metadata.Related Issue(s)
Fixes #
How to test
Release Notes
Documentation
Werft options: