stripe 23.1.0 → 23.2.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 +1914 -4850
- package/README.md +42 -58
- package/VERSION +1 -1
- package/cjs/Error.d.ts +6 -0
- package/cjs/Error.js +17 -1
- package/cjs/Error.js.map +1 -1
- package/cjs/StripeEventNotificationHandler.js +54 -0
- package/cjs/StripeEventNotificationHandler.js.map +1 -1
- package/cjs/Types.d.ts +4 -2
- package/cjs/Types.js.map +1 -1
- package/cjs/apiVersion.d.ts +2 -2
- package/cjs/apiVersion.js +2 -2
- 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 +226 -0
- package/cjs/resources/AccountSessions.js.map +1 -1
- package/cjs/resources/Accounts.d.ts +625 -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/BalanceSettings.d.ts +18 -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 +85 -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 +194 -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 +102 -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 +141 -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 +17 -0
- package/cjs/resources/Charges.d.ts +3077 -70
- package/cjs/resources/Checkout/Sessions.d.ts +351 -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 +20 -1
- package/cjs/resources/Customers.js +14 -0
- package/cjs/resources/Customers.js.map +1 -1
- package/cjs/resources/Disputes.d.ts +14 -0
- package/cjs/resources/Events.d.ts +614 -3
- 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 +69 -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 +46 -1
- package/cjs/resources/FinancialConnections/Authorizations.js +11 -0
- package/cjs/resources/FinancialConnections/Authorizations.js.map +1 -1
- package/cjs/resources/FinancialConnections/Institutions.d.ts +99 -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 +124 -9
- package/cjs/resources/FinancialConnections/index.d.ts +21 -9
- package/cjs/resources/FinancialConnections/index.js +4 -0
- package/cjs/resources/FinancialConnections/index.js.map +1 -1
- package/cjs/resources/FxQuotes.d.ts +216 -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 +1257 -10
- package/cjs/resources/Invoices.js +41 -0
- package/cjs/resources/Invoices.js.map +1 -1
- package/cjs/resources/Issuing/Authorizations.d.ts +13 -0
- package/cjs/resources/Issuing/Cardholders.d.ts +19 -1
- package/cjs/resources/Issuing/Cards.d.ts +13 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.d.ts +638 -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 +93 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +23 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js.map +1 -0
- package/cjs/resources/Issuing/Disputes.d.ts +13 -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 +83 -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 +22 -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 +36 -2
- 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 +4696 -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 +13832 -2816
- package/cjs/resources/PaymentIntents.js +27 -0
- package/cjs/resources/PaymentIntents.js.map +1 -1
- package/cjs/resources/PaymentLinks.d.ts +3 -3
- package/cjs/resources/PaymentMethodConfigurations.d.ts +350 -0
- package/cjs/resources/PaymentMethods.d.ts +181 -3
- package/cjs/resources/PaymentMethods.js.map +1 -1
- package/cjs/resources/PaymentPlans.d.ts +427 -0
- package/cjs/resources/PaymentPlans.js +35 -0
- package/cjs/resources/PaymentPlans.js.map +1 -0
- package/cjs/resources/PaymentRecords.d.ts +82 -0
- package/cjs/resources/Persons.d.ts +2 -2
- package/cjs/resources/Prices.d.ts +36 -0
- package/cjs/resources/Privacy/RedactionJobValidationErrors.d.ts +36 -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 +227 -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 +2 -2
- 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 +1170 -0
- package/cjs/resources/QuotePreviewInvoices.js +4 -0
- package/cjs/resources/QuotePreviewInvoices.js.map +1 -0
- package/cjs/resources/QuotePreviewSubscriptionSchedules.d.ts +924 -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/BillingEvaluations.d.ts +374 -0
- package/cjs/resources/Radar/BillingEvaluations.js +15 -0
- package/cjs/resources/Radar/BillingEvaluations.js.map +1 -0
- package/cjs/resources/Radar/PaymentEvaluations.d.ts +1 -1
- package/cjs/resources/Radar/ValueListItems.d.ts +31 -1
- package/cjs/resources/Radar/index.d.ts +21 -16
- package/cjs/resources/Radar/index.js +2 -0
- package/cjs/resources/Radar/index.js.map +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 +41 -1
- package/cjs/resources/Reserve/Plans.js +19 -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 +18 -6
- package/cjs/resources/Reserve/index.js +9 -0
- package/cjs/resources/Reserve/index.js.map +1 -1
- package/cjs/resources/SetupAttempts.d.ts +26 -1
- package/cjs/resources/SetupIntents.d.ts +394 -11
- package/cjs/resources/SharedPayment/GrantedTokens.d.ts +418 -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 +330 -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 +29 -1
- package/cjs/resources/SubscriptionItems.d.ts +114 -0
- package/cjs/resources/SubscriptionSchedules.d.ts +1157 -5
- package/cjs/resources/SubscriptionSchedules.js +6 -0
- package/cjs/resources/SubscriptionSchedules.js.map +1 -1
- package/cjs/resources/Subscriptions.d.ts +388 -6
- package/cjs/resources/Subscriptions.js +42 -0
- package/cjs/resources/Subscriptions.js.map +1 -1
- package/cjs/resources/Tax/Forms.d.ts +228 -0
- package/cjs/resources/Tax/Forms.js +32 -0
- package/cjs/resources/Tax/Forms.js.map +1 -0
- package/cjs/resources/Tax/Registrations.d.ts +25 -2
- package/cjs/resources/Tax/index.d.ts +24 -17
- package/cjs/resources/Tax/index.js +2 -0
- package/cjs/resources/Tax/index.js.map +1 -1
- package/cjs/resources/Terminal/ReaderCollectedData.d.ts +50 -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 +95 -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/Tokens.d.ts +15 -0
- 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 +26 -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 +72 -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 +281 -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 +958 -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 +238 -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 +162 -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/AccountTokens.d.ts +28 -1
- package/cjs/resources/V2/Core/Accounts.d.ts +1465 -71
- package/cjs/resources/V2/Core/ApprovalRequests.d.ts +378 -0
- package/cjs/resources/V2/Core/ApprovalRequests.js +39 -0
- package/cjs/resources/V2/Core/ApprovalRequests.js.map +1 -0
- package/cjs/resources/V2/Core/BatchJobs.d.ts +392 -0
- package/cjs/resources/V2/Core/BatchJobs.js +252 -0
- package/cjs/resources/V2/Core/BatchJobs.js.map +1 -0
- package/cjs/resources/V2/Core/Events.d.ts +1009 -5
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.d.ts +117 -0
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js.map +1 -1
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.d.ts +27 -0
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js.map +1 -1
- package/cjs/resources/V2/Core/index.d.ts +24 -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/QueryRuns.d.ts +299 -0
- package/cjs/resources/V2/Data/QueryRuns.js +51 -0
- package/cjs/resources/V2/Data/QueryRuns.js.map +1 -0
- package/cjs/resources/V2/Data/ReportRuns.d.ts +303 -0
- package/cjs/resources/V2/Data/ReportRuns.js +53 -0
- package/cjs/resources/V2/Data/ReportRuns.js.map +1 -0
- package/cjs/resources/V2/Data/Reporting/QueryRuns.d.ts +152 -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/Reports.d.ts +140 -0
- package/cjs/resources/V2/Data/Reports.js +25 -0
- package/cjs/resources/V2/Data/Reports.js.map +1 -0
- package/cjs/resources/V2/Data/Schemas.d.ts +161 -0
- package/cjs/resources/V2/Data/Schemas.js +23 -0
- package/cjs/resources/V2/Data/Schemas.js.map +1 -0
- package/cjs/resources/V2/Data/index.d.ts +34 -0
- package/cjs/resources/V2/Data/index.js +21 -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 +163 -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 +120 -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/Iam/ActivityLogs.d.ts +377 -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 +6 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.d.ts +102 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +15 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js.map +1 -1
- package/cjs/resources/V2/MoneyManagement/FinancialAddressGeneratedMicrodeposits.d.ts +19 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAddressGeneratedMicrodeposits.js +4 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAddressGeneratedMicrodeposits.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.d.ts +4 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +356 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +23 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.d.ts +79 -1
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.d.ts +96 -2
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.d.ts +418 -0
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +40 -0
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js.map +1 -0
- package/cjs/resources/V2/MoneyManagement/PayoutIntents.d.ts +2 -2
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.d.ts +66 -1
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +9 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js.map +1 -1
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.d.ts +6 -2
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.d.ts +163 -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/RecipientVerifications.d.ts +5 -1
- package/cjs/resources/V2/MoneyManagement/TestHelpers/FinancialAddresses.d.ts +15 -1
- package/cjs/resources/V2/MoneyManagement/TestHelpers/FinancialAddresses.js +7 -0
- package/cjs/resources/V2/MoneyManagement/TestHelpers/FinancialAddresses.js.map +1 -1
- package/cjs/resources/V2/MoneyManagement/index.d.ts +63 -37
- package/cjs/resources/V2/MoneyManagement/index.js +6 -0
- package/cjs/resources/V2/MoneyManagement/index.js.map +1 -1
- package/cjs/resources/V2/Network/BusinessProfiles.d.ts +92 -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 +143 -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/Signals/AccountActivities.d.ts +432 -0
- package/cjs/resources/V2/Signals/AccountActivities.js +27 -0
- package/cjs/resources/V2/Signals/AccountActivities.js.map +1 -0
- package/cjs/resources/V2/Signals/AccountEvaluations.d.ts +405 -0
- package/cjs/resources/V2/Signals/AccountEvaluations.js +59 -0
- package/cjs/resources/V2/Signals/AccountEvaluations.js.map +1 -0
- package/cjs/resources/V2/Signals/AccountSignals.d.ts +196 -0
- package/cjs/resources/V2/Signals/AccountSignals.js +66 -0
- package/cjs/resources/V2/Signals/AccountSignals.js.map +1 -0
- package/cjs/resources/V2/Signals/index.d.ts +26 -0
- package/cjs/resources/V2/Signals/index.js +17 -0
- package/cjs/resources/V2/Signals/index.js.map +1 -0
- package/cjs/resources/V2/index.d.ts +18 -0
- package/cjs/resources/V2/index.js +16 -4
- 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 +126 -8
- package/cjs/resources.js.map +1 -1
- package/cjs/stripe.cjs.node.d.ts +6674 -138
- package/cjs/stripe.cjs.node.js.map +1 -1
- package/cjs/stripe.core.d.ts +60 -26
- package/cjs/stripe.core.js +55 -36
- package/cjs/stripe.core.js.map +1 -1
- package/esm/Error.d.ts +6 -0
- package/esm/Error.js +14 -0
- package/esm/Error.js.map +1 -1
- package/esm/StripeEventNotificationHandler.js +54 -0
- package/esm/StripeEventNotificationHandler.js.map +1 -1
- package/esm/Types.d.ts +4 -2
- package/esm/Types.js.map +1 -1
- package/esm/apiVersion.d.ts +2 -2
- package/esm/apiVersion.js +2 -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 +226 -0
- package/esm/resources/AccountSessions.js.map +1 -1
- package/esm/resources/Accounts.d.ts +625 -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/BalanceSettings.d.ts +18 -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 +85 -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 +194 -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 +102 -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 +141 -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 +17 -0
- package/esm/resources/Charges.d.ts +3077 -70
- package/esm/resources/Checkout/Sessions.d.ts +351 -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 +20 -1
- package/esm/resources/Customers.js +14 -0
- package/esm/resources/Customers.js.map +1 -1
- package/esm/resources/Disputes.d.ts +14 -0
- package/esm/resources/Events.d.ts +614 -3
- 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 +69 -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 +46 -1
- package/esm/resources/FinancialConnections/Authorizations.js +9 -1
- package/esm/resources/FinancialConnections/Authorizations.js.map +1 -1
- package/esm/resources/FinancialConnections/Institutions.d.ts +99 -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 +124 -9
- package/esm/resources/FinancialConnections/index.d.ts +21 -9
- package/esm/resources/FinancialConnections/index.js +4 -0
- package/esm/resources/FinancialConnections/index.js.map +1 -1
- package/esm/resources/FxQuotes.d.ts +216 -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 +1257 -10
- package/esm/resources/Invoices.js +41 -0
- package/esm/resources/Invoices.js.map +1 -1
- package/esm/resources/Issuing/Authorizations.d.ts +13 -0
- package/esm/resources/Issuing/Cardholders.d.ts +19 -1
- package/esm/resources/Issuing/Cards.d.ts +13 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.d.ts +638 -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 +93 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js +19 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js.map +1 -0
- package/esm/resources/Issuing/Disputes.d.ts +13 -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 +83 -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 +22 -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 +36 -2
- 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 +4696 -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 +13832 -2816
- package/esm/resources/PaymentIntents.js +27 -0
- package/esm/resources/PaymentIntents.js.map +1 -1
- package/esm/resources/PaymentLinks.d.ts +3 -3
- package/esm/resources/PaymentMethodConfigurations.d.ts +350 -0
- package/esm/resources/PaymentMethods.d.ts +181 -3
- package/esm/resources/PaymentMethods.js.map +1 -1
- package/esm/resources/PaymentPlans.d.ts +427 -0
- package/esm/resources/PaymentPlans.js +31 -0
- package/esm/resources/PaymentPlans.js.map +1 -0
- package/esm/resources/PaymentRecords.d.ts +82 -0
- package/esm/resources/Persons.d.ts +2 -2
- package/esm/resources/Prices.d.ts +36 -0
- package/esm/resources/Privacy/RedactionJobValidationErrors.d.ts +36 -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 +227 -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 +2 -2
- 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 +1170 -0
- package/esm/resources/QuotePreviewInvoices.js +3 -0
- package/esm/resources/QuotePreviewInvoices.js.map +1 -0
- package/esm/resources/QuotePreviewSubscriptionSchedules.d.ts +924 -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/BillingEvaluations.d.ts +374 -0
- package/esm/resources/Radar/BillingEvaluations.js +11 -0
- package/esm/resources/Radar/BillingEvaluations.js.map +1 -0
- package/esm/resources/Radar/PaymentEvaluations.d.ts +1 -1
- package/esm/resources/Radar/ValueListItems.d.ts +31 -1
- package/esm/resources/Radar/index.d.ts +21 -16
- package/esm/resources/Radar/index.js +2 -0
- package/esm/resources/Radar/index.js.map +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 +41 -1
- package/esm/resources/Reserve/Plans.js +17 -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 +18 -6
- package/esm/resources/Reserve/index.js +9 -0
- package/esm/resources/Reserve/index.js.map +1 -1
- package/esm/resources/SetupAttempts.d.ts +26 -1
- package/esm/resources/SetupIntents.d.ts +394 -11
- package/esm/resources/SharedPayment/GrantedTokens.d.ts +418 -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 +330 -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 +29 -1
- package/esm/resources/SubscriptionItems.d.ts +114 -0
- package/esm/resources/SubscriptionSchedules.d.ts +1157 -5
- package/esm/resources/SubscriptionSchedules.js +6 -0
- package/esm/resources/SubscriptionSchedules.js.map +1 -1
- package/esm/resources/Subscriptions.d.ts +388 -6
- package/esm/resources/Subscriptions.js +42 -0
- package/esm/resources/Subscriptions.js.map +1 -1
- package/esm/resources/Tax/Forms.d.ts +228 -0
- package/esm/resources/Tax/Forms.js +28 -0
- package/esm/resources/Tax/Forms.js.map +1 -0
- package/esm/resources/Tax/Registrations.d.ts +25 -2
- package/esm/resources/Tax/index.d.ts +24 -17
- package/esm/resources/Tax/index.js +2 -0
- package/esm/resources/Tax/index.js.map +1 -1
- package/esm/resources/Terminal/ReaderCollectedData.d.ts +50 -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 +95 -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/Tokens.d.ts +15 -0
- 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 +26 -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 +72 -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 +281 -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 +958 -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 +238 -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 +162 -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/AccountTokens.d.ts +28 -1
- package/esm/resources/V2/Core/Accounts.d.ts +1465 -71
- package/esm/resources/V2/Core/ApprovalRequests.d.ts +378 -0
- package/esm/resources/V2/Core/ApprovalRequests.js +35 -0
- package/esm/resources/V2/Core/ApprovalRequests.js.map +1 -0
- package/esm/resources/V2/Core/BatchJobs.d.ts +392 -0
- package/esm/resources/V2/Core/BatchJobs.js +248 -0
- package/esm/resources/V2/Core/BatchJobs.js.map +1 -0
- package/esm/resources/V2/Core/Events.d.ts +1009 -5
- package/esm/resources/V2/Core/Vault/GbBankAccounts.d.ts +117 -0
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js.map +1 -1
- package/esm/resources/V2/Core/Vault/UsBankAccounts.d.ts +27 -0
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js.map +1 -1
- package/esm/resources/V2/Core/index.d.ts +24 -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/QueryRuns.d.ts +299 -0
- package/esm/resources/V2/Data/QueryRuns.js +47 -0
- package/esm/resources/V2/Data/QueryRuns.js.map +1 -0
- package/esm/resources/V2/Data/ReportRuns.d.ts +303 -0
- package/esm/resources/V2/Data/ReportRuns.js +49 -0
- package/esm/resources/V2/Data/ReportRuns.js.map +1 -0
- package/esm/resources/V2/Data/Reporting/QueryRuns.d.ts +152 -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/Reports.d.ts +140 -0
- package/esm/resources/V2/Data/Reports.js +21 -0
- package/esm/resources/V2/Data/Reports.js.map +1 -0
- package/esm/resources/V2/Data/Schemas.d.ts +161 -0
- package/esm/resources/V2/Data/Schemas.js +19 -0
- package/esm/resources/V2/Data/Schemas.js.map +1 -0
- package/esm/resources/V2/Data/index.d.ts +34 -0
- package/esm/resources/V2/Data/index.js +17 -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 +163 -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 +120 -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/Iam/ActivityLogs.d.ts +377 -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 +6 -0
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.d.ts +102 -0
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +15 -0
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js.map +1 -1
- package/esm/resources/V2/MoneyManagement/FinancialAddressGeneratedMicrodeposits.d.ts +19 -0
- package/esm/resources/V2/MoneyManagement/FinancialAddressGeneratedMicrodeposits.js +3 -0
- package/esm/resources/V2/MoneyManagement/FinancialAddressGeneratedMicrodeposits.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/InboundTransfers.d.ts +4 -0
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +356 -0
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +19 -0
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/OutboundPayments.d.ts +79 -1
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.d.ts +96 -2
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.d.ts +418 -0
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +36 -0
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js.map +1 -0
- package/esm/resources/V2/MoneyManagement/PayoutIntents.d.ts +2 -2
- package/esm/resources/V2/MoneyManagement/PayoutMethods.d.ts +66 -1
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +9 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js.map +1 -1
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.d.ts +6 -2
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.d.ts +163 -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/RecipientVerifications.d.ts +5 -1
- package/esm/resources/V2/MoneyManagement/TestHelpers/FinancialAddresses.d.ts +15 -1
- package/esm/resources/V2/MoneyManagement/TestHelpers/FinancialAddresses.js +7 -0
- package/esm/resources/V2/MoneyManagement/TestHelpers/FinancialAddresses.js.map +1 -1
- package/esm/resources/V2/MoneyManagement/index.d.ts +63 -37
- package/esm/resources/V2/MoneyManagement/index.js +6 -0
- package/esm/resources/V2/MoneyManagement/index.js.map +1 -1
- package/esm/resources/V2/Network/BusinessProfiles.d.ts +92 -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 +143 -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/Signals/AccountActivities.d.ts +432 -0
- package/esm/resources/V2/Signals/AccountActivities.js +23 -0
- package/esm/resources/V2/Signals/AccountActivities.js.map +1 -0
- package/esm/resources/V2/Signals/AccountEvaluations.d.ts +405 -0
- package/esm/resources/V2/Signals/AccountEvaluations.js +55 -0
- package/esm/resources/V2/Signals/AccountEvaluations.js.map +1 -0
- package/esm/resources/V2/Signals/AccountSignals.d.ts +196 -0
- package/esm/resources/V2/Signals/AccountSignals.js +62 -0
- package/esm/resources/V2/Signals/AccountSignals.js.map +1 -0
- package/esm/resources/V2/Signals/index.d.ts +26 -0
- package/esm/resources/V2/Signals/index.js +13 -0
- package/esm/resources/V2/Signals/index.js.map +1 -0
- package/esm/resources/V2/index.d.ts +18 -0
- package/esm/resources/V2/index.js +12 -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 +112 -0
- package/esm/resources.js.map +1 -1
- package/esm/stripe.core.d.ts +60 -26
- package/esm/stripe.core.js +21 -2
- package/esm/stripe.core.js.map +1 -1
- package/esm/stripe.esm.node.d.ts +60 -26
- package/esm/stripe.esm.node.js +21 -2
- 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 as _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' | OtherString;
|
|
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 {
|
|
@@ -237,7 +297,11 @@ export declare namespace Quote {
|
|
|
237
297
|
footer: string | null;
|
|
238
298
|
issuer: InvoiceSettings.Issuer;
|
|
239
299
|
}
|
|
240
|
-
type Status = 'accepted' | 'canceled' | 'draft' | 'open' | OtherString;
|
|
300
|
+
type Status = 'accepted' | 'accepting' | 'canceled' | 'draft' | 'open' | 'stale' | OtherString;
|
|
301
|
+
interface StatusDetails {
|
|
302
|
+
canceled?: StatusDetails.Canceled;
|
|
303
|
+
stale?: StatusDetails.Stale;
|
|
304
|
+
}
|
|
241
305
|
interface StatusTransitions {
|
|
242
306
|
/**
|
|
243
307
|
* The time that the quote was accepted. Measured in seconds since Unix epoch.
|
|
@@ -253,6 +317,18 @@ export declare namespace Quote {
|
|
|
253
317
|
finalized_at: number | null;
|
|
254
318
|
}
|
|
255
319
|
interface SubscriptionData {
|
|
320
|
+
/**
|
|
321
|
+
* Describes the period to bill for upon accepting the quote.
|
|
322
|
+
*/
|
|
323
|
+
bill_on_acceptance?: SubscriptionData.BillOnAcceptance | null;
|
|
324
|
+
/**
|
|
325
|
+
* 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.
|
|
326
|
+
*/
|
|
327
|
+
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
328
|
+
/**
|
|
329
|
+
* Whether the subscription will always start a new billing period when the quote is accepted.
|
|
330
|
+
*/
|
|
331
|
+
billing_cycle_anchor?: 'reset' | null;
|
|
256
332
|
/**
|
|
257
333
|
* The billing mode of the quote.
|
|
258
334
|
*/
|
|
@@ -265,15 +341,65 @@ export declare namespace Quote {
|
|
|
265
341
|
* 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.
|
|
266
342
|
*/
|
|
267
343
|
effective_date: number | null;
|
|
344
|
+
/**
|
|
345
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
346
|
+
*/
|
|
347
|
+
end_behavior?: SubscriptionData.EndBehavior | null;
|
|
348
|
+
/**
|
|
349
|
+
* The id of the subscription that will be updated when the quote is accepted.
|
|
350
|
+
*/
|
|
351
|
+
from_subscription?: string | Subscription | null;
|
|
268
352
|
/**
|
|
269
353
|
* 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.
|
|
270
354
|
*/
|
|
271
355
|
metadata: Metadata | null;
|
|
356
|
+
/**
|
|
357
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
358
|
+
*/
|
|
359
|
+
prebilling?: SubscriptionData.Prebilling | null;
|
|
360
|
+
/**
|
|
361
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
|
362
|
+
*/
|
|
363
|
+
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
272
364
|
/**
|
|
273
365
|
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
274
366
|
*/
|
|
275
367
|
trial_period_days: number | null;
|
|
276
368
|
}
|
|
369
|
+
interface SubscriptionDataOverride {
|
|
370
|
+
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
371
|
+
/**
|
|
372
|
+
* Describes the period to bill for upon accepting the quote.
|
|
373
|
+
*/
|
|
374
|
+
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance | null;
|
|
375
|
+
/**
|
|
376
|
+
* 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.
|
|
377
|
+
*/
|
|
378
|
+
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
379
|
+
/**
|
|
380
|
+
* The customer who received this quote. A customer is required to finalize the quote. Once specified, you can't change it.
|
|
381
|
+
*/
|
|
382
|
+
customer: string | null;
|
|
383
|
+
/**
|
|
384
|
+
* 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.
|
|
385
|
+
*/
|
|
386
|
+
description: string | null;
|
|
387
|
+
/**
|
|
388
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
389
|
+
*/
|
|
390
|
+
end_behavior?: SubscriptionDataOverride.EndBehavior | null;
|
|
391
|
+
/**
|
|
392
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
|
393
|
+
*/
|
|
394
|
+
proration_behavior?: SubscriptionDataOverride.ProrationBehavior | null;
|
|
395
|
+
}
|
|
396
|
+
interface SubscriptionSchedule {
|
|
397
|
+
applies_to: SubscriptionSchedule.AppliesTo;
|
|
398
|
+
/**
|
|
399
|
+
* The subscription schedule that was created or updated from this quote.
|
|
400
|
+
*/
|
|
401
|
+
subscription_schedule: string;
|
|
402
|
+
}
|
|
277
403
|
interface TotalDetails {
|
|
278
404
|
/**
|
|
279
405
|
* This is the sum of all the discounts.
|
|
@@ -320,6 +446,16 @@ export declare namespace Quote {
|
|
|
320
446
|
}
|
|
321
447
|
}
|
|
322
448
|
namespace Computed {
|
|
449
|
+
interface LastReestimationDetails {
|
|
450
|
+
/**
|
|
451
|
+
* When `status` is `failed`, provides details about the quote reestimation failure.
|
|
452
|
+
*/
|
|
453
|
+
failed: LastReestimationDetails.Failed | null;
|
|
454
|
+
/**
|
|
455
|
+
* Latest status of the reestimation.
|
|
456
|
+
*/
|
|
457
|
+
status: LastReestimationDetails.Status;
|
|
458
|
+
}
|
|
323
459
|
interface Recurring {
|
|
324
460
|
/**
|
|
325
461
|
* Total before any discounts or taxes are applied.
|
|
@@ -354,6 +490,26 @@ export declare namespace Quote {
|
|
|
354
490
|
line_items?: ApiList<LineItem>;
|
|
355
491
|
total_details: Upfront.TotalDetails;
|
|
356
492
|
}
|
|
493
|
+
namespace LastReestimationDetails {
|
|
494
|
+
interface Failed {
|
|
495
|
+
/**
|
|
496
|
+
* 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.
|
|
497
|
+
*/
|
|
498
|
+
failure_code: string | null;
|
|
499
|
+
/**
|
|
500
|
+
* 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".
|
|
501
|
+
*/
|
|
502
|
+
message: string | null;
|
|
503
|
+
/**
|
|
504
|
+
* The reason the reestimation failed.
|
|
505
|
+
*/
|
|
506
|
+
reason: Failed.Reason;
|
|
507
|
+
}
|
|
508
|
+
type Status = 'failed' | 'in_progress' | 'succeeded' | OtherString;
|
|
509
|
+
namespace Failed {
|
|
510
|
+
type Reason = 'automation_failure' | 'internal_error' | OtherString;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
357
513
|
namespace Recurring {
|
|
358
514
|
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
359
515
|
interface TotalDetails {
|
|
@@ -515,7 +671,114 @@ export declare namespace Quote {
|
|
|
515
671
|
type Type = 'account' | 'self' | OtherString;
|
|
516
672
|
}
|
|
517
673
|
}
|
|
674
|
+
namespace StatusDetails {
|
|
675
|
+
interface Canceled {
|
|
676
|
+
/**
|
|
677
|
+
* The reason this quote was marked as canceled.
|
|
678
|
+
*/
|
|
679
|
+
reason: Canceled.Reason | null;
|
|
680
|
+
/**
|
|
681
|
+
* Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
|
|
682
|
+
*/
|
|
683
|
+
transitioned_at: number | null;
|
|
684
|
+
}
|
|
685
|
+
interface Stale {
|
|
686
|
+
/**
|
|
687
|
+
* Time at which the quote expires. Measured in seconds since the Unix epoch.
|
|
688
|
+
*/
|
|
689
|
+
expires_at: number | null;
|
|
690
|
+
/**
|
|
691
|
+
* The most recent reason this quote was marked as stale.
|
|
692
|
+
*/
|
|
693
|
+
last_reason: Stale.LastReason | null;
|
|
694
|
+
/**
|
|
695
|
+
* Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
|
|
696
|
+
*/
|
|
697
|
+
last_updated_at: number | null;
|
|
698
|
+
/**
|
|
699
|
+
* Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
|
|
700
|
+
*/
|
|
701
|
+
transitioned_at: number | null;
|
|
702
|
+
}
|
|
703
|
+
namespace Canceled {
|
|
704
|
+
type Reason = 'canceled' | 'quote_accepted' | 'quote_expired' | 'quote_superseded' | 'subscription_canceled' | OtherString;
|
|
705
|
+
}
|
|
706
|
+
namespace Stale {
|
|
707
|
+
interface LastReason {
|
|
708
|
+
/**
|
|
709
|
+
* The ID of the line that is invalid if the stale reason type is `line_invalid`.
|
|
710
|
+
*/
|
|
711
|
+
line_invalid?: string;
|
|
712
|
+
/**
|
|
713
|
+
* The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
|
|
714
|
+
*/
|
|
715
|
+
lines_invalid?: Array<LastReason.LinesInvalid>;
|
|
716
|
+
/**
|
|
717
|
+
* The user supplied mark stale reason.
|
|
718
|
+
*/
|
|
719
|
+
marked_stale?: string | null;
|
|
720
|
+
/**
|
|
721
|
+
* The ID of the subscription that was canceled.
|
|
722
|
+
*/
|
|
723
|
+
subscription_canceled?: string;
|
|
724
|
+
subscription_changed?: LastReason.SubscriptionChanged;
|
|
725
|
+
/**
|
|
726
|
+
* The ID of the subscription that was expired.
|
|
727
|
+
*/
|
|
728
|
+
subscription_expired?: string;
|
|
729
|
+
/**
|
|
730
|
+
* The ID of the subscription schedule that was canceled.
|
|
731
|
+
*/
|
|
732
|
+
subscription_schedule_canceled?: string;
|
|
733
|
+
subscription_schedule_changed?: LastReason.SubscriptionScheduleChanged;
|
|
734
|
+
/**
|
|
735
|
+
* The ID of the subscription schedule that was released.
|
|
736
|
+
*/
|
|
737
|
+
subscription_schedule_released?: string;
|
|
738
|
+
/**
|
|
739
|
+
* The reason the quote was marked as stale.
|
|
740
|
+
*/
|
|
741
|
+
type: LastReason.Type | null;
|
|
742
|
+
}
|
|
743
|
+
namespace LastReason {
|
|
744
|
+
interface LinesInvalid {
|
|
745
|
+
/**
|
|
746
|
+
* The timestamp at which the lines were marked as invalid.
|
|
747
|
+
*/
|
|
748
|
+
invalid_at: number;
|
|
749
|
+
/**
|
|
750
|
+
* The list of lines that became invalid at the given timestamp.
|
|
751
|
+
*/
|
|
752
|
+
lines: Array<string>;
|
|
753
|
+
}
|
|
754
|
+
interface SubscriptionChanged {
|
|
755
|
+
/**
|
|
756
|
+
* The subscription's state before the quote was marked as stale.
|
|
757
|
+
*/
|
|
758
|
+
previous_subscription: Subscription | null;
|
|
759
|
+
}
|
|
760
|
+
interface SubscriptionScheduleChanged {
|
|
761
|
+
/**
|
|
762
|
+
* The subscription schedule's state before the quote was marked as stale.
|
|
763
|
+
*/
|
|
764
|
+
previous_subscription_schedule: SubscriptionSchedule | null;
|
|
765
|
+
}
|
|
766
|
+
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' | OtherString;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
518
770
|
namespace SubscriptionData {
|
|
771
|
+
interface BillOnAcceptance {
|
|
772
|
+
/**
|
|
773
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
774
|
+
*/
|
|
775
|
+
bill_from: BillOnAcceptance.BillFrom | null;
|
|
776
|
+
/**
|
|
777
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
778
|
+
*/
|
|
779
|
+
bill_until: BillOnAcceptance.BillUntil | null;
|
|
780
|
+
}
|
|
781
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front' | OtherString;
|
|
519
782
|
interface BillingMode {
|
|
520
783
|
flexible?: BillingMode.Flexible;
|
|
521
784
|
/**
|
|
@@ -523,6 +786,11 @@ export declare namespace Quote {
|
|
|
523
786
|
*/
|
|
524
787
|
type: BillingMode.Type;
|
|
525
788
|
}
|
|
789
|
+
type EndBehavior = 'cancel' | 'release' | OtherString;
|
|
790
|
+
interface Prebilling {
|
|
791
|
+
iterations: number;
|
|
792
|
+
}
|
|
793
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none' | OtherString;
|
|
526
794
|
namespace BillingMode {
|
|
527
795
|
interface Flexible {
|
|
528
796
|
/**
|
|
@@ -535,6 +803,203 @@ export declare namespace Quote {
|
|
|
535
803
|
type ProrationDiscounts = 'included' | 'itemized' | OtherString;
|
|
536
804
|
}
|
|
537
805
|
}
|
|
806
|
+
namespace BillOnAcceptance {
|
|
807
|
+
interface BillFrom {
|
|
808
|
+
/**
|
|
809
|
+
* The materialized time.
|
|
810
|
+
*/
|
|
811
|
+
computed: number | null;
|
|
812
|
+
/**
|
|
813
|
+
* The timestamp the given line starts at.
|
|
814
|
+
*/
|
|
815
|
+
line_starts_at: BillFrom.LineStartsAt | null;
|
|
816
|
+
/**
|
|
817
|
+
* A precise Unix timestamp.
|
|
818
|
+
*/
|
|
819
|
+
timestamp: number | null;
|
|
820
|
+
/**
|
|
821
|
+
* The type of method to specify the `bill_from` time.
|
|
822
|
+
*/
|
|
823
|
+
type: BillFrom.Type;
|
|
824
|
+
}
|
|
825
|
+
interface BillUntil {
|
|
826
|
+
/**
|
|
827
|
+
* The materialized time.
|
|
828
|
+
*/
|
|
829
|
+
computed: number | null;
|
|
830
|
+
/**
|
|
831
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
832
|
+
*/
|
|
833
|
+
duration: BillUntil.Duration | null;
|
|
834
|
+
/**
|
|
835
|
+
* The timestamp the given line ends at.
|
|
836
|
+
*/
|
|
837
|
+
line_ends_at: BillUntil.LineEndsAt | null;
|
|
838
|
+
/**
|
|
839
|
+
* A precise Unix timestamp.
|
|
840
|
+
*/
|
|
841
|
+
timestamp: number | null;
|
|
842
|
+
/**
|
|
843
|
+
* The type of method to specify the `bill_until` time.
|
|
844
|
+
*/
|
|
845
|
+
type: BillUntil.Type;
|
|
846
|
+
}
|
|
847
|
+
namespace BillFrom {
|
|
848
|
+
interface LineStartsAt {
|
|
849
|
+
/**
|
|
850
|
+
* Unique identifier for the object.
|
|
851
|
+
*/
|
|
852
|
+
id: string;
|
|
853
|
+
}
|
|
854
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp' | OtherString;
|
|
855
|
+
}
|
|
856
|
+
namespace BillUntil {
|
|
857
|
+
interface Duration {
|
|
858
|
+
/**
|
|
859
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
860
|
+
*/
|
|
861
|
+
interval: Duration.Interval;
|
|
862
|
+
/**
|
|
863
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
864
|
+
*/
|
|
865
|
+
interval_count: number;
|
|
866
|
+
}
|
|
867
|
+
interface LineEndsAt {
|
|
868
|
+
/**
|
|
869
|
+
* Unique identifier for the object.
|
|
870
|
+
*/
|
|
871
|
+
id: string;
|
|
872
|
+
}
|
|
873
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice' | OtherString;
|
|
874
|
+
namespace Duration {
|
|
875
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
namespace SubscriptionDataOverride {
|
|
881
|
+
interface AppliesTo {
|
|
882
|
+
/**
|
|
883
|
+
* 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.
|
|
884
|
+
*/
|
|
885
|
+
new_reference: string | null;
|
|
886
|
+
/**
|
|
887
|
+
* The ID of the schedule the line applies to.
|
|
888
|
+
*/
|
|
889
|
+
subscription_schedule: string | null;
|
|
890
|
+
/**
|
|
891
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
892
|
+
*/
|
|
893
|
+
type: AppliesTo.Type;
|
|
894
|
+
}
|
|
895
|
+
interface BillOnAcceptance {
|
|
896
|
+
/**
|
|
897
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
898
|
+
*/
|
|
899
|
+
bill_from: BillOnAcceptance.BillFrom | null;
|
|
900
|
+
/**
|
|
901
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
902
|
+
*/
|
|
903
|
+
bill_until: BillOnAcceptance.BillUntil | null;
|
|
904
|
+
}
|
|
905
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front' | OtherString;
|
|
906
|
+
type EndBehavior = 'cancel' | 'release' | OtherString;
|
|
907
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none' | OtherString;
|
|
908
|
+
namespace AppliesTo {
|
|
909
|
+
type Type = 'new_reference' | 'subscription_schedule' | OtherString;
|
|
910
|
+
}
|
|
911
|
+
namespace BillOnAcceptance {
|
|
912
|
+
interface BillFrom {
|
|
913
|
+
/**
|
|
914
|
+
* The materialized time.
|
|
915
|
+
*/
|
|
916
|
+
computed: number | null;
|
|
917
|
+
/**
|
|
918
|
+
* The timestamp the given line starts at.
|
|
919
|
+
*/
|
|
920
|
+
line_starts_at: BillFrom.LineStartsAt | null;
|
|
921
|
+
/**
|
|
922
|
+
* A precise Unix timestamp.
|
|
923
|
+
*/
|
|
924
|
+
timestamp: number | null;
|
|
925
|
+
/**
|
|
926
|
+
* The type of method to specify the `bill_from` time.
|
|
927
|
+
*/
|
|
928
|
+
type: BillFrom.Type;
|
|
929
|
+
}
|
|
930
|
+
interface BillUntil {
|
|
931
|
+
/**
|
|
932
|
+
* The materialized time.
|
|
933
|
+
*/
|
|
934
|
+
computed: number | null;
|
|
935
|
+
/**
|
|
936
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
937
|
+
*/
|
|
938
|
+
duration: BillUntil.Duration | null;
|
|
939
|
+
/**
|
|
940
|
+
* The timestamp the given line ends at.
|
|
941
|
+
*/
|
|
942
|
+
line_ends_at: BillUntil.LineEndsAt | null;
|
|
943
|
+
/**
|
|
944
|
+
* A precise Unix timestamp.
|
|
945
|
+
*/
|
|
946
|
+
timestamp: number | null;
|
|
947
|
+
/**
|
|
948
|
+
* The type of method to specify the `bill_until` time.
|
|
949
|
+
*/
|
|
950
|
+
type: BillUntil.Type;
|
|
951
|
+
}
|
|
952
|
+
namespace BillFrom {
|
|
953
|
+
interface LineStartsAt {
|
|
954
|
+
/**
|
|
955
|
+
* Unique identifier for the object.
|
|
956
|
+
*/
|
|
957
|
+
id: string;
|
|
958
|
+
}
|
|
959
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp' | OtherString;
|
|
960
|
+
}
|
|
961
|
+
namespace BillUntil {
|
|
962
|
+
interface Duration {
|
|
963
|
+
/**
|
|
964
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
965
|
+
*/
|
|
966
|
+
interval: Duration.Interval;
|
|
967
|
+
/**
|
|
968
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
969
|
+
*/
|
|
970
|
+
interval_count: number;
|
|
971
|
+
}
|
|
972
|
+
interface LineEndsAt {
|
|
973
|
+
/**
|
|
974
|
+
* Unique identifier for the object.
|
|
975
|
+
*/
|
|
976
|
+
id: string;
|
|
977
|
+
}
|
|
978
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice' | OtherString;
|
|
979
|
+
namespace Duration {
|
|
980
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
namespace SubscriptionSchedule {
|
|
986
|
+
interface AppliesTo {
|
|
987
|
+
/**
|
|
988
|
+
* 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.
|
|
989
|
+
*/
|
|
990
|
+
new_reference: string | null;
|
|
991
|
+
/**
|
|
992
|
+
* The ID of the schedule the line applies to.
|
|
993
|
+
*/
|
|
994
|
+
subscription_schedule: string | null;
|
|
995
|
+
/**
|
|
996
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
997
|
+
*/
|
|
998
|
+
type: AppliesTo.Type;
|
|
999
|
+
}
|
|
1000
|
+
namespace AppliesTo {
|
|
1001
|
+
type Type = 'new_reference' | 'subscription_schedule' | OtherString;
|
|
1002
|
+
}
|
|
538
1003
|
}
|
|
539
1004
|
namespace TotalDetails {
|
|
540
1005
|
interface Breakdown {
|
|
@@ -588,6 +1053,10 @@ export declare namespace Quote {
|
|
|
588
1053
|
}
|
|
589
1054
|
}
|
|
590
1055
|
export interface QuoteCreateParams {
|
|
1056
|
+
/**
|
|
1057
|
+
* Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
1058
|
+
*/
|
|
1059
|
+
allow_backdated_lines?: boolean;
|
|
591
1060
|
/**
|
|
592
1061
|
* 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.
|
|
593
1062
|
*/
|
|
@@ -652,6 +1121,10 @@ export interface QuoteCreateParams {
|
|
|
652
1121
|
* 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.
|
|
653
1122
|
*/
|
|
654
1123
|
line_items?: Array<QuoteCreateParams.LineItem>;
|
|
1124
|
+
/**
|
|
1125
|
+
* 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.
|
|
1126
|
+
*/
|
|
1127
|
+
lines?: Array<QuoteCreateParams.Line>;
|
|
655
1128
|
/**
|
|
656
1129
|
* 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`.
|
|
657
1130
|
*/
|
|
@@ -664,6 +1137,10 @@ export interface QuoteCreateParams {
|
|
|
664
1137
|
* 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.
|
|
665
1138
|
*/
|
|
666
1139
|
subscription_data?: QuoteCreateParams.SubscriptionData;
|
|
1140
|
+
/**
|
|
1141
|
+
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
1142
|
+
*/
|
|
1143
|
+
subscription_data_overrides?: Array<QuoteCreateParams.SubscriptionDataOverride>;
|
|
667
1144
|
/**
|
|
668
1145
|
* ID of the test clock to attach to the quote.
|
|
669
1146
|
*/
|
|
@@ -694,6 +1171,10 @@ export declare namespace QuoteCreateParams {
|
|
|
694
1171
|
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
695
1172
|
*/
|
|
696
1173
|
discount?: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* Details to determine how long the discount should be applied for.
|
|
1176
|
+
*/
|
|
1177
|
+
discount_end?: Discount.DiscountEnd;
|
|
697
1178
|
/**
|
|
698
1179
|
* ID of the promotion code to create a new discount for.
|
|
699
1180
|
*/
|
|
@@ -753,48 +1234,160 @@ export declare namespace QuoteCreateParams {
|
|
|
753
1234
|
*/
|
|
754
1235
|
tax_rates?: Emptyable<Array<string>>;
|
|
755
1236
|
}
|
|
756
|
-
interface
|
|
1237
|
+
interface Line {
|
|
757
1238
|
/**
|
|
758
|
-
*
|
|
1239
|
+
* An array of operations the quote line performs.
|
|
759
1240
|
*/
|
|
760
|
-
|
|
1241
|
+
actions?: Array<Line.Action>;
|
|
761
1242
|
/**
|
|
762
|
-
*
|
|
1243
|
+
* Details to identify the subscription schedule the quote line applies to.
|
|
763
1244
|
*/
|
|
764
|
-
|
|
1245
|
+
applies_to?: Line.AppliesTo;
|
|
765
1246
|
/**
|
|
766
|
-
*
|
|
1247
|
+
* 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.
|
|
767
1248
|
*/
|
|
768
|
-
|
|
1249
|
+
billing_cycle_anchor?: Line.BillingCycleAnchor;
|
|
769
1250
|
/**
|
|
770
|
-
*
|
|
1251
|
+
* 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.
|
|
771
1252
|
*/
|
|
772
|
-
|
|
1253
|
+
cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
|
|
773
1254
|
/**
|
|
774
|
-
*
|
|
1255
|
+
* 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.
|
|
775
1256
|
*/
|
|
776
|
-
|
|
777
|
-
}
|
|
778
|
-
interface TransferData {
|
|
1257
|
+
ends_at?: Line.EndsAt;
|
|
779
1258
|
/**
|
|
780
|
-
*
|
|
1259
|
+
* 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.
|
|
781
1260
|
*/
|
|
782
|
-
|
|
1261
|
+
proration_behavior?: Line.ProrationBehavior;
|
|
783
1262
|
/**
|
|
784
|
-
*
|
|
1263
|
+
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
785
1264
|
*/
|
|
786
|
-
|
|
1265
|
+
set_pause_collection?: Line.SetPauseCollection;
|
|
787
1266
|
/**
|
|
788
|
-
*
|
|
1267
|
+
* Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
|
789
1268
|
*/
|
|
790
|
-
|
|
1269
|
+
set_schedule_end?: Line.SetScheduleEnd;
|
|
1270
|
+
/**
|
|
1271
|
+
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
1272
|
+
*/
|
|
1273
|
+
starts_at?: Line.StartsAt;
|
|
1274
|
+
/**
|
|
1275
|
+
* Settings related to subscription trials.
|
|
1276
|
+
*/
|
|
1277
|
+
trial_settings?: Line.TrialSettings;
|
|
791
1278
|
}
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
1279
|
+
interface SubscriptionData {
|
|
1280
|
+
/**
|
|
1281
|
+
* Describes the period to bill for upon accepting the quote.
|
|
1282
|
+
*/
|
|
1283
|
+
bill_on_acceptance?: SubscriptionData.BillOnAcceptance;
|
|
1284
|
+
/**
|
|
1285
|
+
* 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.
|
|
1286
|
+
*/
|
|
1287
|
+
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
1288
|
+
/**
|
|
1289
|
+
* When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
|
1290
|
+
*/
|
|
1291
|
+
billing_cycle_anchor?: Emptyable<'reset'>;
|
|
1292
|
+
/**
|
|
1293
|
+
* Controls how prorations and invoices for subscriptions are calculated and orchestrated.
|
|
1294
|
+
*/
|
|
1295
|
+
billing_mode?: SubscriptionData.BillingMode;
|
|
1296
|
+
/**
|
|
1297
|
+
* 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.
|
|
1298
|
+
*/
|
|
1299
|
+
description?: string;
|
|
1300
|
+
/**
|
|
1301
|
+
* 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.
|
|
1302
|
+
*/
|
|
1303
|
+
effective_date?: Emptyable<'current_period_end' | number>;
|
|
1304
|
+
/**
|
|
1305
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1306
|
+
*/
|
|
1307
|
+
end_behavior?: SubscriptionData.EndBehavior;
|
|
1308
|
+
/**
|
|
1309
|
+
* 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.
|
|
1310
|
+
*/
|
|
1311
|
+
from_subscription?: string;
|
|
1312
|
+
/**
|
|
1313
|
+
* 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.
|
|
1314
|
+
*/
|
|
1315
|
+
metadata?: MetadataParam;
|
|
1316
|
+
/**
|
|
1317
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
1318
|
+
*/
|
|
1319
|
+
prebilling?: Emptyable<SubscriptionData.Prebilling>;
|
|
1320
|
+
/**
|
|
1321
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
1322
|
+
*
|
|
1323
|
+
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
1324
|
+
*
|
|
1325
|
+
* 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`.
|
|
1326
|
+
*
|
|
1327
|
+
* Prorations can be disabled by passing `none`.
|
|
1328
|
+
*/
|
|
1329
|
+
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
1330
|
+
/**
|
|
1331
|
+
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
1332
|
+
*/
|
|
1333
|
+
trial_period_days?: Emptyable<number>;
|
|
1334
|
+
}
|
|
1335
|
+
interface SubscriptionDataOverride {
|
|
1336
|
+
/**
|
|
1337
|
+
* Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
1338
|
+
*/
|
|
1339
|
+
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
1340
|
+
/**
|
|
1341
|
+
* Describes the period to bill for upon accepting the quote.
|
|
1342
|
+
*/
|
|
1343
|
+
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance;
|
|
1344
|
+
/**
|
|
1345
|
+
* 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.
|
|
1346
|
+
*/
|
|
1347
|
+
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
1348
|
+
/**
|
|
1349
|
+
* The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
|
|
1350
|
+
*/
|
|
1351
|
+
customer?: string;
|
|
1352
|
+
/**
|
|
1353
|
+
* 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.
|
|
1354
|
+
*/
|
|
1355
|
+
description?: string;
|
|
1356
|
+
/**
|
|
1357
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1358
|
+
*/
|
|
1359
|
+
end_behavior?: SubscriptionDataOverride.EndBehavior;
|
|
1360
|
+
/**
|
|
1361
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
1362
|
+
*
|
|
1363
|
+
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
1364
|
+
*
|
|
1365
|
+
* 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`.
|
|
1366
|
+
*
|
|
1367
|
+
* Prorations can be disabled by passing `none`.
|
|
1368
|
+
*/
|
|
1369
|
+
proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
|
|
1370
|
+
}
|
|
1371
|
+
interface TransferData {
|
|
1372
|
+
/**
|
|
1373
|
+
* 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.
|
|
1374
|
+
*/
|
|
1375
|
+
amount?: number;
|
|
1376
|
+
/**
|
|
1377
|
+
* 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.
|
|
1378
|
+
*/
|
|
1379
|
+
amount_percent?: number;
|
|
1380
|
+
/**
|
|
1381
|
+
* ID of an existing, connected Stripe account.
|
|
1382
|
+
*/
|
|
1383
|
+
destination: string;
|
|
1384
|
+
}
|
|
1385
|
+
namespace AutomaticTax {
|
|
1386
|
+
interface Liability {
|
|
1387
|
+
/**
|
|
1388
|
+
* The connected account being referenced when `type` is `account`.
|
|
1389
|
+
*/
|
|
1390
|
+
account?: string;
|
|
798
1391
|
/**
|
|
799
1392
|
* Type of the account referenced in the request.
|
|
800
1393
|
*/
|
|
@@ -804,6 +1397,38 @@ export declare namespace QuoteCreateParams {
|
|
|
804
1397
|
type Type = 'account' | 'self' | OtherString;
|
|
805
1398
|
}
|
|
806
1399
|
}
|
|
1400
|
+
namespace Discount {
|
|
1401
|
+
interface DiscountEnd {
|
|
1402
|
+
/**
|
|
1403
|
+
* Time span for the redeemed discount.
|
|
1404
|
+
*/
|
|
1405
|
+
duration?: DiscountEnd.Duration;
|
|
1406
|
+
/**
|
|
1407
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1408
|
+
*/
|
|
1409
|
+
timestamp?: number;
|
|
1410
|
+
/**
|
|
1411
|
+
* The type of calculation made to determine when the discount ends.
|
|
1412
|
+
*/
|
|
1413
|
+
type: DiscountEnd.Type;
|
|
1414
|
+
}
|
|
1415
|
+
namespace DiscountEnd {
|
|
1416
|
+
interface Duration {
|
|
1417
|
+
/**
|
|
1418
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1419
|
+
*/
|
|
1420
|
+
interval: Duration.Interval;
|
|
1421
|
+
/**
|
|
1422
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1423
|
+
*/
|
|
1424
|
+
interval_count: number;
|
|
1425
|
+
}
|
|
1426
|
+
type Type = 'duration' | 'timestamp' | OtherString;
|
|
1427
|
+
namespace Duration {
|
|
1428
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
807
1432
|
namespace InvoiceSettings {
|
|
808
1433
|
interface CustomField {
|
|
809
1434
|
/**
|
|
@@ -829,6 +1454,457 @@ export declare namespace QuoteCreateParams {
|
|
|
829
1454
|
type Type = 'account' | 'self' | OtherString;
|
|
830
1455
|
}
|
|
831
1456
|
}
|
|
1457
|
+
namespace Line {
|
|
1458
|
+
interface Action {
|
|
1459
|
+
/**
|
|
1460
|
+
* Details for the `add_discount` type.
|
|
1461
|
+
*/
|
|
1462
|
+
add_discount?: Action.AddDiscount;
|
|
1463
|
+
/**
|
|
1464
|
+
* Details for the `add_item` type.
|
|
1465
|
+
*/
|
|
1466
|
+
add_item?: Action.AddItem;
|
|
1467
|
+
/**
|
|
1468
|
+
* Details for the `add_metadata` type: specify a hash of key-value pairs.
|
|
1469
|
+
*/
|
|
1470
|
+
add_metadata?: {
|
|
1471
|
+
[key: string]: string;
|
|
1472
|
+
};
|
|
1473
|
+
/**
|
|
1474
|
+
* Details for the `remove_discount` type.
|
|
1475
|
+
*/
|
|
1476
|
+
remove_discount?: Action.RemoveDiscount;
|
|
1477
|
+
/**
|
|
1478
|
+
* Details for the `remove_item` type.
|
|
1479
|
+
*/
|
|
1480
|
+
remove_item?: Action.RemoveItem;
|
|
1481
|
+
/**
|
|
1482
|
+
* Details for the `remove_metadata` type: specify an array of metadata keys.
|
|
1483
|
+
*/
|
|
1484
|
+
remove_metadata?: Array<string>;
|
|
1485
|
+
/**
|
|
1486
|
+
* Details for the `set_discounts` type.
|
|
1487
|
+
*/
|
|
1488
|
+
set_discounts?: Array<Action.SetDiscount>;
|
|
1489
|
+
/**
|
|
1490
|
+
* Details for the `set_items` type.
|
|
1491
|
+
*/
|
|
1492
|
+
set_items?: Array<Action.SetItem>;
|
|
1493
|
+
/**
|
|
1494
|
+
* Details for the `set_metadata` type: specify an array of key-value pairs.
|
|
1495
|
+
*/
|
|
1496
|
+
set_metadata?: Emptyable<{
|
|
1497
|
+
[key: string]: string;
|
|
1498
|
+
}>;
|
|
1499
|
+
/**
|
|
1500
|
+
* The type of action the quote line performs.
|
|
1501
|
+
*/
|
|
1502
|
+
type: Action.Type;
|
|
1503
|
+
}
|
|
1504
|
+
interface AppliesTo {
|
|
1505
|
+
/**
|
|
1506
|
+
* 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.
|
|
1507
|
+
*/
|
|
1508
|
+
new_reference?: string;
|
|
1509
|
+
/**
|
|
1510
|
+
* The ID of the schedule the line applies to.
|
|
1511
|
+
*/
|
|
1512
|
+
subscription_schedule?: string;
|
|
1513
|
+
/**
|
|
1514
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
1515
|
+
*/
|
|
1516
|
+
type: AppliesTo.Type;
|
|
1517
|
+
}
|
|
1518
|
+
type BillingCycleAnchor = 'automatic' | 'line_starts_at' | OtherString;
|
|
1519
|
+
interface CancelSubscriptionSchedule {
|
|
1520
|
+
/**
|
|
1521
|
+
* Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
|
1522
|
+
*/
|
|
1523
|
+
cancel_at: 'line_starts_at';
|
|
1524
|
+
/**
|
|
1525
|
+
* 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`.
|
|
1526
|
+
*/
|
|
1527
|
+
invoice_now?: boolean;
|
|
1528
|
+
/**
|
|
1529
|
+
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
|
1530
|
+
*/
|
|
1531
|
+
prorate?: boolean;
|
|
1532
|
+
}
|
|
1533
|
+
interface EndsAt {
|
|
1534
|
+
/**
|
|
1535
|
+
* Use the `end` time of a given discount.
|
|
1536
|
+
*/
|
|
1537
|
+
discount_end?: EndsAt.DiscountEnd;
|
|
1538
|
+
/**
|
|
1539
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
1540
|
+
*/
|
|
1541
|
+
duration?: EndsAt.Duration;
|
|
1542
|
+
/**
|
|
1543
|
+
* A precise Unix timestamp.
|
|
1544
|
+
*/
|
|
1545
|
+
timestamp?: number;
|
|
1546
|
+
/**
|
|
1547
|
+
* Select a way to pass in `ends_at`.
|
|
1548
|
+
*/
|
|
1549
|
+
type: EndsAt.Type;
|
|
1550
|
+
}
|
|
1551
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none' | OtherString;
|
|
1552
|
+
interface SetPauseCollection {
|
|
1553
|
+
/**
|
|
1554
|
+
* Details of the pause_collection behavior to apply to the amendment.
|
|
1555
|
+
*/
|
|
1556
|
+
set?: SetPauseCollection.Set;
|
|
1557
|
+
/**
|
|
1558
|
+
* Determines the type of the pause_collection amendment.
|
|
1559
|
+
*/
|
|
1560
|
+
type: SetPauseCollection.Type;
|
|
1561
|
+
}
|
|
1562
|
+
type SetScheduleEnd = 'line_ends_at' | 'line_starts_at' | OtherString;
|
|
1563
|
+
interface StartsAt {
|
|
1564
|
+
/**
|
|
1565
|
+
* Use the `end` time of a given discount.
|
|
1566
|
+
*/
|
|
1567
|
+
discount_end?: StartsAt.DiscountEnd;
|
|
1568
|
+
/**
|
|
1569
|
+
* The timestamp the given line ends at.
|
|
1570
|
+
*/
|
|
1571
|
+
line_ends_at?: StartsAt.LineEndsAt;
|
|
1572
|
+
/**
|
|
1573
|
+
* A precise Unix timestamp.
|
|
1574
|
+
*/
|
|
1575
|
+
timestamp?: number;
|
|
1576
|
+
/**
|
|
1577
|
+
* Select a way to pass in `starts_at`.
|
|
1578
|
+
*/
|
|
1579
|
+
type: StartsAt.Type;
|
|
1580
|
+
}
|
|
1581
|
+
interface TrialSettings {
|
|
1582
|
+
/**
|
|
1583
|
+
* Defines how the subscription should behave when a trial ends.
|
|
1584
|
+
*/
|
|
1585
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
1586
|
+
}
|
|
1587
|
+
namespace Action {
|
|
1588
|
+
interface AddDiscount {
|
|
1589
|
+
/**
|
|
1590
|
+
* The coupon code to redeem.
|
|
1591
|
+
*/
|
|
1592
|
+
coupon?: string;
|
|
1593
|
+
/**
|
|
1594
|
+
* An ID of an existing discount for a coupon that was already redeemed.
|
|
1595
|
+
*/
|
|
1596
|
+
discount?: string;
|
|
1597
|
+
/**
|
|
1598
|
+
* Details to determine how long the discount should be applied for.
|
|
1599
|
+
*/
|
|
1600
|
+
discount_end?: AddDiscount.DiscountEnd;
|
|
1601
|
+
/**
|
|
1602
|
+
* 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.
|
|
1603
|
+
*/
|
|
1604
|
+
index?: number;
|
|
1605
|
+
/**
|
|
1606
|
+
* The promotion code to redeem.
|
|
1607
|
+
*/
|
|
1608
|
+
promotion_code?: string;
|
|
1609
|
+
}
|
|
1610
|
+
interface AddItem {
|
|
1611
|
+
/**
|
|
1612
|
+
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
1613
|
+
*/
|
|
1614
|
+
discounts?: Array<AddItem.Discount>;
|
|
1615
|
+
/**
|
|
1616
|
+
* 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`.
|
|
1617
|
+
*/
|
|
1618
|
+
metadata?: MetadataParam;
|
|
1619
|
+
/**
|
|
1620
|
+
* The ID of the price object.
|
|
1621
|
+
*/
|
|
1622
|
+
price: string;
|
|
1623
|
+
/**
|
|
1624
|
+
* Quantity for this item.
|
|
1625
|
+
*/
|
|
1626
|
+
quantity?: number;
|
|
1627
|
+
/**
|
|
1628
|
+
* 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`.
|
|
1629
|
+
*/
|
|
1630
|
+
tax_rates?: Array<string>;
|
|
1631
|
+
/**
|
|
1632
|
+
* Options that configure the trial on the subscription item.
|
|
1633
|
+
*/
|
|
1634
|
+
trial?: AddItem.Trial;
|
|
1635
|
+
/**
|
|
1636
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
1637
|
+
*/
|
|
1638
|
+
trial_offer?: string;
|
|
1639
|
+
}
|
|
1640
|
+
interface RemoveDiscount {
|
|
1641
|
+
/**
|
|
1642
|
+
* The coupon code to remove from the `discounts` array.
|
|
1643
|
+
*/
|
|
1644
|
+
coupon?: string;
|
|
1645
|
+
/**
|
|
1646
|
+
* The ID of a discount to remove from the `discounts` array.
|
|
1647
|
+
*/
|
|
1648
|
+
discount?: string;
|
|
1649
|
+
/**
|
|
1650
|
+
* The ID of a promotion code to remove from the `discounts` array.
|
|
1651
|
+
*/
|
|
1652
|
+
promotion_code?: string;
|
|
1653
|
+
}
|
|
1654
|
+
interface RemoveItem {
|
|
1655
|
+
/**
|
|
1656
|
+
* ID of a price to remove.
|
|
1657
|
+
*/
|
|
1658
|
+
price: string;
|
|
1659
|
+
}
|
|
1660
|
+
interface SetDiscount {
|
|
1661
|
+
/**
|
|
1662
|
+
* The coupon code to replace the `discounts` array with.
|
|
1663
|
+
*/
|
|
1664
|
+
coupon?: string;
|
|
1665
|
+
/**
|
|
1666
|
+
* An ID of an existing discount to replace the `discounts` array with.
|
|
1667
|
+
*/
|
|
1668
|
+
discount?: string;
|
|
1669
|
+
/**
|
|
1670
|
+
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
1671
|
+
*/
|
|
1672
|
+
promotion_code?: string;
|
|
1673
|
+
}
|
|
1674
|
+
interface SetItem {
|
|
1675
|
+
/**
|
|
1676
|
+
* 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`.
|
|
1677
|
+
*/
|
|
1678
|
+
discounts?: Array<SetItem.Discount>;
|
|
1679
|
+
/**
|
|
1680
|
+
* 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`.
|
|
1681
|
+
*/
|
|
1682
|
+
metadata?: MetadataParam;
|
|
1683
|
+
/**
|
|
1684
|
+
* The ID of the price object.
|
|
1685
|
+
*/
|
|
1686
|
+
price: string;
|
|
1687
|
+
/**
|
|
1688
|
+
* 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`.
|
|
1689
|
+
*/
|
|
1690
|
+
quantity?: number;
|
|
1691
|
+
/**
|
|
1692
|
+
* 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`.
|
|
1693
|
+
*/
|
|
1694
|
+
tax_rates?: Array<string>;
|
|
1695
|
+
/**
|
|
1696
|
+
* 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`.
|
|
1697
|
+
*/
|
|
1698
|
+
trial?: SetItem.Trial;
|
|
1699
|
+
/**
|
|
1700
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
1701
|
+
*/
|
|
1702
|
+
trial_offer?: string;
|
|
1703
|
+
}
|
|
1704
|
+
type Type = 'add_discount' | 'add_item' | 'add_metadata' | 'clear_discounts' | 'clear_metadata' | 'remove_discount' | 'remove_item' | 'remove_metadata' | 'set_discounts' | 'set_items' | 'set_metadata' | OtherString;
|
|
1705
|
+
namespace AddDiscount {
|
|
1706
|
+
interface DiscountEnd {
|
|
1707
|
+
/**
|
|
1708
|
+
* The type of calculation made to determine when the discount ends.
|
|
1709
|
+
*/
|
|
1710
|
+
type: 'line_ends_at';
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
namespace AddItem {
|
|
1714
|
+
interface Discount {
|
|
1715
|
+
/**
|
|
1716
|
+
* ID of the coupon to create a new discount for.
|
|
1717
|
+
*/
|
|
1718
|
+
coupon?: string;
|
|
1719
|
+
/**
|
|
1720
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1721
|
+
*/
|
|
1722
|
+
discount?: string;
|
|
1723
|
+
/**
|
|
1724
|
+
* Details to determine how long the discount should be applied for.
|
|
1725
|
+
*/
|
|
1726
|
+
discount_end?: Discount.DiscountEnd;
|
|
1727
|
+
/**
|
|
1728
|
+
* ID of the promotion code to create a new discount for.
|
|
1729
|
+
*/
|
|
1730
|
+
promotion_code?: string;
|
|
1731
|
+
}
|
|
1732
|
+
interface Trial {
|
|
1733
|
+
/**
|
|
1734
|
+
* 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.
|
|
1735
|
+
*/
|
|
1736
|
+
converts_to?: Array<string>;
|
|
1737
|
+
/**
|
|
1738
|
+
* Determines the type of trial for this item.
|
|
1739
|
+
*/
|
|
1740
|
+
type: Trial.Type;
|
|
1741
|
+
}
|
|
1742
|
+
namespace Discount {
|
|
1743
|
+
interface DiscountEnd {
|
|
1744
|
+
/**
|
|
1745
|
+
* Time span for the redeemed discount.
|
|
1746
|
+
*/
|
|
1747
|
+
duration?: DiscountEnd.Duration;
|
|
1748
|
+
/**
|
|
1749
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1750
|
+
*/
|
|
1751
|
+
timestamp?: number;
|
|
1752
|
+
/**
|
|
1753
|
+
* The type of calculation made to determine when the discount ends.
|
|
1754
|
+
*/
|
|
1755
|
+
type: DiscountEnd.Type;
|
|
1756
|
+
}
|
|
1757
|
+
namespace DiscountEnd {
|
|
1758
|
+
interface Duration {
|
|
1759
|
+
/**
|
|
1760
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1761
|
+
*/
|
|
1762
|
+
interval: Duration.Interval;
|
|
1763
|
+
/**
|
|
1764
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1765
|
+
*/
|
|
1766
|
+
interval_count: number;
|
|
1767
|
+
}
|
|
1768
|
+
type Type = 'duration' | 'timestamp' | OtherString;
|
|
1769
|
+
namespace Duration {
|
|
1770
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
namespace Trial {
|
|
1775
|
+
type Type = 'free' | 'paid' | OtherString;
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
namespace SetItem {
|
|
1779
|
+
interface Discount {
|
|
1780
|
+
/**
|
|
1781
|
+
* ID of the coupon to create a new discount for.
|
|
1782
|
+
*/
|
|
1783
|
+
coupon?: string;
|
|
1784
|
+
/**
|
|
1785
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1786
|
+
*/
|
|
1787
|
+
discount?: string;
|
|
1788
|
+
/**
|
|
1789
|
+
* Details to determine how long the discount should be applied for.
|
|
1790
|
+
*/
|
|
1791
|
+
discount_end?: Discount.DiscountEnd;
|
|
1792
|
+
/**
|
|
1793
|
+
* ID of the promotion code to create a new discount for.
|
|
1794
|
+
*/
|
|
1795
|
+
promotion_code?: string;
|
|
1796
|
+
}
|
|
1797
|
+
interface Trial {
|
|
1798
|
+
/**
|
|
1799
|
+
* 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.
|
|
1800
|
+
*/
|
|
1801
|
+
converts_to?: Array<string>;
|
|
1802
|
+
/**
|
|
1803
|
+
* Determines the type of trial for this item.
|
|
1804
|
+
*/
|
|
1805
|
+
type: Trial.Type;
|
|
1806
|
+
}
|
|
1807
|
+
namespace Discount {
|
|
1808
|
+
interface DiscountEnd {
|
|
1809
|
+
/**
|
|
1810
|
+
* Time span for the redeemed discount.
|
|
1811
|
+
*/
|
|
1812
|
+
duration?: DiscountEnd.Duration;
|
|
1813
|
+
/**
|
|
1814
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1815
|
+
*/
|
|
1816
|
+
timestamp?: number;
|
|
1817
|
+
/**
|
|
1818
|
+
* The type of calculation made to determine when the discount ends.
|
|
1819
|
+
*/
|
|
1820
|
+
type: DiscountEnd.Type;
|
|
1821
|
+
}
|
|
1822
|
+
namespace DiscountEnd {
|
|
1823
|
+
interface Duration {
|
|
1824
|
+
/**
|
|
1825
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1826
|
+
*/
|
|
1827
|
+
interval: Duration.Interval;
|
|
1828
|
+
/**
|
|
1829
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1830
|
+
*/
|
|
1831
|
+
interval_count: number;
|
|
1832
|
+
}
|
|
1833
|
+
type Type = 'duration' | 'timestamp' | OtherString;
|
|
1834
|
+
namespace Duration {
|
|
1835
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
namespace Trial {
|
|
1840
|
+
type Type = 'free' | 'paid' | OtherString;
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
namespace AppliesTo {
|
|
1845
|
+
type Type = 'new_reference' | 'subscription_schedule' | OtherString;
|
|
1846
|
+
}
|
|
1847
|
+
namespace EndsAt {
|
|
1848
|
+
interface DiscountEnd {
|
|
1849
|
+
/**
|
|
1850
|
+
* The ID of a specific discount.
|
|
1851
|
+
*/
|
|
1852
|
+
discount: string;
|
|
1853
|
+
}
|
|
1854
|
+
interface Duration {
|
|
1855
|
+
/**
|
|
1856
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1857
|
+
*/
|
|
1858
|
+
interval: Duration.Interval;
|
|
1859
|
+
/**
|
|
1860
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1861
|
+
*/
|
|
1862
|
+
interval_count: number;
|
|
1863
|
+
}
|
|
1864
|
+
type Type = 'billing_period_end' | 'discount_end' | 'duration' | 'quote_acceptance_date' | 'schedule_end' | 'timestamp' | 'upcoming_invoice' | OtherString;
|
|
1865
|
+
namespace Duration {
|
|
1866
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
namespace SetPauseCollection {
|
|
1870
|
+
interface Set {
|
|
1871
|
+
/**
|
|
1872
|
+
* The payment collection behavior for this subscription while paused.
|
|
1873
|
+
*/
|
|
1874
|
+
behavior: Set.Behavior;
|
|
1875
|
+
}
|
|
1876
|
+
type Type = 'remove' | 'set' | OtherString;
|
|
1877
|
+
namespace Set {
|
|
1878
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void' | OtherString;
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
namespace StartsAt {
|
|
1882
|
+
interface DiscountEnd {
|
|
1883
|
+
/**
|
|
1884
|
+
* The ID of a specific discount.
|
|
1885
|
+
*/
|
|
1886
|
+
discount: string;
|
|
1887
|
+
}
|
|
1888
|
+
interface LineEndsAt {
|
|
1889
|
+
/**
|
|
1890
|
+
* 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.
|
|
1891
|
+
*/
|
|
1892
|
+
index?: number;
|
|
1893
|
+
}
|
|
1894
|
+
type Type = 'discount_end' | 'line_ends_at' | 'now' | 'quote_acceptance_date' | 'schedule_end' | 'timestamp' | 'upcoming_invoice' | OtherString;
|
|
1895
|
+
}
|
|
1896
|
+
namespace TrialSettings {
|
|
1897
|
+
interface EndBehavior {
|
|
1898
|
+
/**
|
|
1899
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
1900
|
+
*/
|
|
1901
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
1902
|
+
}
|
|
1903
|
+
namespace EndBehavior {
|
|
1904
|
+
type ProrateUpFront = 'defer' | 'include' | OtherString;
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
832
1908
|
namespace LineItem {
|
|
833
1909
|
interface Discount {
|
|
834
1910
|
/**
|
|
@@ -839,6 +1915,10 @@ export declare namespace QuoteCreateParams {
|
|
|
839
1915
|
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
840
1916
|
*/
|
|
841
1917
|
discount?: string;
|
|
1918
|
+
/**
|
|
1919
|
+
* Details to determine how long the discount should be applied for.
|
|
1920
|
+
*/
|
|
1921
|
+
discount_end?: Discount.DiscountEnd;
|
|
842
1922
|
/**
|
|
843
1923
|
* ID of the promotion code to create a new discount for.
|
|
844
1924
|
*/
|
|
@@ -870,6 +1950,38 @@ export declare namespace QuoteCreateParams {
|
|
|
870
1950
|
*/
|
|
871
1951
|
unit_amount_decimal?: Decimal;
|
|
872
1952
|
}
|
|
1953
|
+
namespace Discount {
|
|
1954
|
+
interface DiscountEnd {
|
|
1955
|
+
/**
|
|
1956
|
+
* Time span for the redeemed discount.
|
|
1957
|
+
*/
|
|
1958
|
+
duration?: DiscountEnd.Duration;
|
|
1959
|
+
/**
|
|
1960
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
1961
|
+
*/
|
|
1962
|
+
timestamp?: number;
|
|
1963
|
+
/**
|
|
1964
|
+
* The type of calculation made to determine when the discount ends.
|
|
1965
|
+
*/
|
|
1966
|
+
type: DiscountEnd.Type;
|
|
1967
|
+
}
|
|
1968
|
+
namespace DiscountEnd {
|
|
1969
|
+
interface Duration {
|
|
1970
|
+
/**
|
|
1971
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1972
|
+
*/
|
|
1973
|
+
interval: Duration.Interval;
|
|
1974
|
+
/**
|
|
1975
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1976
|
+
*/
|
|
1977
|
+
interval_count: number;
|
|
1978
|
+
}
|
|
1979
|
+
type Type = 'duration' | 'timestamp' | OtherString;
|
|
1980
|
+
namespace Duration {
|
|
1981
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
}
|
|
873
1985
|
namespace PriceData {
|
|
874
1986
|
interface Recurring {
|
|
875
1987
|
/**
|
|
@@ -888,6 +2000,17 @@ export declare namespace QuoteCreateParams {
|
|
|
888
2000
|
}
|
|
889
2001
|
}
|
|
890
2002
|
namespace SubscriptionData {
|
|
2003
|
+
interface BillOnAcceptance {
|
|
2004
|
+
/**
|
|
2005
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
2006
|
+
*/
|
|
2007
|
+
bill_from?: BillOnAcceptance.BillFrom;
|
|
2008
|
+
/**
|
|
2009
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
2010
|
+
*/
|
|
2011
|
+
bill_until?: BillOnAcceptance.BillUntil;
|
|
2012
|
+
}
|
|
2013
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front' | OtherString;
|
|
891
2014
|
interface BillingMode {
|
|
892
2015
|
/**
|
|
893
2016
|
* Configure behavior for flexible billing mode.
|
|
@@ -898,16 +2021,202 @@ export declare namespace QuoteCreateParams {
|
|
|
898
2021
|
*/
|
|
899
2022
|
type: BillingMode.Type;
|
|
900
2023
|
}
|
|
2024
|
+
type EndBehavior = 'cancel' | 'release' | OtherString;
|
|
2025
|
+
interface Prebilling {
|
|
2026
|
+
/**
|
|
2027
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
2028
|
+
*/
|
|
2029
|
+
iterations: number;
|
|
2030
|
+
}
|
|
2031
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none' | OtherString;
|
|
901
2032
|
namespace BillingMode {
|
|
902
2033
|
interface Flexible {
|
|
903
2034
|
/**
|
|
904
|
-
* Controls how invoices and invoice items display proration amounts and discount amounts.
|
|
2035
|
+
* Controls how invoices and invoice items display proration amounts and discount amounts.
|
|
2036
|
+
*/
|
|
2037
|
+
proration_discounts?: Flexible.ProrationDiscounts;
|
|
2038
|
+
}
|
|
2039
|
+
type Type = 'classic' | 'flexible' | OtherString;
|
|
2040
|
+
namespace Flexible {
|
|
2041
|
+
type ProrationDiscounts = 'included' | 'itemized' | OtherString;
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
namespace BillOnAcceptance {
|
|
2045
|
+
interface BillFrom {
|
|
2046
|
+
/**
|
|
2047
|
+
* Details of a Quote line to start the bill period from.
|
|
2048
|
+
*/
|
|
2049
|
+
line_starts_at?: BillFrom.LineStartsAt;
|
|
2050
|
+
/**
|
|
2051
|
+
* A precise Unix timestamp.
|
|
2052
|
+
*/
|
|
2053
|
+
timestamp?: number;
|
|
2054
|
+
/**
|
|
2055
|
+
* The type of method to specify the `bill_from` time.
|
|
2056
|
+
*/
|
|
2057
|
+
type: BillFrom.Type;
|
|
2058
|
+
}
|
|
2059
|
+
interface BillUntil {
|
|
2060
|
+
/**
|
|
2061
|
+
* Details of the duration over which to bill.
|
|
2062
|
+
*/
|
|
2063
|
+
duration?: BillUntil.Duration;
|
|
2064
|
+
/**
|
|
2065
|
+
* Details of a Quote line item from which to bill until.
|
|
2066
|
+
*/
|
|
2067
|
+
line_ends_at?: BillUntil.LineEndsAt;
|
|
2068
|
+
/**
|
|
2069
|
+
* A precise Unix timestamp.
|
|
2070
|
+
*/
|
|
2071
|
+
timestamp?: number;
|
|
2072
|
+
/**
|
|
2073
|
+
* The type of method to specify the `bill_until` time.
|
|
2074
|
+
*/
|
|
2075
|
+
type: BillUntil.Type;
|
|
2076
|
+
}
|
|
2077
|
+
namespace BillFrom {
|
|
2078
|
+
interface LineStartsAt {
|
|
2079
|
+
/**
|
|
2080
|
+
* The ID of a quote line.
|
|
2081
|
+
*/
|
|
2082
|
+
id?: string;
|
|
2083
|
+
/**
|
|
2084
|
+
* 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.
|
|
2085
|
+
*/
|
|
2086
|
+
index?: number;
|
|
2087
|
+
}
|
|
2088
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp' | OtherString;
|
|
2089
|
+
}
|
|
2090
|
+
namespace BillUntil {
|
|
2091
|
+
interface Duration {
|
|
2092
|
+
/**
|
|
2093
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2094
|
+
*/
|
|
2095
|
+
interval: Duration.Interval;
|
|
2096
|
+
/**
|
|
2097
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2098
|
+
*/
|
|
2099
|
+
interval_count: number;
|
|
2100
|
+
}
|
|
2101
|
+
interface LineEndsAt {
|
|
2102
|
+
/**
|
|
2103
|
+
* The ID of a quote line.
|
|
2104
|
+
*/
|
|
2105
|
+
id?: string;
|
|
2106
|
+
/**
|
|
2107
|
+
* 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.
|
|
2108
|
+
*/
|
|
2109
|
+
index?: number;
|
|
2110
|
+
}
|
|
2111
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice' | OtherString;
|
|
2112
|
+
namespace Duration {
|
|
2113
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
namespace SubscriptionDataOverride {
|
|
2119
|
+
interface AppliesTo {
|
|
2120
|
+
/**
|
|
2121
|
+
* 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.
|
|
2122
|
+
*/
|
|
2123
|
+
new_reference?: string;
|
|
2124
|
+
/**
|
|
2125
|
+
* The ID of the schedule the line applies to.
|
|
2126
|
+
*/
|
|
2127
|
+
subscription_schedule?: string;
|
|
2128
|
+
/**
|
|
2129
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
2130
|
+
*/
|
|
2131
|
+
type: AppliesTo.Type;
|
|
2132
|
+
}
|
|
2133
|
+
interface BillOnAcceptance {
|
|
2134
|
+
/**
|
|
2135
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
2136
|
+
*/
|
|
2137
|
+
bill_from?: BillOnAcceptance.BillFrom;
|
|
2138
|
+
/**
|
|
2139
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
2140
|
+
*/
|
|
2141
|
+
bill_until?: BillOnAcceptance.BillUntil;
|
|
2142
|
+
}
|
|
2143
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front' | OtherString;
|
|
2144
|
+
type EndBehavior = 'cancel' | 'release' | OtherString;
|
|
2145
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none' | OtherString;
|
|
2146
|
+
namespace AppliesTo {
|
|
2147
|
+
type Type = 'new_reference' | 'subscription_schedule' | OtherString;
|
|
2148
|
+
}
|
|
2149
|
+
namespace BillOnAcceptance {
|
|
2150
|
+
interface BillFrom {
|
|
2151
|
+
/**
|
|
2152
|
+
* Details of a Quote line to start the bill period from.
|
|
2153
|
+
*/
|
|
2154
|
+
line_starts_at?: BillFrom.LineStartsAt;
|
|
2155
|
+
/**
|
|
2156
|
+
* A precise Unix timestamp.
|
|
2157
|
+
*/
|
|
2158
|
+
timestamp?: number;
|
|
2159
|
+
/**
|
|
2160
|
+
* The type of method to specify the `bill_from` time.
|
|
905
2161
|
*/
|
|
906
|
-
|
|
2162
|
+
type: BillFrom.Type;
|
|
907
2163
|
}
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
2164
|
+
interface BillUntil {
|
|
2165
|
+
/**
|
|
2166
|
+
* Details of the duration over which to bill.
|
|
2167
|
+
*/
|
|
2168
|
+
duration?: BillUntil.Duration;
|
|
2169
|
+
/**
|
|
2170
|
+
* Details of a Quote line item from which to bill until.
|
|
2171
|
+
*/
|
|
2172
|
+
line_ends_at?: BillUntil.LineEndsAt;
|
|
2173
|
+
/**
|
|
2174
|
+
* A precise Unix timestamp.
|
|
2175
|
+
*/
|
|
2176
|
+
timestamp?: number;
|
|
2177
|
+
/**
|
|
2178
|
+
* The type of method to specify the `bill_until` time.
|
|
2179
|
+
*/
|
|
2180
|
+
type: BillUntil.Type;
|
|
2181
|
+
}
|
|
2182
|
+
namespace BillFrom {
|
|
2183
|
+
interface LineStartsAt {
|
|
2184
|
+
/**
|
|
2185
|
+
* The ID of a quote line.
|
|
2186
|
+
*/
|
|
2187
|
+
id?: string;
|
|
2188
|
+
/**
|
|
2189
|
+
* 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.
|
|
2190
|
+
*/
|
|
2191
|
+
index?: number;
|
|
2192
|
+
}
|
|
2193
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp' | OtherString;
|
|
2194
|
+
}
|
|
2195
|
+
namespace BillUntil {
|
|
2196
|
+
interface Duration {
|
|
2197
|
+
/**
|
|
2198
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2199
|
+
*/
|
|
2200
|
+
interval: Duration.Interval;
|
|
2201
|
+
/**
|
|
2202
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2203
|
+
*/
|
|
2204
|
+
interval_count: number;
|
|
2205
|
+
}
|
|
2206
|
+
interface LineEndsAt {
|
|
2207
|
+
/**
|
|
2208
|
+
* The ID of a quote line.
|
|
2209
|
+
*/
|
|
2210
|
+
id?: string;
|
|
2211
|
+
/**
|
|
2212
|
+
* 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.
|
|
2213
|
+
*/
|
|
2214
|
+
index?: number;
|
|
2215
|
+
}
|
|
2216
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice' | OtherString;
|
|
2217
|
+
namespace Duration {
|
|
2218
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
2219
|
+
}
|
|
911
2220
|
}
|
|
912
2221
|
}
|
|
913
2222
|
}
|
|
@@ -919,6 +2228,10 @@ export interface QuoteRetrieveParams {
|
|
|
919
2228
|
expand?: Array<string>;
|
|
920
2229
|
}
|
|
921
2230
|
export interface QuoteUpdateParams {
|
|
2231
|
+
/**
|
|
2232
|
+
* Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
2233
|
+
*/
|
|
2234
|
+
allow_backdated_lines?: boolean;
|
|
922
2235
|
/**
|
|
923
2236
|
* 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.
|
|
924
2237
|
*/
|
|
@@ -979,6 +2292,10 @@ export interface QuoteUpdateParams {
|
|
|
979
2292
|
* 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.
|
|
980
2293
|
*/
|
|
981
2294
|
line_items?: Array<QuoteUpdateParams.LineItem>;
|
|
2295
|
+
/**
|
|
2296
|
+
* 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.
|
|
2297
|
+
*/
|
|
2298
|
+
lines?: Array<QuoteUpdateParams.Line>;
|
|
982
2299
|
/**
|
|
983
2300
|
* 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`.
|
|
984
2301
|
*/
|
|
@@ -991,6 +2308,10 @@ export interface QuoteUpdateParams {
|
|
|
991
2308
|
* 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.
|
|
992
2309
|
*/
|
|
993
2310
|
subscription_data?: QuoteUpdateParams.SubscriptionData;
|
|
2311
|
+
/**
|
|
2312
|
+
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
2313
|
+
*/
|
|
2314
|
+
subscription_data_overrides?: Emptyable<Array<QuoteUpdateParams.SubscriptionDataOverride>>;
|
|
994
2315
|
/**
|
|
995
2316
|
* The data with which to automatically create a Transfer for each of the invoices.
|
|
996
2317
|
*/
|
|
@@ -1017,6 +2338,10 @@ export declare namespace QuoteUpdateParams {
|
|
|
1017
2338
|
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1018
2339
|
*/
|
|
1019
2340
|
discount?: string;
|
|
2341
|
+
/**
|
|
2342
|
+
* Details to determine how long the discount should be applied for.
|
|
2343
|
+
*/
|
|
2344
|
+
discount_end?: Discount.DiscountEnd;
|
|
1020
2345
|
/**
|
|
1021
2346
|
* ID of the promotion code to create a new discount for.
|
|
1022
2347
|
*/
|
|
@@ -1070,24 +2395,136 @@ export declare namespace QuoteUpdateParams {
|
|
|
1070
2395
|
*/
|
|
1071
2396
|
tax_rates?: Emptyable<Array<string>>;
|
|
1072
2397
|
}
|
|
2398
|
+
interface Line {
|
|
2399
|
+
/**
|
|
2400
|
+
* An array of operations the quote line performs.
|
|
2401
|
+
*/
|
|
2402
|
+
actions?: Array<Line.Action>;
|
|
2403
|
+
/**
|
|
2404
|
+
* Details to identify the subscription schedule the quote line applies to.
|
|
2405
|
+
*/
|
|
2406
|
+
applies_to?: Line.AppliesTo;
|
|
2407
|
+
/**
|
|
2408
|
+
* 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.
|
|
2409
|
+
*/
|
|
2410
|
+
billing_cycle_anchor?: Line.BillingCycleAnchor;
|
|
2411
|
+
/**
|
|
2412
|
+
* 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.
|
|
2413
|
+
*/
|
|
2414
|
+
cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
|
|
2415
|
+
/**
|
|
2416
|
+
* 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.
|
|
2417
|
+
*/
|
|
2418
|
+
ends_at?: Line.EndsAt;
|
|
2419
|
+
/**
|
|
2420
|
+
* The ID of an existing line on the quote.
|
|
2421
|
+
*/
|
|
2422
|
+
id?: string;
|
|
2423
|
+
/**
|
|
2424
|
+
* 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.
|
|
2425
|
+
*/
|
|
2426
|
+
proration_behavior?: Line.ProrationBehavior;
|
|
2427
|
+
/**
|
|
2428
|
+
* Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
|
|
2429
|
+
*/
|
|
2430
|
+
set_pause_collection?: Line.SetPauseCollection;
|
|
2431
|
+
/**
|
|
2432
|
+
* Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
|
|
2433
|
+
*/
|
|
2434
|
+
set_schedule_end?: Line.SetScheduleEnd;
|
|
2435
|
+
/**
|
|
2436
|
+
* Details to identify the earliest timestamp where the proposed change should take effect.
|
|
2437
|
+
*/
|
|
2438
|
+
starts_at?: Line.StartsAt;
|
|
2439
|
+
/**
|
|
2440
|
+
* Settings related to subscription trials.
|
|
2441
|
+
*/
|
|
2442
|
+
trial_settings?: Line.TrialSettings;
|
|
2443
|
+
}
|
|
1073
2444
|
interface SubscriptionData {
|
|
2445
|
+
/**
|
|
2446
|
+
* Describes the period to bill for upon accepting the quote.
|
|
2447
|
+
*/
|
|
2448
|
+
bill_on_acceptance?: Emptyable<SubscriptionData.BillOnAcceptance>;
|
|
2449
|
+
/**
|
|
2450
|
+
* 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.
|
|
2451
|
+
*/
|
|
2452
|
+
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
2453
|
+
/**
|
|
2454
|
+
* When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
|
|
2455
|
+
*/
|
|
2456
|
+
billing_cycle_anchor?: Emptyable<'reset'>;
|
|
1074
2457
|
/**
|
|
1075
2458
|
* 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.
|
|
1076
2459
|
*/
|
|
1077
2460
|
description?: Emptyable<string>;
|
|
1078
2461
|
/**
|
|
1079
|
-
* 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.
|
|
2462
|
+
* 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.
|
|
1080
2463
|
*/
|
|
1081
2464
|
effective_date?: Emptyable<'current_period_end' | number>;
|
|
2465
|
+
/**
|
|
2466
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
2467
|
+
*/
|
|
2468
|
+
end_behavior?: SubscriptionData.EndBehavior;
|
|
1082
2469
|
/**
|
|
1083
2470
|
* 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.
|
|
1084
2471
|
*/
|
|
1085
2472
|
metadata?: MetadataParam;
|
|
2473
|
+
/**
|
|
2474
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
2475
|
+
*/
|
|
2476
|
+
prebilling?: Emptyable<SubscriptionData.Prebilling>;
|
|
2477
|
+
/**
|
|
2478
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
2479
|
+
*
|
|
2480
|
+
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
2481
|
+
*
|
|
2482
|
+
* 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`.
|
|
2483
|
+
*
|
|
2484
|
+
* Prorations can be disabled by passing `none`.
|
|
2485
|
+
*/
|
|
2486
|
+
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
1086
2487
|
/**
|
|
1087
2488
|
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
1088
2489
|
*/
|
|
1089
2490
|
trial_period_days?: Emptyable<number>;
|
|
1090
2491
|
}
|
|
2492
|
+
interface SubscriptionDataOverride {
|
|
2493
|
+
/**
|
|
2494
|
+
* Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
|
|
2495
|
+
*/
|
|
2496
|
+
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
2497
|
+
/**
|
|
2498
|
+
* Describes the period to bill for upon accepting the quote.
|
|
2499
|
+
*/
|
|
2500
|
+
bill_on_acceptance?: Emptyable<SubscriptionDataOverride.BillOnAcceptance>;
|
|
2501
|
+
/**
|
|
2502
|
+
* 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.
|
|
2503
|
+
*/
|
|
2504
|
+
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
2505
|
+
/**
|
|
2506
|
+
* The customer the Subscription Data override applies to.
|
|
2507
|
+
*/
|
|
2508
|
+
customer?: string;
|
|
2509
|
+
/**
|
|
2510
|
+
* 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.
|
|
2511
|
+
*/
|
|
2512
|
+
description?: Emptyable<string>;
|
|
2513
|
+
/**
|
|
2514
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
2515
|
+
*/
|
|
2516
|
+
end_behavior?: SubscriptionDataOverride.EndBehavior;
|
|
2517
|
+
/**
|
|
2518
|
+
* Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
|
|
2519
|
+
*
|
|
2520
|
+
* When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
|
|
2521
|
+
*
|
|
2522
|
+
* 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`.
|
|
2523
|
+
*
|
|
2524
|
+
* Prorations can be disabled by passing `none`.
|
|
2525
|
+
*/
|
|
2526
|
+
proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
|
|
2527
|
+
}
|
|
1091
2528
|
interface TransferData {
|
|
1092
2529
|
/**
|
|
1093
2530
|
* 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.
|
|
@@ -1113,33 +2550,520 @@ export declare namespace QuoteUpdateParams {
|
|
|
1113
2550
|
*/
|
|
1114
2551
|
type: Liability.Type;
|
|
1115
2552
|
}
|
|
1116
|
-
namespace Liability {
|
|
1117
|
-
type Type = 'account' | 'self' | OtherString;
|
|
2553
|
+
namespace Liability {
|
|
2554
|
+
type Type = 'account' | 'self' | OtherString;
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
namespace Discount {
|
|
2558
|
+
interface DiscountEnd {
|
|
2559
|
+
/**
|
|
2560
|
+
* Time span for the redeemed discount.
|
|
2561
|
+
*/
|
|
2562
|
+
duration?: DiscountEnd.Duration;
|
|
2563
|
+
/**
|
|
2564
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2565
|
+
*/
|
|
2566
|
+
timestamp?: number;
|
|
2567
|
+
/**
|
|
2568
|
+
* The type of calculation made to determine when the discount ends.
|
|
2569
|
+
*/
|
|
2570
|
+
type: DiscountEnd.Type;
|
|
2571
|
+
}
|
|
2572
|
+
namespace DiscountEnd {
|
|
2573
|
+
interface Duration {
|
|
2574
|
+
/**
|
|
2575
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2576
|
+
*/
|
|
2577
|
+
interval: Duration.Interval;
|
|
2578
|
+
/**
|
|
2579
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2580
|
+
*/
|
|
2581
|
+
interval_count: number;
|
|
2582
|
+
}
|
|
2583
|
+
type Type = 'duration' | 'timestamp' | OtherString;
|
|
2584
|
+
namespace Duration {
|
|
2585
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
namespace InvoiceSettings {
|
|
2590
|
+
interface CustomField {
|
|
2591
|
+
/**
|
|
2592
|
+
* The name of the custom field. This may be up to 40 characters.
|
|
2593
|
+
*/
|
|
2594
|
+
name: string;
|
|
2595
|
+
/**
|
|
2596
|
+
* The value of the custom field. This may be up to 140 characters.
|
|
2597
|
+
*/
|
|
2598
|
+
value: string;
|
|
2599
|
+
}
|
|
2600
|
+
interface Issuer {
|
|
2601
|
+
/**
|
|
2602
|
+
* The connected account being referenced when `type` is `account`.
|
|
2603
|
+
*/
|
|
2604
|
+
account?: string;
|
|
2605
|
+
/**
|
|
2606
|
+
* Type of the account referenced in the request.
|
|
2607
|
+
*/
|
|
2608
|
+
type: Issuer.Type;
|
|
2609
|
+
}
|
|
2610
|
+
namespace Issuer {
|
|
2611
|
+
type Type = 'account' | 'self' | OtherString;
|
|
2612
|
+
}
|
|
2613
|
+
}
|
|
2614
|
+
namespace Line {
|
|
2615
|
+
interface Action {
|
|
2616
|
+
/**
|
|
2617
|
+
* Details for the `add_discount` type.
|
|
2618
|
+
*/
|
|
2619
|
+
add_discount?: Action.AddDiscount;
|
|
2620
|
+
/**
|
|
2621
|
+
* Details for the `add_item` type.
|
|
2622
|
+
*/
|
|
2623
|
+
add_item?: Action.AddItem;
|
|
2624
|
+
/**
|
|
2625
|
+
* Details for the `add_metadata` type: specify a hash of key-value pairs.
|
|
2626
|
+
*/
|
|
2627
|
+
add_metadata?: {
|
|
2628
|
+
[key: string]: string;
|
|
2629
|
+
};
|
|
2630
|
+
/**
|
|
2631
|
+
* Details for the `remove_discount` type.
|
|
2632
|
+
*/
|
|
2633
|
+
remove_discount?: Action.RemoveDiscount;
|
|
2634
|
+
/**
|
|
2635
|
+
* Details for the `remove_item` type.
|
|
2636
|
+
*/
|
|
2637
|
+
remove_item?: Action.RemoveItem;
|
|
2638
|
+
/**
|
|
2639
|
+
* Details for the `remove_metadata` type: specify an array of metadata keys.
|
|
2640
|
+
*/
|
|
2641
|
+
remove_metadata?: Array<string>;
|
|
2642
|
+
/**
|
|
2643
|
+
* Details for the `set_discounts` type.
|
|
2644
|
+
*/
|
|
2645
|
+
set_discounts?: Array<Action.SetDiscount>;
|
|
2646
|
+
/**
|
|
2647
|
+
* Details for the `set_items` type.
|
|
2648
|
+
*/
|
|
2649
|
+
set_items?: Array<Action.SetItem>;
|
|
2650
|
+
/**
|
|
2651
|
+
* Details for the `set_metadata` type: specify an array of key-value pairs.
|
|
2652
|
+
*/
|
|
2653
|
+
set_metadata?: Emptyable<{
|
|
2654
|
+
[key: string]: string;
|
|
2655
|
+
}>;
|
|
2656
|
+
/**
|
|
2657
|
+
* The type of action the quote line performs.
|
|
2658
|
+
*/
|
|
2659
|
+
type: Action.Type;
|
|
2660
|
+
}
|
|
2661
|
+
interface AppliesTo {
|
|
2662
|
+
/**
|
|
2663
|
+
* 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.
|
|
2664
|
+
*/
|
|
2665
|
+
new_reference?: string;
|
|
2666
|
+
/**
|
|
2667
|
+
* The ID of the schedule the line applies to.
|
|
2668
|
+
*/
|
|
2669
|
+
subscription_schedule?: string;
|
|
2670
|
+
/**
|
|
2671
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
2672
|
+
*/
|
|
2673
|
+
type: AppliesTo.Type;
|
|
2674
|
+
}
|
|
2675
|
+
type BillingCycleAnchor = 'automatic' | 'line_starts_at' | OtherString;
|
|
2676
|
+
interface CancelSubscriptionSchedule {
|
|
2677
|
+
/**
|
|
2678
|
+
* Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
|
|
2679
|
+
*/
|
|
2680
|
+
cancel_at: 'line_starts_at';
|
|
2681
|
+
/**
|
|
2682
|
+
* 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`.
|
|
2683
|
+
*/
|
|
2684
|
+
invoice_now?: boolean;
|
|
2685
|
+
/**
|
|
2686
|
+
* If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
|
|
2687
|
+
*/
|
|
2688
|
+
prorate?: boolean;
|
|
2689
|
+
}
|
|
2690
|
+
interface EndsAt {
|
|
2691
|
+
/**
|
|
2692
|
+
* Use the `end` time of a given discount.
|
|
2693
|
+
*/
|
|
2694
|
+
discount_end?: EndsAt.DiscountEnd;
|
|
2695
|
+
/**
|
|
2696
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
2697
|
+
*/
|
|
2698
|
+
duration?: EndsAt.Duration;
|
|
2699
|
+
/**
|
|
2700
|
+
* A precise Unix timestamp.
|
|
2701
|
+
*/
|
|
2702
|
+
timestamp?: number;
|
|
2703
|
+
/**
|
|
2704
|
+
* Select a way to pass in `ends_at`.
|
|
2705
|
+
*/
|
|
2706
|
+
type: EndsAt.Type;
|
|
2707
|
+
}
|
|
2708
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none' | OtherString;
|
|
2709
|
+
interface SetPauseCollection {
|
|
2710
|
+
/**
|
|
2711
|
+
* Details of the pause_collection behavior to apply to the amendment.
|
|
2712
|
+
*/
|
|
2713
|
+
set?: SetPauseCollection.Set;
|
|
2714
|
+
/**
|
|
2715
|
+
* Determines the type of the pause_collection amendment.
|
|
2716
|
+
*/
|
|
2717
|
+
type: SetPauseCollection.Type;
|
|
2718
|
+
}
|
|
2719
|
+
type SetScheduleEnd = 'line_ends_at' | 'line_starts_at' | OtherString;
|
|
2720
|
+
interface StartsAt {
|
|
2721
|
+
/**
|
|
2722
|
+
* Use the `end` time of a given discount.
|
|
2723
|
+
*/
|
|
2724
|
+
discount_end?: StartsAt.DiscountEnd;
|
|
2725
|
+
/**
|
|
2726
|
+
* The timestamp the given line ends at.
|
|
2727
|
+
*/
|
|
2728
|
+
line_ends_at?: StartsAt.LineEndsAt;
|
|
2729
|
+
/**
|
|
2730
|
+
* A precise Unix timestamp.
|
|
2731
|
+
*/
|
|
2732
|
+
timestamp?: number;
|
|
2733
|
+
/**
|
|
2734
|
+
* Select a way to pass in `starts_at`.
|
|
2735
|
+
*/
|
|
2736
|
+
type: StartsAt.Type;
|
|
2737
|
+
}
|
|
2738
|
+
interface TrialSettings {
|
|
2739
|
+
/**
|
|
2740
|
+
* Defines how the subscription should behave when a trial ends.
|
|
2741
|
+
*/
|
|
2742
|
+
end_behavior?: TrialSettings.EndBehavior;
|
|
2743
|
+
}
|
|
2744
|
+
namespace Action {
|
|
2745
|
+
interface AddDiscount {
|
|
2746
|
+
/**
|
|
2747
|
+
* The coupon code to redeem.
|
|
2748
|
+
*/
|
|
2749
|
+
coupon?: string;
|
|
2750
|
+
/**
|
|
2751
|
+
* An ID of an existing discount for a coupon that was already redeemed.
|
|
2752
|
+
*/
|
|
2753
|
+
discount?: string;
|
|
2754
|
+
/**
|
|
2755
|
+
* Details to determine how long the discount should be applied for.
|
|
2756
|
+
*/
|
|
2757
|
+
discount_end?: AddDiscount.DiscountEnd;
|
|
2758
|
+
/**
|
|
2759
|
+
* 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.
|
|
2760
|
+
*/
|
|
2761
|
+
index?: number;
|
|
2762
|
+
/**
|
|
2763
|
+
* The promotion code to redeem.
|
|
2764
|
+
*/
|
|
2765
|
+
promotion_code?: string;
|
|
2766
|
+
}
|
|
2767
|
+
interface AddItem {
|
|
2768
|
+
/**
|
|
2769
|
+
* The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
|
|
2770
|
+
*/
|
|
2771
|
+
discounts?: Array<AddItem.Discount>;
|
|
2772
|
+
/**
|
|
2773
|
+
* 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`.
|
|
2774
|
+
*/
|
|
2775
|
+
metadata?: MetadataParam;
|
|
2776
|
+
/**
|
|
2777
|
+
* The ID of the price object.
|
|
2778
|
+
*/
|
|
2779
|
+
price: string;
|
|
2780
|
+
/**
|
|
2781
|
+
* Quantity for this item.
|
|
2782
|
+
*/
|
|
2783
|
+
quantity?: number;
|
|
2784
|
+
/**
|
|
2785
|
+
* 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`.
|
|
2786
|
+
*/
|
|
2787
|
+
tax_rates?: Array<string>;
|
|
2788
|
+
/**
|
|
2789
|
+
* Options that configure the trial on the subscription item.
|
|
2790
|
+
*/
|
|
2791
|
+
trial?: AddItem.Trial;
|
|
2792
|
+
/**
|
|
2793
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
2794
|
+
*/
|
|
2795
|
+
trial_offer?: string;
|
|
2796
|
+
}
|
|
2797
|
+
interface RemoveDiscount {
|
|
2798
|
+
/**
|
|
2799
|
+
* The coupon code to remove from the `discounts` array.
|
|
2800
|
+
*/
|
|
2801
|
+
coupon?: string;
|
|
2802
|
+
/**
|
|
2803
|
+
* The ID of a discount to remove from the `discounts` array.
|
|
2804
|
+
*/
|
|
2805
|
+
discount?: string;
|
|
2806
|
+
/**
|
|
2807
|
+
* The ID of a promotion code to remove from the `discounts` array.
|
|
2808
|
+
*/
|
|
2809
|
+
promotion_code?: string;
|
|
2810
|
+
}
|
|
2811
|
+
interface RemoveItem {
|
|
2812
|
+
/**
|
|
2813
|
+
* ID of a price to remove.
|
|
2814
|
+
*/
|
|
2815
|
+
price: string;
|
|
2816
|
+
}
|
|
2817
|
+
interface SetDiscount {
|
|
2818
|
+
/**
|
|
2819
|
+
* The coupon code to replace the `discounts` array with.
|
|
2820
|
+
*/
|
|
2821
|
+
coupon?: string;
|
|
2822
|
+
/**
|
|
2823
|
+
* An ID of an existing discount to replace the `discounts` array with.
|
|
2824
|
+
*/
|
|
2825
|
+
discount?: string;
|
|
2826
|
+
/**
|
|
2827
|
+
* An ID of an existing promotion code to replace the `discounts` array with.
|
|
2828
|
+
*/
|
|
2829
|
+
promotion_code?: string;
|
|
2830
|
+
}
|
|
2831
|
+
interface SetItem {
|
|
2832
|
+
/**
|
|
2833
|
+
* 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`.
|
|
2834
|
+
*/
|
|
2835
|
+
discounts?: Array<SetItem.Discount>;
|
|
2836
|
+
/**
|
|
2837
|
+
* 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`.
|
|
2838
|
+
*/
|
|
2839
|
+
metadata?: MetadataParam;
|
|
2840
|
+
/**
|
|
2841
|
+
* The ID of the price object.
|
|
2842
|
+
*/
|
|
2843
|
+
price: string;
|
|
2844
|
+
/**
|
|
2845
|
+
* 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`.
|
|
2846
|
+
*/
|
|
2847
|
+
quantity?: number;
|
|
2848
|
+
/**
|
|
2849
|
+
* 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`.
|
|
2850
|
+
*/
|
|
2851
|
+
tax_rates?: Array<string>;
|
|
2852
|
+
/**
|
|
2853
|
+
* 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`.
|
|
2854
|
+
*/
|
|
2855
|
+
trial?: SetItem.Trial;
|
|
2856
|
+
/**
|
|
2857
|
+
* The ID of the trial offer to apply to the configuration item.
|
|
2858
|
+
*/
|
|
2859
|
+
trial_offer?: string;
|
|
2860
|
+
}
|
|
2861
|
+
type Type = 'add_discount' | 'add_item' | 'add_metadata' | 'clear_discounts' | 'clear_metadata' | 'remove_discount' | 'remove_item' | 'remove_metadata' | 'set_discounts' | 'set_items' | 'set_metadata' | OtherString;
|
|
2862
|
+
namespace AddDiscount {
|
|
2863
|
+
interface DiscountEnd {
|
|
2864
|
+
/**
|
|
2865
|
+
* The type of calculation made to determine when the discount ends.
|
|
2866
|
+
*/
|
|
2867
|
+
type: 'line_ends_at';
|
|
2868
|
+
}
|
|
2869
|
+
}
|
|
2870
|
+
namespace AddItem {
|
|
2871
|
+
interface Discount {
|
|
2872
|
+
/**
|
|
2873
|
+
* ID of the coupon to create a new discount for.
|
|
2874
|
+
*/
|
|
2875
|
+
coupon?: string;
|
|
2876
|
+
/**
|
|
2877
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2878
|
+
*/
|
|
2879
|
+
discount?: string;
|
|
2880
|
+
/**
|
|
2881
|
+
* Details to determine how long the discount should be applied for.
|
|
2882
|
+
*/
|
|
2883
|
+
discount_end?: Discount.DiscountEnd;
|
|
2884
|
+
/**
|
|
2885
|
+
* ID of the promotion code to create a new discount for.
|
|
2886
|
+
*/
|
|
2887
|
+
promotion_code?: string;
|
|
2888
|
+
}
|
|
2889
|
+
interface Trial {
|
|
2890
|
+
/**
|
|
2891
|
+
* 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.
|
|
2892
|
+
*/
|
|
2893
|
+
converts_to?: Array<string>;
|
|
2894
|
+
/**
|
|
2895
|
+
* Determines the type of trial for this item.
|
|
2896
|
+
*/
|
|
2897
|
+
type: Trial.Type;
|
|
2898
|
+
}
|
|
2899
|
+
namespace Discount {
|
|
2900
|
+
interface DiscountEnd {
|
|
2901
|
+
/**
|
|
2902
|
+
* Time span for the redeemed discount.
|
|
2903
|
+
*/
|
|
2904
|
+
duration?: DiscountEnd.Duration;
|
|
2905
|
+
/**
|
|
2906
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2907
|
+
*/
|
|
2908
|
+
timestamp?: number;
|
|
2909
|
+
/**
|
|
2910
|
+
* The type of calculation made to determine when the discount ends.
|
|
2911
|
+
*/
|
|
2912
|
+
type: DiscountEnd.Type;
|
|
2913
|
+
}
|
|
2914
|
+
namespace DiscountEnd {
|
|
2915
|
+
interface Duration {
|
|
2916
|
+
/**
|
|
2917
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2918
|
+
*/
|
|
2919
|
+
interval: Duration.Interval;
|
|
2920
|
+
/**
|
|
2921
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2922
|
+
*/
|
|
2923
|
+
interval_count: number;
|
|
2924
|
+
}
|
|
2925
|
+
type Type = 'duration' | 'timestamp' | OtherString;
|
|
2926
|
+
namespace Duration {
|
|
2927
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
namespace Trial {
|
|
2932
|
+
type Type = 'free' | 'paid' | OtherString;
|
|
2933
|
+
}
|
|
2934
|
+
}
|
|
2935
|
+
namespace SetItem {
|
|
2936
|
+
interface Discount {
|
|
2937
|
+
/**
|
|
2938
|
+
* ID of the coupon to create a new discount for.
|
|
2939
|
+
*/
|
|
2940
|
+
coupon?: string;
|
|
2941
|
+
/**
|
|
2942
|
+
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2943
|
+
*/
|
|
2944
|
+
discount?: string;
|
|
2945
|
+
/**
|
|
2946
|
+
* Details to determine how long the discount should be applied for.
|
|
2947
|
+
*/
|
|
2948
|
+
discount_end?: Discount.DiscountEnd;
|
|
2949
|
+
/**
|
|
2950
|
+
* ID of the promotion code to create a new discount for.
|
|
2951
|
+
*/
|
|
2952
|
+
promotion_code?: string;
|
|
2953
|
+
}
|
|
2954
|
+
interface Trial {
|
|
2955
|
+
/**
|
|
2956
|
+
* 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.
|
|
2957
|
+
*/
|
|
2958
|
+
converts_to?: Array<string>;
|
|
2959
|
+
/**
|
|
2960
|
+
* Determines the type of trial for this item.
|
|
2961
|
+
*/
|
|
2962
|
+
type: Trial.Type;
|
|
2963
|
+
}
|
|
2964
|
+
namespace Discount {
|
|
2965
|
+
interface DiscountEnd {
|
|
2966
|
+
/**
|
|
2967
|
+
* Time span for the redeemed discount.
|
|
2968
|
+
*/
|
|
2969
|
+
duration?: DiscountEnd.Duration;
|
|
2970
|
+
/**
|
|
2971
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
2972
|
+
*/
|
|
2973
|
+
timestamp?: number;
|
|
2974
|
+
/**
|
|
2975
|
+
* The type of calculation made to determine when the discount ends.
|
|
2976
|
+
*/
|
|
2977
|
+
type: DiscountEnd.Type;
|
|
2978
|
+
}
|
|
2979
|
+
namespace DiscountEnd {
|
|
2980
|
+
interface Duration {
|
|
2981
|
+
/**
|
|
2982
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
2983
|
+
*/
|
|
2984
|
+
interval: Duration.Interval;
|
|
2985
|
+
/**
|
|
2986
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
2987
|
+
*/
|
|
2988
|
+
interval_count: number;
|
|
2989
|
+
}
|
|
2990
|
+
type Type = 'duration' | 'timestamp' | OtherString;
|
|
2991
|
+
namespace Duration {
|
|
2992
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
2993
|
+
}
|
|
2994
|
+
}
|
|
2995
|
+
}
|
|
2996
|
+
namespace Trial {
|
|
2997
|
+
type Type = 'free' | 'paid' | OtherString;
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
namespace AppliesTo {
|
|
3002
|
+
type Type = 'new_reference' | 'subscription_schedule' | OtherString;
|
|
1118
3003
|
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
3004
|
+
namespace EndsAt {
|
|
3005
|
+
interface DiscountEnd {
|
|
3006
|
+
/**
|
|
3007
|
+
* The ID of a specific discount.
|
|
3008
|
+
*/
|
|
3009
|
+
discount: string;
|
|
3010
|
+
}
|
|
3011
|
+
interface Duration {
|
|
3012
|
+
/**
|
|
3013
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3014
|
+
*/
|
|
3015
|
+
interval: Duration.Interval;
|
|
3016
|
+
/**
|
|
3017
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3018
|
+
*/
|
|
3019
|
+
interval_count: number;
|
|
3020
|
+
}
|
|
3021
|
+
type Type = 'billing_period_end' | 'discount_end' | 'duration' | 'quote_acceptance_date' | 'schedule_end' | 'timestamp' | 'upcoming_invoice' | OtherString;
|
|
3022
|
+
namespace Duration {
|
|
3023
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
3024
|
+
}
|
|
1130
3025
|
}
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
3026
|
+
namespace SetPauseCollection {
|
|
3027
|
+
interface Set {
|
|
3028
|
+
/**
|
|
3029
|
+
* The payment collection behavior for this subscription while paused.
|
|
3030
|
+
*/
|
|
3031
|
+
behavior: Set.Behavior;
|
|
3032
|
+
}
|
|
3033
|
+
type Type = 'remove' | 'set' | OtherString;
|
|
3034
|
+
namespace Set {
|
|
3035
|
+
type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void' | OtherString;
|
|
3036
|
+
}
|
|
1140
3037
|
}
|
|
1141
|
-
namespace
|
|
1142
|
-
|
|
3038
|
+
namespace StartsAt {
|
|
3039
|
+
interface DiscountEnd {
|
|
3040
|
+
/**
|
|
3041
|
+
* The ID of a specific discount.
|
|
3042
|
+
*/
|
|
3043
|
+
discount: string;
|
|
3044
|
+
}
|
|
3045
|
+
interface LineEndsAt {
|
|
3046
|
+
/**
|
|
3047
|
+
* The ID of a quote line.
|
|
3048
|
+
*/
|
|
3049
|
+
id?: string;
|
|
3050
|
+
/**
|
|
3051
|
+
* 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.
|
|
3052
|
+
*/
|
|
3053
|
+
index?: number;
|
|
3054
|
+
}
|
|
3055
|
+
type Type = 'discount_end' | 'line_ends_at' | 'now' | 'quote_acceptance_date' | 'schedule_end' | 'timestamp' | 'upcoming_invoice' | OtherString;
|
|
3056
|
+
}
|
|
3057
|
+
namespace TrialSettings {
|
|
3058
|
+
interface EndBehavior {
|
|
3059
|
+
/**
|
|
3060
|
+
* Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
|
|
3061
|
+
*/
|
|
3062
|
+
prorate_up_front?: EndBehavior.ProrateUpFront;
|
|
3063
|
+
}
|
|
3064
|
+
namespace EndBehavior {
|
|
3065
|
+
type ProrateUpFront = 'defer' | 'include' | OtherString;
|
|
3066
|
+
}
|
|
1143
3067
|
}
|
|
1144
3068
|
}
|
|
1145
3069
|
namespace LineItem {
|
|
@@ -1152,6 +3076,10 @@ export declare namespace QuoteUpdateParams {
|
|
|
1152
3076
|
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
1153
3077
|
*/
|
|
1154
3078
|
discount?: string;
|
|
3079
|
+
/**
|
|
3080
|
+
* Details to determine how long the discount should be applied for.
|
|
3081
|
+
*/
|
|
3082
|
+
discount_end?: Discount.DiscountEnd;
|
|
1155
3083
|
/**
|
|
1156
3084
|
* ID of the promotion code to create a new discount for.
|
|
1157
3085
|
*/
|
|
@@ -1183,6 +3111,38 @@ export declare namespace QuoteUpdateParams {
|
|
|
1183
3111
|
*/
|
|
1184
3112
|
unit_amount_decimal?: Decimal;
|
|
1185
3113
|
}
|
|
3114
|
+
namespace Discount {
|
|
3115
|
+
interface DiscountEnd {
|
|
3116
|
+
/**
|
|
3117
|
+
* Time span for the redeemed discount.
|
|
3118
|
+
*/
|
|
3119
|
+
duration?: DiscountEnd.Duration;
|
|
3120
|
+
/**
|
|
3121
|
+
* A precise Unix timestamp for the discount to end. Must be in the future.
|
|
3122
|
+
*/
|
|
3123
|
+
timestamp?: number;
|
|
3124
|
+
/**
|
|
3125
|
+
* The type of calculation made to determine when the discount ends.
|
|
3126
|
+
*/
|
|
3127
|
+
type: DiscountEnd.Type;
|
|
3128
|
+
}
|
|
3129
|
+
namespace DiscountEnd {
|
|
3130
|
+
interface Duration {
|
|
3131
|
+
/**
|
|
3132
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3133
|
+
*/
|
|
3134
|
+
interval: Duration.Interval;
|
|
3135
|
+
/**
|
|
3136
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3137
|
+
*/
|
|
3138
|
+
interval_count: number;
|
|
3139
|
+
}
|
|
3140
|
+
type Type = 'duration' | 'timestamp' | OtherString;
|
|
3141
|
+
namespace Duration {
|
|
3142
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
}
|
|
1186
3146
|
namespace PriceData {
|
|
1187
3147
|
interface Recurring {
|
|
1188
3148
|
/**
|
|
@@ -1200,6 +3160,205 @@ export declare namespace QuoteUpdateParams {
|
|
|
1200
3160
|
}
|
|
1201
3161
|
}
|
|
1202
3162
|
}
|
|
3163
|
+
namespace SubscriptionData {
|
|
3164
|
+
interface BillOnAcceptance {
|
|
3165
|
+
/**
|
|
3166
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
3167
|
+
*/
|
|
3168
|
+
bill_from?: BillOnAcceptance.BillFrom;
|
|
3169
|
+
/**
|
|
3170
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
3171
|
+
*/
|
|
3172
|
+
bill_until?: BillOnAcceptance.BillUntil;
|
|
3173
|
+
}
|
|
3174
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front' | OtherString;
|
|
3175
|
+
type EndBehavior = 'cancel' | 'release' | OtherString;
|
|
3176
|
+
interface Prebilling {
|
|
3177
|
+
/**
|
|
3178
|
+
* This is used to determine the number of billing cycles to prebill.
|
|
3179
|
+
*/
|
|
3180
|
+
iterations: number;
|
|
3181
|
+
}
|
|
3182
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none' | OtherString;
|
|
3183
|
+
namespace BillOnAcceptance {
|
|
3184
|
+
interface BillFrom {
|
|
3185
|
+
/**
|
|
3186
|
+
* Details of a Quote line to start the bill period from.
|
|
3187
|
+
*/
|
|
3188
|
+
line_starts_at?: BillFrom.LineStartsAt;
|
|
3189
|
+
/**
|
|
3190
|
+
* A precise Unix timestamp.
|
|
3191
|
+
*/
|
|
3192
|
+
timestamp?: number;
|
|
3193
|
+
/**
|
|
3194
|
+
* The type of method to specify the `bill_from` time.
|
|
3195
|
+
*/
|
|
3196
|
+
type: BillFrom.Type;
|
|
3197
|
+
}
|
|
3198
|
+
interface BillUntil {
|
|
3199
|
+
/**
|
|
3200
|
+
* Details of the duration over which to bill.
|
|
3201
|
+
*/
|
|
3202
|
+
duration?: BillUntil.Duration;
|
|
3203
|
+
/**
|
|
3204
|
+
* Details of a Quote line item from which to bill until.
|
|
3205
|
+
*/
|
|
3206
|
+
line_ends_at?: BillUntil.LineEndsAt;
|
|
3207
|
+
/**
|
|
3208
|
+
* A precise Unix timestamp.
|
|
3209
|
+
*/
|
|
3210
|
+
timestamp?: number;
|
|
3211
|
+
/**
|
|
3212
|
+
* The type of method to specify the `bill_until` time.
|
|
3213
|
+
*/
|
|
3214
|
+
type: BillUntil.Type;
|
|
3215
|
+
}
|
|
3216
|
+
namespace BillFrom {
|
|
3217
|
+
interface LineStartsAt {
|
|
3218
|
+
/**
|
|
3219
|
+
* The ID of a quote line.
|
|
3220
|
+
*/
|
|
3221
|
+
id?: string;
|
|
3222
|
+
/**
|
|
3223
|
+
* 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.
|
|
3224
|
+
*/
|
|
3225
|
+
index?: number;
|
|
3226
|
+
}
|
|
3227
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp' | OtherString;
|
|
3228
|
+
}
|
|
3229
|
+
namespace BillUntil {
|
|
3230
|
+
interface Duration {
|
|
3231
|
+
/**
|
|
3232
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3233
|
+
*/
|
|
3234
|
+
interval: Duration.Interval;
|
|
3235
|
+
/**
|
|
3236
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3237
|
+
*/
|
|
3238
|
+
interval_count: number;
|
|
3239
|
+
}
|
|
3240
|
+
interface LineEndsAt {
|
|
3241
|
+
/**
|
|
3242
|
+
* The ID of a quote line.
|
|
3243
|
+
*/
|
|
3244
|
+
id?: string;
|
|
3245
|
+
/**
|
|
3246
|
+
* 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.
|
|
3247
|
+
*/
|
|
3248
|
+
index?: number;
|
|
3249
|
+
}
|
|
3250
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice' | OtherString;
|
|
3251
|
+
namespace Duration {
|
|
3252
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
namespace SubscriptionDataOverride {
|
|
3258
|
+
interface AppliesTo {
|
|
3259
|
+
/**
|
|
3260
|
+
* 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.
|
|
3261
|
+
*/
|
|
3262
|
+
new_reference?: string;
|
|
3263
|
+
/**
|
|
3264
|
+
* The ID of the schedule the line applies to.
|
|
3265
|
+
*/
|
|
3266
|
+
subscription_schedule?: string;
|
|
3267
|
+
/**
|
|
3268
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
3269
|
+
*/
|
|
3270
|
+
type: AppliesTo.Type;
|
|
3271
|
+
}
|
|
3272
|
+
interface BillOnAcceptance {
|
|
3273
|
+
/**
|
|
3274
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
3275
|
+
*/
|
|
3276
|
+
bill_from?: BillOnAcceptance.BillFrom;
|
|
3277
|
+
/**
|
|
3278
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
3279
|
+
*/
|
|
3280
|
+
bill_until?: BillOnAcceptance.BillUntil;
|
|
3281
|
+
}
|
|
3282
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front' | OtherString;
|
|
3283
|
+
type EndBehavior = 'cancel' | 'release' | OtherString;
|
|
3284
|
+
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none' | OtherString;
|
|
3285
|
+
namespace AppliesTo {
|
|
3286
|
+
type Type = 'new_reference' | 'subscription_schedule' | OtherString;
|
|
3287
|
+
}
|
|
3288
|
+
namespace BillOnAcceptance {
|
|
3289
|
+
interface BillFrom {
|
|
3290
|
+
/**
|
|
3291
|
+
* Details of a Quote line to start the bill period from.
|
|
3292
|
+
*/
|
|
3293
|
+
line_starts_at?: BillFrom.LineStartsAt;
|
|
3294
|
+
/**
|
|
3295
|
+
* A precise Unix timestamp.
|
|
3296
|
+
*/
|
|
3297
|
+
timestamp?: number;
|
|
3298
|
+
/**
|
|
3299
|
+
* The type of method to specify the `bill_from` time.
|
|
3300
|
+
*/
|
|
3301
|
+
type: BillFrom.Type;
|
|
3302
|
+
}
|
|
3303
|
+
interface BillUntil {
|
|
3304
|
+
/**
|
|
3305
|
+
* Details of the duration over which to bill.
|
|
3306
|
+
*/
|
|
3307
|
+
duration?: BillUntil.Duration;
|
|
3308
|
+
/**
|
|
3309
|
+
* Details of a Quote line item from which to bill until.
|
|
3310
|
+
*/
|
|
3311
|
+
line_ends_at?: BillUntil.LineEndsAt;
|
|
3312
|
+
/**
|
|
3313
|
+
* A precise Unix timestamp.
|
|
3314
|
+
*/
|
|
3315
|
+
timestamp?: number;
|
|
3316
|
+
/**
|
|
3317
|
+
* The type of method to specify the `bill_until` time.
|
|
3318
|
+
*/
|
|
3319
|
+
type: BillUntil.Type;
|
|
3320
|
+
}
|
|
3321
|
+
namespace BillFrom {
|
|
3322
|
+
interface LineStartsAt {
|
|
3323
|
+
/**
|
|
3324
|
+
* The ID of a quote line.
|
|
3325
|
+
*/
|
|
3326
|
+
id?: string;
|
|
3327
|
+
/**
|
|
3328
|
+
* 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.
|
|
3329
|
+
*/
|
|
3330
|
+
index?: number;
|
|
3331
|
+
}
|
|
3332
|
+
type Type = 'line_starts_at' | 'now' | 'pause_collection_start' | 'quote_acceptance_date' | 'timestamp' | OtherString;
|
|
3333
|
+
}
|
|
3334
|
+
namespace BillUntil {
|
|
3335
|
+
interface Duration {
|
|
3336
|
+
/**
|
|
3337
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
3338
|
+
*/
|
|
3339
|
+
interval: Duration.Interval;
|
|
3340
|
+
/**
|
|
3341
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
3342
|
+
*/
|
|
3343
|
+
interval_count: number;
|
|
3344
|
+
}
|
|
3345
|
+
interface LineEndsAt {
|
|
3346
|
+
/**
|
|
3347
|
+
* The ID of a quote line.
|
|
3348
|
+
*/
|
|
3349
|
+
id?: string;
|
|
3350
|
+
/**
|
|
3351
|
+
* 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.
|
|
3352
|
+
*/
|
|
3353
|
+
index?: number;
|
|
3354
|
+
}
|
|
3355
|
+
type Type = 'duration' | 'line_ends_at' | 'schedule_end' | 'timestamp' | 'upcoming_invoice' | OtherString;
|
|
3356
|
+
namespace Duration {
|
|
3357
|
+
type Interval = 'day' | 'month' | 'week' | 'year' | OtherString;
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
|
+
}
|
|
3361
|
+
}
|
|
1203
3362
|
}
|
|
1204
3363
|
export interface QuoteListParams extends PaginationParams {
|
|
1205
3364
|
/**
|
|
@@ -1214,6 +3373,10 @@ export interface QuoteListParams extends PaginationParams {
|
|
|
1214
3373
|
* Specifies which fields in the response should be expanded.
|
|
1215
3374
|
*/
|
|
1216
3375
|
expand?: Array<string>;
|
|
3376
|
+
/**
|
|
3377
|
+
* The subscription which the quote updates.
|
|
3378
|
+
*/
|
|
3379
|
+
from_subscription?: string;
|
|
1217
3380
|
/**
|
|
1218
3381
|
* The status of the quote.
|
|
1219
3382
|
*/
|
|
@@ -1224,7 +3387,7 @@ export interface QuoteListParams extends PaginationParams {
|
|
|
1224
3387
|
test_clock?: string;
|
|
1225
3388
|
}
|
|
1226
3389
|
export declare namespace QuoteListParams {
|
|
1227
|
-
type Status = 'accepted' | 'canceled' | 'draft' | 'open' | OtherString;
|
|
3390
|
+
type Status = 'accepted' | 'accepting' | 'canceled' | 'draft' | 'open' | 'stale' | OtherString;
|
|
1228
3391
|
}
|
|
1229
3392
|
export interface QuoteAcceptParams {
|
|
1230
3393
|
/**
|
|
@@ -1248,6 +3411,12 @@ export interface QuoteFinalizeQuoteParams {
|
|
|
1248
3411
|
*/
|
|
1249
3412
|
expires_at?: number;
|
|
1250
3413
|
}
|
|
3414
|
+
export interface QuoteListPreviewInvoiceLinesParams extends PaginationParams {
|
|
3415
|
+
/**
|
|
3416
|
+
* Specifies which fields in the response should be expanded.
|
|
3417
|
+
*/
|
|
3418
|
+
expand?: Array<string>;
|
|
3419
|
+
}
|
|
1251
3420
|
export interface QuoteListComputedUpfrontLineItemsParams extends PaginationParams {
|
|
1252
3421
|
/**
|
|
1253
3422
|
* Specifies which fields in the response should be expanded.
|
|
@@ -1260,9 +3429,49 @@ export interface QuoteListLineItemsParams extends PaginationParams {
|
|
|
1260
3429
|
*/
|
|
1261
3430
|
expand?: Array<string>;
|
|
1262
3431
|
}
|
|
3432
|
+
export interface QuoteListLinesParams extends PaginationParams {
|
|
3433
|
+
/**
|
|
3434
|
+
* Specifies which fields in the response should be expanded.
|
|
3435
|
+
*/
|
|
3436
|
+
expand?: Array<string>;
|
|
3437
|
+
}
|
|
3438
|
+
export interface QuoteListPreviewInvoicesParams extends PaginationParams {
|
|
3439
|
+
/**
|
|
3440
|
+
* Specifies which fields in the response should be expanded.
|
|
3441
|
+
*/
|
|
3442
|
+
expand?: Array<string>;
|
|
3443
|
+
}
|
|
3444
|
+
export interface QuoteListPreviewSubscriptionSchedulesParams extends PaginationParams {
|
|
3445
|
+
/**
|
|
3446
|
+
* Specifies which fields in the response should be expanded.
|
|
3447
|
+
*/
|
|
3448
|
+
expand?: Array<string>;
|
|
3449
|
+
}
|
|
3450
|
+
export interface QuoteMarkDraftParams {
|
|
3451
|
+
/**
|
|
3452
|
+
* Specifies which fields in the response should be expanded.
|
|
3453
|
+
*/
|
|
3454
|
+
expand?: Array<string>;
|
|
3455
|
+
}
|
|
3456
|
+
export interface QuoteMarkStaleParams {
|
|
3457
|
+
/**
|
|
3458
|
+
* Specifies which fields in the response should be expanded.
|
|
3459
|
+
*/
|
|
3460
|
+
expand?: Array<string>;
|
|
3461
|
+
/**
|
|
3462
|
+
* Reason the Quote is being marked stale.
|
|
3463
|
+
*/
|
|
3464
|
+
reason?: string;
|
|
3465
|
+
}
|
|
1263
3466
|
export interface QuotePdfParams {
|
|
1264
3467
|
/**
|
|
1265
3468
|
* Specifies which fields in the response should be expanded.
|
|
1266
3469
|
*/
|
|
1267
3470
|
expand?: Array<string>;
|
|
1268
3471
|
}
|
|
3472
|
+
export interface QuoteReestimateParams {
|
|
3473
|
+
/**
|
|
3474
|
+
* Specifies which fields in the response should be expanded.
|
|
3475
|
+
*/
|
|
3476
|
+
expand?: Array<string>;
|
|
3477
|
+
}
|