stripe 22.2.0 → 22.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1753 -76
- package/README.md +57 -65
- package/VERSION +1 -1
- package/cjs/Error.d.ts +50 -0
- package/cjs/Error.js +125 -1
- package/cjs/Error.js.map +1 -1
- package/cjs/RequestSender.d.ts +0 -1
- package/cjs/RequestSender.js +0 -8
- package/cjs/RequestSender.js.map +1 -1
- package/cjs/StripeEventNotificationHandler.d.ts +19 -0
- package/cjs/StripeEventNotificationHandler.js +148 -0
- package/cjs/StripeEventNotificationHandler.js.map +1 -0
- package/cjs/Types.d.ts +4 -2
- package/cjs/Types.js.map +1 -1
- package/cjs/apiVersion.d.ts +1 -2
- package/cjs/apiVersion.js +2 -3
- package/cjs/apiVersion.js.map +1 -1
- package/cjs/resources/AccountLinks.d.ts +1 -1
- package/cjs/resources/AccountNotices.d.ts +140 -0
- package/cjs/resources/AccountNotices.js +29 -0
- package/cjs/resources/AccountNotices.js.map +1 -0
- package/cjs/resources/AccountSessions.d.ts +262 -0
- package/cjs/resources/AccountSessions.js.map +1 -1
- package/cjs/resources/Accounts.d.ts +827 -3
- package/cjs/resources/Accounts.js +14 -0
- package/cjs/resources/Accounts.js.map +1 -1
- package/cjs/resources/Balance.d.ts +67 -0
- package/cjs/resources/BankAccounts.d.ts +2 -2
- package/cjs/resources/Billing/AlertTriggereds.d.ts +2 -1
- package/cjs/resources/Billing/Analytics/MeterUsage.d.ts +84 -0
- package/cjs/resources/Billing/Analytics/MeterUsage.js +15 -0
- package/cjs/resources/Billing/Analytics/MeterUsage.js.map +1 -0
- package/cjs/resources/Billing/Analytics/MeterUsageRows.d.ts +32 -0
- package/cjs/resources/Billing/Analytics/MeterUsageRows.js +4 -0
- package/cjs/resources/Billing/Analytics/MeterUsageRows.js.map +1 -0
- package/cjs/resources/Billing/Analytics/index.d.ts +15 -0
- package/cjs/resources/Billing/Analytics/index.js +13 -0
- package/cjs/resources/Billing/Analytics/index.js.map +1 -0
- package/cjs/resources/Billing/index.d.ts +3 -0
- package/cjs/resources/Billing/index.js +2 -0
- package/cjs/resources/Billing/index.js.map +1 -1
- package/cjs/resources/Capabilities.d.ts +2 -2
- package/cjs/resources/Capital/FinancingOffers.d.ts +191 -0
- package/cjs/resources/Capital/FinancingOffers.js +30 -0
- package/cjs/resources/Capital/FinancingOffers.js.map +1 -0
- package/cjs/resources/Capital/FinancingSummary.d.ts +98 -0
- package/cjs/resources/Capital/FinancingSummary.js +15 -0
- package/cjs/resources/Capital/FinancingSummary.js.map +1 -0
- package/cjs/resources/Capital/FinancingTransactions.d.ts +143 -0
- package/cjs/resources/Capital/FinancingTransactions.js +24 -0
- package/cjs/resources/Capital/FinancingTransactions.js.map +1 -0
- package/cjs/resources/Capital/index.d.ts +25 -0
- package/cjs/resources/Capital/index.js +17 -0
- package/cjs/resources/Capital/index.js.map +1 -0
- package/cjs/resources/Cards.d.ts +4 -0
- package/cjs/resources/Charges.d.ts +3064 -70
- package/cjs/resources/Checkout/Sessions.d.ts +390 -4
- package/cjs/resources/ConfirmationTokens.d.ts +67 -1
- package/cjs/resources/Coupons.d.ts +53 -0
- package/cjs/resources/Coupons.js +13 -0
- package/cjs/resources/Coupons.js.map +1 -1
- package/cjs/resources/CreditNoteLineItems.d.ts +15 -1
- package/cjs/resources/CreditNotes.d.ts +1 -1
- package/cjs/resources/CustomerSessions.d.ts +68 -0
- package/cjs/resources/Customers.d.ts +7 -1
- package/cjs/resources/Customers.js +14 -0
- package/cjs/resources/Customers.js.map +1 -1
- package/cjs/resources/Disputes.d.ts +29 -0
- package/cjs/resources/Events.d.ts +547 -2
- package/cjs/resources/ExternalAccounts.d.ts +212 -1
- package/cjs/resources/ExternalAccounts.js +44 -0
- package/cjs/resources/ExternalAccounts.js.map +1 -1
- package/cjs/resources/FinancialConnections/AccountInferredBalances.d.ts +24 -0
- package/cjs/resources/FinancialConnections/AccountInferredBalances.js +4 -0
- package/cjs/resources/FinancialConnections/AccountInferredBalances.js.map +1 -0
- package/cjs/resources/FinancialConnections/Accounts.d.ts +74 -4
- package/cjs/resources/FinancialConnections/Accounts.js +8 -0
- package/cjs/resources/FinancialConnections/Accounts.js.map +1 -1
- package/cjs/resources/FinancialConnections/Authorizations.d.ts +87 -0
- package/cjs/resources/FinancialConnections/Authorizations.js +15 -0
- package/cjs/resources/FinancialConnections/Authorizations.js.map +1 -0
- package/cjs/resources/FinancialConnections/Institutions.d.ts +101 -0
- package/cjs/resources/FinancialConnections/Institutions.js +23 -0
- package/cjs/resources/FinancialConnections/Institutions.js.map +1 -0
- package/cjs/resources/FinancialConnections/Sessions.d.ts +155 -7
- package/cjs/resources/FinancialConnections/index.d.ts +21 -6
- package/cjs/resources/FinancialConnections/index.js +4 -0
- package/cjs/resources/FinancialConnections/index.js.map +1 -1
- package/cjs/resources/FxQuotes.d.ts +212 -0
- package/cjs/resources/FxQuotes.js +29 -0
- package/cjs/resources/FxQuotes.js.map +1 -0
- package/cjs/resources/InvoiceItems.d.ts +85 -0
- package/cjs/resources/InvoiceItems.js.map +1 -1
- package/cjs/resources/InvoiceLineItems.d.ts +40 -2
- package/cjs/resources/Invoices.d.ts +1337 -19
- package/cjs/resources/Invoices.js +41 -0
- package/cjs/resources/Invoices.js.map +1 -1
- package/cjs/resources/Issuing/Cardholders.d.ts +2 -1
- package/cjs/resources/Issuing/CreditUnderwritingRecords.d.ts +640 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +47 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js.map +1 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.d.ts +95 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +23 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js.map +1 -0
- package/cjs/resources/Issuing/FraudLiabilityDebits.d.ts +68 -0
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +23 -0
- package/cjs/resources/Issuing/FraudLiabilityDebits.js.map +1 -0
- package/cjs/resources/Issuing/Settlements.d.ts +85 -0
- package/cjs/resources/Issuing/Settlements.js +4 -0
- package/cjs/resources/Issuing/Settlements.js.map +1 -0
- package/cjs/resources/Issuing/Transactions.d.ts +9 -0
- package/cjs/resources/Issuing/Transactions.js.map +1 -1
- package/cjs/resources/Issuing/index.d.ts +47 -22
- package/cjs/resources/Issuing/index.js +6 -0
- package/cjs/resources/Issuing/index.js.map +1 -1
- package/cjs/resources/LineItems.d.ts +29 -2
- package/cjs/resources/Mandates.d.ts +33 -1
- package/cjs/resources/Mandates.js +8 -0
- package/cjs/resources/Mandates.js.map +1 -1
- package/cjs/resources/Margins.d.ts +115 -0
- package/cjs/resources/Margins.js +35 -0
- package/cjs/resources/Margins.js.map +1 -0
- package/cjs/resources/Orders.d.ts +4693 -0
- package/cjs/resources/Orders.js +457 -0
- package/cjs/resources/Orders.js.map +1 -0
- package/cjs/resources/PaymentAttemptRecords.d.ts +82 -0
- package/cjs/resources/PaymentIntents.d.ts +13239 -2321
- package/cjs/resources/PaymentIntents.js +27 -0
- package/cjs/resources/PaymentIntents.js.map +1 -1
- package/cjs/resources/PaymentLinks.d.ts +19 -3
- package/cjs/resources/PaymentMethodConfigurations.d.ts +350 -0
- package/cjs/resources/PaymentMethods.d.ts +151 -3
- package/cjs/resources/PaymentMethods.js.map +1 -1
- package/cjs/resources/PaymentRecords.d.ts +82 -0
- package/cjs/resources/Persons.d.ts +2 -2
- package/cjs/resources/Plans.d.ts +16 -0
- package/cjs/resources/Prices.d.ts +52 -0
- package/cjs/resources/Privacy/RedactionJobValidationErrors.d.ts +37 -0
- package/cjs/resources/Privacy/RedactionJobValidationErrors.js +4 -0
- package/cjs/resources/Privacy/RedactionJobValidationErrors.js.map +1 -0
- package/cjs/resources/Privacy/RedactionJobs.d.ts +229 -0
- package/cjs/resources/Privacy/RedactionJobs.js +73 -0
- package/cjs/resources/Privacy/RedactionJobs.js.map +1 -0
- package/cjs/resources/Privacy/index.d.ts +22 -0
- package/cjs/resources/Privacy/index.js +13 -0
- package/cjs/resources/Privacy/index.js.map +1 -0
- package/cjs/resources/ProductCatalog/TrialOffers.d.ts +127 -0
- package/cjs/resources/ProductCatalog/TrialOffers.js +15 -0
- package/cjs/resources/ProductCatalog/TrialOffers.js.map +1 -0
- package/cjs/resources/ProductCatalog/index.d.ts +12 -0
- package/cjs/resources/ProductCatalog/index.js +13 -0
- package/cjs/resources/ProductCatalog/index.js.map +1 -0
- package/cjs/resources/Products.d.ts +42 -0
- package/cjs/resources/PromotionCodes.d.ts +12 -0
- package/cjs/resources/PromotionCodes.js +27 -0
- package/cjs/resources/PromotionCodes.js.map +1 -1
- package/cjs/resources/QuoteLines.d.ts +507 -0
- package/cjs/resources/QuoteLines.js +4 -0
- package/cjs/resources/QuoteLines.js.map +1 -0
- package/cjs/resources/QuotePreviewInvoices.d.ts +1120 -0
- package/cjs/resources/QuotePreviewInvoices.js +4 -0
- package/cjs/resources/QuotePreviewInvoices.js.map +1 -0
- package/cjs/resources/QuotePreviewSubscriptionSchedules.d.ts +737 -0
- package/cjs/resources/QuotePreviewSubscriptionSchedules.js +4 -0
- package/cjs/resources/QuotePreviewSubscriptionSchedules.js.map +1 -0
- package/cjs/resources/Quotes.d.ts +2266 -57
- package/cjs/resources/Quotes.js +1184 -16
- package/cjs/resources/Quotes.js.map +1 -1
- package/cjs/resources/Radar/PaymentEvaluations.d.ts +1 -1
- package/cjs/resources/Refunds.d.ts +11 -0
- package/cjs/resources/Reserve/Holds.d.ts +53 -1
- package/cjs/resources/Reserve/Holds.js +19 -0
- package/cjs/resources/Reserve/Holds.js.map +1 -1
- package/cjs/resources/Reserve/Plans.d.ts +16 -0
- package/cjs/resources/Reserve/Plans.js +11 -0
- package/cjs/resources/Reserve/Plans.js.map +1 -1
- package/cjs/resources/Reserve/Releases.d.ts +41 -1
- package/cjs/resources/Reserve/Releases.js +19 -0
- package/cjs/resources/Reserve/Releases.js.map +1 -1
- package/cjs/resources/Reserve/index.d.ts +14 -3
- package/cjs/resources/Reserve/index.js +10 -2
- package/cjs/resources/Reserve/index.js.map +1 -1
- package/cjs/resources/SetupAttempts.d.ts +26 -1
- package/cjs/resources/SetupIntents.d.ts +330 -11
- package/cjs/resources/SharedPayment/GrantedTokens.d.ts +1095 -0
- package/cjs/resources/SharedPayment/GrantedTokens.js +15 -0
- package/cjs/resources/SharedPayment/GrantedTokens.js.map +1 -0
- package/cjs/resources/SharedPayment/IssuedTokens.d.ts +308 -0
- package/cjs/resources/SharedPayment/IssuedTokens.js +27 -0
- package/cjs/resources/SharedPayment/IssuedTokens.js.map +1 -0
- package/cjs/resources/SharedPayment/index.d.ts +19 -0
- package/cjs/resources/SharedPayment/index.js +15 -0
- package/cjs/resources/SharedPayment/index.js.map +1 -0
- package/cjs/resources/Sources.d.ts +16 -1
- package/cjs/resources/SubscriptionItems.d.ts +143 -0
- package/cjs/resources/SubscriptionSchedules.d.ts +1152 -0
- package/cjs/resources/SubscriptionSchedules.js +6 -0
- package/cjs/resources/SubscriptionSchedules.js.map +1 -1
- package/cjs/resources/Subscriptions.d.ts +571 -6
- package/cjs/resources/Subscriptions.js +145 -0
- package/cjs/resources/Subscriptions.js.map +1 -1
- package/cjs/resources/Tax/CalculationLineItems.d.ts +6 -2
- package/cjs/resources/Tax/Calculations.d.ts +7 -3
- package/cjs/resources/Tax/Forms.d.ts +230 -0
- package/cjs/resources/Tax/Forms.js +32 -0
- package/cjs/resources/Tax/Forms.js.map +1 -0
- package/cjs/resources/Tax/Locations.d.ts +108 -0
- package/cjs/resources/Tax/Locations.js +33 -0
- package/cjs/resources/Tax/Locations.js.map +1 -0
- package/cjs/resources/Tax/Registrations.d.ts +138 -2
- package/cjs/resources/Tax/Transactions.d.ts +2 -2
- package/cjs/resources/Tax/index.d.ts +27 -13
- package/cjs/resources/Tax/index.js +4 -0
- package/cjs/resources/Tax/index.js.map +1 -1
- package/cjs/resources/TaxCodes.d.ts +15 -0
- package/cjs/resources/Terminal/Configurations.d.ts +27 -0
- package/cjs/resources/Terminal/ReaderCollectedData.d.ts +52 -0
- package/cjs/resources/Terminal/ReaderCollectedData.js +15 -0
- package/cjs/resources/Terminal/ReaderCollectedData.js.map +1 -0
- package/cjs/resources/Terminal/Readers.d.ts +17 -1
- package/cjs/resources/Terminal/index.d.ts +5 -0
- package/cjs/resources/Terminal/index.js +2 -0
- package/cjs/resources/Terminal/index.js.map +1 -1
- package/cjs/resources/TestHelpers/ConfirmationTokens.d.ts +78 -1
- package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.d.ts +68 -0
- package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.js +21 -0
- package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.js.map +1 -0
- package/cjs/resources/TestHelpers/SharedPayment/index.d.ts +8 -0
- package/cjs/resources/TestHelpers/SharedPayment/index.js +13 -0
- package/cjs/resources/TestHelpers/SharedPayment/index.js.map +1 -0
- package/cjs/resources/TestHelpers/Treasury/ReceivedCredits.d.ts +22 -0
- package/cjs/resources/TestHelpers/Treasury/ReceivedDebits.d.ts +22 -0
- package/cjs/resources/TestHelpers/index.d.ts +3 -0
- package/cjs/resources/TestHelpers/index.js +6 -4
- package/cjs/resources/TestHelpers/index.js.map +1 -1
- package/cjs/resources/Transfers.d.ts +8 -0
- package/cjs/resources/Treasury/FinancialAccountFeatures.d.ts +5 -0
- package/cjs/resources/Treasury/FinancialAccounts.d.ts +34 -1
- package/cjs/resources/Treasury/OutboundPayments.d.ts +8 -0
- package/cjs/resources/Treasury/OutboundTransfers.d.ts +44 -0
- package/cjs/resources/Treasury/ReceivedCredits.d.ts +22 -0
- package/cjs/resources/Treasury/ReceivedDebits.d.ts +26 -0
- package/cjs/resources/V2/Billing/BillSettingVersions.d.ts +75 -0
- package/cjs/resources/V2/Billing/BillSettingVersions.js +4 -0
- package/cjs/resources/V2/Billing/BillSettingVersions.js.map +1 -0
- package/cjs/resources/V2/Billing/BillSettings/Versions.d.ts +33 -0
- package/cjs/resources/V2/Billing/BillSettings/Versions.js +23 -0
- package/cjs/resources/V2/Billing/BillSettings/Versions.js.map +1 -0
- package/cjs/resources/V2/Billing/BillSettings.d.ts +284 -0
- package/cjs/resources/V2/Billing/BillSettings.js +41 -0
- package/cjs/resources/V2/Billing/BillSettings.js.map +1 -0
- package/cjs/resources/V2/Billing/Cadences.d.ts +951 -0
- package/cjs/resources/V2/Billing/Cadences.js +198 -0
- package/cjs/resources/V2/Billing/Cadences.js.map +1 -0
- package/cjs/resources/V2/Billing/CollectionSettingVersions.d.ts +240 -0
- package/cjs/resources/V2/Billing/CollectionSettingVersions.js +4 -0
- package/cjs/resources/V2/Billing/CollectionSettingVersions.js.map +1 -0
- package/cjs/resources/V2/Billing/CollectionSettings/Versions.d.ts +33 -0
- package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +70 -0
- package/cjs/resources/V2/Billing/CollectionSettings/Versions.js.map +1 -0
- package/cjs/resources/V2/Billing/CollectionSettings.d.ts +779 -0
- package/cjs/resources/V2/Billing/CollectionSettings.js +166 -0
- package/cjs/resources/V2/Billing/CollectionSettings.js.map +1 -0
- package/cjs/resources/V2/Billing/Profiles.d.ts +166 -0
- package/cjs/resources/V2/Billing/Profiles.js +35 -0
- package/cjs/resources/V2/Billing/Profiles.js.map +1 -0
- package/cjs/resources/V2/Billing/index.d.ts +45 -6
- package/cjs/resources/V2/Billing/index.js +8 -0
- package/cjs/resources/V2/Billing/index.js.map +1 -1
- package/cjs/resources/V2/Core/AccountLinks.d.ts +4 -4
- package/cjs/resources/V2/Core/AccountTokens.d.ts +10 -0
- package/cjs/resources/V2/Core/Accounts.d.ts +1177 -167
- package/cjs/resources/V2/Core/BatchJobs.d.ts +373 -0
- package/cjs/resources/V2/Core/BatchJobs.js +225 -0
- package/cjs/resources/V2/Core/BatchJobs.js.map +1 -0
- package/cjs/resources/V2/Core/Events.d.ts +1123 -4
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.d.ts +285 -0
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +54 -0
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js.map +1 -0
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.d.ts +254 -0
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +62 -0
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js.map +1 -0
- package/cjs/resources/V2/Core/Vault/index.d.ts +28 -0
- package/cjs/resources/V2/Core/Vault/index.js +15 -0
- package/cjs/resources/V2/Core/Vault/index.js.map +1 -0
- package/cjs/resources/V2/Core/index.d.ts +19 -9
- package/cjs/resources/V2/Core/index.js +4 -0
- package/cjs/resources/V2/Core/index.js.map +1 -1
- package/cjs/resources/V2/Data/Reporting/QueryRuns.d.ts +156 -0
- package/cjs/resources/V2/Data/Reporting/QueryRuns.js +46 -0
- package/cjs/resources/V2/Data/Reporting/QueryRuns.js.map +1 -0
- package/cjs/resources/V2/Data/Reporting/index.d.ts +13 -0
- package/cjs/resources/V2/Data/Reporting/index.js +13 -0
- package/cjs/resources/V2/Data/Reporting/index.js.map +1 -0
- package/cjs/resources/V2/Data/index.d.ts +10 -0
- package/cjs/resources/V2/Data/index.js +13 -0
- package/cjs/resources/V2/Data/index.js.map +1 -0
- package/cjs/resources/V2/EventMisc.d.ts +0 -0
- package/cjs/resources/V2/EventMisc.js +2 -0
- package/cjs/resources/V2/EventMisc.js.map +1 -0
- package/cjs/resources/V2/Extend/WorkflowRuns.d.ts +166 -0
- package/cjs/resources/V2/Extend/WorkflowRuns.js +23 -0
- package/cjs/resources/V2/Extend/WorkflowRuns.js.map +1 -0
- package/cjs/resources/V2/Extend/Workflows.d.ts +123 -0
- package/cjs/resources/V2/Extend/Workflows.js +30 -0
- package/cjs/resources/V2/Extend/Workflows.js.map +1 -0
- package/cjs/resources/V2/Extend/index.d.ts +20 -0
- package/cjs/resources/V2/Extend/index.js +15 -0
- package/cjs/resources/V2/Extend/index.js.map +1 -0
- package/cjs/resources/V2/FinancialAddressCreditSimulations.d.ts +14 -0
- package/cjs/resources/V2/FinancialAddressCreditSimulations.js +4 -0
- package/cjs/resources/V2/FinancialAddressCreditSimulations.js.map +1 -0
- package/cjs/resources/V2/FinancialAddressGeneratedMicrodeposits.d.ts +19 -0
- package/cjs/resources/V2/FinancialAddressGeneratedMicrodeposits.js +4 -0
- package/cjs/resources/V2/FinancialAddressGeneratedMicrodeposits.js.map +1 -0
- package/cjs/resources/V2/Iam/ActivityLogs.d.ts +214 -0
- package/cjs/resources/V2/Iam/ActivityLogs.js +23 -0
- package/cjs/resources/V2/Iam/ActivityLogs.js.map +1 -0
- package/cjs/resources/V2/Iam/index.d.ts +13 -0
- package/cjs/resources/V2/Iam/index.js +13 -0
- package/cjs/resources/V2/Iam/index.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/Adjustments.d.ts +135 -0
- package/cjs/resources/V2/MoneyManagement/Adjustments.js +23 -0
- package/cjs/resources/V2/MoneyManagement/Adjustments.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.d.ts +244 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +44 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.d.ts +215 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +31 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.d.ts +254 -0
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +30 -0
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +212 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +22 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.d.ts +388 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +41 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.d.ts +300 -0
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +49 -0
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.d.ts +330 -0
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +39 -0
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.d.ts +243 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +44 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +96 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +17 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.d.ts +295 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +23 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.d.ts +161 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +23 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.d.ts +165 -0
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +23 -0
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/Transactions.d.ts +196 -0
- package/cjs/resources/V2/MoneyManagement/Transactions.js +23 -0
- package/cjs/resources/V2/MoneyManagement/Transactions.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/index.d.ts +104 -0
- package/cjs/resources/V2/MoneyManagement/index.js +39 -0
- package/cjs/resources/V2/MoneyManagement/index.js.map +1 -0
- package/cjs/resources/V2/Network/BusinessProfiles.d.ts +96 -0
- package/cjs/resources/V2/Network/BusinessProfiles.js +21 -0
- package/cjs/resources/V2/Network/BusinessProfiles.js.map +1 -0
- package/cjs/resources/V2/Network/index.d.ts +13 -0
- package/cjs/resources/V2/Network/index.js +13 -0
- package/cjs/resources/V2/Network/index.js.map +1 -0
- package/cjs/resources/V2/OrchestratedCommerce/Agreements.d.ts +147 -0
- package/cjs/resources/V2/OrchestratedCommerce/Agreements.js +41 -0
- package/cjs/resources/V2/OrchestratedCommerce/Agreements.js.map +1 -0
- package/cjs/resources/V2/OrchestratedCommerce/index.d.ts +16 -0
- package/cjs/resources/V2/OrchestratedCommerce/index.js +13 -0
- package/cjs/resources/V2/OrchestratedCommerce/index.js.map +1 -0
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.d.ts +44 -0
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +23 -0
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js.map +1 -0
- package/cjs/resources/V2/TestHelpers/index.d.ts +8 -0
- package/cjs/resources/V2/TestHelpers/index.js +13 -0
- package/cjs/resources/V2/TestHelpers/index.js.map +1 -0
- package/cjs/resources/V2/index.d.ts +27 -0
- package/cjs/resources/V2/index.js +14 -0
- package/cjs/resources/V2/index.js.map +1 -1
- package/cjs/resources/WebhookEndpoints.d.ts +2 -2
- package/cjs/resources.d.ts +10 -0
- package/cjs/resources.js +146 -10
- package/cjs/resources.js.map +1 -1
- package/cjs/stripe.core.d.ts +61 -24
- package/cjs/stripe.core.js +55 -31
- package/cjs/stripe.core.js.map +1 -1
- package/esm/Error.d.ts +50 -0
- package/esm/Error.js +109 -0
- package/esm/Error.js.map +1 -1
- package/esm/RequestSender.d.ts +0 -1
- package/esm/RequestSender.js +0 -8
- package/esm/RequestSender.js.map +1 -1
- package/esm/StripeEventNotificationHandler.d.ts +19 -0
- package/esm/StripeEventNotificationHandler.js +144 -0
- package/esm/StripeEventNotificationHandler.js.map +1 -0
- package/esm/Types.d.ts +4 -2
- package/esm/Types.js.map +1 -1
- package/esm/apiVersion.d.ts +1 -2
- package/esm/apiVersion.js +1 -2
- package/esm/apiVersion.js.map +1 -1
- package/esm/resources/AccountLinks.d.ts +1 -1
- package/esm/resources/AccountNotices.d.ts +140 -0
- package/esm/resources/AccountNotices.js +25 -0
- package/esm/resources/AccountNotices.js.map +1 -0
- package/esm/resources/AccountSessions.d.ts +262 -0
- package/esm/resources/AccountSessions.js.map +1 -1
- package/esm/resources/Accounts.d.ts +827 -3
- package/esm/resources/Accounts.js +14 -0
- package/esm/resources/Accounts.js.map +1 -1
- package/esm/resources/Balance.d.ts +67 -0
- package/esm/resources/BankAccounts.d.ts +2 -2
- package/esm/resources/Billing/AlertTriggereds.d.ts +2 -1
- package/esm/resources/Billing/Analytics/MeterUsage.d.ts +84 -0
- package/esm/resources/Billing/Analytics/MeterUsage.js +11 -0
- package/esm/resources/Billing/Analytics/MeterUsage.js.map +1 -0
- package/esm/resources/Billing/Analytics/MeterUsageRows.d.ts +32 -0
- package/esm/resources/Billing/Analytics/MeterUsageRows.js +3 -0
- package/esm/resources/Billing/Analytics/MeterUsageRows.js.map +1 -0
- package/esm/resources/Billing/Analytics/index.d.ts +15 -0
- package/esm/resources/Billing/Analytics/index.js +9 -0
- package/esm/resources/Billing/Analytics/index.js.map +1 -0
- package/esm/resources/Billing/index.d.ts +3 -0
- package/esm/resources/Billing/index.js +2 -0
- package/esm/resources/Billing/index.js.map +1 -1
- package/esm/resources/Capabilities.d.ts +2 -2
- package/esm/resources/Capital/FinancingOffers.d.ts +191 -0
- package/esm/resources/Capital/FinancingOffers.js +26 -0
- package/esm/resources/Capital/FinancingOffers.js.map +1 -0
- package/esm/resources/Capital/FinancingSummary.d.ts +98 -0
- package/esm/resources/Capital/FinancingSummary.js +11 -0
- package/esm/resources/Capital/FinancingSummary.js.map +1 -0
- package/esm/resources/Capital/FinancingTransactions.d.ts +143 -0
- package/esm/resources/Capital/FinancingTransactions.js +20 -0
- package/esm/resources/Capital/FinancingTransactions.js.map +1 -0
- package/esm/resources/Capital/index.d.ts +25 -0
- package/esm/resources/Capital/index.js +13 -0
- package/esm/resources/Capital/index.js.map +1 -0
- package/esm/resources/Cards.d.ts +4 -0
- package/esm/resources/Charges.d.ts +3064 -70
- package/esm/resources/Checkout/Sessions.d.ts +390 -4
- package/esm/resources/ConfirmationTokens.d.ts +67 -1
- package/esm/resources/Coupons.d.ts +53 -0
- package/esm/resources/Coupons.js +13 -0
- package/esm/resources/Coupons.js.map +1 -1
- package/esm/resources/CreditNoteLineItems.d.ts +15 -1
- package/esm/resources/CreditNotes.d.ts +1 -1
- package/esm/resources/CustomerSessions.d.ts +68 -0
- package/esm/resources/Customers.d.ts +7 -1
- package/esm/resources/Customers.js +14 -0
- package/esm/resources/Customers.js.map +1 -1
- package/esm/resources/Disputes.d.ts +29 -0
- package/esm/resources/Events.d.ts +547 -2
- package/esm/resources/ExternalAccounts.d.ts +212 -1
- package/esm/resources/ExternalAccounts.js +42 -1
- package/esm/resources/ExternalAccounts.js.map +1 -1
- package/esm/resources/FinancialConnections/AccountInferredBalances.d.ts +24 -0
- package/esm/resources/FinancialConnections/AccountInferredBalances.js +3 -0
- package/esm/resources/FinancialConnections/AccountInferredBalances.js.map +1 -0
- package/esm/resources/FinancialConnections/Accounts.d.ts +74 -4
- package/esm/resources/FinancialConnections/Accounts.js +8 -0
- package/esm/resources/FinancialConnections/Accounts.js.map +1 -1
- package/esm/resources/FinancialConnections/Authorizations.d.ts +87 -0
- package/esm/resources/FinancialConnections/Authorizations.js +11 -0
- package/esm/resources/FinancialConnections/Authorizations.js.map +1 -0
- package/esm/resources/FinancialConnections/Institutions.d.ts +101 -0
- package/esm/resources/FinancialConnections/Institutions.js +19 -0
- package/esm/resources/FinancialConnections/Institutions.js.map +1 -0
- package/esm/resources/FinancialConnections/Sessions.d.ts +155 -7
- package/esm/resources/FinancialConnections/index.d.ts +21 -6
- package/esm/resources/FinancialConnections/index.js +4 -0
- package/esm/resources/FinancialConnections/index.js.map +1 -1
- package/esm/resources/FxQuotes.d.ts +212 -0
- package/esm/resources/FxQuotes.js +25 -0
- package/esm/resources/FxQuotes.js.map +1 -0
- package/esm/resources/InvoiceItems.d.ts +85 -0
- package/esm/resources/InvoiceItems.js.map +1 -1
- package/esm/resources/InvoiceLineItems.d.ts +40 -2
- package/esm/resources/Invoices.d.ts +1337 -19
- package/esm/resources/Invoices.js +41 -0
- package/esm/resources/Invoices.js.map +1 -1
- package/esm/resources/Issuing/Cardholders.d.ts +2 -1
- package/esm/resources/Issuing/CreditUnderwritingRecords.d.ts +640 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +43 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js.map +1 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.d.ts +95 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js +19 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js.map +1 -0
- package/esm/resources/Issuing/FraudLiabilityDebits.d.ts +68 -0
- package/esm/resources/Issuing/FraudLiabilityDebits.js +19 -0
- package/esm/resources/Issuing/FraudLiabilityDebits.js.map +1 -0
- package/esm/resources/Issuing/Settlements.d.ts +85 -0
- package/esm/resources/Issuing/Settlements.js +3 -0
- package/esm/resources/Issuing/Settlements.js.map +1 -0
- package/esm/resources/Issuing/Transactions.d.ts +9 -0
- package/esm/resources/Issuing/Transactions.js.map +1 -1
- package/esm/resources/Issuing/index.d.ts +47 -22
- package/esm/resources/Issuing/index.js +6 -0
- package/esm/resources/Issuing/index.js.map +1 -1
- package/esm/resources/LineItems.d.ts +29 -2
- package/esm/resources/Mandates.d.ts +33 -1
- package/esm/resources/Mandates.js +8 -0
- package/esm/resources/Mandates.js.map +1 -1
- package/esm/resources/Margins.d.ts +115 -0
- package/esm/resources/Margins.js +31 -0
- package/esm/resources/Margins.js.map +1 -0
- package/esm/resources/Orders.d.ts +4693 -0
- package/esm/resources/Orders.js +453 -0
- package/esm/resources/Orders.js.map +1 -0
- package/esm/resources/PaymentAttemptRecords.d.ts +82 -0
- package/esm/resources/PaymentIntents.d.ts +13239 -2321
- package/esm/resources/PaymentIntents.js +27 -0
- package/esm/resources/PaymentIntents.js.map +1 -1
- package/esm/resources/PaymentLinks.d.ts +19 -3
- package/esm/resources/PaymentMethodConfigurations.d.ts +350 -0
- package/esm/resources/PaymentMethods.d.ts +151 -3
- package/esm/resources/PaymentMethods.js.map +1 -1
- package/esm/resources/PaymentRecords.d.ts +82 -0
- package/esm/resources/Persons.d.ts +2 -2
- package/esm/resources/Plans.d.ts +16 -0
- package/esm/resources/Prices.d.ts +52 -0
- package/esm/resources/Privacy/RedactionJobValidationErrors.d.ts +37 -0
- package/esm/resources/Privacy/RedactionJobValidationErrors.js +3 -0
- package/esm/resources/Privacy/RedactionJobValidationErrors.js.map +1 -0
- package/esm/resources/Privacy/RedactionJobs.d.ts +229 -0
- package/esm/resources/Privacy/RedactionJobs.js +69 -0
- package/esm/resources/Privacy/RedactionJobs.js.map +1 -0
- package/esm/resources/Privacy/index.d.ts +22 -0
- package/esm/resources/Privacy/index.js +9 -0
- package/esm/resources/Privacy/index.js.map +1 -0
- package/esm/resources/ProductCatalog/TrialOffers.d.ts +127 -0
- package/esm/resources/ProductCatalog/TrialOffers.js +11 -0
- package/esm/resources/ProductCatalog/TrialOffers.js.map +1 -0
- package/esm/resources/ProductCatalog/index.d.ts +12 -0
- package/esm/resources/ProductCatalog/index.js +9 -0
- package/esm/resources/ProductCatalog/index.js.map +1 -0
- package/esm/resources/Products.d.ts +42 -0
- package/esm/resources/PromotionCodes.d.ts +12 -0
- package/esm/resources/PromotionCodes.js +27 -0
- package/esm/resources/PromotionCodes.js.map +1 -1
- package/esm/resources/QuoteLines.d.ts +507 -0
- package/esm/resources/QuoteLines.js +3 -0
- package/esm/resources/QuoteLines.js.map +1 -0
- package/esm/resources/QuotePreviewInvoices.d.ts +1120 -0
- package/esm/resources/QuotePreviewInvoices.js +3 -0
- package/esm/resources/QuotePreviewInvoices.js.map +1 -0
- package/esm/resources/QuotePreviewSubscriptionSchedules.d.ts +737 -0
- package/esm/resources/QuotePreviewSubscriptionSchedules.js +3 -0
- package/esm/resources/QuotePreviewSubscriptionSchedules.js.map +1 -0
- package/esm/resources/Quotes.d.ts +2266 -57
- package/esm/resources/Quotes.js +1184 -16
- package/esm/resources/Quotes.js.map +1 -1
- package/esm/resources/Radar/PaymentEvaluations.d.ts +1 -1
- package/esm/resources/Refunds.d.ts +11 -0
- package/esm/resources/Reserve/Holds.d.ts +53 -1
- package/esm/resources/Reserve/Holds.js +17 -1
- package/esm/resources/Reserve/Holds.js.map +1 -1
- package/esm/resources/Reserve/Plans.d.ts +16 -0
- package/esm/resources/Reserve/Plans.js +9 -1
- package/esm/resources/Reserve/Plans.js.map +1 -1
- package/esm/resources/Reserve/Releases.d.ts +41 -1
- package/esm/resources/Reserve/Releases.js +17 -1
- package/esm/resources/Reserve/Releases.js.map +1 -1
- package/esm/resources/Reserve/index.d.ts +14 -3
- package/esm/resources/Reserve/index.js +10 -2
- package/esm/resources/Reserve/index.js.map +1 -1
- package/esm/resources/SetupAttempts.d.ts +26 -1
- package/esm/resources/SetupIntents.d.ts +330 -11
- package/esm/resources/SharedPayment/GrantedTokens.d.ts +1095 -0
- package/esm/resources/SharedPayment/GrantedTokens.js +11 -0
- package/esm/resources/SharedPayment/GrantedTokens.js.map +1 -0
- package/esm/resources/SharedPayment/IssuedTokens.d.ts +308 -0
- package/esm/resources/SharedPayment/IssuedTokens.js +23 -0
- package/esm/resources/SharedPayment/IssuedTokens.js.map +1 -0
- package/esm/resources/SharedPayment/index.d.ts +19 -0
- package/esm/resources/SharedPayment/index.js +11 -0
- package/esm/resources/SharedPayment/index.js.map +1 -0
- package/esm/resources/Sources.d.ts +16 -1
- package/esm/resources/SubscriptionItems.d.ts +143 -0
- package/esm/resources/SubscriptionSchedules.d.ts +1152 -0
- package/esm/resources/SubscriptionSchedules.js +6 -0
- package/esm/resources/SubscriptionSchedules.js.map +1 -1
- package/esm/resources/Subscriptions.d.ts +571 -6
- package/esm/resources/Subscriptions.js +145 -0
- package/esm/resources/Subscriptions.js.map +1 -1
- package/esm/resources/Tax/CalculationLineItems.d.ts +6 -2
- package/esm/resources/Tax/Calculations.d.ts +7 -3
- package/esm/resources/Tax/Forms.d.ts +230 -0
- package/esm/resources/Tax/Forms.js +28 -0
- package/esm/resources/Tax/Forms.js.map +1 -0
- package/esm/resources/Tax/Locations.d.ts +108 -0
- package/esm/resources/Tax/Locations.js +29 -0
- package/esm/resources/Tax/Locations.js.map +1 -0
- package/esm/resources/Tax/Registrations.d.ts +138 -2
- package/esm/resources/Tax/Transactions.d.ts +2 -2
- package/esm/resources/Tax/index.d.ts +27 -13
- package/esm/resources/Tax/index.js +4 -0
- package/esm/resources/Tax/index.js.map +1 -1
- package/esm/resources/TaxCodes.d.ts +15 -0
- package/esm/resources/Terminal/Configurations.d.ts +27 -0
- package/esm/resources/Terminal/ReaderCollectedData.d.ts +52 -0
- package/esm/resources/Terminal/ReaderCollectedData.js +11 -0
- package/esm/resources/Terminal/ReaderCollectedData.js.map +1 -0
- package/esm/resources/Terminal/Readers.d.ts +17 -1
- package/esm/resources/Terminal/index.d.ts +5 -0
- package/esm/resources/Terminal/index.js +2 -0
- package/esm/resources/Terminal/index.js.map +1 -1
- package/esm/resources/TestHelpers/ConfirmationTokens.d.ts +78 -1
- package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.d.ts +68 -0
- package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.js +17 -0
- package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.js.map +1 -0
- package/esm/resources/TestHelpers/SharedPayment/index.d.ts +8 -0
- package/esm/resources/TestHelpers/SharedPayment/index.js +9 -0
- package/esm/resources/TestHelpers/SharedPayment/index.js.map +1 -0
- package/esm/resources/TestHelpers/Treasury/ReceivedCredits.d.ts +22 -0
- package/esm/resources/TestHelpers/Treasury/ReceivedDebits.d.ts +22 -0
- package/esm/resources/TestHelpers/index.d.ts +3 -0
- package/esm/resources/TestHelpers/index.js +2 -0
- package/esm/resources/TestHelpers/index.js.map +1 -1
- package/esm/resources/Transfers.d.ts +8 -0
- package/esm/resources/Treasury/FinancialAccountFeatures.d.ts +5 -0
- package/esm/resources/Treasury/FinancialAccounts.d.ts +34 -1
- package/esm/resources/Treasury/OutboundPayments.d.ts +8 -0
- package/esm/resources/Treasury/OutboundTransfers.d.ts +44 -0
- package/esm/resources/Treasury/ReceivedCredits.d.ts +22 -0
- package/esm/resources/Treasury/ReceivedDebits.d.ts +26 -0
- package/esm/resources/V2/Billing/BillSettingVersions.d.ts +75 -0
- package/esm/resources/V2/Billing/BillSettingVersions.js +3 -0
- package/esm/resources/V2/Billing/BillSettingVersions.js.map +1 -0
- package/esm/resources/V2/Billing/BillSettings/Versions.d.ts +33 -0
- package/esm/resources/V2/Billing/BillSettings/Versions.js +19 -0
- package/esm/resources/V2/Billing/BillSettings/Versions.js.map +1 -0
- package/esm/resources/V2/Billing/BillSettings.d.ts +284 -0
- package/esm/resources/V2/Billing/BillSettings.js +37 -0
- package/esm/resources/V2/Billing/BillSettings.js.map +1 -0
- package/esm/resources/V2/Billing/Cadences.d.ts +951 -0
- package/esm/resources/V2/Billing/Cadences.js +194 -0
- package/esm/resources/V2/Billing/Cadences.js.map +1 -0
- package/esm/resources/V2/Billing/CollectionSettingVersions.d.ts +240 -0
- package/esm/resources/V2/Billing/CollectionSettingVersions.js +3 -0
- package/esm/resources/V2/Billing/CollectionSettingVersions.js.map +1 -0
- package/esm/resources/V2/Billing/CollectionSettings/Versions.d.ts +33 -0
- package/esm/resources/V2/Billing/CollectionSettings/Versions.js +66 -0
- package/esm/resources/V2/Billing/CollectionSettings/Versions.js.map +1 -0
- package/esm/resources/V2/Billing/CollectionSettings.d.ts +779 -0
- package/esm/resources/V2/Billing/CollectionSettings.js +162 -0
- package/esm/resources/V2/Billing/CollectionSettings.js.map +1 -0
- package/esm/resources/V2/Billing/Profiles.d.ts +166 -0
- package/esm/resources/V2/Billing/Profiles.js +31 -0
- package/esm/resources/V2/Billing/Profiles.js.map +1 -0
- package/esm/resources/V2/Billing/index.d.ts +45 -6
- package/esm/resources/V2/Billing/index.js +8 -0
- package/esm/resources/V2/Billing/index.js.map +1 -1
- package/esm/resources/V2/Core/AccountLinks.d.ts +4 -4
- package/esm/resources/V2/Core/AccountTokens.d.ts +10 -0
- package/esm/resources/V2/Core/Accounts.d.ts +1177 -167
- package/esm/resources/V2/Core/BatchJobs.d.ts +373 -0
- package/esm/resources/V2/Core/BatchJobs.js +221 -0
- package/esm/resources/V2/Core/BatchJobs.js.map +1 -0
- package/esm/resources/V2/Core/Events.d.ts +1123 -4
- package/esm/resources/V2/Core/Vault/GbBankAccounts.d.ts +285 -0
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js +50 -0
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js.map +1 -0
- package/esm/resources/V2/Core/Vault/UsBankAccounts.d.ts +254 -0
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js +58 -0
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js.map +1 -0
- package/esm/resources/V2/Core/Vault/index.d.ts +28 -0
- package/esm/resources/V2/Core/Vault/index.js +11 -0
- package/esm/resources/V2/Core/Vault/index.js.map +1 -0
- package/esm/resources/V2/Core/index.d.ts +19 -9
- package/esm/resources/V2/Core/index.js +4 -0
- package/esm/resources/V2/Core/index.js.map +1 -1
- package/esm/resources/V2/Data/Reporting/QueryRuns.d.ts +156 -0
- package/esm/resources/V2/Data/Reporting/QueryRuns.js +42 -0
- package/esm/resources/V2/Data/Reporting/QueryRuns.js.map +1 -0
- package/esm/resources/V2/Data/Reporting/index.d.ts +13 -0
- package/esm/resources/V2/Data/Reporting/index.js +9 -0
- package/esm/resources/V2/Data/Reporting/index.js.map +1 -0
- package/esm/resources/V2/Data/index.d.ts +10 -0
- package/esm/resources/V2/Data/index.js +9 -0
- package/esm/resources/V2/Data/index.js.map +1 -0
- package/esm/resources/V2/EventMisc.d.ts +0 -0
- package/esm/resources/V2/EventMisc.js +2 -0
- package/esm/resources/V2/EventMisc.js.map +1 -0
- package/esm/resources/V2/Extend/WorkflowRuns.d.ts +166 -0
- package/esm/resources/V2/Extend/WorkflowRuns.js +19 -0
- package/esm/resources/V2/Extend/WorkflowRuns.js.map +1 -0
- package/esm/resources/V2/Extend/Workflows.d.ts +123 -0
- package/esm/resources/V2/Extend/Workflows.js +26 -0
- package/esm/resources/V2/Extend/Workflows.js.map +1 -0
- package/esm/resources/V2/Extend/index.d.ts +20 -0
- package/esm/resources/V2/Extend/index.js +11 -0
- package/esm/resources/V2/Extend/index.js.map +1 -0
- package/esm/resources/V2/FinancialAddressCreditSimulations.d.ts +14 -0
- package/esm/resources/V2/FinancialAddressCreditSimulations.js +3 -0
- package/esm/resources/V2/FinancialAddressCreditSimulations.js.map +1 -0
- package/esm/resources/V2/FinancialAddressGeneratedMicrodeposits.d.ts +19 -0
- package/esm/resources/V2/FinancialAddressGeneratedMicrodeposits.js +3 -0
- package/esm/resources/V2/FinancialAddressGeneratedMicrodeposits.js.map +1 -0
- package/esm/resources/V2/Iam/ActivityLogs.d.ts +214 -0
- package/esm/resources/V2/Iam/ActivityLogs.js +19 -0
- package/esm/resources/V2/Iam/ActivityLogs.js.map +1 -0
- package/esm/resources/V2/Iam/index.d.ts +13 -0
- package/esm/resources/V2/Iam/index.js +9 -0
- package/esm/resources/V2/Iam/index.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/Adjustments.d.ts +135 -0
- package/esm/resources/V2/MoneyManagement/Adjustments.js +19 -0
- package/esm/resources/V2/MoneyManagement/Adjustments.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.d.ts +244 -0
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +40 -0
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.d.ts +215 -0
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +27 -0
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/InboundTransfers.d.ts +254 -0
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js +26 -0
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +212 -0
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +18 -0
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/OutboundPayments.d.ts +388 -0
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js +37 -0
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.d.ts +300 -0
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +45 -0
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.d.ts +330 -0
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +35 -0
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethods.d.ts +243 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +40 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +96 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +13 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.d.ts +295 -0
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +19 -0
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.d.ts +161 -0
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +19 -0
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/TransactionEntries.d.ts +165 -0
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js +19 -0
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/Transactions.d.ts +196 -0
- package/esm/resources/V2/MoneyManagement/Transactions.js +19 -0
- package/esm/resources/V2/MoneyManagement/Transactions.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/index.d.ts +104 -0
- package/esm/resources/V2/MoneyManagement/index.js +35 -0
- package/esm/resources/V2/MoneyManagement/index.js.map +1 -0
- package/esm/resources/V2/Network/BusinessProfiles.d.ts +96 -0
- package/esm/resources/V2/Network/BusinessProfiles.js +17 -0
- package/esm/resources/V2/Network/BusinessProfiles.js.map +1 -0
- package/esm/resources/V2/Network/index.d.ts +13 -0
- package/esm/resources/V2/Network/index.js +9 -0
- package/esm/resources/V2/Network/index.js.map +1 -0
- package/esm/resources/V2/OrchestratedCommerce/Agreements.d.ts +147 -0
- package/esm/resources/V2/OrchestratedCommerce/Agreements.js +37 -0
- package/esm/resources/V2/OrchestratedCommerce/Agreements.js.map +1 -0
- package/esm/resources/V2/OrchestratedCommerce/index.d.ts +16 -0
- package/esm/resources/V2/OrchestratedCommerce/index.js +9 -0
- package/esm/resources/V2/OrchestratedCommerce/index.js.map +1 -0
- package/esm/resources/V2/TestHelpers/FinancialAddresses.d.ts +44 -0
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +19 -0
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js.map +1 -0
- package/esm/resources/V2/TestHelpers/index.d.ts +8 -0
- package/esm/resources/V2/TestHelpers/index.js +9 -0
- package/esm/resources/V2/TestHelpers/index.js.map +1 -0
- package/esm/resources/V2/index.d.ts +27 -0
- package/esm/resources/V2/index.js +14 -0
- package/esm/resources/V2/index.js.map +1 -1
- package/esm/resources/WebhookEndpoints.d.ts +2 -2
- package/esm/resources.d.ts +10 -0
- package/esm/resources.js +131 -0
- package/esm/resources.js.map +1 -1
- package/esm/stripe.core.d.ts +61 -24
- package/esm/stripe.core.js +25 -1
- package/esm/stripe.core.js.map +1 -1
- package/esm/stripe.esm.node.d.ts +62 -24
- package/esm/stripe.esm.node.js +25 -1
- package/esm/stripe.esm.node.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { StripeResource } from '../StripeResource.js';
|
|
2
|
+
import { InvoiceLineItem } from './InvoiceLineItems.js';
|
|
2
3
|
import { LineItem } from './LineItems.js';
|
|
4
|
+
import { QuoteLine } from './QuoteLines.js';
|
|
5
|
+
import { QuotePreviewInvoice } from './QuotePreviewInvoices.js';
|
|
6
|
+
import { QuotePreviewSubscriptionSchedule } from './QuotePreviewSubscriptionSchedules.js';
|
|
3
7
|
import { Discount } from './Discounts.js';
|
|
4
8
|
import { Application, DeletedApplication } from './Applications.js';
|
|
5
9
|
import { Customer, DeletedCustomer } from './Customers.js';
|
|
@@ -40,18 +44,46 @@ export declare class QuoteResource extends StripeResource {
|
|
|
40
44
|
* Finalizes the quote.
|
|
41
45
|
*/
|
|
42
46
|
finalizeQuote(id: string, params?: QuoteFinalizeQuoteParams, options?: RequestOptions): Promise<Response<Quote>>;
|
|
47
|
+
/**
|
|
48
|
+
* Converts a stale quote to draft.
|
|
49
|
+
*/
|
|
50
|
+
markDraft(id: string, params?: QuoteMarkDraftParams, options?: RequestOptions): Promise<Response<Quote>>;
|
|
51
|
+
/**
|
|
52
|
+
* Converts a draft or open quote to stale.
|
|
53
|
+
*/
|
|
54
|
+
markStale(id: string, params?: QuoteMarkStaleParams, options?: RequestOptions): Promise<Response<Quote>>;
|
|
55
|
+
/**
|
|
56
|
+
* Recompute the upcoming invoice estimate for the quote.
|
|
57
|
+
*/
|
|
58
|
+
reestimate(id: string, params?: QuoteReestimateParams, options?: RequestOptions): Promise<Response<Quote>>;
|
|
43
59
|
/**
|
|
44
60
|
* Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
|
|
45
61
|
*/
|
|
46
62
|
pdf(id: string, params?: QuotePdfParams, options?: RequestOptions): Promise<StripeStreamResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Preview the invoice line items that would be generated by accepting the quote.
|
|
65
|
+
*/
|
|
66
|
+
listPreviewInvoiceLines(quoteId: string, id: string, params?: QuoteListPreviewInvoiceLinesParams, options?: RequestOptions): ApiListPromise<InvoiceLineItem>;
|
|
47
67
|
/**
|
|
48
68
|
* 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.
|
|
49
69
|
*/
|
|
50
70
|
listComputedUpfrontLineItems(id: string, params?: QuoteListComputedUpfrontLineItemsParams, options?: RequestOptions): ApiListPromise<LineItem>;
|
|
71
|
+
/**
|
|
72
|
+
* 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.
|
|
73
|
+
*/
|
|
74
|
+
listLines(id: string, params?: QuoteListLinesParams, options?: RequestOptions): ApiListPromise<QuoteLine>;
|
|
51
75
|
/**
|
|
52
76
|
* When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
|
53
77
|
*/
|
|
54
78
|
listLineItems(id: string, params?: QuoteListLineItemsParams, options?: RequestOptions): ApiListPromise<LineItem>;
|
|
79
|
+
/**
|
|
80
|
+
* Preview the invoices that would be generated by accepting the quote.
|
|
81
|
+
*/
|
|
82
|
+
listPreviewInvoices(id: string, params?: QuoteListPreviewInvoicesParams, options?: RequestOptions): ApiListPromise<QuotePreviewInvoice>;
|
|
83
|
+
/**
|
|
84
|
+
* Preview the schedules that would be generated by accepting the quote
|
|
85
|
+
*/
|
|
86
|
+
listPreviewSubscriptionSchedules(id: string, params?: QuoteListPreviewSubscriptionSchedulesParams, options?: RequestOptions): ApiListPromise<QuotePreviewSubscriptionSchedule>;
|
|
55
87
|
}
|
|
56
88
|
export interface Quote {
|
|
57
89
|
/**
|
|
@@ -62,6 +94,10 @@ export interface Quote {
|
|
|
62
94
|
* String representing the object's type. Objects of the same type share the same value.
|
|
63
95
|
*/
|
|
64
96
|
object: 'quote';
|
|
97
|
+
/**
|
|
98
|
+
* Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
99
|
+
*/
|
|
100
|
+
allow_backdated_lines?: boolean | null;
|
|
65
101
|
/**
|
|
66
102
|
* Total before any discounts or taxes are applied.
|
|
67
103
|
*/
|
|
@@ -141,6 +177,10 @@ export interface Quote {
|
|
|
141
177
|
* A list of items the customer is being quoted for.
|
|
142
178
|
*/
|
|
143
179
|
line_items?: ApiList<LineItem>;
|
|
180
|
+
/**
|
|
181
|
+
* 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.
|
|
182
|
+
*/
|
|
183
|
+
lines?: Array<string> | null;
|
|
144
184
|
/**
|
|
145
185
|
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
|
|
146
186
|
*/
|
|
@@ -161,16 +201,28 @@ export interface Quote {
|
|
|
161
201
|
* The status of the quote.
|
|
162
202
|
*/
|
|
163
203
|
status: Quote.Status;
|
|
204
|
+
/**
|
|
205
|
+
* Details on when and why a quote has been marked as stale or canceled.
|
|
206
|
+
*/
|
|
207
|
+
status_details?: Quote.StatusDetails | null;
|
|
164
208
|
status_transitions: Quote.StatusTransitions;
|
|
165
209
|
/**
|
|
166
210
|
* The subscription that was created or updated from this quote.
|
|
167
211
|
*/
|
|
168
212
|
subscription: string | Subscription | null;
|
|
169
213
|
subscription_data: Quote.SubscriptionData;
|
|
214
|
+
/**
|
|
215
|
+
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
216
|
+
*/
|
|
217
|
+
subscription_data_overrides?: Array<Quote.SubscriptionDataOverride> | null;
|
|
170
218
|
/**
|
|
171
219
|
* The subscription schedule that was created or updated from this quote.
|
|
172
220
|
*/
|
|
173
221
|
subscription_schedule: string | SubscriptionSchedule | null;
|
|
222
|
+
/**
|
|
223
|
+
* The subscription schedules that were created or updated from this quote.
|
|
224
|
+
*/
|
|
225
|
+
subscription_schedules?: Array<Quote.SubscriptionSchedule> | null;
|
|
174
226
|
/**
|
|
175
227
|
* ID of the test clock this quote belongs to.
|
|
176
228
|
*/
|
|
@@ -202,10 +254,18 @@ export declare namespace Quote {
|
|
|
202
254
|
}
|
|
203
255
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
204
256
|
interface Computed {
|
|
257
|
+
/**
|
|
258
|
+
* Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
|
|
259
|
+
*/
|
|
260
|
+
last_reestimation_details?: Computed.LastReestimationDetails | null;
|
|
205
261
|
/**
|
|
206
262
|
* The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
|
|
207
263
|
*/
|
|
208
264
|
recurring: Computed.Recurring | null;
|
|
265
|
+
/**
|
|
266
|
+
* The time at which the quote's estimated schedules and upcoming invoices were generated.
|
|
267
|
+
*/
|
|
268
|
+
updated_at?: number | null;
|
|
209
269
|
upfront: Computed.Upfront;
|
|
210
270
|
}
|
|
211
271
|
interface FromQuote {
|
|
@@ -225,7 +285,11 @@ export declare namespace Quote {
|
|
|
225
285
|
days_until_due: number | null;
|
|
226
286
|
issuer: InvoiceSettings.Issuer;
|
|
227
287
|
}
|
|
228
|
-
type Status = 'accepted' | 'canceled' | 'draft' | 'open';
|
|
288
|
+
type Status = 'accepted' | 'accepting' | 'canceled' | 'draft' | 'open' | 'stale';
|
|
289
|
+
interface StatusDetails {
|
|
290
|
+
canceled?: StatusDetails.Canceled;
|
|
291
|
+
stale?: StatusDetails.Stale;
|
|
292
|
+
}
|
|
229
293
|
interface StatusTransitions {
|
|
230
294
|
/**
|
|
231
295
|
* The time that the quote was accepted. Measured in seconds since Unix epoch.
|
|
@@ -241,6 +305,18 @@ export declare namespace Quote {
|
|
|
241
305
|
finalized_at: number | null;
|
|
242
306
|
}
|
|
243
307
|
interface SubscriptionData {
|
|
308
|
+
/**
|
|
309
|
+
* Describes the period to bill for upon accepting the quote.
|
|
310
|
+
*/
|
|
311
|
+
bill_on_acceptance?: SubscriptionData.BillOnAcceptance | null;
|
|
312
|
+
/**
|
|
313
|
+
* 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.
|
|
314
|
+
*/
|
|
315
|
+
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
316
|
+
/**
|
|
317
|
+
* Whether the subscription will always start a new billing period when the quote is accepted.
|
|
318
|
+
*/
|
|
319
|
+
billing_cycle_anchor?: 'reset' | null;
|
|
244
320
|
/**
|
|
245
321
|
* The billing mode of the quote.
|
|
246
322
|
*/
|
|
@@ -253,15 +329,65 @@ export declare namespace Quote {
|
|
|
253
329
|
* When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
|
|
254
330
|
*/
|
|
255
331
|
effective_date: number | null;
|
|
332
|
+
/**
|
|
333
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
334
|
+
*/
|
|
335
|
+
end_behavior?: SubscriptionData.EndBehavior | null;
|
|
336
|
+
/**
|
|
337
|
+
* The id of the subscription that will be updated when the quote is accepted.
|
|
338
|
+
*/
|
|
339
|
+
from_subscription?: string | Subscription | null;
|
|
256
340
|
/**
|
|
257
341
|
* Set of [key-value pairs](https://docs.stripe.com/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.
|
|
258
342
|
*/
|
|
259
343
|
metadata: Metadata | null;
|
|
344
|
+
/**
|
|
345
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
346
|
+
*/
|
|
347
|
+
prebilling?: SubscriptionData.Prebilling | null;
|
|
348
|
+
/**
|
|
349
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
|
350
|
+
*/
|
|
351
|
+
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
260
352
|
/**
|
|
261
353
|
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
262
354
|
*/
|
|
263
355
|
trial_period_days: number | null;
|
|
264
356
|
}
|
|
357
|
+
interface SubscriptionDataOverride {
|
|
358
|
+
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
359
|
+
/**
|
|
360
|
+
* Describes the period to bill for upon accepting the quote.
|
|
361
|
+
*/
|
|
362
|
+
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance | null;
|
|
363
|
+
/**
|
|
364
|
+
* 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.
|
|
365
|
+
*/
|
|
366
|
+
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
367
|
+
/**
|
|
368
|
+
* The customer who received this quote. A customer is required to finalize the quote. Once specified, you can't change it.
|
|
369
|
+
*/
|
|
370
|
+
customer: string | null;
|
|
371
|
+
/**
|
|
372
|
+
* 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.
|
|
373
|
+
*/
|
|
374
|
+
description: string | null;
|
|
375
|
+
/**
|
|
376
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
377
|
+
*/
|
|
378
|
+
end_behavior?: SubscriptionDataOverride.EndBehavior | null;
|
|
379
|
+
/**
|
|
380
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
|
381
|
+
*/
|
|
382
|
+
proration_behavior?: SubscriptionDataOverride.ProrationBehavior | null;
|
|
383
|
+
}
|
|
384
|
+
interface SubscriptionSchedule {
|
|
385
|
+
applies_to: SubscriptionSchedule.AppliesTo;
|
|
386
|
+
/**
|
|
387
|
+
* The subscription schedule that was created or updated from this quote.
|
|
388
|
+
*/
|
|
389
|
+
subscription_schedule: string;
|
|
390
|
+
}
|
|
265
391
|
interface TotalDetails {
|
|
266
392
|
/**
|
|
267
393
|
* This is the sum of all the discounts.
|
|
@@ -308,6 +434,16 @@ export declare namespace Quote {
|
|
|
308
434
|
}
|
|
309
435
|
}
|
|
310
436
|
namespace Computed {
|
|
437
|
+
interface LastReestimationDetails {
|
|
438
|
+
/**
|
|
439
|
+
* When `status` is `failed`, provides details about the quote reestimation failure.
|
|
440
|
+
*/
|
|
441
|
+
failed: LastReestimationDetails.Failed | null;
|
|
442
|
+
/**
|
|
443
|
+
* Latest status of the reestimation.
|
|
444
|
+
*/
|
|
445
|
+
status: LastReestimationDetails.Status;
|
|
446
|
+
}
|
|
311
447
|
interface Recurring {
|
|
312
448
|
/**
|
|
313
449
|
* Total before any discounts or taxes are applied.
|
|
@@ -342,6 +478,26 @@ export declare namespace Quote {
|
|
|
342
478
|
line_items?: ApiList<LineItem>;
|
|
343
479
|
total_details: Upfront.TotalDetails;
|
|
344
480
|
}
|
|
481
|
+
namespace LastReestimationDetails {
|
|
482
|
+
interface Failed {
|
|
483
|
+
/**
|
|
484
|
+
* The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field.
|
|
485
|
+
*/
|
|
486
|
+
failure_code: string | null;
|
|
487
|
+
/**
|
|
488
|
+
* Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID".
|
|
489
|
+
*/
|
|
490
|
+
message: string | null;
|
|
491
|
+
/**
|
|
492
|
+
* The reason the reestimation failed.
|
|
493
|
+
*/
|
|
494
|
+
reason: Failed.Reason;
|
|
495
|
+
}
|
|
496
|
+
type Status = 'failed' | 'in_progress' | 'succeeded';
|
|
497
|
+
namespace Failed {
|
|
498
|
+
type Reason = 'automation_failure' | 'internal_error';
|
|
499
|
+
}
|
|
500
|
+
}
|
|
345
501
|
namespace Recurring {
|
|
346
502
|
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
347
503
|
interface TotalDetails {
|
|
@@ -493,7 +649,114 @@ export declare namespace Quote {
|
|
|
493
649
|
type Type = 'account' | 'self';
|
|
494
650
|
}
|
|
495
651
|
}
|
|
652
|
+
namespace StatusDetails {
|
|
653
|
+
interface Canceled {
|
|
654
|
+
/**
|
|
655
|
+
* The reason this quote was marked as canceled.
|
|
656
|
+
*/
|
|
657
|
+
reason: Canceled.Reason | null;
|
|
658
|
+
/**
|
|
659
|
+
* Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
|
|
660
|
+
*/
|
|
661
|
+
transitioned_at: number | null;
|
|
662
|
+
}
|
|
663
|
+
interface Stale {
|
|
664
|
+
/**
|
|
665
|
+
* Time at which the quote expires. Measured in seconds since the Unix epoch.
|
|
666
|
+
*/
|
|
667
|
+
expires_at: number | null;
|
|
668
|
+
/**
|
|
669
|
+
* The most recent reason this quote was marked as stale.
|
|
670
|
+
*/
|
|
671
|
+
last_reason: Stale.LastReason | null;
|
|
672
|
+
/**
|
|
673
|
+
* Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
|
|
674
|
+
*/
|
|
675
|
+
last_updated_at: number | null;
|
|
676
|
+
/**
|
|
677
|
+
* Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
|
|
678
|
+
*/
|
|
679
|
+
transitioned_at: number | null;
|
|
680
|
+
}
|
|
681
|
+
namespace Canceled {
|
|
682
|
+
type Reason = 'canceled' | 'quote_accepted' | 'quote_expired' | 'quote_superseded' | 'subscription_canceled';
|
|
683
|
+
}
|
|
684
|
+
namespace Stale {
|
|
685
|
+
interface LastReason {
|
|
686
|
+
/**
|
|
687
|
+
* The ID of the line that is invalid if the stale reason type is `line_invalid`.
|
|
688
|
+
*/
|
|
689
|
+
line_invalid?: string;
|
|
690
|
+
/**
|
|
691
|
+
* The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
|
|
692
|
+
*/
|
|
693
|
+
lines_invalid?: Array<LastReason.LinesInvalid>;
|
|
694
|
+
/**
|
|
695
|
+
* The user supplied mark stale reason.
|
|
696
|
+
*/
|
|
697
|
+
marked_stale?: string | null;
|
|
698
|
+
/**
|
|
699
|
+
* The ID of the subscription that was canceled.
|
|
700
|
+
*/
|
|
701
|
+
subscription_canceled?: string;
|
|
702
|
+
subscription_changed?: LastReason.SubscriptionChanged;
|
|
703
|
+
/**
|
|
704
|
+
* The ID of the subscription that was expired.
|
|
705
|
+
*/
|
|
706
|
+
subscription_expired?: string;
|
|
707
|
+
/**
|
|
708
|
+
* The ID of the subscription schedule that was canceled.
|
|
709
|
+
*/
|
|
710
|
+
subscription_schedule_canceled?: string;
|
|
711
|
+
subscription_schedule_changed?: LastReason.SubscriptionScheduleChanged;
|
|
712
|
+
/**
|
|
713
|
+
* The ID of the subscription schedule that was released.
|
|
714
|
+
*/
|
|
715
|
+
subscription_schedule_released?: string;
|
|
716
|
+
/**
|
|
717
|
+
* The reason the quote was marked as stale.
|
|
718
|
+
*/
|
|
719
|
+
type: LastReason.Type | null;
|
|
720
|
+
}
|
|
721
|
+
namespace LastReason {
|
|
722
|
+
interface LinesInvalid {
|
|
723
|
+
/**
|
|
724
|
+
* The timestamp at which the lines were marked as invalid.
|
|
725
|
+
*/
|
|
726
|
+
invalid_at: number;
|
|
727
|
+
/**
|
|
728
|
+
* The list of lines that became invalid at the given timestamp.
|
|
729
|
+
*/
|
|
730
|
+
lines: Array<string>;
|
|
731
|
+
}
|
|
732
|
+
interface SubscriptionChanged {
|
|
733
|
+
/**
|
|
734
|
+
* The subscription's state before the quote was marked as stale.
|
|
735
|
+
*/
|
|
736
|
+
previous_subscription: Subscription | null;
|
|
737
|
+
}
|
|
738
|
+
interface SubscriptionScheduleChanged {
|
|
739
|
+
/**
|
|
740
|
+
* The subscription schedule's state before the quote was marked as stale.
|
|
741
|
+
*/
|
|
742
|
+
previous_subscription_schedule: SubscriptionSchedule | null;
|
|
743
|
+
}
|
|
744
|
+
type Type = 'accept_failed_validations' | 'bill_on_acceptance_invalid' | 'line_invalid' | 'lines_invalid' | 'marked_stale' | 'subscription_canceled' | 'subscription_changed' | 'subscription_expired' | 'subscription_schedule_canceled' | 'subscription_schedule_changed' | 'subscription_schedule_released';
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
496
748
|
namespace SubscriptionData {
|
|
749
|
+
interface BillOnAcceptance {
|
|
750
|
+
/**
|
|
751
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
752
|
+
*/
|
|
753
|
+
bill_from: BillOnAcceptance.BillFrom | null;
|
|
754
|
+
/**
|
|
755
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
756
|
+
*/
|
|
757
|
+
bill_until: BillOnAcceptance.BillUntil | null;
|
|
758
|
+
}
|
|
759
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
497
760
|
interface BillingMode {
|
|
498
761
|
flexible?: BillingMode.Flexible;
|
|
499
762
|
/**
|
|
@@ -501,6 +764,11 @@ export declare namespace Quote {
|
|
|
501
764
|
*/
|
|
502
765
|
type: BillingMode.Type;
|
|
503
766
|
}
|
|
767
|
+
type EndBehavior = 'cancel' | 'release';
|
|
768
|
+
interface Prebilling {
|
|
769
|
+
iterations: number;
|
|
770
|
+
}
|
|
771
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
504
772
|
namespace BillingMode {
|
|
505
773
|
interface Flexible {
|
|
506
774
|
/**
|
|
@@ -513,6 +781,203 @@ export declare namespace Quote {
|
|
|
513
781
|
type ProrationDiscounts = 'included' | 'itemized';
|
|
514
782
|
}
|
|
515
783
|
}
|
|
784
|
+
namespace BillOnAcceptance {
|
|
785
|
+
interface BillFrom {
|
|
786
|
+
/**
|
|
787
|
+
* The materialized time.
|
|
788
|
+
*/
|
|
789
|
+
computed: number | null;
|
|
790
|
+
/**
|
|
791
|
+
* The timestamp the given line starts at.
|
|
792
|
+
*/
|
|
793
|
+
line_starts_at: BillFrom.LineStartsAt | null;
|
|
794
|
+
/**
|
|
795
|
+
* A precise Unix timestamp.
|
|
796
|
+
*/
|
|
797
|
+
timestamp: number | null;
|
|
798
|
+
/**
|
|
799
|
+
* The type of method to specify the `bill_from` time.
|
|
800
|
+
*/
|
|
801
|
+
type: BillFrom.Type;
|
|
802
|
+
}
|
|
803
|
+
interface BillUntil {
|
|
804
|
+
/**
|
|
805
|
+
* The materialized time.
|
|
806
|
+
*/
|
|
807
|
+
computed: number | null;
|
|
808
|
+
/**
|
|
809
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
810
|
+
*/
|
|
811
|
+
duration: BillUntil.Duration | null;
|
|
812
|
+
/**
|
|
813
|
+
* The timestamp the given line ends at.
|
|
814
|
+
*/
|
|
815
|
+
line_ends_at: BillUntil.LineEndsAt | null;
|
|
816
|
+
/**
|
|
817
|
+
* A precise Unix timestamp.
|
|
818
|
+
*/
|
|
819
|
+
timestamp: number | null;
|
|
820
|
+
/**
|
|
821
|
+
* The type of method to specify the `bill_until` time.
|
|
822
|
+
*/
|
|
823
|
+
type: BillUntil.Type;
|
|
824
|
+
}
|
|
825
|
+
namespace BillFrom {
|
|
826
|
+
interface LineStartsAt {
|
|
827
|
+
/**
|
|
828
|
+
* Unique identifier for the object.
|
|
829
|
+
*/
|
|
830
|
+
id: string;
|
|
831
|
+
}
|
|
832
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp';
|
|
833
|
+
}
|
|
834
|
+
namespace BillUntil {
|
|
835
|
+
interface Duration {
|
|
836
|
+
/**
|
|
837
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
838
|
+
*/
|
|
839
|
+
interval: Duration.Interval;
|
|
840
|
+
/**
|
|
841
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
842
|
+
*/
|
|
843
|
+
interval_count: number;
|
|
844
|
+
}
|
|
845
|
+
interface LineEndsAt {
|
|
846
|
+
/**
|
|
847
|
+
* Unique identifier for the object.
|
|
848
|
+
*/
|
|
849
|
+
id: string;
|
|
850
|
+
}
|
|
851
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice';
|
|
852
|
+
namespace Duration {
|
|
853
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
namespace SubscriptionDataOverride {
|
|
859
|
+
interface AppliesTo {
|
|
860
|
+
/**
|
|
861
|
+
* 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.
|
|
862
|
+
*/
|
|
863
|
+
new_reference: string | null;
|
|
864
|
+
/**
|
|
865
|
+
* The ID of the schedule the line applies to.
|
|
866
|
+
*/
|
|
867
|
+
subscription_schedule: string | null;
|
|
868
|
+
/**
|
|
869
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
870
|
+
*/
|
|
871
|
+
type: AppliesTo.Type;
|
|
872
|
+
}
|
|
873
|
+
interface BillOnAcceptance {
|
|
874
|
+
/**
|
|
875
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
876
|
+
*/
|
|
877
|
+
bill_from: BillOnAcceptance.BillFrom | null;
|
|
878
|
+
/**
|
|
879
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
880
|
+
*/
|
|
881
|
+
bill_until: BillOnAcceptance.BillUntil | null;
|
|
882
|
+
}
|
|
883
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
884
|
+
type EndBehavior = 'cancel' | 'release';
|
|
885
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
886
|
+
namespace AppliesTo {
|
|
887
|
+
type Type = 'new_reference' | 'subscription_schedule';
|
|
888
|
+
}
|
|
889
|
+
namespace BillOnAcceptance {
|
|
890
|
+
interface BillFrom {
|
|
891
|
+
/**
|
|
892
|
+
* The materialized time.
|
|
893
|
+
*/
|
|
894
|
+
computed: number | null;
|
|
895
|
+
/**
|
|
896
|
+
* The timestamp the given line starts at.
|
|
897
|
+
*/
|
|
898
|
+
line_starts_at: BillFrom.LineStartsAt | null;
|
|
899
|
+
/**
|
|
900
|
+
* A precise Unix timestamp.
|
|
901
|
+
*/
|
|
902
|
+
timestamp: number | null;
|
|
903
|
+
/**
|
|
904
|
+
* The type of method to specify the `bill_from` time.
|
|
905
|
+
*/
|
|
906
|
+
type: BillFrom.Type;
|
|
907
|
+
}
|
|
908
|
+
interface BillUntil {
|
|
909
|
+
/**
|
|
910
|
+
* The materialized time.
|
|
911
|
+
*/
|
|
912
|
+
computed: number | null;
|
|
913
|
+
/**
|
|
914
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
915
|
+
*/
|
|
916
|
+
duration: BillUntil.Duration | null;
|
|
917
|
+
/**
|
|
918
|
+
* The timestamp the given line ends at.
|
|
919
|
+
*/
|
|
920
|
+
line_ends_at: BillUntil.LineEndsAt | null;
|
|
921
|
+
/**
|
|
922
|
+
* A precise Unix timestamp.
|
|
923
|
+
*/
|
|
924
|
+
timestamp: number | null;
|
|
925
|
+
/**
|
|
926
|
+
* The type of method to specify the `bill_until` time.
|
|
927
|
+
*/
|
|
928
|
+
type: BillUntil.Type;
|
|
929
|
+
}
|
|
930
|
+
namespace BillFrom {
|
|
931
|
+
interface LineStartsAt {
|
|
932
|
+
/**
|
|
933
|
+
* Unique identifier for the object.
|
|
934
|
+
*/
|
|
935
|
+
id: string;
|
|
936
|
+
}
|
|
937
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp';
|
|
938
|
+
}
|
|
939
|
+
namespace BillUntil {
|
|
940
|
+
interface Duration {
|
|
941
|
+
/**
|
|
942
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
943
|
+
*/
|
|
944
|
+
interval: Duration.Interval;
|
|
945
|
+
/**
|
|
946
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
947
|
+
*/
|
|
948
|
+
interval_count: number;
|
|
949
|
+
}
|
|
950
|
+
interface LineEndsAt {
|
|
951
|
+
/**
|
|
952
|
+
* Unique identifier for the object.
|
|
953
|
+
*/
|
|
954
|
+
id: string;
|
|
955
|
+
}
|
|
956
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice';
|
|
957
|
+
namespace Duration {
|
|
958
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
namespace SubscriptionSchedule {
|
|
964
|
+
interface AppliesTo {
|
|
965
|
+
/**
|
|
966
|
+
* 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.
|
|
967
|
+
*/
|
|
968
|
+
new_reference: string | null;
|
|
969
|
+
/**
|
|
970
|
+
* The ID of the schedule the line applies to.
|
|
971
|
+
*/
|
|
972
|
+
subscription_schedule: string | null;
|
|
973
|
+
/**
|
|
974
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
975
|
+
*/
|
|
976
|
+
type: AppliesTo.Type;
|
|
977
|
+
}
|
|
978
|
+
namespace AppliesTo {
|
|
979
|
+
type Type = 'new_reference' | 'subscription_schedule';
|
|
980
|
+
}
|
|
516
981
|
}
|
|
517
982
|
namespace TotalDetails {
|
|
518
983
|
interface Breakdown {
|
|
@@ -566,6 +1031,10 @@ export declare namespace Quote {
|
|
|
566
1031
|
}
|
|
567
1032
|
}
|
|
568
1033
|
export interface QuoteCreateParams {
|
|
1034
|
+
/**
|
|
1035
|
+
* Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
1036
|
+
*/
|
|
1037
|
+
allow_backdated_lines?: boolean;
|
|
569
1038
|
/**
|
|
570
1039
|
* 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.
|
|
571
1040
|
*/
|
|
@@ -630,6 +1099,10 @@ export interface QuoteCreateParams {
|
|
|
630
1099
|
* 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.
|
|
631
1100
|
*/
|
|
632
1101
|
line_items?: Array<QuoteCreateParams.LineItem>;
|
|
1102
|
+
/**
|
|
1103
|
+
* 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.
|
|
1104
|
+
*/
|
|
1105
|
+
lines?: Array<QuoteCreateParams.Line>;
|
|
633
1106
|
/**
|
|
634
1107
|
* Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
635
1108
|
*/
|
|
@@ -642,6 +1115,10 @@ export interface QuoteCreateParams {
|
|
|
642
1115
|
* 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.
|
|
643
1116
|
*/
|
|
644
1117
|
subscription_data?: QuoteCreateParams.SubscriptionData;
|
|
1118
|
+
/**
|
|
1119
|
+
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
1120
|
+
*/
|
|
1121
|
+
subscription_data_overrides?: Array<QuoteCreateParams.SubscriptionDataOverride>;
|
|
645
1122
|
/**
|
|
646
1123
|
* ID of the test clock to attach to the quote.
|
|
647
1124
|
*/
|
|
@@ -672,6 +1149,10 @@ export declare namespace QuoteCreateParams {
|
|
|
672
1149
|
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
673
1150
|
*/
|
|
674
1151
|
discount?: string;
|
|
1152
|
+
/**
|
|
1153
|
+
* Details to determine how long the discount should be applied for.
|
|
1154
|
+
*/
|
|
1155
|
+
discount_end?: Discount.DiscountEnd;
|
|
675
1156
|
/**
|
|
676
1157
|
* ID of the promotion code to create a new discount for.
|
|
677
1158
|
*/
|
|
@@ -719,48 +1200,160 @@ export declare namespace QuoteCreateParams {
|
|
|
719
1200
|
*/
|
|
720
1201
|
tax_rates?: Emptyable<Array<string>>;
|
|
721
1202
|
}
|
|
722
|
-
interface
|
|
1203
|
+
interface Line {
|
|
723
1204
|
/**
|
|
724
|
-
*
|
|
1205
|
+
* An array of operations the quote line performs.
|
|
725
1206
|
*/
|
|
726
|
-
|
|
1207
|
+
actions?: Array<Line.Action>;
|
|
727
1208
|
/**
|
|
728
|
-
*
|
|
1209
|
+
* Details to identify the subscription schedule the quote line applies to.
|
|
729
1210
|
*/
|
|
730
|
-
|
|
1211
|
+
applies_to?: Line.AppliesTo;
|
|
731
1212
|
/**
|
|
732
|
-
*
|
|
1213
|
+
* 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.
|
|
733
1214
|
*/
|
|
734
|
-
|
|
1215
|
+
billing_cycle_anchor?: Line.BillingCycleAnchor;
|
|
735
1216
|
/**
|
|
736
|
-
*
|
|
1217
|
+
* 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.
|
|
737
1218
|
*/
|
|
738
|
-
|
|
1219
|
+
cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
|
|
739
1220
|
/**
|
|
740
|
-
*
|
|
1221
|
+
* 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.
|
|
741
1222
|
*/
|
|
742
|
-
|
|
743
|
-
}
|
|
744
|
-
interface TransferData {
|
|
1223
|
+
ends_at?: Line.EndsAt;
|
|
745
1224
|
/**
|
|
746
|
-
*
|
|
1225
|
+
* 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.
|
|
747
1226
|
*/
|
|
748
|
-
|
|
1227
|
+
proration_behavior?: Line.ProrationBehavior;
|
|
749
1228
|
/**
|
|
750
|
-
*
|
|
1229
|
+
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
751
1230
|
*/
|
|
752
|
-
|
|
1231
|
+
set_pause_collection?: Line.SetPauseCollection;
|
|
753
1232
|
/**
|
|
754
|
-
*
|
|
1233
|
+
* Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
|
755
1234
|
*/
|
|
756
|
-
|
|
1235
|
+
set_schedule_end?: Line.SetScheduleEnd;
|
|
1236
|
+
/**
|
|
1237
|
+
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
1238
|
+
*/
|
|
1239
|
+
starts_at?: Line.StartsAt;
|
|
1240
|
+
/**
|
|
1241
|
+
* Settings related to subscription trials.
|
|
1242
|
+
*/
|
|
1243
|
+
trial_settings?: Line.TrialSettings;
|
|
757
1244
|
}
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
1245
|
+
interface SubscriptionData {
|
|
1246
|
+
/**
|
|
1247
|
+
* Describes the period to bill for upon accepting the quote.
|
|
1248
|
+
*/
|
|
1249
|
+
bill_on_acceptance?: SubscriptionData.BillOnAcceptance;
|
|
1250
|
+
/**
|
|
1251
|
+
* 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.
|
|
1252
|
+
*/
|
|
1253
|
+
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
1254
|
+
/**
|
|
1255
|
+
* When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
|
1256
|
+
*/
|
|
1257
|
+
billing_cycle_anchor?: Emptyable<'reset'>;
|
|
1258
|
+
/**
|
|
1259
|
+
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
1260
|
+
*/
|
|
1261
|
+
billing_mode?: SubscriptionData.BillingMode;
|
|
1262
|
+
/**
|
|
1263
|
+
* 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.
|
|
1264
|
+
*/
|
|
1265
|
+
description?: string;
|
|
1266
|
+
/**
|
|
1267
|
+
* 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.
|
|
1268
|
+
*/
|
|
1269
|
+
effective_date?: Emptyable<'current_period_end' | number>;
|
|
1270
|
+
/**
|
|
1271
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1272
|
+
*/
|
|
1273
|
+
end_behavior?: SubscriptionData.EndBehavior;
|
|
1274
|
+
/**
|
|
1275
|
+
* 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.
|
|
1276
|
+
*/
|
|
1277
|
+
from_subscription?: string;
|
|
1278
|
+
/**
|
|
1279
|
+
* Set of [key-value pairs](https://docs.stripe.com/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.
|
|
1280
|
+
*/
|
|
1281
|
+
metadata?: MetadataParam;
|
|
1282
|
+
/**
|
|
1283
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
1284
|
+
*/
|
|
1285
|
+
prebilling?: Emptyable<SubscriptionData.Prebilling>;
|
|
1286
|
+
/**
|
|
1287
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
1288
|
+
*
|
|
1289
|
+
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
1290
|
+
*
|
|
1291
|
+
* 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://docs.stripe.com/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
1292
|
+
*
|
|
1293
|
+
* Prorations can be disabled by passing `none`.
|
|
1294
|
+
*/
|
|
1295
|
+
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
1296
|
+
/**
|
|
1297
|
+
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
1298
|
+
*/
|
|
1299
|
+
trial_period_days?: Emptyable<number>;
|
|
1300
|
+
}
|
|
1301
|
+
interface SubscriptionDataOverride {
|
|
1302
|
+
/**
|
|
1303
|
+
* Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
1304
|
+
*/
|
|
1305
|
+
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
1306
|
+
/**
|
|
1307
|
+
* Describes the period to bill for upon accepting the quote.
|
|
1308
|
+
*/
|
|
1309
|
+
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance;
|
|
1310
|
+
/**
|
|
1311
|
+
* 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.
|
|
1312
|
+
*/
|
|
1313
|
+
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
1314
|
+
/**
|
|
1315
|
+
* The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
|
1316
|
+
*/
|
|
1317
|
+
customer?: string;
|
|
1318
|
+
/**
|
|
1319
|
+
* 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.
|
|
1320
|
+
*/
|
|
1321
|
+
description?: string;
|
|
1322
|
+
/**
|
|
1323
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1324
|
+
*/
|
|
1325
|
+
end_behavior?: SubscriptionDataOverride.EndBehavior;
|
|
1326
|
+
/**
|
|
1327
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
1328
|
+
*
|
|
1329
|
+
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
1330
|
+
*
|
|
1331
|
+
* 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://docs.stripe.com/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
1332
|
+
*
|
|
1333
|
+
* Prorations can be disabled by passing `none`.
|
|
1334
|
+
*/
|
|
1335
|
+
proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
|
|
1336
|
+
}
|
|
1337
|
+
interface TransferData {
|
|
1338
|
+
/**
|
|
1339
|
+
* 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.
|
|
1340
|
+
*/
|
|
1341
|
+
amount?: number;
|
|
1342
|
+
/**
|
|
1343
|
+
* 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.
|
|
1344
|
+
*/
|
|
1345
|
+
amount_percent?: number;
|
|
1346
|
+
/**
|
|
1347
|
+
* ID of an existing, connected Stripe account.
|
|
1348
|
+
*/
|
|
1349
|
+
destination: string;
|
|
1350
|
+
}
|
|
1351
|
+
namespace AutomaticTax {
|
|
1352
|
+
interface Liability {
|
|
1353
|
+
/**
|
|
1354
|
+
* The connected account being referenced when `type` is `account`.
|
|
1355
|
+
*/
|
|
1356
|
+
account?: string;
|
|
764
1357
|
/**
|
|
765
1358
|
* Type of the account referenced in the request.
|
|
766
1359
|
*/
|
|
@@ -770,6 +1363,38 @@ export declare namespace QuoteCreateParams {
|
|
|
770
1363
|
type Type = 'account' | 'self';
|
|
771
1364
|
}
|
|
772
1365
|
}
|
|
1366
|
+
namespace Discount {
|
|
1367
|
+
interface DiscountEnd {
|
|
1368
|
+
/**
|
|
1369
|
+
* Time span for the redeemed discount.
|
|
1370
|
+
*/
|
|
1371
|
+
duration?: DiscountEnd.Duration;
|
|
1372
|
+
/**
|
|
1373
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1374
|
+
*/
|
|
1375
|
+
timestamp?: number;
|
|
1376
|
+
/**
|
|
1377
|
+
* The type of calculation made to determine when the discount ends.
|
|
1378
|
+
*/
|
|
1379
|
+
type: DiscountEnd.Type;
|
|
1380
|
+
}
|
|
1381
|
+
namespace DiscountEnd {
|
|
1382
|
+
interface Duration {
|
|
1383
|
+
/**
|
|
1384
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1385
|
+
*/
|
|
1386
|
+
interval: Duration.Interval;
|
|
1387
|
+
/**
|
|
1388
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1389
|
+
*/
|
|
1390
|
+
interval_count: number;
|
|
1391
|
+
}
|
|
1392
|
+
type Type = 'duration' | 'timestamp';
|
|
1393
|
+
namespace Duration {
|
|
1394
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
773
1398
|
namespace InvoiceSettings {
|
|
774
1399
|
interface Issuer {
|
|
775
1400
|
/**
|
|
@@ -785,6 +1410,457 @@ export declare namespace QuoteCreateParams {
|
|
|
785
1410
|
type Type = 'account' | 'self';
|
|
786
1411
|
}
|
|
787
1412
|
}
|
|
1413
|
+
namespace Line {
|
|
1414
|
+
interface Action {
|
|
1415
|
+
/**
|
|
1416
|
+
* Details for the `add_discount` type.
|
|
1417
|
+
*/
|
|
1418
|
+
add_discount?: Action.AddDiscount;
|
|
1419
|
+
/**
|
|
1420
|
+
* Details for the `add_item` type.
|
|
1421
|
+
*/
|
|
1422
|
+
add_item?: Action.AddItem;
|
|
1423
|
+
/**
|
|
1424
|
+
* Details for the `add_metadata` type: specify a hash of key-value pairs.
|
|
1425
|
+
*/
|
|
1426
|
+
add_metadata?: {
|
|
1427
|
+
[key: string]: string;
|
|
1428
|
+
};
|
|
1429
|
+
/**
|
|
1430
|
+
* Details for the `remove_discount` type.
|
|
1431
|
+
*/
|
|
1432
|
+
remove_discount?: Action.RemoveDiscount;
|
|
1433
|
+
/**
|
|
1434
|
+
* Details for the `remove_item` type.
|
|
1435
|
+
*/
|
|
1436
|
+
remove_item?: Action.RemoveItem;
|
|
1437
|
+
/**
|
|
1438
|
+
* Details for the `remove_metadata` type: specify an array of metadata keys.
|
|
1439
|
+
*/
|
|
1440
|
+
remove_metadata?: Array<string>;
|
|
1441
|
+
/**
|
|
1442
|
+
* Details for the `set_discounts` type.
|
|
1443
|
+
*/
|
|
1444
|
+
set_discounts?: Array<Action.SetDiscount>;
|
|
1445
|
+
/**
|
|
1446
|
+
* Details for the `set_items` type.
|
|
1447
|
+
*/
|
|
1448
|
+
set_items?: Array<Action.SetItem>;
|
|
1449
|
+
/**
|
|
1450
|
+
* Details for the `set_metadata` type: specify an array of key-value pairs.
|
|
1451
|
+
*/
|
|
1452
|
+
set_metadata?: Emptyable<{
|
|
1453
|
+
[key: string]: string;
|
|
1454
|
+
}>;
|
|
1455
|
+
/**
|
|
1456
|
+
* The type of action the quote line performs.
|
|
1457
|
+
*/
|
|
1458
|
+
type: Action.Type;
|
|
1459
|
+
}
|
|
1460
|
+
interface AppliesTo {
|
|
1461
|
+
/**
|
|
1462
|
+
* 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.
|
|
1463
|
+
*/
|
|
1464
|
+
new_reference?: string;
|
|
1465
|
+
/**
|
|
1466
|
+
* The ID of the schedule the line applies to.
|
|
1467
|
+
*/
|
|
1468
|
+
subscription_schedule?: string;
|
|
1469
|
+
/**
|
|
1470
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
1471
|
+
*/
|
|
1472
|
+
type: AppliesTo.Type;
|
|
1473
|
+
}
|
|
1474
|
+
type BillingCycleAnchor = 'automatic' | 'line_starts_at';
|
|
1475
|
+
interface CancelSubscriptionSchedule {
|
|
1476
|
+
/**
|
|
1477
|
+
* Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
|
1478
|
+
*/
|
|
1479
|
+
cancel_at: 'line_starts_at';
|
|
1480
|
+
/**
|
|
1481
|
+
* 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`.
|
|
1482
|
+
*/
|
|
1483
|
+
invoice_now?: boolean;
|
|
1484
|
+
/**
|
|
1485
|
+
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
|
1486
|
+
*/
|
|
1487
|
+
prorate?: boolean;
|
|
1488
|
+
}
|
|
1489
|
+
interface EndsAt {
|
|
1490
|
+
/**
|
|
1491
|
+
* Use the `end` time of a given discount.
|
|
1492
|
+
*/
|
|
1493
|
+
discount_end?: EndsAt.DiscountEnd;
|
|
1494
|
+
/**
|
|
1495
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
1496
|
+
*/
|
|
1497
|
+
duration?: EndsAt.Duration;
|
|
1498
|
+
/**
|
|
1499
|
+
* A precise Unix timestamp.
|
|
1500
|
+
*/
|
|
1501
|
+
timestamp?: number;
|
|
1502
|
+
/**
|
|
1503
|
+
* Select a way to pass in `ends_at`.
|
|
1504
|
+
*/
|
|
1505
|
+
type: EndsAt.Type;
|
|
1506
|
+
}
|
|
1507
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
1508
|
+
interface SetPauseCollection {
|
|
1509
|
+
/**
|
|
1510
|
+
* Details of the pause_collection behavior to apply to the amendment.
|
|
1511
|
+
*/
|
|
1512
|
+
set?: SetPauseCollection.Set;
|
|
1513
|
+
/**
|
|
1514
|
+
* Determines the type of the pause_collection amendment.
|
|
1515
|
+
*/
|
|
1516
|
+
type: SetPauseCollection.Type;
|
|
1517
|
+
}
|
|
1518
|
+
type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
|
|
1519
|
+
interface StartsAt {
|
|
1520
|
+
/**
|
|
1521
|
+
* Use the `end` time of a given discount.
|
|
1522
|
+
*/
|
|
1523
|
+
discount_end?: StartsAt.DiscountEnd;
|
|
1524
|
+
/**
|
|
1525
|
+
* The timestamp the given line ends at.
|
|
1526
|
+
*/
|
|
1527
|
+
line_ends_at?: StartsAt.LineEndsAt;
|
|
1528
|
+
/**
|
|
1529
|
+
* A precise Unix timestamp.
|
|
1530
|
+
*/
|
|
1531
|
+
timestamp?: number;
|
|
1532
|
+
/**
|
|
1533
|
+
* Select a way to pass in `starts_at`.
|
|
1534
|
+
*/
|
|
1535
|
+
type: StartsAt.Type;
|
|
1536
|
+
}
|
|
1537
|
+
interface TrialSettings {
|
|
1538
|
+
/**
|
|
1539
|
+
* Defines how the subscription should behave when a trial ends.
|
|
1540
|
+
*/
|
|
1541
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
1542
|
+
}
|
|
1543
|
+
namespace Action {
|
|
1544
|
+
interface AddDiscount {
|
|
1545
|
+
/**
|
|
1546
|
+
* The coupon code to redeem.
|
|
1547
|
+
*/
|
|
1548
|
+
coupon?: string;
|
|
1549
|
+
/**
|
|
1550
|
+
* An ID of an existing discount for a coupon that was already redeemed.
|
|
1551
|
+
*/
|
|
1552
|
+
discount?: string;
|
|
1553
|
+
/**
|
|
1554
|
+
* Details to determine how long the discount should be applied for.
|
|
1555
|
+
*/
|
|
1556
|
+
discount_end?: AddDiscount.DiscountEnd;
|
|
1557
|
+
/**
|
|
1558
|
+
* 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.
|
|
1559
|
+
*/
|
|
1560
|
+
index?: number;
|
|
1561
|
+
/**
|
|
1562
|
+
* The promotion code to redeem.
|
|
1563
|
+
*/
|
|
1564
|
+
promotion_code?: string;
|
|
1565
|
+
}
|
|
1566
|
+
interface AddItem {
|
|
1567
|
+
/**
|
|
1568
|
+
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
1569
|
+
*/
|
|
1570
|
+
discounts?: Array<AddItem.Discount>;
|
|
1571
|
+
/**
|
|
1572
|
+
* Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
1573
|
+
*/
|
|
1574
|
+
metadata?: MetadataParam;
|
|
1575
|
+
/**
|
|
1576
|
+
* The ID of the price object.
|
|
1577
|
+
*/
|
|
1578
|
+
price: string;
|
|
1579
|
+
/**
|
|
1580
|
+
* Quantity for this item.
|
|
1581
|
+
*/
|
|
1582
|
+
quantity?: number;
|
|
1583
|
+
/**
|
|
1584
|
+
* 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`.
|
|
1585
|
+
*/
|
|
1586
|
+
tax_rates?: Array<string>;
|
|
1587
|
+
/**
|
|
1588
|
+
* Options that configure the trial on the subscription item.
|
|
1589
|
+
*/
|
|
1590
|
+
trial?: AddItem.Trial;
|
|
1591
|
+
/**
|
|
1592
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
1593
|
+
*/
|
|
1594
|
+
trial_offer?: string;
|
|
1595
|
+
}
|
|
1596
|
+
interface RemoveDiscount {
|
|
1597
|
+
/**
|
|
1598
|
+
* The coupon code to remove from the `discounts` array.
|
|
1599
|
+
*/
|
|
1600
|
+
coupon?: string;
|
|
1601
|
+
/**
|
|
1602
|
+
* The ID of a discount to remove from the `discounts` array.
|
|
1603
|
+
*/
|
|
1604
|
+
discount?: string;
|
|
1605
|
+
/**
|
|
1606
|
+
* The ID of a promotion code to remove from the `discounts` array.
|
|
1607
|
+
*/
|
|
1608
|
+
promotion_code?: string;
|
|
1609
|
+
}
|
|
1610
|
+
interface RemoveItem {
|
|
1611
|
+
/**
|
|
1612
|
+
* ID of a price to remove.
|
|
1613
|
+
*/
|
|
1614
|
+
price: string;
|
|
1615
|
+
}
|
|
1616
|
+
interface SetDiscount {
|
|
1617
|
+
/**
|
|
1618
|
+
* The coupon code to replace the `discounts` array with.
|
|
1619
|
+
*/
|
|
1620
|
+
coupon?: string;
|
|
1621
|
+
/**
|
|
1622
|
+
* An ID of an existing discount to replace the `discounts` array with.
|
|
1623
|
+
*/
|
|
1624
|
+
discount?: string;
|
|
1625
|
+
/**
|
|
1626
|
+
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
1627
|
+
*/
|
|
1628
|
+
promotion_code?: string;
|
|
1629
|
+
}
|
|
1630
|
+
interface SetItem {
|
|
1631
|
+
/**
|
|
1632
|
+
* 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`.
|
|
1633
|
+
*/
|
|
1634
|
+
discounts?: Array<SetItem.Discount>;
|
|
1635
|
+
/**
|
|
1636
|
+
* 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`.
|
|
1637
|
+
*/
|
|
1638
|
+
metadata?: MetadataParam;
|
|
1639
|
+
/**
|
|
1640
|
+
* The ID of the price object.
|
|
1641
|
+
*/
|
|
1642
|
+
price: string;
|
|
1643
|
+
/**
|
|
1644
|
+
* 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`.
|
|
1645
|
+
*/
|
|
1646
|
+
quantity?: number;
|
|
1647
|
+
/**
|
|
1648
|
+
* 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`.
|
|
1649
|
+
*/
|
|
1650
|
+
tax_rates?: Array<string>;
|
|
1651
|
+
/**
|
|
1652
|
+
* 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`.
|
|
1653
|
+
*/
|
|
1654
|
+
trial?: SetItem.Trial;
|
|
1655
|
+
/**
|
|
1656
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
1657
|
+
*/
|
|
1658
|
+
trial_offer?: string;
|
|
1659
|
+
}
|
|
1660
|
+
type Type = 'add_discount' | 'add_item' | 'add_metadata' | 'clear_discounts' | 'clear_metadata' | 'remove_discount' | 'remove_item' | 'remove_metadata' | 'set_discounts' | 'set_items' | 'set_metadata';
|
|
1661
|
+
namespace AddDiscount {
|
|
1662
|
+
interface DiscountEnd {
|
|
1663
|
+
/**
|
|
1664
|
+
* The type of calculation made to determine when the discount ends.
|
|
1665
|
+
*/
|
|
1666
|
+
type: 'line_ends_at';
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
namespace AddItem {
|
|
1670
|
+
interface Discount {
|
|
1671
|
+
/**
|
|
1672
|
+
* ID of the coupon to create a new discount for.
|
|
1673
|
+
*/
|
|
1674
|
+
coupon?: string;
|
|
1675
|
+
/**
|
|
1676
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1677
|
+
*/
|
|
1678
|
+
discount?: string;
|
|
1679
|
+
/**
|
|
1680
|
+
* Details to determine how long the discount should be applied for.
|
|
1681
|
+
*/
|
|
1682
|
+
discount_end?: Discount.DiscountEnd;
|
|
1683
|
+
/**
|
|
1684
|
+
* ID of the promotion code to create a new discount for.
|
|
1685
|
+
*/
|
|
1686
|
+
promotion_code?: string;
|
|
1687
|
+
}
|
|
1688
|
+
interface Trial {
|
|
1689
|
+
/**
|
|
1690
|
+
* 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.
|
|
1691
|
+
*/
|
|
1692
|
+
converts_to?: Array<string>;
|
|
1693
|
+
/**
|
|
1694
|
+
* Determines the type of trial for this item.
|
|
1695
|
+
*/
|
|
1696
|
+
type: Trial.Type;
|
|
1697
|
+
}
|
|
1698
|
+
namespace Discount {
|
|
1699
|
+
interface DiscountEnd {
|
|
1700
|
+
/**
|
|
1701
|
+
* Time span for the redeemed discount.
|
|
1702
|
+
*/
|
|
1703
|
+
duration?: DiscountEnd.Duration;
|
|
1704
|
+
/**
|
|
1705
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1706
|
+
*/
|
|
1707
|
+
timestamp?: number;
|
|
1708
|
+
/**
|
|
1709
|
+
* The type of calculation made to determine when the discount ends.
|
|
1710
|
+
*/
|
|
1711
|
+
type: DiscountEnd.Type;
|
|
1712
|
+
}
|
|
1713
|
+
namespace DiscountEnd {
|
|
1714
|
+
interface Duration {
|
|
1715
|
+
/**
|
|
1716
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1717
|
+
*/
|
|
1718
|
+
interval: Duration.Interval;
|
|
1719
|
+
/**
|
|
1720
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1721
|
+
*/
|
|
1722
|
+
interval_count: number;
|
|
1723
|
+
}
|
|
1724
|
+
type Type = 'duration' | 'timestamp';
|
|
1725
|
+
namespace Duration {
|
|
1726
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
namespace Trial {
|
|
1731
|
+
type Type = 'free' | 'paid';
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
namespace SetItem {
|
|
1735
|
+
interface Discount {
|
|
1736
|
+
/**
|
|
1737
|
+
* ID of the coupon to create a new discount for.
|
|
1738
|
+
*/
|
|
1739
|
+
coupon?: string;
|
|
1740
|
+
/**
|
|
1741
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1742
|
+
*/
|
|
1743
|
+
discount?: string;
|
|
1744
|
+
/**
|
|
1745
|
+
* Details to determine how long the discount should be applied for.
|
|
1746
|
+
*/
|
|
1747
|
+
discount_end?: Discount.DiscountEnd;
|
|
1748
|
+
/**
|
|
1749
|
+
* ID of the promotion code to create a new discount for.
|
|
1750
|
+
*/
|
|
1751
|
+
promotion_code?: string;
|
|
1752
|
+
}
|
|
1753
|
+
interface Trial {
|
|
1754
|
+
/**
|
|
1755
|
+
* 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.
|
|
1756
|
+
*/
|
|
1757
|
+
converts_to?: Array<string>;
|
|
1758
|
+
/**
|
|
1759
|
+
* Determines the type of trial for this item.
|
|
1760
|
+
*/
|
|
1761
|
+
type: Trial.Type;
|
|
1762
|
+
}
|
|
1763
|
+
namespace Discount {
|
|
1764
|
+
interface DiscountEnd {
|
|
1765
|
+
/**
|
|
1766
|
+
* Time span for the redeemed discount.
|
|
1767
|
+
*/
|
|
1768
|
+
duration?: DiscountEnd.Duration;
|
|
1769
|
+
/**
|
|
1770
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1771
|
+
*/
|
|
1772
|
+
timestamp?: number;
|
|
1773
|
+
/**
|
|
1774
|
+
* The type of calculation made to determine when the discount ends.
|
|
1775
|
+
*/
|
|
1776
|
+
type: DiscountEnd.Type;
|
|
1777
|
+
}
|
|
1778
|
+
namespace DiscountEnd {
|
|
1779
|
+
interface Duration {
|
|
1780
|
+
/**
|
|
1781
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1782
|
+
*/
|
|
1783
|
+
interval: Duration.Interval;
|
|
1784
|
+
/**
|
|
1785
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1786
|
+
*/
|
|
1787
|
+
interval_count: number;
|
|
1788
|
+
}
|
|
1789
|
+
type Type = 'duration' | 'timestamp';
|
|
1790
|
+
namespace Duration {
|
|
1791
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
namespace Trial {
|
|
1796
|
+
type Type = 'free' | 'paid';
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
namespace AppliesTo {
|
|
1801
|
+
type Type = 'new_reference' | 'subscription_schedule';
|
|
1802
|
+
}
|
|
1803
|
+
namespace EndsAt {
|
|
1804
|
+
interface DiscountEnd {
|
|
1805
|
+
/**
|
|
1806
|
+
* The ID of a specific discount.
|
|
1807
|
+
*/
|
|
1808
|
+
discount: string;
|
|
1809
|
+
}
|
|
1810
|
+
interface Duration {
|
|
1811
|
+
/**
|
|
1812
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1813
|
+
*/
|
|
1814
|
+
interval: Duration.Interval;
|
|
1815
|
+
/**
|
|
1816
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1817
|
+
*/
|
|
1818
|
+
interval_count: number;
|
|
1819
|
+
}
|
|
1820
|
+
type Type = 'billing_period_end' | 'discount_end' | 'duration' | 'quote_acceptance_date' | 'schedule_end' | 'timestamp' | 'upcoming_invoice';
|
|
1821
|
+
namespace Duration {
|
|
1822
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
namespace SetPauseCollection {
|
|
1826
|
+
interface Set {
|
|
1827
|
+
/**
|
|
1828
|
+
* The payment collection behavior for this subscription while paused.
|
|
1829
|
+
*/
|
|
1830
|
+
behavior: Set.Behavior;
|
|
1831
|
+
}
|
|
1832
|
+
type Type = 'remove' | 'set';
|
|
1833
|
+
namespace Set {
|
|
1834
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
namespace StartsAt {
|
|
1838
|
+
interface DiscountEnd {
|
|
1839
|
+
/**
|
|
1840
|
+
* The ID of a specific discount.
|
|
1841
|
+
*/
|
|
1842
|
+
discount: string;
|
|
1843
|
+
}
|
|
1844
|
+
interface LineEndsAt {
|
|
1845
|
+
/**
|
|
1846
|
+
* 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.
|
|
1847
|
+
*/
|
|
1848
|
+
index?: number;
|
|
1849
|
+
}
|
|
1850
|
+
type Type = 'discount_end' | 'line_ends_at' | 'now' | 'quote_acceptance_date' | 'schedule_end' | 'timestamp' | 'upcoming_invoice';
|
|
1851
|
+
}
|
|
1852
|
+
namespace TrialSettings {
|
|
1853
|
+
interface EndBehavior {
|
|
1854
|
+
/**
|
|
1855
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
1856
|
+
*/
|
|
1857
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
1858
|
+
}
|
|
1859
|
+
namespace EndBehavior {
|
|
1860
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
788
1864
|
namespace LineItem {
|
|
789
1865
|
interface Discount {
|
|
790
1866
|
/**
|
|
@@ -795,6 +1871,10 @@ export declare namespace QuoteCreateParams {
|
|
|
795
1871
|
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
796
1872
|
*/
|
|
797
1873
|
discount?: string;
|
|
1874
|
+
/**
|
|
1875
|
+
* Details to determine how long the discount should be applied for.
|
|
1876
|
+
*/
|
|
1877
|
+
discount_end?: Discount.DiscountEnd;
|
|
798
1878
|
/**
|
|
799
1879
|
* ID of the promotion code to create a new discount for.
|
|
800
1880
|
*/
|
|
@@ -826,6 +1906,38 @@ export declare namespace QuoteCreateParams {
|
|
|
826
1906
|
*/
|
|
827
1907
|
unit_amount_decimal?: Decimal;
|
|
828
1908
|
}
|
|
1909
|
+
namespace Discount {
|
|
1910
|
+
interface DiscountEnd {
|
|
1911
|
+
/**
|
|
1912
|
+
* Time span for the redeemed discount.
|
|
1913
|
+
*/
|
|
1914
|
+
duration?: DiscountEnd.Duration;
|
|
1915
|
+
/**
|
|
1916
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1917
|
+
*/
|
|
1918
|
+
timestamp?: number;
|
|
1919
|
+
/**
|
|
1920
|
+
* The type of calculation made to determine when the discount ends.
|
|
1921
|
+
*/
|
|
1922
|
+
type: DiscountEnd.Type;
|
|
1923
|
+
}
|
|
1924
|
+
namespace DiscountEnd {
|
|
1925
|
+
interface Duration {
|
|
1926
|
+
/**
|
|
1927
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1928
|
+
*/
|
|
1929
|
+
interval: Duration.Interval;
|
|
1930
|
+
/**
|
|
1931
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1932
|
+
*/
|
|
1933
|
+
interval_count: number;
|
|
1934
|
+
}
|
|
1935
|
+
type Type = 'duration' | 'timestamp';
|
|
1936
|
+
namespace Duration {
|
|
1937
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
829
1941
|
namespace PriceData {
|
|
830
1942
|
interface Recurring {
|
|
831
1943
|
/**
|
|
@@ -842,28 +1954,225 @@ export declare namespace QuoteCreateParams {
|
|
|
842
1954
|
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
843
1955
|
}
|
|
844
1956
|
}
|
|
845
|
-
}
|
|
846
|
-
namespace SubscriptionData {
|
|
847
|
-
interface
|
|
1957
|
+
}
|
|
1958
|
+
namespace SubscriptionData {
|
|
1959
|
+
interface BillOnAcceptance {
|
|
1960
|
+
/**
|
|
1961
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
1962
|
+
*/
|
|
1963
|
+
bill_from?: BillOnAcceptance.BillFrom;
|
|
1964
|
+
/**
|
|
1965
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
1966
|
+
*/
|
|
1967
|
+
bill_until?: BillOnAcceptance.BillUntil;
|
|
1968
|
+
}
|
|
1969
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
1970
|
+
interface BillingMode {
|
|
1971
|
+
/**
|
|
1972
|
+
* Configure behavior for flexible billing mode.
|
|
1973
|
+
*/
|
|
1974
|
+
flexible?: BillingMode.Flexible;
|
|
1975
|
+
/**
|
|
1976
|
+
* Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
|
|
1977
|
+
*/
|
|
1978
|
+
type: BillingMode.Type;
|
|
1979
|
+
}
|
|
1980
|
+
type EndBehavior = 'cancel' | 'release';
|
|
1981
|
+
interface Prebilling {
|
|
1982
|
+
/**
|
|
1983
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
1984
|
+
*/
|
|
1985
|
+
iterations: number;
|
|
1986
|
+
}
|
|
1987
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
1988
|
+
namespace BillingMode {
|
|
1989
|
+
interface Flexible {
|
|
1990
|
+
/**
|
|
1991
|
+
* Controls how invoices and invoice items display proration amounts and discount amounts.
|
|
1992
|
+
*/
|
|
1993
|
+
proration_discounts?: Flexible.ProrationDiscounts;
|
|
1994
|
+
}
|
|
1995
|
+
type Type = 'classic' | 'flexible';
|
|
1996
|
+
namespace Flexible {
|
|
1997
|
+
type ProrationDiscounts = 'included' | 'itemized';
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
namespace BillOnAcceptance {
|
|
2001
|
+
interface BillFrom {
|
|
2002
|
+
/**
|
|
2003
|
+
* Details of a Quote line to start the bill period from.
|
|
2004
|
+
*/
|
|
2005
|
+
line_starts_at?: BillFrom.LineStartsAt;
|
|
2006
|
+
/**
|
|
2007
|
+
* A precise Unix timestamp.
|
|
2008
|
+
*/
|
|
2009
|
+
timestamp?: number;
|
|
2010
|
+
/**
|
|
2011
|
+
* The type of method to specify the `bill_from` time.
|
|
2012
|
+
*/
|
|
2013
|
+
type: BillFrom.Type;
|
|
2014
|
+
}
|
|
2015
|
+
interface BillUntil {
|
|
2016
|
+
/**
|
|
2017
|
+
* Details of the duration over which to bill.
|
|
2018
|
+
*/
|
|
2019
|
+
duration?: BillUntil.Duration;
|
|
2020
|
+
/**
|
|
2021
|
+
* Details of a Quote line item from which to bill until.
|
|
2022
|
+
*/
|
|
2023
|
+
line_ends_at?: BillUntil.LineEndsAt;
|
|
2024
|
+
/**
|
|
2025
|
+
* A precise Unix timestamp.
|
|
2026
|
+
*/
|
|
2027
|
+
timestamp?: number;
|
|
2028
|
+
/**
|
|
2029
|
+
* The type of method to specify the `bill_until` time.
|
|
2030
|
+
*/
|
|
2031
|
+
type: BillUntil.Type;
|
|
2032
|
+
}
|
|
2033
|
+
namespace BillFrom {
|
|
2034
|
+
interface LineStartsAt {
|
|
2035
|
+
/**
|
|
2036
|
+
* The ID of a quote line.
|
|
2037
|
+
*/
|
|
2038
|
+
id?: string;
|
|
2039
|
+
/**
|
|
2040
|
+
* 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.
|
|
2041
|
+
*/
|
|
2042
|
+
index?: number;
|
|
2043
|
+
}
|
|
2044
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp';
|
|
2045
|
+
}
|
|
2046
|
+
namespace BillUntil {
|
|
2047
|
+
interface Duration {
|
|
2048
|
+
/**
|
|
2049
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2050
|
+
*/
|
|
2051
|
+
interval: Duration.Interval;
|
|
2052
|
+
/**
|
|
2053
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2054
|
+
*/
|
|
2055
|
+
interval_count: number;
|
|
2056
|
+
}
|
|
2057
|
+
interface LineEndsAt {
|
|
2058
|
+
/**
|
|
2059
|
+
* The ID of a quote line.
|
|
2060
|
+
*/
|
|
2061
|
+
id?: string;
|
|
2062
|
+
/**
|
|
2063
|
+
* 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.
|
|
2064
|
+
*/
|
|
2065
|
+
index?: number;
|
|
2066
|
+
}
|
|
2067
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice';
|
|
2068
|
+
namespace Duration {
|
|
2069
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
namespace SubscriptionDataOverride {
|
|
2075
|
+
interface AppliesTo {
|
|
2076
|
+
/**
|
|
2077
|
+
* 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.
|
|
2078
|
+
*/
|
|
2079
|
+
new_reference?: string;
|
|
2080
|
+
/**
|
|
2081
|
+
* The ID of the schedule the line applies to.
|
|
2082
|
+
*/
|
|
2083
|
+
subscription_schedule?: string;
|
|
2084
|
+
/**
|
|
2085
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
2086
|
+
*/
|
|
2087
|
+
type: AppliesTo.Type;
|
|
2088
|
+
}
|
|
2089
|
+
interface BillOnAcceptance {
|
|
848
2090
|
/**
|
|
849
|
-
*
|
|
2091
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
850
2092
|
*/
|
|
851
|
-
|
|
2093
|
+
bill_from?: BillOnAcceptance.BillFrom;
|
|
852
2094
|
/**
|
|
853
|
-
*
|
|
2095
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
854
2096
|
*/
|
|
855
|
-
|
|
2097
|
+
bill_until?: BillOnAcceptance.BillUntil;
|
|
856
2098
|
}
|
|
857
|
-
|
|
858
|
-
|
|
2099
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
2100
|
+
type EndBehavior = 'cancel' | 'release';
|
|
2101
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
2102
|
+
namespace AppliesTo {
|
|
2103
|
+
type Type = 'new_reference' | 'subscription_schedule';
|
|
2104
|
+
}
|
|
2105
|
+
namespace BillOnAcceptance {
|
|
2106
|
+
interface BillFrom {
|
|
859
2107
|
/**
|
|
860
|
-
*
|
|
2108
|
+
* Details of a Quote line to start the bill period from.
|
|
861
2109
|
*/
|
|
862
|
-
|
|
2110
|
+
line_starts_at?: BillFrom.LineStartsAt;
|
|
2111
|
+
/**
|
|
2112
|
+
* A precise Unix timestamp.
|
|
2113
|
+
*/
|
|
2114
|
+
timestamp?: number;
|
|
2115
|
+
/**
|
|
2116
|
+
* The type of method to specify the `bill_from` time.
|
|
2117
|
+
*/
|
|
2118
|
+
type: BillFrom.Type;
|
|
863
2119
|
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
2120
|
+
interface BillUntil {
|
|
2121
|
+
/**
|
|
2122
|
+
* Details of the duration over which to bill.
|
|
2123
|
+
*/
|
|
2124
|
+
duration?: BillUntil.Duration;
|
|
2125
|
+
/**
|
|
2126
|
+
* Details of a Quote line item from which to bill until.
|
|
2127
|
+
*/
|
|
2128
|
+
line_ends_at?: BillUntil.LineEndsAt;
|
|
2129
|
+
/**
|
|
2130
|
+
* A precise Unix timestamp.
|
|
2131
|
+
*/
|
|
2132
|
+
timestamp?: number;
|
|
2133
|
+
/**
|
|
2134
|
+
* The type of method to specify the `bill_until` time.
|
|
2135
|
+
*/
|
|
2136
|
+
type: BillUntil.Type;
|
|
2137
|
+
}
|
|
2138
|
+
namespace BillFrom {
|
|
2139
|
+
interface LineStartsAt {
|
|
2140
|
+
/**
|
|
2141
|
+
* The ID of a quote line.
|
|
2142
|
+
*/
|
|
2143
|
+
id?: string;
|
|
2144
|
+
/**
|
|
2145
|
+
* 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.
|
|
2146
|
+
*/
|
|
2147
|
+
index?: number;
|
|
2148
|
+
}
|
|
2149
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp';
|
|
2150
|
+
}
|
|
2151
|
+
namespace BillUntil {
|
|
2152
|
+
interface Duration {
|
|
2153
|
+
/**
|
|
2154
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2155
|
+
*/
|
|
2156
|
+
interval: Duration.Interval;
|
|
2157
|
+
/**
|
|
2158
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2159
|
+
*/
|
|
2160
|
+
interval_count: number;
|
|
2161
|
+
}
|
|
2162
|
+
interface LineEndsAt {
|
|
2163
|
+
/**
|
|
2164
|
+
* The ID of a quote line.
|
|
2165
|
+
*/
|
|
2166
|
+
id?: string;
|
|
2167
|
+
/**
|
|
2168
|
+
* 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.
|
|
2169
|
+
*/
|
|
2170
|
+
index?: number;
|
|
2171
|
+
}
|
|
2172
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice';
|
|
2173
|
+
namespace Duration {
|
|
2174
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2175
|
+
}
|
|
867
2176
|
}
|
|
868
2177
|
}
|
|
869
2178
|
}
|
|
@@ -875,6 +2184,10 @@ export interface QuoteRetrieveParams {
|
|
|
875
2184
|
expand?: Array<string>;
|
|
876
2185
|
}
|
|
877
2186
|
export interface QuoteUpdateParams {
|
|
2187
|
+
/**
|
|
2188
|
+
* Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
2189
|
+
*/
|
|
2190
|
+
allow_backdated_lines?: boolean;
|
|
878
2191
|
/**
|
|
879
2192
|
* 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.
|
|
880
2193
|
*/
|
|
@@ -935,6 +2248,10 @@ export interface QuoteUpdateParams {
|
|
|
935
2248
|
* 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.
|
|
936
2249
|
*/
|
|
937
2250
|
line_items?: Array<QuoteUpdateParams.LineItem>;
|
|
2251
|
+
/**
|
|
2252
|
+
* 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.
|
|
2253
|
+
*/
|
|
2254
|
+
lines?: Array<QuoteUpdateParams.Line>;
|
|
938
2255
|
/**
|
|
939
2256
|
* Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
940
2257
|
*/
|
|
@@ -947,6 +2264,10 @@ export interface QuoteUpdateParams {
|
|
|
947
2264
|
* 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.
|
|
948
2265
|
*/
|
|
949
2266
|
subscription_data?: QuoteUpdateParams.SubscriptionData;
|
|
2267
|
+
/**
|
|
2268
|
+
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
2269
|
+
*/
|
|
2270
|
+
subscription_data_overrides?: Emptyable<Array<QuoteUpdateParams.SubscriptionDataOverride>>;
|
|
950
2271
|
/**
|
|
951
2272
|
* The data with which to automatically create a Transfer for each of the invoices.
|
|
952
2273
|
*/
|
|
@@ -973,6 +2294,10 @@ export declare namespace QuoteUpdateParams {
|
|
|
973
2294
|
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
974
2295
|
*/
|
|
975
2296
|
discount?: string;
|
|
2297
|
+
/**
|
|
2298
|
+
* Details to determine how long the discount should be applied for.
|
|
2299
|
+
*/
|
|
2300
|
+
discount_end?: Discount.DiscountEnd;
|
|
976
2301
|
/**
|
|
977
2302
|
* ID of the promotion code to create a new discount for.
|
|
978
2303
|
*/
|
|
@@ -1014,24 +2339,136 @@ export declare namespace QuoteUpdateParams {
|
|
|
1014
2339
|
*/
|
|
1015
2340
|
tax_rates?: Emptyable<Array<string>>;
|
|
1016
2341
|
}
|
|
2342
|
+
interface Line {
|
|
2343
|
+
/**
|
|
2344
|
+
* An array of operations the quote line performs.
|
|
2345
|
+
*/
|
|
2346
|
+
actions?: Array<Line.Action>;
|
|
2347
|
+
/**
|
|
2348
|
+
* Details to identify the subscription schedule the quote line applies to.
|
|
2349
|
+
*/
|
|
2350
|
+
applies_to?: Line.AppliesTo;
|
|
2351
|
+
/**
|
|
2352
|
+
* 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.
|
|
2353
|
+
*/
|
|
2354
|
+
billing_cycle_anchor?: Line.BillingCycleAnchor;
|
|
2355
|
+
/**
|
|
2356
|
+
* 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.
|
|
2357
|
+
*/
|
|
2358
|
+
cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
|
|
2359
|
+
/**
|
|
2360
|
+
* 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.
|
|
2361
|
+
*/
|
|
2362
|
+
ends_at?: Line.EndsAt;
|
|
2363
|
+
/**
|
|
2364
|
+
* The ID of an existing line on the quote.
|
|
2365
|
+
*/
|
|
2366
|
+
id?: string;
|
|
2367
|
+
/**
|
|
2368
|
+
* 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.
|
|
2369
|
+
*/
|
|
2370
|
+
proration_behavior?: Line.ProrationBehavior;
|
|
2371
|
+
/**
|
|
2372
|
+
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
2373
|
+
*/
|
|
2374
|
+
set_pause_collection?: Line.SetPauseCollection;
|
|
2375
|
+
/**
|
|
2376
|
+
* Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
|
2377
|
+
*/
|
|
2378
|
+
set_schedule_end?: Line.SetScheduleEnd;
|
|
2379
|
+
/**
|
|
2380
|
+
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
2381
|
+
*/
|
|
2382
|
+
starts_at?: Line.StartsAt;
|
|
2383
|
+
/**
|
|
2384
|
+
* Settings related to subscription trials.
|
|
2385
|
+
*/
|
|
2386
|
+
trial_settings?: Line.TrialSettings;
|
|
2387
|
+
}
|
|
1017
2388
|
interface SubscriptionData {
|
|
2389
|
+
/**
|
|
2390
|
+
* Describes the period to bill for upon accepting the quote.
|
|
2391
|
+
*/
|
|
2392
|
+
bill_on_acceptance?: Emptyable<SubscriptionData.BillOnAcceptance>;
|
|
2393
|
+
/**
|
|
2394
|
+
* 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.
|
|
2395
|
+
*/
|
|
2396
|
+
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
2397
|
+
/**
|
|
2398
|
+
* When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
|
2399
|
+
*/
|
|
2400
|
+
billing_cycle_anchor?: Emptyable<'reset'>;
|
|
1018
2401
|
/**
|
|
1019
2402
|
* 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.
|
|
1020
2403
|
*/
|
|
1021
2404
|
description?: Emptyable<string>;
|
|
1022
2405
|
/**
|
|
1023
|
-
* 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.
|
|
2406
|
+
* 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.
|
|
1024
2407
|
*/
|
|
1025
2408
|
effective_date?: Emptyable<'current_period_end' | number>;
|
|
2409
|
+
/**
|
|
2410
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
2411
|
+
*/
|
|
2412
|
+
end_behavior?: SubscriptionData.EndBehavior;
|
|
1026
2413
|
/**
|
|
1027
2414
|
* Set of [key-value pairs](https://docs.stripe.com/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.
|
|
1028
2415
|
*/
|
|
1029
2416
|
metadata?: MetadataParam;
|
|
2417
|
+
/**
|
|
2418
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
2419
|
+
*/
|
|
2420
|
+
prebilling?: Emptyable<SubscriptionData.Prebilling>;
|
|
2421
|
+
/**
|
|
2422
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
2423
|
+
*
|
|
2424
|
+
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
2425
|
+
*
|
|
2426
|
+
* 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://docs.stripe.com/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
2427
|
+
*
|
|
2428
|
+
* Prorations can be disabled by passing `none`.
|
|
2429
|
+
*/
|
|
2430
|
+
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
1030
2431
|
/**
|
|
1031
2432
|
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
1032
2433
|
*/
|
|
1033
2434
|
trial_period_days?: Emptyable<number>;
|
|
1034
2435
|
}
|
|
2436
|
+
interface SubscriptionDataOverride {
|
|
2437
|
+
/**
|
|
2438
|
+
* Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
2439
|
+
*/
|
|
2440
|
+
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
2441
|
+
/**
|
|
2442
|
+
* Describes the period to bill for upon accepting the quote.
|
|
2443
|
+
*/
|
|
2444
|
+
bill_on_acceptance?: Emptyable<SubscriptionDataOverride.BillOnAcceptance>;
|
|
2445
|
+
/**
|
|
2446
|
+
* 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.
|
|
2447
|
+
*/
|
|
2448
|
+
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
2449
|
+
/**
|
|
2450
|
+
* The customer the Subscription Data override applies to.
|
|
2451
|
+
*/
|
|
2452
|
+
customer?: string;
|
|
2453
|
+
/**
|
|
2454
|
+
* 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.
|
|
2455
|
+
*/
|
|
2456
|
+
description?: Emptyable<string>;
|
|
2457
|
+
/**
|
|
2458
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
2459
|
+
*/
|
|
2460
|
+
end_behavior?: SubscriptionDataOverride.EndBehavior;
|
|
2461
|
+
/**
|
|
2462
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
2463
|
+
*
|
|
2464
|
+
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
2465
|
+
*
|
|
2466
|
+
* 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://docs.stripe.com/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
|
|
2467
|
+
*
|
|
2468
|
+
* Prorations can be disabled by passing `none`.
|
|
2469
|
+
*/
|
|
2470
|
+
proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
|
|
2471
|
+
}
|
|
1035
2472
|
interface TransferData {
|
|
1036
2473
|
/**
|
|
1037
2474
|
* 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.
|
|
@@ -1057,23 +2494,510 @@ export declare namespace QuoteUpdateParams {
|
|
|
1057
2494
|
*/
|
|
1058
2495
|
type: Liability.Type;
|
|
1059
2496
|
}
|
|
1060
|
-
namespace Liability {
|
|
1061
|
-
type Type = 'account' | 'self';
|
|
2497
|
+
namespace Liability {
|
|
2498
|
+
type Type = 'account' | 'self';
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
namespace Discount {
|
|
2502
|
+
interface DiscountEnd {
|
|
2503
|
+
/**
|
|
2504
|
+
* Time span for the redeemed discount.
|
|
2505
|
+
*/
|
|
2506
|
+
duration?: DiscountEnd.Duration;
|
|
2507
|
+
/**
|
|
2508
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2509
|
+
*/
|
|
2510
|
+
timestamp?: number;
|
|
2511
|
+
/**
|
|
2512
|
+
* The type of calculation made to determine when the discount ends.
|
|
2513
|
+
*/
|
|
2514
|
+
type: DiscountEnd.Type;
|
|
2515
|
+
}
|
|
2516
|
+
namespace DiscountEnd {
|
|
2517
|
+
interface Duration {
|
|
2518
|
+
/**
|
|
2519
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2520
|
+
*/
|
|
2521
|
+
interval: Duration.Interval;
|
|
2522
|
+
/**
|
|
2523
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2524
|
+
*/
|
|
2525
|
+
interval_count: number;
|
|
2526
|
+
}
|
|
2527
|
+
type Type = 'duration' | 'timestamp';
|
|
2528
|
+
namespace Duration {
|
|
2529
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
namespace InvoiceSettings {
|
|
2534
|
+
interface Issuer {
|
|
2535
|
+
/**
|
|
2536
|
+
* The connected account being referenced when `type` is `account`.
|
|
2537
|
+
*/
|
|
2538
|
+
account?: string;
|
|
2539
|
+
/**
|
|
2540
|
+
* Type of the account referenced in the request.
|
|
2541
|
+
*/
|
|
2542
|
+
type: Issuer.Type;
|
|
2543
|
+
}
|
|
2544
|
+
namespace Issuer {
|
|
2545
|
+
type Type = 'account' | 'self';
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
namespace Line {
|
|
2549
|
+
interface Action {
|
|
2550
|
+
/**
|
|
2551
|
+
* Details for the `add_discount` type.
|
|
2552
|
+
*/
|
|
2553
|
+
add_discount?: Action.AddDiscount;
|
|
2554
|
+
/**
|
|
2555
|
+
* Details for the `add_item` type.
|
|
2556
|
+
*/
|
|
2557
|
+
add_item?: Action.AddItem;
|
|
2558
|
+
/**
|
|
2559
|
+
* Details for the `add_metadata` type: specify a hash of key-value pairs.
|
|
2560
|
+
*/
|
|
2561
|
+
add_metadata?: {
|
|
2562
|
+
[key: string]: string;
|
|
2563
|
+
};
|
|
2564
|
+
/**
|
|
2565
|
+
* Details for the `remove_discount` type.
|
|
2566
|
+
*/
|
|
2567
|
+
remove_discount?: Action.RemoveDiscount;
|
|
2568
|
+
/**
|
|
2569
|
+
* Details for the `remove_item` type.
|
|
2570
|
+
*/
|
|
2571
|
+
remove_item?: Action.RemoveItem;
|
|
2572
|
+
/**
|
|
2573
|
+
* Details for the `remove_metadata` type: specify an array of metadata keys.
|
|
2574
|
+
*/
|
|
2575
|
+
remove_metadata?: Array<string>;
|
|
2576
|
+
/**
|
|
2577
|
+
* Details for the `set_discounts` type.
|
|
2578
|
+
*/
|
|
2579
|
+
set_discounts?: Array<Action.SetDiscount>;
|
|
2580
|
+
/**
|
|
2581
|
+
* Details for the `set_items` type.
|
|
2582
|
+
*/
|
|
2583
|
+
set_items?: Array<Action.SetItem>;
|
|
2584
|
+
/**
|
|
2585
|
+
* Details for the `set_metadata` type: specify an array of key-value pairs.
|
|
2586
|
+
*/
|
|
2587
|
+
set_metadata?: Emptyable<{
|
|
2588
|
+
[key: string]: string;
|
|
2589
|
+
}>;
|
|
2590
|
+
/**
|
|
2591
|
+
* The type of action the quote line performs.
|
|
2592
|
+
*/
|
|
2593
|
+
type: Action.Type;
|
|
2594
|
+
}
|
|
2595
|
+
interface AppliesTo {
|
|
2596
|
+
/**
|
|
2597
|
+
* 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.
|
|
2598
|
+
*/
|
|
2599
|
+
new_reference?: string;
|
|
2600
|
+
/**
|
|
2601
|
+
* The ID of the schedule the line applies to.
|
|
2602
|
+
*/
|
|
2603
|
+
subscription_schedule?: string;
|
|
2604
|
+
/**
|
|
2605
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
2606
|
+
*/
|
|
2607
|
+
type: AppliesTo.Type;
|
|
2608
|
+
}
|
|
2609
|
+
type BillingCycleAnchor = 'automatic' | 'line_starts_at';
|
|
2610
|
+
interface CancelSubscriptionSchedule {
|
|
2611
|
+
/**
|
|
2612
|
+
* Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
|
2613
|
+
*/
|
|
2614
|
+
cancel_at: 'line_starts_at';
|
|
2615
|
+
/**
|
|
2616
|
+
* 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`.
|
|
2617
|
+
*/
|
|
2618
|
+
invoice_now?: boolean;
|
|
2619
|
+
/**
|
|
2620
|
+
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
|
2621
|
+
*/
|
|
2622
|
+
prorate?: boolean;
|
|
2623
|
+
}
|
|
2624
|
+
interface EndsAt {
|
|
2625
|
+
/**
|
|
2626
|
+
* Use the `end` time of a given discount.
|
|
2627
|
+
*/
|
|
2628
|
+
discount_end?: EndsAt.DiscountEnd;
|
|
2629
|
+
/**
|
|
2630
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
2631
|
+
*/
|
|
2632
|
+
duration?: EndsAt.Duration;
|
|
2633
|
+
/**
|
|
2634
|
+
* A precise Unix timestamp.
|
|
2635
|
+
*/
|
|
2636
|
+
timestamp?: number;
|
|
2637
|
+
/**
|
|
2638
|
+
* Select a way to pass in `ends_at`.
|
|
2639
|
+
*/
|
|
2640
|
+
type: EndsAt.Type;
|
|
2641
|
+
}
|
|
2642
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
2643
|
+
interface SetPauseCollection {
|
|
2644
|
+
/**
|
|
2645
|
+
* Details of the pause_collection behavior to apply to the amendment.
|
|
2646
|
+
*/
|
|
2647
|
+
set?: SetPauseCollection.Set;
|
|
2648
|
+
/**
|
|
2649
|
+
* Determines the type of the pause_collection amendment.
|
|
2650
|
+
*/
|
|
2651
|
+
type: SetPauseCollection.Type;
|
|
2652
|
+
}
|
|
2653
|
+
type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
|
|
2654
|
+
interface StartsAt {
|
|
2655
|
+
/**
|
|
2656
|
+
* Use the `end` time of a given discount.
|
|
2657
|
+
*/
|
|
2658
|
+
discount_end?: StartsAt.DiscountEnd;
|
|
2659
|
+
/**
|
|
2660
|
+
* The timestamp the given line ends at.
|
|
2661
|
+
*/
|
|
2662
|
+
line_ends_at?: StartsAt.LineEndsAt;
|
|
2663
|
+
/**
|
|
2664
|
+
* A precise Unix timestamp.
|
|
2665
|
+
*/
|
|
2666
|
+
timestamp?: number;
|
|
2667
|
+
/**
|
|
2668
|
+
* Select a way to pass in `starts_at`.
|
|
2669
|
+
*/
|
|
2670
|
+
type: StartsAt.Type;
|
|
2671
|
+
}
|
|
2672
|
+
interface TrialSettings {
|
|
2673
|
+
/**
|
|
2674
|
+
* Defines how the subscription should behave when a trial ends.
|
|
2675
|
+
*/
|
|
2676
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
2677
|
+
}
|
|
2678
|
+
namespace Action {
|
|
2679
|
+
interface AddDiscount {
|
|
2680
|
+
/**
|
|
2681
|
+
* The coupon code to redeem.
|
|
2682
|
+
*/
|
|
2683
|
+
coupon?: string;
|
|
2684
|
+
/**
|
|
2685
|
+
* An ID of an existing discount for a coupon that was already redeemed.
|
|
2686
|
+
*/
|
|
2687
|
+
discount?: string;
|
|
2688
|
+
/**
|
|
2689
|
+
* Details to determine how long the discount should be applied for.
|
|
2690
|
+
*/
|
|
2691
|
+
discount_end?: AddDiscount.DiscountEnd;
|
|
2692
|
+
/**
|
|
2693
|
+
* 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.
|
|
2694
|
+
*/
|
|
2695
|
+
index?: number;
|
|
2696
|
+
/**
|
|
2697
|
+
* The promotion code to redeem.
|
|
2698
|
+
*/
|
|
2699
|
+
promotion_code?: string;
|
|
2700
|
+
}
|
|
2701
|
+
interface AddItem {
|
|
2702
|
+
/**
|
|
2703
|
+
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
2704
|
+
*/
|
|
2705
|
+
discounts?: Array<AddItem.Discount>;
|
|
2706
|
+
/**
|
|
2707
|
+
* Set of [key-value pairs](https://docs.stripe.com/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`.
|
|
2708
|
+
*/
|
|
2709
|
+
metadata?: MetadataParam;
|
|
2710
|
+
/**
|
|
2711
|
+
* The ID of the price object.
|
|
2712
|
+
*/
|
|
2713
|
+
price: string;
|
|
2714
|
+
/**
|
|
2715
|
+
* Quantity for this item.
|
|
2716
|
+
*/
|
|
2717
|
+
quantity?: number;
|
|
2718
|
+
/**
|
|
2719
|
+
* 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`.
|
|
2720
|
+
*/
|
|
2721
|
+
tax_rates?: Array<string>;
|
|
2722
|
+
/**
|
|
2723
|
+
* Options that configure the trial on the subscription item.
|
|
2724
|
+
*/
|
|
2725
|
+
trial?: AddItem.Trial;
|
|
2726
|
+
/**
|
|
2727
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
2728
|
+
*/
|
|
2729
|
+
trial_offer?: string;
|
|
2730
|
+
}
|
|
2731
|
+
interface RemoveDiscount {
|
|
2732
|
+
/**
|
|
2733
|
+
* The coupon code to remove from the `discounts` array.
|
|
2734
|
+
*/
|
|
2735
|
+
coupon?: string;
|
|
2736
|
+
/**
|
|
2737
|
+
* The ID of a discount to remove from the `discounts` array.
|
|
2738
|
+
*/
|
|
2739
|
+
discount?: string;
|
|
2740
|
+
/**
|
|
2741
|
+
* The ID of a promotion code to remove from the `discounts` array.
|
|
2742
|
+
*/
|
|
2743
|
+
promotion_code?: string;
|
|
2744
|
+
}
|
|
2745
|
+
interface RemoveItem {
|
|
2746
|
+
/**
|
|
2747
|
+
* ID of a price to remove.
|
|
2748
|
+
*/
|
|
2749
|
+
price: string;
|
|
2750
|
+
}
|
|
2751
|
+
interface SetDiscount {
|
|
2752
|
+
/**
|
|
2753
|
+
* The coupon code to replace the `discounts` array with.
|
|
2754
|
+
*/
|
|
2755
|
+
coupon?: string;
|
|
2756
|
+
/**
|
|
2757
|
+
* An ID of an existing discount to replace the `discounts` array with.
|
|
2758
|
+
*/
|
|
2759
|
+
discount?: string;
|
|
2760
|
+
/**
|
|
2761
|
+
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
2762
|
+
*/
|
|
2763
|
+
promotion_code?: string;
|
|
2764
|
+
}
|
|
2765
|
+
interface SetItem {
|
|
2766
|
+
/**
|
|
2767
|
+
* 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`.
|
|
2768
|
+
*/
|
|
2769
|
+
discounts?: Array<SetItem.Discount>;
|
|
2770
|
+
/**
|
|
2771
|
+
* 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`.
|
|
2772
|
+
*/
|
|
2773
|
+
metadata?: MetadataParam;
|
|
2774
|
+
/**
|
|
2775
|
+
* The ID of the price object.
|
|
2776
|
+
*/
|
|
2777
|
+
price: string;
|
|
2778
|
+
/**
|
|
2779
|
+
* 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`.
|
|
2780
|
+
*/
|
|
2781
|
+
quantity?: number;
|
|
2782
|
+
/**
|
|
2783
|
+
* 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`.
|
|
2784
|
+
*/
|
|
2785
|
+
tax_rates?: Array<string>;
|
|
2786
|
+
/**
|
|
2787
|
+
* 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`.
|
|
2788
|
+
*/
|
|
2789
|
+
trial?: SetItem.Trial;
|
|
2790
|
+
/**
|
|
2791
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
2792
|
+
*/
|
|
2793
|
+
trial_offer?: string;
|
|
2794
|
+
}
|
|
2795
|
+
type Type = 'add_discount' | 'add_item' | 'add_metadata' | 'clear_discounts' | 'clear_metadata' | 'remove_discount' | 'remove_item' | 'remove_metadata' | 'set_discounts' | 'set_items' | 'set_metadata';
|
|
2796
|
+
namespace AddDiscount {
|
|
2797
|
+
interface DiscountEnd {
|
|
2798
|
+
/**
|
|
2799
|
+
* The type of calculation made to determine when the discount ends.
|
|
2800
|
+
*/
|
|
2801
|
+
type: 'line_ends_at';
|
|
2802
|
+
}
|
|
2803
|
+
}
|
|
2804
|
+
namespace AddItem {
|
|
2805
|
+
interface Discount {
|
|
2806
|
+
/**
|
|
2807
|
+
* ID of the coupon to create a new discount for.
|
|
2808
|
+
*/
|
|
2809
|
+
coupon?: string;
|
|
2810
|
+
/**
|
|
2811
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2812
|
+
*/
|
|
2813
|
+
discount?: string;
|
|
2814
|
+
/**
|
|
2815
|
+
* Details to determine how long the discount should be applied for.
|
|
2816
|
+
*/
|
|
2817
|
+
discount_end?: Discount.DiscountEnd;
|
|
2818
|
+
/**
|
|
2819
|
+
* ID of the promotion code to create a new discount for.
|
|
2820
|
+
*/
|
|
2821
|
+
promotion_code?: string;
|
|
2822
|
+
}
|
|
2823
|
+
interface Trial {
|
|
2824
|
+
/**
|
|
2825
|
+
* 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.
|
|
2826
|
+
*/
|
|
2827
|
+
converts_to?: Array<string>;
|
|
2828
|
+
/**
|
|
2829
|
+
* Determines the type of trial for this item.
|
|
2830
|
+
*/
|
|
2831
|
+
type: Trial.Type;
|
|
2832
|
+
}
|
|
2833
|
+
namespace Discount {
|
|
2834
|
+
interface DiscountEnd {
|
|
2835
|
+
/**
|
|
2836
|
+
* Time span for the redeemed discount.
|
|
2837
|
+
*/
|
|
2838
|
+
duration?: DiscountEnd.Duration;
|
|
2839
|
+
/**
|
|
2840
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2841
|
+
*/
|
|
2842
|
+
timestamp?: number;
|
|
2843
|
+
/**
|
|
2844
|
+
* The type of calculation made to determine when the discount ends.
|
|
2845
|
+
*/
|
|
2846
|
+
type: DiscountEnd.Type;
|
|
2847
|
+
}
|
|
2848
|
+
namespace DiscountEnd {
|
|
2849
|
+
interface Duration {
|
|
2850
|
+
/**
|
|
2851
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2852
|
+
*/
|
|
2853
|
+
interval: Duration.Interval;
|
|
2854
|
+
/**
|
|
2855
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2856
|
+
*/
|
|
2857
|
+
interval_count: number;
|
|
2858
|
+
}
|
|
2859
|
+
type Type = 'duration' | 'timestamp';
|
|
2860
|
+
namespace Duration {
|
|
2861
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2862
|
+
}
|
|
2863
|
+
}
|
|
2864
|
+
}
|
|
2865
|
+
namespace Trial {
|
|
2866
|
+
type Type = 'free' | 'paid';
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2869
|
+
namespace SetItem {
|
|
2870
|
+
interface Discount {
|
|
2871
|
+
/**
|
|
2872
|
+
* ID of the coupon to create a new discount for.
|
|
2873
|
+
*/
|
|
2874
|
+
coupon?: string;
|
|
2875
|
+
/**
|
|
2876
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2877
|
+
*/
|
|
2878
|
+
discount?: string;
|
|
2879
|
+
/**
|
|
2880
|
+
* Details to determine how long the discount should be applied for.
|
|
2881
|
+
*/
|
|
2882
|
+
discount_end?: Discount.DiscountEnd;
|
|
2883
|
+
/**
|
|
2884
|
+
* ID of the promotion code to create a new discount for.
|
|
2885
|
+
*/
|
|
2886
|
+
promotion_code?: string;
|
|
2887
|
+
}
|
|
2888
|
+
interface Trial {
|
|
2889
|
+
/**
|
|
2890
|
+
* 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.
|
|
2891
|
+
*/
|
|
2892
|
+
converts_to?: Array<string>;
|
|
2893
|
+
/**
|
|
2894
|
+
* Determines the type of trial for this item.
|
|
2895
|
+
*/
|
|
2896
|
+
type: Trial.Type;
|
|
2897
|
+
}
|
|
2898
|
+
namespace Discount {
|
|
2899
|
+
interface DiscountEnd {
|
|
2900
|
+
/**
|
|
2901
|
+
* Time span for the redeemed discount.
|
|
2902
|
+
*/
|
|
2903
|
+
duration?: DiscountEnd.Duration;
|
|
2904
|
+
/**
|
|
2905
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2906
|
+
*/
|
|
2907
|
+
timestamp?: number;
|
|
2908
|
+
/**
|
|
2909
|
+
* The type of calculation made to determine when the discount ends.
|
|
2910
|
+
*/
|
|
2911
|
+
type: DiscountEnd.Type;
|
|
2912
|
+
}
|
|
2913
|
+
namespace DiscountEnd {
|
|
2914
|
+
interface Duration {
|
|
2915
|
+
/**
|
|
2916
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2917
|
+
*/
|
|
2918
|
+
interval: Duration.Interval;
|
|
2919
|
+
/**
|
|
2920
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2921
|
+
*/
|
|
2922
|
+
interval_count: number;
|
|
2923
|
+
}
|
|
2924
|
+
type Type = 'duration' | 'timestamp';
|
|
2925
|
+
namespace Duration {
|
|
2926
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
namespace Trial {
|
|
2931
|
+
type Type = 'free' | 'paid';
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
}
|
|
2935
|
+
namespace AppliesTo {
|
|
2936
|
+
type Type = 'new_reference' | 'subscription_schedule';
|
|
1062
2937
|
}
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
2938
|
+
namespace EndsAt {
|
|
2939
|
+
interface DiscountEnd {
|
|
2940
|
+
/**
|
|
2941
|
+
* The ID of a specific discount.
|
|
2942
|
+
*/
|
|
2943
|
+
discount: string;
|
|
2944
|
+
}
|
|
2945
|
+
interface Duration {
|
|
2946
|
+
/**
|
|
2947
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2948
|
+
*/
|
|
2949
|
+
interval: Duration.Interval;
|
|
2950
|
+
/**
|
|
2951
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2952
|
+
*/
|
|
2953
|
+
interval_count: number;
|
|
2954
|
+
}
|
|
2955
|
+
type Type = 'billing_period_end' | 'discount_end' | 'duration' | 'quote_acceptance_date' | 'schedule_end' | 'timestamp' | 'upcoming_invoice';
|
|
2956
|
+
namespace Duration {
|
|
2957
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2958
|
+
}
|
|
1074
2959
|
}
|
|
1075
|
-
namespace
|
|
1076
|
-
|
|
2960
|
+
namespace SetPauseCollection {
|
|
2961
|
+
interface Set {
|
|
2962
|
+
/**
|
|
2963
|
+
* The payment collection behavior for this subscription while paused.
|
|
2964
|
+
*/
|
|
2965
|
+
behavior: Set.Behavior;
|
|
2966
|
+
}
|
|
2967
|
+
type Type = 'remove' | 'set';
|
|
2968
|
+
namespace Set {
|
|
2969
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
namespace StartsAt {
|
|
2973
|
+
interface DiscountEnd {
|
|
2974
|
+
/**
|
|
2975
|
+
* The ID of a specific discount.
|
|
2976
|
+
*/
|
|
2977
|
+
discount: string;
|
|
2978
|
+
}
|
|
2979
|
+
interface LineEndsAt {
|
|
2980
|
+
/**
|
|
2981
|
+
* The ID of a quote line.
|
|
2982
|
+
*/
|
|
2983
|
+
id?: string;
|
|
2984
|
+
/**
|
|
2985
|
+
* 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.
|
|
2986
|
+
*/
|
|
2987
|
+
index?: number;
|
|
2988
|
+
}
|
|
2989
|
+
type Type = 'discount_end' | 'line_ends_at' | 'now' | 'quote_acceptance_date' | 'schedule_end' | 'timestamp' | 'upcoming_invoice';
|
|
2990
|
+
}
|
|
2991
|
+
namespace TrialSettings {
|
|
2992
|
+
interface EndBehavior {
|
|
2993
|
+
/**
|
|
2994
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
2995
|
+
*/
|
|
2996
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
2997
|
+
}
|
|
2998
|
+
namespace EndBehavior {
|
|
2999
|
+
type ProrateUpFront = 'defer' | 'include';
|
|
3000
|
+
}
|
|
1077
3001
|
}
|
|
1078
3002
|
}
|
|
1079
3003
|
namespace LineItem {
|
|
@@ -1086,6 +3010,10 @@ export declare namespace QuoteUpdateParams {
|
|
|
1086
3010
|
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1087
3011
|
*/
|
|
1088
3012
|
discount?: string;
|
|
3013
|
+
/**
|
|
3014
|
+
* Details to determine how long the discount should be applied for.
|
|
3015
|
+
*/
|
|
3016
|
+
discount_end?: Discount.DiscountEnd;
|
|
1089
3017
|
/**
|
|
1090
3018
|
* ID of the promotion code to create a new discount for.
|
|
1091
3019
|
*/
|
|
@@ -1117,6 +3045,38 @@ export declare namespace QuoteUpdateParams {
|
|
|
1117
3045
|
*/
|
|
1118
3046
|
unit_amount_decimal?: Decimal;
|
|
1119
3047
|
}
|
|
3048
|
+
namespace Discount {
|
|
3049
|
+
interface DiscountEnd {
|
|
3050
|
+
/**
|
|
3051
|
+
* Time span for the redeemed discount.
|
|
3052
|
+
*/
|
|
3053
|
+
duration?: DiscountEnd.Duration;
|
|
3054
|
+
/**
|
|
3055
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3056
|
+
*/
|
|
3057
|
+
timestamp?: number;
|
|
3058
|
+
/**
|
|
3059
|
+
* The type of calculation made to determine when the discount ends.
|
|
3060
|
+
*/
|
|
3061
|
+
type: DiscountEnd.Type;
|
|
3062
|
+
}
|
|
3063
|
+
namespace DiscountEnd {
|
|
3064
|
+
interface Duration {
|
|
3065
|
+
/**
|
|
3066
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3067
|
+
*/
|
|
3068
|
+
interval: Duration.Interval;
|
|
3069
|
+
/**
|
|
3070
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3071
|
+
*/
|
|
3072
|
+
interval_count: number;
|
|
3073
|
+
}
|
|
3074
|
+
type Type = 'duration' | 'timestamp';
|
|
3075
|
+
namespace Duration {
|
|
3076
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
}
|
|
1120
3080
|
namespace PriceData {
|
|
1121
3081
|
interface Recurring {
|
|
1122
3082
|
/**
|
|
@@ -1134,6 +3094,205 @@ export declare namespace QuoteUpdateParams {
|
|
|
1134
3094
|
}
|
|
1135
3095
|
}
|
|
1136
3096
|
}
|
|
3097
|
+
namespace SubscriptionData {
|
|
3098
|
+
interface BillOnAcceptance {
|
|
3099
|
+
/**
|
|
3100
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
3101
|
+
*/
|
|
3102
|
+
bill_from?: BillOnAcceptance.BillFrom;
|
|
3103
|
+
/**
|
|
3104
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
3105
|
+
*/
|
|
3106
|
+
bill_until?: BillOnAcceptance.BillUntil;
|
|
3107
|
+
}
|
|
3108
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
3109
|
+
type EndBehavior = 'cancel' | 'release';
|
|
3110
|
+
interface Prebilling {
|
|
3111
|
+
/**
|
|
3112
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
3113
|
+
*/
|
|
3114
|
+
iterations: number;
|
|
3115
|
+
}
|
|
3116
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
3117
|
+
namespace BillOnAcceptance {
|
|
3118
|
+
interface BillFrom {
|
|
3119
|
+
/**
|
|
3120
|
+
* Details of a Quote line to start the bill period from.
|
|
3121
|
+
*/
|
|
3122
|
+
line_starts_at?: BillFrom.LineStartsAt;
|
|
3123
|
+
/**
|
|
3124
|
+
* A precise Unix timestamp.
|
|
3125
|
+
*/
|
|
3126
|
+
timestamp?: number;
|
|
3127
|
+
/**
|
|
3128
|
+
* The type of method to specify the `bill_from` time.
|
|
3129
|
+
*/
|
|
3130
|
+
type: BillFrom.Type;
|
|
3131
|
+
}
|
|
3132
|
+
interface BillUntil {
|
|
3133
|
+
/**
|
|
3134
|
+
* Details of the duration over which to bill.
|
|
3135
|
+
*/
|
|
3136
|
+
duration?: BillUntil.Duration;
|
|
3137
|
+
/**
|
|
3138
|
+
* Details of a Quote line item from which to bill until.
|
|
3139
|
+
*/
|
|
3140
|
+
line_ends_at?: BillUntil.LineEndsAt;
|
|
3141
|
+
/**
|
|
3142
|
+
* A precise Unix timestamp.
|
|
3143
|
+
*/
|
|
3144
|
+
timestamp?: number;
|
|
3145
|
+
/**
|
|
3146
|
+
* The type of method to specify the `bill_until` time.
|
|
3147
|
+
*/
|
|
3148
|
+
type: BillUntil.Type;
|
|
3149
|
+
}
|
|
3150
|
+
namespace BillFrom {
|
|
3151
|
+
interface LineStartsAt {
|
|
3152
|
+
/**
|
|
3153
|
+
* The ID of a quote line.
|
|
3154
|
+
*/
|
|
3155
|
+
id?: string;
|
|
3156
|
+
/**
|
|
3157
|
+
* 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.
|
|
3158
|
+
*/
|
|
3159
|
+
index?: number;
|
|
3160
|
+
}
|
|
3161
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp';
|
|
3162
|
+
}
|
|
3163
|
+
namespace BillUntil {
|
|
3164
|
+
interface Duration {
|
|
3165
|
+
/**
|
|
3166
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3167
|
+
*/
|
|
3168
|
+
interval: Duration.Interval;
|
|
3169
|
+
/**
|
|
3170
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3171
|
+
*/
|
|
3172
|
+
interval_count: number;
|
|
3173
|
+
}
|
|
3174
|
+
interface LineEndsAt {
|
|
3175
|
+
/**
|
|
3176
|
+
* The ID of a quote line.
|
|
3177
|
+
*/
|
|
3178
|
+
id?: string;
|
|
3179
|
+
/**
|
|
3180
|
+
* 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.
|
|
3181
|
+
*/
|
|
3182
|
+
index?: number;
|
|
3183
|
+
}
|
|
3184
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice';
|
|
3185
|
+
namespace Duration {
|
|
3186
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
namespace SubscriptionDataOverride {
|
|
3192
|
+
interface AppliesTo {
|
|
3193
|
+
/**
|
|
3194
|
+
* 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.
|
|
3195
|
+
*/
|
|
3196
|
+
new_reference?: string;
|
|
3197
|
+
/**
|
|
3198
|
+
* The ID of the schedule the line applies to.
|
|
3199
|
+
*/
|
|
3200
|
+
subscription_schedule?: string;
|
|
3201
|
+
/**
|
|
3202
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
3203
|
+
*/
|
|
3204
|
+
type: AppliesTo.Type;
|
|
3205
|
+
}
|
|
3206
|
+
interface BillOnAcceptance {
|
|
3207
|
+
/**
|
|
3208
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
3209
|
+
*/
|
|
3210
|
+
bill_from?: BillOnAcceptance.BillFrom;
|
|
3211
|
+
/**
|
|
3212
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
3213
|
+
*/
|
|
3214
|
+
bill_until?: BillOnAcceptance.BillUntil;
|
|
3215
|
+
}
|
|
3216
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
3217
|
+
type EndBehavior = 'cancel' | 'release';
|
|
3218
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
3219
|
+
namespace AppliesTo {
|
|
3220
|
+
type Type = 'new_reference' | 'subscription_schedule';
|
|
3221
|
+
}
|
|
3222
|
+
namespace BillOnAcceptance {
|
|
3223
|
+
interface BillFrom {
|
|
3224
|
+
/**
|
|
3225
|
+
* Details of a Quote line to start the bill period from.
|
|
3226
|
+
*/
|
|
3227
|
+
line_starts_at?: BillFrom.LineStartsAt;
|
|
3228
|
+
/**
|
|
3229
|
+
* A precise Unix timestamp.
|
|
3230
|
+
*/
|
|
3231
|
+
timestamp?: number;
|
|
3232
|
+
/**
|
|
3233
|
+
* The type of method to specify the `bill_from` time.
|
|
3234
|
+
*/
|
|
3235
|
+
type: BillFrom.Type;
|
|
3236
|
+
}
|
|
3237
|
+
interface BillUntil {
|
|
3238
|
+
/**
|
|
3239
|
+
* Details of the duration over which to bill.
|
|
3240
|
+
*/
|
|
3241
|
+
duration?: BillUntil.Duration;
|
|
3242
|
+
/**
|
|
3243
|
+
* Details of a Quote line item from which to bill until.
|
|
3244
|
+
*/
|
|
3245
|
+
line_ends_at?: BillUntil.LineEndsAt;
|
|
3246
|
+
/**
|
|
3247
|
+
* A precise Unix timestamp.
|
|
3248
|
+
*/
|
|
3249
|
+
timestamp?: number;
|
|
3250
|
+
/**
|
|
3251
|
+
* The type of method to specify the `bill_until` time.
|
|
3252
|
+
*/
|
|
3253
|
+
type: BillUntil.Type;
|
|
3254
|
+
}
|
|
3255
|
+
namespace BillFrom {
|
|
3256
|
+
interface LineStartsAt {
|
|
3257
|
+
/**
|
|
3258
|
+
* The ID of a quote line.
|
|
3259
|
+
*/
|
|
3260
|
+
id?: string;
|
|
3261
|
+
/**
|
|
3262
|
+
* 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.
|
|
3263
|
+
*/
|
|
3264
|
+
index?: number;
|
|
3265
|
+
}
|
|
3266
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp';
|
|
3267
|
+
}
|
|
3268
|
+
namespace BillUntil {
|
|
3269
|
+
interface Duration {
|
|
3270
|
+
/**
|
|
3271
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3272
|
+
*/
|
|
3273
|
+
interval: Duration.Interval;
|
|
3274
|
+
/**
|
|
3275
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3276
|
+
*/
|
|
3277
|
+
interval_count: number;
|
|
3278
|
+
}
|
|
3279
|
+
interface LineEndsAt {
|
|
3280
|
+
/**
|
|
3281
|
+
* The ID of a quote line.
|
|
3282
|
+
*/
|
|
3283
|
+
id?: string;
|
|
3284
|
+
/**
|
|
3285
|
+
* 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.
|
|
3286
|
+
*/
|
|
3287
|
+
index?: number;
|
|
3288
|
+
}
|
|
3289
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice';
|
|
3290
|
+
namespace Duration {
|
|
3291
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3292
|
+
}
|
|
3293
|
+
}
|
|
3294
|
+
}
|
|
3295
|
+
}
|
|
1137
3296
|
}
|
|
1138
3297
|
export interface QuoteListParams extends PaginationParams {
|
|
1139
3298
|
/**
|
|
@@ -1148,6 +3307,10 @@ export interface QuoteListParams extends PaginationParams {
|
|
|
1148
3307
|
* Specifies which fields in the response should be expanded.
|
|
1149
3308
|
*/
|
|
1150
3309
|
expand?: Array<string>;
|
|
3310
|
+
/**
|
|
3311
|
+
* The subscription which the quote updates.
|
|
3312
|
+
*/
|
|
3313
|
+
from_subscription?: string;
|
|
1151
3314
|
/**
|
|
1152
3315
|
* The status of the quote.
|
|
1153
3316
|
*/
|
|
@@ -1158,7 +3321,7 @@ export interface QuoteListParams extends PaginationParams {
|
|
|
1158
3321
|
test_clock?: string;
|
|
1159
3322
|
}
|
|
1160
3323
|
export declare namespace QuoteListParams {
|
|
1161
|
-
type Status = 'accepted' | 'canceled' | 'draft' | 'open';
|
|
3324
|
+
type Status = 'accepted' | 'accepting' | 'canceled' | 'draft' | 'open' | 'stale';
|
|
1162
3325
|
}
|
|
1163
3326
|
export interface QuoteAcceptParams {
|
|
1164
3327
|
/**
|
|
@@ -1182,6 +3345,12 @@ export interface QuoteFinalizeQuoteParams {
|
|
|
1182
3345
|
*/
|
|
1183
3346
|
expires_at?: number;
|
|
1184
3347
|
}
|
|
3348
|
+
export interface QuoteListPreviewInvoiceLinesParams extends PaginationParams {
|
|
3349
|
+
/**
|
|
3350
|
+
* Specifies which fields in the response should be expanded.
|
|
3351
|
+
*/
|
|
3352
|
+
expand?: Array<string>;
|
|
3353
|
+
}
|
|
1185
3354
|
export interface QuoteListComputedUpfrontLineItemsParams extends PaginationParams {
|
|
1186
3355
|
/**
|
|
1187
3356
|
* Specifies which fields in the response should be expanded.
|
|
@@ -1194,9 +3363,49 @@ export interface QuoteListLineItemsParams extends PaginationParams {
|
|
|
1194
3363
|
*/
|
|
1195
3364
|
expand?: Array<string>;
|
|
1196
3365
|
}
|
|
3366
|
+
export interface QuoteListLinesParams extends PaginationParams {
|
|
3367
|
+
/**
|
|
3368
|
+
* Specifies which fields in the response should be expanded.
|
|
3369
|
+
*/
|
|
3370
|
+
expand?: Array<string>;
|
|
3371
|
+
}
|
|
3372
|
+
export interface QuoteListPreviewInvoicesParams extends PaginationParams {
|
|
3373
|
+
/**
|
|
3374
|
+
* Specifies which fields in the response should be expanded.
|
|
3375
|
+
*/
|
|
3376
|
+
expand?: Array<string>;
|
|
3377
|
+
}
|
|
3378
|
+
export interface QuoteListPreviewSubscriptionSchedulesParams extends PaginationParams {
|
|
3379
|
+
/**
|
|
3380
|
+
* Specifies which fields in the response should be expanded.
|
|
3381
|
+
*/
|
|
3382
|
+
expand?: Array<string>;
|
|
3383
|
+
}
|
|
3384
|
+
export interface QuoteMarkDraftParams {
|
|
3385
|
+
/**
|
|
3386
|
+
* Specifies which fields in the response should be expanded.
|
|
3387
|
+
*/
|
|
3388
|
+
expand?: Array<string>;
|
|
3389
|
+
}
|
|
3390
|
+
export interface QuoteMarkStaleParams {
|
|
3391
|
+
/**
|
|
3392
|
+
* Specifies which fields in the response should be expanded.
|
|
3393
|
+
*/
|
|
3394
|
+
expand?: Array<string>;
|
|
3395
|
+
/**
|
|
3396
|
+
* Reason the Quote is being marked stale.
|
|
3397
|
+
*/
|
|
3398
|
+
reason?: string;
|
|
3399
|
+
}
|
|
1197
3400
|
export interface QuotePdfParams {
|
|
1198
3401
|
/**
|
|
1199
3402
|
* Specifies which fields in the response should be expanded.
|
|
1200
3403
|
*/
|
|
1201
3404
|
expand?: Array<string>;
|
|
1202
3405
|
}
|
|
3406
|
+
export interface QuoteReestimateParams {
|
|
3407
|
+
/**
|
|
3408
|
+
* Specifies which fields in the response should be expanded.
|
|
3409
|
+
*/
|
|
3410
|
+
expand?: Array<string>;
|
|
3411
|
+
}
|