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

[codegen] Add SubscriptionItem.create_usage_record method #607

Merged
merged 2 commits into from Aug 13, 2019

Conversation

ob-stripe
Copy link
Contributor

@ob-stripe ob-stripe commented Aug 12, 2019

r? @rattrayalex-stripe
cc @stripe/api-libraries

  • Sanity check for correctness.
  • Ensure appropriate test coverage (ie; write tests).

@ob-stripe ob-stripe changed the title [codegen] Update API Resources [codegen] Add SubscriptionItem.create_usage_record method Aug 13, 2019
@ob-stripe ob-stripe merged commit 8f6fbf3 into master Aug 13, 2019
@ob-stripe ob-stripe deleted the ob/codegen-c806fa1 branch August 13, 2019 00:22
@ob-stripe
Copy link
Contributor Author

Released as 2.35.0.

@rogerpine
Copy link

Is action='set' supported in create_usage_record? I only get the increment behavior. Set is meant to overwrite the full usage amount during the billing period.
Thank you.

@ob-stripe
Copy link
Contributor Author

@rogerpine The library doesn't know about specific parameters, it simply passes parameters along to Stripe's API. So all parameters should be supported.

Are you observing an unexpected behavior when passing action='set'?

@rogerpine
Copy link

Yes, when I passed action='set', it was continuing to increment.

@remi-stripe
Copy link
Contributor

@rogerpine set only works if you re-use the same timestamp for all your UsageRecords. If you pass a different timestamp each time it will still sum up to the total.

I'd recommend reaching out to our support team to discuss this instead: https://support.stripe.com/contact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants