mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-22 03:37:53 +08:00
Add trial_period_days argument when creating subscription
With tests. https://stripe.com/docs/api#create_subscription-trial_period_days
This commit is contained in:
5
types/stripe/index.d.ts
vendored
5
types/stripe/index.d.ts
vendored
@@ -4373,6 +4373,11 @@ declare namespace Stripe {
|
||||
*/
|
||||
trial_end?: number | "now";
|
||||
|
||||
/**
|
||||
* Integer representing the number of trial period days before the customer is charged for the first time.
|
||||
*/
|
||||
trial_period_days?: number;
|
||||
|
||||
/**
|
||||
* List of subscription items, each with an attached plan.
|
||||
*/
|
||||
|
||||
@@ -251,7 +251,7 @@ stripe.customers.create({
|
||||
customer.cards.list().then(function (cards) {});
|
||||
customer.cards.del("card_17xMvXBoqMA9o2xkq6W5gamx").then(function (confirmation) {});
|
||||
|
||||
customer.subscriptions.create({ items: [{ plan: "gold" }] }).then(function (subscription) { });
|
||||
customer.subscriptions.create({ items: [{ plan: "gold" }], trial_period_days: 7 }).then(function (subscription) { });
|
||||
customer.subscriptions.create({ items: [{ plan: "gold" }], trial_end: "now", billing_cycle_anchor: 1516881177 }).then(function (subscription) { });
|
||||
customer.subscriptions.create({ items: [{ plan: "gold" }], trial_end: 1516881177, billing: "send_invoice", days_until_due: 7 }).then(function (subscription) { });
|
||||
customer.subscriptions.create({ items: [{ plan: "gold" }], billing: "charge_automatically" }).then(function (subscription) { });
|
||||
|
||||
Reference in New Issue
Block a user