stripe 17.2.0-beta.2 → 17.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +112 -900
- package/README.md +4 -4
- package/VERSION +1 -1
- package/cjs/resources/FinancialConnections/Accounts.js +0 -5
- package/cjs/resources/Invoices.js +0 -17
- package/cjs/resources/PaymentIntents.js +0 -4
- package/cjs/resources/Quotes.js +0 -32
- package/cjs/resources/SubscriptionSchedules.js +0 -4
- package/cjs/resources/Terminal/Readers.js +0 -12
- package/cjs/resources/TestHelpers/Issuing/Cards.js +0 -4
- package/cjs/resources/V2/Core/Events.js +50 -7
- package/cjs/resources.js +10 -42
- package/cjs/stripe.core.js +1 -1
- package/esm/resources/FinancialConnections/Accounts.js +0 -5
- package/esm/resources/Invoices.js +0 -17
- package/esm/resources/PaymentIntents.js +0 -4
- package/esm/resources/Quotes.js +0 -32
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources/Terminal/Readers.js +0 -12
- package/esm/resources/TestHelpers/Issuing/Cards.js +0 -4
- package/esm/resources/V2/Core/Events.js +50 -7
- package/esm/resources.js +0 -29
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +1 -5
- package/types/AccountSessions.d.ts +5 -75
- package/types/AccountSessionsResource.d.ts +5 -354
- package/types/Accounts.d.ts +3 -127
- package/types/AccountsResource.d.ts +2 -296
- package/types/Billing/CreditGrants.d.ts +2 -2
- package/types/Billing/CreditGrantsResource.d.ts +2 -2
- package/types/Billing/Meters.d.ts +0 -2
- package/types/Charges.d.ts +0 -152
- package/types/ChargesResource.d.ts +0 -1294
- package/types/Checkout/Sessions.d.ts +5 -309
- package/types/Checkout/SessionsResource.d.ts +5 -356
- package/types/ConfirmationTokens.d.ts +0 -137
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNotes.d.ts +0 -21
- package/types/CreditNotesResource.d.ts +0 -51
- package/types/CustomersResource.d.ts +2 -22
- package/types/Disputes.d.ts +0 -152
- package/types/DisputesResource.d.ts +0 -120
- package/types/EventTypes.d.ts +2 -564
- package/types/Events.d.ts +0 -91
- package/types/FinancialConnections/Accounts.d.ts +1 -29
- package/types/FinancialConnections/AccountsResource.d.ts +3 -35
- package/types/FinancialConnections/Sessions.d.ts +1 -49
- package/types/FinancialConnections/SessionsResource.d.ts +1 -38
- package/types/Forwarding/Requests.d.ts +0 -5
- package/types/InvoiceItems.d.ts +0 -5
- package/types/InvoiceItemsResource.d.ts +0 -98
- package/types/InvoiceLineItems.d.ts +1 -31
- package/types/Invoices.d.ts +3 -134
- package/types/InvoicesResource.d.ts +1836 -5515
- package/types/Issuing/Authorizations.d.ts +1 -1
- package/types/Issuing/AuthorizationsResource.d.ts +1 -1
- package/types/Issuing/CardholdersResource.d.ts +1 -2
- package/types/Issuing/Transactions.d.ts +0 -2
- package/types/Issuing/TransactionsResource.d.ts +0 -5
- package/types/LineItems.d.ts +0 -7
- package/types/Mandates.d.ts +0 -85
- package/types/PaymentIntents.d.ts +1 -643
- package/types/PaymentIntentsResource.d.ts +3463 -7739
- package/types/PaymentLinks.d.ts +0 -3
- package/types/PaymentLinksResource.d.ts +0 -6
- package/types/PaymentMethodConfigurations.d.ts +0 -36
- package/types/PaymentMethodConfigurationsResource.d.ts +2 -52
- package/types/PaymentMethods.d.ts +0 -137
- package/types/PaymentMethodsResource.d.ts +0 -158
- package/types/Persons.d.ts +1 -1
- package/types/Prices.d.ts +0 -22
- package/types/PricesResource.d.ts +0 -22
- package/types/Products.d.ts +0 -39
- package/types/ProductsResource.d.ts +0 -36
- package/types/Quotes.d.ts +1 -591
- package/types/QuotesResource.d.ts +199 -2531
- package/types/SetupAttempts.d.ts +0 -19
- package/types/SetupIntents.d.ts +1 -112
- package/types/SetupIntentsResource.d.ts +3 -669
- package/types/Sources.d.ts +0 -23
- package/types/SubscriptionItems.d.ts +0 -21
- package/types/SubscriptionItemsResource.d.ts +0 -109
- package/types/SubscriptionSchedules.d.ts +0 -200
- package/types/SubscriptionSchedulesResource.d.ts +13 -1231
- package/types/Subscriptions.d.ts +1 -82
- package/types/SubscriptionsResource.d.ts +3 -348
- package/types/Tax/CalculationLineItems.d.ts +0 -1
- package/types/Tax/Calculations.d.ts +1 -33
- package/types/Tax/CalculationsResource.d.ts +1 -7
- package/types/Tax/Registrations.d.ts +0 -82
- package/types/Tax/RegistrationsResource.d.ts +0 -109
- package/types/Tax/Transactions.d.ts +1 -8
- package/types/TaxIds.d.ts +1 -7
- package/types/TaxIdsResource.d.ts +1 -7
- package/types/TaxRates.d.ts +0 -25
- package/types/TaxRatesResource.d.ts +0 -2
- package/types/Terminal/Readers.d.ts +0 -278
- package/types/Terminal/ReadersResource.d.ts +0 -215
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -112
- package/types/TestHelpers/Issuing/CardsResource.d.ts +0 -22
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
- package/types/TokensResource.d.ts +1 -1
- package/types/Treasury/FinancialAccounts.d.ts +1 -6
- package/types/Treasury/FinancialAccountsResource.d.ts +0 -10
- package/types/Treasury/OutboundTransfers.d.ts +0 -26
- package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
- package/types/Treasury/ReceivedCredits.d.ts +0 -26
- package/types/Treasury/ReceivedDebits.d.ts +0 -31
- package/types/UsageRecordSummaries.d.ts +1 -1
- package/types/V2/EventTypes.d.ts +3 -1
- package/types/WebhookEndpointsResource.d.ts +0 -66
- package/types/index.d.ts +0 -53
- package/cjs/resources/AccountNotices.js +0 -21
- package/cjs/resources/Capital/FinancingOffers.js +0 -21
- package/cjs/resources/Capital/FinancingSummary.js +0 -12
- package/cjs/resources/Capital/FinancingTransactions.js +0 -17
- package/cjs/resources/FinancialConnections/Institutions.js +0 -17
- package/cjs/resources/GiftCards/Cards.js +0 -23
- package/cjs/resources/GiftCards/Transactions.js +0 -33
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
- package/cjs/resources/Margins.js +0 -22
- package/cjs/resources/Orders.js +0 -24
- package/cjs/resources/Tax/Associations.js +0 -9
- package/cjs/resources/Tax/Forms.js +0 -20
- package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
- package/esm/resources/AccountNotices.js +0 -18
- package/esm/resources/Capital/FinancingOffers.js +0 -18
- package/esm/resources/Capital/FinancingSummary.js +0 -9
- package/esm/resources/Capital/FinancingTransactions.js +0 -14
- package/esm/resources/FinancialConnections/Institutions.js +0 -14
- package/esm/resources/GiftCards/Cards.js +0 -20
- package/esm/resources/GiftCards/Transactions.js +0 -30
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
- package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
- package/esm/resources/Margins.js +0 -19
- package/esm/resources/Orders.js +0 -21
- package/esm/resources/Tax/Associations.js +0 -6
- package/esm/resources/Tax/Forms.js +0 -17
- package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
- package/types/AccountNotices.d.ts +0 -113
- package/types/AccountNoticesResource.d.ts +0 -98
- package/types/Billing/MeterErrorReports.d.ts +0 -106
- package/types/Capital/FinancingOffers.d.ts +0 -188
- package/types/Capital/FinancingOffersResource.d.ts +0 -97
- package/types/Capital/FinancingSummary.d.ts +0 -106
- package/types/Capital/FinancingSummaryResource.d.ts +0 -27
- package/types/Capital/FinancingTransactions.d.ts +0 -135
- package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
- package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
- package/types/FinancialConnections/Institutions.d.ts +0 -93
- package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
- package/types/GiftCards/Cards.d.ts +0 -118
- package/types/GiftCards/CardsResource.d.ts +0 -159
- package/types/GiftCards/Transactions.d.ts +0 -129
- package/types/GiftCards/TransactionsResource.d.ts +0 -201
- package/types/InvoicePayments.d.ts +0 -138
- package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
- package/types/Issuing/DisputeSettlementDetails.d.ts +0 -73
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
- package/types/Issuing/Settlements.d.ts +0 -103
- package/types/Margins.d.ts +0 -56
- package/types/MarginsResource.d.ts +0 -114
- package/types/Orders.d.ts +0 -1154
- package/types/OrdersResource.d.ts +0 -2911
- package/types/QuoteLines.d.ts +0 -634
- package/types/QuotePreviewInvoices.d.ts +0 -1596
- package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -814
- package/types/Tax/Associations.d.ts +0 -126
- package/types/Tax/AssociationsResource.d.ts +0 -29
- package/types/Tax/Forms.d.ts +0 -133
- package/types/Tax/FormsResource.d.ts +0 -90
- package/types/Terminal/ReaderCollectedData.d.ts +0 -51
- package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
package/types/Quotes.d.ts
CHANGED
|
@@ -17,11 +17,6 @@ declare module 'stripe' {
|
|
|
17
17
|
*/
|
|
18
18
|
object: 'quote';
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
22
|
-
*/
|
|
23
|
-
allow_backdated_lines?: boolean | null;
|
|
24
|
-
|
|
25
20
|
/**
|
|
26
21
|
* Total before any discounts or taxes are applied.
|
|
27
22
|
*/
|
|
@@ -122,11 +117,6 @@ declare module 'stripe' {
|
|
|
122
117
|
*/
|
|
123
118
|
line_items?: ApiList<Stripe.LineItem>;
|
|
124
119
|
|
|
125
|
-
/**
|
|
126
|
-
* A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
|
127
|
-
*/
|
|
128
|
-
lines?: Array<string> | null;
|
|
129
|
-
|
|
130
120
|
/**
|
|
131
121
|
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
132
122
|
*/
|
|
@@ -152,11 +142,6 @@ declare module 'stripe' {
|
|
|
152
142
|
*/
|
|
153
143
|
status: Quote.Status;
|
|
154
144
|
|
|
155
|
-
/**
|
|
156
|
-
* Details on when and why a quote has been marked as stale or canceled.
|
|
157
|
-
*/
|
|
158
|
-
status_details?: Quote.StatusDetails | null;
|
|
159
|
-
|
|
160
145
|
status_transitions: Quote.StatusTransitions;
|
|
161
146
|
|
|
162
147
|
/**
|
|
@@ -166,23 +151,11 @@ declare module 'stripe' {
|
|
|
166
151
|
|
|
167
152
|
subscription_data: Quote.SubscriptionData;
|
|
168
153
|
|
|
169
|
-
/**
|
|
170
|
-
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
171
|
-
*/
|
|
172
|
-
subscription_data_overrides?: Array<
|
|
173
|
-
Quote.SubscriptionDataOverride
|
|
174
|
-
> | null;
|
|
175
|
-
|
|
176
154
|
/**
|
|
177
155
|
* The subscription schedule that was created or updated from this quote.
|
|
178
156
|
*/
|
|
179
157
|
subscription_schedule: string | Stripe.SubscriptionSchedule | null;
|
|
180
158
|
|
|
181
|
-
/**
|
|
182
|
-
* The subscription schedules that were created or updated from this quote.
|
|
183
|
-
*/
|
|
184
|
-
subscription_schedules?: Array<Quote.SubscriptionSchedule> | null;
|
|
185
|
-
|
|
186
159
|
/**
|
|
187
160
|
* ID of the test clock this quote belongs to.
|
|
188
161
|
*/
|
|
@@ -237,62 +210,15 @@ declare module 'stripe' {
|
|
|
237
210
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
238
211
|
|
|
239
212
|
interface Computed {
|
|
240
|
-
/**
|
|
241
|
-
* Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
|
|
242
|
-
*/
|
|
243
|
-
last_reestimation_details?: Computed.LastReestimationDetails | null;
|
|
244
|
-
|
|
245
213
|
/**
|
|
246
214
|
* The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
|
|
247
215
|
*/
|
|
248
216
|
recurring: Computed.Recurring | null;
|
|
249
217
|
|
|
250
|
-
/**
|
|
251
|
-
* The time at which the quote's estimated schedules and upcoming invoices were generated.
|
|
252
|
-
*/
|
|
253
|
-
updated_at?: number | null;
|
|
254
|
-
|
|
255
218
|
upfront: Computed.Upfront;
|
|
256
219
|
}
|
|
257
220
|
|
|
258
221
|
namespace Computed {
|
|
259
|
-
interface LastReestimationDetails {
|
|
260
|
-
/**
|
|
261
|
-
* When `status` is `failed`, provides details about the quote reestimation failure.
|
|
262
|
-
*/
|
|
263
|
-
failed: LastReestimationDetails.Failed | null;
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Latest status of the reestimation.
|
|
267
|
-
*/
|
|
268
|
-
status: LastReestimationDetails.Status;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
namespace LastReestimationDetails {
|
|
272
|
-
interface Failed {
|
|
273
|
-
/**
|
|
274
|
-
* The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field.
|
|
275
|
-
*/
|
|
276
|
-
failure_code: string | null;
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID".
|
|
280
|
-
*/
|
|
281
|
-
message: string | null;
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* The reason the reestimation failed.
|
|
285
|
-
*/
|
|
286
|
-
reason: Failed.Reason;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
namespace Failed {
|
|
290
|
-
type Reason = 'automation_failure' | 'internal_error';
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
type Status = 'failed' | 'in_progress' | 'succeeded';
|
|
294
|
-
}
|
|
295
|
-
|
|
296
222
|
interface Recurring {
|
|
297
223
|
/**
|
|
298
224
|
* Total before any discounts or taxes are applied.
|
|
@@ -568,153 +494,7 @@ declare module 'stripe' {
|
|
|
568
494
|
}
|
|
569
495
|
}
|
|
570
496
|
|
|
571
|
-
type Status =
|
|
572
|
-
| 'accepted'
|
|
573
|
-
| 'accepting'
|
|
574
|
-
| 'canceled'
|
|
575
|
-
| 'draft'
|
|
576
|
-
| 'open'
|
|
577
|
-
| 'stale';
|
|
578
|
-
|
|
579
|
-
interface StatusDetails {
|
|
580
|
-
canceled?: StatusDetails.Canceled;
|
|
581
|
-
|
|
582
|
-
stale?: StatusDetails.Stale;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
namespace StatusDetails {
|
|
586
|
-
interface Canceled {
|
|
587
|
-
/**
|
|
588
|
-
* The reason this quote was marked as canceled.
|
|
589
|
-
*/
|
|
590
|
-
reason: Canceled.Reason | null;
|
|
591
|
-
|
|
592
|
-
/**
|
|
593
|
-
* Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
|
|
594
|
-
*/
|
|
595
|
-
transitioned_at: number | null;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
namespace Canceled {
|
|
599
|
-
type Reason =
|
|
600
|
-
| 'canceled'
|
|
601
|
-
| 'quote_accepted'
|
|
602
|
-
| 'quote_expired'
|
|
603
|
-
| 'quote_superseded'
|
|
604
|
-
| 'subscription_canceled';
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
interface Stale {
|
|
608
|
-
/**
|
|
609
|
-
* Time at which the quote expires. Measured in seconds since the Unix epoch.
|
|
610
|
-
*/
|
|
611
|
-
expires_at: number | null;
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* The most recent reason this quote was marked as stale.
|
|
615
|
-
*/
|
|
616
|
-
last_reason: Stale.LastReason | null;
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
* Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
|
|
620
|
-
*/
|
|
621
|
-
last_updated_at: number | null;
|
|
622
|
-
|
|
623
|
-
/**
|
|
624
|
-
* Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
|
|
625
|
-
*/
|
|
626
|
-
transitioned_at: number | null;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
namespace Stale {
|
|
630
|
-
interface LastReason {
|
|
631
|
-
/**
|
|
632
|
-
* The ID of the line that is invalid if the stale reason type is `line_invalid`.
|
|
633
|
-
*/
|
|
634
|
-
line_invalid?: string;
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
|
|
638
|
-
*/
|
|
639
|
-
lines_invalid?: Array<LastReason.LinesInvalid>;
|
|
640
|
-
|
|
641
|
-
/**
|
|
642
|
-
* The user supplied mark stale reason.
|
|
643
|
-
*/
|
|
644
|
-
marked_stale?: string | null;
|
|
645
|
-
|
|
646
|
-
/**
|
|
647
|
-
* The ID of the subscription that was canceled.
|
|
648
|
-
*/
|
|
649
|
-
subscription_canceled?: string;
|
|
650
|
-
|
|
651
|
-
subscription_changed?: LastReason.SubscriptionChanged;
|
|
652
|
-
|
|
653
|
-
/**
|
|
654
|
-
* The ID of the subscription that was expired.
|
|
655
|
-
*/
|
|
656
|
-
subscription_expired?: string;
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* The ID of the subscription schedule that was canceled.
|
|
660
|
-
*/
|
|
661
|
-
subscription_schedule_canceled?: string;
|
|
662
|
-
|
|
663
|
-
subscription_schedule_changed?: LastReason.SubscriptionScheduleChanged;
|
|
664
|
-
|
|
665
|
-
/**
|
|
666
|
-
* The ID of the subscription schedule that was released.
|
|
667
|
-
*/
|
|
668
|
-
subscription_schedule_released?: string;
|
|
669
|
-
|
|
670
|
-
/**
|
|
671
|
-
* The reason the quote was marked as stale.
|
|
672
|
-
*/
|
|
673
|
-
type: LastReason.Type | null;
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
namespace LastReason {
|
|
677
|
-
interface LinesInvalid {
|
|
678
|
-
/**
|
|
679
|
-
* The timestamp at which the lines were marked as invalid.
|
|
680
|
-
*/
|
|
681
|
-
invalid_at: number;
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* The list of lines that became invalid at the given timestamp.
|
|
685
|
-
*/
|
|
686
|
-
lines: Array<string>;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
interface SubscriptionChanged {
|
|
690
|
-
/**
|
|
691
|
-
* The subscription's state before the quote was marked as stale.
|
|
692
|
-
*/
|
|
693
|
-
previous_subscription: Stripe.Subscription | null;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
interface SubscriptionScheduleChanged {
|
|
697
|
-
/**
|
|
698
|
-
* The subscription schedule's state before the quote was marked as stale.
|
|
699
|
-
*/
|
|
700
|
-
previous_subscription_schedule: Stripe.SubscriptionSchedule | null;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
type Type =
|
|
704
|
-
| 'accept_failed_validations'
|
|
705
|
-
| 'bill_on_acceptance_invalid'
|
|
706
|
-
| 'line_invalid'
|
|
707
|
-
| 'lines_invalid'
|
|
708
|
-
| 'marked_stale'
|
|
709
|
-
| 'subscription_canceled'
|
|
710
|
-
| 'subscription_changed'
|
|
711
|
-
| 'subscription_expired'
|
|
712
|
-
| 'subscription_schedule_canceled'
|
|
713
|
-
| 'subscription_schedule_changed'
|
|
714
|
-
| 'subscription_schedule_released';
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
}
|
|
497
|
+
type Status = 'accepted' | 'canceled' | 'draft' | 'open';
|
|
718
498
|
|
|
719
499
|
interface StatusTransitions {
|
|
720
500
|
/**
|
|
@@ -734,21 +514,6 @@ declare module 'stripe' {
|
|
|
734
514
|
}
|
|
735
515
|
|
|
736
516
|
interface SubscriptionData {
|
|
737
|
-
/**
|
|
738
|
-
* Describes the period to bill for upon accepting the quote.
|
|
739
|
-
*/
|
|
740
|
-
bill_on_acceptance?: SubscriptionData.BillOnAcceptance | null;
|
|
741
|
-
|
|
742
|
-
/**
|
|
743
|
-
* Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
|
744
|
-
*/
|
|
745
|
-
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
746
|
-
|
|
747
|
-
/**
|
|
748
|
-
* Whether the subscription will always start a new billing period when the quote is accepted.
|
|
749
|
-
*/
|
|
750
|
-
billing_cycle_anchor?: 'reset' | null;
|
|
751
|
-
|
|
752
517
|
/**
|
|
753
518
|
* The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
|
754
519
|
*/
|
|
@@ -759,372 +524,17 @@ declare module 'stripe' {
|
|
|
759
524
|
*/
|
|
760
525
|
effective_date: number | null;
|
|
761
526
|
|
|
762
|
-
/**
|
|
763
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
764
|
-
*/
|
|
765
|
-
end_behavior?: SubscriptionData.EndBehavior | null;
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* The id of the subscription that will be updated when the quote is accepted.
|
|
769
|
-
*/
|
|
770
|
-
from_subscription?: string | Stripe.Subscription | null;
|
|
771
|
-
|
|
772
527
|
/**
|
|
773
528
|
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
|
774
529
|
*/
|
|
775
530
|
metadata: Stripe.Metadata | null;
|
|
776
531
|
|
|
777
|
-
/**
|
|
778
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
779
|
-
*/
|
|
780
|
-
prebilling?: SubscriptionData.Prebilling | null;
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
|
784
|
-
*/
|
|
785
|
-
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
786
|
-
|
|
787
532
|
/**
|
|
788
533
|
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
789
534
|
*/
|
|
790
535
|
trial_period_days: number | null;
|
|
791
536
|
}
|
|
792
537
|
|
|
793
|
-
namespace SubscriptionData {
|
|
794
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
795
|
-
|
|
796
|
-
interface BillOnAcceptance {
|
|
797
|
-
/**
|
|
798
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
799
|
-
*/
|
|
800
|
-
bill_from: BillOnAcceptance.BillFrom | null;
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
804
|
-
*/
|
|
805
|
-
bill_until: BillOnAcceptance.BillUntil | null;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
namespace BillOnAcceptance {
|
|
809
|
-
interface BillFrom {
|
|
810
|
-
/**
|
|
811
|
-
* The materialized time.
|
|
812
|
-
*/
|
|
813
|
-
computed: number | null;
|
|
814
|
-
|
|
815
|
-
/**
|
|
816
|
-
* The timestamp the given line starts at.
|
|
817
|
-
*/
|
|
818
|
-
line_starts_at: BillFrom.LineStartsAt | null;
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* A precise Unix timestamp.
|
|
822
|
-
*/
|
|
823
|
-
timestamp: number | null;
|
|
824
|
-
|
|
825
|
-
/**
|
|
826
|
-
* The type of method to specify the `bill_from` time.
|
|
827
|
-
*/
|
|
828
|
-
type: BillFrom.Type;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
namespace BillFrom {
|
|
832
|
-
interface LineStartsAt {
|
|
833
|
-
/**
|
|
834
|
-
* Unique identifier for the object.
|
|
835
|
-
*/
|
|
836
|
-
id: string;
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
type Type =
|
|
840
|
-
| 'line_starts_at'
|
|
841
|
-
| 'now'
|
|
842
|
-
| 'pause_collection_start'
|
|
843
|
-
| 'quote_acceptance_date'
|
|
844
|
-
| 'timestamp';
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
interface BillUntil {
|
|
848
|
-
/**
|
|
849
|
-
* The materialized time.
|
|
850
|
-
*/
|
|
851
|
-
computed: number | null;
|
|
852
|
-
|
|
853
|
-
/**
|
|
854
|
-
* Time span for the quote line starting from the `starts_at` date.
|
|
855
|
-
*/
|
|
856
|
-
duration: BillUntil.Duration | null;
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* The timestamp the given line ends at.
|
|
860
|
-
*/
|
|
861
|
-
line_ends_at: BillUntil.LineEndsAt | null;
|
|
862
|
-
|
|
863
|
-
/**
|
|
864
|
-
* A precise Unix timestamp.
|
|
865
|
-
*/
|
|
866
|
-
timestamp: number | null;
|
|
867
|
-
|
|
868
|
-
/**
|
|
869
|
-
* The type of method to specify the `bill_until` time.
|
|
870
|
-
*/
|
|
871
|
-
type: BillUntil.Type;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
namespace BillUntil {
|
|
875
|
-
interface Duration {
|
|
876
|
-
/**
|
|
877
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
878
|
-
*/
|
|
879
|
-
interval: Duration.Interval;
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
883
|
-
*/
|
|
884
|
-
interval_count: number;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
namespace Duration {
|
|
888
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
interface LineEndsAt {
|
|
892
|
-
/**
|
|
893
|
-
* Unique identifier for the object.
|
|
894
|
-
*/
|
|
895
|
-
id: string;
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
type Type =
|
|
899
|
-
| 'duration'
|
|
900
|
-
| 'line_ends_at'
|
|
901
|
-
| 'schedule_end'
|
|
902
|
-
| 'timestamp'
|
|
903
|
-
| 'upcoming_invoice';
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
type EndBehavior = 'cancel' | 'release';
|
|
908
|
-
|
|
909
|
-
interface Prebilling {
|
|
910
|
-
iterations: number;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
type ProrationBehavior =
|
|
914
|
-
| 'always_invoice'
|
|
915
|
-
| 'create_prorations'
|
|
916
|
-
| 'none';
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
interface SubscriptionDataOverride {
|
|
920
|
-
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
921
|
-
|
|
922
|
-
/**
|
|
923
|
-
* Describes the period to bill for upon accepting the quote.
|
|
924
|
-
*/
|
|
925
|
-
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance | null;
|
|
926
|
-
|
|
927
|
-
/**
|
|
928
|
-
* Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
|
929
|
-
*/
|
|
930
|
-
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
931
|
-
|
|
932
|
-
/**
|
|
933
|
-
* The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
|
934
|
-
*/
|
|
935
|
-
customer: string | null;
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
|
939
|
-
*/
|
|
940
|
-
description: string | null;
|
|
941
|
-
|
|
942
|
-
/**
|
|
943
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
944
|
-
*/
|
|
945
|
-
end_behavior?: SubscriptionDataOverride.EndBehavior | null;
|
|
946
|
-
|
|
947
|
-
/**
|
|
948
|
-
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
|
949
|
-
*/
|
|
950
|
-
proration_behavior?: SubscriptionDataOverride.ProrationBehavior | null;
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
namespace SubscriptionDataOverride {
|
|
954
|
-
interface AppliesTo {
|
|
955
|
-
/**
|
|
956
|
-
* A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
|
957
|
-
*/
|
|
958
|
-
new_reference: string | null;
|
|
959
|
-
|
|
960
|
-
/**
|
|
961
|
-
* The ID of the schedule the line applies to.
|
|
962
|
-
*/
|
|
963
|
-
subscription_schedule: string | null;
|
|
964
|
-
|
|
965
|
-
/**
|
|
966
|
-
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
967
|
-
*/
|
|
968
|
-
type: AppliesTo.Type;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
namespace AppliesTo {
|
|
972
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
976
|
-
|
|
977
|
-
interface BillOnAcceptance {
|
|
978
|
-
/**
|
|
979
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
980
|
-
*/
|
|
981
|
-
bill_from: BillOnAcceptance.BillFrom | null;
|
|
982
|
-
|
|
983
|
-
/**
|
|
984
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
985
|
-
*/
|
|
986
|
-
bill_until: BillOnAcceptance.BillUntil | null;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
namespace BillOnAcceptance {
|
|
990
|
-
interface BillFrom {
|
|
991
|
-
/**
|
|
992
|
-
* The materialized time.
|
|
993
|
-
*/
|
|
994
|
-
computed: number | null;
|
|
995
|
-
|
|
996
|
-
/**
|
|
997
|
-
* The timestamp the given line starts at.
|
|
998
|
-
*/
|
|
999
|
-
line_starts_at: BillFrom.LineStartsAt | null;
|
|
1000
|
-
|
|
1001
|
-
/**
|
|
1002
|
-
* A precise Unix timestamp.
|
|
1003
|
-
*/
|
|
1004
|
-
timestamp: number | null;
|
|
1005
|
-
|
|
1006
|
-
/**
|
|
1007
|
-
* The type of method to specify the `bill_from` time.
|
|
1008
|
-
*/
|
|
1009
|
-
type: BillFrom.Type;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
namespace BillFrom {
|
|
1013
|
-
interface LineStartsAt {
|
|
1014
|
-
/**
|
|
1015
|
-
* Unique identifier for the object.
|
|
1016
|
-
*/
|
|
1017
|
-
id: string;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
type Type =
|
|
1021
|
-
| 'line_starts_at'
|
|
1022
|
-
| 'now'
|
|
1023
|
-
| 'pause_collection_start'
|
|
1024
|
-
| 'quote_acceptance_date'
|
|
1025
|
-
| 'timestamp';
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
interface BillUntil {
|
|
1029
|
-
/**
|
|
1030
|
-
* The materialized time.
|
|
1031
|
-
*/
|
|
1032
|
-
computed: number | null;
|
|
1033
|
-
|
|
1034
|
-
/**
|
|
1035
|
-
* Time span for the quote line starting from the `starts_at` date.
|
|
1036
|
-
*/
|
|
1037
|
-
duration: BillUntil.Duration | null;
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
* The timestamp the given line ends at.
|
|
1041
|
-
*/
|
|
1042
|
-
line_ends_at: BillUntil.LineEndsAt | null;
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* A precise Unix timestamp.
|
|
1046
|
-
*/
|
|
1047
|
-
timestamp: number | null;
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* The type of method to specify the `bill_until` time.
|
|
1051
|
-
*/
|
|
1052
|
-
type: BillUntil.Type;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
namespace BillUntil {
|
|
1056
|
-
interface Duration {
|
|
1057
|
-
/**
|
|
1058
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1059
|
-
*/
|
|
1060
|
-
interval: Duration.Interval;
|
|
1061
|
-
|
|
1062
|
-
/**
|
|
1063
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1064
|
-
*/
|
|
1065
|
-
interval_count: number;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
namespace Duration {
|
|
1069
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
interface LineEndsAt {
|
|
1073
|
-
/**
|
|
1074
|
-
* Unique identifier for the object.
|
|
1075
|
-
*/
|
|
1076
|
-
id: string;
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
type Type =
|
|
1080
|
-
| 'duration'
|
|
1081
|
-
| 'line_ends_at'
|
|
1082
|
-
| 'schedule_end'
|
|
1083
|
-
| 'timestamp'
|
|
1084
|
-
| 'upcoming_invoice';
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
type EndBehavior = 'cancel' | 'release';
|
|
1089
|
-
|
|
1090
|
-
type ProrationBehavior =
|
|
1091
|
-
| 'always_invoice'
|
|
1092
|
-
| 'create_prorations'
|
|
1093
|
-
| 'none';
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
interface SubscriptionSchedule {
|
|
1097
|
-
applies_to: SubscriptionSchedule.AppliesTo;
|
|
1098
|
-
|
|
1099
|
-
/**
|
|
1100
|
-
* The subscription schedule that was created or updated from this quote.
|
|
1101
|
-
*/
|
|
1102
|
-
subscription_schedule: string;
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
namespace SubscriptionSchedule {
|
|
1106
|
-
interface AppliesTo {
|
|
1107
|
-
/**
|
|
1108
|
-
* A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
|
|
1109
|
-
*/
|
|
1110
|
-
new_reference: string | null;
|
|
1111
|
-
|
|
1112
|
-
/**
|
|
1113
|
-
* The ID of the schedule the line applies to.
|
|
1114
|
-
*/
|
|
1115
|
-
subscription_schedule: string | null;
|
|
1116
|
-
|
|
1117
|
-
/**
|
|
1118
|
-
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
1119
|
-
*/
|
|
1120
|
-
type: AppliesTo.Type;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
namespace AppliesTo {
|
|
1124
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
538
|
interface TotalDetails {
|
|
1129
539
|
/**
|
|
1130
540
|
* This is the sum of all the discounts.
|