mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add cancel_at_period_end option to sub update
https://stripe.com/docs/api#update_subscription-cancel_at_period_end
This commit is contained in:
parent
27c85093ad
commit
f52ee65b22
5
types/stripe/index.d.ts
vendored
5
types/stripe/index.d.ts
vendored
@ -4562,6 +4562,11 @@ declare namespace Stripe {
|
||||
* String, unchanged (default) or now. This allows you to reset the billing cycle of a subscription.
|
||||
*/
|
||||
billing_cycle_anchor?: "unchanged" | "now";
|
||||
|
||||
/**
|
||||
* Boolean indicating whether this subscription should cancel at the end of the current period.
|
||||
*/
|
||||
cancel_at_period_end?: boolean;
|
||||
}
|
||||
|
||||
interface ISubscriptionCancellationOptions extends IDataOptions {
|
||||
|
||||
@ -259,7 +259,7 @@ stripe.customers.create({
|
||||
customer.subscriptions.update("sub_8Eluur5KoIKxuy", { items: [{ id: subscription.items.data[0].id, plan: "silver" }] }).then(function (subscription) { });
|
||||
});
|
||||
customer.subscriptions.update("sub_8Eluur5KoIKxuy", { trial_end: "now", billing_cycle_anchor: "now" });
|
||||
customer.subscriptions.update("sub_8Eluur5KoIKxuy", { trial_end: 1516881177, billing: "send_invoice", days_until_due: 7, billing_cycle_anchor: "unchanged" });
|
||||
customer.subscriptions.update("sub_8Eluur5KoIKxuy", { trial_end: 1516881177, billing: "send_invoice", days_until_due: 7, billing_cycle_anchor: "unchanged", cancel_at_period_end: false });
|
||||
customer.subscriptions.list().then(function (subscriptions) { });
|
||||
customer.subscriptions.del("sub_8Eluur5KoIKxuy").then(function (subscription) { });
|
||||
customer.subscriptions.deleteDiscount("sub_8Eluur5KoIKxuy").then(function (confirmation) { });
|
||||
|
||||
Loading…
Reference in New Issue
Block a user