stripe 20.0.0 → 20.1.0-alpha.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 +1790 -12
- package/OPENAPI_VERSION +1 -1
- package/README.md +1 -0
- package/VERSION +1 -1
- package/cjs/Error.js +115 -1
- package/cjs/apiVersion.js +2 -3
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/BalanceTransfers.js +9 -0
- package/cjs/resources/Billing/Analytics/MeterUsage.js +12 -0
- package/cjs/resources/Capital/FinancingOffers.js +21 -0
- package/cjs/resources/Capital/FinancingSummary.js +12 -0
- package/cjs/resources/Capital/FinancingTransactions.js +17 -0
- package/cjs/resources/DelegatedCheckout/RequestedSessions.js +28 -0
- package/cjs/resources/ExternalAccounts.js +23 -0
- package/cjs/resources/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/FinancialConnections/Institutions.js +17 -0
- package/cjs/resources/FxQuotes.js +15 -0
- package/cjs/resources/Identity/BlocklistEntries.js +25 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
- package/cjs/resources/Issuing/Programs.js +22 -0
- package/cjs/resources/Mandates.js +5 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentIntents.js +8 -0
- package/cjs/resources/PaymentMethods.js +4 -0
- package/cjs/resources/Privacy/RedactionJobs.js +42 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/Radar/AccountEvaluations.js +20 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Subscriptions.js +4 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
- package/cjs/resources/TestHelpers/Capital/FinancingOffers.js +16 -0
- package/cjs/resources/V2/Billing/BillSettings/Versions.js +17 -0
- package/cjs/resources/V2/Billing/BillSettings.js +27 -0
- package/cjs/resources/V2/Billing/Cadences.js +23 -0
- package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +17 -0
- package/cjs/resources/V2/Billing/CollectionSettings.js +30 -0
- package/cjs/resources/V2/Billing/CustomPricingUnits.js +25 -0
- package/cjs/resources/V2/Billing/Intents/Actions.js +17 -0
- package/cjs/resources/V2/Billing/Intents.js +36 -0
- package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +12 -0
- package/cjs/resources/V2/Billing/LicenseFees/Versions.js +17 -0
- package/cjs/resources/V2/Billing/LicenseFees.js +27 -0
- package/cjs/resources/V2/Billing/LicensedItems.js +25 -0
- package/cjs/resources/V2/Billing/MeteredItems.js +22 -0
- package/cjs/resources/V2/Billing/PricingPlanSubscriptions/Components.js +12 -0
- package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +26 -0
- package/cjs/resources/V2/Billing/PricingPlans/Components.js +29 -0
- package/cjs/resources/V2/Billing/PricingPlans/Versions.js +17 -0
- package/cjs/resources/V2/Billing/PricingPlans.js +29 -0
- package/cjs/resources/V2/Billing/Profiles.js +19 -0
- package/cjs/resources/V2/Billing/RateCardSubscriptions.js +29 -0
- package/cjs/resources/V2/Billing/RateCards/Rates.js +25 -0
- package/cjs/resources/V2/Billing/RateCards/Versions.js +17 -0
- package/cjs/resources/V2/Billing/RateCards.js +29 -0
- package/cjs/resources/V2/Billing/ServiceActions.js +20 -0
- package/cjs/resources/V2/Core/AccountLinks.js +9 -0
- package/cjs/resources/V2/Core/Accounts/Persons.js +29 -0
- package/cjs/resources/V2/Core/Accounts.js +25 -0
- package/cjs/resources/V2/Core/ClaimableSandboxes.js +16 -0
- package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +33 -0
- package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +37 -0
- package/cjs/resources/V2/MoneyManagement/Adjustments.js +17 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +29 -0
- package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +21 -0
- package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +21 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +16 -0
- package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +25 -0
- package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +29 -0
- package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +25 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +25 -0
- package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +12 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +17 -0
- package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +17 -0
- package/cjs/resources/V2/MoneyManagement/RecipientVerifications.js +20 -0
- package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +17 -0
- package/cjs/resources/V2/MoneyManagement/Transactions.js +17 -0
- package/cjs/resources/V2/Payments/OffSessionPayments.js +29 -0
- package/cjs/resources/V2/Reporting/ReportRuns.js +13 -0
- package/cjs/resources/V2/Reporting/Reports.js +12 -0
- package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
- package/cjs/resources/V2/TestHelpers/MoneyManagement.js +12 -0
- package/cjs/resources.js +152 -8
- package/cjs/stripe.core.js +1 -1
- package/esm/Error.js +100 -0
- package/esm/apiVersion.js +1 -2
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/BalanceTransfers.js +6 -0
- package/esm/resources/Billing/Analytics/MeterUsage.js +9 -0
- package/esm/resources/Capital/FinancingOffers.js +18 -0
- package/esm/resources/Capital/FinancingSummary.js +9 -0
- package/esm/resources/Capital/FinancingTransactions.js +14 -0
- package/esm/resources/DelegatedCheckout/RequestedSessions.js +25 -0
- package/esm/resources/ExternalAccounts.js +20 -0
- package/esm/resources/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/FinancialConnections/Institutions.js +14 -0
- package/esm/resources/FxQuotes.js +12 -0
- package/esm/resources/Identity/BlocklistEntries.js +22 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
- package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
- package/esm/resources/Issuing/Programs.js +19 -0
- package/esm/resources/Mandates.js +5 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentIntents.js +8 -0
- package/esm/resources/PaymentMethods.js +4 -0
- package/esm/resources/Privacy/RedactionJobs.js +39 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/Radar/AccountEvaluations.js +17 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Subscriptions.js +4 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
- package/esm/resources/TestHelpers/Capital/FinancingOffers.js +13 -0
- package/esm/resources/V2/Billing/BillSettings/Versions.js +14 -0
- package/esm/resources/V2/Billing/BillSettings.js +24 -0
- package/esm/resources/V2/Billing/Cadences.js +20 -0
- package/esm/resources/V2/Billing/CollectionSettings/Versions.js +14 -0
- package/esm/resources/V2/Billing/CollectionSettings.js +27 -0
- package/esm/resources/V2/Billing/CustomPricingUnits.js +22 -0
- package/esm/resources/V2/Billing/Intents/Actions.js +14 -0
- package/esm/resources/V2/Billing/Intents.js +33 -0
- package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +9 -0
- package/esm/resources/V2/Billing/LicenseFees/Versions.js +14 -0
- package/esm/resources/V2/Billing/LicenseFees.js +24 -0
- package/esm/resources/V2/Billing/LicensedItems.js +22 -0
- package/esm/resources/V2/Billing/MeteredItems.js +19 -0
- package/esm/resources/V2/Billing/PricingPlanSubscriptions/Components.js +9 -0
- package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +23 -0
- package/esm/resources/V2/Billing/PricingPlans/Components.js +26 -0
- package/esm/resources/V2/Billing/PricingPlans/Versions.js +14 -0
- package/esm/resources/V2/Billing/PricingPlans.js +26 -0
- package/esm/resources/V2/Billing/Profiles.js +16 -0
- package/esm/resources/V2/Billing/RateCardSubscriptions.js +26 -0
- package/esm/resources/V2/Billing/RateCards/Rates.js +22 -0
- package/esm/resources/V2/Billing/RateCards/Versions.js +14 -0
- package/esm/resources/V2/Billing/RateCards.js +26 -0
- package/esm/resources/V2/Billing/ServiceActions.js +17 -0
- package/esm/resources/V2/Core/AccountLinks.js +6 -0
- package/esm/resources/V2/Core/Accounts/Persons.js +26 -0
- package/esm/resources/V2/Core/Accounts.js +22 -0
- package/esm/resources/V2/Core/ClaimableSandboxes.js +13 -0
- package/esm/resources/V2/Core/Vault/GbBankAccounts.js +30 -0
- package/esm/resources/V2/Core/Vault/UsBankAccounts.js +34 -0
- package/esm/resources/V2/MoneyManagement/Adjustments.js +14 -0
- package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +26 -0
- package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +18 -0
- package/esm/resources/V2/MoneyManagement/InboundTransfers.js +18 -0
- package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +13 -0
- package/esm/resources/V2/MoneyManagement/OutboundPayments.js +22 -0
- package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +26 -0
- package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +22 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethods.js +22 -0
- package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +9 -0
- package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +14 -0
- package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +14 -0
- package/esm/resources/V2/MoneyManagement/RecipientVerifications.js +17 -0
- package/esm/resources/V2/MoneyManagement/TransactionEntries.js +14 -0
- package/esm/resources/V2/MoneyManagement/Transactions.js +14 -0
- package/esm/resources/V2/Payments/OffSessionPayments.js +26 -0
- package/esm/resources/V2/Reporting/ReportRuns.js +10 -0
- package/esm/resources/V2/Reporting/Reports.js +9 -0
- package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
- package/esm/resources/V2/TestHelpers/MoneyManagement.js +9 -0
- package/esm/resources.js +138 -0
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +5 -1
- package/types/AccountNotices.d.ts +113 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +45 -0
- package/types/AccountSessionsResource.d.ts +264 -0
- package/types/Accounts.d.ts +232 -1
- package/types/AccountsResource.d.ts +674 -0
- package/types/ApplicationFees.d.ts +6 -1
- package/types/Balance.d.ts +82 -0
- package/types/BalanceTransactions.d.ts +2 -1
- package/types/BalanceTransfers.d.ts +122 -0
- package/types/BalanceTransfersResource.d.ts +87 -0
- package/types/BankAccounts.d.ts +2 -0
- package/types/Billing/AlertTriggereds.d.ts +16 -1
- package/types/Billing/Alerts.d.ts +116 -1
- package/types/Billing/AlertsResource.d.ts +149 -2
- package/types/Billing/Analytics/MeterUsage.d.ts +31 -0
- package/types/Billing/Analytics/MeterUsageResource.d.ts +694 -0
- package/types/Billing/Analytics/MeterUsageRows.d.ts +58 -0
- package/types/Billing/CreditBalanceSummary.d.ts +123 -2
- package/types/Billing/CreditBalanceSummaryResource.d.ts +20 -3
- package/types/Billing/CreditBalanceTransactions.d.ts +118 -2
- package/types/Billing/CreditBalanceTransactionsResource.d.ts +12 -4
- package/types/Billing/CreditGrants.d.ts +76 -1
- package/types/Billing/CreditGrantsResource.d.ts +45 -4
- package/types/Billing/MeterEventSummaries.d.ts +7 -0
- package/types/Billing/Meters.d.ts +5 -0
- package/types/Billing/MetersResource.d.ts +17 -0
- package/types/BillingPortal/Sessions.d.ts +5 -0
- package/types/BillingPortal/SessionsResource.d.ts +12 -4
- package/types/Capabilities.d.ts +2 -0
- package/types/Capital/FinancingOffers.d.ts +188 -0
- package/types/Capital/FinancingOffersResource.d.ts +97 -0
- package/types/Capital/FinancingSummary.d.ts +106 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Cards.d.ts +19 -0
- package/types/CashBalances.d.ts +5 -0
- package/types/Charges.d.ts +190 -0
- package/types/ChargesResource.d.ts +3855 -75
- package/types/Checkout/Sessions.d.ts +427 -2
- package/types/Checkout/SessionsResource.d.ts +682 -2
- package/types/ConfirmationTokens.d.ts +139 -0
- package/types/Coupons.d.ts +35 -0
- package/types/CouponsResource.d.ts +23 -0
- package/types/CreditNoteLineItems.d.ts +17 -0
- package/types/CreditNotes.d.ts +5 -0
- package/types/CreditNotesResource.d.ts +5 -0
- package/types/CustomerBalanceTransactions.d.ts +2 -0
- package/types/CustomerCashBalanceTransactions.d.ts +2 -0
- package/types/CustomerSessions.d.ts +46 -0
- package/types/CustomerSessionsResource.d.ts +47 -1
- package/types/Customers.d.ts +2 -0
- package/types/CustomersResource.d.ts +8 -0
- package/types/DelegatedCheckout/RequestedSessions.d.ts +384 -0
- package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +599 -0
- package/types/Discounts.d.ts +20 -0
- package/types/Disputes.d.ts +40 -0
- package/types/DisputesResource.d.ts +11 -0
- package/types/Errors.d.ts +85 -0
- package/types/EventTypes.d.ts +630 -0
- package/types/Events.d.ts +96 -0
- package/types/ExternalAccountsResource.d.ts +304 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +36 -1
- package/types/FinancialConnections/AccountsResource.d.ts +40 -3
- package/types/FinancialConnections/Institutions.d.ts +98 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +51 -1
- package/types/FinancialConnections/SessionsResource.d.ts +43 -1
- package/types/FxQuotes.d.ts +155 -0
- package/types/FxQuotesResource.d.ts +130 -0
- package/types/Identity/BlocklistEntries.d.ts +78 -0
- package/types/Identity/BlocklistEntriesResource.d.ts +146 -0
- package/types/Identity/VerificationReports.d.ts +10 -0
- package/types/Identity/VerificationReportsResource.d.ts +5 -0
- package/types/Identity/VerificationSessions.d.ts +5 -0
- package/types/Identity/VerificationSessionsResource.d.ts +7 -0
- package/types/InvoiceItems.d.ts +127 -2
- package/types/InvoiceItemsResource.d.ts +117 -6
- package/types/InvoiceLineItems.d.ts +171 -3
- package/types/Invoices.d.ts +216 -4
- package/types/InvoicesResource.d.ts +1743 -2
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
- package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
- package/types/Issuing/Programs.d.ts +42 -0
- package/types/Issuing/ProgramsResource.d.ts +96 -0
- package/types/Issuing/Settlements.d.ts +113 -0
- package/types/Issuing/Transactions.d.ts +5 -0
- package/types/Issuing/TransactionsResource.d.ts +5 -0
- package/types/LineItems.d.ts +49 -0
- package/types/Mandates.d.ts +135 -1
- package/types/MandatesResource.d.ts +31 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1163 -0
- package/types/OrdersResource.d.ts +5505 -0
- package/types/PaymentAttemptRecords.d.ts +141 -0
- package/types/PaymentIntents.d.ts +779 -3
- package/types/PaymentIntentsResource.d.ts +19573 -6528
- package/types/PaymentLinks.d.ts +6 -0
- package/types/PaymentLinksResource.d.ts +12 -0
- package/types/PaymentMethodBalances.d.ts +63 -0
- package/types/PaymentMethodConfigurations.d.ts +216 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +300 -0
- package/types/PaymentMethods.d.ts +144 -0
- package/types/PaymentMethodsResource.d.ts +199 -2
- package/types/PaymentRecords.d.ts +141 -0
- package/types/Persons.d.ts +30 -0
- package/types/Prices.d.ts +22 -0
- package/types/PricesResource.d.ts +22 -0
- package/types/Privacy/RedactionJobValidationErrors.d.ts +60 -0
- package/types/Privacy/RedactionJobs.d.ts +111 -0
- package/types/Privacy/RedactionJobsResource.d.ts +230 -0
- package/types/PromotionCodes.d.ts +5 -0
- package/types/PromotionCodesResource.d.ts +10 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePreviewInvoices.d.ts +1784 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +1108 -0
- package/types/Quotes.d.ts +982 -1
- package/types/QuotesResource.d.ts +3226 -293
- package/types/Radar/AccountEvaluations.d.ts +88 -0
- package/types/Radar/AccountEvaluationsResource.d.ts +148 -0
- package/types/Refunds.d.ts +14 -0
- package/types/SetupAttempts.d.ts +51 -1
- package/types/SetupIntents.d.ts +239 -2
- package/types/SetupIntentsResource.d.ts +1044 -4
- package/types/Sources.d.ts +29 -0
- package/types/SubscriptionItems.d.ts +26 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +403 -0
- package/types/SubscriptionSchedulesResource.d.ts +1437 -0
- package/types/Subscriptions.d.ts +370 -1
- package/types/SubscriptionsResource.d.ts +757 -8
- package/types/Tax/Forms.d.ts +220 -0
- package/types/Tax/FormsResource.d.ts +107 -0
- package/types/TaxIds.d.ts +10 -0
- package/types/TaxIdsResource.d.ts +10 -0
- package/types/Terminal/Configurations.d.ts +9 -0
- package/types/Terminal/ConfigurationsResource.d.ts +28 -0
- package/types/Terminal/ReaderCollectedData.d.ts +51 -0
- package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
- package/types/Terminal/Readers.d.ts +20 -0
- package/types/TestHelpers/Capital/FinancingOffersResource.d.ts +130 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +126 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/TokensResource.d.ts +44 -0
- package/types/Transfers.d.ts +9 -0
- package/types/TransfersResource.d.ts +7 -0
- package/types/TransitBalances.d.ts +40 -0
- package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
- package/types/Treasury/FinancialAccounts.d.ts +5 -0
- package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
- package/types/Treasury/OutboundTransfers.d.ts +26 -0
- package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
- package/types/Treasury/ReceivedCredits.d.ts +26 -0
- package/types/Treasury/ReceivedDebits.d.ts +31 -0
- package/types/V2/Billing/BillSettingVersions.d.ts +97 -0
- package/types/V2/Billing/BillSettings/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/BillSettings.d.ts +120 -0
- package/types/V2/Billing/BillSettingsResource.d.ts +241 -0
- package/types/V2/Billing/Cadences.d.ts +735 -0
- package/types/V2/Billing/CadencesResource.d.ts +516 -0
- package/types/V2/Billing/CollectionSettingVersions.d.ts +318 -0
- package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +62 -0
- package/types/V2/Billing/CollectionSettings.d.ts +341 -0
- package/types/V2/Billing/CollectionSettingsResource.d.ts +683 -0
- package/types/V2/Billing/CustomPricingUnits.d.ts +56 -0
- package/types/V2/Billing/CustomPricingUnitsResource.d.ts +122 -0
- package/types/V2/Billing/IntentActions.d.ts +459 -0
- package/types/V2/Billing/Intents/ActionsResource.d.ts +58 -0
- package/types/V2/Billing/Intents.d.ts +117 -0
- package/types/V2/Billing/IntentsResource.d.ts +575 -0
- package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +64 -0
- package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +28 -0
- package/types/V2/Billing/LicenseFeeVersions.d.ts +106 -0
- package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/LicenseFees.d.ts +164 -0
- package/types/V2/Billing/LicenseFeesResource.d.ts +290 -0
- package/types/V2/Billing/LicensedItems.d.ts +73 -0
- package/types/V2/Billing/LicensedItemsResource.d.ts +157 -0
- package/types/V2/Billing/MeterEvents.d.ts +1 -2
- package/types/V2/Billing/MeteredItems.d.ts +101 -0
- package/types/V2/Billing/MeteredItemsResource.d.ts +189 -0
- package/types/V2/Billing/PricingPlanComponents.d.ts +109 -0
- package/types/V2/Billing/PricingPlanSubscriptionComponents.d.ts +57 -0
- package/types/V2/Billing/PricingPlanSubscriptions/ComponentsResource.d.ts +40 -0
- package/types/V2/Billing/PricingPlanSubscriptions.d.ts +144 -0
- package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +120 -0
- package/types/V2/Billing/PricingPlanVersions.d.ts +49 -0
- package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +197 -0
- package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/PricingPlans.d.ts +84 -0
- package/types/V2/Billing/PricingPlansResource.d.ts +151 -0
- package/types/V2/Billing/Profiles.d.ts +70 -0
- package/types/V2/Billing/ProfilesResource.d.ts +150 -0
- package/types/V2/Billing/RateCardRates.d.ts +144 -0
- package/types/V2/Billing/RateCardSubscriptions.d.ts +144 -0
- package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +157 -0
- package/types/V2/Billing/RateCardVersions.d.ts +39 -0
- package/types/V2/Billing/RateCards/RatesResource.d.ts +203 -0
- package/types/V2/Billing/RateCards/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/RateCards.d.ts +98 -0
- package/types/V2/Billing/RateCardsResource.d.ts +162 -0
- package/types/V2/Billing/ServiceActions.d.ts +274 -0
- package/types/V2/Billing/ServiceActionsResource.d.ts +370 -0
- package/types/V2/Core/AccountLinks.d.ts +168 -0
- package/types/V2/Core/AccountLinksResource.d.ts +152 -0
- package/types/V2/Core/AccountPersons.d.ts +615 -0
- package/types/V2/Core/Accounts/PersonsResource.d.ts +1153 -0
- package/types/V2/Core/Accounts.d.ts +7478 -0
- package/types/V2/Core/AccountsResource.d.ts +6723 -0
- package/types/V2/Core/ClaimableSandboxes.d.ts +132 -0
- package/types/V2/Core/ClaimableSandboxesResource.d.ts +74 -0
- package/types/V2/Core/EventTypes.d.ts +8680 -10
- package/types/V2/Core/Events.d.ts +14 -0
- package/types/V2/Core/EventsResource.d.ts +17 -2
- package/types/V2/Core/Vault/GbBankAccounts.d.ts +160 -0
- package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +194 -0
- package/types/V2/Core/Vault/UsBankAccounts.d.ts +116 -0
- package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +198 -0
- package/types/V2/FinancialAddressCreditSimulations.d.ts +27 -0
- package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +32 -0
- package/types/V2/MoneyManagement/Adjustments.d.ts +110 -0
- package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
- package/types/V2/MoneyManagement/FinancialAccounts.d.ts +148 -0
- package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +172 -0
- package/types/V2/MoneyManagement/FinancialAddresses.d.ts +178 -0
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +126 -0
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +212 -0
- package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +144 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +170 -0
- package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +115 -0
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +283 -0
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +247 -0
- package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +330 -0
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +256 -0
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +213 -0
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +201 -0
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +93 -0
- package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +41 -0
- package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +113 -0
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +307 -0
- package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +186 -0
- package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +48 -0
- package/types/V2/MoneyManagement/RecipientVerifications.d.ts +112 -0
- package/types/V2/MoneyManagement/RecipientVerificationsResource.d.ts +77 -0
- package/types/V2/MoneyManagement/TransactionEntries.d.ts +162 -0
- package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
- package/types/V2/MoneyManagement/Transactions.d.ts +177 -0
- package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
- package/types/V2/Payments/OffSessionPayments.d.ts +326 -0
- package/types/V2/Payments/OffSessionPaymentsResource.d.ts +401 -0
- package/types/V2/Reporting/ReportRuns.d.ts +154 -0
- package/types/V2/Reporting/ReportRunsResource.d.ts +75 -0
- package/types/V2/Reporting/Reports.d.ts +120 -0
- package/types/V2/Reporting/ReportsResource.d.ts +30 -0
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +73 -0
- package/types/V2/TestHelpers/MoneyManagementResource.d.ts +49 -0
- package/types/WebhookEndpointsResource.d.ts +76 -0
- package/types/Webhooks.d.ts +2 -0
- package/types/apiVersion.d.ts +1 -2
- package/types/index.d.ts +233 -0
- package/types/lib.d.ts +10 -0
package/types/Quotes.d.ts
CHANGED
|
@@ -17,6 +17,11 @@ declare module 'stripe' {
|
|
|
17
17
|
*/
|
|
18
18
|
object: 'quote';
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
|
|
22
|
+
*/
|
|
23
|
+
allow_backdated_lines?: boolean | null;
|
|
24
|
+
|
|
20
25
|
/**
|
|
21
26
|
* Total before any discounts or taxes are applied.
|
|
22
27
|
*/
|
|
@@ -70,6 +75,11 @@ declare module 'stripe' {
|
|
|
70
75
|
*/
|
|
71
76
|
customer: string | Stripe.Customer | Stripe.DeletedCustomer | null;
|
|
72
77
|
|
|
78
|
+
/**
|
|
79
|
+
* The account which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
|
|
80
|
+
*/
|
|
81
|
+
customer_account?: string | null;
|
|
82
|
+
|
|
73
83
|
/**
|
|
74
84
|
* The tax rates applied to this quote.
|
|
75
85
|
*/
|
|
@@ -117,6 +127,11 @@ declare module 'stripe' {
|
|
|
117
127
|
*/
|
|
118
128
|
line_items?: ApiList<Stripe.LineItem>;
|
|
119
129
|
|
|
130
|
+
/**
|
|
131
|
+
* A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
|
|
132
|
+
*/
|
|
133
|
+
lines?: Array<string> | null;
|
|
134
|
+
|
|
120
135
|
/**
|
|
121
136
|
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
122
137
|
*/
|
|
@@ -142,6 +157,11 @@ declare module 'stripe' {
|
|
|
142
157
|
*/
|
|
143
158
|
status: Quote.Status;
|
|
144
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Details on when and why a quote has been marked as stale or canceled.
|
|
162
|
+
*/
|
|
163
|
+
status_details?: Quote.StatusDetails | null;
|
|
164
|
+
|
|
145
165
|
status_transitions: Quote.StatusTransitions;
|
|
146
166
|
|
|
147
167
|
/**
|
|
@@ -151,11 +171,23 @@ declare module 'stripe' {
|
|
|
151
171
|
|
|
152
172
|
subscription_data: Quote.SubscriptionData;
|
|
153
173
|
|
|
174
|
+
/**
|
|
175
|
+
* List representing overrides for `subscription_data` configurations for specific subscription schedules.
|
|
176
|
+
*/
|
|
177
|
+
subscription_data_overrides?: Array<
|
|
178
|
+
Quote.SubscriptionDataOverride
|
|
179
|
+
> | null;
|
|
180
|
+
|
|
154
181
|
/**
|
|
155
182
|
* The subscription schedule that was created or updated from this quote.
|
|
156
183
|
*/
|
|
157
184
|
subscription_schedule: string | Stripe.SubscriptionSchedule | null;
|
|
158
185
|
|
|
186
|
+
/**
|
|
187
|
+
* The subscription schedules that were created or updated from this quote.
|
|
188
|
+
*/
|
|
189
|
+
subscription_schedules?: Array<Quote.SubscriptionSchedule> | null;
|
|
190
|
+
|
|
159
191
|
/**
|
|
160
192
|
* ID of the test clock this quote belongs to.
|
|
161
193
|
*/
|
|
@@ -215,15 +247,62 @@ declare module 'stripe' {
|
|
|
215
247
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
216
248
|
|
|
217
249
|
interface Computed {
|
|
250
|
+
/**
|
|
251
|
+
* Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
|
|
252
|
+
*/
|
|
253
|
+
last_reestimation_details?: Computed.LastReestimationDetails | null;
|
|
254
|
+
|
|
218
255
|
/**
|
|
219
256
|
* The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
|
|
220
257
|
*/
|
|
221
258
|
recurring: Computed.Recurring | null;
|
|
222
259
|
|
|
260
|
+
/**
|
|
261
|
+
* The time at which the quote's estimated schedules and upcoming invoices were generated.
|
|
262
|
+
*/
|
|
263
|
+
updated_at?: number | null;
|
|
264
|
+
|
|
223
265
|
upfront: Computed.Upfront;
|
|
224
266
|
}
|
|
225
267
|
|
|
226
268
|
namespace Computed {
|
|
269
|
+
interface LastReestimationDetails {
|
|
270
|
+
/**
|
|
271
|
+
* When `status` is `failed`, provides details about the quote reestimation failure.
|
|
272
|
+
*/
|
|
273
|
+
failed: LastReestimationDetails.Failed | null;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Latest status of the reestimation.
|
|
277
|
+
*/
|
|
278
|
+
status: LastReestimationDetails.Status;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
namespace LastReestimationDetails {
|
|
282
|
+
interface Failed {
|
|
283
|
+
/**
|
|
284
|
+
* The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field.
|
|
285
|
+
*/
|
|
286
|
+
failure_code: string | null;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID".
|
|
290
|
+
*/
|
|
291
|
+
message: string | null;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* The reason the reestimation failed.
|
|
295
|
+
*/
|
|
296
|
+
reason: Failed.Reason;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
namespace Failed {
|
|
300
|
+
type Reason = 'automation_failure' | 'internal_error';
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
type Status = 'failed' | 'in_progress' | 'succeeded';
|
|
304
|
+
}
|
|
305
|
+
|
|
227
306
|
interface Recurring {
|
|
228
307
|
/**
|
|
229
308
|
* Total before any discounts or taxes are applied.
|
|
@@ -499,7 +578,153 @@ declare module 'stripe' {
|
|
|
499
578
|
}
|
|
500
579
|
}
|
|
501
580
|
|
|
502
|
-
type Status =
|
|
581
|
+
type Status =
|
|
582
|
+
| 'accepted'
|
|
583
|
+
| 'accepting'
|
|
584
|
+
| 'canceled'
|
|
585
|
+
| 'draft'
|
|
586
|
+
| 'open'
|
|
587
|
+
| 'stale';
|
|
588
|
+
|
|
589
|
+
interface StatusDetails {
|
|
590
|
+
canceled?: StatusDetails.Canceled;
|
|
591
|
+
|
|
592
|
+
stale?: StatusDetails.Stale;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
namespace StatusDetails {
|
|
596
|
+
interface Canceled {
|
|
597
|
+
/**
|
|
598
|
+
* The reason this quote was marked as canceled.
|
|
599
|
+
*/
|
|
600
|
+
reason: Canceled.Reason | null;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
|
|
604
|
+
*/
|
|
605
|
+
transitioned_at: number | null;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
namespace Canceled {
|
|
609
|
+
type Reason =
|
|
610
|
+
| 'canceled'
|
|
611
|
+
| 'quote_accepted'
|
|
612
|
+
| 'quote_expired'
|
|
613
|
+
| 'quote_superseded'
|
|
614
|
+
| 'subscription_canceled';
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
interface Stale {
|
|
618
|
+
/**
|
|
619
|
+
* Time at which the quote expires. Measured in seconds since the Unix epoch.
|
|
620
|
+
*/
|
|
621
|
+
expires_at: number | null;
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* The most recent reason this quote was marked as stale.
|
|
625
|
+
*/
|
|
626
|
+
last_reason: Stale.LastReason | null;
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
|
|
630
|
+
*/
|
|
631
|
+
last_updated_at: number | null;
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
|
|
635
|
+
*/
|
|
636
|
+
transitioned_at: number | null;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
namespace Stale {
|
|
640
|
+
interface LastReason {
|
|
641
|
+
/**
|
|
642
|
+
* The ID of the line that is invalid if the stale reason type is `line_invalid`.
|
|
643
|
+
*/
|
|
644
|
+
line_invalid?: string;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
|
|
648
|
+
*/
|
|
649
|
+
lines_invalid?: Array<LastReason.LinesInvalid>;
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* The user supplied mark stale reason.
|
|
653
|
+
*/
|
|
654
|
+
marked_stale?: string | null;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* The ID of the subscription that was canceled.
|
|
658
|
+
*/
|
|
659
|
+
subscription_canceled?: string;
|
|
660
|
+
|
|
661
|
+
subscription_changed?: LastReason.SubscriptionChanged;
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* The ID of the subscription that was expired.
|
|
665
|
+
*/
|
|
666
|
+
subscription_expired?: string;
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* The ID of the subscription schedule that was canceled.
|
|
670
|
+
*/
|
|
671
|
+
subscription_schedule_canceled?: string;
|
|
672
|
+
|
|
673
|
+
subscription_schedule_changed?: LastReason.SubscriptionScheduleChanged;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* The ID of the subscription schedule that was released.
|
|
677
|
+
*/
|
|
678
|
+
subscription_schedule_released?: string;
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* The reason the quote was marked as stale.
|
|
682
|
+
*/
|
|
683
|
+
type: LastReason.Type | null;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
namespace LastReason {
|
|
687
|
+
interface LinesInvalid {
|
|
688
|
+
/**
|
|
689
|
+
* The timestamp at which the lines were marked as invalid.
|
|
690
|
+
*/
|
|
691
|
+
invalid_at: number;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* The list of lines that became invalid at the given timestamp.
|
|
695
|
+
*/
|
|
696
|
+
lines: Array<string>;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
interface SubscriptionChanged {
|
|
700
|
+
/**
|
|
701
|
+
* The subscription's state before the quote was marked as stale.
|
|
702
|
+
*/
|
|
703
|
+
previous_subscription: Stripe.Subscription | null;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
interface SubscriptionScheduleChanged {
|
|
707
|
+
/**
|
|
708
|
+
* The subscription schedule's state before the quote was marked as stale.
|
|
709
|
+
*/
|
|
710
|
+
previous_subscription_schedule: Stripe.SubscriptionSchedule | null;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
type Type =
|
|
714
|
+
| 'accept_failed_validations'
|
|
715
|
+
| 'bill_on_acceptance_invalid'
|
|
716
|
+
| 'line_invalid'
|
|
717
|
+
| 'lines_invalid'
|
|
718
|
+
| 'marked_stale'
|
|
719
|
+
| 'subscription_canceled'
|
|
720
|
+
| 'subscription_changed'
|
|
721
|
+
| 'subscription_expired'
|
|
722
|
+
| 'subscription_schedule_canceled'
|
|
723
|
+
| 'subscription_schedule_changed'
|
|
724
|
+
| 'subscription_schedule_released';
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
503
728
|
|
|
504
729
|
interface StatusTransitions {
|
|
505
730
|
/**
|
|
@@ -519,11 +744,31 @@ declare module 'stripe' {
|
|
|
519
744
|
}
|
|
520
745
|
|
|
521
746
|
interface SubscriptionData {
|
|
747
|
+
/**
|
|
748
|
+
* Describes the period to bill for upon accepting the quote.
|
|
749
|
+
*/
|
|
750
|
+
bill_on_acceptance?: SubscriptionData.BillOnAcceptance | null;
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
|
|
754
|
+
*/
|
|
755
|
+
billing_behavior?: SubscriptionData.BillingBehavior;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Whether the subscription will always start a new billing period when the quote is accepted.
|
|
759
|
+
*/
|
|
760
|
+
billing_cycle_anchor?: 'reset' | null;
|
|
761
|
+
|
|
522
762
|
/**
|
|
523
763
|
* The billing mode of the quote.
|
|
524
764
|
*/
|
|
525
765
|
billing_mode: SubscriptionData.BillingMode;
|
|
526
766
|
|
|
767
|
+
/**
|
|
768
|
+
* Billing schedules that will be applied to the subscription or subscription schedule created from this quote.
|
|
769
|
+
*/
|
|
770
|
+
billing_schedules?: Array<SubscriptionData.BillingSchedule> | null;
|
|
771
|
+
|
|
527
772
|
/**
|
|
528
773
|
* 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.
|
|
529
774
|
*/
|
|
@@ -534,11 +779,36 @@ declare module 'stripe' {
|
|
|
534
779
|
*/
|
|
535
780
|
effective_date: number | null;
|
|
536
781
|
|
|
782
|
+
/**
|
|
783
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
784
|
+
*/
|
|
785
|
+
end_behavior?: SubscriptionData.EndBehavior | null;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* The id of the subscription that will be updated when the quote is accepted.
|
|
789
|
+
*/
|
|
790
|
+
from_subscription?: string | Stripe.Subscription | null;
|
|
791
|
+
|
|
537
792
|
/**
|
|
538
793
|
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
|
|
539
794
|
*/
|
|
540
795
|
metadata: Stripe.Metadata | null;
|
|
541
796
|
|
|
797
|
+
/**
|
|
798
|
+
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
799
|
+
*/
|
|
800
|
+
phase_effective_at?: SubscriptionData.PhaseEffectiveAt | null;
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
|
|
804
|
+
*/
|
|
805
|
+
prebilling?: SubscriptionData.Prebilling | null;
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
|
809
|
+
*/
|
|
810
|
+
proration_behavior?: SubscriptionData.ProrationBehavior;
|
|
811
|
+
|
|
542
812
|
/**
|
|
543
813
|
* Integer representing the number of trial period days before the customer is charged for the first time.
|
|
544
814
|
*/
|
|
@@ -546,6 +816,8 @@ declare module 'stripe' {
|
|
|
546
816
|
}
|
|
547
817
|
|
|
548
818
|
namespace SubscriptionData {
|
|
819
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
820
|
+
|
|
549
821
|
interface BillingMode {
|
|
550
822
|
flexible?: BillingMode.Flexible;
|
|
551
823
|
|
|
@@ -569,6 +841,715 @@ declare module 'stripe' {
|
|
|
569
841
|
|
|
570
842
|
type Type = 'classic' | 'flexible';
|
|
571
843
|
}
|
|
844
|
+
|
|
845
|
+
interface BillingSchedule {
|
|
846
|
+
/**
|
|
847
|
+
* Specifies which subscription items the billing schedule applies to.
|
|
848
|
+
*/
|
|
849
|
+
applies_to: Array<BillingSchedule.AppliesTo> | null;
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Specifies the start of the billing period.
|
|
853
|
+
*/
|
|
854
|
+
bill_from?: BillingSchedule.BillFrom | null;
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* Specifies the end of billing period.
|
|
858
|
+
*/
|
|
859
|
+
bill_until: BillingSchedule.BillUntil;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Unique identifier for the billing schedule.
|
|
863
|
+
*/
|
|
864
|
+
key: string;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
namespace BillingSchedule {
|
|
868
|
+
interface AppliesTo {
|
|
869
|
+
/**
|
|
870
|
+
* The billing schedule will apply to the subscription item with the given price ID.
|
|
871
|
+
*/
|
|
872
|
+
price: string | Stripe.Price | null;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Controls which subscription items the billing schedule applies to.
|
|
876
|
+
*/
|
|
877
|
+
type: 'price';
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
interface BillFrom {
|
|
881
|
+
/**
|
|
882
|
+
* Use an index to specify the position of an amendment to start prebilling with.
|
|
883
|
+
*/
|
|
884
|
+
amendment_start: BillFrom.AmendmentStart | null;
|
|
885
|
+
|
|
886
|
+
/**
|
|
887
|
+
* The time the billing schedule applies from.
|
|
888
|
+
*/
|
|
889
|
+
computed_timestamp: number | null;
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* Lets you bill the period starting from a particular Quote line.
|
|
893
|
+
*/
|
|
894
|
+
line_starts_at: BillFrom.LineStartsAt | null;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Timestamp is calculated from the request time.
|
|
898
|
+
*/
|
|
899
|
+
relative: BillFrom.Relative | null;
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
|
|
903
|
+
*/
|
|
904
|
+
timestamp: number | null;
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`.
|
|
908
|
+
*/
|
|
909
|
+
type: BillFrom.Type;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
namespace BillFrom {
|
|
913
|
+
interface AmendmentStart {
|
|
914
|
+
/**
|
|
915
|
+
* Use an index to specify the position of an amendment to start prebilling with.
|
|
916
|
+
*/
|
|
917
|
+
index: number;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
interface LineStartsAt {
|
|
921
|
+
/**
|
|
922
|
+
* Unique identifier for the object.
|
|
923
|
+
*/
|
|
924
|
+
id: string;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
interface Relative {
|
|
928
|
+
/**
|
|
929
|
+
* Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`.
|
|
930
|
+
*/
|
|
931
|
+
interval: Relative.Interval;
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* The multiplier applied to the interval.
|
|
935
|
+
*/
|
|
936
|
+
interval_count: number | null;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
namespace Relative {
|
|
940
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
type Type =
|
|
944
|
+
| 'amendment_start'
|
|
945
|
+
| 'line_starts_at'
|
|
946
|
+
| 'now'
|
|
947
|
+
| 'pause_collection_start'
|
|
948
|
+
| 'quote_acceptance_date'
|
|
949
|
+
| 'relative'
|
|
950
|
+
| 'timestamp';
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
interface BillUntil {
|
|
954
|
+
/**
|
|
955
|
+
* Use an index to specify the position of an amendment to end prebilling with.
|
|
956
|
+
*/
|
|
957
|
+
amendment_end?: BillUntil.AmendmentEnd | null;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* The timestamp the billing schedule will apply until.
|
|
961
|
+
*/
|
|
962
|
+
computed_timestamp: number;
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* Specifies the billing period.
|
|
966
|
+
*/
|
|
967
|
+
duration: BillUntil.Duration | null;
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* Lets you bill the period ending at a particular Quote line.
|
|
971
|
+
*/
|
|
972
|
+
line_ends_at?: BillUntil.LineEndsAt | null;
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* If specified, the billing schedule will apply until the specified timestamp.
|
|
976
|
+
*/
|
|
977
|
+
timestamp: number | null;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
|
981
|
+
*/
|
|
982
|
+
type: BillUntil.Type;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
namespace BillUntil {
|
|
986
|
+
interface AmendmentEnd {
|
|
987
|
+
/**
|
|
988
|
+
* Use an index to specify the position of an amendment to end prebilling with.
|
|
989
|
+
*/
|
|
990
|
+
index: number;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
interface Duration {
|
|
994
|
+
/**
|
|
995
|
+
* Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
|
996
|
+
*/
|
|
997
|
+
interval: Duration.Interval;
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* The multiplier applied to the interval.
|
|
1001
|
+
*/
|
|
1002
|
+
interval_count: number | null;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
namespace Duration {
|
|
1006
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
interface LineEndsAt {
|
|
1010
|
+
/**
|
|
1011
|
+
* Unique identifier for the object.
|
|
1012
|
+
*/
|
|
1013
|
+
id: string;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
type Type =
|
|
1017
|
+
| 'amendment_end'
|
|
1018
|
+
| 'duration'
|
|
1019
|
+
| 'line_ends_at'
|
|
1020
|
+
| 'schedule_end'
|
|
1021
|
+
| 'timestamp'
|
|
1022
|
+
| 'upcoming_invoice';
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
interface BillOnAcceptance {
|
|
1027
|
+
/**
|
|
1028
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
1029
|
+
*/
|
|
1030
|
+
bill_from: BillOnAcceptance.BillFrom | null;
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
1034
|
+
*/
|
|
1035
|
+
bill_until: BillOnAcceptance.BillUntil | null;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
namespace BillOnAcceptance {
|
|
1039
|
+
interface BillFrom {
|
|
1040
|
+
/**
|
|
1041
|
+
* The materialized time.
|
|
1042
|
+
*/
|
|
1043
|
+
computed: number | null;
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* The timestamp the given line starts at.
|
|
1047
|
+
*/
|
|
1048
|
+
line_starts_at: BillFrom.LineStartsAt | null;
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* A precise Unix timestamp.
|
|
1052
|
+
*/
|
|
1053
|
+
timestamp: number | null;
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* The type of method to specify the `bill_from` time.
|
|
1057
|
+
*/
|
|
1058
|
+
type: BillFrom.Type;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
namespace BillFrom {
|
|
1062
|
+
interface LineStartsAt {
|
|
1063
|
+
/**
|
|
1064
|
+
* Unique identifier for the object.
|
|
1065
|
+
*/
|
|
1066
|
+
id: string;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
type Type =
|
|
1070
|
+
| 'line_starts_at'
|
|
1071
|
+
| 'now'
|
|
1072
|
+
| 'pause_collection_start'
|
|
1073
|
+
| 'quote_acceptance_date'
|
|
1074
|
+
| 'timestamp';
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
interface BillUntil {
|
|
1078
|
+
/**
|
|
1079
|
+
* The materialized time.
|
|
1080
|
+
*/
|
|
1081
|
+
computed: number | null;
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
1085
|
+
*/
|
|
1086
|
+
duration: BillUntil.Duration | null;
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* The timestamp the given line ends at.
|
|
1090
|
+
*/
|
|
1091
|
+
line_ends_at: BillUntil.LineEndsAt | null;
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* A precise Unix timestamp.
|
|
1095
|
+
*/
|
|
1096
|
+
timestamp: number | null;
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* The type of method to specify the `bill_until` time.
|
|
1100
|
+
*/
|
|
1101
|
+
type: BillUntil.Type;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
namespace BillUntil {
|
|
1105
|
+
interface Duration {
|
|
1106
|
+
/**
|
|
1107
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1108
|
+
*/
|
|
1109
|
+
interval: Duration.Interval;
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1113
|
+
*/
|
|
1114
|
+
interval_count: number;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
namespace Duration {
|
|
1118
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
interface LineEndsAt {
|
|
1122
|
+
/**
|
|
1123
|
+
* Unique identifier for the object.
|
|
1124
|
+
*/
|
|
1125
|
+
id: string;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
type Type =
|
|
1129
|
+
| 'duration'
|
|
1130
|
+
| 'line_ends_at'
|
|
1131
|
+
| 'schedule_end'
|
|
1132
|
+
| 'timestamp'
|
|
1133
|
+
| 'upcoming_invoice';
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
type EndBehavior = 'cancel' | 'release';
|
|
1138
|
+
|
|
1139
|
+
type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
|
|
1140
|
+
|
|
1141
|
+
interface Prebilling {
|
|
1142
|
+
iterations: number;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
type ProrationBehavior =
|
|
1146
|
+
| 'always_invoice'
|
|
1147
|
+
| 'create_prorations'
|
|
1148
|
+
| 'none';
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
interface SubscriptionDataOverride {
|
|
1152
|
+
applies_to: SubscriptionDataOverride.AppliesTo;
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* Describes the period to bill for upon accepting the quote.
|
|
1156
|
+
*/
|
|
1157
|
+
bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance | null;
|
|
1158
|
+
|
|
1159
|
+
/**
|
|
1160
|
+
* 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.
|
|
1161
|
+
*/
|
|
1162
|
+
billing_behavior?: SubscriptionDataOverride.BillingBehavior;
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* Billing schedules that will be applied to the subscription or subscription schedule created from this quote.
|
|
1166
|
+
*/
|
|
1167
|
+
billing_schedules?: Array<
|
|
1168
|
+
SubscriptionDataOverride.BillingSchedule
|
|
1169
|
+
> | null;
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
|
|
1173
|
+
*/
|
|
1174
|
+
customer: string | null;
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* 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.
|
|
1178
|
+
*/
|
|
1179
|
+
description: string | null;
|
|
1180
|
+
|
|
1181
|
+
/**
|
|
1182
|
+
* Behavior of the subscription schedule and underlying subscription when it ends.
|
|
1183
|
+
*/
|
|
1184
|
+
end_behavior?: SubscriptionDataOverride.EndBehavior | null;
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.
|
|
1188
|
+
*/
|
|
1189
|
+
phase_effective_at?: SubscriptionDataOverride.PhaseEffectiveAt | null;
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
|
|
1193
|
+
*/
|
|
1194
|
+
proration_behavior?: SubscriptionDataOverride.ProrationBehavior | null;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
namespace SubscriptionDataOverride {
|
|
1198
|
+
interface AppliesTo {
|
|
1199
|
+
/**
|
|
1200
|
+
* 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.
|
|
1201
|
+
*/
|
|
1202
|
+
new_reference: string | null;
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* The ID of the schedule the line applies to.
|
|
1206
|
+
*/
|
|
1207
|
+
subscription_schedule: string | null;
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
1211
|
+
*/
|
|
1212
|
+
type: AppliesTo.Type;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
namespace AppliesTo {
|
|
1216
|
+
type Type = 'new_reference' | 'subscription_schedule';
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
|
|
1220
|
+
|
|
1221
|
+
interface BillingSchedule {
|
|
1222
|
+
/**
|
|
1223
|
+
* Specifies which subscription items the billing schedule applies to.
|
|
1224
|
+
*/
|
|
1225
|
+
applies_to: Array<BillingSchedule.AppliesTo> | null;
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* Specifies the start of the billing period.
|
|
1229
|
+
*/
|
|
1230
|
+
bill_from?: BillingSchedule.BillFrom | null;
|
|
1231
|
+
|
|
1232
|
+
/**
|
|
1233
|
+
* Specifies the end of billing period.
|
|
1234
|
+
*/
|
|
1235
|
+
bill_until: BillingSchedule.BillUntil;
|
|
1236
|
+
|
|
1237
|
+
/**
|
|
1238
|
+
* Unique identifier for the billing schedule.
|
|
1239
|
+
*/
|
|
1240
|
+
key: string;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
namespace BillingSchedule {
|
|
1244
|
+
interface AppliesTo {
|
|
1245
|
+
/**
|
|
1246
|
+
* The billing schedule will apply to the subscription item with the given price ID.
|
|
1247
|
+
*/
|
|
1248
|
+
price: string | Stripe.Price | null;
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* Controls which subscription items the billing schedule applies to.
|
|
1252
|
+
*/
|
|
1253
|
+
type: 'price';
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
interface BillFrom {
|
|
1257
|
+
/**
|
|
1258
|
+
* Use an index to specify the position of an amendment to start prebilling with.
|
|
1259
|
+
*/
|
|
1260
|
+
amendment_start: BillFrom.AmendmentStart | null;
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* The time the billing schedule applies from.
|
|
1264
|
+
*/
|
|
1265
|
+
computed_timestamp: number | null;
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* Lets you bill the period starting from a particular Quote line.
|
|
1269
|
+
*/
|
|
1270
|
+
line_starts_at: BillFrom.LineStartsAt | null;
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* Timestamp is calculated from the request time.
|
|
1274
|
+
*/
|
|
1275
|
+
relative: BillFrom.Relative | null;
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
|
|
1279
|
+
*/
|
|
1280
|
+
timestamp: number | null;
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`.
|
|
1284
|
+
*/
|
|
1285
|
+
type: BillFrom.Type;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
namespace BillFrom {
|
|
1289
|
+
interface AmendmentStart {
|
|
1290
|
+
/**
|
|
1291
|
+
* Use an index to specify the position of an amendment to start prebilling with.
|
|
1292
|
+
*/
|
|
1293
|
+
index: number;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
interface LineStartsAt {
|
|
1297
|
+
/**
|
|
1298
|
+
* Unique identifier for the object.
|
|
1299
|
+
*/
|
|
1300
|
+
id: string;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
interface Relative {
|
|
1304
|
+
/**
|
|
1305
|
+
* Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`.
|
|
1306
|
+
*/
|
|
1307
|
+
interval: Relative.Interval;
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* The multiplier applied to the interval.
|
|
1311
|
+
*/
|
|
1312
|
+
interval_count: number | null;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
namespace Relative {
|
|
1316
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
type Type =
|
|
1320
|
+
| 'amendment_start'
|
|
1321
|
+
| 'line_starts_at'
|
|
1322
|
+
| 'now'
|
|
1323
|
+
| 'pause_collection_start'
|
|
1324
|
+
| 'quote_acceptance_date'
|
|
1325
|
+
| 'relative'
|
|
1326
|
+
| 'timestamp';
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
interface BillUntil {
|
|
1330
|
+
/**
|
|
1331
|
+
* Use an index to specify the position of an amendment to end prebilling with.
|
|
1332
|
+
*/
|
|
1333
|
+
amendment_end?: BillUntil.AmendmentEnd | null;
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* The timestamp the billing schedule will apply until.
|
|
1337
|
+
*/
|
|
1338
|
+
computed_timestamp: number;
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* Specifies the billing period.
|
|
1342
|
+
*/
|
|
1343
|
+
duration: BillUntil.Duration | null;
|
|
1344
|
+
|
|
1345
|
+
/**
|
|
1346
|
+
* Lets you bill the period ending at a particular Quote line.
|
|
1347
|
+
*/
|
|
1348
|
+
line_ends_at?: BillUntil.LineEndsAt | null;
|
|
1349
|
+
|
|
1350
|
+
/**
|
|
1351
|
+
* If specified, the billing schedule will apply until the specified timestamp.
|
|
1352
|
+
*/
|
|
1353
|
+
timestamp: number | null;
|
|
1354
|
+
|
|
1355
|
+
/**
|
|
1356
|
+
* Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
|
|
1357
|
+
*/
|
|
1358
|
+
type: BillUntil.Type;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
namespace BillUntil {
|
|
1362
|
+
interface AmendmentEnd {
|
|
1363
|
+
/**
|
|
1364
|
+
* Use an index to specify the position of an amendment to end prebilling with.
|
|
1365
|
+
*/
|
|
1366
|
+
index: number;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
interface Duration {
|
|
1370
|
+
/**
|
|
1371
|
+
* Specifies billing duration. Either `day`, `week`, `month` or `year`.
|
|
1372
|
+
*/
|
|
1373
|
+
interval: Duration.Interval;
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* The multiplier applied to the interval.
|
|
1377
|
+
*/
|
|
1378
|
+
interval_count: number | null;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
namespace Duration {
|
|
1382
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
interface LineEndsAt {
|
|
1386
|
+
/**
|
|
1387
|
+
* Unique identifier for the object.
|
|
1388
|
+
*/
|
|
1389
|
+
id: string;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
type Type =
|
|
1393
|
+
| 'amendment_end'
|
|
1394
|
+
| 'duration'
|
|
1395
|
+
| 'line_ends_at'
|
|
1396
|
+
| 'schedule_end'
|
|
1397
|
+
| 'timestamp'
|
|
1398
|
+
| 'upcoming_invoice';
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
interface BillOnAcceptance {
|
|
1403
|
+
/**
|
|
1404
|
+
* The start of the period to bill from when the Quote is accepted.
|
|
1405
|
+
*/
|
|
1406
|
+
bill_from: BillOnAcceptance.BillFrom | null;
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* The end of the period to bill until when the Quote is accepted.
|
|
1410
|
+
*/
|
|
1411
|
+
bill_until: BillOnAcceptance.BillUntil | null;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
namespace BillOnAcceptance {
|
|
1415
|
+
interface BillFrom {
|
|
1416
|
+
/**
|
|
1417
|
+
* The materialized time.
|
|
1418
|
+
*/
|
|
1419
|
+
computed: number | null;
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* The timestamp the given line starts at.
|
|
1423
|
+
*/
|
|
1424
|
+
line_starts_at: BillFrom.LineStartsAt | null;
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* A precise Unix timestamp.
|
|
1428
|
+
*/
|
|
1429
|
+
timestamp: number | null;
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* The type of method to specify the `bill_from` time.
|
|
1433
|
+
*/
|
|
1434
|
+
type: BillFrom.Type;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
namespace BillFrom {
|
|
1438
|
+
interface LineStartsAt {
|
|
1439
|
+
/**
|
|
1440
|
+
* Unique identifier for the object.
|
|
1441
|
+
*/
|
|
1442
|
+
id: string;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
type Type =
|
|
1446
|
+
| 'line_starts_at'
|
|
1447
|
+
| 'now'
|
|
1448
|
+
| 'pause_collection_start'
|
|
1449
|
+
| 'quote_acceptance_date'
|
|
1450
|
+
| 'timestamp';
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
interface BillUntil {
|
|
1454
|
+
/**
|
|
1455
|
+
* The materialized time.
|
|
1456
|
+
*/
|
|
1457
|
+
computed: number | null;
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* Time span for the quote line starting from the `starts_at` date.
|
|
1461
|
+
*/
|
|
1462
|
+
duration: BillUntil.Duration | null;
|
|
1463
|
+
|
|
1464
|
+
/**
|
|
1465
|
+
* The timestamp the given line ends at.
|
|
1466
|
+
*/
|
|
1467
|
+
line_ends_at: BillUntil.LineEndsAt | null;
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* A precise Unix timestamp.
|
|
1471
|
+
*/
|
|
1472
|
+
timestamp: number | null;
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* The type of method to specify the `bill_until` time.
|
|
1476
|
+
*/
|
|
1477
|
+
type: BillUntil.Type;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
namespace BillUntil {
|
|
1481
|
+
interface Duration {
|
|
1482
|
+
/**
|
|
1483
|
+
* Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
|
1484
|
+
*/
|
|
1485
|
+
interval: Duration.Interval;
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
* The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
|
1489
|
+
*/
|
|
1490
|
+
interval_count: number;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
namespace Duration {
|
|
1494
|
+
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
interface LineEndsAt {
|
|
1498
|
+
/**
|
|
1499
|
+
* Unique identifier for the object.
|
|
1500
|
+
*/
|
|
1501
|
+
id: string;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
type Type =
|
|
1505
|
+
| 'duration'
|
|
1506
|
+
| 'line_ends_at'
|
|
1507
|
+
| 'schedule_end'
|
|
1508
|
+
| 'timestamp'
|
|
1509
|
+
| 'upcoming_invoice';
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
type EndBehavior = 'cancel' | 'release';
|
|
1514
|
+
|
|
1515
|
+
type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
|
|
1516
|
+
|
|
1517
|
+
type ProrationBehavior =
|
|
1518
|
+
| 'always_invoice'
|
|
1519
|
+
| 'create_prorations'
|
|
1520
|
+
| 'none';
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
interface SubscriptionSchedule {
|
|
1524
|
+
applies_to: SubscriptionSchedule.AppliesTo;
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* The subscription schedule that was created or updated from this quote.
|
|
1528
|
+
*/
|
|
1529
|
+
subscription_schedule: string;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
namespace SubscriptionSchedule {
|
|
1533
|
+
interface AppliesTo {
|
|
1534
|
+
/**
|
|
1535
|
+
* 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.
|
|
1536
|
+
*/
|
|
1537
|
+
new_reference: string | null;
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* The ID of the schedule the line applies to.
|
|
1541
|
+
*/
|
|
1542
|
+
subscription_schedule: string | null;
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* Describes whether the quote line is affecting a new schedule or an existing schedule.
|
|
1546
|
+
*/
|
|
1547
|
+
type: AppliesTo.Type;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
namespace AppliesTo {
|
|
1551
|
+
type Type = 'new_reference' | 'subscription_schedule';
|
|
1552
|
+
}
|
|
572
1553
|
}
|
|
573
1554
|
|
|
574
1555
|
interface TotalDetails {
|