-
Notifications
You must be signed in to change notification settings - Fork 18
Description
I've noticed a few issues with the createPlan implementation:
A recent Major change in the Stripe API breaks the current Plans implementation:
(1) We're missing the product parameter. From https://stripe.com/docs/api/java#create_plan-product:
The product whose pricing the created plan will represent. This can either be the ID of an existing product, or a dictionary containing fields used to create a service product.
In this implementation, product is missing from both the Plan and PlanInput case classes.
(2) The name field is incorrectly encoded. I'm assuming the name parameter was supposed to be used as the plan's optional nickname as opposed to the product's required name. If that's so, the spelling of this field is another bug. In the other case, it's still a bug since it's not a required field nested under the (missing) product object.
(3) trial_period_days is not a parameter for creating plans, though it is present in the returned json. Rather, it's a paremeter when creating subscriptions to existing plans.