-
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 SubParams.TrialFromPlan and SubItemsParams.ClearUsage #546
Conversation
@@ -69,6 +70,7 @@ func (p *SubParams) AppendTo(body *form.Values, keyParts []string) { | |||
// For more details see https://stripe.com/docs/api#create_subscription and https://stripe.com/docs/api#update_subscription. | |||
type SubItemsParams struct { | |||
Params `form:"*"` | |||
ClearUsage bool `form:"clear_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.
can you clarify what this property is? I don't see it in the documentation: https://stripe.com/docs/api#subscription_items
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.
It's here, for updating a subscription: https://stripe.com/docs/api#update_subscription-items-clear_usage -- correct me if I have this in the wrong place. But I just tested it and it worked today what didn't yesterday 😶
Thanks for the quick look, by the way!
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.
Ah gotcha, I totally missed we added that property!
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.
No problem -- you guys have a huge API and frankly, it's a real joy to work with. Thanks for setting the example for API providers everywhere!
This looks good to me but I'll assign to someone for review. Thanks a lot for the quick PR! r? @brandur-stripe |
LGTM. Thanks @mholt and @remi-stripe! (And sorry Remi, yet another rebase on your mega-patch.) |
Released as 30.6.0. |
Thanks guys! My experience with Stripe has been phenomenal from the beginning. Your teams do a great job. |
@mholt That's great to hear! Thanks again for the contribution here too — we love it when users send PRs ;) |
Bumps [sorbet-runtime](https://github.com/sorbet/sorbet) from 0.5.10125 to 0.5.10133. - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: sorbet-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was simpler than I thought it'd be (and it seems to work!) so here is my pull request to implement #545. I don't have a whole lot of time, but let me know if there's anything I missed!