stripe 18.6.0-beta.1 → 19.0.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 +107 -1364
- package/OPENAPI_VERSION +1 -1
- package/README.md +22 -7
- package/VERSION +1 -1
- package/cjs/Error.js +1 -107
- package/cjs/RequestSender.js +15 -6
- package/cjs/StripeContext.js +56 -0
- package/cjs/apiVersion.js +3 -2
- package/cjs/net/FetchHttpClient.js +1 -1
- package/cjs/resources/FinancialConnections/Accounts.js +0 -5
- package/cjs/resources/Mandates.js +0 -5
- package/cjs/resources/PaymentIntents.js +0 -13
- package/cjs/resources/Quotes.js +0 -32
- package/cjs/resources/SubscriptionSchedules.js +0 -4
- package/cjs/resources/V2/Core/Events.js +1 -1
- package/cjs/resources.js +8 -100
- package/cjs/stripe.core.js +24 -3
- package/esm/Error.js +0 -93
- package/esm/RequestSender.js +15 -6
- package/esm/StripeContext.js +52 -0
- package/esm/apiVersion.js +2 -1
- package/esm/net/FetchHttpClient.js +1 -1
- package/esm/resources/FinancialConnections/Accounts.js +0 -5
- package/esm/resources/Mandates.js +0 -5
- package/esm/resources/PaymentIntents.js +0 -13
- package/esm/resources/Quotes.js +0 -32
- package/esm/resources/SubscriptionSchedules.js +0 -4
- package/esm/resources/V2/Core/Events.js +1 -1
- package/esm/resources.js +0 -85
- package/esm/stripe.core.js +24 -3
- package/package.json +4 -4
- package/types/AccountLinksResource.d.ts +1 -5
- package/types/AccountSessions.d.ts +0 -75
- package/types/AccountSessionsResource.d.ts +0 -306
- package/types/Accounts.d.ts +5 -207
- package/types/AccountsResource.d.ts +4 -528
- package/types/BalanceSettings.d.ts +12 -6
- package/types/BalanceSettingsResource.d.ts +15 -10
- package/types/BankAccounts.d.ts +4 -0
- package/types/Billing/AlertTriggereds.d.ts +1 -1
- package/types/Billing/AlertsResource.d.ts +1 -1
- 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/Configurations.d.ts +7 -0
- package/types/BillingPortal/ConfigurationsResource.d.ts +14 -0
- package/types/BillingPortal/Sessions.d.ts +0 -5
- package/types/BillingPortal/SessionsResource.d.ts +4 -12
- package/types/Capabilities.d.ts +4 -0
- package/types/Cards.d.ts +1 -6
- package/types/CashBalances.d.ts +0 -5
- package/types/Charges.d.ts +1 -169
- package/types/ChargesResource.d.ts +0 -1406
- package/types/Checkout/Sessions.d.ts +204 -360
- package/types/Checkout/SessionsResource.d.ts +346 -521
- package/types/ConfirmationTokens.d.ts +0 -120
- 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 +0 -5
- package/types/CustomerBalanceTransactions.d.ts +0 -2
- package/types/CustomerCashBalanceTransactions.d.ts +0 -2
- package/types/CustomerSessions.d.ts +0 -5
- package/types/CustomerSessionsResource.d.ts +1 -6
- package/types/Customers.d.ts +10 -2
- package/types/CustomersResource.d.ts +20 -7
- package/types/Discounts.d.ts +32 -24
- package/types/Disputes.d.ts +6 -29
- package/types/Errors.d.ts +0 -79
- package/types/EventTypes.d.ts +0 -664
- package/types/Events.d.ts +0 -97
- package/types/ExchangeRates.d.ts +2 -0
- package/types/ExchangeRatesResource.d.ts +6 -0
- 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 +0 -5
- package/types/Identity/VerificationSessionsResource.d.ts +0 -7
- package/types/InvoiceItems.d.ts +27 -9
- 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 +1 -10
- package/types/Invoices.d.ts +6 -172
- package/types/InvoicesResource.d.ts +54 -1523
- package/types/Issuing/CardholdersResource.d.ts +5 -6
- package/types/Issuing/Cards.d.ts +5 -0
- package/types/Issuing/CardsResource.d.ts +4 -4
- 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 +1 -135
- package/types/MandatesResource.d.ts +0 -31
- package/types/PaymentIntents.d.ts +5 -820
- package/types/PaymentIntentsResource.d.ts +5643 -11279
- package/types/PaymentLinks.d.ts +0 -6
- package/types/PaymentLinksResource.d.ts +5 -12
- package/types/PaymentMethodConfigurations.d.ts +0 -180
- package/types/PaymentMethodConfigurationsResource.d.ts +28 -228
- package/types/PaymentMethods.d.ts +0 -125
- package/types/PaymentMethodsResource.d.ts +2 -172
- package/types/Persons.d.ts +4 -0
- package/types/Prices.d.ts +0 -22
- package/types/PricesResource.d.ts +0 -22
- package/types/PromotionCodes.d.ts +16 -14
- package/types/PromotionCodesResource.d.ts +15 -13
- package/types/Quotes.d.ts +9 -589
- package/types/QuotesResource.d.ts +290 -2619
- package/types/Refunds.d.ts +0 -14
- package/types/Reviews.d.ts +2 -0
- package/types/SetupAttempts.d.ts +3 -51
- package/types/SetupIntents.d.ts +4 -210
- package/types/SetupIntentsResource.d.ts +3 -913
- package/types/Sources.d.ts +1 -30
- package/types/SubscriptionItems.d.ts +0 -21
- package/types/SubscriptionItemsResource.d.ts +0 -109
- package/types/SubscriptionSchedules.d.ts +16 -205
- package/types/SubscriptionSchedulesResource.d.ts +21 -1243
- package/types/Subscriptions.d.ts +17 -135
- package/types/SubscriptionsResource.d.ts +49 -476
- package/types/Tax/CalculationsResource.d.ts +5 -5
- package/types/Tax/Settings.d.ts +7 -0
- package/types/TaxIds.d.ts +0 -10
- package/types/TaxIdsResource.d.ts +0 -10
- package/types/Terminal/Configurations.d.ts +9 -9
- package/types/Terminal/ConfigurationsResource.d.ts +26 -28
- package/types/Terminal/Locations.d.ts +95 -0
- package/types/Terminal/LocationsResource.d.ts +59 -6
- package/types/Terminal/Readers.d.ts +0 -20
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -118
- package/types/TestHelpers/Issuing/AuthorizationsResource.d.ts +79 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
- 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 +0 -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/Billing/MeterEventStreamResource.d.ts +1 -1
- package/types/V2/Core/EventDestinations.d.ts +166 -0
- package/types/V2/Core/EventDestinationsResource.d.ts +14 -14
- package/types/V2/Core/EventTypes.d.ts +256 -0
- package/types/V2/Core/Events.d.ts +77 -0
- package/types/V2/Core/EventsResource.d.ts +4 -4
- package/types/V2/DeletedObject.d.ts +22 -0
- package/types/V2/EventMisc.d.ts +72 -0
- package/types/WebhookEndpointsResource.d.ts +2 -79
- package/types/apiVersion.d.ts +4 -0
- package/types/index.d.ts +8 -150
- package/types/lib.d.ts +7 -15
- package/types/test/typescriptTest.ts +48 -3
- package/cjs/resources/AccountNotices.js +0 -21
- package/cjs/resources/Billing/MeterUsage.js +0 -12
- 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/PaymentAttemptRecords.js +0 -17
- 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/OnboardingLinks.js +0 -12
- 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 -25
- 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/Billing/MeterUsage.js +0 -9
- 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/PaymentAttemptRecords.js +0 -14
- 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/OnboardingLinks.js +0 -9
- 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 -22
- 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/Billing/MeterUsage.d.ts +0 -32
- package/types/Billing/MeterUsageResource.d.ts +0 -685
- package/types/Billing/MeterUsageRows.d.ts +0 -49
- 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 -155
- 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 -1163
- package/types/OrdersResource.d.ts +0 -3139
- package/types/PaymentAttemptRecords.d.ts +0 -2321
- package/types/PaymentAttemptRecordsResource.d.ts +0 -52
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -116
- package/types/PaymentRecords.d.ts +0 -2314
- package/types/PaymentRecordsResource.d.ts +0 -476
- 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 -1736
- package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -892
- 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/OnboardingLinks.d.ts +0 -57
- package/types/Terminal/OnboardingLinksResource.d.ts +0 -62
- package/types/Terminal/ReaderCollectedData.d.ts +0 -51
- package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
- package/types/ThinEvent.d.ts +0 -36
- package/types/V2/Core/AccountLinks.d.ts +0 -168
- package/types/V2/Core/AccountLinksResource.d.ts +0 -152
- package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3812
- package/types/V2/Core/Accounts.d.ts +0 -8862
- package/types/V2/Core/AccountsResource.d.ts +0 -10704
- package/types/V2/Core/Persons.d.ts +0 -1888
- 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/EventDestinations.d.ts +0 -164
- package/types/V2/EventTypes.d.ts +0 -1188
- package/types/V2/Events.d.ts +0 -75
- 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 -585
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -331
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -314
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -289
- 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 -208
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -160
- 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 -262
- 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 -162
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
- package/types/V2/MoneyManagement/Transactions.d.ts +0 -177
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
- package/types/V2/Payments/OffSessionPayments.d.ts +0 -179
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -174
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -68
|
@@ -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,2579 +196,480 @@ 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>;
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* 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`.
|
|
419
|
-
*/
|
|
420
|
-
metadata?: Stripe.MetadataParam;
|
|
293
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
294
|
+
}
|
|
295
|
+
}
|
|
421
296
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
297
|
+
interface SubscriptionData {
|
|
298
|
+
/**
|
|
299
|
+
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
300
|
+
*/
|
|
301
|
+
billing_mode?: SubscriptionData.BillingMode;
|
|
426
302
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
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;
|
|
431
307
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
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>;
|
|
436
312
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}
|
|
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;
|
|
442
317
|
|
|
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
|
-
}
|
|
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
|
+
}
|
|
521
323
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
324
|
+
namespace SubscriptionData {
|
|
325
|
+
interface BillingMode {
|
|
326
|
+
/**
|
|
327
|
+
* Configure behavior for flexible billing mode.
|
|
328
|
+
*/
|
|
329
|
+
flexible?: BillingMode.Flexible;
|
|
527
330
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
331
|
+
/**
|
|
332
|
+
* Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
|
|
333
|
+
*/
|
|
334
|
+
type: BillingMode.Type;
|
|
335
|
+
}
|
|
532
336
|
|
|
337
|
+
namespace BillingMode {
|
|
338
|
+
interface Flexible {
|
|
533
339
|
/**
|
|
534
|
-
*
|
|
340
|
+
* Controls how invoices and invoice items display proration amounts and discount amounts.
|
|
535
341
|
*/
|
|
536
|
-
|
|
342
|
+
proration_discounts?: Flexible.ProrationDiscounts;
|
|
537
343
|
}
|
|
538
344
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
* ID of a price to remove.
|
|
542
|
-
*/
|
|
543
|
-
price: string;
|
|
345
|
+
namespace Flexible {
|
|
346
|
+
type ProrationDiscounts = 'included' | 'itemized';
|
|
544
347
|
}
|
|
545
348
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
*/
|
|
550
|
-
coupon?: string;
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* An ID of an existing discount to replace the `discounts` array with.
|
|
554
|
-
*/
|
|
555
|
-
discount?: string;
|
|
349
|
+
type Type = 'classic' | 'flexible';
|
|
350
|
+
}
|
|
351
|
+
}
|
|
556
352
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
353
|
+
interface TransferData {
|
|
354
|
+
/**
|
|
355
|
+
* 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.
|
|
356
|
+
*/
|
|
357
|
+
amount?: number;
|
|
562
358
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
discounts?: Array<SetItem.Discount>;
|
|
359
|
+
/**
|
|
360
|
+
* 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.
|
|
361
|
+
*/
|
|
362
|
+
amount_percent?: number;
|
|
568
363
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
364
|
+
/**
|
|
365
|
+
* ID of an existing, connected Stripe account.
|
|
366
|
+
*/
|
|
367
|
+
destination: string;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
573
370
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
371
|
+
interface QuoteRetrieveParams {
|
|
372
|
+
/**
|
|
373
|
+
* Specifies which fields in the response should be expanded.
|
|
374
|
+
*/
|
|
375
|
+
expand?: Array<string>;
|
|
376
|
+
}
|
|
578
377
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
378
|
+
interface QuoteUpdateParams {
|
|
379
|
+
/**
|
|
380
|
+
* 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.
|
|
381
|
+
*/
|
|
382
|
+
application_fee_amount?: Stripe.Emptyable<number>;
|
|
583
383
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
384
|
+
/**
|
|
385
|
+
* 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.
|
|
386
|
+
*/
|
|
387
|
+
application_fee_percent?: Stripe.Emptyable<number>;
|
|
588
388
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
}
|
|
389
|
+
/**
|
|
390
|
+
* Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
|
391
|
+
*/
|
|
392
|
+
automatic_tax?: QuoteUpdateParams.AutomaticTax;
|
|
594
393
|
|
|
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
|
-
}
|
|
394
|
+
/**
|
|
395
|
+
* 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`.
|
|
396
|
+
*/
|
|
397
|
+
collection_method?: QuoteUpdateParams.CollectionMethod;
|
|
673
398
|
|
|
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
|
-
}
|
|
399
|
+
/**
|
|
400
|
+
* The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
|
401
|
+
*/
|
|
402
|
+
customer?: string;
|
|
687
403
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
new_reference?: string;
|
|
404
|
+
/**
|
|
405
|
+
* The tax rates that will apply to any line item that does not have `tax_rates` set.
|
|
406
|
+
*/
|
|
407
|
+
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
693
408
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
409
|
+
/**
|
|
410
|
+
* A description that will be displayed on the quote PDF.
|
|
411
|
+
*/
|
|
412
|
+
description?: Stripe.Emptyable<string>;
|
|
698
413
|
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
}
|
|
414
|
+
/**
|
|
415
|
+
* The discounts applied to the quote.
|
|
416
|
+
*/
|
|
417
|
+
discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
|
|
704
418
|
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
419
|
+
/**
|
|
420
|
+
* Specifies which fields in the response should be expanded.
|
|
421
|
+
*/
|
|
422
|
+
expand?: Array<string>;
|
|
708
423
|
|
|
709
|
-
|
|
424
|
+
/**
|
|
425
|
+
* A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
|
426
|
+
*/
|
|
427
|
+
expires_at?: number;
|
|
710
428
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
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
|
-
interface BillingMode {
|
|
1100
|
-
/**
|
|
1101
|
-
* Controls the calculation and orchestration of prorations and invoices for subscriptions.
|
|
1102
|
-
*/
|
|
1103
|
-
type: BillingMode.Type;
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
namespace BillingMode {
|
|
1107
|
-
type Type = 'classic' | 'flexible';
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
interface BillOnAcceptance {
|
|
1111
|
-
/**
|
|
1112
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
1113
|
-
*/
|
|
1114
|
-
bill_from?: BillOnAcceptance.BillFrom;
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
1118
|
-
*/
|
|
1119
|
-
bill_until?: BillOnAcceptance.BillUntil;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
namespace BillOnAcceptance {
|
|
1123
|
-
interface BillFrom {
|
|
1124
|
-
/**
|
|
1125
|
-
* Details of a Quote line to start the bill period from.
|
|
1126
|
-
*/
|
|
1127
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
1128
|
-
|
|
1129
|
-
/**
|
|
1130
|
-
* A precise Unix timestamp.
|
|
1131
|
-
*/
|
|
1132
|
-
timestamp?: number;
|
|
1133
|
-
|
|
1134
|
-
/**
|
|
1135
|
-
* The type of method to specify the `bill_from` time.
|
|
1136
|
-
*/
|
|
1137
|
-
type: BillFrom.Type;
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
namespace BillFrom {
|
|
1141
|
-
interface LineStartsAt {
|
|
1142
|
-
/**
|
|
1143
|
-
* The ID of a quote line.
|
|
1144
|
-
*/
|
|
1145
|
-
id?: string;
|
|
1146
|
-
|
|
1147
|
-
/**
|
|
1148
|
-
* 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.
|
|
1149
|
-
*/
|
|
1150
|
-
index?: number;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
type Type =
|
|
1154
|
-
| 'line_starts_at'
|
|
1155
|
-
| 'now'
|
|
1156
|
-
| 'pause_collection_start'
|
|
1157
|
-
| 'quote_acceptance_date'
|
|
1158
|
-
| 'timestamp';
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
interface BillUntil {
|
|
1162
|
-
/**
|
|
1163
|
-
* Details of the duration over which to bill.
|
|
1164
|
-
*/
|
|
1165
|
-
duration?: BillUntil.Duration;
|
|
1166
|
-
|
|
1167
|
-
/**
|
|
1168
|
-
* Details of a Quote line item from which to bill until.
|
|
1169
|
-
*/
|
|
1170
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1173
|
-
* A precise Unix timestamp.
|
|
1174
|
-
*/
|
|
1175
|
-
timestamp?: number;
|
|
1176
|
-
|
|
1177
|
-
/**
|
|
1178
|
-
* The type of method to specify the `bill_until` time.
|
|
1179
|
-
*/
|
|
1180
|
-
type: BillUntil.Type;
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
namespace BillUntil {
|
|
1184
|
-
interface Duration {
|
|
1185
|
-
/**
|
|
1186
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1187
|
-
*/
|
|
1188
|
-
interval: Duration.Interval;
|
|
1189
|
-
|
|
1190
|
-
/**
|
|
1191
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1192
|
-
*/
|
|
1193
|
-
interval_count: number;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
namespace Duration {
|
|
1197
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
interface LineEndsAt {
|
|
1201
|
-
/**
|
|
1202
|
-
* The ID of a quote line.
|
|
1203
|
-
*/
|
|
1204
|
-
id?: string;
|
|
1205
|
-
|
|
1206
|
-
/**
|
|
1207
|
-
* 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.
|
|
1208
|
-
*/
|
|
1209
|
-
index?: number;
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
type Type =
|
|
1213
|
-
| 'duration'
|
|
1214
|
-
| 'line_ends_at'
|
|
1215
|
-
| 'schedule_end'
|
|
1216
|
-
| 'timestamp'
|
|
1217
|
-
| 'upcoming_invoice';
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
type EndBehavior = 'cancel' | 'release';
|
|
1222
|
-
|
|
1223
|
-
interface Prebilling {
|
|
1224
|
-
/**
|
|
1225
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
1226
|
-
*/
|
|
1227
|
-
iterations: number;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
type ProrationBehavior =
|
|
1231
|
-
| 'always_invoice'
|
|
1232
|
-
| 'create_prorations'
|
|
1233
|
-
| 'none';
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
interface SubscriptionDataOverride {
|
|
1237
|
-
/**
|
|
1238
|
-
* Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
1239
|
-
*/
|
|
1240
|
-
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
1241
|
-
|
|
1242
|
-
/**
|
|
1243
|
-
* Describes the period to bill for upon accepting the quote.
|
|
1244
|
-
*/
|
|
1245
|
-
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance;
|
|
1246
|
-
|
|
1247
|
-
/**
|
|
1248
|
-
* 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.
|
|
1249
|
-
*/
|
|
1250
|
-
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
1251
|
-
|
|
1252
|
-
/**
|
|
1253
|
-
* The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
|
1254
|
-
*/
|
|
1255
|
-
customer?: string;
|
|
1256
|
-
|
|
1257
|
-
/**
|
|
1258
|
-
* 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.
|
|
1259
|
-
*/
|
|
1260
|
-
description?: string;
|
|
1261
|
-
|
|
1262
|
-
/**
|
|
1263
|
-
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1264
|
-
*/
|
|
1265
|
-
end_behavior?: SubscriptionDataOverride.EndBehavior;
|
|
1266
|
-
|
|
1267
|
-
/**
|
|
1268
|
-
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
1269
|
-
*
|
|
1270
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
1271
|
-
*
|
|
1272
|
-
* 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`.
|
|
1273
|
-
*
|
|
1274
|
-
* Prorations can be disabled by passing `none`.
|
|
1275
|
-
*/
|
|
1276
|
-
proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
namespace SubscriptionDataOverride {
|
|
1280
|
-
interface AppliesTo {
|
|
1281
|
-
/**
|
|
1282
|
-
* 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.
|
|
1283
|
-
*/
|
|
1284
|
-
new_reference?: string;
|
|
1285
|
-
|
|
1286
|
-
/**
|
|
1287
|
-
* The ID of the schedule the line applies to.
|
|
1288
|
-
*/
|
|
1289
|
-
subscription_schedule?: string;
|
|
1290
|
-
|
|
1291
|
-
/**
|
|
1292
|
-
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
1293
|
-
*/
|
|
1294
|
-
type: AppliesTo.Type;
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
namespace AppliesTo {
|
|
1298
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
1302
|
-
|
|
1303
|
-
interface BillOnAcceptance {
|
|
1304
|
-
/**
|
|
1305
|
-
* The start of the period to bill from when the Quote is accepted.
|
|
1306
|
-
*/
|
|
1307
|
-
bill_from?: BillOnAcceptance.BillFrom;
|
|
1308
|
-
|
|
1309
|
-
/**
|
|
1310
|
-
* The end of the period to bill until when the Quote is accepted.
|
|
1311
|
-
*/
|
|
1312
|
-
bill_until?: BillOnAcceptance.BillUntil;
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
namespace BillOnAcceptance {
|
|
1316
|
-
interface BillFrom {
|
|
1317
|
-
/**
|
|
1318
|
-
* Details of a Quote line to start the bill period from.
|
|
1319
|
-
*/
|
|
1320
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
1321
|
-
|
|
1322
|
-
/**
|
|
1323
|
-
* A precise Unix timestamp.
|
|
1324
|
-
*/
|
|
1325
|
-
timestamp?: number;
|
|
1326
|
-
|
|
1327
|
-
/**
|
|
1328
|
-
* The type of method to specify the `bill_from` time.
|
|
1329
|
-
*/
|
|
1330
|
-
type: BillFrom.Type;
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
namespace BillFrom {
|
|
1334
|
-
interface LineStartsAt {
|
|
1335
|
-
/**
|
|
1336
|
-
* The ID of a quote line.
|
|
1337
|
-
*/
|
|
1338
|
-
id?: string;
|
|
1339
|
-
|
|
1340
|
-
/**
|
|
1341
|
-
* 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.
|
|
1342
|
-
*/
|
|
1343
|
-
index?: number;
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
type Type =
|
|
1347
|
-
| 'line_starts_at'
|
|
1348
|
-
| 'now'
|
|
1349
|
-
| 'pause_collection_start'
|
|
1350
|
-
| 'quote_acceptance_date'
|
|
1351
|
-
| 'timestamp';
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
interface BillUntil {
|
|
1355
|
-
/**
|
|
1356
|
-
* Details of the duration over which to bill.
|
|
1357
|
-
*/
|
|
1358
|
-
duration?: BillUntil.Duration;
|
|
1359
|
-
|
|
1360
|
-
/**
|
|
1361
|
-
* Details of a Quote line item from which to bill until.
|
|
1362
|
-
*/
|
|
1363
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
1364
|
-
|
|
1365
|
-
/**
|
|
1366
|
-
* A precise Unix timestamp.
|
|
1367
|
-
*/
|
|
1368
|
-
timestamp?: number;
|
|
1369
|
-
|
|
1370
|
-
/**
|
|
1371
|
-
* The type of method to specify the `bill_until` time.
|
|
1372
|
-
*/
|
|
1373
|
-
type: BillUntil.Type;
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
namespace BillUntil {
|
|
1377
|
-
interface Duration {
|
|
1378
|
-
/**
|
|
1379
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1380
|
-
*/
|
|
1381
|
-
interval: Duration.Interval;
|
|
1382
|
-
|
|
1383
|
-
/**
|
|
1384
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1385
|
-
*/
|
|
1386
|
-
interval_count: number;
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
namespace Duration {
|
|
1390
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
interface LineEndsAt {
|
|
1394
|
-
/**
|
|
1395
|
-
* The ID of a quote line.
|
|
1396
|
-
*/
|
|
1397
|
-
id?: string;
|
|
1398
|
-
|
|
1399
|
-
/**
|
|
1400
|
-
* 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.
|
|
1401
|
-
*/
|
|
1402
|
-
index?: number;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
type Type =
|
|
1406
|
-
| 'duration'
|
|
1407
|
-
| 'line_ends_at'
|
|
1408
|
-
| 'schedule_end'
|
|
1409
|
-
| 'timestamp'
|
|
1410
|
-
| 'upcoming_invoice';
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
type EndBehavior = 'cancel' | 'release';
|
|
1415
|
-
|
|
1416
|
-
type ProrationBehavior =
|
|
1417
|
-
| 'always_invoice'
|
|
1418
|
-
| 'create_prorations'
|
|
1419
|
-
| 'none';
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
interface TransferData {
|
|
1423
|
-
/**
|
|
1424
|
-
* 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.
|
|
1425
|
-
*/
|
|
1426
|
-
amount?: number;
|
|
1427
|
-
|
|
1428
|
-
/**
|
|
1429
|
-
* 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.
|
|
1430
|
-
*/
|
|
1431
|
-
amount_percent?: number;
|
|
1432
|
-
|
|
1433
|
-
/**
|
|
1434
|
-
* ID of an existing, connected Stripe account.
|
|
1435
|
-
*/
|
|
1436
|
-
destination: string;
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
|
|
1440
|
-
interface QuoteRetrieveParams {
|
|
1441
|
-
/**
|
|
1442
|
-
* Specifies which fields in the response should be expanded.
|
|
1443
|
-
*/
|
|
1444
|
-
expand?: Array<string>;
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
interface QuoteUpdateParams {
|
|
1448
|
-
/**
|
|
1449
|
-
* Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
1450
|
-
*/
|
|
1451
|
-
allow_backdated_lines?: boolean;
|
|
1452
|
-
|
|
1453
|
-
/**
|
|
1454
|
-
* 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.
|
|
1455
|
-
*/
|
|
1456
|
-
application_fee_amount?: Stripe.Emptyable<number>;
|
|
1457
|
-
|
|
1458
|
-
/**
|
|
1459
|
-
* 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.
|
|
1460
|
-
*/
|
|
1461
|
-
application_fee_percent?: Stripe.Emptyable<number>;
|
|
1462
|
-
|
|
1463
|
-
/**
|
|
1464
|
-
* Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
|
|
1465
|
-
*/
|
|
1466
|
-
automatic_tax?: QuoteUpdateParams.AutomaticTax;
|
|
1467
|
-
|
|
1468
|
-
/**
|
|
1469
|
-
* 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`.
|
|
1470
|
-
*/
|
|
1471
|
-
collection_method?: QuoteUpdateParams.CollectionMethod;
|
|
1472
|
-
|
|
1473
|
-
/**
|
|
1474
|
-
* The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
|
1475
|
-
*/
|
|
1476
|
-
customer?: string;
|
|
1477
|
-
|
|
1478
|
-
/**
|
|
1479
|
-
* The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
|
1480
|
-
*/
|
|
1481
|
-
customer_account?: string;
|
|
1482
|
-
|
|
1483
|
-
/**
|
|
1484
|
-
* The tax rates that will apply to any line item that does not have `tax_rates` set.
|
|
1485
|
-
*/
|
|
1486
|
-
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
1487
|
-
|
|
1488
|
-
/**
|
|
1489
|
-
* A description that will be displayed on the quote PDF.
|
|
1490
|
-
*/
|
|
1491
|
-
description?: Stripe.Emptyable<string>;
|
|
1492
|
-
|
|
1493
|
-
/**
|
|
1494
|
-
* The discounts applied to the quote.
|
|
1495
|
-
*/
|
|
1496
|
-
discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
|
|
1497
|
-
|
|
1498
|
-
/**
|
|
1499
|
-
* Specifies which fields in the response should be expanded.
|
|
1500
|
-
*/
|
|
1501
|
-
expand?: Array<string>;
|
|
1502
|
-
|
|
1503
|
-
/**
|
|
1504
|
-
* A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
|
|
1505
|
-
*/
|
|
1506
|
-
expires_at?: number;
|
|
1507
|
-
|
|
1508
|
-
/**
|
|
1509
|
-
* A footer that will be displayed on the quote PDF.
|
|
1510
|
-
*/
|
|
1511
|
-
footer?: Stripe.Emptyable<string>;
|
|
1512
|
-
|
|
1513
|
-
/**
|
|
1514
|
-
* A header that will be displayed on the quote PDF.
|
|
1515
|
-
*/
|
|
1516
|
-
header?: Stripe.Emptyable<string>;
|
|
1517
|
-
|
|
1518
|
-
/**
|
|
1519
|
-
* All invoices will be billed using the specified settings.
|
|
1520
|
-
*/
|
|
1521
|
-
invoice_settings?: QuoteUpdateParams.InvoiceSettings;
|
|
1522
|
-
|
|
1523
|
-
/**
|
|
1524
|
-
* 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.
|
|
1525
|
-
*/
|
|
1526
|
-
line_items?: Array<QuoteUpdateParams.LineItem>;
|
|
1527
|
-
|
|
1528
|
-
/**
|
|
1529
|
-
* 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.
|
|
1530
|
-
*/
|
|
1531
|
-
lines?: Array<QuoteUpdateParams.Line>;
|
|
1532
|
-
|
|
1533
|
-
/**
|
|
1534
|
-
* 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`.
|
|
1535
|
-
*/
|
|
1536
|
-
metadata?: Stripe.MetadataParam;
|
|
1537
|
-
|
|
1538
|
-
/**
|
|
1539
|
-
* The account on behalf of which to charge.
|
|
1540
|
-
*/
|
|
1541
|
-
on_behalf_of?: Stripe.Emptyable<string>;
|
|
1542
|
-
|
|
1543
|
-
/**
|
|
1544
|
-
* 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.
|
|
1545
|
-
*/
|
|
1546
|
-
subscription_data?: QuoteUpdateParams.SubscriptionData;
|
|
1547
|
-
|
|
1548
|
-
/**
|
|
1549
|
-
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
1550
|
-
*/
|
|
1551
|
-
subscription_data_overrides?: Stripe.Emptyable<
|
|
1552
|
-
Array<QuoteUpdateParams.SubscriptionDataOverride>
|
|
1553
|
-
>;
|
|
1554
|
-
|
|
1555
|
-
/**
|
|
1556
|
-
* The data with which to automatically create a Transfer for each of the invoices.
|
|
1557
|
-
*/
|
|
1558
|
-
transfer_data?: Stripe.Emptyable<QuoteUpdateParams.TransferData>;
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
|
-
namespace QuoteUpdateParams {
|
|
1562
|
-
interface AutomaticTax {
|
|
1563
|
-
/**
|
|
1564
|
-
* Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
|
1565
|
-
*/
|
|
1566
|
-
enabled: boolean;
|
|
1567
|
-
|
|
1568
|
-
/**
|
|
1569
|
-
* 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.
|
|
1570
|
-
*/
|
|
1571
|
-
liability?: AutomaticTax.Liability;
|
|
1572
|
-
}
|
|
1573
|
-
|
|
1574
|
-
namespace AutomaticTax {
|
|
1575
|
-
interface Liability {
|
|
1576
|
-
/**
|
|
1577
|
-
* The connected account being referenced when `type` is `account`.
|
|
1578
|
-
*/
|
|
1579
|
-
account?: string;
|
|
1580
|
-
|
|
1581
|
-
/**
|
|
1582
|
-
* Type of the account referenced in the request.
|
|
1583
|
-
*/
|
|
1584
|
-
type: Liability.Type;
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
namespace Liability {
|
|
1588
|
-
type Type = 'account' | 'self';
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
1593
|
-
|
|
1594
|
-
interface Discount {
|
|
1595
|
-
/**
|
|
1596
|
-
* ID of the coupon to create a new discount for.
|
|
1597
|
-
*/
|
|
1598
|
-
coupon?: string;
|
|
1599
|
-
|
|
1600
|
-
/**
|
|
1601
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1602
|
-
*/
|
|
1603
|
-
discount?: string;
|
|
1604
|
-
|
|
1605
|
-
/**
|
|
1606
|
-
* Details to determine how long the discount should be applied for.
|
|
1607
|
-
*/
|
|
1608
|
-
discount_end?: Discount.DiscountEnd;
|
|
1609
|
-
|
|
1610
|
-
/**
|
|
1611
|
-
* ID of the promotion code to create a new discount for.
|
|
1612
|
-
*/
|
|
1613
|
-
promotion_code?: string;
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
namespace Discount {
|
|
1617
|
-
interface DiscountEnd {
|
|
1618
|
-
/**
|
|
1619
|
-
* Time span for the redeemed discount.
|
|
1620
|
-
*/
|
|
1621
|
-
duration?: DiscountEnd.Duration;
|
|
1622
|
-
|
|
1623
|
-
/**
|
|
1624
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1625
|
-
*/
|
|
1626
|
-
timestamp?: number;
|
|
1627
|
-
|
|
1628
|
-
/**
|
|
1629
|
-
* The type of calculation made to determine when the discount ends.
|
|
1630
|
-
*/
|
|
1631
|
-
type: DiscountEnd.Type;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
namespace DiscountEnd {
|
|
1635
|
-
interface Duration {
|
|
1636
|
-
/**
|
|
1637
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1638
|
-
*/
|
|
1639
|
-
interval: Duration.Interval;
|
|
1640
|
-
|
|
1641
|
-
/**
|
|
1642
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1643
|
-
*/
|
|
1644
|
-
interval_count: number;
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
namespace Duration {
|
|
1648
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
type Type = 'duration' | 'timestamp';
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
interface InvoiceSettings {
|
|
1656
|
-
/**
|
|
1657
|
-
* 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`.
|
|
1658
|
-
*/
|
|
1659
|
-
days_until_due?: number;
|
|
1660
|
-
|
|
1661
|
-
/**
|
|
1662
|
-
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
1663
|
-
*/
|
|
1664
|
-
issuer?: InvoiceSettings.Issuer;
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
namespace InvoiceSettings {
|
|
1668
|
-
interface Issuer {
|
|
1669
|
-
/**
|
|
1670
|
-
* The connected account being referenced when `type` is `account`.
|
|
1671
|
-
*/
|
|
1672
|
-
account?: string;
|
|
1673
|
-
|
|
1674
|
-
/**
|
|
1675
|
-
* Type of the account referenced in the request.
|
|
1676
|
-
*/
|
|
1677
|
-
type: Issuer.Type;
|
|
1678
|
-
}
|
|
1679
|
-
|
|
1680
|
-
namespace Issuer {
|
|
1681
|
-
type Type = 'account' | 'self';
|
|
1682
|
-
}
|
|
1683
|
-
}
|
|
1684
|
-
|
|
1685
|
-
interface Line {
|
|
1686
|
-
/**
|
|
1687
|
-
* An array of operations the quote line performs.
|
|
1688
|
-
*/
|
|
1689
|
-
actions?: Array<Line.Action>;
|
|
1690
|
-
|
|
1691
|
-
/**
|
|
1692
|
-
* Details to identify the subscription schedule the quote line applies to.
|
|
1693
|
-
*/
|
|
1694
|
-
applies_to?: Line.AppliesTo;
|
|
1695
|
-
|
|
1696
|
-
/**
|
|
1697
|
-
* 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.
|
|
1698
|
-
*/
|
|
1699
|
-
billing_cycle_anchor?: Line.BillingCycleAnchor;
|
|
1700
|
-
|
|
1701
|
-
/**
|
|
1702
|
-
* 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.
|
|
1703
|
-
*/
|
|
1704
|
-
cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
|
|
1705
|
-
|
|
1706
|
-
/**
|
|
1707
|
-
* 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.
|
|
1708
|
-
*/
|
|
1709
|
-
ends_at?: Line.EndsAt;
|
|
1710
|
-
|
|
1711
|
-
/**
|
|
1712
|
-
* The ID of an existing line on the quote.
|
|
1713
|
-
*/
|
|
1714
|
-
id?: string;
|
|
1715
|
-
|
|
1716
|
-
/**
|
|
1717
|
-
* 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.
|
|
1718
|
-
*/
|
|
1719
|
-
proration_behavior?: Line.ProrationBehavior;
|
|
1720
|
-
|
|
1721
|
-
/**
|
|
1722
|
-
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
1723
|
-
*/
|
|
1724
|
-
set_pause_collection?: Line.SetPauseCollection;
|
|
1725
|
-
|
|
1726
|
-
/**
|
|
1727
|
-
* Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
|
1728
|
-
*/
|
|
1729
|
-
set_schedule_end?: Line.SetScheduleEnd;
|
|
1730
|
-
|
|
1731
|
-
/**
|
|
1732
|
-
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
1733
|
-
*/
|
|
1734
|
-
starts_at?: Line.StartsAt;
|
|
1735
|
-
|
|
1736
|
-
/**
|
|
1737
|
-
* Settings related to subscription trials.
|
|
1738
|
-
*/
|
|
1739
|
-
trial_settings?: Line.TrialSettings;
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
namespace Line {
|
|
1743
|
-
interface Action {
|
|
1744
|
-
/**
|
|
1745
|
-
* Details for the `add_discount` type.
|
|
1746
|
-
*/
|
|
1747
|
-
add_discount?: Action.AddDiscount;
|
|
1748
|
-
|
|
1749
|
-
/**
|
|
1750
|
-
* Details for the `add_item` type.
|
|
1751
|
-
*/
|
|
1752
|
-
add_item?: Action.AddItem;
|
|
1753
|
-
|
|
1754
|
-
/**
|
|
1755
|
-
* Details for the `add_metadata` type: specify a hash of key-value pairs.
|
|
1756
|
-
*/
|
|
1757
|
-
add_metadata?: {
|
|
1758
|
-
[key: string]: string;
|
|
1759
|
-
};
|
|
1760
|
-
|
|
1761
|
-
/**
|
|
1762
|
-
* Details for the `remove_discount` type.
|
|
1763
|
-
*/
|
|
1764
|
-
remove_discount?: Action.RemoveDiscount;
|
|
1765
|
-
|
|
1766
|
-
/**
|
|
1767
|
-
* Details for the `remove_item` type.
|
|
1768
|
-
*/
|
|
1769
|
-
remove_item?: Action.RemoveItem;
|
|
1770
|
-
|
|
1771
|
-
/**
|
|
1772
|
-
* Details for the `remove_metadata` type: specify an array of metadata keys.
|
|
1773
|
-
*/
|
|
1774
|
-
remove_metadata?: Array<string>;
|
|
1775
|
-
|
|
1776
|
-
/**
|
|
1777
|
-
* Details for the `set_discounts` type.
|
|
1778
|
-
*/
|
|
1779
|
-
set_discounts?: Array<Action.SetDiscount>;
|
|
1780
|
-
|
|
1781
|
-
/**
|
|
1782
|
-
* Details for the `set_items` type.
|
|
1783
|
-
*/
|
|
1784
|
-
set_items?: Array<Action.SetItem>;
|
|
1785
|
-
|
|
1786
|
-
/**
|
|
1787
|
-
* Details for the `set_metadata` type: specify an array of key-value pairs.
|
|
1788
|
-
*/
|
|
1789
|
-
set_metadata?: Stripe.Emptyable<{
|
|
1790
|
-
[key: string]: string;
|
|
1791
|
-
}>;
|
|
1792
|
-
|
|
1793
|
-
/**
|
|
1794
|
-
* The type of action the quote line performs.
|
|
1795
|
-
*/
|
|
1796
|
-
type: Action.Type;
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
namespace Action {
|
|
1800
|
-
interface AddDiscount {
|
|
1801
|
-
/**
|
|
1802
|
-
* The coupon code to redeem.
|
|
1803
|
-
*/
|
|
1804
|
-
coupon?: string;
|
|
1805
|
-
|
|
1806
|
-
/**
|
|
1807
|
-
* An ID of an existing discount for a coupon that was already redeemed.
|
|
1808
|
-
*/
|
|
1809
|
-
discount?: string;
|
|
1810
|
-
|
|
1811
|
-
/**
|
|
1812
|
-
* Details to determine how long the discount should be applied for.
|
|
1813
|
-
*/
|
|
1814
|
-
discount_end?: AddDiscount.DiscountEnd;
|
|
1815
|
-
|
|
1816
|
-
/**
|
|
1817
|
-
* 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.
|
|
1818
|
-
*/
|
|
1819
|
-
index?: number;
|
|
1820
|
-
|
|
1821
|
-
/**
|
|
1822
|
-
* The promotion code to redeem.
|
|
1823
|
-
*/
|
|
1824
|
-
promotion_code?: string;
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
namespace AddDiscount {
|
|
1828
|
-
interface DiscountEnd {
|
|
1829
|
-
/**
|
|
1830
|
-
* The type of calculation made to determine when the discount ends.
|
|
1831
|
-
*/
|
|
1832
|
-
type: 'line_ends_at';
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
interface AddItem {
|
|
1837
|
-
/**
|
|
1838
|
-
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
1839
|
-
*/
|
|
1840
|
-
discounts?: Array<AddItem.Discount>;
|
|
1841
|
-
|
|
1842
|
-
/**
|
|
1843
|
-
* 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`.
|
|
1844
|
-
*/
|
|
1845
|
-
metadata?: Stripe.MetadataParam;
|
|
1846
|
-
|
|
1847
|
-
/**
|
|
1848
|
-
* The ID of the price object.
|
|
1849
|
-
*/
|
|
1850
|
-
price: string;
|
|
1851
|
-
|
|
1852
|
-
/**
|
|
1853
|
-
* Quantity for this item.
|
|
1854
|
-
*/
|
|
1855
|
-
quantity?: number;
|
|
1856
|
-
|
|
1857
|
-
/**
|
|
1858
|
-
* 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`.
|
|
1859
|
-
*/
|
|
1860
|
-
tax_rates?: Array<string>;
|
|
1861
|
-
|
|
1862
|
-
/**
|
|
1863
|
-
* Options that configure the trial on the subscription item.
|
|
1864
|
-
*/
|
|
1865
|
-
trial?: AddItem.Trial;
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
|
-
namespace AddItem {
|
|
1869
|
-
interface Discount {
|
|
1870
|
-
/**
|
|
1871
|
-
* ID of the coupon to create a new discount for.
|
|
1872
|
-
*/
|
|
1873
|
-
coupon?: string;
|
|
1874
|
-
|
|
1875
|
-
/**
|
|
1876
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1877
|
-
*/
|
|
1878
|
-
discount?: string;
|
|
1879
|
-
|
|
1880
|
-
/**
|
|
1881
|
-
* Details to determine how long the discount should be applied for.
|
|
1882
|
-
*/
|
|
1883
|
-
discount_end?: Discount.DiscountEnd;
|
|
1884
|
-
|
|
1885
|
-
/**
|
|
1886
|
-
* ID of the promotion code to create a new discount for.
|
|
1887
|
-
*/
|
|
1888
|
-
promotion_code?: string;
|
|
1889
|
-
}
|
|
1890
|
-
|
|
1891
|
-
namespace Discount {
|
|
1892
|
-
interface DiscountEnd {
|
|
1893
|
-
/**
|
|
1894
|
-
* Time span for the redeemed discount.
|
|
1895
|
-
*/
|
|
1896
|
-
duration?: DiscountEnd.Duration;
|
|
1897
|
-
|
|
1898
|
-
/**
|
|
1899
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1900
|
-
*/
|
|
1901
|
-
timestamp?: number;
|
|
1902
|
-
|
|
1903
|
-
/**
|
|
1904
|
-
* The type of calculation made to determine when the discount ends.
|
|
1905
|
-
*/
|
|
1906
|
-
type: DiscountEnd.Type;
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
namespace DiscountEnd {
|
|
1910
|
-
interface Duration {
|
|
1911
|
-
/**
|
|
1912
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1913
|
-
*/
|
|
1914
|
-
interval: Duration.Interval;
|
|
1915
|
-
|
|
1916
|
-
/**
|
|
1917
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1918
|
-
*/
|
|
1919
|
-
interval_count: number;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
namespace Duration {
|
|
1923
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
type Type = 'duration' | 'timestamp';
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
1929
|
-
|
|
1930
|
-
interface Trial {
|
|
1931
|
-
/**
|
|
1932
|
-
* 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.
|
|
1933
|
-
*/
|
|
1934
|
-
converts_to?: Array<string>;
|
|
1935
|
-
|
|
1936
|
-
/**
|
|
1937
|
-
* Determines the type of trial for this item.
|
|
1938
|
-
*/
|
|
1939
|
-
type: Trial.Type;
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
namespace Trial {
|
|
1943
|
-
type Type = 'free' | 'paid';
|
|
1944
|
-
}
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
interface RemoveDiscount {
|
|
1948
|
-
/**
|
|
1949
|
-
* The coupon code to remove from the `discounts` array.
|
|
1950
|
-
*/
|
|
1951
|
-
coupon?: string;
|
|
1952
|
-
|
|
1953
|
-
/**
|
|
1954
|
-
* The ID of a discount to remove from the `discounts` array.
|
|
1955
|
-
*/
|
|
1956
|
-
discount?: string;
|
|
1957
|
-
|
|
1958
|
-
/**
|
|
1959
|
-
* The ID of a promotion code to remove from the `discounts` array.
|
|
1960
|
-
*/
|
|
1961
|
-
promotion_code?: string;
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
interface RemoveItem {
|
|
1965
|
-
/**
|
|
1966
|
-
* ID of a price to remove.
|
|
1967
|
-
*/
|
|
1968
|
-
price: string;
|
|
1969
|
-
}
|
|
1970
|
-
|
|
1971
|
-
interface SetDiscount {
|
|
1972
|
-
/**
|
|
1973
|
-
* The coupon code to replace the `discounts` array with.
|
|
1974
|
-
*/
|
|
1975
|
-
coupon?: string;
|
|
1976
|
-
|
|
1977
|
-
/**
|
|
1978
|
-
* An ID of an existing discount to replace the `discounts` array with.
|
|
1979
|
-
*/
|
|
1980
|
-
discount?: string;
|
|
1981
|
-
|
|
1982
|
-
/**
|
|
1983
|
-
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
1984
|
-
*/
|
|
1985
|
-
promotion_code?: string;
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
interface SetItem {
|
|
1989
|
-
/**
|
|
1990
|
-
* 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`.
|
|
1991
|
-
*/
|
|
1992
|
-
discounts?: Array<SetItem.Discount>;
|
|
1993
|
-
|
|
1994
|
-
/**
|
|
1995
|
-
* 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`.
|
|
1996
|
-
*/
|
|
1997
|
-
metadata?: Stripe.MetadataParam;
|
|
1998
|
-
|
|
1999
|
-
/**
|
|
2000
|
-
* The ID of the price object.
|
|
2001
|
-
*/
|
|
2002
|
-
price: string;
|
|
2003
|
-
|
|
2004
|
-
/**
|
|
2005
|
-
* 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`.
|
|
2006
|
-
*/
|
|
2007
|
-
quantity?: number;
|
|
2008
|
-
|
|
2009
|
-
/**
|
|
2010
|
-
* 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`.
|
|
2011
|
-
*/
|
|
2012
|
-
tax_rates?: Array<string>;
|
|
2013
|
-
|
|
2014
|
-
/**
|
|
2015
|
-
* 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`.
|
|
2016
|
-
*/
|
|
2017
|
-
trial?: SetItem.Trial;
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
namespace SetItem {
|
|
2021
|
-
interface Discount {
|
|
2022
|
-
/**
|
|
2023
|
-
* ID of the coupon to create a new discount for.
|
|
2024
|
-
*/
|
|
2025
|
-
coupon?: string;
|
|
2026
|
-
|
|
2027
|
-
/**
|
|
2028
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2029
|
-
*/
|
|
2030
|
-
discount?: string;
|
|
2031
|
-
|
|
2032
|
-
/**
|
|
2033
|
-
* Details to determine how long the discount should be applied for.
|
|
2034
|
-
*/
|
|
2035
|
-
discount_end?: Discount.DiscountEnd;
|
|
2036
|
-
|
|
2037
|
-
/**
|
|
2038
|
-
* ID of the promotion code to create a new discount for.
|
|
2039
|
-
*/
|
|
2040
|
-
promotion_code?: string;
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
|
-
namespace Discount {
|
|
2044
|
-
interface DiscountEnd {
|
|
2045
|
-
/**
|
|
2046
|
-
* Time span for the redeemed discount.
|
|
2047
|
-
*/
|
|
2048
|
-
duration?: DiscountEnd.Duration;
|
|
2049
|
-
|
|
2050
|
-
/**
|
|
2051
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2052
|
-
*/
|
|
2053
|
-
timestamp?: number;
|
|
2054
|
-
|
|
2055
|
-
/**
|
|
2056
|
-
* The type of calculation made to determine when the discount ends.
|
|
2057
|
-
*/
|
|
2058
|
-
type: DiscountEnd.Type;
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
namespace DiscountEnd {
|
|
2062
|
-
interface Duration {
|
|
2063
|
-
/**
|
|
2064
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2065
|
-
*/
|
|
2066
|
-
interval: Duration.Interval;
|
|
2067
|
-
|
|
2068
|
-
/**
|
|
2069
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2070
|
-
*/
|
|
2071
|
-
interval_count: number;
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
namespace Duration {
|
|
2075
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2076
|
-
}
|
|
2077
|
-
|
|
2078
|
-
type Type = 'duration' | 'timestamp';
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
|
|
2082
|
-
interface Trial {
|
|
2083
|
-
/**
|
|
2084
|
-
* 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.
|
|
2085
|
-
*/
|
|
2086
|
-
converts_to?: Array<string>;
|
|
2087
|
-
|
|
2088
|
-
/**
|
|
2089
|
-
* Determines the type of trial for this item.
|
|
2090
|
-
*/
|
|
2091
|
-
type: Trial.Type;
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
namespace Trial {
|
|
2095
|
-
type Type = 'free' | 'paid';
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
|
-
type Type =
|
|
2100
|
-
| 'add_discount'
|
|
2101
|
-
| 'add_item'
|
|
2102
|
-
| 'add_metadata'
|
|
2103
|
-
| 'clear_discounts'
|
|
2104
|
-
| 'clear_metadata'
|
|
2105
|
-
| 'remove_discount'
|
|
2106
|
-
| 'remove_item'
|
|
2107
|
-
| 'remove_metadata'
|
|
2108
|
-
| 'set_discounts'
|
|
2109
|
-
| 'set_items'
|
|
2110
|
-
| 'set_metadata';
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
interface AppliesTo {
|
|
2114
|
-
/**
|
|
2115
|
-
* 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.
|
|
2116
|
-
*/
|
|
2117
|
-
new_reference?: string;
|
|
2118
|
-
|
|
2119
|
-
/**
|
|
2120
|
-
* The ID of the schedule the line applies to.
|
|
2121
|
-
*/
|
|
2122
|
-
subscription_schedule?: string;
|
|
2123
|
-
|
|
2124
|
-
/**
|
|
2125
|
-
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
2126
|
-
*/
|
|
2127
|
-
type: AppliesTo.Type;
|
|
2128
|
-
}
|
|
2129
|
-
|
|
2130
|
-
namespace AppliesTo {
|
|
2131
|
-
type Type = 'new_reference' | 'subscription_schedule';
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
type BillingCycleAnchor = 'automatic' | 'line_starts_at';
|
|
2135
|
-
|
|
2136
|
-
interface CancelSubscriptionSchedule {
|
|
2137
|
-
/**
|
|
2138
|
-
* Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
|
2139
|
-
*/
|
|
2140
|
-
cancel_at: 'line_starts_at';
|
|
2141
|
-
|
|
2142
|
-
/**
|
|
2143
|
-
* 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`.
|
|
2144
|
-
*/
|
|
2145
|
-
invoice_now?: boolean;
|
|
2146
|
-
|
|
2147
|
-
/**
|
|
2148
|
-
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
|
2149
|
-
*/
|
|
2150
|
-
prorate?: boolean;
|
|
2151
|
-
}
|
|
2152
|
-
|
|
2153
|
-
interface EndsAt {
|
|
2154
|
-
/**
|
|
2155
|
-
* Use the `end` time of a given discount.
|
|
2156
|
-
*/
|
|
2157
|
-
discount_end?: EndsAt.DiscountEnd;
|
|
2158
|
-
|
|
2159
|
-
/**
|
|
2160
|
-
* Time span for the quote line starting from the `starts_at` date.
|
|
2161
|
-
*/
|
|
2162
|
-
duration?: EndsAt.Duration;
|
|
2163
|
-
|
|
2164
|
-
/**
|
|
2165
|
-
* A precise Unix timestamp.
|
|
2166
|
-
*/
|
|
2167
|
-
timestamp?: number;
|
|
2168
|
-
|
|
2169
|
-
/**
|
|
2170
|
-
* Select a way to pass in `ends_at`.
|
|
2171
|
-
*/
|
|
2172
|
-
type: EndsAt.Type;
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2175
|
-
namespace EndsAt {
|
|
2176
|
-
interface DiscountEnd {
|
|
2177
|
-
/**
|
|
2178
|
-
* The ID of a specific discount.
|
|
2179
|
-
*/
|
|
2180
|
-
discount: string;
|
|
2181
|
-
}
|
|
2182
|
-
|
|
2183
|
-
interface Duration {
|
|
2184
|
-
/**
|
|
2185
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2186
|
-
*/
|
|
2187
|
-
interval: Duration.Interval;
|
|
2188
|
-
|
|
2189
|
-
/**
|
|
2190
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2191
|
-
*/
|
|
2192
|
-
interval_count: number;
|
|
2193
|
-
}
|
|
2194
|
-
|
|
2195
|
-
namespace Duration {
|
|
2196
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2197
|
-
}
|
|
2198
|
-
|
|
2199
|
-
type Type =
|
|
2200
|
-
| 'billing_period_end'
|
|
2201
|
-
| 'discount_end'
|
|
2202
|
-
| 'duration'
|
|
2203
|
-
| 'quote_acceptance_date'
|
|
2204
|
-
| 'schedule_end'
|
|
2205
|
-
| 'timestamp'
|
|
2206
|
-
| 'upcoming_invoice';
|
|
2207
|
-
}
|
|
2208
|
-
|
|
2209
|
-
type ProrationBehavior =
|
|
2210
|
-
| 'always_invoice'
|
|
2211
|
-
| 'create_prorations'
|
|
2212
|
-
| 'none';
|
|
2213
|
-
|
|
2214
|
-
interface SetPauseCollection {
|
|
2215
|
-
/**
|
|
2216
|
-
* Details of the pause_collection behavior to apply to the amendment.
|
|
2217
|
-
*/
|
|
2218
|
-
set?: SetPauseCollection.Set;
|
|
2219
|
-
|
|
2220
|
-
/**
|
|
2221
|
-
* Determines the type of the pause_collection amendment.
|
|
2222
|
-
*/
|
|
2223
|
-
type: SetPauseCollection.Type;
|
|
2224
|
-
}
|
|
2225
|
-
|
|
2226
|
-
namespace SetPauseCollection {
|
|
2227
|
-
interface Set {
|
|
2228
|
-
/**
|
|
2229
|
-
* The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
|
|
2230
|
-
*/
|
|
2231
|
-
behavior: Set.Behavior;
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2234
|
-
namespace Set {
|
|
2235
|
-
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2236
|
-
}
|
|
2237
|
-
|
|
2238
|
-
type Type = 'remove' | 'set';
|
|
2239
|
-
}
|
|
2240
|
-
|
|
2241
|
-
type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
|
|
2242
|
-
|
|
2243
|
-
interface StartsAt {
|
|
2244
|
-
/**
|
|
2245
|
-
* Use the `end` time of a given discount.
|
|
2246
|
-
*/
|
|
2247
|
-
discount_end?: StartsAt.DiscountEnd;
|
|
2248
|
-
|
|
2249
|
-
/**
|
|
2250
|
-
* The timestamp the given line ends at.
|
|
2251
|
-
*/
|
|
2252
|
-
line_ends_at?: StartsAt.LineEndsAt;
|
|
2253
|
-
|
|
2254
|
-
/**
|
|
2255
|
-
* A precise Unix timestamp.
|
|
2256
|
-
*/
|
|
2257
|
-
timestamp?: number;
|
|
2258
|
-
|
|
2259
|
-
/**
|
|
2260
|
-
* Select a way to pass in `starts_at`.
|
|
2261
|
-
*/
|
|
2262
|
-
type: StartsAt.Type;
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
namespace StartsAt {
|
|
2266
|
-
interface DiscountEnd {
|
|
2267
|
-
/**
|
|
2268
|
-
* The ID of a specific discount.
|
|
2269
|
-
*/
|
|
2270
|
-
discount: string;
|
|
2271
|
-
}
|
|
2272
|
-
|
|
2273
|
-
interface LineEndsAt {
|
|
2274
|
-
/**
|
|
2275
|
-
* The ID of a quote line.
|
|
2276
|
-
*/
|
|
2277
|
-
id?: string;
|
|
2278
|
-
|
|
2279
|
-
/**
|
|
2280
|
-
* 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.
|
|
2281
|
-
*/
|
|
2282
|
-
index?: number;
|
|
2283
|
-
}
|
|
2284
|
-
|
|
2285
|
-
type Type =
|
|
2286
|
-
| 'discount_end'
|
|
2287
|
-
| 'line_ends_at'
|
|
2288
|
-
| 'now'
|
|
2289
|
-
| 'quote_acceptance_date'
|
|
2290
|
-
| 'schedule_end'
|
|
2291
|
-
| 'timestamp'
|
|
2292
|
-
| 'upcoming_invoice';
|
|
2293
|
-
}
|
|
429
|
+
/**
|
|
430
|
+
* A footer that will be displayed on the quote PDF.
|
|
431
|
+
*/
|
|
432
|
+
footer?: Stripe.Emptyable<string>;
|
|
2294
433
|
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
end_behavior?: TrialSettings.EndBehavior;
|
|
2300
|
-
}
|
|
434
|
+
/**
|
|
435
|
+
* A header that will be displayed on the quote PDF.
|
|
436
|
+
*/
|
|
437
|
+
header?: Stripe.Emptyable<string>;
|
|
2301
438
|
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
*/
|
|
2307
|
-
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2308
|
-
}
|
|
439
|
+
/**
|
|
440
|
+
* All invoices will be billed using the specified settings.
|
|
441
|
+
*/
|
|
442
|
+
invoice_settings?: QuoteUpdateParams.InvoiceSettings;
|
|
2309
443
|
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
}
|
|
444
|
+
/**
|
|
445
|
+
* 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.
|
|
446
|
+
*/
|
|
447
|
+
line_items?: Array<QuoteUpdateParams.LineItem>;
|
|
2315
448
|
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
449
|
+
/**
|
|
450
|
+
* 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`.
|
|
451
|
+
*/
|
|
452
|
+
metadata?: Stripe.MetadataParam;
|
|
2321
453
|
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
454
|
+
/**
|
|
455
|
+
* The account on behalf of which to charge.
|
|
456
|
+
*/
|
|
457
|
+
on_behalf_of?: Stripe.Emptyable<string>;
|
|
2326
458
|
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
459
|
+
/**
|
|
460
|
+
* 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.
|
|
461
|
+
*/
|
|
462
|
+
subscription_data?: QuoteUpdateParams.SubscriptionData;
|
|
2331
463
|
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
464
|
+
/**
|
|
465
|
+
* The data with which to automatically create a Transfer for each of the invoices.
|
|
466
|
+
*/
|
|
467
|
+
transfer_data?: Stripe.Emptyable<QuoteUpdateParams.TransferData>;
|
|
468
|
+
}
|
|
2336
469
|
|
|
470
|
+
namespace QuoteUpdateParams {
|
|
471
|
+
interface AutomaticTax {
|
|
2337
472
|
/**
|
|
2338
|
-
*
|
|
473
|
+
* Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
|
|
2339
474
|
*/
|
|
2340
|
-
|
|
475
|
+
enabled: boolean;
|
|
2341
476
|
|
|
2342
477
|
/**
|
|
2343
|
-
* The
|
|
478
|
+
* 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.
|
|
2344
479
|
*/
|
|
2345
|
-
|
|
480
|
+
liability?: AutomaticTax.Liability;
|
|
2346
481
|
}
|
|
2347
482
|
|
|
2348
|
-
namespace
|
|
2349
|
-
interface
|
|
2350
|
-
/**
|
|
2351
|
-
* ID of the coupon to create a new discount for.
|
|
2352
|
-
*/
|
|
2353
|
-
coupon?: string;
|
|
2354
|
-
|
|
2355
|
-
/**
|
|
2356
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2357
|
-
*/
|
|
2358
|
-
discount?: string;
|
|
2359
|
-
|
|
2360
|
-
/**
|
|
2361
|
-
* Details to determine how long the discount should be applied for.
|
|
2362
|
-
*/
|
|
2363
|
-
discount_end?: Discount.DiscountEnd;
|
|
2364
|
-
|
|
2365
|
-
/**
|
|
2366
|
-
* ID of the promotion code to create a new discount for.
|
|
2367
|
-
*/
|
|
2368
|
-
promotion_code?: string;
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
namespace Discount {
|
|
2372
|
-
interface DiscountEnd {
|
|
2373
|
-
/**
|
|
2374
|
-
* Time span for the redeemed discount.
|
|
2375
|
-
*/
|
|
2376
|
-
duration?: DiscountEnd.Duration;
|
|
2377
|
-
|
|
2378
|
-
/**
|
|
2379
|
-
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2380
|
-
*/
|
|
2381
|
-
timestamp?: number;
|
|
2382
|
-
|
|
2383
|
-
/**
|
|
2384
|
-
* The type of calculation made to determine when the discount ends.
|
|
2385
|
-
*/
|
|
2386
|
-
type: DiscountEnd.Type;
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
namespace DiscountEnd {
|
|
2390
|
-
interface Duration {
|
|
2391
|
-
/**
|
|
2392
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2393
|
-
*/
|
|
2394
|
-
interval: Duration.Interval;
|
|
2395
|
-
|
|
2396
|
-
/**
|
|
2397
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2398
|
-
*/
|
|
2399
|
-
interval_count: number;
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
namespace Duration {
|
|
2403
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2404
|
-
}
|
|
2405
|
-
|
|
2406
|
-
type Type = 'duration' | 'timestamp';
|
|
2407
|
-
}
|
|
2408
|
-
}
|
|
2409
|
-
|
|
2410
|
-
interface PriceData {
|
|
2411
|
-
/**
|
|
2412
|
-
* 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).
|
|
2413
|
-
*/
|
|
2414
|
-
currency: string;
|
|
2415
|
-
|
|
2416
|
-
/**
|
|
2417
|
-
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
2418
|
-
*/
|
|
2419
|
-
product: string;
|
|
2420
|
-
|
|
2421
|
-
/**
|
|
2422
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
2423
|
-
*/
|
|
2424
|
-
recurring?: PriceData.Recurring;
|
|
2425
|
-
|
|
2426
|
-
/**
|
|
2427
|
-
* 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.
|
|
2428
|
-
*/
|
|
2429
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
2430
|
-
|
|
483
|
+
namespace AutomaticTax {
|
|
484
|
+
interface Liability {
|
|
2431
485
|
/**
|
|
2432
|
-
*
|
|
486
|
+
* The connected account being referenced when `type` is `account`.
|
|
2433
487
|
*/
|
|
2434
|
-
|
|
488
|
+
account?: string;
|
|
2435
489
|
|
|
2436
490
|
/**
|
|
2437
|
-
*
|
|
491
|
+
* Type of the account referenced in the request.
|
|
2438
492
|
*/
|
|
2439
|
-
|
|
493
|
+
type: Liability.Type;
|
|
2440
494
|
}
|
|
2441
495
|
|
|
2442
|
-
namespace
|
|
2443
|
-
|
|
2444
|
-
/**
|
|
2445
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
2446
|
-
*/
|
|
2447
|
-
interval: Recurring.Interval;
|
|
2448
|
-
|
|
2449
|
-
/**
|
|
2450
|
-
* 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).
|
|
2451
|
-
*/
|
|
2452
|
-
interval_count?: number;
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
namespace Recurring {
|
|
2456
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2457
|
-
}
|
|
2458
|
-
|
|
2459
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
496
|
+
namespace Liability {
|
|
497
|
+
type Type = 'account' | 'self';
|
|
2460
498
|
}
|
|
2461
499
|
}
|
|
2462
500
|
|
|
2463
|
-
|
|
2464
|
-
/**
|
|
2465
|
-
* Describes the period to bill for upon accepting the quote.
|
|
2466
|
-
*/
|
|
2467
|
-
bill_on_acceptance?: Stripe.Emptyable<
|
|
2468
|
-
SubscriptionData.BillOnAcceptance
|
|
2469
|
-
>;
|
|
2470
|
-
|
|
2471
|
-
/**
|
|
2472
|
-
* 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.
|
|
2473
|
-
*/
|
|
2474
|
-
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
2475
|
-
|
|
2476
|
-
/**
|
|
2477
|
-
* When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
|
2478
|
-
*/
|
|
2479
|
-
billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
|
|
2480
|
-
|
|
2481
|
-
/**
|
|
2482
|
-
* 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.
|
|
2483
|
-
*/
|
|
2484
|
-
description?: Stripe.Emptyable<string>;
|
|
2485
|
-
|
|
2486
|
-
/**
|
|
2487
|
-
* 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.
|
|
2488
|
-
*/
|
|
2489
|
-
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
501
|
+
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
2490
502
|
|
|
503
|
+
interface Discount {
|
|
2491
504
|
/**
|
|
2492
|
-
*
|
|
505
|
+
* ID of the coupon to create a new discount for.
|
|
2493
506
|
*/
|
|
2494
|
-
|
|
507
|
+
coupon?: string;
|
|
2495
508
|
|
|
2496
509
|
/**
|
|
2497
|
-
*
|
|
510
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2498
511
|
*/
|
|
2499
|
-
|
|
512
|
+
discount?: string;
|
|
2500
513
|
|
|
2501
514
|
/**
|
|
2502
|
-
*
|
|
515
|
+
* ID of the promotion code to create a new discount for.
|
|
2503
516
|
*/
|
|
2504
|
-
|
|
517
|
+
promotion_code?: string;
|
|
518
|
+
}
|
|
2505
519
|
|
|
520
|
+
interface InvoiceSettings {
|
|
2506
521
|
/**
|
|
2507
|
-
*
|
|
2508
|
-
*
|
|
2509
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
2510
|
-
*
|
|
2511
|
-
* 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`.
|
|
2512
|
-
*
|
|
2513
|
-
* Prorations can be disabled by passing `none`.
|
|
522
|
+
* 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`.
|
|
2514
523
|
*/
|
|
2515
|
-
|
|
524
|
+
days_until_due?: number;
|
|
2516
525
|
|
|
2517
526
|
/**
|
|
2518
|
-
*
|
|
527
|
+
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
2519
528
|
*/
|
|
2520
|
-
|
|
529
|
+
issuer?: InvoiceSettings.Issuer;
|
|
2521
530
|
}
|
|
2522
531
|
|
|
2523
|
-
namespace
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
interface BillOnAcceptance {
|
|
532
|
+
namespace InvoiceSettings {
|
|
533
|
+
interface Issuer {
|
|
2527
534
|
/**
|
|
2528
|
-
* The
|
|
535
|
+
* The connected account being referenced when `type` is `account`.
|
|
2529
536
|
*/
|
|
2530
|
-
|
|
537
|
+
account?: string;
|
|
2531
538
|
|
|
2532
539
|
/**
|
|
2533
|
-
*
|
|
540
|
+
* Type of the account referenced in the request.
|
|
2534
541
|
*/
|
|
2535
|
-
|
|
2536
|
-
}
|
|
2537
|
-
|
|
2538
|
-
namespace BillOnAcceptance {
|
|
2539
|
-
interface BillFrom {
|
|
2540
|
-
/**
|
|
2541
|
-
* Details of a Quote line to start the bill period from.
|
|
2542
|
-
*/
|
|
2543
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
2544
|
-
|
|
2545
|
-
/**
|
|
2546
|
-
* A precise Unix timestamp.
|
|
2547
|
-
*/
|
|
2548
|
-
timestamp?: number;
|
|
2549
|
-
|
|
2550
|
-
/**
|
|
2551
|
-
* The type of method to specify the `bill_from` time.
|
|
2552
|
-
*/
|
|
2553
|
-
type: BillFrom.Type;
|
|
2554
|
-
}
|
|
2555
|
-
|
|
2556
|
-
namespace BillFrom {
|
|
2557
|
-
interface LineStartsAt {
|
|
2558
|
-
/**
|
|
2559
|
-
* The ID of a quote line.
|
|
2560
|
-
*/
|
|
2561
|
-
id?: string;
|
|
2562
|
-
|
|
2563
|
-
/**
|
|
2564
|
-
* 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.
|
|
2565
|
-
*/
|
|
2566
|
-
index?: number;
|
|
2567
|
-
}
|
|
2568
|
-
|
|
2569
|
-
type Type =
|
|
2570
|
-
| 'line_starts_at'
|
|
2571
|
-
| 'now'
|
|
2572
|
-
| 'pause_collection_start'
|
|
2573
|
-
| 'quote_acceptance_date'
|
|
2574
|
-
| 'timestamp';
|
|
2575
|
-
}
|
|
2576
|
-
|
|
2577
|
-
interface BillUntil {
|
|
2578
|
-
/**
|
|
2579
|
-
* Details of the duration over which to bill.
|
|
2580
|
-
*/
|
|
2581
|
-
duration?: BillUntil.Duration;
|
|
2582
|
-
|
|
2583
|
-
/**
|
|
2584
|
-
* Details of a Quote line item from which to bill until.
|
|
2585
|
-
*/
|
|
2586
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
2587
|
-
|
|
2588
|
-
/**
|
|
2589
|
-
* A precise Unix timestamp.
|
|
2590
|
-
*/
|
|
2591
|
-
timestamp?: number;
|
|
2592
|
-
|
|
2593
|
-
/**
|
|
2594
|
-
* The type of method to specify the `bill_until` time.
|
|
2595
|
-
*/
|
|
2596
|
-
type: BillUntil.Type;
|
|
2597
|
-
}
|
|
2598
|
-
|
|
2599
|
-
namespace BillUntil {
|
|
2600
|
-
interface Duration {
|
|
2601
|
-
/**
|
|
2602
|
-
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2603
|
-
*/
|
|
2604
|
-
interval: Duration.Interval;
|
|
2605
|
-
|
|
2606
|
-
/**
|
|
2607
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2608
|
-
*/
|
|
2609
|
-
interval_count: number;
|
|
2610
|
-
}
|
|
2611
|
-
|
|
2612
|
-
namespace Duration {
|
|
2613
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
interface LineEndsAt {
|
|
2617
|
-
/**
|
|
2618
|
-
* The ID of a quote line.
|
|
2619
|
-
*/
|
|
2620
|
-
id?: string;
|
|
2621
|
-
|
|
2622
|
-
/**
|
|
2623
|
-
* 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.
|
|
2624
|
-
*/
|
|
2625
|
-
index?: number;
|
|
2626
|
-
}
|
|
2627
|
-
|
|
2628
|
-
type Type =
|
|
2629
|
-
| 'duration'
|
|
2630
|
-
| 'line_ends_at'
|
|
2631
|
-
| 'schedule_end'
|
|
2632
|
-
| 'timestamp'
|
|
2633
|
-
| 'upcoming_invoice';
|
|
2634
|
-
}
|
|
542
|
+
type: Issuer.Type;
|
|
2635
543
|
}
|
|
2636
544
|
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
interface Prebilling {
|
|
2640
|
-
/**
|
|
2641
|
-
* This is used to determine the number of billing cycles to prebill.
|
|
2642
|
-
*/
|
|
2643
|
-
iterations: number;
|
|
545
|
+
namespace Issuer {
|
|
546
|
+
type Type = 'account' | 'self';
|
|
2644
547
|
}
|
|
2645
|
-
|
|
2646
|
-
type ProrationBehavior =
|
|
2647
|
-
| 'always_invoice'
|
|
2648
|
-
| 'create_prorations'
|
|
2649
|
-
| 'none';
|
|
2650
548
|
}
|
|
2651
549
|
|
|
2652
|
-
interface
|
|
2653
|
-
/**
|
|
2654
|
-
* Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
2655
|
-
*/
|
|
2656
|
-
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
2657
|
-
|
|
550
|
+
interface LineItem {
|
|
2658
551
|
/**
|
|
2659
|
-
*
|
|
552
|
+
* The discounts applied to this line item.
|
|
2660
553
|
*/
|
|
2661
|
-
|
|
2662
|
-
SubscriptionDataOverride.BillOnAcceptance
|
|
2663
|
-
>;
|
|
554
|
+
discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
|
|
2664
555
|
|
|
2665
556
|
/**
|
|
2666
|
-
*
|
|
557
|
+
* The ID of an existing line item on the quote.
|
|
2667
558
|
*/
|
|
2668
|
-
|
|
559
|
+
id?: string;
|
|
2669
560
|
|
|
2670
561
|
/**
|
|
2671
|
-
* The
|
|
562
|
+
* The ID of the price object. One of `price` or `price_data` is required.
|
|
2672
563
|
*/
|
|
2673
|
-
|
|
564
|
+
price?: string;
|
|
2674
565
|
|
|
2675
566
|
/**
|
|
2676
|
-
*
|
|
567
|
+
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
2677
568
|
*/
|
|
2678
|
-
|
|
569
|
+
price_data?: LineItem.PriceData;
|
|
2679
570
|
|
|
2680
571
|
/**
|
|
2681
|
-
*
|
|
572
|
+
* The quantity of the line item.
|
|
2682
573
|
*/
|
|
2683
|
-
|
|
574
|
+
quantity?: number;
|
|
2684
575
|
|
|
2685
576
|
/**
|
|
2686
|
-
*
|
|
2687
|
-
*
|
|
2688
|
-
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
2689
|
-
*
|
|
2690
|
-
* 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`.
|
|
2691
|
-
*
|
|
2692
|
-
* Prorations can be disabled by passing `none`.
|
|
577
|
+
* 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.
|
|
2693
578
|
*/
|
|
2694
|
-
|
|
579
|
+
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2695
580
|
}
|
|
2696
581
|
|
|
2697
|
-
namespace
|
|
2698
|
-
interface
|
|
582
|
+
namespace LineItem {
|
|
583
|
+
interface Discount {
|
|
2699
584
|
/**
|
|
2700
|
-
*
|
|
585
|
+
* ID of the coupon to create a new discount for.
|
|
2701
586
|
*/
|
|
2702
|
-
|
|
587
|
+
coupon?: string;
|
|
2703
588
|
|
|
2704
589
|
/**
|
|
2705
|
-
*
|
|
590
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2706
591
|
*/
|
|
2707
|
-
|
|
592
|
+
discount?: string;
|
|
2708
593
|
|
|
2709
594
|
/**
|
|
2710
|
-
*
|
|
595
|
+
* ID of the promotion code to create a new discount for.
|
|
2711
596
|
*/
|
|
2712
|
-
|
|
597
|
+
promotion_code?: string;
|
|
2713
598
|
}
|
|
2714
599
|
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
600
|
+
interface PriceData {
|
|
601
|
+
/**
|
|
602
|
+
* 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).
|
|
603
|
+
*/
|
|
604
|
+
currency: string;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
608
|
+
*/
|
|
609
|
+
product: string;
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* The recurring components of a price such as `interval` and `interval_count`.
|
|
613
|
+
*/
|
|
614
|
+
recurring?: PriceData.Recurring;
|
|
2718
615
|
|
|
2719
|
-
|
|
616
|
+
/**
|
|
617
|
+
* 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.
|
|
618
|
+
*/
|
|
619
|
+
tax_behavior?: PriceData.TaxBehavior;
|
|
2720
620
|
|
|
2721
|
-
interface BillOnAcceptance {
|
|
2722
621
|
/**
|
|
2723
|
-
*
|
|
622
|
+
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
2724
623
|
*/
|
|
2725
|
-
|
|
624
|
+
unit_amount?: number;
|
|
2726
625
|
|
|
2727
626
|
/**
|
|
2728
|
-
*
|
|
627
|
+
* 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.
|
|
2729
628
|
*/
|
|
2730
|
-
|
|
629
|
+
unit_amount_decimal?: string;
|
|
2731
630
|
}
|
|
2732
631
|
|
|
2733
|
-
namespace
|
|
2734
|
-
interface
|
|
2735
|
-
/**
|
|
2736
|
-
* Details of a Quote line to start the bill period from.
|
|
2737
|
-
*/
|
|
2738
|
-
line_starts_at?: BillFrom.LineStartsAt;
|
|
2739
|
-
|
|
632
|
+
namespace PriceData {
|
|
633
|
+
interface Recurring {
|
|
2740
634
|
/**
|
|
2741
|
-
*
|
|
635
|
+
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
2742
636
|
*/
|
|
2743
|
-
|
|
637
|
+
interval: Recurring.Interval;
|
|
2744
638
|
|
|
2745
639
|
/**
|
|
2746
|
-
* The
|
|
640
|
+
* 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).
|
|
2747
641
|
*/
|
|
2748
|
-
|
|
642
|
+
interval_count?: number;
|
|
2749
643
|
}
|
|
2750
644
|
|
|
2751
|
-
namespace
|
|
2752
|
-
|
|
2753
|
-
/**
|
|
2754
|
-
* The ID of a quote line.
|
|
2755
|
-
*/
|
|
2756
|
-
id?: string;
|
|
2757
|
-
|
|
2758
|
-
/**
|
|
2759
|
-
* 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.
|
|
2760
|
-
*/
|
|
2761
|
-
index?: number;
|
|
2762
|
-
}
|
|
2763
|
-
|
|
2764
|
-
type Type =
|
|
2765
|
-
| 'line_starts_at'
|
|
2766
|
-
| 'now'
|
|
2767
|
-
| 'pause_collection_start'
|
|
2768
|
-
| 'quote_acceptance_date'
|
|
2769
|
-
| 'timestamp';
|
|
645
|
+
namespace Recurring {
|
|
646
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2770
647
|
}
|
|
2771
648
|
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
*/
|
|
2776
|
-
duration?: BillUntil.Duration;
|
|
2777
|
-
|
|
2778
|
-
/**
|
|
2779
|
-
* Details of a Quote line item from which to bill until.
|
|
2780
|
-
*/
|
|
2781
|
-
line_ends_at?: BillUntil.LineEndsAt;
|
|
2782
|
-
|
|
2783
|
-
/**
|
|
2784
|
-
* A precise Unix timestamp.
|
|
2785
|
-
*/
|
|
2786
|
-
timestamp?: number;
|
|
649
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
650
|
+
}
|
|
651
|
+
}
|
|
2787
652
|
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
653
|
+
interface SubscriptionData {
|
|
654
|
+
/**
|
|
655
|
+
* 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.
|
|
656
|
+
*/
|
|
657
|
+
description?: Stripe.Emptyable<string>;
|
|
2793
658
|
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
*/
|
|
2799
|
-
interval: Duration.Interval;
|
|
2800
|
-
|
|
2801
|
-
/**
|
|
2802
|
-
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2803
|
-
*/
|
|
2804
|
-
interval_count: number;
|
|
2805
|
-
}
|
|
2806
|
-
|
|
2807
|
-
namespace Duration {
|
|
2808
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2809
|
-
}
|
|
2810
|
-
|
|
2811
|
-
interface LineEndsAt {
|
|
2812
|
-
/**
|
|
2813
|
-
* The ID of a quote line.
|
|
2814
|
-
*/
|
|
2815
|
-
id?: string;
|
|
2816
|
-
|
|
2817
|
-
/**
|
|
2818
|
-
* 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.
|
|
2819
|
-
*/
|
|
2820
|
-
index?: number;
|
|
2821
|
-
}
|
|
2822
|
-
|
|
2823
|
-
type Type =
|
|
2824
|
-
| 'duration'
|
|
2825
|
-
| 'line_ends_at'
|
|
2826
|
-
| 'schedule_end'
|
|
2827
|
-
| 'timestamp'
|
|
2828
|
-
| 'upcoming_invoice';
|
|
2829
|
-
}
|
|
2830
|
-
}
|
|
659
|
+
/**
|
|
660
|
+
* 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.
|
|
661
|
+
*/
|
|
662
|
+
effective_date?: Stripe.Emptyable<'current_period_end' | number>;
|
|
2831
663
|
|
|
2832
|
-
|
|
664
|
+
/**
|
|
665
|
+
* 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.
|
|
666
|
+
*/
|
|
667
|
+
metadata?: Stripe.MetadataParam;
|
|
2833
668
|
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
669
|
+
/**
|
|
670
|
+
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
671
|
+
*/
|
|
672
|
+
trial_period_days?: Stripe.Emptyable<number>;
|
|
2838
673
|
}
|
|
2839
674
|
|
|
2840
675
|
interface TransferData {
|
|
@@ -2861,21 +696,11 @@ declare module 'stripe' {
|
|
|
2861
696
|
*/
|
|
2862
697
|
customer?: string;
|
|
2863
698
|
|
|
2864
|
-
/**
|
|
2865
|
-
* The ID of the account whose quotes will be retrieved.
|
|
2866
|
-
*/
|
|
2867
|
-
customer_account?: string;
|
|
2868
|
-
|
|
2869
699
|
/**
|
|
2870
700
|
* Specifies which fields in the response should be expanded.
|
|
2871
701
|
*/
|
|
2872
702
|
expand?: Array<string>;
|
|
2873
703
|
|
|
2874
|
-
/**
|
|
2875
|
-
* The subscription which the quote updates.
|
|
2876
|
-
*/
|
|
2877
|
-
from_subscription?: string;
|
|
2878
|
-
|
|
2879
704
|
/**
|
|
2880
705
|
* The status of the quote.
|
|
2881
706
|
*/
|
|
@@ -2888,13 +713,7 @@ declare module 'stripe' {
|
|
|
2888
713
|
}
|
|
2889
714
|
|
|
2890
715
|
namespace QuoteListParams {
|
|
2891
|
-
type Status =
|
|
2892
|
-
| 'accepted'
|
|
2893
|
-
| 'accepting'
|
|
2894
|
-
| 'canceled'
|
|
2895
|
-
| 'draft'
|
|
2896
|
-
| 'open'
|
|
2897
|
-
| 'stale';
|
|
716
|
+
type Status = 'accepted' | 'canceled' | 'draft' | 'open';
|
|
2898
717
|
}
|
|
2899
718
|
|
|
2900
719
|
interface QuoteAcceptParams {
|
|
@@ -2923,13 +742,6 @@ declare module 'stripe' {
|
|
|
2923
742
|
expires_at?: number;
|
|
2924
743
|
}
|
|
2925
744
|
|
|
2926
|
-
interface QuoteListPreviewInvoiceLinesParams extends PaginationParams {
|
|
2927
|
-
/**
|
|
2928
|
-
* Specifies which fields in the response should be expanded.
|
|
2929
|
-
*/
|
|
2930
|
-
expand?: Array<string>;
|
|
2931
|
-
}
|
|
2932
|
-
|
|
2933
745
|
interface QuoteListComputedUpfrontLineItemsParams extends PaginationParams {
|
|
2934
746
|
/**
|
|
2935
747
|
* Specifies which fields in the response should be expanded.
|
|
@@ -2944,47 +756,6 @@ declare module 'stripe' {
|
|
|
2944
756
|
expand?: Array<string>;
|
|
2945
757
|
}
|
|
2946
758
|
|
|
2947
|
-
interface QuoteListLinesParams extends PaginationParams {
|
|
2948
|
-
/**
|
|
2949
|
-
* Specifies which fields in the response should be expanded.
|
|
2950
|
-
*/
|
|
2951
|
-
expand?: Array<string>;
|
|
2952
|
-
}
|
|
2953
|
-
|
|
2954
|
-
interface QuoteListPreviewInvoicesParams extends PaginationParams {
|
|
2955
|
-
/**
|
|
2956
|
-
* Specifies which fields in the response should be expanded.
|
|
2957
|
-
*/
|
|
2958
|
-
expand?: Array<string>;
|
|
2959
|
-
}
|
|
2960
|
-
|
|
2961
|
-
interface QuoteListPreviewSubscriptionSchedulesParams
|
|
2962
|
-
extends PaginationParams {
|
|
2963
|
-
/**
|
|
2964
|
-
* Specifies which fields in the response should be expanded.
|
|
2965
|
-
*/
|
|
2966
|
-
expand?: Array<string>;
|
|
2967
|
-
}
|
|
2968
|
-
|
|
2969
|
-
interface QuoteMarkDraftParams {
|
|
2970
|
-
/**
|
|
2971
|
-
* Specifies which fields in the response should be expanded.
|
|
2972
|
-
*/
|
|
2973
|
-
expand?: Array<string>;
|
|
2974
|
-
}
|
|
2975
|
-
|
|
2976
|
-
interface QuoteMarkStaleParams {
|
|
2977
|
-
/**
|
|
2978
|
-
* Specifies which fields in the response should be expanded.
|
|
2979
|
-
*/
|
|
2980
|
-
expand?: Array<string>;
|
|
2981
|
-
|
|
2982
|
-
/**
|
|
2983
|
-
* Reason the Quote is being marked stale.
|
|
2984
|
-
*/
|
|
2985
|
-
reason?: string;
|
|
2986
|
-
}
|
|
2987
|
-
|
|
2988
759
|
interface QuotePdfParams {
|
|
2989
760
|
/**
|
|
2990
761
|
* Specifies which fields in the response should be expanded.
|
|
@@ -2992,13 +763,6 @@ declare module 'stripe' {
|
|
|
2992
763
|
expand?: Array<string>;
|
|
2993
764
|
}
|
|
2994
765
|
|
|
2995
|
-
interface QuoteReestimateParams {
|
|
2996
|
-
/**
|
|
2997
|
-
* Specifies which fields in the response should be expanded.
|
|
2998
|
-
*/
|
|
2999
|
-
expand?: Array<string>;
|
|
3000
|
-
}
|
|
3001
|
-
|
|
3002
766
|
class QuotesResource {
|
|
3003
767
|
/**
|
|
3004
768
|
* 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).
|
|
@@ -3079,21 +843,6 @@ declare module 'stripe' {
|
|
|
3079
843
|
options?: RequestOptions
|
|
3080
844
|
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3081
845
|
|
|
3082
|
-
/**
|
|
3083
|
-
* Preview the invoice line items that would be generated by accepting the quote.
|
|
3084
|
-
*/
|
|
3085
|
-
listPreviewInvoiceLines(
|
|
3086
|
-
quoteId: string,
|
|
3087
|
-
id: string,
|
|
3088
|
-
params?: QuoteListPreviewInvoiceLinesParams,
|
|
3089
|
-
options?: RequestOptions
|
|
3090
|
-
): ApiListPromise<Stripe.InvoiceLineItem>;
|
|
3091
|
-
listPreviewInvoiceLines(
|
|
3092
|
-
quoteId: string,
|
|
3093
|
-
id: string,
|
|
3094
|
-
options?: RequestOptions
|
|
3095
|
-
): ApiListPromise<Stripe.InvoiceLineItem>;
|
|
3096
|
-
|
|
3097
846
|
/**
|
|
3098
847
|
* 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.
|
|
3099
848
|
*/
|
|
@@ -3120,71 +869,6 @@ declare module 'stripe' {
|
|
|
3120
869
|
options?: RequestOptions
|
|
3121
870
|
): ApiListPromise<Stripe.LineItem>;
|
|
3122
871
|
|
|
3123
|
-
/**
|
|
3124
|
-
* 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.
|
|
3125
|
-
*/
|
|
3126
|
-
listLines(
|
|
3127
|
-
id: string,
|
|
3128
|
-
params?: QuoteListLinesParams,
|
|
3129
|
-
options?: RequestOptions
|
|
3130
|
-
): ApiListPromise<Stripe.QuoteLine>;
|
|
3131
|
-
listLines(
|
|
3132
|
-
id: string,
|
|
3133
|
-
options?: RequestOptions
|
|
3134
|
-
): ApiListPromise<Stripe.QuoteLine>;
|
|
3135
|
-
|
|
3136
|
-
/**
|
|
3137
|
-
* Preview the invoices that would be generated by accepting the quote.
|
|
3138
|
-
*/
|
|
3139
|
-
listPreviewInvoices(
|
|
3140
|
-
id: string,
|
|
3141
|
-
params?: QuoteListPreviewInvoicesParams,
|
|
3142
|
-
options?: RequestOptions
|
|
3143
|
-
): ApiListPromise<Stripe.QuotePreviewInvoice>;
|
|
3144
|
-
listPreviewInvoices(
|
|
3145
|
-
id: string,
|
|
3146
|
-
options?: RequestOptions
|
|
3147
|
-
): ApiListPromise<Stripe.QuotePreviewInvoice>;
|
|
3148
|
-
|
|
3149
|
-
/**
|
|
3150
|
-
* Preview the schedules that would be generated by accepting the quote
|
|
3151
|
-
*/
|
|
3152
|
-
listPreviewSubscriptionSchedules(
|
|
3153
|
-
id: string,
|
|
3154
|
-
params?: QuoteListPreviewSubscriptionSchedulesParams,
|
|
3155
|
-
options?: RequestOptions
|
|
3156
|
-
): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
|
|
3157
|
-
listPreviewSubscriptionSchedules(
|
|
3158
|
-
id: string,
|
|
3159
|
-
options?: RequestOptions
|
|
3160
|
-
): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
|
|
3161
|
-
|
|
3162
|
-
/**
|
|
3163
|
-
* Converts a stale quote to draft.
|
|
3164
|
-
*/
|
|
3165
|
-
markDraft(
|
|
3166
|
-
id: string,
|
|
3167
|
-
params?: QuoteMarkDraftParams,
|
|
3168
|
-
options?: RequestOptions
|
|
3169
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3170
|
-
markDraft(
|
|
3171
|
-
id: string,
|
|
3172
|
-
options?: RequestOptions
|
|
3173
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3174
|
-
|
|
3175
|
-
/**
|
|
3176
|
-
* Converts a draft or open quote to stale.
|
|
3177
|
-
*/
|
|
3178
|
-
markStale(
|
|
3179
|
-
id: string,
|
|
3180
|
-
params?: QuoteMarkStaleParams,
|
|
3181
|
-
options?: RequestOptions
|
|
3182
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3183
|
-
markStale(
|
|
3184
|
-
id: string,
|
|
3185
|
-
options?: RequestOptions
|
|
3186
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3187
|
-
|
|
3188
872
|
/**
|
|
3189
873
|
* Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
|
3190
874
|
*/
|
|
@@ -3194,19 +878,6 @@ declare module 'stripe' {
|
|
|
3194
878
|
options?: RequestOptions
|
|
3195
879
|
): Promise<StripeStreamResponse>;
|
|
3196
880
|
pdf(id: string, options?: RequestOptions): Promise<StripeStreamResponse>;
|
|
3197
|
-
|
|
3198
|
-
/**
|
|
3199
|
-
* Recompute the upcoming invoice estimate for the quote.
|
|
3200
|
-
*/
|
|
3201
|
-
reestimate(
|
|
3202
|
-
id: string,
|
|
3203
|
-
params?: QuoteReestimateParams,
|
|
3204
|
-
options?: RequestOptions
|
|
3205
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3206
|
-
reestimate(
|
|
3207
|
-
id: string,
|
|
3208
|
-
options?: RequestOptions
|
|
3209
|
-
): Promise<Stripe.Response<Stripe.Quote>>;
|
|
3210
881
|
}
|
|
3211
882
|
}
|
|
3212
883
|
}
|