stripe 18.3.0-beta.1 → 18.3.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 +59 -1246
- package/OPENAPI_VERSION +1 -1
- package/README.md +0 -1
- package/VERSION +1 -1
- package/cjs/Error.js +1 -91
- package/cjs/RequestSender.js +1 -1
- package/cjs/apiVersion.js +3 -2
- package/cjs/resources/FinancialConnections/Accounts.js +0 -5
- package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
- package/cjs/resources/PaymentIntents.js +0 -13
- package/cjs/resources/Quotes.js +0 -32
- package/cjs/resources/SubscriptionSchedules.js +0 -4
- package/cjs/resources.js +10 -98
- package/cjs/stripe.core.js +1 -1
- package/esm/Error.js +0 -79
- package/esm/RequestSender.js +1 -1
- package/esm/apiVersion.js +2 -1
- package/esm/resources/FinancialConnections/Accounts.js +0 -5
- package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
- package/esm/resources/PaymentIntents.js +0 -13
- package/esm/resources/Quotes.js +0 -32
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources.js +1 -82
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +1 -5
- package/types/AccountSessions.d.ts +31 -76
- package/types/AccountSessionsResource.d.ts +48 -312
- package/types/Accounts.d.ts +30 -213
- package/types/AccountsResource.d.ts +85 -540
- package/types/Billing/CreditBalanceSummary.d.ts +0 -5
- package/types/Billing/CreditBalanceSummaryResource.d.ts +3 -8
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +4 -12
- package/types/Billing/CreditGrants.d.ts +0 -5
- package/types/Billing/CreditGrantsResource.d.ts +1 -11
- package/types/BillingPortal/Sessions.d.ts +1 -6
- package/types/BillingPortal/SessionsResource.d.ts +5 -13
- package/types/Cards.d.ts +0 -5
- package/types/CashBalances.d.ts +0 -5
- package/types/Charges.d.ts +52 -182
- package/types/ChargesResource.d.ts +0 -1406
- package/types/Checkout/Sessions.d.ts +1 -314
- package/types/Checkout/SessionsResource.d.ts +62 -340
- package/types/ConfirmationTokens.d.ts +22 -136
- package/types/Coupons.d.ts +0 -33
- package/types/CouponsResource.d.ts +0 -21
- package/types/CreditNoteLineItems.d.ts +0 -17
- package/types/CreditNotes.d.ts +0 -5
- package/types/CreditNotesResource.d.ts +9 -14
- package/types/CustomerBalanceTransactions.d.ts +0 -2
- package/types/CustomerCashBalanceTransactions.d.ts +0 -2
- package/types/CustomerSessions.d.ts +1 -6
- package/types/CustomerSessionsResource.d.ts +2 -7
- package/types/Customers.d.ts +0 -2
- package/types/CustomersResource.d.ts +1 -8
- package/types/Discounts.d.ts +0 -10
- package/types/Disputes.d.ts +6 -2
- package/types/Errors.d.ts +2 -69
- package/types/EventTypes.d.ts +0 -664
- package/types/Events.d.ts +1 -98
- package/types/FinancialConnections/Accounts.d.ts +1 -36
- package/types/FinancialConnections/AccountsResource.d.ts +3 -40
- package/types/FinancialConnections/Sessions.d.ts +1 -51
- package/types/FinancialConnections/SessionsResource.d.ts +1 -43
- package/types/Identity/VerificationSessions.d.ts +33 -4
- package/types/Identity/VerificationSessionsResource.d.ts +14 -4
- package/types/InvoiceItems.d.ts +1 -14
- package/types/InvoiceItemsResource.d.ts +6 -117
- package/types/InvoiceLineItems.d.ts +1 -45
- package/types/InvoicePayments.d.ts +0 -5
- package/types/InvoicePaymentsResource.d.ts +74 -0
- package/types/Invoices.d.ts +4 -133
- package/types/InvoicesResource.d.ts +37 -1446
- package/types/Issuing/CardholdersResource.d.ts +1 -2
- package/types/Issuing/Transactions.d.ts +0 -5
- package/types/Issuing/TransactionsResource.d.ts +0 -5
- package/types/LineItems.d.ts +0 -49
- package/types/Mandates.d.ts +4 -77
- package/types/PaymentIntents.d.ts +35 -770
- package/types/PaymentIntentsResource.d.ts +4268 -8619
- package/types/PaymentLinks.d.ts +0 -6
- package/types/PaymentLinksResource.d.ts +0 -12
- package/types/PaymentMethodConfigurations.d.ts +0 -180
- package/types/PaymentMethodConfigurationsResource.d.ts +0 -250
- package/types/PaymentMethods.d.ts +16 -134
- package/types/PaymentMethodsResource.d.ts +12 -167
- package/types/Payouts.d.ts +0 -5
- package/types/PayoutsResource.d.ts +0 -5
- package/types/Prices.d.ts +0 -22
- package/types/PricesResource.d.ts +0 -22
- package/types/PromotionCodes.d.ts +0 -5
- package/types/PromotionCodesResource.d.ts +0 -10
- package/types/Quotes.d.ts +8 -592
- package/types/QuotesResource.d.ts +278 -2617
- package/types/Refunds.d.ts +0 -14
- package/types/SetupAttempts.d.ts +4 -48
- package/types/SetupIntents.d.ts +17 -119
- package/types/SetupIntentsResource.d.ts +413 -660
- package/types/Sources.d.ts +0 -29
- package/types/SubscriptionItems.d.ts +0 -30
- package/types/SubscriptionItemsResource.d.ts +0 -109
- package/types/SubscriptionSchedules.d.ts +16 -207
- package/types/SubscriptionSchedulesResource.d.ts +14 -1236
- package/types/Subscriptions.d.ts +15 -108
- package/types/SubscriptionsResource.d.ts +30 -402
- package/types/Tax/Registrations.d.ts +9 -0
- package/types/Tax/RegistrationsResource.d.ts +12 -0
- package/types/TaxIds.d.ts +0 -10
- package/types/TaxIdsResource.d.ts +0 -10
- package/types/Terminal/Configurations.d.ts +1 -0
- package/types/Terminal/LocationsResource.d.ts +1 -1
- package/types/Terminal/Readers.d.ts +6 -26
- package/types/Terminal/ReadersResource.d.ts +4 -4
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +15 -128
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
- package/types/TokensResource.d.ts +3 -0
- package/types/Transfers.d.ts +0 -5
- package/types/TransfersResource.d.ts +0 -5
- package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
- package/types/Treasury/FinancialAccounts.d.ts +0 -5
- package/types/Treasury/FinancialAccountsResource.d.ts +9 -37
- 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/V2/EventTypes.d.ts +4 -906
- package/types/WebhookEndpointsResource.d.ts +2 -79
- package/types/index.d.ts +6 -142
- package/types/lib.d.ts +11 -11
- package/types/test/typescriptTest.ts +3 -3
- package/cjs/resources/AccountNotices.js +0 -21
- package/cjs/resources/BalanceSettings.js +0 -10
- 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/ExternalAccounts.js +0 -23
- package/cjs/resources/FinancialConnections/Institutions.js +0 -17
- package/cjs/resources/FxQuotes.js +0 -15
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
- package/cjs/resources/Margins.js +0 -22
- package/cjs/resources/Orders.js +0 -24
- package/cjs/resources/PaymentRecords.js +0 -29
- package/cjs/resources/Privacy/RedactionJobs.js +0 -42
- 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/cjs/resources/V2/Core/AccountLinks.js +0 -9
- package/cjs/resources/V2/Core/Accounts/Persons.js +0 -29
- package/cjs/resources/V2/Core/Accounts.js +0 -25
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -28
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -24
- package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -17
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -16
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
- package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
- package/cjs/resources/V2/Payments/OffSessionPayments.js +0 -25
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
- package/esm/resources/AccountNotices.js +0 -18
- package/esm/resources/BalanceSettings.js +0 -7
- 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/ExternalAccounts.js +0 -20
- package/esm/resources/FinancialConnections/Institutions.js +0 -14
- package/esm/resources/FxQuotes.js +0 -12
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
- package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
- package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
- package/esm/resources/Margins.js +0 -19
- package/esm/resources/Orders.js +0 -21
- package/esm/resources/PaymentRecords.js +0 -26
- package/esm/resources/Privacy/RedactionJobs.js +0 -39
- 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/esm/resources/V2/Core/AccountLinks.js +0 -6
- package/esm/resources/V2/Core/Accounts/Persons.js +0 -26
- package/esm/resources/V2/Core/Accounts.js +0 -22
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -25
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -21
- package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -14
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -13
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
- package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
- package/esm/resources/V2/Payments/OffSessionPayments.js +0 -22
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
- package/types/AccountNotices.d.ts +0 -113
- package/types/AccountNoticesResource.d.ts +0 -98
- package/types/BalanceSettings.d.ts +0 -89
- package/types/BalanceSettingsResource.d.ts +0 -108
- 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/ExternalAccountsResource.d.ts +0 -304
- package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
- package/types/FinancialConnections/Institutions.d.ts +0 -98
- package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
- package/types/FxQuotes.d.ts +0 -153
- package/types/FxQuotesResource.d.ts +0 -130
- package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
- package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
- package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
- package/types/Issuing/Settlements.d.ts +0 -113
- package/types/Margins.d.ts +0 -56
- package/types/MarginsResource.d.ts +0 -114
- package/types/Orders.d.ts +0 -1159
- package/types/OrdersResource.d.ts +0 -2967
- package/types/PaymentAttemptRecords.d.ts +0 -2132
- package/types/PaymentAttemptRecordsResource.d.ts +0 -47
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -116
- package/types/PaymentRecords.d.ts +0 -2125
- package/types/PaymentRecordsResource.d.ts +0 -455
- package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -60
- package/types/Privacy/RedactionJobs.d.ts +0 -111
- package/types/Privacy/RedactionJobsResource.d.ts +0 -230
- package/types/QuoteLines.d.ts +0 -634
- package/types/QuotePreviewInvoices.d.ts +0 -1695
- package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -831
- package/types/Tax/Associations.d.ts +0 -82
- package/types/Tax/AssociationsResource.d.ts +0 -29
- package/types/Tax/Forms.d.ts +0 -220
- package/types/Tax/FormsResource.d.ts +0 -107
- package/types/Terminal/ReaderCollectedData.d.ts +0 -51
- package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
- package/types/V2/Core/AccountLinks.d.ts +0 -106
- package/types/V2/Core/AccountLinksResource.d.ts +0 -90
- package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3770
- package/types/V2/Core/Accounts.d.ts +0 -8169
- package/types/V2/Core/AccountsResource.d.ts +0 -10203
- package/types/V2/Core/Persons.d.ts +0 -1867
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -160
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -70
- package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
- package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -27
- package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -32
- package/types/V2/MoneyManagement/Adjustments.d.ts +0 -110
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -546
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -52
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -314
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -288
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -206
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -168
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -115
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -278
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -97
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -251
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -207
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -151
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +0 -87
- package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -243
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -176
- package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
- package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -155
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
- package/types/V2/MoneyManagement/Transactions.d.ts +0 -170
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
- package/types/V2/Payments/OffSessionPayments.d.ts +0 -167
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -159
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -66
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
declare module 'stripe' {
|
|
4
4
|
namespace Stripe {
|
|
5
5
|
interface QuoteCreateParams {
|
|
6
|
-
/**
|
|
7
|
-
* Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
8
|
-
*/
|
|
9
|
-
allow_backdated_lines?: boolean;
|
|
10
|
-
|
|
11
6
|
/**
|
|
12
7
|
* The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
|
13
8
|
*/
|
|
@@ -33,11 +28,6 @@ declare module 'stripe' {
|
|
|
33
28
|
*/
|
|
34
29
|
customer?: string;
|
|
35
30
|
|
|
36
|
-
/**
|
|
37
|
-
* The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
|
38
|
-
*/
|
|
39
|
-
customer_account?: string;
|
|
40
|
-
|
|
41
31
|
/**
|
|
42
32
|
* The tax rates that will apply to any line item that does not have `tax_rates` set.
|
|
43
33
|
*/
|
|
@@ -88,11 +78,6 @@ declare module 'stripe' {
|
|
|
88
78
|
*/
|
|
89
79
|
line_items?: Array<QuoteCreateParams.LineItem>;
|
|
90
80
|
|
|
91
|
-
/**
|
|
92
|
-
* 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.
|
|
93
|
-
*/
|
|
94
|
-
lines?: Array<QuoteCreateParams.Line>;
|
|
95
|
-
|
|
96
81
|
/**
|
|
97
82
|
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
98
83
|
*/
|
|
@@ -108,13 +93,6 @@ declare module 'stripe' {
|
|
|
108
93
|
*/
|
|
109
94
|
subscription_data?: QuoteCreateParams.SubscriptionData;
|
|
110
95
|
|
|
111
|
-
/**
|
|
112
|
-
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
113
|
-
*/
|
|
114
|
-
subscription_data_overrides?: Array<
|
|
115
|
-
QuoteCreateParams.SubscriptionDataOverride
|
|
116
|
-
>;
|
|
117
|
-
|
|
118
96
|
/**
|
|
119
97
|
* ID of the test clock to attach to the quote.
|
|
120
98
|
*/
|
|
@@ -170,56 +148,12 @@ declare module 'stripe' {
|
|
|
170
148
|
*/
|
|
171
149
|
discount?: string;
|
|
172
150
|
|
|
173
|
-
/**
|
|
174
|
-
* Details to determine how long the discount should be applied for.
|
|
175
|
-
*/
|
|
176
|
-
discount_end?: Discount.DiscountEnd;
|
|
177
|
-
|
|
178
151
|
/**
|
|
179
152
|
* ID of the promotion code to create a new discount for.
|
|
180
153
|
*/
|
|
181
154
|
promotion_code?: string;
|
|
182
155
|
}
|
|
183
156
|
|
|
184
|
-
namespace Discount {
|
|
185
|
-
interface DiscountEnd {
|
|
186
|
-
/**
|
|
187
|
-
* Time span for the redeemed discount.
|
|
188
|
-
*/
|
|
189
|
-
duration?: DiscountEnd.Duration;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
193
|
-
*/
|
|
194
|
-
timestamp?: number;
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* The type of calculation made to determine when the discount ends.
|
|
198
|
-
*/
|
|
199
|
-
type: DiscountEnd.Type;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
namespace DiscountEnd {
|
|
203
|
-
interface Duration {
|
|
204
|
-
/**
|
|
205
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
206
|
-
*/
|
|
207
|
-
interval: Duration.Interval;
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
211
|
-
*/
|
|
212
|
-
interval_count: number;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
namespace Duration {
|
|
216
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
type Type = 'duration' | 'timestamp';
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
157
|
interface FromQuote {
|
|
224
158
|
/**
|
|
225
159
|
* Whether this quote is a revision of the previous quote.
|
|
@@ -262,2570 +196,461 @@ declare module 'stripe' {
|
|
|
262
196
|
}
|
|
263
197
|
}
|
|
264
198
|
|
|
265
|
-
interface
|
|
266
|
-
/**
|
|
267
|
-
* An array of operations the quote line performs.
|
|
268
|
-
*/
|
|
269
|
-
actions?: Array<Line.Action>;
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Details to identify the subscription schedule the quote line applies to.
|
|
273
|
-
*/
|
|
274
|
-
applies_to?: Line.AppliesTo;
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
|
|
278
|
-
*/
|
|
279
|
-
billing_cycle_anchor?: Line.BillingCycleAnchor;
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
|
|
283
|
-
*/
|
|
284
|
-
cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
|
|
288
|
-
*/
|
|
289
|
-
ends_at?: Line.EndsAt;
|
|
290
|
-
|
|
199
|
+
interface LineItem {
|
|
291
200
|
/**
|
|
292
|
-
*
|
|
201
|
+
* The discounts applied to this line item.
|
|
293
202
|
*/
|
|
294
|
-
|
|
203
|
+
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
295
204
|
|
|
296
205
|
/**
|
|
297
|
-
*
|
|
206
|
+
* The ID of the price object. One of `price` or `price_data` is required.
|
|
298
207
|
*/
|
|
299
|
-
|
|
208
|
+
price?: string;
|
|
300
209
|
|
|
301
210
|
/**
|
|
302
|
-
*
|
|
211
|
+
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
303
212
|
*/
|
|
304
|
-
|
|
213
|
+
price_data?: LineItem.PriceData;
|
|
305
214
|
|
|
306
215
|
/**
|
|
307
|
-
*
|
|
216
|
+
* The quantity of the line item.
|
|
308
217
|
*/
|
|
309
|
-
|
|
218
|
+
quantity?: number;
|
|
310
219
|
|
|
311
220
|
/**
|
|
312
|
-
*
|
|
221
|
+
* The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
|
|
313
222
|
*/
|
|
314
|
-
|
|
223
|
+
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
315
224
|
}
|
|
316
225
|
|
|
317
|
-
namespace
|
|
318
|
-
interface
|
|
319
|
-
/**
|
|
320
|
-
* Details for the `add_discount` type.
|
|
321
|
-
*/
|
|
322
|
-
add_discount?: Action.AddDiscount;
|
|
323
|
-
|
|
226
|
+
namespace LineItem {
|
|
227
|
+
interface Discount {
|
|
324
228
|
/**
|
|
325
|
-
*
|
|
229
|
+
* ID of the coupon to create a new discount for.
|
|
326
230
|
*/
|
|
327
|
-
|
|
231
|
+
coupon?: string;
|
|
328
232
|
|
|
329
233
|
/**
|
|
330
|
-
*
|
|
234
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
331
235
|
*/
|
|
332
|
-
|
|
333
|
-
[key: string]: string;
|
|
334
|
-
};
|
|
236
|
+
discount?: string;
|
|
335
237
|
|
|
336
238
|
/**
|
|
337
|
-
*
|
|
239
|
+
* ID of the promotion code to create a new discount for.
|
|
338
240
|
*/
|
|
339
|
-
|
|
241
|
+
promotion_code?: string;
|
|
242
|
+
}
|
|
340
243
|
|
|
244
|
+
interface PriceData {
|
|
341
245
|
/**
|
|
342
|
-
*
|
|
246
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
343
247
|
*/
|
|
344
|
-
|
|
248
|
+
currency: string;
|
|
345
249
|
|
|
346
250
|
/**
|
|
347
|
-
*
|
|
251
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
348
252
|
*/
|
|
349
|
-
|
|
253
|
+
product: string;
|
|
350
254
|
|
|
351
255
|
/**
|
|
352
|
-
*
|
|
256
|
+
* The recurring components of a price such as `interval` and `interval_count`.
|
|
353
257
|
*/
|
|
354
|
-
|
|
258
|
+
recurring?: PriceData.Recurring;
|
|
355
259
|
|
|
356
260
|
/**
|
|
357
|
-
*
|
|
261
|
+
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
358
262
|
*/
|
|
359
|
-
|
|
263
|
+
tax_behavior?: PriceData.TaxBehavior;
|
|
360
264
|
|
|
361
265
|
/**
|
|
362
|
-
*
|
|
266
|
+
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
363
267
|
*/
|
|
364
|
-
|
|
365
|
-
[key: string]: string;
|
|
366
|
-
}>;
|
|
268
|
+
unit_amount?: number;
|
|
367
269
|
|
|
368
270
|
/**
|
|
369
|
-
*
|
|
271
|
+
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
370
272
|
*/
|
|
371
|
-
|
|
273
|
+
unit_amount_decimal?: string;
|
|
372
274
|
}
|
|
373
275
|
|
|
374
|
-
namespace
|
|
375
|
-
interface
|
|
376
|
-
/**
|
|
377
|
-
* The coupon code to redeem.
|
|
378
|
-
*/
|
|
379
|
-
coupon?: string;
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* An ID of an existing discount for a coupon that was already redeemed.
|
|
383
|
-
*/
|
|
384
|
-
discount?: string;
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Details to determine how long the discount should be applied for.
|
|
388
|
-
*/
|
|
389
|
-
discount_end?: AddDiscount.DiscountEnd;
|
|
390
|
-
|
|
276
|
+
namespace PriceData {
|
|
277
|
+
interface Recurring {
|
|
391
278
|
/**
|
|
392
|
-
*
|
|
279
|
+
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
393
280
|
*/
|
|
394
|
-
|
|
281
|
+
interval: Recurring.Interval;
|
|
395
282
|
|
|
396
283
|
/**
|
|
397
|
-
* The
|
|
284
|
+
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
398
285
|
*/
|
|
399
|
-
|
|
286
|
+
interval_count?: number;
|
|
400
287
|
}
|
|
401
288
|
|
|
402
|
-
namespace
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* The type of calculation made to determine when the discount ends.
|
|
406
|
-
*/
|
|
407
|
-
type: 'line_ends_at';
|
|
408
|
-
}
|
|
289
|
+
namespace Recurring {
|
|
290
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
409
291
|
}
|
|
410
292
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
*/
|
|
415
|
-
discounts?: Array<AddItem.Discount>;
|
|
293
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
294
|
+
}
|
|
295
|
+
}
|
|
416
296
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
297
|
+
interface SubscriptionData {
|
|
298
|
+
/**
|
|
299
|
+
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
300
|
+
*/
|
|
301
|
+
billing_mode?: SubscriptionData.BillingMode;
|
|
421
302
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
303
|
+
/**
|
|
304
|
+
* 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.
|
|
305
|
+
*/
|
|
306
|
+
description?: string;
|
|
426
307
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
308
|
+
/**
|
|
309
|
+
* When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
|
310
|
+
*/
|
|
311
|
+
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
431
312
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
313
|
+
/**
|
|
314
|
+
* 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.
|
|
315
|
+
*/
|
|
316
|
+
metadata?: Stripe.MetadataParam;
|
|
436
317
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
318
|
+
/**
|
|
319
|
+
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
320
|
+
*/
|
|
321
|
+
trial_period_days?: Stripe.Emptyable<number>;
|
|
322
|
+
}
|
|
442
323
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
*/
|
|
448
|
-
coupon?: string;
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
452
|
-
*/
|
|
453
|
-
discount?: string;
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* Details to determine how long the discount should be applied for.
|
|
457
|
-
*/
|
|
458
|
-
discount_end?: Discount.DiscountEnd;
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* ID of the promotion code to create a new discount for.
|
|
462
|
-
*/
|
|
463
|
-
promotion_code?: string;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
namespace Discount {
|
|
467
|
-
interface DiscountEnd {
|
|
468
|
-
/**
|
|
469
|
-
* Time span for the redeemed discount.
|
|
470
|
-
*/
|
|
471
|
-
duration?: DiscountEnd.Duration;
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
475
|
-
*/
|
|
476
|
-
timestamp?: number;
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* The type of calculation made to determine when the discount ends.
|
|
480
|
-
*/
|
|
481
|
-
type: DiscountEnd.Type;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
namespace DiscountEnd {
|
|
485
|
-
interface Duration {
|
|
486
|
-
/**
|
|
487
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
488
|
-
*/
|
|
489
|
-
interval: Duration.Interval;
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
493
|
-
*/
|
|
494
|
-
interval_count: number;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
namespace Duration {
|
|
498
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
type Type = 'duration' | 'timestamp';
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
interface Trial {
|
|
506
|
-
/**
|
|
507
|
-
* List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
|
508
|
-
*/
|
|
509
|
-
converts_to?: Array<string>;
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Determines the type of trial for this item.
|
|
513
|
-
*/
|
|
514
|
-
type: Trial.Type;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
namespace Trial {
|
|
518
|
-
type Type = 'free' | 'paid';
|
|
519
|
-
}
|
|
520
|
-
}
|
|
324
|
+
namespace SubscriptionData {
|
|
325
|
+
interface BillingMode {
|
|
326
|
+
type: BillingMode.Type;
|
|
327
|
+
}
|
|
521
328
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
coupon?: string;
|
|
329
|
+
namespace BillingMode {
|
|
330
|
+
type Type = 'classic' | 'flexible';
|
|
331
|
+
}
|
|
332
|
+
}
|
|
527
333
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
334
|
+
interface TransferData {
|
|
335
|
+
/**
|
|
336
|
+
* The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
|
|
337
|
+
*/
|
|
338
|
+
amount?: number;
|
|
532
339
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
}
|
|
340
|
+
/**
|
|
341
|
+
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
|
|
342
|
+
*/
|
|
343
|
+
amount_percent?: number;
|
|
538
344
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
345
|
+
/**
|
|
346
|
+
* ID of an existing, connected Stripe account.
|
|
347
|
+
*/
|
|
348
|
+
destination: string;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
545
351
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
352
|
+
interface QuoteRetrieveParams {
|
|
353
|
+
/**
|
|
354
|
+
* Specifies which fields in the response should be expanded.
|
|
355
|
+
*/
|
|
356
|
+
expand?: Array<string>;
|
|
357
|
+
}
|
|
551
358
|
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
359
|
+
interface QuoteUpdateParams {
|
|
360
|
+
/**
|
|
361
|
+
* The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
|
362
|
+
*/
|
|
363
|
+
application_fee_amount?: Stripe.Emptyable<number>;
|
|
556
364
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
}
|
|
365
|
+
/**
|
|
366
|
+
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
|
|
367
|
+
*/
|
|
368
|
+
application_fee_percent?: Stripe.Emptyable<number>;
|
|
562
369
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
discounts?: Array<SetItem.Discount>;
|
|
370
|
+
/**
|
|
371
|
+
* Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
|
372
|
+
*/
|
|
373
|
+
automatic_tax?: QuoteUpdateParams.AutomaticTax;
|
|
568
374
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
375
|
+
/**
|
|
376
|
+
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
|
|
377
|
+
*/
|
|
378
|
+
collection_method?: QuoteUpdateParams.CollectionMethod;
|
|
573
379
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
380
|
+
/**
|
|
381
|
+
* The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
|
382
|
+
*/
|
|
383
|
+
customer?: string;
|
|
578
384
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
385
|
+
/**
|
|
386
|
+
* The tax rates that will apply to any line item that does not have `tax_rates` set.
|
|
387
|
+
*/
|
|
388
|
+
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
583
389
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
390
|
+
/**
|
|
391
|
+
* A description that will be displayed on the quote PDF.
|
|
392
|
+
*/
|
|
393
|
+
description?: Stripe.Emptyable<string>;
|
|
588
394
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
}
|
|
395
|
+
/**
|
|
396
|
+
* The discounts applied to the quote.
|
|
397
|
+
*/
|
|
398
|
+
discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
|
|
594
399
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
*/
|
|
600
|
-
coupon?: string;
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
604
|
-
*/
|
|
605
|
-
discount?: string;
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Details to determine how long the discount should be applied for.
|
|
609
|
-
*/
|
|
610
|
-
discount_end?: Discount.DiscountEnd;
|
|
611
|
-
|
|
612
|
-
/**
|
|
613
|
-
* ID of the promotion code to create a new discount for.
|
|
614
|
-
*/
|
|
615
|
-
promotion_code?: string;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
namespace Discount {
|
|
619
|
-
interface DiscountEnd {
|
|
620
|
-
/**
|
|
621
|
-
* Time span for the redeemed discount.
|
|
622
|
-
*/
|
|
623
|
-
duration?: DiscountEnd.Duration;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
627
|
-
*/
|
|
628
|
-
timestamp?: number;
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* The type of calculation made to determine when the discount ends.
|
|
632
|
-
*/
|
|
633
|
-
type: DiscountEnd.Type;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
namespace DiscountEnd {
|
|
637
|
-
interface Duration {
|
|
638
|
-
/**
|
|
639
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
640
|
-
*/
|
|
641
|
-
interval: Duration.Interval;
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
645
|
-
*/
|
|
646
|
-
interval_count: number;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
namespace Duration {
|
|
650
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
type Type = 'duration' | 'timestamp';
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
interface Trial {
|
|
658
|
-
/**
|
|
659
|
-
* List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
|
660
|
-
*/
|
|
661
|
-
converts_to?: Array<string>;
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* Determines the type of trial for this item.
|
|
665
|
-
*/
|
|
666
|
-
type: Trial.Type;
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
namespace Trial {
|
|
670
|
-
type Type = 'free' | 'paid';
|
|
671
|
-
}
|
|
672
|
-
}
|
|
400
|
+
/**
|
|
401
|
+
* Specifies which fields in the response should be expanded.
|
|
402
|
+
*/
|
|
403
|
+
expand?: Array<string>;
|
|
673
404
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
| 'clear_discounts'
|
|
679
|
-
| 'clear_metadata'
|
|
680
|
-
| 'remove_discount'
|
|
681
|
-
| 'remove_item'
|
|
682
|
-
| 'remove_metadata'
|
|
683
|
-
| 'set_discounts'
|
|
684
|
-
| 'set_items'
|
|
685
|
-
| 'set_metadata';
|
|
686
|
-
}
|
|
405
|
+
/**
|
|
406
|
+
* A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
|
407
|
+
*/
|
|
408
|
+
expires_at?: number;
|
|
687
409
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
new_reference?: string;
|
|
410
|
+
/**
|
|
411
|
+
* A footer that will be displayed on the quote PDF.
|
|
412
|
+
*/
|
|
413
|
+
footer?: Stripe.Emptyable<string>;
|
|
693
414
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
415
|
+
/**
|
|
416
|
+
* A header that will be displayed on the quote PDF.
|
|
417
|
+
*/
|
|
418
|
+
header?: Stripe.Emptyable<string>;
|
|
698
419
|
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
namespace AppliesTo {
|
|
706
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
type BillingCycleAnchor = 'automatic' | 'line_starts_at';
|
|
710
|
-
|
|
711
|
-
interface CancelSubscriptionSchedule {
|
|
712
|
-
/**
|
|
713
|
-
* Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
|
714
|
-
*/
|
|
715
|
-
cancel_at: 'line_starts_at';
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
|
|
719
|
-
*/
|
|
720
|
-
invoice_now?: boolean;
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
|
724
|
-
*/
|
|
725
|
-
prorate?: boolean;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
interface EndsAt {
|
|
729
|
-
/**
|
|
730
|
-
* Use the `end` time of a given discount.
|
|
731
|
-
*/
|
|
732
|
-
discount_end?: EndsAt.DiscountEnd;
|
|
733
|
-
|
|
734
|
-
/**
|
|
735
|
-
* Time span for the quote line starting from the `starts_at` date.
|
|
736
|
-
*/
|
|
737
|
-
duration?: EndsAt.Duration;
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* A precise Unix timestamp.
|
|
741
|
-
*/
|
|
742
|
-
timestamp?: number;
|
|
743
|
-
|
|
744
|
-
/**
|
|
745
|
-
* Select a way to pass in `ends_at`.
|
|
746
|
-
*/
|
|
747
|
-
type: EndsAt.Type;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
namespace EndsAt {
|
|
751
|
-
interface DiscountEnd {
|
|
752
|
-
/**
|
|
753
|
-
* The ID of a specific discount.
|
|
754
|
-
*/
|
|
755
|
-
discount: string;
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
interface Duration {
|
|
759
|
-
/**
|
|
760
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
761
|
-
*/
|
|
762
|
-
interval: Duration.Interval;
|
|
763
|
-
|
|
764
|
-
/**
|
|
765
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
766
|
-
*/
|
|
767
|
-
interval_count: number;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
namespace Duration {
|
|
771
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
type Type =
|
|
775
|
-
| 'billing_period_end'
|
|
776
|
-
| 'discount_end'
|
|
777
|
-
| 'duration'
|
|
778
|
-
| 'quote_acceptance_date'
|
|
779
|
-
| 'schedule_end'
|
|
780
|
-
| 'timestamp'
|
|
781
|
-
| 'upcoming_invoice';
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
type ProrationBehavior =
|
|
785
|
-
| 'always_invoice'
|
|
786
|
-
| 'create_prorations'
|
|
787
|
-
| 'none';
|
|
788
|
-
|
|
789
|
-
interface SetPauseCollection {
|
|
790
|
-
/**
|
|
791
|
-
* Details of the pause_collection behavior to apply to the amendment.
|
|
792
|
-
*/
|
|
793
|
-
set?: SetPauseCollection.Set;
|
|
794
|
-
|
|
795
|
-
/**
|
|
796
|
-
* Determines the type of the pause_collection amendment.
|
|
797
|
-
*/
|
|
798
|
-
type: SetPauseCollection.Type;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
namespace SetPauseCollection {
|
|
802
|
-
interface Set {
|
|
803
|
-
/**
|
|
804
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
805
|
-
*/
|
|
806
|
-
behavior: Set.Behavior;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
namespace Set {
|
|
810
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
type Type = 'remove' | 'set';
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
|
|
817
|
-
|
|
818
|
-
interface StartsAt {
|
|
819
|
-
/**
|
|
820
|
-
* Use the `end` time of a given discount.
|
|
821
|
-
*/
|
|
822
|
-
discount_end?: StartsAt.DiscountEnd;
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* The timestamp the given line ends at.
|
|
826
|
-
*/
|
|
827
|
-
line_ends_at?: StartsAt.LineEndsAt;
|
|
828
|
-
|
|
829
|
-
/**
|
|
830
|
-
* A precise Unix timestamp.
|
|
831
|
-
*/
|
|
832
|
-
timestamp?: number;
|
|
833
|
-
|
|
834
|
-
/**
|
|
835
|
-
* Select a way to pass in `starts_at`.
|
|
836
|
-
*/
|
|
837
|
-
type: StartsAt.Type;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
namespace StartsAt {
|
|
841
|
-
interface DiscountEnd {
|
|
842
|
-
/**
|
|
843
|
-
* The ID of a specific discount.
|
|
844
|
-
*/
|
|
845
|
-
discount: string;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
interface LineEndsAt {
|
|
849
|
-
/**
|
|
850
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
851
|
-
*/
|
|
852
|
-
index?: number;
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
type Type =
|
|
856
|
-
| 'discount_end'
|
|
857
|
-
| 'line_ends_at'
|
|
858
|
-
| 'now'
|
|
859
|
-
| 'quote_acceptance_date'
|
|
860
|
-
| 'schedule_end'
|
|
861
|
-
| 'timestamp'
|
|
862
|
-
| 'upcoming_invoice';
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
interface TrialSettings {
|
|
866
|
-
/**
|
|
867
|
-
* Defines how the subscription should behave when a trial ends.
|
|
868
|
-
*/
|
|
869
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
namespace TrialSettings {
|
|
873
|
-
interface EndBehavior {
|
|
874
|
-
/**
|
|
875
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
876
|
-
*/
|
|
877
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
namespace EndBehavior {
|
|
881
|
-
type ProrateUpFront = 'defer' | 'include';
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
interface LineItem {
|
|
887
|
-
/**
|
|
888
|
-
* The discounts applied to this line item.
|
|
889
|
-
*/
|
|
890
|
-
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
891
|
-
|
|
892
|
-
/**
|
|
893
|
-
* The ID of the price object. One of `price` or `price_data` is required.
|
|
894
|
-
*/
|
|
895
|
-
price?: string;
|
|
896
|
-
|
|
897
|
-
/**
|
|
898
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
899
|
-
*/
|
|
900
|
-
price_data?: LineItem.PriceData;
|
|
901
|
-
|
|
902
|
-
/**
|
|
903
|
-
* The quantity of the line item.
|
|
904
|
-
*/
|
|
905
|
-
quantity?: number;
|
|
906
|
-
|
|
907
|
-
/**
|
|
908
|
-
* The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
|
|
909
|
-
*/
|
|
910
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
namespace LineItem {
|
|
914
|
-
interface Discount {
|
|
915
|
-
/**
|
|
916
|
-
* ID of the coupon to create a new discount for.
|
|
917
|
-
*/
|
|
918
|
-
coupon?: string;
|
|
919
|
-
|
|
920
|
-
/**
|
|
921
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
922
|
-
*/
|
|
923
|
-
discount?: string;
|
|
924
|
-
|
|
925
|
-
/**
|
|
926
|
-
* Details to determine how long the discount should be applied for.
|
|
927
|
-
*/
|
|
928
|
-
discount_end?: Discount.DiscountEnd;
|
|
929
|
-
|
|
930
|
-
/**
|
|
931
|
-
* ID of the promotion code to create a new discount for.
|
|
932
|
-
*/
|
|
933
|
-
promotion_code?: string;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
namespace Discount {
|
|
937
|
-
interface DiscountEnd {
|
|
938
|
-
/**
|
|
939
|
-
* Time span for the redeemed discount.
|
|
940
|
-
*/
|
|
941
|
-
duration?: DiscountEnd.Duration;
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
945
|
-
*/
|
|
946
|
-
timestamp?: number;
|
|
947
|
-
|
|
948
|
-
/**
|
|
949
|
-
* The type of calculation made to determine when the discount ends.
|
|
950
|
-
*/
|
|
951
|
-
type: DiscountEnd.Type;
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
namespace DiscountEnd {
|
|
955
|
-
interface Duration {
|
|
956
|
-
/**
|
|
957
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
958
|
-
*/
|
|
959
|
-
interval: Duration.Interval;
|
|
960
|
-
|
|
961
|
-
/**
|
|
962
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
963
|
-
*/
|
|
964
|
-
interval_count: number;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
namespace Duration {
|
|
968
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
type Type = 'duration' | 'timestamp';
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
interface PriceData {
|
|
976
|
-
/**
|
|
977
|
-
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
978
|
-
*/
|
|
979
|
-
currency: string;
|
|
980
|
-
|
|
981
|
-
/**
|
|
982
|
-
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
983
|
-
*/
|
|
984
|
-
product: string;
|
|
985
|
-
|
|
986
|
-
/**
|
|
987
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
988
|
-
*/
|
|
989
|
-
recurring?: PriceData.Recurring;
|
|
990
|
-
|
|
991
|
-
/**
|
|
992
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
993
|
-
*/
|
|
994
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
995
|
-
|
|
996
|
-
/**
|
|
997
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
998
|
-
*/
|
|
999
|
-
unit_amount?: number;
|
|
1000
|
-
|
|
1001
|
-
/**
|
|
1002
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
1003
|
-
*/
|
|
1004
|
-
unit_amount_decimal?: string;
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
namespace PriceData {
|
|
1008
|
-
interface Recurring {
|
|
1009
|
-
/**
|
|
1010
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
1011
|
-
*/
|
|
1012
|
-
interval: Recurring.Interval;
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
1016
|
-
*/
|
|
1017
|
-
interval_count?: number;
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
namespace Recurring {
|
|
1021
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
interface SubscriptionData {
|
|
1029
|
-
/**
|
|
1030
|
-
* Describes the period to bill for upon accepting the quote.
|
|
1031
|
-
*/
|
|
1032
|
-
bill_on_acceptance?: SubscriptionData.BillOnAcceptance;
|
|
1033
|
-
|
|
1034
|
-
/**
|
|
1035
|
-
* 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.
|
|
1036
|
-
*/
|
|
1037
|
-
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
* When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
|
1041
|
-
*/
|
|
1042
|
-
billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
1046
|
-
*/
|
|
1047
|
-
billing_mode?: SubscriptionData.BillingMode;
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* 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.
|
|
1051
|
-
*/
|
|
1052
|
-
description?: string;
|
|
1053
|
-
|
|
1054
|
-
/**
|
|
1055
|
-
* When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
|
1056
|
-
*/
|
|
1057
|
-
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
1058
|
-
|
|
1059
|
-
/**
|
|
1060
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1061
|
-
*/
|
|
1062
|
-
end_behavior?: SubscriptionData.EndBehavior;
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
1065
|
-
* The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden.
|
|
1066
|
-
*/
|
|
1067
|
-
from_subscription?: string;
|
|
1068
|
-
|
|
1069
|
-
/**
|
|
1070
|
-
* 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.
|
|
1071
|
-
*/
|
|
1072
|
-
metadata?: Stripe.MetadataParam;
|
|
1073
|
-
|
|
1074
|
-
/**
|
|
1075
|
-
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
1076
|
-
*/
|
|
1077
|
-
prebilling?: Stripe.Emptyable<SubscriptionData.Prebilling>;
|
|
1078
|
-
|
|
1079
|
-
/**
|
|
1080
|
-
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
1081
|
-
*
|
|
1082
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
1083
|
-
*
|
|
1084
|
-
* Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
1085
|
-
*
|
|
1086
|
-
* Prorations can be disabled by passing `none`.
|
|
1087
|
-
*/
|
|
1088
|
-
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
1089
|
-
|
|
1090
|
-
/**
|
|
1091
|
-
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
1092
|
-
*/
|
|
1093
|
-
trial_period_days?: Stripe.Emptyable<number>;
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
namespace SubscriptionData {
|
|
1097
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
1098
|
-
|
|
1099
|
-
type BillingMode = 'classic' | 'flexible';
|
|
1100
|
-
|
|
1101
|
-
interface BillOnAcceptance {
|
|
1102
|
-
/**
|
|
1103
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
1104
|
-
*/
|
|
1105
|
-
bill_from?: BillOnAcceptance.BillFrom;
|
|
1106
|
-
|
|
1107
|
-
/**
|
|
1108
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
1109
|
-
*/
|
|
1110
|
-
bill_until?: BillOnAcceptance.BillUntil;
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
namespace BillOnAcceptance {
|
|
1114
|
-
interface BillFrom {
|
|
1115
|
-
/**
|
|
1116
|
-
* Details of a Quote line to start the bill period from.
|
|
1117
|
-
*/
|
|
1118
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
1119
|
-
|
|
1120
|
-
/**
|
|
1121
|
-
* A precise Unix timestamp.
|
|
1122
|
-
*/
|
|
1123
|
-
timestamp?: number;
|
|
1124
|
-
|
|
1125
|
-
/**
|
|
1126
|
-
* The type of method to specify the `bill_from` time.
|
|
1127
|
-
*/
|
|
1128
|
-
type: BillFrom.Type;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
namespace BillFrom {
|
|
1132
|
-
interface LineStartsAt {
|
|
1133
|
-
/**
|
|
1134
|
-
* The ID of a quote line.
|
|
1135
|
-
*/
|
|
1136
|
-
id?: string;
|
|
1137
|
-
|
|
1138
|
-
/**
|
|
1139
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1140
|
-
*/
|
|
1141
|
-
index?: number;
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
type Type =
|
|
1145
|
-
| 'line_starts_at'
|
|
1146
|
-
| 'now'
|
|
1147
|
-
| 'pause_collection_start'
|
|
1148
|
-
| 'quote_acceptance_date'
|
|
1149
|
-
| 'timestamp';
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
interface BillUntil {
|
|
1153
|
-
/**
|
|
1154
|
-
* Details of the duration over which to bill.
|
|
1155
|
-
*/
|
|
1156
|
-
duration?: BillUntil.Duration;
|
|
1157
|
-
|
|
1158
|
-
/**
|
|
1159
|
-
* Details of a Quote line item from which to bill until.
|
|
1160
|
-
*/
|
|
1161
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
1162
|
-
|
|
1163
|
-
/**
|
|
1164
|
-
* A precise Unix timestamp.
|
|
1165
|
-
*/
|
|
1166
|
-
timestamp?: number;
|
|
1167
|
-
|
|
1168
|
-
/**
|
|
1169
|
-
* The type of method to specify the `bill_until` time.
|
|
1170
|
-
*/
|
|
1171
|
-
type: BillUntil.Type;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
namespace BillUntil {
|
|
1175
|
-
interface Duration {
|
|
1176
|
-
/**
|
|
1177
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1178
|
-
*/
|
|
1179
|
-
interval: Duration.Interval;
|
|
1180
|
-
|
|
1181
|
-
/**
|
|
1182
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1183
|
-
*/
|
|
1184
|
-
interval_count: number;
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
namespace Duration {
|
|
1188
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
interface LineEndsAt {
|
|
1192
|
-
/**
|
|
1193
|
-
* The ID of a quote line.
|
|
1194
|
-
*/
|
|
1195
|
-
id?: string;
|
|
1196
|
-
|
|
1197
|
-
/**
|
|
1198
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1199
|
-
*/
|
|
1200
|
-
index?: number;
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
type Type =
|
|
1204
|
-
| 'duration'
|
|
1205
|
-
| 'line_ends_at'
|
|
1206
|
-
| 'schedule_end'
|
|
1207
|
-
| 'timestamp'
|
|
1208
|
-
| 'upcoming_invoice';
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
type EndBehavior = 'cancel' | 'release';
|
|
1213
|
-
|
|
1214
|
-
interface Prebilling {
|
|
1215
|
-
/**
|
|
1216
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
1217
|
-
*/
|
|
1218
|
-
iterations: number;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
type ProrationBehavior =
|
|
1222
|
-
| 'always_invoice'
|
|
1223
|
-
| 'create_prorations'
|
|
1224
|
-
| 'none';
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
interface SubscriptionDataOverride {
|
|
1228
|
-
/**
|
|
1229
|
-
* Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
1230
|
-
*/
|
|
1231
|
-
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
1232
|
-
|
|
1233
|
-
/**
|
|
1234
|
-
* Describes the period to bill for upon accepting the quote.
|
|
1235
|
-
*/
|
|
1236
|
-
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance;
|
|
1237
|
-
|
|
1238
|
-
/**
|
|
1239
|
-
* 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.
|
|
1240
|
-
*/
|
|
1241
|
-
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
1242
|
-
|
|
1243
|
-
/**
|
|
1244
|
-
* The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
|
1245
|
-
*/
|
|
1246
|
-
customer?: string;
|
|
1247
|
-
|
|
1248
|
-
/**
|
|
1249
|
-
* 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.
|
|
1250
|
-
*/
|
|
1251
|
-
description?: string;
|
|
1252
|
-
|
|
1253
|
-
/**
|
|
1254
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1255
|
-
*/
|
|
1256
|
-
end_behavior?: SubscriptionDataOverride.EndBehavior;
|
|
1257
|
-
|
|
1258
|
-
/**
|
|
1259
|
-
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
1260
|
-
*
|
|
1261
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
1262
|
-
*
|
|
1263
|
-
* Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
1264
|
-
*
|
|
1265
|
-
* Prorations can be disabled by passing `none`.
|
|
1266
|
-
*/
|
|
1267
|
-
proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
namespace SubscriptionDataOverride {
|
|
1271
|
-
interface AppliesTo {
|
|
1272
|
-
/**
|
|
1273
|
-
* 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.
|
|
1274
|
-
*/
|
|
1275
|
-
new_reference?: string;
|
|
1276
|
-
|
|
1277
|
-
/**
|
|
1278
|
-
* The ID of the schedule the line applies to.
|
|
1279
|
-
*/
|
|
1280
|
-
subscription_schedule?: string;
|
|
1281
|
-
|
|
1282
|
-
/**
|
|
1283
|
-
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
1284
|
-
*/
|
|
1285
|
-
type: AppliesTo.Type;
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
namespace AppliesTo {
|
|
1289
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
1293
|
-
|
|
1294
|
-
interface BillOnAcceptance {
|
|
1295
|
-
/**
|
|
1296
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
1297
|
-
*/
|
|
1298
|
-
bill_from?: BillOnAcceptance.BillFrom;
|
|
1299
|
-
|
|
1300
|
-
/**
|
|
1301
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
1302
|
-
*/
|
|
1303
|
-
bill_until?: BillOnAcceptance.BillUntil;
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
namespace BillOnAcceptance {
|
|
1307
|
-
interface BillFrom {
|
|
1308
|
-
/**
|
|
1309
|
-
* Details of a Quote line to start the bill period from.
|
|
1310
|
-
*/
|
|
1311
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
1312
|
-
|
|
1313
|
-
/**
|
|
1314
|
-
* A precise Unix timestamp.
|
|
1315
|
-
*/
|
|
1316
|
-
timestamp?: number;
|
|
1317
|
-
|
|
1318
|
-
/**
|
|
1319
|
-
* The type of method to specify the `bill_from` time.
|
|
1320
|
-
*/
|
|
1321
|
-
type: BillFrom.Type;
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
namespace BillFrom {
|
|
1325
|
-
interface LineStartsAt {
|
|
1326
|
-
/**
|
|
1327
|
-
* The ID of a quote line.
|
|
1328
|
-
*/
|
|
1329
|
-
id?: string;
|
|
1330
|
-
|
|
1331
|
-
/**
|
|
1332
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1333
|
-
*/
|
|
1334
|
-
index?: number;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
type Type =
|
|
1338
|
-
| 'line_starts_at'
|
|
1339
|
-
| 'now'
|
|
1340
|
-
| 'pause_collection_start'
|
|
1341
|
-
| 'quote_acceptance_date'
|
|
1342
|
-
| 'timestamp';
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
interface BillUntil {
|
|
1346
|
-
/**
|
|
1347
|
-
* Details of the duration over which to bill.
|
|
1348
|
-
*/
|
|
1349
|
-
duration?: BillUntil.Duration;
|
|
1350
|
-
|
|
1351
|
-
/**
|
|
1352
|
-
* Details of a Quote line item from which to bill until.
|
|
1353
|
-
*/
|
|
1354
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
1355
|
-
|
|
1356
|
-
/**
|
|
1357
|
-
* A precise Unix timestamp.
|
|
1358
|
-
*/
|
|
1359
|
-
timestamp?: number;
|
|
1360
|
-
|
|
1361
|
-
/**
|
|
1362
|
-
* The type of method to specify the `bill_until` time.
|
|
1363
|
-
*/
|
|
1364
|
-
type: BillUntil.Type;
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
namespace BillUntil {
|
|
1368
|
-
interface Duration {
|
|
1369
|
-
/**
|
|
1370
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1371
|
-
*/
|
|
1372
|
-
interval: Duration.Interval;
|
|
1373
|
-
|
|
1374
|
-
/**
|
|
1375
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1376
|
-
*/
|
|
1377
|
-
interval_count: number;
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
namespace Duration {
|
|
1381
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
interface LineEndsAt {
|
|
1385
|
-
/**
|
|
1386
|
-
* The ID of a quote line.
|
|
1387
|
-
*/
|
|
1388
|
-
id?: string;
|
|
1389
|
-
|
|
1390
|
-
/**
|
|
1391
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
1392
|
-
*/
|
|
1393
|
-
index?: number;
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
type Type =
|
|
1397
|
-
| 'duration'
|
|
1398
|
-
| 'line_ends_at'
|
|
1399
|
-
| 'schedule_end'
|
|
1400
|
-
| 'timestamp'
|
|
1401
|
-
| 'upcoming_invoice';
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
type EndBehavior = 'cancel' | 'release';
|
|
1406
|
-
|
|
1407
|
-
type ProrationBehavior =
|
|
1408
|
-
| 'always_invoice'
|
|
1409
|
-
| 'create_prorations'
|
|
1410
|
-
| 'none';
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
interface TransferData {
|
|
1414
|
-
/**
|
|
1415
|
-
* The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
|
|
1416
|
-
*/
|
|
1417
|
-
amount?: number;
|
|
1418
|
-
|
|
1419
|
-
/**
|
|
1420
|
-
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
|
|
1421
|
-
*/
|
|
1422
|
-
amount_percent?: number;
|
|
1423
|
-
|
|
1424
|
-
/**
|
|
1425
|
-
* ID of an existing, connected Stripe account.
|
|
1426
|
-
*/
|
|
1427
|
-
destination: string;
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
|
|
1431
|
-
interface QuoteRetrieveParams {
|
|
1432
|
-
/**
|
|
1433
|
-
* Specifies which fields in the response should be expanded.
|
|
1434
|
-
*/
|
|
1435
|
-
expand?: Array<string>;
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
interface QuoteUpdateParams {
|
|
1439
|
-
/**
|
|
1440
|
-
* Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
1441
|
-
*/
|
|
1442
|
-
allow_backdated_lines?: boolean;
|
|
1443
|
-
|
|
1444
|
-
/**
|
|
1445
|
-
* The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
|
|
1446
|
-
*/
|
|
1447
|
-
application_fee_amount?: Stripe.Emptyable<number>;
|
|
1448
|
-
|
|
1449
|
-
/**
|
|
1450
|
-
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
|
|
1451
|
-
*/
|
|
1452
|
-
application_fee_percent?: Stripe.Emptyable<number>;
|
|
1453
|
-
|
|
1454
|
-
/**
|
|
1455
|
-
* Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
|
1456
|
-
*/
|
|
1457
|
-
automatic_tax?: QuoteUpdateParams.AutomaticTax;
|
|
1458
|
-
|
|
1459
|
-
/**
|
|
1460
|
-
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
|
|
1461
|
-
*/
|
|
1462
|
-
collection_method?: QuoteUpdateParams.CollectionMethod;
|
|
1463
|
-
|
|
1464
|
-
/**
|
|
1465
|
-
* The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
|
1466
|
-
*/
|
|
1467
|
-
customer?: string;
|
|
1468
|
-
|
|
1469
|
-
/**
|
|
1470
|
-
* The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
|
1471
|
-
*/
|
|
1472
|
-
customer_account?: string;
|
|
1473
|
-
|
|
1474
|
-
/**
|
|
1475
|
-
* The tax rates that will apply to any line item that does not have `tax_rates` set.
|
|
1476
|
-
*/
|
|
1477
|
-
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
1478
|
-
|
|
1479
|
-
/**
|
|
1480
|
-
* A description that will be displayed on the quote PDF.
|
|
1481
|
-
*/
|
|
1482
|
-
description?: Stripe.Emptyable<string>;
|
|
1483
|
-
|
|
1484
|
-
/**
|
|
1485
|
-
* The discounts applied to the quote.
|
|
1486
|
-
*/
|
|
1487
|
-
discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
|
|
1488
|
-
|
|
1489
|
-
/**
|
|
1490
|
-
* Specifies which fields in the response should be expanded.
|
|
1491
|
-
*/
|
|
1492
|
-
expand?: Array<string>;
|
|
1493
|
-
|
|
1494
|
-
/**
|
|
1495
|
-
* A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
|
1496
|
-
*/
|
|
1497
|
-
expires_at?: number;
|
|
1498
|
-
|
|
1499
|
-
/**
|
|
1500
|
-
* A footer that will be displayed on the quote PDF.
|
|
1501
|
-
*/
|
|
1502
|
-
footer?: Stripe.Emptyable<string>;
|
|
1503
|
-
|
|
1504
|
-
/**
|
|
1505
|
-
* A header that will be displayed on the quote PDF.
|
|
1506
|
-
*/
|
|
1507
|
-
header?: Stripe.Emptyable<string>;
|
|
1508
|
-
|
|
1509
|
-
/**
|
|
1510
|
-
* All invoices will be billed using the specified settings.
|
|
1511
|
-
*/
|
|
1512
|
-
invoice_settings?: QuoteUpdateParams.InvoiceSettings;
|
|
1513
|
-
|
|
1514
|
-
/**
|
|
1515
|
-
* A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
|
|
1516
|
-
*/
|
|
1517
|
-
line_items?: Array<QuoteUpdateParams.LineItem>;
|
|
1518
|
-
|
|
1519
|
-
/**
|
|
1520
|
-
* 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.
|
|
1521
|
-
*/
|
|
1522
|
-
lines?: Array<QuoteUpdateParams.Line>;
|
|
1523
|
-
|
|
1524
|
-
/**
|
|
1525
|
-
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
1526
|
-
*/
|
|
1527
|
-
metadata?: Stripe.MetadataParam;
|
|
1528
|
-
|
|
1529
|
-
/**
|
|
1530
|
-
* The account on behalf of which to charge.
|
|
1531
|
-
*/
|
|
1532
|
-
on_behalf_of?: Stripe.Emptyable<string>;
|
|
1533
|
-
|
|
1534
|
-
/**
|
|
1535
|
-
* When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
|
|
1536
|
-
*/
|
|
1537
|
-
subscription_data?: QuoteUpdateParams.SubscriptionData;
|
|
1538
|
-
|
|
1539
|
-
/**
|
|
1540
|
-
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
1541
|
-
*/
|
|
1542
|
-
subscription_data_overrides?: Stripe.Emptyable<
|
|
1543
|
-
Array<QuoteUpdateParams.SubscriptionDataOverride>
|
|
1544
|
-
>;
|
|
1545
|
-
|
|
1546
|
-
/**
|
|
1547
|
-
* The data with which to automatically create a Transfer for each of the invoices.
|
|
1548
|
-
*/
|
|
1549
|
-
transfer_data?: Stripe.Emptyable<QuoteUpdateParams.TransferData>;
|
|
1550
|
-
}
|
|
1551
|
-
|
|
1552
|
-
namespace QuoteUpdateParams {
|
|
1553
|
-
interface AutomaticTax {
|
|
1554
|
-
/**
|
|
1555
|
-
* Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
|
1556
|
-
*/
|
|
1557
|
-
enabled: boolean;
|
|
1558
|
-
|
|
1559
|
-
/**
|
|
1560
|
-
* The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
|
1561
|
-
*/
|
|
1562
|
-
liability?: AutomaticTax.Liability;
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
namespace AutomaticTax {
|
|
1566
|
-
interface Liability {
|
|
1567
|
-
/**
|
|
1568
|
-
* The connected account being referenced when `type` is `account`.
|
|
1569
|
-
*/
|
|
1570
|
-
account?: string;
|
|
1571
|
-
|
|
1572
|
-
/**
|
|
1573
|
-
* Type of the account referenced in the request.
|
|
1574
|
-
*/
|
|
1575
|
-
type: Liability.Type;
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
namespace Liability {
|
|
1579
|
-
type Type = 'account' | 'self';
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
1584
|
-
|
|
1585
|
-
interface Discount {
|
|
1586
|
-
/**
|
|
1587
|
-
* ID of the coupon to create a new discount for.
|
|
1588
|
-
*/
|
|
1589
|
-
coupon?: string;
|
|
1590
|
-
|
|
1591
|
-
/**
|
|
1592
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1593
|
-
*/
|
|
1594
|
-
discount?: string;
|
|
1595
|
-
|
|
1596
|
-
/**
|
|
1597
|
-
* Details to determine how long the discount should be applied for.
|
|
1598
|
-
*/
|
|
1599
|
-
discount_end?: Discount.DiscountEnd;
|
|
1600
|
-
|
|
1601
|
-
/**
|
|
1602
|
-
* ID of the promotion code to create a new discount for.
|
|
1603
|
-
*/
|
|
1604
|
-
promotion_code?: string;
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
namespace Discount {
|
|
1608
|
-
interface DiscountEnd {
|
|
1609
|
-
/**
|
|
1610
|
-
* Time span for the redeemed discount.
|
|
1611
|
-
*/
|
|
1612
|
-
duration?: DiscountEnd.Duration;
|
|
1613
|
-
|
|
1614
|
-
/**
|
|
1615
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1616
|
-
*/
|
|
1617
|
-
timestamp?: number;
|
|
1618
|
-
|
|
1619
|
-
/**
|
|
1620
|
-
* The type of calculation made to determine when the discount ends.
|
|
1621
|
-
*/
|
|
1622
|
-
type: DiscountEnd.Type;
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
namespace DiscountEnd {
|
|
1626
|
-
interface Duration {
|
|
1627
|
-
/**
|
|
1628
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1629
|
-
*/
|
|
1630
|
-
interval: Duration.Interval;
|
|
1631
|
-
|
|
1632
|
-
/**
|
|
1633
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1634
|
-
*/
|
|
1635
|
-
interval_count: number;
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
namespace Duration {
|
|
1639
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
type Type = 'duration' | 'timestamp';
|
|
1643
|
-
}
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
interface InvoiceSettings {
|
|
1647
|
-
/**
|
|
1648
|
-
* Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
|
|
1649
|
-
*/
|
|
1650
|
-
days_until_due?: number;
|
|
1651
|
-
|
|
1652
|
-
/**
|
|
1653
|
-
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
1654
|
-
*/
|
|
1655
|
-
issuer?: InvoiceSettings.Issuer;
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
namespace InvoiceSettings {
|
|
1659
|
-
interface Issuer {
|
|
1660
|
-
/**
|
|
1661
|
-
* The connected account being referenced when `type` is `account`.
|
|
1662
|
-
*/
|
|
1663
|
-
account?: string;
|
|
1664
|
-
|
|
1665
|
-
/**
|
|
1666
|
-
* Type of the account referenced in the request.
|
|
1667
|
-
*/
|
|
1668
|
-
type: Issuer.Type;
|
|
1669
|
-
}
|
|
1670
|
-
|
|
1671
|
-
namespace Issuer {
|
|
1672
|
-
type Type = 'account' | 'self';
|
|
1673
|
-
}
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
interface Line {
|
|
1677
|
-
/**
|
|
1678
|
-
* An array of operations the quote line performs.
|
|
1679
|
-
*/
|
|
1680
|
-
actions?: Array<Line.Action>;
|
|
1681
|
-
|
|
1682
|
-
/**
|
|
1683
|
-
* Details to identify the subscription schedule the quote line applies to.
|
|
1684
|
-
*/
|
|
1685
|
-
applies_to?: Line.AppliesTo;
|
|
1686
|
-
|
|
1687
|
-
/**
|
|
1688
|
-
* For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
|
|
1689
|
-
*/
|
|
1690
|
-
billing_cycle_anchor?: Line.BillingCycleAnchor;
|
|
1691
|
-
|
|
1692
|
-
/**
|
|
1693
|
-
* A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
|
|
1694
|
-
*/
|
|
1695
|
-
cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
|
|
1696
|
-
|
|
1697
|
-
/**
|
|
1698
|
-
* Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
|
|
1699
|
-
*/
|
|
1700
|
-
ends_at?: Line.EndsAt;
|
|
1701
|
-
|
|
1702
|
-
/**
|
|
1703
|
-
* The ID of an existing line on the quote.
|
|
1704
|
-
*/
|
|
1705
|
-
id?: string;
|
|
1706
|
-
|
|
1707
|
-
/**
|
|
1708
|
-
* Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
|
|
1709
|
-
*/
|
|
1710
|
-
proration_behavior?: Line.ProrationBehavior;
|
|
1711
|
-
|
|
1712
|
-
/**
|
|
1713
|
-
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
1714
|
-
*/
|
|
1715
|
-
set_pause_collection?: Line.SetPauseCollection;
|
|
1716
|
-
|
|
1717
|
-
/**
|
|
1718
|
-
* Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
|
1719
|
-
*/
|
|
1720
|
-
set_schedule_end?: Line.SetScheduleEnd;
|
|
1721
|
-
|
|
1722
|
-
/**
|
|
1723
|
-
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
1724
|
-
*/
|
|
1725
|
-
starts_at?: Line.StartsAt;
|
|
1726
|
-
|
|
1727
|
-
/**
|
|
1728
|
-
* Settings related to subscription trials.
|
|
1729
|
-
*/
|
|
1730
|
-
trial_settings?: Line.TrialSettings;
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
namespace Line {
|
|
1734
|
-
interface Action {
|
|
1735
|
-
/**
|
|
1736
|
-
* Details for the `add_discount` type.
|
|
1737
|
-
*/
|
|
1738
|
-
add_discount?: Action.AddDiscount;
|
|
1739
|
-
|
|
1740
|
-
/**
|
|
1741
|
-
* Details for the `add_item` type.
|
|
1742
|
-
*/
|
|
1743
|
-
add_item?: Action.AddItem;
|
|
1744
|
-
|
|
1745
|
-
/**
|
|
1746
|
-
* Details for the `add_metadata` type: specify a hash of key-value pairs.
|
|
1747
|
-
*/
|
|
1748
|
-
add_metadata?: {
|
|
1749
|
-
[key: string]: string;
|
|
1750
|
-
};
|
|
1751
|
-
|
|
1752
|
-
/**
|
|
1753
|
-
* Details for the `remove_discount` type.
|
|
1754
|
-
*/
|
|
1755
|
-
remove_discount?: Action.RemoveDiscount;
|
|
1756
|
-
|
|
1757
|
-
/**
|
|
1758
|
-
* Details for the `remove_item` type.
|
|
1759
|
-
*/
|
|
1760
|
-
remove_item?: Action.RemoveItem;
|
|
1761
|
-
|
|
1762
|
-
/**
|
|
1763
|
-
* Details for the `remove_metadata` type: specify an array of metadata keys.
|
|
1764
|
-
*/
|
|
1765
|
-
remove_metadata?: Array<string>;
|
|
1766
|
-
|
|
1767
|
-
/**
|
|
1768
|
-
* Details for the `set_discounts` type.
|
|
1769
|
-
*/
|
|
1770
|
-
set_discounts?: Array<Action.SetDiscount>;
|
|
1771
|
-
|
|
1772
|
-
/**
|
|
1773
|
-
* Details for the `set_items` type.
|
|
1774
|
-
*/
|
|
1775
|
-
set_items?: Array<Action.SetItem>;
|
|
1776
|
-
|
|
1777
|
-
/**
|
|
1778
|
-
* Details for the `set_metadata` type: specify an array of key-value pairs.
|
|
1779
|
-
*/
|
|
1780
|
-
set_metadata?: Stripe.Emptyable<{
|
|
1781
|
-
[key: string]: string;
|
|
1782
|
-
}>;
|
|
1783
|
-
|
|
1784
|
-
/**
|
|
1785
|
-
* The type of action the quote line performs.
|
|
1786
|
-
*/
|
|
1787
|
-
type: Action.Type;
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
namespace Action {
|
|
1791
|
-
interface AddDiscount {
|
|
1792
|
-
/**
|
|
1793
|
-
* The coupon code to redeem.
|
|
1794
|
-
*/
|
|
1795
|
-
coupon?: string;
|
|
1796
|
-
|
|
1797
|
-
/**
|
|
1798
|
-
* An ID of an existing discount for a coupon that was already redeemed.
|
|
1799
|
-
*/
|
|
1800
|
-
discount?: string;
|
|
1801
|
-
|
|
1802
|
-
/**
|
|
1803
|
-
* Details to determine how long the discount should be applied for.
|
|
1804
|
-
*/
|
|
1805
|
-
discount_end?: AddDiscount.DiscountEnd;
|
|
1806
|
-
|
|
1807
|
-
/**
|
|
1808
|
-
* The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
|
|
1809
|
-
*/
|
|
1810
|
-
index?: number;
|
|
1811
|
-
|
|
1812
|
-
/**
|
|
1813
|
-
* The promotion code to redeem.
|
|
1814
|
-
*/
|
|
1815
|
-
promotion_code?: string;
|
|
1816
|
-
}
|
|
1817
|
-
|
|
1818
|
-
namespace AddDiscount {
|
|
1819
|
-
interface DiscountEnd {
|
|
1820
|
-
/**
|
|
1821
|
-
* The type of calculation made to determine when the discount ends.
|
|
1822
|
-
*/
|
|
1823
|
-
type: 'line_ends_at';
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
interface AddItem {
|
|
1828
|
-
/**
|
|
1829
|
-
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
1830
|
-
*/
|
|
1831
|
-
discounts?: Array<AddItem.Discount>;
|
|
1832
|
-
|
|
1833
|
-
/**
|
|
1834
|
-
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
1835
|
-
*/
|
|
1836
|
-
metadata?: Stripe.MetadataParam;
|
|
1837
|
-
|
|
1838
|
-
/**
|
|
1839
|
-
* The ID of the price object.
|
|
1840
|
-
*/
|
|
1841
|
-
price: string;
|
|
1842
|
-
|
|
1843
|
-
/**
|
|
1844
|
-
* Quantity for this item.
|
|
1845
|
-
*/
|
|
1846
|
-
quantity?: number;
|
|
1847
|
-
|
|
1848
|
-
/**
|
|
1849
|
-
* The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
|
|
1850
|
-
*/
|
|
1851
|
-
tax_rates?: Array<string>;
|
|
1852
|
-
|
|
1853
|
-
/**
|
|
1854
|
-
* Options that configure the trial on the subscription item.
|
|
1855
|
-
*/
|
|
1856
|
-
trial?: AddItem.Trial;
|
|
1857
|
-
}
|
|
1858
|
-
|
|
1859
|
-
namespace AddItem {
|
|
1860
|
-
interface Discount {
|
|
1861
|
-
/**
|
|
1862
|
-
* ID of the coupon to create a new discount for.
|
|
1863
|
-
*/
|
|
1864
|
-
coupon?: string;
|
|
1865
|
-
|
|
1866
|
-
/**
|
|
1867
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1868
|
-
*/
|
|
1869
|
-
discount?: string;
|
|
1870
|
-
|
|
1871
|
-
/**
|
|
1872
|
-
* Details to determine how long the discount should be applied for.
|
|
1873
|
-
*/
|
|
1874
|
-
discount_end?: Discount.DiscountEnd;
|
|
1875
|
-
|
|
1876
|
-
/**
|
|
1877
|
-
* ID of the promotion code to create a new discount for.
|
|
1878
|
-
*/
|
|
1879
|
-
promotion_code?: string;
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
namespace Discount {
|
|
1883
|
-
interface DiscountEnd {
|
|
1884
|
-
/**
|
|
1885
|
-
* Time span for the redeemed discount.
|
|
1886
|
-
*/
|
|
1887
|
-
duration?: DiscountEnd.Duration;
|
|
1888
|
-
|
|
1889
|
-
/**
|
|
1890
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1891
|
-
*/
|
|
1892
|
-
timestamp?: number;
|
|
1893
|
-
|
|
1894
|
-
/**
|
|
1895
|
-
* The type of calculation made to determine when the discount ends.
|
|
1896
|
-
*/
|
|
1897
|
-
type: DiscountEnd.Type;
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
namespace DiscountEnd {
|
|
1901
|
-
interface Duration {
|
|
1902
|
-
/**
|
|
1903
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1904
|
-
*/
|
|
1905
|
-
interval: Duration.Interval;
|
|
1906
|
-
|
|
1907
|
-
/**
|
|
1908
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1909
|
-
*/
|
|
1910
|
-
interval_count: number;
|
|
1911
|
-
}
|
|
1912
|
-
|
|
1913
|
-
namespace Duration {
|
|
1914
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
type Type = 'duration' | 'timestamp';
|
|
1918
|
-
}
|
|
1919
|
-
}
|
|
1920
|
-
|
|
1921
|
-
interface Trial {
|
|
1922
|
-
/**
|
|
1923
|
-
* List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
|
1924
|
-
*/
|
|
1925
|
-
converts_to?: Array<string>;
|
|
1926
|
-
|
|
1927
|
-
/**
|
|
1928
|
-
* Determines the type of trial for this item.
|
|
1929
|
-
*/
|
|
1930
|
-
type: Trial.Type;
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
namespace Trial {
|
|
1934
|
-
type Type = 'free' | 'paid';
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
interface RemoveDiscount {
|
|
1939
|
-
/**
|
|
1940
|
-
* The coupon code to remove from the `discounts` array.
|
|
1941
|
-
*/
|
|
1942
|
-
coupon?: string;
|
|
1943
|
-
|
|
1944
|
-
/**
|
|
1945
|
-
* The ID of a discount to remove from the `discounts` array.
|
|
1946
|
-
*/
|
|
1947
|
-
discount?: string;
|
|
1948
|
-
|
|
1949
|
-
/**
|
|
1950
|
-
* The ID of a promotion code to remove from the `discounts` array.
|
|
1951
|
-
*/
|
|
1952
|
-
promotion_code?: string;
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
interface RemoveItem {
|
|
1956
|
-
/**
|
|
1957
|
-
* ID of a price to remove.
|
|
1958
|
-
*/
|
|
1959
|
-
price: string;
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
|
-
interface SetDiscount {
|
|
1963
|
-
/**
|
|
1964
|
-
* The coupon code to replace the `discounts` array with.
|
|
1965
|
-
*/
|
|
1966
|
-
coupon?: string;
|
|
1967
|
-
|
|
1968
|
-
/**
|
|
1969
|
-
* An ID of an existing discount to replace the `discounts` array with.
|
|
1970
|
-
*/
|
|
1971
|
-
discount?: string;
|
|
1972
|
-
|
|
1973
|
-
/**
|
|
1974
|
-
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
1975
|
-
*/
|
|
1976
|
-
promotion_code?: string;
|
|
1977
|
-
}
|
|
1978
|
-
|
|
1979
|
-
interface SetItem {
|
|
1980
|
-
/**
|
|
1981
|
-
* If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
|
|
1982
|
-
*/
|
|
1983
|
-
discounts?: Array<SetItem.Discount>;
|
|
1984
|
-
|
|
1985
|
-
/**
|
|
1986
|
-
* If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
|
|
1987
|
-
*/
|
|
1988
|
-
metadata?: Stripe.MetadataParam;
|
|
1989
|
-
|
|
1990
|
-
/**
|
|
1991
|
-
* The ID of the price object.
|
|
1992
|
-
*/
|
|
1993
|
-
price: string;
|
|
1994
|
-
|
|
1995
|
-
/**
|
|
1996
|
-
* If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
|
|
1997
|
-
*/
|
|
1998
|
-
quantity?: number;
|
|
1999
|
-
|
|
2000
|
-
/**
|
|
2001
|
-
* If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
|
|
2002
|
-
*/
|
|
2003
|
-
tax_rates?: Array<string>;
|
|
2004
|
-
|
|
2005
|
-
/**
|
|
2006
|
-
* If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
|
|
2007
|
-
*/
|
|
2008
|
-
trial?: SetItem.Trial;
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
|
-
namespace SetItem {
|
|
2012
|
-
interface Discount {
|
|
2013
|
-
/**
|
|
2014
|
-
* ID of the coupon to create a new discount for.
|
|
2015
|
-
*/
|
|
2016
|
-
coupon?: string;
|
|
2017
|
-
|
|
2018
|
-
/**
|
|
2019
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2020
|
-
*/
|
|
2021
|
-
discount?: string;
|
|
2022
|
-
|
|
2023
|
-
/**
|
|
2024
|
-
* Details to determine how long the discount should be applied for.
|
|
2025
|
-
*/
|
|
2026
|
-
discount_end?: Discount.DiscountEnd;
|
|
2027
|
-
|
|
2028
|
-
/**
|
|
2029
|
-
* ID of the promotion code to create a new discount for.
|
|
2030
|
-
*/
|
|
2031
|
-
promotion_code?: string;
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
namespace Discount {
|
|
2035
|
-
interface DiscountEnd {
|
|
2036
|
-
/**
|
|
2037
|
-
* Time span for the redeemed discount.
|
|
2038
|
-
*/
|
|
2039
|
-
duration?: DiscountEnd.Duration;
|
|
2040
|
-
|
|
2041
|
-
/**
|
|
2042
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2043
|
-
*/
|
|
2044
|
-
timestamp?: number;
|
|
2045
|
-
|
|
2046
|
-
/**
|
|
2047
|
-
* The type of calculation made to determine when the discount ends.
|
|
2048
|
-
*/
|
|
2049
|
-
type: DiscountEnd.Type;
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
|
-
namespace DiscountEnd {
|
|
2053
|
-
interface Duration {
|
|
2054
|
-
/**
|
|
2055
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2056
|
-
*/
|
|
2057
|
-
interval: Duration.Interval;
|
|
2058
|
-
|
|
2059
|
-
/**
|
|
2060
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2061
|
-
*/
|
|
2062
|
-
interval_count: number;
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
namespace Duration {
|
|
2066
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
type Type = 'duration' | 'timestamp';
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
|
|
2073
|
-
interface Trial {
|
|
2074
|
-
/**
|
|
2075
|
-
* List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
|
|
2076
|
-
*/
|
|
2077
|
-
converts_to?: Array<string>;
|
|
2078
|
-
|
|
2079
|
-
/**
|
|
2080
|
-
* Determines the type of trial for this item.
|
|
2081
|
-
*/
|
|
2082
|
-
type: Trial.Type;
|
|
2083
|
-
}
|
|
2084
|
-
|
|
2085
|
-
namespace Trial {
|
|
2086
|
-
type Type = 'free' | 'paid';
|
|
2087
|
-
}
|
|
2088
|
-
}
|
|
2089
|
-
|
|
2090
|
-
type Type =
|
|
2091
|
-
| 'add_discount'
|
|
2092
|
-
| 'add_item'
|
|
2093
|
-
| 'add_metadata'
|
|
2094
|
-
| 'clear_discounts'
|
|
2095
|
-
| 'clear_metadata'
|
|
2096
|
-
| 'remove_discount'
|
|
2097
|
-
| 'remove_item'
|
|
2098
|
-
| 'remove_metadata'
|
|
2099
|
-
| 'set_discounts'
|
|
2100
|
-
| 'set_items'
|
|
2101
|
-
| 'set_metadata';
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
interface AppliesTo {
|
|
2105
|
-
/**
|
|
2106
|
-
* 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.
|
|
2107
|
-
*/
|
|
2108
|
-
new_reference?: string;
|
|
2109
|
-
|
|
2110
|
-
/**
|
|
2111
|
-
* The ID of the schedule the line applies to.
|
|
2112
|
-
*/
|
|
2113
|
-
subscription_schedule?: string;
|
|
2114
|
-
|
|
2115
|
-
/**
|
|
2116
|
-
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
2117
|
-
*/
|
|
2118
|
-
type: AppliesTo.Type;
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
namespace AppliesTo {
|
|
2122
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
2123
|
-
}
|
|
2124
|
-
|
|
2125
|
-
type BillingCycleAnchor = 'automatic' | 'line_starts_at';
|
|
2126
|
-
|
|
2127
|
-
interface CancelSubscriptionSchedule {
|
|
2128
|
-
/**
|
|
2129
|
-
* Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
|
2130
|
-
*/
|
|
2131
|
-
cancel_at: 'line_starts_at';
|
|
2132
|
-
|
|
2133
|
-
/**
|
|
2134
|
-
* If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
|
|
2135
|
-
*/
|
|
2136
|
-
invoice_now?: boolean;
|
|
2137
|
-
|
|
2138
|
-
/**
|
|
2139
|
-
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
|
2140
|
-
*/
|
|
2141
|
-
prorate?: boolean;
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
interface EndsAt {
|
|
2145
|
-
/**
|
|
2146
|
-
* Use the `end` time of a given discount.
|
|
2147
|
-
*/
|
|
2148
|
-
discount_end?: EndsAt.DiscountEnd;
|
|
2149
|
-
|
|
2150
|
-
/**
|
|
2151
|
-
* Time span for the quote line starting from the `starts_at` date.
|
|
2152
|
-
*/
|
|
2153
|
-
duration?: EndsAt.Duration;
|
|
2154
|
-
|
|
2155
|
-
/**
|
|
2156
|
-
* A precise Unix timestamp.
|
|
2157
|
-
*/
|
|
2158
|
-
timestamp?: number;
|
|
2159
|
-
|
|
2160
|
-
/**
|
|
2161
|
-
* Select a way to pass in `ends_at`.
|
|
2162
|
-
*/
|
|
2163
|
-
type: EndsAt.Type;
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
namespace EndsAt {
|
|
2167
|
-
interface DiscountEnd {
|
|
2168
|
-
/**
|
|
2169
|
-
* The ID of a specific discount.
|
|
2170
|
-
*/
|
|
2171
|
-
discount: string;
|
|
2172
|
-
}
|
|
2173
|
-
|
|
2174
|
-
interface Duration {
|
|
2175
|
-
/**
|
|
2176
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2177
|
-
*/
|
|
2178
|
-
interval: Duration.Interval;
|
|
2179
|
-
|
|
2180
|
-
/**
|
|
2181
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2182
|
-
*/
|
|
2183
|
-
interval_count: number;
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
namespace Duration {
|
|
2187
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2188
|
-
}
|
|
2189
|
-
|
|
2190
|
-
type Type =
|
|
2191
|
-
| 'billing_period_end'
|
|
2192
|
-
| 'discount_end'
|
|
2193
|
-
| 'duration'
|
|
2194
|
-
| 'quote_acceptance_date'
|
|
2195
|
-
| 'schedule_end'
|
|
2196
|
-
| 'timestamp'
|
|
2197
|
-
| 'upcoming_invoice';
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
type ProrationBehavior =
|
|
2201
|
-
| 'always_invoice'
|
|
2202
|
-
| 'create_prorations'
|
|
2203
|
-
| 'none';
|
|
2204
|
-
|
|
2205
|
-
interface SetPauseCollection {
|
|
2206
|
-
/**
|
|
2207
|
-
* Details of the pause_collection behavior to apply to the amendment.
|
|
2208
|
-
*/
|
|
2209
|
-
set?: SetPauseCollection.Set;
|
|
2210
|
-
|
|
2211
|
-
/**
|
|
2212
|
-
* Determines the type of the pause_collection amendment.
|
|
2213
|
-
*/
|
|
2214
|
-
type: SetPauseCollection.Type;
|
|
2215
|
-
}
|
|
2216
|
-
|
|
2217
|
-
namespace SetPauseCollection {
|
|
2218
|
-
interface Set {
|
|
2219
|
-
/**
|
|
2220
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
2221
|
-
*/
|
|
2222
|
-
behavior: Set.Behavior;
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
namespace Set {
|
|
2226
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2227
|
-
}
|
|
2228
|
-
|
|
2229
|
-
type Type = 'remove' | 'set';
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
|
|
2233
|
-
|
|
2234
|
-
interface StartsAt {
|
|
2235
|
-
/**
|
|
2236
|
-
* Use the `end` time of a given discount.
|
|
2237
|
-
*/
|
|
2238
|
-
discount_end?: StartsAt.DiscountEnd;
|
|
2239
|
-
|
|
2240
|
-
/**
|
|
2241
|
-
* The timestamp the given line ends at.
|
|
2242
|
-
*/
|
|
2243
|
-
line_ends_at?: StartsAt.LineEndsAt;
|
|
2244
|
-
|
|
2245
|
-
/**
|
|
2246
|
-
* A precise Unix timestamp.
|
|
2247
|
-
*/
|
|
2248
|
-
timestamp?: number;
|
|
2249
|
-
|
|
2250
|
-
/**
|
|
2251
|
-
* Select a way to pass in `starts_at`.
|
|
2252
|
-
*/
|
|
2253
|
-
type: StartsAt.Type;
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
|
-
namespace StartsAt {
|
|
2257
|
-
interface DiscountEnd {
|
|
2258
|
-
/**
|
|
2259
|
-
* The ID of a specific discount.
|
|
2260
|
-
*/
|
|
2261
|
-
discount: string;
|
|
2262
|
-
}
|
|
2263
|
-
|
|
2264
|
-
interface LineEndsAt {
|
|
2265
|
-
/**
|
|
2266
|
-
* The ID of a quote line.
|
|
2267
|
-
*/
|
|
2268
|
-
id?: string;
|
|
2269
|
-
|
|
2270
|
-
/**
|
|
2271
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
2272
|
-
*/
|
|
2273
|
-
index?: number;
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
|
-
type Type =
|
|
2277
|
-
| 'discount_end'
|
|
2278
|
-
| 'line_ends_at'
|
|
2279
|
-
| 'now'
|
|
2280
|
-
| 'quote_acceptance_date'
|
|
2281
|
-
| 'schedule_end'
|
|
2282
|
-
| 'timestamp'
|
|
2283
|
-
| 'upcoming_invoice';
|
|
2284
|
-
}
|
|
2285
|
-
|
|
2286
|
-
interface TrialSettings {
|
|
2287
|
-
/**
|
|
2288
|
-
* Defines how the subscription should behave when a trial ends.
|
|
2289
|
-
*/
|
|
2290
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
2291
|
-
}
|
|
2292
|
-
|
|
2293
|
-
namespace TrialSettings {
|
|
2294
|
-
interface EndBehavior {
|
|
2295
|
-
/**
|
|
2296
|
-
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
2297
|
-
*/
|
|
2298
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2299
|
-
}
|
|
420
|
+
/**
|
|
421
|
+
* All invoices will be billed using the specified settings.
|
|
422
|
+
*/
|
|
423
|
+
invoice_settings?: QuoteUpdateParams.InvoiceSettings;
|
|
2300
424
|
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
}
|
|
425
|
+
/**
|
|
426
|
+
* A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
|
|
427
|
+
*/
|
|
428
|
+
line_items?: Array<QuoteUpdateParams.LineItem>;
|
|
2306
429
|
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
430
|
+
/**
|
|
431
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
432
|
+
*/
|
|
433
|
+
metadata?: Stripe.MetadataParam;
|
|
2312
434
|
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
435
|
+
/**
|
|
436
|
+
* The account on behalf of which to charge.
|
|
437
|
+
*/
|
|
438
|
+
on_behalf_of?: Stripe.Emptyable<string>;
|
|
2317
439
|
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
440
|
+
/**
|
|
441
|
+
* When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
|
|
442
|
+
*/
|
|
443
|
+
subscription_data?: QuoteUpdateParams.SubscriptionData;
|
|
2322
444
|
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
445
|
+
/**
|
|
446
|
+
* The data with which to automatically create a Transfer for each of the invoices.
|
|
447
|
+
*/
|
|
448
|
+
transfer_data?: Stripe.Emptyable<QuoteUpdateParams.TransferData>;
|
|
449
|
+
}
|
|
2327
450
|
|
|
451
|
+
namespace QuoteUpdateParams {
|
|
452
|
+
interface AutomaticTax {
|
|
2328
453
|
/**
|
|
2329
|
-
*
|
|
454
|
+
* Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
|
2330
455
|
*/
|
|
2331
|
-
|
|
456
|
+
enabled: boolean;
|
|
2332
457
|
|
|
2333
458
|
/**
|
|
2334
|
-
* The
|
|
459
|
+
* The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
|
2335
460
|
*/
|
|
2336
|
-
|
|
461
|
+
liability?: AutomaticTax.Liability;
|
|
2337
462
|
}
|
|
2338
463
|
|
|
2339
|
-
namespace
|
|
2340
|
-
interface
|
|
2341
|
-
/**
|
|
2342
|
-
* ID of the coupon to create a new discount for.
|
|
2343
|
-
*/
|
|
2344
|
-
coupon?: string;
|
|
2345
|
-
|
|
2346
|
-
/**
|
|
2347
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2348
|
-
*/
|
|
2349
|
-
discount?: string;
|
|
2350
|
-
|
|
2351
|
-
/**
|
|
2352
|
-
* Details to determine how long the discount should be applied for.
|
|
2353
|
-
*/
|
|
2354
|
-
discount_end?: Discount.DiscountEnd;
|
|
2355
|
-
|
|
2356
|
-
/**
|
|
2357
|
-
* ID of the promotion code to create a new discount for.
|
|
2358
|
-
*/
|
|
2359
|
-
promotion_code?: string;
|
|
2360
|
-
}
|
|
2361
|
-
|
|
2362
|
-
namespace Discount {
|
|
2363
|
-
interface DiscountEnd {
|
|
2364
|
-
/**
|
|
2365
|
-
* Time span for the redeemed discount.
|
|
2366
|
-
*/
|
|
2367
|
-
duration?: DiscountEnd.Duration;
|
|
2368
|
-
|
|
2369
|
-
/**
|
|
2370
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2371
|
-
*/
|
|
2372
|
-
timestamp?: number;
|
|
2373
|
-
|
|
2374
|
-
/**
|
|
2375
|
-
* The type of calculation made to determine when the discount ends.
|
|
2376
|
-
*/
|
|
2377
|
-
type: DiscountEnd.Type;
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
|
-
namespace DiscountEnd {
|
|
2381
|
-
interface Duration {
|
|
2382
|
-
/**
|
|
2383
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2384
|
-
*/
|
|
2385
|
-
interval: Duration.Interval;
|
|
2386
|
-
|
|
2387
|
-
/**
|
|
2388
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2389
|
-
*/
|
|
2390
|
-
interval_count: number;
|
|
2391
|
-
}
|
|
2392
|
-
|
|
2393
|
-
namespace Duration {
|
|
2394
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
type Type = 'duration' | 'timestamp';
|
|
2398
|
-
}
|
|
2399
|
-
}
|
|
2400
|
-
|
|
2401
|
-
interface PriceData {
|
|
2402
|
-
/**
|
|
2403
|
-
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
2404
|
-
*/
|
|
2405
|
-
currency: string;
|
|
2406
|
-
|
|
2407
|
-
/**
|
|
2408
|
-
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
2409
|
-
*/
|
|
2410
|
-
product: string;
|
|
2411
|
-
|
|
2412
|
-
/**
|
|
2413
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
2414
|
-
*/
|
|
2415
|
-
recurring?: PriceData.Recurring;
|
|
2416
|
-
|
|
2417
|
-
/**
|
|
2418
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
2419
|
-
*/
|
|
2420
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
2421
|
-
|
|
464
|
+
namespace AutomaticTax {
|
|
465
|
+
interface Liability {
|
|
2422
466
|
/**
|
|
2423
|
-
*
|
|
467
|
+
* The connected account being referenced when `type` is `account`.
|
|
2424
468
|
*/
|
|
2425
|
-
|
|
469
|
+
account?: string;
|
|
2426
470
|
|
|
2427
471
|
/**
|
|
2428
|
-
*
|
|
472
|
+
* Type of the account referenced in the request.
|
|
2429
473
|
*/
|
|
2430
|
-
|
|
474
|
+
type: Liability.Type;
|
|
2431
475
|
}
|
|
2432
476
|
|
|
2433
|
-
namespace
|
|
2434
|
-
|
|
2435
|
-
/**
|
|
2436
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
2437
|
-
*/
|
|
2438
|
-
interval: Recurring.Interval;
|
|
2439
|
-
|
|
2440
|
-
/**
|
|
2441
|
-
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
2442
|
-
*/
|
|
2443
|
-
interval_count?: number;
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
namespace Recurring {
|
|
2447
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2448
|
-
}
|
|
2449
|
-
|
|
2450
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
477
|
+
namespace Liability {
|
|
478
|
+
type Type = 'account' | 'self';
|
|
2451
479
|
}
|
|
2452
480
|
}
|
|
2453
481
|
|
|
2454
|
-
|
|
2455
|
-
/**
|
|
2456
|
-
* Describes the period to bill for upon accepting the quote.
|
|
2457
|
-
*/
|
|
2458
|
-
bill_on_acceptance?: Stripe.Emptyable<
|
|
2459
|
-
SubscriptionData.BillOnAcceptance
|
|
2460
|
-
>;
|
|
2461
|
-
|
|
2462
|
-
/**
|
|
2463
|
-
* 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.
|
|
2464
|
-
*/
|
|
2465
|
-
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
2466
|
-
|
|
2467
|
-
/**
|
|
2468
|
-
* When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
|
2469
|
-
*/
|
|
2470
|
-
billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
|
|
2471
|
-
|
|
2472
|
-
/**
|
|
2473
|
-
* 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.
|
|
2474
|
-
*/
|
|
2475
|
-
description?: Stripe.Emptyable<string>;
|
|
2476
|
-
|
|
2477
|
-
/**
|
|
2478
|
-
* When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
|
2479
|
-
*/
|
|
2480
|
-
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
482
|
+
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
2481
483
|
|
|
484
|
+
interface Discount {
|
|
2482
485
|
/**
|
|
2483
|
-
*
|
|
486
|
+
* ID of the coupon to create a new discount for.
|
|
2484
487
|
*/
|
|
2485
|
-
|
|
488
|
+
coupon?: string;
|
|
2486
489
|
|
|
2487
490
|
/**
|
|
2488
|
-
*
|
|
491
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2489
492
|
*/
|
|
2490
|
-
|
|
493
|
+
discount?: string;
|
|
2491
494
|
|
|
2492
495
|
/**
|
|
2493
|
-
*
|
|
496
|
+
* ID of the promotion code to create a new discount for.
|
|
2494
497
|
*/
|
|
2495
|
-
|
|
498
|
+
promotion_code?: string;
|
|
499
|
+
}
|
|
2496
500
|
|
|
501
|
+
interface InvoiceSettings {
|
|
2497
502
|
/**
|
|
2498
|
-
*
|
|
2499
|
-
*
|
|
2500
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
2501
|
-
*
|
|
2502
|
-
* Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
2503
|
-
*
|
|
2504
|
-
* Prorations can be disabled by passing `none`.
|
|
503
|
+
* Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
|
|
2505
504
|
*/
|
|
2506
|
-
|
|
505
|
+
days_until_due?: number;
|
|
2507
506
|
|
|
2508
507
|
/**
|
|
2509
|
-
*
|
|
508
|
+
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
2510
509
|
*/
|
|
2511
|
-
|
|
510
|
+
issuer?: InvoiceSettings.Issuer;
|
|
2512
511
|
}
|
|
2513
512
|
|
|
2514
|
-
namespace
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
interface BillOnAcceptance {
|
|
513
|
+
namespace InvoiceSettings {
|
|
514
|
+
interface Issuer {
|
|
2518
515
|
/**
|
|
2519
|
-
* The
|
|
516
|
+
* The connected account being referenced when `type` is `account`.
|
|
2520
517
|
*/
|
|
2521
|
-
|
|
518
|
+
account?: string;
|
|
2522
519
|
|
|
2523
520
|
/**
|
|
2524
|
-
*
|
|
521
|
+
* Type of the account referenced in the request.
|
|
2525
522
|
*/
|
|
2526
|
-
|
|
2527
|
-
}
|
|
2528
|
-
|
|
2529
|
-
namespace BillOnAcceptance {
|
|
2530
|
-
interface BillFrom {
|
|
2531
|
-
/**
|
|
2532
|
-
* Details of a Quote line to start the bill period from.
|
|
2533
|
-
*/
|
|
2534
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
2535
|
-
|
|
2536
|
-
/**
|
|
2537
|
-
* A precise Unix timestamp.
|
|
2538
|
-
*/
|
|
2539
|
-
timestamp?: number;
|
|
2540
|
-
|
|
2541
|
-
/**
|
|
2542
|
-
* The type of method to specify the `bill_from` time.
|
|
2543
|
-
*/
|
|
2544
|
-
type: BillFrom.Type;
|
|
2545
|
-
}
|
|
2546
|
-
|
|
2547
|
-
namespace BillFrom {
|
|
2548
|
-
interface LineStartsAt {
|
|
2549
|
-
/**
|
|
2550
|
-
* The ID of a quote line.
|
|
2551
|
-
*/
|
|
2552
|
-
id?: string;
|
|
2553
|
-
|
|
2554
|
-
/**
|
|
2555
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
2556
|
-
*/
|
|
2557
|
-
index?: number;
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
type Type =
|
|
2561
|
-
| 'line_starts_at'
|
|
2562
|
-
| 'now'
|
|
2563
|
-
| 'pause_collection_start'
|
|
2564
|
-
| 'quote_acceptance_date'
|
|
2565
|
-
| 'timestamp';
|
|
2566
|
-
}
|
|
2567
|
-
|
|
2568
|
-
interface BillUntil {
|
|
2569
|
-
/**
|
|
2570
|
-
* Details of the duration over which to bill.
|
|
2571
|
-
*/
|
|
2572
|
-
duration?: BillUntil.Duration;
|
|
2573
|
-
|
|
2574
|
-
/**
|
|
2575
|
-
* Details of a Quote line item from which to bill until.
|
|
2576
|
-
*/
|
|
2577
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
2578
|
-
|
|
2579
|
-
/**
|
|
2580
|
-
* A precise Unix timestamp.
|
|
2581
|
-
*/
|
|
2582
|
-
timestamp?: number;
|
|
2583
|
-
|
|
2584
|
-
/**
|
|
2585
|
-
* The type of method to specify the `bill_until` time.
|
|
2586
|
-
*/
|
|
2587
|
-
type: BillUntil.Type;
|
|
2588
|
-
}
|
|
2589
|
-
|
|
2590
|
-
namespace BillUntil {
|
|
2591
|
-
interface Duration {
|
|
2592
|
-
/**
|
|
2593
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2594
|
-
*/
|
|
2595
|
-
interval: Duration.Interval;
|
|
2596
|
-
|
|
2597
|
-
/**
|
|
2598
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2599
|
-
*/
|
|
2600
|
-
interval_count: number;
|
|
2601
|
-
}
|
|
2602
|
-
|
|
2603
|
-
namespace Duration {
|
|
2604
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2605
|
-
}
|
|
2606
|
-
|
|
2607
|
-
interface LineEndsAt {
|
|
2608
|
-
/**
|
|
2609
|
-
* The ID of a quote line.
|
|
2610
|
-
*/
|
|
2611
|
-
id?: string;
|
|
2612
|
-
|
|
2613
|
-
/**
|
|
2614
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
2615
|
-
*/
|
|
2616
|
-
index?: number;
|
|
2617
|
-
}
|
|
2618
|
-
|
|
2619
|
-
type Type =
|
|
2620
|
-
| 'duration'
|
|
2621
|
-
| 'line_ends_at'
|
|
2622
|
-
| 'schedule_end'
|
|
2623
|
-
| 'timestamp'
|
|
2624
|
-
| 'upcoming_invoice';
|
|
2625
|
-
}
|
|
523
|
+
type: Issuer.Type;
|
|
2626
524
|
}
|
|
2627
525
|
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
interface Prebilling {
|
|
2631
|
-
/**
|
|
2632
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
2633
|
-
*/
|
|
2634
|
-
iterations: number;
|
|
526
|
+
namespace Issuer {
|
|
527
|
+
type Type = 'account' | 'self';
|
|
2635
528
|
}
|
|
2636
|
-
|
|
2637
|
-
type ProrationBehavior =
|
|
2638
|
-
| 'always_invoice'
|
|
2639
|
-
| 'create_prorations'
|
|
2640
|
-
| 'none';
|
|
2641
529
|
}
|
|
2642
530
|
|
|
2643
|
-
interface
|
|
2644
|
-
/**
|
|
2645
|
-
* Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
2646
|
-
*/
|
|
2647
|
-
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
2648
|
-
|
|
531
|
+
interface LineItem {
|
|
2649
532
|
/**
|
|
2650
|
-
*
|
|
533
|
+
* The discounts applied to this line item.
|
|
2651
534
|
*/
|
|
2652
|
-
|
|
2653
|
-
SubscriptionDataOverride.BillOnAcceptance
|
|
2654
|
-
>;
|
|
535
|
+
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
2655
536
|
|
|
2656
537
|
/**
|
|
2657
|
-
*
|
|
538
|
+
* The ID of an existing line item on the quote.
|
|
2658
539
|
*/
|
|
2659
|
-
|
|
540
|
+
id?: string;
|
|
2660
541
|
|
|
2661
542
|
/**
|
|
2662
|
-
* The
|
|
543
|
+
* The ID of the price object. One of `price` or `price_data` is required.
|
|
2663
544
|
*/
|
|
2664
|
-
|
|
545
|
+
price?: string;
|
|
2665
546
|
|
|
2666
547
|
/**
|
|
2667
|
-
*
|
|
548
|
+
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
2668
549
|
*/
|
|
2669
|
-
|
|
550
|
+
price_data?: LineItem.PriceData;
|
|
2670
551
|
|
|
2671
552
|
/**
|
|
2672
|
-
*
|
|
553
|
+
* The quantity of the line item.
|
|
2673
554
|
*/
|
|
2674
|
-
|
|
555
|
+
quantity?: number;
|
|
2675
556
|
|
|
2676
557
|
/**
|
|
2677
|
-
*
|
|
2678
|
-
*
|
|
2679
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
2680
|
-
*
|
|
2681
|
-
* Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
2682
|
-
*
|
|
2683
|
-
* Prorations can be disabled by passing `none`.
|
|
558
|
+
* The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
|
|
2684
559
|
*/
|
|
2685
|
-
|
|
560
|
+
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2686
561
|
}
|
|
2687
562
|
|
|
2688
|
-
namespace
|
|
2689
|
-
interface
|
|
563
|
+
namespace LineItem {
|
|
564
|
+
interface Discount {
|
|
2690
565
|
/**
|
|
2691
|
-
*
|
|
566
|
+
* ID of the coupon to create a new discount for.
|
|
2692
567
|
*/
|
|
2693
|
-
|
|
568
|
+
coupon?: string;
|
|
2694
569
|
|
|
2695
570
|
/**
|
|
2696
|
-
*
|
|
571
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2697
572
|
*/
|
|
2698
|
-
|
|
573
|
+
discount?: string;
|
|
2699
574
|
|
|
2700
575
|
/**
|
|
2701
|
-
*
|
|
576
|
+
* ID of the promotion code to create a new discount for.
|
|
2702
577
|
*/
|
|
2703
|
-
|
|
578
|
+
promotion_code?: string;
|
|
2704
579
|
}
|
|
2705
580
|
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
581
|
+
interface PriceData {
|
|
582
|
+
/**
|
|
583
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
584
|
+
*/
|
|
585
|
+
currency: string;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
589
|
+
*/
|
|
590
|
+
product: string;
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* The recurring components of a price such as `interval` and `interval_count`.
|
|
594
|
+
*/
|
|
595
|
+
recurring?: PriceData.Recurring;
|
|
2709
596
|
|
|
2710
|
-
|
|
597
|
+
/**
|
|
598
|
+
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
599
|
+
*/
|
|
600
|
+
tax_behavior?: PriceData.TaxBehavior;
|
|
2711
601
|
|
|
2712
|
-
interface BillOnAcceptance {
|
|
2713
602
|
/**
|
|
2714
|
-
*
|
|
603
|
+
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
2715
604
|
*/
|
|
2716
|
-
|
|
605
|
+
unit_amount?: number;
|
|
2717
606
|
|
|
2718
607
|
/**
|
|
2719
|
-
*
|
|
608
|
+
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
2720
609
|
*/
|
|
2721
|
-
|
|
610
|
+
unit_amount_decimal?: string;
|
|
2722
611
|
}
|
|
2723
612
|
|
|
2724
|
-
namespace
|
|
2725
|
-
interface
|
|
2726
|
-
/**
|
|
2727
|
-
* Details of a Quote line to start the bill period from.
|
|
2728
|
-
*/
|
|
2729
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
2730
|
-
|
|
613
|
+
namespace PriceData {
|
|
614
|
+
interface Recurring {
|
|
2731
615
|
/**
|
|
2732
|
-
*
|
|
616
|
+
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
2733
617
|
*/
|
|
2734
|
-
|
|
618
|
+
interval: Recurring.Interval;
|
|
2735
619
|
|
|
2736
620
|
/**
|
|
2737
|
-
* The
|
|
621
|
+
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
2738
622
|
*/
|
|
2739
|
-
|
|
623
|
+
interval_count?: number;
|
|
2740
624
|
}
|
|
2741
625
|
|
|
2742
|
-
namespace
|
|
2743
|
-
|
|
2744
|
-
/**
|
|
2745
|
-
* The ID of a quote line.
|
|
2746
|
-
*/
|
|
2747
|
-
id?: string;
|
|
2748
|
-
|
|
2749
|
-
/**
|
|
2750
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
2751
|
-
*/
|
|
2752
|
-
index?: number;
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
|
-
type Type =
|
|
2756
|
-
| 'line_starts_at'
|
|
2757
|
-
| 'now'
|
|
2758
|
-
| 'pause_collection_start'
|
|
2759
|
-
| 'quote_acceptance_date'
|
|
2760
|
-
| 'timestamp';
|
|
626
|
+
namespace Recurring {
|
|
627
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2761
628
|
}
|
|
2762
629
|
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
*/
|
|
2767
|
-
duration?: BillUntil.Duration;
|
|
2768
|
-
|
|
2769
|
-
/**
|
|
2770
|
-
* Details of a Quote line item from which to bill until.
|
|
2771
|
-
*/
|
|
2772
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
2773
|
-
|
|
2774
|
-
/**
|
|
2775
|
-
* A precise Unix timestamp.
|
|
2776
|
-
*/
|
|
2777
|
-
timestamp?: number;
|
|
630
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
631
|
+
}
|
|
632
|
+
}
|
|
2778
633
|
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
634
|
+
interface SubscriptionData {
|
|
635
|
+
/**
|
|
636
|
+
* 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.
|
|
637
|
+
*/
|
|
638
|
+
description?: Stripe.Emptyable<string>;
|
|
2784
639
|
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
*/
|
|
2790
|
-
interval: Duration.Interval;
|
|
2791
|
-
|
|
2792
|
-
/**
|
|
2793
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2794
|
-
*/
|
|
2795
|
-
interval_count: number;
|
|
2796
|
-
}
|
|
2797
|
-
|
|
2798
|
-
namespace Duration {
|
|
2799
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2800
|
-
}
|
|
2801
|
-
|
|
2802
|
-
interface LineEndsAt {
|
|
2803
|
-
/**
|
|
2804
|
-
* The ID of a quote line.
|
|
2805
|
-
*/
|
|
2806
|
-
id?: string;
|
|
2807
|
-
|
|
2808
|
-
/**
|
|
2809
|
-
* The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
|
|
2810
|
-
*/
|
|
2811
|
-
index?: number;
|
|
2812
|
-
}
|
|
2813
|
-
|
|
2814
|
-
type Type =
|
|
2815
|
-
| 'duration'
|
|
2816
|
-
| 'line_ends_at'
|
|
2817
|
-
| 'schedule_end'
|
|
2818
|
-
| 'timestamp'
|
|
2819
|
-
| 'upcoming_invoice';
|
|
2820
|
-
}
|
|
2821
|
-
}
|
|
640
|
+
/**
|
|
641
|
+
* When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. The `effective_date` is ignored if it is in the past when the quote is accepted.
|
|
642
|
+
*/
|
|
643
|
+
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
2822
644
|
|
|
2823
|
-
|
|
645
|
+
/**
|
|
646
|
+
* 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.
|
|
647
|
+
*/
|
|
648
|
+
metadata?: Stripe.MetadataParam;
|
|
2824
649
|
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
650
|
+
/**
|
|
651
|
+
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
652
|
+
*/
|
|
653
|
+
trial_period_days?: Stripe.Emptyable<number>;
|
|
2829
654
|
}
|
|
2830
655
|
|
|
2831
656
|
interface TransferData {
|
|
@@ -2852,21 +677,11 @@ declare module 'stripe' {
|
|
|
2852
677
|
*/
|
|
2853
678
|
customer?: string;
|
|
2854
679
|
|
|
2855
|
-
/**
|
|
2856
|
-
* The ID of the account whose quotes will be retrieved.
|
|
2857
|
-
*/
|
|
2858
|
-
customer_account?: string;
|
|
2859
|
-
|
|
2860
680
|
/**
|
|
2861
681
|
* Specifies which fields in the response should be expanded.
|
|
2862
682
|
*/
|
|
2863
683
|
expand?: Array<string>;
|
|
2864
684
|
|
|
2865
|
-
/**
|
|
2866
|
-
* The subscription which the quote updates.
|
|
2867
|
-
*/
|
|
2868
|
-
from_subscription?: string;
|
|
2869
|
-
|
|
2870
685
|
/**
|
|
2871
686
|
* The status of the quote.
|
|
2872
687
|
*/
|
|
@@ -2879,13 +694,7 @@ declare module 'stripe' {
|
|
|
2879
694
|
}
|
|
2880
695
|
|
|
2881
696
|
namespace QuoteListParams {
|
|
2882
|
-
type Status =
|
|
2883
|
-
| 'accepted'
|
|
2884
|
-
| 'accepting'
|
|
2885
|
-
| 'canceled'
|
|
2886
|
-
| 'draft'
|
|
2887
|
-
| 'open'
|
|
2888
|
-
| 'stale';
|
|
697
|
+
type Status = 'accepted' | 'canceled' | 'draft' | 'open';
|
|
2889
698
|
}
|
|
2890
699
|
|
|
2891
700
|
interface QuoteAcceptParams {
|
|
@@ -2914,13 +723,6 @@ declare module 'stripe' {
|
|
|
2914
723
|
expires_at?: number;
|
|
2915
724
|
}
|
|
2916
725
|
|
|
2917
|
-
interface QuoteListPreviewInvoiceLinesParams extends PaginationParams {
|
|
2918
|
-
/**
|
|
2919
|
-
* Specifies which fields in the response should be expanded.
|
|
2920
|
-
*/
|
|
2921
|
-
expand?: Array<string>;
|
|
2922
|
-
}
|
|
2923
|
-
|
|
2924
726
|
interface QuoteListComputedUpfrontLineItemsParams extends PaginationParams {
|
|
2925
727
|
/**
|
|
2926
728
|
* Specifies which fields in the response should be expanded.
|
|
@@ -2935,47 +737,6 @@ declare module 'stripe' {
|
|
|
2935
737
|
expand?: Array<string>;
|
|
2936
738
|
}
|
|
2937
739
|
|
|
2938
|
-
interface QuoteListLinesParams extends PaginationParams {
|
|
2939
|
-
/**
|
|
2940
|
-
* Specifies which fields in the response should be expanded.
|
|
2941
|
-
*/
|
|
2942
|
-
expand?: Array<string>;
|
|
2943
|
-
}
|
|
2944
|
-
|
|
2945
|
-
interface QuoteListPreviewInvoicesParams extends PaginationParams {
|
|
2946
|
-
/**
|
|
2947
|
-
* Specifies which fields in the response should be expanded.
|
|
2948
|
-
*/
|
|
2949
|
-
expand?: Array<string>;
|
|
2950
|
-
}
|
|
2951
|
-
|
|
2952
|
-
interface QuoteListPreviewSubscriptionSchedulesParams
|
|
2953
|
-
extends PaginationParams {
|
|
2954
|
-
/**
|
|
2955
|
-
* Specifies which fields in the response should be expanded.
|
|
2956
|
-
*/
|
|
2957
|
-
expand?: Array<string>;
|
|
2958
|
-
}
|
|
2959
|
-
|
|
2960
|
-
interface QuoteMarkDraftParams {
|
|
2961
|
-
/**
|
|
2962
|
-
* Specifies which fields in the response should be expanded.
|
|
2963
|
-
*/
|
|
2964
|
-
expand?: Array<string>;
|
|
2965
|
-
}
|
|
2966
|
-
|
|
2967
|
-
interface QuoteMarkStaleParams {
|
|
2968
|
-
/**
|
|
2969
|
-
* Specifies which fields in the response should be expanded.
|
|
2970
|
-
*/
|
|
2971
|
-
expand?: Array<string>;
|
|
2972
|
-
|
|
2973
|
-
/**
|
|
2974
|
-
* Reason the Quote is being marked stale.
|
|
2975
|
-
*/
|
|
2976
|
-
reason?: string;
|
|
2977
|
-
}
|
|
2978
|
-
|
|
2979
740
|
interface QuotePdfParams {
|
|
2980
741
|
/**
|
|
2981
742
|
* Specifies which fields in the response should be expanded.
|
|
@@ -2983,13 +744,6 @@ declare module 'stripe' {
|
|
|
2983
744
|
expand?: Array<string>;
|
|
2984
745
|
}
|
|
2985
746
|
|
|
2986
|
-
interface QuoteReestimateParams {
|
|
2987
|
-
/**
|
|
2988
|
-
* Specifies which fields in the response should be expanded.
|
|
2989
|
-
*/
|
|
2990
|
-
expand?: Array<string>;
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
747
|
class QuotesResource {
|
|
2994
748
|
/**
|
|
2995
749
|
* A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
|
|
@@ -3070,21 +824,6 @@ declare module 'stripe' {
|
|
|
3070
824
|
options?: RequestOptions
|
|
3071
825
|
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3072
826
|
|
|
3073
|
-
/**
|
|
3074
|
-
* Preview the invoice line items that would be generated by accepting the quote.
|
|
3075
|
-
*/
|
|
3076
|
-
listPreviewInvoiceLines(
|
|
3077
|
-
quoteId: string,
|
|
3078
|
-
id: string,
|
|
3079
|
-
params?: QuoteListPreviewInvoiceLinesParams,
|
|
3080
|
-
options?: RequestOptions
|
|
3081
|
-
): ApiListPromise<Stripe.InvoiceLineItem>;
|
|
3082
|
-
listPreviewInvoiceLines(
|
|
3083
|
-
quoteId: string,
|
|
3084
|
-
id: string,
|
|
3085
|
-
options?: RequestOptions
|
|
3086
|
-
): ApiListPromise<Stripe.InvoiceLineItem>;
|
|
3087
|
-
|
|
3088
827
|
/**
|
|
3089
828
|
* When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
|
|
3090
829
|
*/
|
|
@@ -3111,71 +850,6 @@ declare module 'stripe' {
|
|
|
3111
850
|
options?: RequestOptions
|
|
3112
851
|
): ApiListPromise<Stripe.LineItem>;
|
|
3113
852
|
|
|
3114
|
-
/**
|
|
3115
|
-
* Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
|
3116
|
-
*/
|
|
3117
|
-
listLines(
|
|
3118
|
-
id: string,
|
|
3119
|
-
params?: QuoteListLinesParams,
|
|
3120
|
-
options?: RequestOptions
|
|
3121
|
-
): ApiListPromise<Stripe.QuoteLine>;
|
|
3122
|
-
listLines(
|
|
3123
|
-
id: string,
|
|
3124
|
-
options?: RequestOptions
|
|
3125
|
-
): ApiListPromise<Stripe.QuoteLine>;
|
|
3126
|
-
|
|
3127
|
-
/**
|
|
3128
|
-
* Preview the invoices that would be generated by accepting the quote.
|
|
3129
|
-
*/
|
|
3130
|
-
listPreviewInvoices(
|
|
3131
|
-
id: string,
|
|
3132
|
-
params?: QuoteListPreviewInvoicesParams,
|
|
3133
|
-
options?: RequestOptions
|
|
3134
|
-
): ApiListPromise<Stripe.QuotePreviewInvoice>;
|
|
3135
|
-
listPreviewInvoices(
|
|
3136
|
-
id: string,
|
|
3137
|
-
options?: RequestOptions
|
|
3138
|
-
): ApiListPromise<Stripe.QuotePreviewInvoice>;
|
|
3139
|
-
|
|
3140
|
-
/**
|
|
3141
|
-
* Preview the schedules that would be generated by accepting the quote
|
|
3142
|
-
*/
|
|
3143
|
-
listPreviewSubscriptionSchedules(
|
|
3144
|
-
id: string,
|
|
3145
|
-
params?: QuoteListPreviewSubscriptionSchedulesParams,
|
|
3146
|
-
options?: RequestOptions
|
|
3147
|
-
): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
|
|
3148
|
-
listPreviewSubscriptionSchedules(
|
|
3149
|
-
id: string,
|
|
3150
|
-
options?: RequestOptions
|
|
3151
|
-
): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
|
|
3152
|
-
|
|
3153
|
-
/**
|
|
3154
|
-
* Converts a stale quote to draft.
|
|
3155
|
-
*/
|
|
3156
|
-
markDraft(
|
|
3157
|
-
id: string,
|
|
3158
|
-
params?: QuoteMarkDraftParams,
|
|
3159
|
-
options?: RequestOptions
|
|
3160
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3161
|
-
markDraft(
|
|
3162
|
-
id: string,
|
|
3163
|
-
options?: RequestOptions
|
|
3164
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3165
|
-
|
|
3166
|
-
/**
|
|
3167
|
-
* Converts a draft or open quote to stale.
|
|
3168
|
-
*/
|
|
3169
|
-
markStale(
|
|
3170
|
-
id: string,
|
|
3171
|
-
params?: QuoteMarkStaleParams,
|
|
3172
|
-
options?: RequestOptions
|
|
3173
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3174
|
-
markStale(
|
|
3175
|
-
id: string,
|
|
3176
|
-
options?: RequestOptions
|
|
3177
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3178
|
-
|
|
3179
853
|
/**
|
|
3180
854
|
* Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
|
3181
855
|
*/
|
|
@@ -3185,19 +859,6 @@ declare module 'stripe' {
|
|
|
3185
859
|
options?: RequestOptions
|
|
3186
860
|
): Promise<StripeStreamResponse>;
|
|
3187
861
|
pdf(id: string, options?: RequestOptions): Promise<StripeStreamResponse>;
|
|
3188
|
-
|
|
3189
|
-
/**
|
|
3190
|
-
* Recompute the upcoming invoice estimate for the quote.
|
|
3191
|
-
*/
|
|
3192
|
-
reestimate(
|
|
3193
|
-
id: string,
|
|
3194
|
-
params?: QuoteReestimateParams,
|
|
3195
|
-
options?: RequestOptions
|
|
3196
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3197
|
-
reestimate(
|
|
3198
|
-
id: string,
|
|
3199
|
-
options?: RequestOptions
|
|
3200
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3201
862
|
}
|
|
3202
863
|
}
|
|
3203
864
|
}
|