mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
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:
10
types/stripe/index.d.ts
vendored
10
types/stripe/index.d.ts
vendored
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user