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 SubParams.TrialFromPlan and SubItemsParams.ClearUsage #546

Merged
merged 1 commit into from
Apr 17, 2018
Merged

Add SubParams.TrialFromPlan and SubItemsParams.ClearUsage #546

merged 1 commit into from
Apr 17, 2018

Conversation

mholt
Copy link
Contributor

@mholt mholt commented Apr 17, 2018

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!

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

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

Copy link
Contributor Author

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!

Copy link
Contributor

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!

Copy link
Contributor Author

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!

@remi-stripe
Copy link
Contributor

This looks good to me but I'll assign to someone for review. Thanks a lot for the quick PR!

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

@brandur-stripe
Copy link
Contributor

LGTM. Thanks @mholt and @remi-stripe!

(And sorry Remi, yet another rebase on your mega-patch.)

@brandur-stripe brandur-stripe merged commit e472c71 into stripe:master Apr 17, 2018
@brandur-stripe
Copy link
Contributor

Released as 30.6.0.

@mholt
Copy link
Contributor Author

mholt commented Apr 17, 2018

Thanks guys! My experience with Stripe has been phenomenal from the beginning. Your teams do a great job.

@brandur-stripe
Copy link
Contributor

@mholt That's great to hear! Thanks again for the contribution here too — we love it when users send PRs ;)

nadaismail-stripe pushed a commit that referenced this pull request Oct 18, 2024
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>
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.

3 participants