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

Update plan with product #1202

Closed
SimonChris opened this issue Jun 12, 2018 · 3 comments · Fixed by #1203
Closed

Update plan with product #1202

SimonChris opened this issue Jun 12, 2018 · 3 comments · Fixed by #1203
Assignees

Comments

@SimonChris
Copy link

I am trying to migrate from the old non-product API, in which I updated a Plan from a plan ID. In the new API, the "Name" and "StatementDescriptor" fields are now on the Product instead of the Plan.

According to the Stripe docs, the plan update settings should be able to accept an optional Product argument, but this does not appear to be present on the Stripe.NET StripePlanUpdateOptions class.

How can I update the plan and the corresponding product from the plan ID?

@remi-stripe
Copy link
Contributor

Thanks for the report! I had no idea we supported this feature but I just pushed a PR for the next version to support this!

@SimonChris
Copy link
Author

SimonChris commented Jun 12, 2018

Thanks for the quick reply :).

I took a look at your PR, and it seems like I will still only be able to update the Product Id on the plan. What I am looking for is a way to update the properties of the existing product, while updating the plan.

Is there any way to update the plan product properties without having to update the plan and the product separately?

@remi-stripe
Copy link
Contributor

@SimonChris I tested to be safe before pushing my PR and that is not possible. At the moment the product parameter on the Update Plan API only supports a product id to move the plan from one product to another.

If you want to update a product's properties, you would need to use the Update Product API instead.

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 a pull request may close this issue.

2 participants