stripe 18.2.0 → 18.3.0-beta.1
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 +1241 -11
- package/README.md +1 -0
- package/VERSION +1 -1
- package/cjs/Error.js +91 -1
- package/cjs/apiVersion.js +1 -1
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/BalanceSettings.js +10 -0
- package/cjs/resources/Capital/FinancingOffers.js +21 -0
- package/cjs/resources/Capital/FinancingSummary.js +12 -0
- package/cjs/resources/Capital/FinancingTransactions.js +17 -0
- package/cjs/resources/ExternalAccounts.js +23 -0
- package/cjs/resources/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/FinancialConnections/Institutions.js +17 -0
- package/cjs/resources/FxQuotes.js +15 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/{InvoicePayments.js → PaymentAttemptRecords.js} +4 -4
- package/cjs/resources/PaymentIntents.js +13 -0
- package/cjs/resources/PaymentRecords.js +29 -0
- package/cjs/resources/Privacy/RedactionJobs.js +42 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Subscriptions.js +4 -0
- package/cjs/resources/Tax/Associations.js +9 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
- package/cjs/resources/Terminal/Readers.js +8 -0
- package/cjs/resources/V2/Core/AccountLinks.js +9 -0
- package/cjs/resources/V2/Core/Accounts/Persons.js +29 -0
- package/cjs/resources/V2/Core/Accounts.js +25 -0
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +28 -0
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +24 -0
- package/cjs/resources/V2/MoneyManagement/Adjustments.js +17 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +17 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +21 -0
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +21 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +16 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +25 -0
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +29 -0
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +25 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +25 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +12 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +17 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +17 -0
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +17 -0
- package/cjs/resources/V2/MoneyManagement/Transactions.js +17 -0
- package/cjs/resources/V2/Payments/OffSessionPayments.js +25 -0
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
- package/cjs/resources.js +98 -10
- package/cjs/stripe.core.js +1 -1
- package/esm/Error.js +79 -0
- package/esm/apiVersion.js +1 -1
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/BalanceSettings.js +7 -0
- package/esm/resources/Capital/FinancingOffers.js +18 -0
- package/esm/resources/Capital/FinancingSummary.js +9 -0
- package/esm/resources/Capital/FinancingTransactions.js +14 -0
- package/esm/resources/ExternalAccounts.js +20 -0
- package/esm/resources/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/FinancialConnections/Institutions.js +14 -0
- package/esm/resources/FxQuotes.js +12 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
- package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/{InvoicePayments.js → PaymentAttemptRecords.js} +3 -3
- package/esm/resources/PaymentIntents.js +13 -0
- package/esm/resources/PaymentRecords.js +26 -0
- package/esm/resources/Privacy/RedactionJobs.js +39 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Subscriptions.js +4 -0
- package/esm/resources/Tax/Associations.js +6 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
- package/esm/resources/Terminal/Readers.js +8 -0
- package/esm/resources/V2/Core/AccountLinks.js +6 -0
- package/esm/resources/V2/Core/Accounts/Persons.js +26 -0
- package/esm/resources/V2/Core/Accounts.js +22 -0
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js +25 -0
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js +21 -0
- package/esm/resources/V2/MoneyManagement/Adjustments.js +14 -0
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +14 -0
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +18 -0
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js +18 -0
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +13 -0
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js +22 -0
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +26 -0
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +22 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +22 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +9 -0
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +14 -0
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +14 -0
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js +14 -0
- package/esm/resources/V2/MoneyManagement/Transactions.js +14 -0
- package/esm/resources/V2/Payments/OffSessionPayments.js +22 -0
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
- package/esm/resources.js +82 -1
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +5 -1
- package/types/AccountNotices.d.ts +113 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +45 -0
- package/types/AccountSessionsResource.d.ts +264 -0
- package/types/Accounts.d.ts +212 -1
- package/types/AccountsResource.d.ts +544 -0
- package/types/BalanceSettings.d.ts +89 -0
- package/types/BalanceSettingsResource.d.ts +108 -0
- package/types/Billing/CreditBalanceSummary.d.ts +5 -0
- package/types/Billing/CreditBalanceSummaryResource.d.ts +8 -3
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +12 -4
- package/types/Billing/CreditGrants.d.ts +5 -0
- package/types/Billing/CreditGrantsResource.d.ts +11 -1
- package/types/BillingPortal/Sessions.d.ts +5 -0
- package/types/BillingPortal/SessionsResource.d.ts +12 -4
- package/types/Capital/FinancingOffers.d.ts +188 -0
- package/types/Capital/FinancingOffersResource.d.ts +97 -0
- package/types/Capital/FinancingSummary.d.ts +106 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Cards.d.ts +5 -0
- package/types/CashBalances.d.ts +5 -0
- package/types/Charges.d.ts +166 -0
- package/types/ChargesResource.d.ts +1406 -0
- package/types/Checkout/Sessions.d.ts +314 -1
- package/types/Checkout/SessionsResource.d.ts +340 -1
- package/types/ConfirmationTokens.d.ts +125 -0
- package/types/Coupons.d.ts +33 -0
- package/types/CouponsResource.d.ts +21 -0
- package/types/CreditNoteLineItems.d.ts +17 -0
- package/types/CreditNotes.d.ts +5 -0
- package/types/CreditNotesResource.d.ts +5 -0
- package/types/CustomerBalanceTransactions.d.ts +2 -0
- package/types/CustomerCashBalanceTransactions.d.ts +2 -0
- package/types/CustomerSessions.d.ts +5 -0
- package/types/CustomerSessionsResource.d.ts +6 -1
- package/types/Customers.d.ts +2 -0
- package/types/CustomersResource.d.ts +8 -0
- package/types/Discounts.d.ts +10 -0
- package/types/Errors.d.ts +69 -2
- package/types/EventTypes.d.ts +681 -0
- package/types/Events.d.ts +98 -0
- package/types/ExternalAccountsResource.d.ts +304 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +36 -1
- package/types/FinancialConnections/AccountsResource.d.ts +40 -3
- package/types/FinancialConnections/Institutions.d.ts +98 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +51 -1
- package/types/FinancialConnections/SessionsResource.d.ts +43 -1
- package/types/FxQuotes.d.ts +153 -0
- package/types/FxQuotesResource.d.ts +130 -0
- package/types/Identity/VerificationSessions.d.ts +5 -0
- package/types/Identity/VerificationSessionsResource.d.ts +7 -0
- package/types/InvoiceItems.d.ts +10 -0
- package/types/InvoiceItemsResource.d.ts +117 -6
- package/types/InvoiceLineItems.d.ts +45 -1
- package/types/InvoicePayments.d.ts +5 -0
- package/types/Invoices.d.ts +133 -3
- package/types/InvoicesResource.d.ts +1458 -13
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
- package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
- package/types/Issuing/Settlements.d.ts +113 -0
- package/types/Issuing/Transactions.d.ts +5 -0
- package/types/Issuing/TransactionsResource.d.ts +5 -0
- package/types/LineItems.d.ts +49 -0
- package/types/Mandates.d.ts +77 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1159 -0
- package/types/OrdersResource.d.ts +2967 -0
- package/types/PaymentAttemptRecords.d.ts +2132 -0
- package/types/PaymentAttemptRecordsResource.d.ts +47 -0
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +116 -0
- package/types/PaymentIntents.d.ts +764 -2
- package/types/PaymentIntentsResource.d.ts +8819 -4111
- package/types/PaymentLinks.d.ts +6 -0
- package/types/PaymentLinksResource.d.ts +12 -0
- package/types/PaymentMethodConfigurations.d.ts +180 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
- package/types/PaymentMethods.d.ts +125 -0
- package/types/PaymentMethodsResource.d.ts +167 -2
- package/types/PaymentRecords.d.ts +2125 -0
- package/types/PaymentRecordsResource.d.ts +455 -0
- package/types/Payouts.d.ts +5 -0
- package/types/PayoutsResource.d.ts +5 -0
- package/types/Prices.d.ts +22 -0
- package/types/PricesResource.d.ts +22 -0
- package/types/Privacy/RedactionJobValidationErrors.d.ts +60 -0
- package/types/Privacy/RedactionJobs.d.ts +111 -0
- package/types/Privacy/RedactionJobsResource.d.ts +230 -0
- package/types/PromotionCodes.d.ts +5 -0
- package/types/PromotionCodesResource.d.ts +10 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePreviewInvoices.d.ts +1695 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +831 -0
- package/types/Quotes.d.ts +603 -1
- package/types/QuotesResource.d.ts +2572 -218
- package/types/Refunds.d.ts +14 -0
- package/types/SetupAttempts.d.ts +47 -1
- package/types/SetupIntents.d.ts +118 -2
- package/types/SetupIntentsResource.d.ts +730 -3
- package/types/Sources.d.ts +29 -0
- package/types/SubscriptionItems.d.ts +30 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +212 -0
- package/types/SubscriptionSchedulesResource.d.ts +1240 -5
- package/types/Subscriptions.d.ts +116 -1
- package/types/SubscriptionsResource.d.ts +424 -10
- package/types/Tax/Associations.d.ts +82 -0
- package/types/Tax/AssociationsResource.d.ts +29 -0
- package/types/Tax/Forms.d.ts +220 -0
- package/types/Tax/FormsResource.d.ts +107 -0
- package/types/TaxIds.d.ts +10 -0
- package/types/TaxIdsResource.d.ts +10 -0
- package/types/Terminal/ReaderCollectedData.d.ts +51 -0
- package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
- package/types/Terminal/Readers.d.ts +102 -0
- package/types/Terminal/ReadersResource.d.ts +96 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +126 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/Transfers.d.ts +5 -0
- package/types/TransfersResource.d.ts +5 -0
- package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
- package/types/Treasury/FinancialAccounts.d.ts +5 -0
- package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
- package/types/Treasury/OutboundTransfers.d.ts +26 -0
- package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
- package/types/Treasury/ReceivedCredits.d.ts +26 -0
- package/types/Treasury/ReceivedDebits.d.ts +31 -0
- package/types/V2/Core/AccountLinks.d.ts +106 -0
- package/types/V2/Core/AccountLinksResource.d.ts +90 -0
- package/types/V2/Core/Accounts/PersonsResource.d.ts +3770 -0
- package/types/V2/Core/Accounts.d.ts +8169 -0
- package/types/V2/Core/AccountsResource.d.ts +10203 -0
- package/types/V2/Core/Persons.d.ts +1867 -0
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +160 -0
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +172 -0
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +70 -0
- package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +123 -0
- package/types/V2/EventTypes.d.ts +907 -5
- package/types/V2/FinancialAddressCreditSimulations.d.ts +27 -0
- package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +32 -0
- package/types/V2/MoneyManagement/Adjustments.d.ts +110 -0
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +546 -0
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +52 -0
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +314 -0
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +288 -0
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +206 -0
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +144 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +168 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +115 -0
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +278 -0
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +242 -0
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +296 -0
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +251 -0
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +207 -0
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +151 -0
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +41 -0
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +87 -0
- package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +113 -0
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +243 -0
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +176 -0
- package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +48 -0
- package/types/V2/MoneyManagement/TransactionEntries.d.ts +155 -0
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
- package/types/V2/MoneyManagement/Transactions.d.ts +170 -0
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
- package/types/V2/Payments/OffSessionPayments.d.ts +167 -0
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +159 -0
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +66 -0
- package/types/WebhookEndpointsResource.d.ts +80 -0
- package/types/index.d.ts +141 -5
- package/types/lib.d.ts +11 -1
- package/types/test/typescriptTest.ts +3 -3
- package/types/InvoicePaymentsResource.d.ts +0 -74
package/types/Quotes.d.ts
CHANGED
|
@@ -17,6 +17,11 @@ 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
|
+
|
|
20
25
|
/**
|
|
21
26
|
* Total before any discounts or taxes are applied.
|
|
22
27
|
*/
|
|
@@ -70,6 +75,11 @@ declare module 'stripe' {
|
|
|
70
75
|
*/
|
|
71
76
|
customer: string | Stripe.Customer | Stripe.DeletedCustomer | null;
|
|
72
77
|
|
|
78
|
+
/**
|
|
79
|
+
* The account which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
|
80
|
+
*/
|
|
81
|
+
customer_account?: string | null;
|
|
82
|
+
|
|
73
83
|
/**
|
|
74
84
|
* The tax rates applied to this quote.
|
|
75
85
|
*/
|
|
@@ -117,6 +127,11 @@ declare module 'stripe' {
|
|
|
117
127
|
*/
|
|
118
128
|
line_items?: ApiList<Stripe.LineItem>;
|
|
119
129
|
|
|
130
|
+
/**
|
|
131
|
+
* 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.
|
|
132
|
+
*/
|
|
133
|
+
lines?: Array<string> | null;
|
|
134
|
+
|
|
120
135
|
/**
|
|
121
136
|
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
122
137
|
*/
|
|
@@ -142,6 +157,11 @@ declare module 'stripe' {
|
|
|
142
157
|
*/
|
|
143
158
|
status: Quote.Status;
|
|
144
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Details on when and why a quote has been marked as stale or canceled.
|
|
162
|
+
*/
|
|
163
|
+
status_details?: Quote.StatusDetails | null;
|
|
164
|
+
|
|
145
165
|
status_transitions: Quote.StatusTransitions;
|
|
146
166
|
|
|
147
167
|
/**
|
|
@@ -151,11 +171,23 @@ declare module 'stripe' {
|
|
|
151
171
|
|
|
152
172
|
subscription_data: Quote.SubscriptionData;
|
|
153
173
|
|
|
174
|
+
/**
|
|
175
|
+
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
176
|
+
*/
|
|
177
|
+
subscription_data_overrides?: Array<
|
|
178
|
+
Quote.SubscriptionDataOverride
|
|
179
|
+
> | null;
|
|
180
|
+
|
|
154
181
|
/**
|
|
155
182
|
* The subscription schedule that was created or updated from this quote.
|
|
156
183
|
*/
|
|
157
184
|
subscription_schedule: string | Stripe.SubscriptionSchedule | null;
|
|
158
185
|
|
|
186
|
+
/**
|
|
187
|
+
* The subscription schedules that were created or updated from this quote.
|
|
188
|
+
*/
|
|
189
|
+
subscription_schedules?: Array<Quote.SubscriptionSchedule> | null;
|
|
190
|
+
|
|
159
191
|
/**
|
|
160
192
|
* ID of the test clock this quote belongs to.
|
|
161
193
|
*/
|
|
@@ -215,15 +247,62 @@ declare module 'stripe' {
|
|
|
215
247
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
216
248
|
|
|
217
249
|
interface Computed {
|
|
250
|
+
/**
|
|
251
|
+
* Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
|
|
252
|
+
*/
|
|
253
|
+
last_reestimation_details?: Computed.LastReestimationDetails | null;
|
|
254
|
+
|
|
218
255
|
/**
|
|
219
256
|
* 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.
|
|
220
257
|
*/
|
|
221
258
|
recurring: Computed.Recurring | null;
|
|
222
259
|
|
|
260
|
+
/**
|
|
261
|
+
* The time at which the quote's estimated schedules and upcoming invoices were generated.
|
|
262
|
+
*/
|
|
263
|
+
updated_at?: number | null;
|
|
264
|
+
|
|
223
265
|
upfront: Computed.Upfront;
|
|
224
266
|
}
|
|
225
267
|
|
|
226
268
|
namespace Computed {
|
|
269
|
+
interface LastReestimationDetails {
|
|
270
|
+
/**
|
|
271
|
+
* When `status` is `failed`, provides details about the quote reestimation failure.
|
|
272
|
+
*/
|
|
273
|
+
failed: LastReestimationDetails.Failed | null;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Latest status of the reestimation.
|
|
277
|
+
*/
|
|
278
|
+
status: LastReestimationDetails.Status;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
namespace LastReestimationDetails {
|
|
282
|
+
interface Failed {
|
|
283
|
+
/**
|
|
284
|
+
* 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.
|
|
285
|
+
*/
|
|
286
|
+
failure_code: string | null;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* 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".
|
|
290
|
+
*/
|
|
291
|
+
message: string | null;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* The reason the reestimation failed.
|
|
295
|
+
*/
|
|
296
|
+
reason: Failed.Reason;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
namespace Failed {
|
|
300
|
+
type Reason = 'automation_failure' | 'internal_error';
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
type Status = 'failed' | 'in_progress' | 'succeeded';
|
|
304
|
+
}
|
|
305
|
+
|
|
227
306
|
interface Recurring {
|
|
228
307
|
/**
|
|
229
308
|
* Total before any discounts or taxes are applied.
|
|
@@ -499,7 +578,153 @@ declare module 'stripe' {
|
|
|
499
578
|
}
|
|
500
579
|
}
|
|
501
580
|
|
|
502
|
-
type Status =
|
|
581
|
+
type Status =
|
|
582
|
+
| 'accepted'
|
|
583
|
+
| 'accepting'
|
|
584
|
+
| 'canceled'
|
|
585
|
+
| 'draft'
|
|
586
|
+
| 'open'
|
|
587
|
+
| 'stale';
|
|
588
|
+
|
|
589
|
+
interface StatusDetails {
|
|
590
|
+
canceled?: StatusDetails.Canceled;
|
|
591
|
+
|
|
592
|
+
stale?: StatusDetails.Stale;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
namespace StatusDetails {
|
|
596
|
+
interface Canceled {
|
|
597
|
+
/**
|
|
598
|
+
* The reason this quote was marked as canceled.
|
|
599
|
+
*/
|
|
600
|
+
reason: Canceled.Reason | null;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
|
|
604
|
+
*/
|
|
605
|
+
transitioned_at: number | null;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
namespace Canceled {
|
|
609
|
+
type Reason =
|
|
610
|
+
| 'canceled'
|
|
611
|
+
| 'quote_accepted'
|
|
612
|
+
| 'quote_expired'
|
|
613
|
+
| 'quote_superseded'
|
|
614
|
+
| 'subscription_canceled';
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
interface Stale {
|
|
618
|
+
/**
|
|
619
|
+
* Time at which the quote expires. Measured in seconds since the Unix epoch.
|
|
620
|
+
*/
|
|
621
|
+
expires_at: number | null;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* The most recent reason this quote was marked as stale.
|
|
625
|
+
*/
|
|
626
|
+
last_reason: Stale.LastReason | null;
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
|
|
630
|
+
*/
|
|
631
|
+
last_updated_at: number | null;
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
|
|
635
|
+
*/
|
|
636
|
+
transitioned_at: number | null;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
namespace Stale {
|
|
640
|
+
interface LastReason {
|
|
641
|
+
/**
|
|
642
|
+
* The ID of the line that is invalid if the stale reason type is `line_invalid`.
|
|
643
|
+
*/
|
|
644
|
+
line_invalid?: string;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
|
|
648
|
+
*/
|
|
649
|
+
lines_invalid?: Array<LastReason.LinesInvalid>;
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* The user supplied mark stale reason.
|
|
653
|
+
*/
|
|
654
|
+
marked_stale?: string | null;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* The ID of the subscription that was canceled.
|
|
658
|
+
*/
|
|
659
|
+
subscription_canceled?: string;
|
|
660
|
+
|
|
661
|
+
subscription_changed?: LastReason.SubscriptionChanged;
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* The ID of the subscription that was expired.
|
|
665
|
+
*/
|
|
666
|
+
subscription_expired?: string;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* The ID of the subscription schedule that was canceled.
|
|
670
|
+
*/
|
|
671
|
+
subscription_schedule_canceled?: string;
|
|
672
|
+
|
|
673
|
+
subscription_schedule_changed?: LastReason.SubscriptionScheduleChanged;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* The ID of the subscription schedule that was released.
|
|
677
|
+
*/
|
|
678
|
+
subscription_schedule_released?: string;
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* The reason the quote was marked as stale.
|
|
682
|
+
*/
|
|
683
|
+
type: LastReason.Type | null;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
namespace LastReason {
|
|
687
|
+
interface LinesInvalid {
|
|
688
|
+
/**
|
|
689
|
+
* The timestamp at which the lines were marked as invalid.
|
|
690
|
+
*/
|
|
691
|
+
invalid_at: number;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* The list of lines that became invalid at the given timestamp.
|
|
695
|
+
*/
|
|
696
|
+
lines: Array<string>;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
interface SubscriptionChanged {
|
|
700
|
+
/**
|
|
701
|
+
* The subscription's state before the quote was marked as stale.
|
|
702
|
+
*/
|
|
703
|
+
previous_subscription: Stripe.Subscription | null;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
interface SubscriptionScheduleChanged {
|
|
707
|
+
/**
|
|
708
|
+
* The subscription schedule's state before the quote was marked as stale.
|
|
709
|
+
*/
|
|
710
|
+
previous_subscription_schedule: Stripe.SubscriptionSchedule | null;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
type Type =
|
|
714
|
+
| 'accept_failed_validations'
|
|
715
|
+
| 'bill_on_acceptance_invalid'
|
|
716
|
+
| 'line_invalid'
|
|
717
|
+
| 'lines_invalid'
|
|
718
|
+
| 'marked_stale'
|
|
719
|
+
| 'subscription_canceled'
|
|
720
|
+
| 'subscription_changed'
|
|
721
|
+
| 'subscription_expired'
|
|
722
|
+
| 'subscription_schedule_canceled'
|
|
723
|
+
| 'subscription_schedule_changed'
|
|
724
|
+
| 'subscription_schedule_released';
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
503
728
|
|
|
504
729
|
interface StatusTransitions {
|
|
505
730
|
/**
|
|
@@ -519,6 +744,26 @@ declare module 'stripe' {
|
|
|
519
744
|
}
|
|
520
745
|
|
|
521
746
|
interface SubscriptionData {
|
|
747
|
+
/**
|
|
748
|
+
* Describes the period to bill for upon accepting the quote.
|
|
749
|
+
*/
|
|
750
|
+
bill_on_acceptance?: SubscriptionData.BillOnAcceptance | null;
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* 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.
|
|
754
|
+
*/
|
|
755
|
+
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Whether the subscription will always start a new billing period when the quote is accepted.
|
|
759
|
+
*/
|
|
760
|
+
billing_cycle_anchor?: 'reset' | null;
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* The [billing mode](https://docs.stripe.com/api/subscriptions/create#create_subscription-billing_mode) that will be set on the subscription once the quote is accepted.
|
|
764
|
+
*/
|
|
765
|
+
billing_mode?: SubscriptionData.BillingMode;
|
|
766
|
+
|
|
522
767
|
/**
|
|
523
768
|
* 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.
|
|
524
769
|
*/
|
|
@@ -529,17 +774,374 @@ declare module 'stripe' {
|
|
|
529
774
|
*/
|
|
530
775
|
effective_date: number | null;
|
|
531
776
|
|
|
777
|
+
/**
|
|
778
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
779
|
+
*/
|
|
780
|
+
end_behavior?: SubscriptionData.EndBehavior | null;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* The id of the subscription that will be updated when the quote is accepted.
|
|
784
|
+
*/
|
|
785
|
+
from_subscription?: string | Stripe.Subscription | null;
|
|
786
|
+
|
|
532
787
|
/**
|
|
533
788
|
* 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.
|
|
534
789
|
*/
|
|
535
790
|
metadata: Stripe.Metadata | null;
|
|
536
791
|
|
|
792
|
+
/**
|
|
793
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
794
|
+
*/
|
|
795
|
+
prebilling?: SubscriptionData.Prebilling | null;
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
|
799
|
+
*/
|
|
800
|
+
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
801
|
+
|
|
537
802
|
/**
|
|
538
803
|
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
539
804
|
*/
|
|
540
805
|
trial_period_days: number | null;
|
|
541
806
|
}
|
|
542
807
|
|
|
808
|
+
namespace SubscriptionData {
|
|
809
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
810
|
+
|
|
811
|
+
type BillingMode = 'classic' | 'flexible';
|
|
812
|
+
|
|
813
|
+
interface BillOnAcceptance {
|
|
814
|
+
/**
|
|
815
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
816
|
+
*/
|
|
817
|
+
bill_from: BillOnAcceptance.BillFrom | null;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
821
|
+
*/
|
|
822
|
+
bill_until: BillOnAcceptance.BillUntil | null;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
namespace BillOnAcceptance {
|
|
826
|
+
interface BillFrom {
|
|
827
|
+
/**
|
|
828
|
+
* The materialized time.
|
|
829
|
+
*/
|
|
830
|
+
computed: number | null;
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* The timestamp the given line starts at.
|
|
834
|
+
*/
|
|
835
|
+
line_starts_at: BillFrom.LineStartsAt | null;
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* A precise Unix timestamp.
|
|
839
|
+
*/
|
|
840
|
+
timestamp: number | null;
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* The type of method to specify the `bill_from` time.
|
|
844
|
+
*/
|
|
845
|
+
type: BillFrom.Type;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
namespace BillFrom {
|
|
849
|
+
interface LineStartsAt {
|
|
850
|
+
/**
|
|
851
|
+
* Unique identifier for the object.
|
|
852
|
+
*/
|
|
853
|
+
id: string;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
type Type =
|
|
857
|
+
| 'line_starts_at'
|
|
858
|
+
| 'now'
|
|
859
|
+
| 'pause_collection_start'
|
|
860
|
+
| 'quote_acceptance_date'
|
|
861
|
+
| 'timestamp';
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
interface BillUntil {
|
|
865
|
+
/**
|
|
866
|
+
* The materialized time.
|
|
867
|
+
*/
|
|
868
|
+
computed: number | null;
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
872
|
+
*/
|
|
873
|
+
duration: BillUntil.Duration | null;
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* The timestamp the given line ends at.
|
|
877
|
+
*/
|
|
878
|
+
line_ends_at: BillUntil.LineEndsAt | null;
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* A precise Unix timestamp.
|
|
882
|
+
*/
|
|
883
|
+
timestamp: number | null;
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* The type of method to specify the `bill_until` time.
|
|
887
|
+
*/
|
|
888
|
+
type: BillUntil.Type;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
namespace BillUntil {
|
|
892
|
+
interface Duration {
|
|
893
|
+
/**
|
|
894
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
895
|
+
*/
|
|
896
|
+
interval: Duration.Interval;
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
900
|
+
*/
|
|
901
|
+
interval_count: number;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
namespace Duration {
|
|
905
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
interface LineEndsAt {
|
|
909
|
+
/**
|
|
910
|
+
* Unique identifier for the object.
|
|
911
|
+
*/
|
|
912
|
+
id: string;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
type Type =
|
|
916
|
+
| 'duration'
|
|
917
|
+
| 'line_ends_at'
|
|
918
|
+
| 'schedule_end'
|
|
919
|
+
| 'timestamp'
|
|
920
|
+
| 'upcoming_invoice';
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
type EndBehavior = 'cancel' | 'release';
|
|
925
|
+
|
|
926
|
+
interface Prebilling {
|
|
927
|
+
iterations: number;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
type ProrationBehavior =
|
|
931
|
+
| 'always_invoice'
|
|
932
|
+
| 'create_prorations'
|
|
933
|
+
| 'none';
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
interface SubscriptionDataOverride {
|
|
937
|
+
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* Describes the period to bill for upon accepting the quote.
|
|
941
|
+
*/
|
|
942
|
+
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance | null;
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* 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.
|
|
946
|
+
*/
|
|
947
|
+
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
|
951
|
+
*/
|
|
952
|
+
customer: string | null;
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* 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.
|
|
956
|
+
*/
|
|
957
|
+
description: string | null;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
961
|
+
*/
|
|
962
|
+
end_behavior?: SubscriptionDataOverride.EndBehavior | null;
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
|
966
|
+
*/
|
|
967
|
+
proration_behavior?: SubscriptionDataOverride.ProrationBehavior | null;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
namespace SubscriptionDataOverride {
|
|
971
|
+
interface AppliesTo {
|
|
972
|
+
/**
|
|
973
|
+
* 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.
|
|
974
|
+
*/
|
|
975
|
+
new_reference: string | null;
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* The ID of the schedule the line applies to.
|
|
979
|
+
*/
|
|
980
|
+
subscription_schedule: string | null;
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
984
|
+
*/
|
|
985
|
+
type: AppliesTo.Type;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
namespace AppliesTo {
|
|
989
|
+
type Type = 'new_reference' | 'subscription_schedule';
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
993
|
+
|
|
994
|
+
interface BillOnAcceptance {
|
|
995
|
+
/**
|
|
996
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
997
|
+
*/
|
|
998
|
+
bill_from: BillOnAcceptance.BillFrom | null;
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
1002
|
+
*/
|
|
1003
|
+
bill_until: BillOnAcceptance.BillUntil | null;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
namespace BillOnAcceptance {
|
|
1007
|
+
interface BillFrom {
|
|
1008
|
+
/**
|
|
1009
|
+
* The materialized time.
|
|
1010
|
+
*/
|
|
1011
|
+
computed: number | null;
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* The timestamp the given line starts at.
|
|
1015
|
+
*/
|
|
1016
|
+
line_starts_at: BillFrom.LineStartsAt | null;
|
|
1017
|
+
|
|
1018
|
+
/**
|
|
1019
|
+
* A precise Unix timestamp.
|
|
1020
|
+
*/
|
|
1021
|
+
timestamp: number | null;
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* The type of method to specify the `bill_from` time.
|
|
1025
|
+
*/
|
|
1026
|
+
type: BillFrom.Type;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
namespace BillFrom {
|
|
1030
|
+
interface LineStartsAt {
|
|
1031
|
+
/**
|
|
1032
|
+
* Unique identifier for the object.
|
|
1033
|
+
*/
|
|
1034
|
+
id: string;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
type Type =
|
|
1038
|
+
| 'line_starts_at'
|
|
1039
|
+
| 'now'
|
|
1040
|
+
| 'pause_collection_start'
|
|
1041
|
+
| 'quote_acceptance_date'
|
|
1042
|
+
| 'timestamp';
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
interface BillUntil {
|
|
1046
|
+
/**
|
|
1047
|
+
* The materialized time.
|
|
1048
|
+
*/
|
|
1049
|
+
computed: number | null;
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
1053
|
+
*/
|
|
1054
|
+
duration: BillUntil.Duration | null;
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* The timestamp the given line ends at.
|
|
1058
|
+
*/
|
|
1059
|
+
line_ends_at: BillUntil.LineEndsAt | null;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* A precise Unix timestamp.
|
|
1063
|
+
*/
|
|
1064
|
+
timestamp: number | null;
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* The type of method to specify the `bill_until` time.
|
|
1068
|
+
*/
|
|
1069
|
+
type: BillUntil.Type;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
namespace BillUntil {
|
|
1073
|
+
interface Duration {
|
|
1074
|
+
/**
|
|
1075
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1076
|
+
*/
|
|
1077
|
+
interval: Duration.Interval;
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1081
|
+
*/
|
|
1082
|
+
interval_count: number;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
namespace Duration {
|
|
1086
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
interface LineEndsAt {
|
|
1090
|
+
/**
|
|
1091
|
+
* Unique identifier for the object.
|
|
1092
|
+
*/
|
|
1093
|
+
id: string;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
type Type =
|
|
1097
|
+
| 'duration'
|
|
1098
|
+
| 'line_ends_at'
|
|
1099
|
+
| 'schedule_end'
|
|
1100
|
+
| 'timestamp'
|
|
1101
|
+
| 'upcoming_invoice';
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
type EndBehavior = 'cancel' | 'release';
|
|
1106
|
+
|
|
1107
|
+
type ProrationBehavior =
|
|
1108
|
+
| 'always_invoice'
|
|
1109
|
+
| 'create_prorations'
|
|
1110
|
+
| 'none';
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
interface SubscriptionSchedule {
|
|
1114
|
+
applies_to: SubscriptionSchedule.AppliesTo;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* The subscription schedule that was created or updated from this quote.
|
|
1118
|
+
*/
|
|
1119
|
+
subscription_schedule: string;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
namespace SubscriptionSchedule {
|
|
1123
|
+
interface AppliesTo {
|
|
1124
|
+
/**
|
|
1125
|
+
* 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.
|
|
1126
|
+
*/
|
|
1127
|
+
new_reference: string | null;
|
|
1128
|
+
|
|
1129
|
+
/**
|
|
1130
|
+
* The ID of the schedule the line applies to.
|
|
1131
|
+
*/
|
|
1132
|
+
subscription_schedule: string | null;
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
1136
|
+
*/
|
|
1137
|
+
type: AppliesTo.Type;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
namespace AppliesTo {
|
|
1141
|
+
type Type = 'new_reference' | 'subscription_schedule';
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
|
|
543
1145
|
interface TotalDetails {
|
|
544
1146
|
/**
|
|
545
1147
|
* This is the sum of all the discounts.
|