chore(types/stripe): Added stripe.plans.IPlanUpdateOptions options (#41080)

* chore(types/stripe): Added stripe.plans.IPlanUpdateOptions options

* fix(types/stripe): trial_period_days type to number
This commit is contained in:
Keisuke Kan
2019-12-18 22:15:51 +09:00
committed by Orta
parent 51c3f30bca
commit 7b2a6da4ba
2 changed files with 16 additions and 0 deletions

View File

@@ -8571,6 +8571,16 @@ declare namespace Stripe {
* be affected.
*/
product?: string;
/**
* Whether the plan is currently available for new subscriptions.
*/
active?: boolean;
/**
* Default number of trial days when subscribing a customer to this plan using `trial_from_plan=true`.
*/
trial_period_days?: number;
}
interface IPlanCreationOptionsProductHash {

View File

@@ -2351,6 +2351,12 @@ stripe.plans.update(
stripe.plans.update('gold-plan', { nickname: 'New gold plan nickname' }).then(plan => {
// asynchronously called
});
stripe.plans.update('gold-plan', { active: true }).then(plan => {
// asynchronously called
});
stripe.plans.update('gold-plan', { trial_period_days: 1 }).then(plan => {
// asynchronously called
});
stripe.plans.del('gold-plan', (err, confirmation) => {
// asynchronously called