stripe 20.1.2 → 20.2.0-alpha.2

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.
Files changed (472) hide show
  1. package/CHANGELOG.md +1988 -14
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +1 -0
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +123 -1
  6. package/cjs/RequestSender.js +1 -9
  7. package/cjs/apiVersion.js +2 -3
  8. package/cjs/resources/AccountNotices.js +21 -0
  9. package/cjs/resources/BalanceTransfers.js +9 -0
  10. package/cjs/resources/Billing/Analytics/MeterUsage.js +12 -0
  11. package/cjs/resources/Capital/FinancingOffers.js +21 -0
  12. package/cjs/resources/Capital/FinancingSummary.js +12 -0
  13. package/cjs/resources/Capital/FinancingTransactions.js +17 -0
  14. package/cjs/resources/DelegatedCheckout/RequestedSessions.js +28 -0
  15. package/cjs/resources/ExternalAccounts.js +23 -0
  16. package/cjs/resources/FinancialConnections/Accounts.js +5 -0
  17. package/cjs/resources/FinancialConnections/Institutions.js +17 -0
  18. package/cjs/resources/FxQuotes.js +15 -0
  19. package/cjs/resources/Identity/BlocklistEntries.js +25 -0
  20. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
  21. package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
  22. package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
  23. package/cjs/resources/Issuing/Programs.js +22 -0
  24. package/cjs/resources/Mandates.js +5 -0
  25. package/cjs/resources/Margins.js +22 -0
  26. package/cjs/resources/Orders.js +24 -0
  27. package/cjs/resources/PaymentIntents.js +8 -0
  28. package/cjs/resources/PaymentMethods.js +4 -0
  29. package/cjs/resources/Privacy/RedactionJobs.js +42 -0
  30. package/cjs/resources/ProductCatalog/TrialOffers.js +12 -0
  31. package/cjs/resources/Quotes.js +32 -0
  32. package/cjs/resources/Radar/AccountEvaluations.js +20 -0
  33. package/cjs/resources/SharedPayment/GrantedTokens.js +12 -0
  34. package/cjs/resources/SubscriptionSchedules.js +4 -0
  35. package/cjs/resources/Subscriptions.js +8 -0
  36. package/cjs/resources/Tax/Forms.js +20 -0
  37. package/cjs/resources/Tax/Locations.js +18 -0
  38. package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
  39. package/cjs/resources/TestHelpers/Capital/FinancingOffers.js +16 -0
  40. package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.js +16 -0
  41. package/cjs/resources/V2/Billing/BillSettings/Versions.js +17 -0
  42. package/cjs/resources/V2/Billing/BillSettings.js +27 -0
  43. package/cjs/resources/V2/Billing/Cadences.js +23 -0
  44. package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +17 -0
  45. package/cjs/resources/V2/Billing/CollectionSettings.js +30 -0
  46. package/cjs/resources/V2/Billing/CustomPricingUnits.js +25 -0
  47. package/cjs/resources/V2/Billing/Intents/Actions.js +17 -0
  48. package/cjs/resources/V2/Billing/Intents.js +36 -0
  49. package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +12 -0
  50. package/cjs/resources/V2/Billing/LicenseFees/Versions.js +17 -0
  51. package/cjs/resources/V2/Billing/LicenseFees.js +27 -0
  52. package/cjs/resources/V2/Billing/LicensedItems.js +25 -0
  53. package/cjs/resources/V2/Billing/MeteredItems.js +22 -0
  54. package/cjs/resources/V2/Billing/PricingPlanSubscriptions/Components.js +12 -0
  55. package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +26 -0
  56. package/cjs/resources/V2/Billing/PricingPlans/Components.js +29 -0
  57. package/cjs/resources/V2/Billing/PricingPlans/Versions.js +17 -0
  58. package/cjs/resources/V2/Billing/PricingPlans.js +29 -0
  59. package/cjs/resources/V2/Billing/Profiles.js +19 -0
  60. package/cjs/resources/V2/Billing/RateCardSubscriptions.js +29 -0
  61. package/cjs/resources/V2/Billing/RateCards/Rates.js +25 -0
  62. package/cjs/resources/V2/Billing/RateCards/Versions.js +17 -0
  63. package/cjs/resources/V2/Billing/RateCards.js +29 -0
  64. package/cjs/resources/V2/Billing/ServiceActions.js +20 -0
  65. package/cjs/resources/V2/Core/ClaimableSandboxes.js +16 -0
  66. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +33 -0
  67. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +37 -0
  68. package/cjs/resources/V2/Iam/ApiKeys.js +24 -0
  69. package/cjs/resources/V2/MoneyManagement/Adjustments.js +17 -0
  70. package/cjs/resources/V2/MoneyManagement/CurrencyConversions.js +21 -0
  71. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +29 -0
  72. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +21 -0
  73. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +21 -0
  74. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +16 -0
  75. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +25 -0
  76. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +29 -0
  77. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +25 -0
  78. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +25 -0
  79. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +12 -0
  80. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +17 -0
  81. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +17 -0
  82. package/cjs/resources/V2/MoneyManagement/RecipientVerifications.js +20 -0
  83. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +17 -0
  84. package/cjs/resources/V2/MoneyManagement/Transactions.js +17 -0
  85. package/cjs/resources/V2/Payments/OffSessionPayments.js +29 -0
  86. package/cjs/resources/V2/Payments/SettlementAllocationIntents/Splits.js +20 -0
  87. package/cjs/resources/V2/Payments/SettlementAllocationIntents.js +33 -0
  88. package/cjs/resources/V2/Reporting/ReportRuns.js +13 -0
  89. package/cjs/resources/V2/Reporting/Reports.js +12 -0
  90. package/cjs/resources/V2/Tax/ManualRules.js +23 -0
  91. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +16 -0
  92. package/cjs/resources/V2/TestHelpers/MoneyManagement.js +12 -0
  93. package/cjs/resources.js +166 -4
  94. package/cjs/stripe.core.js +1 -1
  95. package/esm/Error.js +107 -0
  96. package/esm/RequestSender.js +1 -9
  97. package/esm/apiVersion.js +1 -2
  98. package/esm/resources/AccountNotices.js +18 -0
  99. package/esm/resources/BalanceTransfers.js +6 -0
  100. package/esm/resources/Billing/Analytics/MeterUsage.js +9 -0
  101. package/esm/resources/Capital/FinancingOffers.js +18 -0
  102. package/esm/resources/Capital/FinancingSummary.js +9 -0
  103. package/esm/resources/Capital/FinancingTransactions.js +14 -0
  104. package/esm/resources/DelegatedCheckout/RequestedSessions.js +25 -0
  105. package/esm/resources/ExternalAccounts.js +20 -0
  106. package/esm/resources/FinancialConnections/Accounts.js +5 -0
  107. package/esm/resources/FinancialConnections/Institutions.js +14 -0
  108. package/esm/resources/FxQuotes.js +12 -0
  109. package/esm/resources/Identity/BlocklistEntries.js +22 -0
  110. package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
  111. package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
  112. package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
  113. package/esm/resources/Issuing/Programs.js +19 -0
  114. package/esm/resources/Mandates.js +5 -0
  115. package/esm/resources/Margins.js +19 -0
  116. package/esm/resources/Orders.js +21 -0
  117. package/esm/resources/PaymentIntents.js +8 -0
  118. package/esm/resources/PaymentMethods.js +4 -0
  119. package/esm/resources/Privacy/RedactionJobs.js +39 -0
  120. package/esm/resources/ProductCatalog/TrialOffers.js +9 -0
  121. package/esm/resources/Quotes.js +32 -0
  122. package/esm/resources/Radar/AccountEvaluations.js +17 -0
  123. package/esm/resources/SharedPayment/GrantedTokens.js +9 -0
  124. package/esm/resources/SubscriptionSchedules.js +4 -0
  125. package/esm/resources/Subscriptions.js +8 -0
  126. package/esm/resources/Tax/Forms.js +17 -0
  127. package/esm/resources/Tax/Locations.js +15 -0
  128. package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
  129. package/esm/resources/TestHelpers/Capital/FinancingOffers.js +13 -0
  130. package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.js +13 -0
  131. package/esm/resources/V2/Billing/BillSettings/Versions.js +14 -0
  132. package/esm/resources/V2/Billing/BillSettings.js +24 -0
  133. package/esm/resources/V2/Billing/Cadences.js +20 -0
  134. package/esm/resources/V2/Billing/CollectionSettings/Versions.js +14 -0
  135. package/esm/resources/V2/Billing/CollectionSettings.js +27 -0
  136. package/esm/resources/V2/Billing/CustomPricingUnits.js +22 -0
  137. package/esm/resources/V2/Billing/Intents/Actions.js +14 -0
  138. package/esm/resources/V2/Billing/Intents.js +33 -0
  139. package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +9 -0
  140. package/esm/resources/V2/Billing/LicenseFees/Versions.js +14 -0
  141. package/esm/resources/V2/Billing/LicenseFees.js +24 -0
  142. package/esm/resources/V2/Billing/LicensedItems.js +22 -0
  143. package/esm/resources/V2/Billing/MeteredItems.js +19 -0
  144. package/esm/resources/V2/Billing/PricingPlanSubscriptions/Components.js +9 -0
  145. package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +23 -0
  146. package/esm/resources/V2/Billing/PricingPlans/Components.js +26 -0
  147. package/esm/resources/V2/Billing/PricingPlans/Versions.js +14 -0
  148. package/esm/resources/V2/Billing/PricingPlans.js +26 -0
  149. package/esm/resources/V2/Billing/Profiles.js +16 -0
  150. package/esm/resources/V2/Billing/RateCardSubscriptions.js +26 -0
  151. package/esm/resources/V2/Billing/RateCards/Rates.js +22 -0
  152. package/esm/resources/V2/Billing/RateCards/Versions.js +14 -0
  153. package/esm/resources/V2/Billing/RateCards.js +26 -0
  154. package/esm/resources/V2/Billing/ServiceActions.js +17 -0
  155. package/esm/resources/V2/Core/ClaimableSandboxes.js +13 -0
  156. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +30 -0
  157. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +34 -0
  158. package/esm/resources/V2/Iam/ApiKeys.js +21 -0
  159. package/esm/resources/V2/MoneyManagement/Adjustments.js +14 -0
  160. package/esm/resources/V2/MoneyManagement/CurrencyConversions.js +18 -0
  161. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +26 -0
  162. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +18 -0
  163. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +18 -0
  164. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +13 -0
  165. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +22 -0
  166. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +26 -0
  167. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +22 -0
  168. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +22 -0
  169. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +9 -0
  170. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +14 -0
  171. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +14 -0
  172. package/esm/resources/V2/MoneyManagement/RecipientVerifications.js +17 -0
  173. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +14 -0
  174. package/esm/resources/V2/MoneyManagement/Transactions.js +14 -0
  175. package/esm/resources/V2/Payments/OffSessionPayments.js +26 -0
  176. package/esm/resources/V2/Payments/SettlementAllocationIntents/Splits.js +17 -0
  177. package/esm/resources/V2/Payments/SettlementAllocationIntents.js +30 -0
  178. package/esm/resources/V2/Reporting/ReportRuns.js +10 -0
  179. package/esm/resources/V2/Reporting/Reports.js +9 -0
  180. package/esm/resources/V2/Tax/ManualRules.js +20 -0
  181. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +13 -0
  182. package/esm/resources/V2/TestHelpers/MoneyManagement.js +9 -0
  183. package/esm/resources.js +156 -0
  184. package/esm/stripe.core.js +1 -1
  185. package/package.json +1 -1
  186. package/types/AccountLinksResource.d.ts +5 -1
  187. package/types/AccountNotices.d.ts +113 -0
  188. package/types/AccountNoticesResource.d.ts +98 -0
  189. package/types/AccountSessions.d.ts +63 -0
  190. package/types/AccountSessionsResource.d.ts +285 -0
  191. package/types/Accounts.d.ts +225 -1
  192. package/types/AccountsResource.d.ts +698 -12
  193. package/types/ApplicationFees.d.ts +6 -1
  194. package/types/Balance.d.ts +82 -0
  195. package/types/BalanceTransactions.d.ts +2 -1
  196. package/types/BalanceTransfers.d.ts +122 -0
  197. package/types/BalanceTransfersResource.d.ts +87 -0
  198. package/types/BankAccounts.d.ts +2 -0
  199. package/types/Billing/AlertTriggereds.d.ts +16 -1
  200. package/types/Billing/Alerts.d.ts +116 -1
  201. package/types/Billing/AlertsResource.d.ts +149 -2
  202. package/types/Billing/Analytics/MeterUsage.d.ts +31 -0
  203. package/types/Billing/Analytics/MeterUsageResource.d.ts +694 -0
  204. package/types/Billing/Analytics/MeterUsageRows.d.ts +58 -0
  205. package/types/Billing/CreditBalanceSummary.d.ts +118 -2
  206. package/types/Billing/CreditBalanceSummaryResource.d.ts +12 -0
  207. package/types/Billing/CreditBalanceTransactions.d.ts +118 -2
  208. package/types/Billing/CreditGrants.d.ts +71 -1
  209. package/types/Billing/CreditGrantsResource.d.ts +32 -1
  210. package/types/Billing/MeterEventSummaries.d.ts +7 -0
  211. package/types/Billing/Meters.d.ts +5 -0
  212. package/types/Billing/MetersResource.d.ts +17 -0
  213. package/types/Capabilities.d.ts +2 -0
  214. package/types/Capital/FinancingOffers.d.ts +188 -0
  215. package/types/Capital/FinancingOffersResource.d.ts +97 -0
  216. package/types/Capital/FinancingSummary.d.ts +109 -0
  217. package/types/Capital/FinancingSummaryResource.d.ts +27 -0
  218. package/types/Capital/FinancingTransactions.d.ts +135 -0
  219. package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
  220. package/types/Cards.d.ts +19 -0
  221. package/types/Charges.d.ts +166 -0
  222. package/types/ChargesResource.d.ts +3855 -75
  223. package/types/Checkout/Sessions.d.ts +337 -2
  224. package/types/Checkout/SessionsResource.d.ts +450 -2
  225. package/types/ConfirmationTokens.d.ts +117 -0
  226. package/types/Coupons.d.ts +35 -0
  227. package/types/CouponsResource.d.ts +23 -0
  228. package/types/CreditNoteLineItems.d.ts +17 -0
  229. package/types/CustomerSessions.d.ts +41 -0
  230. package/types/CustomerSessionsResource.d.ts +41 -0
  231. package/types/CustomersResource.d.ts +7 -0
  232. package/types/DelegatedCheckout/RequestedSessions.d.ts +465 -0
  233. package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +703 -0
  234. package/types/Discounts.d.ts +10 -0
  235. package/types/Disputes.d.ts +40 -0
  236. package/types/DisputesResource.d.ts +11 -0
  237. package/types/Errors.d.ts +91 -0
  238. package/types/EventTypes.d.ts +630 -0
  239. package/types/Events.d.ts +96 -0
  240. package/types/ExternalAccountsResource.d.ts +304 -0
  241. package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
  242. package/types/FinancialConnections/Accounts.d.ts +34 -1
  243. package/types/FinancialConnections/AccountsResource.d.ts +35 -3
  244. package/types/FinancialConnections/Institutions.d.ts +98 -0
  245. package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
  246. package/types/FinancialConnections/Sessions.d.ts +49 -1
  247. package/types/FinancialConnections/SessionsResource.d.ts +38 -1
  248. package/types/FxQuotes.d.ts +155 -0
  249. package/types/FxQuotesResource.d.ts +130 -0
  250. package/types/Identity/BlocklistEntries.d.ts +78 -0
  251. package/types/Identity/BlocklistEntriesResource.d.ts +146 -0
  252. package/types/Identity/VerificationReports.d.ts +10 -0
  253. package/types/Identity/VerificationReportsResource.d.ts +5 -0
  254. package/types/InvoiceItems.d.ts +123 -3
  255. package/types/InvoiceItemsResource.d.ts +98 -0
  256. package/types/InvoiceLineItems.d.ts +169 -6
  257. package/types/Invoices.d.ts +216 -4
  258. package/types/InvoicesResource.d.ts +1955 -136
  259. package/types/Issuing/CardholdersResource.d.ts +2 -1
  260. package/types/Issuing/Cards.d.ts +10 -0
  261. package/types/Issuing/CardsResource.d.ts +33 -0
  262. package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
  263. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
  264. package/types/Issuing/DisputeSettlementDetails.d.ts +85 -0
  265. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
  266. package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
  267. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
  268. package/types/Issuing/Programs.d.ts +42 -0
  269. package/types/Issuing/ProgramsResource.d.ts +96 -0
  270. package/types/Issuing/Settlements.d.ts +113 -0
  271. package/types/Issuing/Transactions.d.ts +5 -0
  272. package/types/Issuing/TransactionsResource.d.ts +5 -0
  273. package/types/LineItems.d.ts +45 -1
  274. package/types/Mandates.d.ts +69 -1
  275. package/types/MandatesResource.d.ts +31 -0
  276. package/types/Margins.d.ts +56 -0
  277. package/types/MarginsResource.d.ts +114 -0
  278. package/types/Orders.d.ts +1163 -0
  279. package/types/OrdersResource.d.ts +5505 -0
  280. package/types/PaymentAttemptRecords.d.ts +117 -0
  281. package/types/PaymentIntents.d.ts +728 -4
  282. package/types/PaymentIntentsResource.d.ts +19194 -6486
  283. package/types/PaymentLinks.d.ts +5 -0
  284. package/types/PaymentLinksResource.d.ts +29 -0
  285. package/types/PaymentMethodBalances.d.ts +63 -0
  286. package/types/PaymentMethodConfigurations.d.ts +180 -0
  287. package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
  288. package/types/PaymentMethods.d.ts +122 -0
  289. package/types/PaymentMethodsResource.d.ts +130 -0
  290. package/types/PaymentRecords.d.ts +117 -0
  291. package/types/Persons.d.ts +30 -0
  292. package/types/Plans.d.ts +5 -0
  293. package/types/PlansResource.d.ts +19 -0
  294. package/types/Prices.d.ts +27 -0
  295. package/types/PricesResource.d.ts +41 -0
  296. package/types/Privacy/RedactionJobValidationErrors.d.ts +60 -0
  297. package/types/Privacy/RedactionJobs.d.ts +111 -0
  298. package/types/Privacy/RedactionJobsResource.d.ts +230 -0
  299. package/types/ProductCatalog/TrialOffers.d.ts +77 -0
  300. package/types/ProductCatalog/TrialOffersResource.d.ts +80 -0
  301. package/types/ProductsResource.d.ts +34 -0
  302. package/types/QuoteLines.d.ts +651 -0
  303. package/types/QuotePreviewInvoices.d.ts +1839 -0
  304. package/types/QuotePreviewSubscriptionSchedules.d.ts +1034 -0
  305. package/types/Quotes.d.ts +871 -1
  306. package/types/QuotesResource.d.ts +3245 -297
  307. package/types/Radar/AccountEvaluations.d.ts +88 -0
  308. package/types/Radar/AccountEvaluationsResource.d.ts +148 -0
  309. package/types/Refunds.d.ts +14 -0
  310. package/types/SetupAttempts.d.ts +42 -1
  311. package/types/SetupIntents.d.ts +159 -2
  312. package/types/SetupIntentsResource.d.ts +719 -3
  313. package/types/SharedPayment/GrantedTokens.d.ts +102 -0
  314. package/types/SharedPayment/GrantedTokensResource.d.ts +29 -0
  315. package/types/Sources.d.ts +29 -0
  316. package/types/SubscriptionItems.d.ts +39 -0
  317. package/types/SubscriptionItemsResource.d.ts +143 -0
  318. package/types/SubscriptionSchedules.d.ts +324 -0
  319. package/types/SubscriptionSchedulesResource.d.ts +1521 -65
  320. package/types/Subscriptions.d.ts +279 -1
  321. package/types/SubscriptionsResource.d.ts +807 -2
  322. package/types/Tax/CalculationLineItems.d.ts +14 -1
  323. package/types/Tax/Calculations.d.ts +17 -1
  324. package/types/Tax/CalculationsResource.d.ts +5 -0
  325. package/types/Tax/Forms.d.ts +220 -0
  326. package/types/Tax/FormsResource.d.ts +107 -0
  327. package/types/Tax/Locations.d.ts +34 -0
  328. package/types/Tax/LocationsResource.d.ts +117 -0
  329. package/types/Tax/Registrations.d.ts +81 -1
  330. package/types/Tax/RegistrationsResource.d.ts +9 -1
  331. package/types/Tax/Transactions.d.ts +9 -1
  332. package/types/TaxCodes.d.ts +18 -0
  333. package/types/Terminal/Configurations.d.ts +9 -0
  334. package/types/Terminal/ConfigurationsResource.d.ts +28 -0
  335. package/types/Terminal/ReaderCollectedData.d.ts +51 -0
  336. package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
  337. package/types/Terminal/Readers.d.ts +20 -0
  338. package/types/TestHelpers/Capital/FinancingOffersResource.d.ts +130 -0
  339. package/types/TestHelpers/ConfirmationTokensResource.d.ts +103 -0
  340. package/types/TestHelpers/SharedPayment/GrantedTokensResource.d.ts +91 -0
  341. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
  342. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
  343. package/types/TokensResource.d.ts +68 -0
  344. package/types/Transfers.d.ts +9 -0
  345. package/types/TransfersResource.d.ts +7 -0
  346. package/types/TransitBalances.d.ts +40 -0
  347. package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
  348. package/types/Treasury/FinancialAccounts.d.ts +5 -0
  349. package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
  350. package/types/Treasury/OutboundTransfers.d.ts +26 -0
  351. package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
  352. package/types/Treasury/ReceivedCredits.d.ts +26 -0
  353. package/types/Treasury/ReceivedDebits.d.ts +31 -0
  354. package/types/V2/Billing/BillSettingVersions.d.ts +97 -0
  355. package/types/V2/Billing/BillSettings/VersionsResource.d.ts +58 -0
  356. package/types/V2/Billing/BillSettings.d.ts +120 -0
  357. package/types/V2/Billing/BillSettingsResource.d.ts +241 -0
  358. package/types/V2/Billing/Cadences.d.ts +735 -0
  359. package/types/V2/Billing/CadencesResource.d.ts +516 -0
  360. package/types/V2/Billing/CollectionSettingVersions.d.ts +318 -0
  361. package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +62 -0
  362. package/types/V2/Billing/CollectionSettings.d.ts +341 -0
  363. package/types/V2/Billing/CollectionSettingsResource.d.ts +683 -0
  364. package/types/V2/Billing/CustomPricingUnits.d.ts +56 -0
  365. package/types/V2/Billing/CustomPricingUnitsResource.d.ts +122 -0
  366. package/types/V2/Billing/IntentActions.d.ts +564 -0
  367. package/types/V2/Billing/Intents/ActionsResource.d.ts +58 -0
  368. package/types/V2/Billing/Intents.d.ts +117 -0
  369. package/types/V2/Billing/IntentsResource.d.ts +674 -0
  370. package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +64 -0
  371. package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +28 -0
  372. package/types/V2/Billing/LicenseFeeVersions.d.ts +106 -0
  373. package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +58 -0
  374. package/types/V2/Billing/LicenseFees.d.ts +164 -0
  375. package/types/V2/Billing/LicenseFeesResource.d.ts +290 -0
  376. package/types/V2/Billing/LicensedItems.d.ts +73 -0
  377. package/types/V2/Billing/LicensedItemsResource.d.ts +157 -0
  378. package/types/V2/Billing/MeteredItems.d.ts +101 -0
  379. package/types/V2/Billing/MeteredItemsResource.d.ts +189 -0
  380. package/types/V2/Billing/PricingPlanComponents.d.ts +109 -0
  381. package/types/V2/Billing/PricingPlanSubscriptionComponents.d.ts +57 -0
  382. package/types/V2/Billing/PricingPlanSubscriptions/ComponentsResource.d.ts +40 -0
  383. package/types/V2/Billing/PricingPlanSubscriptions.d.ts +144 -0
  384. package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +120 -0
  385. package/types/V2/Billing/PricingPlanVersions.d.ts +49 -0
  386. package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +197 -0
  387. package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +58 -0
  388. package/types/V2/Billing/PricingPlans.d.ts +84 -0
  389. package/types/V2/Billing/PricingPlansResource.d.ts +151 -0
  390. package/types/V2/Billing/Profiles.d.ts +70 -0
  391. package/types/V2/Billing/ProfilesResource.d.ts +150 -0
  392. package/types/V2/Billing/RateCardRates.d.ts +144 -0
  393. package/types/V2/Billing/RateCardSubscriptions.d.ts +144 -0
  394. package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +157 -0
  395. package/types/V2/Billing/RateCardVersions.d.ts +39 -0
  396. package/types/V2/Billing/RateCards/RatesResource.d.ts +203 -0
  397. package/types/V2/Billing/RateCards/VersionsResource.d.ts +58 -0
  398. package/types/V2/Billing/RateCards.d.ts +98 -0
  399. package/types/V2/Billing/RateCardsResource.d.ts +162 -0
  400. package/types/V2/Billing/ServiceActions.d.ts +298 -0
  401. package/types/V2/Billing/ServiceActionsResource.d.ts +394 -0
  402. package/types/V2/Core/AccountLinks.d.ts +10 -2
  403. package/types/V2/Core/AccountLinksResource.d.ts +11 -2
  404. package/types/V2/Core/AccountTokensResource.d.ts +259 -0
  405. package/types/V2/Core/Accounts/PersonTokensResource.d.ts +2 -0
  406. package/types/V2/Core/Accounts/PersonsResource.d.ts +5 -0
  407. package/types/V2/Core/Accounts.d.ts +2437 -50
  408. package/types/V2/Core/AccountsResource.d.ts +2538 -368
  409. package/types/V2/Core/ClaimableSandboxes.d.ts +132 -0
  410. package/types/V2/Core/ClaimableSandboxesResource.d.ts +74 -0
  411. package/types/V2/Core/EventTypes.d.ts +5438 -9
  412. package/types/V2/Core/Events.d.ts +61 -0
  413. package/types/V2/Core/EventsResource.d.ts +11 -1
  414. package/types/V2/Core/Vault/GbBankAccounts.d.ts +181 -0
  415. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +194 -0
  416. package/types/V2/Core/Vault/UsBankAccounts.d.ts +142 -0
  417. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +198 -0
  418. package/types/V2/FinancialAddressCreditSimulations.d.ts +27 -0
  419. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +46 -0
  420. package/types/V2/Iam/ApiKeys.d.ts +154 -0
  421. package/types/V2/Iam/ApiKeysResource.d.ts +215 -0
  422. package/types/V2/MoneyManagement/Adjustments.d.ts +122 -0
  423. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +83 -0
  424. package/types/V2/MoneyManagement/CurrencyConversions.d.ts +98 -0
  425. package/types/V2/MoneyManagement/CurrencyConversionsResource.d.ts +141 -0
  426. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +216 -0
  427. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +179 -0
  428. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +178 -0
  429. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +126 -0
  430. package/types/V2/MoneyManagement/InboundTransfers.d.ts +250 -0
  431. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +156 -0
  432. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +230 -0
  433. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +134 -0
  434. package/types/V2/MoneyManagement/OutboundPayments.d.ts +450 -0
  435. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +292 -0
  436. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +97 -0
  437. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +332 -0
  438. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +296 -0
  439. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +225 -0
  440. package/types/V2/MoneyManagement/PayoutMethods.d.ts +227 -0
  441. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +93 -0
  442. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +41 -0
  443. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +115 -0
  444. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +356 -0
  445. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +78 -0
  446. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +248 -0
  447. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +48 -0
  448. package/types/V2/MoneyManagement/RecipientVerifications.d.ts +112 -0
  449. package/types/V2/MoneyManagement/RecipientVerificationsResource.d.ts +77 -0
  450. package/types/V2/MoneyManagement/TransactionEntries.d.ts +200 -0
  451. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +82 -0
  452. package/types/V2/MoneyManagement/Transactions.d.ts +227 -0
  453. package/types/V2/MoneyManagement/TransactionsResource.d.ts +83 -0
  454. package/types/V2/Payments/OffSessionPayments.d.ts +249 -0
  455. package/types/V2/Payments/OffSessionPaymentsResource.d.ts +306 -0
  456. package/types/V2/Payments/SettlementAllocationIntentSplits.d.ts +111 -0
  457. package/types/V2/Payments/SettlementAllocationIntents/SplitsResource.d.ts +126 -0
  458. package/types/V2/Payments/SettlementAllocationIntents.d.ts +122 -0
  459. package/types/V2/Payments/SettlementAllocationIntentsResource.d.ts +168 -0
  460. package/types/V2/Reporting/ReportRuns.d.ts +154 -0
  461. package/types/V2/Reporting/ReportRunsResource.d.ts +75 -0
  462. package/types/V2/Reporting/Reports.d.ts +120 -0
  463. package/types/V2/Reporting/ReportsResource.d.ts +30 -0
  464. package/types/V2/Tax/ManualRules.d.ts +142 -0
  465. package/types/V2/Tax/ManualRulesResource.d.ts +292 -0
  466. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +85 -0
  467. package/types/V2/TestHelpers/MoneyManagementResource.d.ts +49 -0
  468. package/types/WebhookEndpointsResource.d.ts +77 -2
  469. package/types/Webhooks.d.ts +2 -0
  470. package/types/apiVersion.d.ts +1 -2
  471. package/types/index.d.ts +260 -0
  472. 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
  */
@@ -122,6 +127,11 @@ declare module 'stripe' {
122
127
  */
123
128
  line_items?: ApiList<Stripe.LineItem>;
124
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
+
125
135
  /**
126
136
  * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
127
137
  */
@@ -147,6 +157,11 @@ declare module 'stripe' {
147
157
  */
148
158
  status: Quote.Status;
149
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
+
150
165
  status_transitions: Quote.StatusTransitions;
151
166
 
152
167
  /**
@@ -156,11 +171,23 @@ declare module 'stripe' {
156
171
 
157
172
  subscription_data: Quote.SubscriptionData;
158
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
+
159
181
  /**
160
182
  * The subscription schedule that was created or updated from this quote.
161
183
  */
162
184
  subscription_schedule: string | Stripe.SubscriptionSchedule | null;
163
185
 
186
+ /**
187
+ * The subscription schedules that were created or updated from this quote.
188
+ */
189
+ subscription_schedules?: Array<Quote.SubscriptionSchedule> | null;
190
+
164
191
  /**
165
192
  * ID of the test clock this quote belongs to.
166
193
  */
@@ -220,15 +247,62 @@ declare module 'stripe' {
220
247
  type CollectionMethod = 'charge_automatically' | 'send_invoice';
221
248
 
222
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
+
223
255
  /**
224
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.
225
257
  */
226
258
  recurring: Computed.Recurring | null;
227
259
 
260
+ /**
261
+ * The time at which the quote's estimated schedules and upcoming invoices were generated.
262
+ */
263
+ updated_at?: number | null;
264
+
228
265
  upfront: Computed.Upfront;
229
266
  }
230
267
 
231
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
+
232
306
  interface Recurring {
233
307
  /**
234
308
  * Total before any discounts or taxes are applied.
@@ -504,7 +578,153 @@ declare module 'stripe' {
504
578
  }
505
579
  }
506
580
 
507
- type Status = 'accepted' | 'canceled' | 'draft' | 'open';
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
+ }
508
728
 
509
729
  interface StatusTransitions {
510
730
  /**
@@ -524,11 +744,31 @@ declare module 'stripe' {
524
744
  }
525
745
 
526
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
+
527
762
  /**
528
763
  * The billing mode of the quote.
529
764
  */
530
765
  billing_mode: SubscriptionData.BillingMode;
531
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>;
771
+
532
772
  /**
533
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.
534
774
  */
@@ -539,11 +779,36 @@ declare module 'stripe' {
539
779
  */
540
780
  effective_date: number | null;
541
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
+
542
792
  /**
543
793
  * 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.
544
794
  */
545
795
  metadata: Stripe.Metadata | null;
546
796
 
797
+ /**
798
+ * Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
799
+ */
800
+ phase_effective_at?: SubscriptionData.PhaseEffectiveAt;
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://docs.stripe.com/subscriptions/billing-cycle#prorations) when the quote is accepted.
809
+ */
810
+ proration_behavior?: SubscriptionData.ProrationBehavior;
811
+
547
812
  /**
548
813
  * Integer representing the number of trial period days before the customer is charged for the first time.
549
814
  */
@@ -551,6 +816,8 @@ declare module 'stripe' {
551
816
  }
552
817
 
553
818
  namespace SubscriptionData {
819
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
820
+
554
821
  interface BillingMode {
555
822
  flexible?: BillingMode.Flexible;
556
823
 
@@ -574,6 +841,609 @@ declare module 'stripe' {
574
841
 
575
842
  type Type = 'classic' | 'flexible';
576
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
+ bill_until: BillingSchedule.BillUntil;
857
+
858
+ /**
859
+ * Unique identifier for the billing schedule.
860
+ */
861
+ key: string;
862
+ }
863
+
864
+ namespace BillingSchedule {
865
+ interface AppliesTo {
866
+ /**
867
+ * The billing schedule will apply to the subscription item with the given price ID.
868
+ */
869
+ price: string | Stripe.Price | null;
870
+
871
+ /**
872
+ * Controls which subscription items the billing schedule applies to.
873
+ */
874
+ type: 'price';
875
+ }
876
+
877
+ interface BillFrom {
878
+ /**
879
+ * The time the billing schedule applies from.
880
+ */
881
+ computed_timestamp: number | null;
882
+
883
+ /**
884
+ * Lets you bill the period starting from a particular Quote line.
885
+ */
886
+ line_starts_at: BillFrom.LineStartsAt | null;
887
+
888
+ /**
889
+ * Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
890
+ */
891
+ timestamp: number | null;
892
+
893
+ /**
894
+ * 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`.
895
+ */
896
+ type: BillFrom.Type;
897
+ }
898
+
899
+ namespace BillFrom {
900
+ interface LineStartsAt {
901
+ /**
902
+ * Unique identifier for the object.
903
+ */
904
+ id: string;
905
+ }
906
+
907
+ type Type =
908
+ | 'line_starts_at'
909
+ | 'pause_collection_start'
910
+ | 'quote_acceptance_date'
911
+ | 'timestamp';
912
+ }
913
+
914
+ interface BillUntil {
915
+ /**
916
+ * The timestamp the billing schedule will apply until.
917
+ */
918
+ computed_timestamp: number | null;
919
+
920
+ /**
921
+ * Specifies the billing period.
922
+ */
923
+ duration: BillUntil.Duration | null;
924
+
925
+ /**
926
+ * Lets you bill the period ending at a particular Quote line.
927
+ */
928
+ line_ends_at?: BillUntil.LineEndsAt | null;
929
+
930
+ /**
931
+ * If specified, the billing schedule will apply until the specified timestamp.
932
+ */
933
+ timestamp: number | null;
934
+
935
+ /**
936
+ * Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
937
+ */
938
+ type: BillUntil.Type;
939
+ }
940
+
941
+ namespace BillUntil {
942
+ interface Duration {
943
+ /**
944
+ * Specifies billing duration. Either `day`, `week`, `month` or `year`.
945
+ */
946
+ interval: Duration.Interval;
947
+
948
+ /**
949
+ * The multiplier applied to the interval.
950
+ */
951
+ interval_count: number | null;
952
+ }
953
+
954
+ namespace Duration {
955
+ type Interval = 'day' | 'month' | 'week' | 'year';
956
+ }
957
+
958
+ interface LineEndsAt {
959
+ /**
960
+ * Unique identifier for the object.
961
+ */
962
+ id: string;
963
+ }
964
+
965
+ type Type =
966
+ | 'duration'
967
+ | 'line_ends_at'
968
+ | 'schedule_end'
969
+ | 'timestamp'
970
+ | 'upcoming_invoice';
971
+ }
972
+ }
973
+
974
+ interface BillOnAcceptance {
975
+ /**
976
+ * The start of the period to bill from when the Quote is accepted.
977
+ */
978
+ bill_from: BillOnAcceptance.BillFrom | null;
979
+
980
+ /**
981
+ * The end of the period to bill until when the Quote is accepted.
982
+ */
983
+ bill_until: BillOnAcceptance.BillUntil | null;
984
+ }
985
+
986
+ namespace BillOnAcceptance {
987
+ interface BillFrom {
988
+ /**
989
+ * The materialized time.
990
+ */
991
+ computed: number | null;
992
+
993
+ /**
994
+ * The timestamp the given line starts at.
995
+ */
996
+ line_starts_at: BillFrom.LineStartsAt | null;
997
+
998
+ /**
999
+ * A precise Unix timestamp.
1000
+ */
1001
+ timestamp: number | null;
1002
+
1003
+ /**
1004
+ * The type of method to specify the `bill_from` time.
1005
+ */
1006
+ type: BillFrom.Type;
1007
+ }
1008
+
1009
+ namespace BillFrom {
1010
+ interface LineStartsAt {
1011
+ /**
1012
+ * Unique identifier for the object.
1013
+ */
1014
+ id: string;
1015
+ }
1016
+
1017
+ type Type =
1018
+ | 'line_starts_at'
1019
+ | 'now'
1020
+ | 'pause_collection_start'
1021
+ | 'quote_acceptance_date'
1022
+ | 'timestamp';
1023
+ }
1024
+
1025
+ interface BillUntil {
1026
+ /**
1027
+ * The materialized time.
1028
+ */
1029
+ computed: number | null;
1030
+
1031
+ /**
1032
+ * Time span for the quote line starting from the `starts_at` date.
1033
+ */
1034
+ duration: BillUntil.Duration | null;
1035
+
1036
+ /**
1037
+ * The timestamp the given line ends at.
1038
+ */
1039
+ line_ends_at: BillUntil.LineEndsAt | null;
1040
+
1041
+ /**
1042
+ * A precise Unix timestamp.
1043
+ */
1044
+ timestamp: number | null;
1045
+
1046
+ /**
1047
+ * The type of method to specify the `bill_until` time.
1048
+ */
1049
+ type: BillUntil.Type;
1050
+ }
1051
+
1052
+ namespace BillUntil {
1053
+ interface Duration {
1054
+ /**
1055
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1056
+ */
1057
+ interval: Duration.Interval;
1058
+
1059
+ /**
1060
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1061
+ */
1062
+ interval_count: number;
1063
+ }
1064
+
1065
+ namespace Duration {
1066
+ type Interval = 'day' | 'month' | 'week' | 'year';
1067
+ }
1068
+
1069
+ interface LineEndsAt {
1070
+ /**
1071
+ * Unique identifier for the object.
1072
+ */
1073
+ id: string;
1074
+ }
1075
+
1076
+ type Type =
1077
+ | 'duration'
1078
+ | 'line_ends_at'
1079
+ | 'schedule_end'
1080
+ | 'timestamp'
1081
+ | 'upcoming_invoice';
1082
+ }
1083
+ }
1084
+
1085
+ type EndBehavior = 'cancel' | 'release';
1086
+
1087
+ type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
1088
+
1089
+ interface Prebilling {
1090
+ iterations: number;
1091
+ }
1092
+
1093
+ type ProrationBehavior =
1094
+ | 'always_invoice'
1095
+ | 'create_prorations'
1096
+ | 'none';
1097
+ }
1098
+
1099
+ interface SubscriptionDataOverride {
1100
+ applies_to: SubscriptionDataOverride.AppliesTo;
1101
+
1102
+ /**
1103
+ * Describes the period to bill for upon accepting the quote.
1104
+ */
1105
+ bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance | null;
1106
+
1107
+ /**
1108
+ * 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.
1109
+ */
1110
+ billing_behavior?: SubscriptionDataOverride.BillingBehavior;
1111
+
1112
+ /**
1113
+ * Billing schedules that will be applied to the subscription or subscription schedule created from this quote.
1114
+ */
1115
+ billing_schedules?: Array<SubscriptionDataOverride.BillingSchedule>;
1116
+
1117
+ /**
1118
+ * The customer who received this quote. A customer is required to finalize the quote. Once specified, you can't change it.
1119
+ */
1120
+ customer: string | null;
1121
+
1122
+ /**
1123
+ * 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.
1124
+ */
1125
+ description: string | null;
1126
+
1127
+ /**
1128
+ * Behavior of the subscription schedule and underlying subscription when it ends.
1129
+ */
1130
+ end_behavior?: SubscriptionDataOverride.EndBehavior | null;
1131
+
1132
+ /**
1133
+ * Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
1134
+ */
1135
+ phase_effective_at?: SubscriptionDataOverride.PhaseEffectiveAt;
1136
+
1137
+ /**
1138
+ * Determines how to handle [prorations](https://docs.stripe.com/subscriptions/billing-cycle#prorations) when the quote is accepted.
1139
+ */
1140
+ proration_behavior?: SubscriptionDataOverride.ProrationBehavior | null;
1141
+ }
1142
+
1143
+ namespace SubscriptionDataOverride {
1144
+ interface AppliesTo {
1145
+ /**
1146
+ * 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.
1147
+ */
1148
+ new_reference: string | null;
1149
+
1150
+ /**
1151
+ * The ID of the schedule the line applies to.
1152
+ */
1153
+ subscription_schedule: string | null;
1154
+
1155
+ /**
1156
+ * Describes whether the quote line is affecting a new schedule or an existing schedule.
1157
+ */
1158
+ type: AppliesTo.Type;
1159
+ }
1160
+
1161
+ namespace AppliesTo {
1162
+ type Type = 'new_reference' | 'subscription_schedule';
1163
+ }
1164
+
1165
+ type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
1166
+
1167
+ interface BillingSchedule {
1168
+ /**
1169
+ * Specifies which subscription items the billing schedule applies to.
1170
+ */
1171
+ applies_to: Array<BillingSchedule.AppliesTo> | null;
1172
+
1173
+ /**
1174
+ * Specifies the start of the billing period.
1175
+ */
1176
+ bill_from?: BillingSchedule.BillFrom | null;
1177
+
1178
+ bill_until: BillingSchedule.BillUntil;
1179
+
1180
+ /**
1181
+ * Unique identifier for the billing schedule.
1182
+ */
1183
+ key: string;
1184
+ }
1185
+
1186
+ namespace BillingSchedule {
1187
+ interface AppliesTo {
1188
+ /**
1189
+ * The billing schedule will apply to the subscription item with the given price ID.
1190
+ */
1191
+ price: string | Stripe.Price | null;
1192
+
1193
+ /**
1194
+ * Controls which subscription items the billing schedule applies to.
1195
+ */
1196
+ type: 'price';
1197
+ }
1198
+
1199
+ interface BillFrom {
1200
+ /**
1201
+ * The time the billing schedule applies from.
1202
+ */
1203
+ computed_timestamp: number | null;
1204
+
1205
+ /**
1206
+ * Lets you bill the period starting from a particular Quote line.
1207
+ */
1208
+ line_starts_at: BillFrom.LineStartsAt | null;
1209
+
1210
+ /**
1211
+ * Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`.
1212
+ */
1213
+ timestamp: number | null;
1214
+
1215
+ /**
1216
+ * 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`.
1217
+ */
1218
+ type: BillFrom.Type;
1219
+ }
1220
+
1221
+ namespace BillFrom {
1222
+ interface LineStartsAt {
1223
+ /**
1224
+ * Unique identifier for the object.
1225
+ */
1226
+ id: string;
1227
+ }
1228
+
1229
+ type Type =
1230
+ | 'line_starts_at'
1231
+ | 'pause_collection_start'
1232
+ | 'quote_acceptance_date'
1233
+ | 'timestamp';
1234
+ }
1235
+
1236
+ interface BillUntil {
1237
+ /**
1238
+ * The timestamp the billing schedule will apply until.
1239
+ */
1240
+ computed_timestamp: number | null;
1241
+
1242
+ /**
1243
+ * Specifies the billing period.
1244
+ */
1245
+ duration: BillUntil.Duration | null;
1246
+
1247
+ /**
1248
+ * Lets you bill the period ending at a particular Quote line.
1249
+ */
1250
+ line_ends_at?: BillUntil.LineEndsAt | null;
1251
+
1252
+ /**
1253
+ * If specified, the billing schedule will apply until the specified timestamp.
1254
+ */
1255
+ timestamp: number | null;
1256
+
1257
+ /**
1258
+ * Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
1259
+ */
1260
+ type: BillUntil.Type;
1261
+ }
1262
+
1263
+ namespace BillUntil {
1264
+ interface Duration {
1265
+ /**
1266
+ * Specifies billing duration. Either `day`, `week`, `month` or `year`.
1267
+ */
1268
+ interval: Duration.Interval;
1269
+
1270
+ /**
1271
+ * The multiplier applied to the interval.
1272
+ */
1273
+ interval_count: number | null;
1274
+ }
1275
+
1276
+ namespace Duration {
1277
+ type Interval = 'day' | 'month' | 'week' | 'year';
1278
+ }
1279
+
1280
+ interface LineEndsAt {
1281
+ /**
1282
+ * Unique identifier for the object.
1283
+ */
1284
+ id: string;
1285
+ }
1286
+
1287
+ type Type =
1288
+ | 'duration'
1289
+ | 'line_ends_at'
1290
+ | 'schedule_end'
1291
+ | 'timestamp'
1292
+ | 'upcoming_invoice';
1293
+ }
1294
+ }
1295
+
1296
+ interface BillOnAcceptance {
1297
+ /**
1298
+ * The start of the period to bill from when the Quote is accepted.
1299
+ */
1300
+ bill_from: BillOnAcceptance.BillFrom | null;
1301
+
1302
+ /**
1303
+ * The end of the period to bill until when the Quote is accepted.
1304
+ */
1305
+ bill_until: BillOnAcceptance.BillUntil | null;
1306
+ }
1307
+
1308
+ namespace BillOnAcceptance {
1309
+ interface BillFrom {
1310
+ /**
1311
+ * The materialized time.
1312
+ */
1313
+ computed: number | null;
1314
+
1315
+ /**
1316
+ * The timestamp the given line starts at.
1317
+ */
1318
+ line_starts_at: BillFrom.LineStartsAt | null;
1319
+
1320
+ /**
1321
+ * A precise Unix timestamp.
1322
+ */
1323
+ timestamp: number | null;
1324
+
1325
+ /**
1326
+ * The type of method to specify the `bill_from` time.
1327
+ */
1328
+ type: BillFrom.Type;
1329
+ }
1330
+
1331
+ namespace BillFrom {
1332
+ interface LineStartsAt {
1333
+ /**
1334
+ * Unique identifier for the object.
1335
+ */
1336
+ id: string;
1337
+ }
1338
+
1339
+ type Type =
1340
+ | 'line_starts_at'
1341
+ | 'now'
1342
+ | 'pause_collection_start'
1343
+ | 'quote_acceptance_date'
1344
+ | 'timestamp';
1345
+ }
1346
+
1347
+ interface BillUntil {
1348
+ /**
1349
+ * The materialized time.
1350
+ */
1351
+ computed: number | null;
1352
+
1353
+ /**
1354
+ * Time span for the quote line starting from the `starts_at` date.
1355
+ */
1356
+ duration: BillUntil.Duration | null;
1357
+
1358
+ /**
1359
+ * The timestamp the given line ends at.
1360
+ */
1361
+ line_ends_at: BillUntil.LineEndsAt | null;
1362
+
1363
+ /**
1364
+ * A precise Unix timestamp.
1365
+ */
1366
+ timestamp: number | null;
1367
+
1368
+ /**
1369
+ * The type of method to specify the `bill_until` time.
1370
+ */
1371
+ type: BillUntil.Type;
1372
+ }
1373
+
1374
+ namespace BillUntil {
1375
+ interface Duration {
1376
+ /**
1377
+ * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1378
+ */
1379
+ interval: Duration.Interval;
1380
+
1381
+ /**
1382
+ * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1383
+ */
1384
+ interval_count: number;
1385
+ }
1386
+
1387
+ namespace Duration {
1388
+ type Interval = 'day' | 'month' | 'week' | 'year';
1389
+ }
1390
+
1391
+ interface LineEndsAt {
1392
+ /**
1393
+ * Unique identifier for the object.
1394
+ */
1395
+ id: string;
1396
+ }
1397
+
1398
+ type Type =
1399
+ | 'duration'
1400
+ | 'line_ends_at'
1401
+ | 'schedule_end'
1402
+ | 'timestamp'
1403
+ | 'upcoming_invoice';
1404
+ }
1405
+ }
1406
+
1407
+ type EndBehavior = 'cancel' | 'release';
1408
+
1409
+ type PhaseEffectiveAt = 'billing_period_start' | 'phase_start';
1410
+
1411
+ type ProrationBehavior =
1412
+ | 'always_invoice'
1413
+ | 'create_prorations'
1414
+ | 'none';
1415
+ }
1416
+
1417
+ interface SubscriptionSchedule {
1418
+ applies_to: SubscriptionSchedule.AppliesTo;
1419
+
1420
+ /**
1421
+ * The subscription schedule that was created or updated from this quote.
1422
+ */
1423
+ subscription_schedule: string;
1424
+ }
1425
+
1426
+ namespace SubscriptionSchedule {
1427
+ interface AppliesTo {
1428
+ /**
1429
+ * 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.
1430
+ */
1431
+ new_reference: string | null;
1432
+
1433
+ /**
1434
+ * The ID of the schedule the line applies to.
1435
+ */
1436
+ subscription_schedule: string | null;
1437
+
1438
+ /**
1439
+ * Describes whether the quote line is affecting a new schedule or an existing schedule.
1440
+ */
1441
+ type: AppliesTo.Type;
1442
+ }
1443
+
1444
+ namespace AppliesTo {
1445
+ type Type = 'new_reference' | 'subscription_schedule';
1446
+ }
577
1447
  }
578
1448
 
579
1449
  interface TotalDetails {