stripe 18.3.0-beta.1 → 18.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/CHANGELOG.md +59 -1246
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +0 -1
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +1 -91
  6. package/cjs/RequestSender.js +1 -1
  7. package/cjs/apiVersion.js +3 -2
  8. package/cjs/resources/FinancialConnections/Accounts.js +0 -5
  9. package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
  10. package/cjs/resources/PaymentIntents.js +0 -13
  11. package/cjs/resources/Quotes.js +0 -32
  12. package/cjs/resources/SubscriptionSchedules.js +0 -4
  13. package/cjs/resources.js +10 -98
  14. package/cjs/stripe.core.js +1 -1
  15. package/esm/Error.js +0 -79
  16. package/esm/RequestSender.js +1 -1
  17. package/esm/apiVersion.js +2 -1
  18. package/esm/resources/FinancialConnections/Accounts.js +0 -5
  19. package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
  20. package/esm/resources/PaymentIntents.js +0 -13
  21. package/esm/resources/Quotes.js +0 -32
  22. package/esm/resources/SubscriptionSchedules.js +0 -4
  23. package/esm/resources.js +1 -82
  24. package/esm/stripe.core.js +1 -1
  25. package/package.json +1 -1
  26. package/types/AccountLinksResource.d.ts +1 -5
  27. package/types/AccountSessions.d.ts +31 -76
  28. package/types/AccountSessionsResource.d.ts +48 -312
  29. package/types/Accounts.d.ts +30 -213
  30. package/types/AccountsResource.d.ts +85 -540
  31. package/types/Billing/CreditBalanceSummary.d.ts +0 -5
  32. package/types/Billing/CreditBalanceSummaryResource.d.ts +3 -8
  33. package/types/Billing/CreditBalanceTransactionsResource.d.ts +4 -12
  34. package/types/Billing/CreditGrants.d.ts +0 -5
  35. package/types/Billing/CreditGrantsResource.d.ts +1 -11
  36. package/types/BillingPortal/Sessions.d.ts +1 -6
  37. package/types/BillingPortal/SessionsResource.d.ts +5 -13
  38. package/types/Cards.d.ts +0 -5
  39. package/types/CashBalances.d.ts +0 -5
  40. package/types/Charges.d.ts +52 -182
  41. package/types/ChargesResource.d.ts +0 -1406
  42. package/types/Checkout/Sessions.d.ts +1 -314
  43. package/types/Checkout/SessionsResource.d.ts +62 -340
  44. package/types/ConfirmationTokens.d.ts +22 -136
  45. package/types/Coupons.d.ts +0 -33
  46. package/types/CouponsResource.d.ts +0 -21
  47. package/types/CreditNoteLineItems.d.ts +0 -17
  48. package/types/CreditNotes.d.ts +0 -5
  49. package/types/CreditNotesResource.d.ts +9 -14
  50. package/types/CustomerBalanceTransactions.d.ts +0 -2
  51. package/types/CustomerCashBalanceTransactions.d.ts +0 -2
  52. package/types/CustomerSessions.d.ts +1 -6
  53. package/types/CustomerSessionsResource.d.ts +2 -7
  54. package/types/Customers.d.ts +0 -2
  55. package/types/CustomersResource.d.ts +1 -8
  56. package/types/Discounts.d.ts +0 -10
  57. package/types/Disputes.d.ts +6 -2
  58. package/types/Errors.d.ts +2 -69
  59. package/types/EventTypes.d.ts +0 -664
  60. package/types/Events.d.ts +1 -98
  61. package/types/FinancialConnections/Accounts.d.ts +1 -36
  62. package/types/FinancialConnections/AccountsResource.d.ts +3 -40
  63. package/types/FinancialConnections/Sessions.d.ts +1 -51
  64. package/types/FinancialConnections/SessionsResource.d.ts +1 -43
  65. package/types/Identity/VerificationSessions.d.ts +33 -4
  66. package/types/Identity/VerificationSessionsResource.d.ts +14 -4
  67. package/types/InvoiceItems.d.ts +1 -14
  68. package/types/InvoiceItemsResource.d.ts +6 -117
  69. package/types/InvoiceLineItems.d.ts +1 -45
  70. package/types/InvoicePayments.d.ts +0 -5
  71. package/types/InvoicePaymentsResource.d.ts +74 -0
  72. package/types/Invoices.d.ts +4 -133
  73. package/types/InvoicesResource.d.ts +37 -1446
  74. package/types/Issuing/CardholdersResource.d.ts +1 -2
  75. package/types/Issuing/Transactions.d.ts +0 -5
  76. package/types/Issuing/TransactionsResource.d.ts +0 -5
  77. package/types/LineItems.d.ts +0 -49
  78. package/types/Mandates.d.ts +4 -77
  79. package/types/PaymentIntents.d.ts +35 -770
  80. package/types/PaymentIntentsResource.d.ts +4268 -8619
  81. package/types/PaymentLinks.d.ts +0 -6
  82. package/types/PaymentLinksResource.d.ts +0 -12
  83. package/types/PaymentMethodConfigurations.d.ts +0 -180
  84. package/types/PaymentMethodConfigurationsResource.d.ts +0 -250
  85. package/types/PaymentMethods.d.ts +16 -134
  86. package/types/PaymentMethodsResource.d.ts +12 -167
  87. package/types/Payouts.d.ts +0 -5
  88. package/types/PayoutsResource.d.ts +0 -5
  89. package/types/Prices.d.ts +0 -22
  90. package/types/PricesResource.d.ts +0 -22
  91. package/types/PromotionCodes.d.ts +0 -5
  92. package/types/PromotionCodesResource.d.ts +0 -10
  93. package/types/Quotes.d.ts +8 -592
  94. package/types/QuotesResource.d.ts +278 -2617
  95. package/types/Refunds.d.ts +0 -14
  96. package/types/SetupAttempts.d.ts +4 -48
  97. package/types/SetupIntents.d.ts +17 -119
  98. package/types/SetupIntentsResource.d.ts +413 -660
  99. package/types/Sources.d.ts +0 -29
  100. package/types/SubscriptionItems.d.ts +0 -30
  101. package/types/SubscriptionItemsResource.d.ts +0 -109
  102. package/types/SubscriptionSchedules.d.ts +16 -207
  103. package/types/SubscriptionSchedulesResource.d.ts +14 -1236
  104. package/types/Subscriptions.d.ts +15 -108
  105. package/types/SubscriptionsResource.d.ts +30 -402
  106. package/types/Tax/Registrations.d.ts +9 -0
  107. package/types/Tax/RegistrationsResource.d.ts +12 -0
  108. package/types/TaxIds.d.ts +0 -10
  109. package/types/TaxIdsResource.d.ts +0 -10
  110. package/types/Terminal/Configurations.d.ts +1 -0
  111. package/types/Terminal/LocationsResource.d.ts +1 -1
  112. package/types/Terminal/Readers.d.ts +6 -26
  113. package/types/Terminal/ReadersResource.d.ts +4 -4
  114. package/types/TestHelpers/ConfirmationTokensResource.d.ts +15 -128
  115. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
  116. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
  117. package/types/TokensResource.d.ts +3 -0
  118. package/types/Transfers.d.ts +0 -5
  119. package/types/TransfersResource.d.ts +0 -5
  120. package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
  121. package/types/Treasury/FinancialAccounts.d.ts +0 -5
  122. package/types/Treasury/FinancialAccountsResource.d.ts +9 -37
  123. package/types/Treasury/OutboundTransfers.d.ts +0 -26
  124. package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
  125. package/types/Treasury/ReceivedCredits.d.ts +0 -26
  126. package/types/Treasury/ReceivedDebits.d.ts +0 -31
  127. package/types/V2/EventTypes.d.ts +4 -906
  128. package/types/WebhookEndpointsResource.d.ts +2 -79
  129. package/types/index.d.ts +6 -142
  130. package/types/lib.d.ts +11 -11
  131. package/types/test/typescriptTest.ts +3 -3
  132. package/cjs/resources/AccountNotices.js +0 -21
  133. package/cjs/resources/BalanceSettings.js +0 -10
  134. package/cjs/resources/Capital/FinancingOffers.js +0 -21
  135. package/cjs/resources/Capital/FinancingSummary.js +0 -12
  136. package/cjs/resources/Capital/FinancingTransactions.js +0 -17
  137. package/cjs/resources/ExternalAccounts.js +0 -23
  138. package/cjs/resources/FinancialConnections/Institutions.js +0 -17
  139. package/cjs/resources/FxQuotes.js +0 -15
  140. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
  141. package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
  142. package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
  143. package/cjs/resources/Margins.js +0 -22
  144. package/cjs/resources/Orders.js +0 -24
  145. package/cjs/resources/PaymentRecords.js +0 -29
  146. package/cjs/resources/Privacy/RedactionJobs.js +0 -42
  147. package/cjs/resources/Tax/Associations.js +0 -9
  148. package/cjs/resources/Tax/Forms.js +0 -20
  149. package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
  150. package/cjs/resources/V2/Core/AccountLinks.js +0 -9
  151. package/cjs/resources/V2/Core/Accounts/Persons.js +0 -29
  152. package/cjs/resources/V2/Core/Accounts.js +0 -25
  153. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -28
  154. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -24
  155. package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
  156. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -17
  157. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
  158. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
  159. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -16
  160. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
  161. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
  162. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
  163. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
  164. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
  165. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
  166. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
  167. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
  168. package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
  169. package/cjs/resources/V2/Payments/OffSessionPayments.js +0 -25
  170. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
  171. package/esm/resources/AccountNotices.js +0 -18
  172. package/esm/resources/BalanceSettings.js +0 -7
  173. package/esm/resources/Capital/FinancingOffers.js +0 -18
  174. package/esm/resources/Capital/FinancingSummary.js +0 -9
  175. package/esm/resources/Capital/FinancingTransactions.js +0 -14
  176. package/esm/resources/ExternalAccounts.js +0 -20
  177. package/esm/resources/FinancialConnections/Institutions.js +0 -14
  178. package/esm/resources/FxQuotes.js +0 -12
  179. package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
  180. package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
  181. package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
  182. package/esm/resources/Margins.js +0 -19
  183. package/esm/resources/Orders.js +0 -21
  184. package/esm/resources/PaymentRecords.js +0 -26
  185. package/esm/resources/Privacy/RedactionJobs.js +0 -39
  186. package/esm/resources/Tax/Associations.js +0 -6
  187. package/esm/resources/Tax/Forms.js +0 -17
  188. package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
  189. package/esm/resources/V2/Core/AccountLinks.js +0 -6
  190. package/esm/resources/V2/Core/Accounts/Persons.js +0 -26
  191. package/esm/resources/V2/Core/Accounts.js +0 -22
  192. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -25
  193. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -21
  194. package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
  195. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -14
  196. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
  197. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
  198. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -13
  199. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
  200. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
  201. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
  202. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
  203. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
  204. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
  205. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
  206. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
  207. package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
  208. package/esm/resources/V2/Payments/OffSessionPayments.js +0 -22
  209. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
  210. package/types/AccountNotices.d.ts +0 -113
  211. package/types/AccountNoticesResource.d.ts +0 -98
  212. package/types/BalanceSettings.d.ts +0 -89
  213. package/types/BalanceSettingsResource.d.ts +0 -108
  214. package/types/Capital/FinancingOffers.d.ts +0 -188
  215. package/types/Capital/FinancingOffersResource.d.ts +0 -97
  216. package/types/Capital/FinancingSummary.d.ts +0 -106
  217. package/types/Capital/FinancingSummaryResource.d.ts +0 -27
  218. package/types/Capital/FinancingTransactions.d.ts +0 -135
  219. package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
  220. package/types/ExternalAccountsResource.d.ts +0 -304
  221. package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
  222. package/types/FinancialConnections/Institutions.d.ts +0 -98
  223. package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
  224. package/types/FxQuotes.d.ts +0 -153
  225. package/types/FxQuotesResource.d.ts +0 -130
  226. package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
  227. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
  228. package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
  229. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
  230. package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
  231. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
  232. package/types/Issuing/Settlements.d.ts +0 -113
  233. package/types/Margins.d.ts +0 -56
  234. package/types/MarginsResource.d.ts +0 -114
  235. package/types/Orders.d.ts +0 -1159
  236. package/types/OrdersResource.d.ts +0 -2967
  237. package/types/PaymentAttemptRecords.d.ts +0 -2132
  238. package/types/PaymentAttemptRecordsResource.d.ts +0 -47
  239. package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -116
  240. package/types/PaymentRecords.d.ts +0 -2125
  241. package/types/PaymentRecordsResource.d.ts +0 -455
  242. package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -60
  243. package/types/Privacy/RedactionJobs.d.ts +0 -111
  244. package/types/Privacy/RedactionJobsResource.d.ts +0 -230
  245. package/types/QuoteLines.d.ts +0 -634
  246. package/types/QuotePreviewInvoices.d.ts +0 -1695
  247. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -831
  248. package/types/Tax/Associations.d.ts +0 -82
  249. package/types/Tax/AssociationsResource.d.ts +0 -29
  250. package/types/Tax/Forms.d.ts +0 -220
  251. package/types/Tax/FormsResource.d.ts +0 -107
  252. package/types/Terminal/ReaderCollectedData.d.ts +0 -51
  253. package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
  254. package/types/V2/Core/AccountLinks.d.ts +0 -106
  255. package/types/V2/Core/AccountLinksResource.d.ts +0 -90
  256. package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3770
  257. package/types/V2/Core/Accounts.d.ts +0 -8169
  258. package/types/V2/Core/AccountsResource.d.ts +0 -10203
  259. package/types/V2/Core/Persons.d.ts +0 -1867
  260. package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -160
  261. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
  262. package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -70
  263. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
  264. package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -27
  265. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -32
  266. package/types/V2/MoneyManagement/Adjustments.d.ts +0 -110
  267. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
  268. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -546
  269. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -52
  270. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -314
  271. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -288
  272. package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -206
  273. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
  274. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -168
  275. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -115
  276. package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -278
  277. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
  278. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -97
  279. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
  280. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -251
  281. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -207
  282. package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -151
  283. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
  284. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +0 -87
  285. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
  286. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -243
  287. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
  288. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -176
  289. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
  290. package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -155
  291. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
  292. package/types/V2/MoneyManagement/Transactions.d.ts +0 -170
  293. package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
  294. package/types/V2/Payments/OffSessionPayments.d.ts +0 -167
  295. package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -159
  296. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -66
package/types/Quotes.d.ts CHANGED
@@ -17,11 +17,6 @@ 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
-
25
20
  /**
26
21
  * Total before any discounts or taxes are applied.
27
22
  */
@@ -75,11 +70,6 @@ declare module 'stripe' {
75
70
  */
76
71
  customer: string | Stripe.Customer | Stripe.DeletedCustomer | null;
77
72
 
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
-
83
73
  /**
84
74
  * The tax rates applied to this quote.
85
75
  */
@@ -127,11 +117,6 @@ declare module 'stripe' {
127
117
  */
128
118
  line_items?: ApiList<Stripe.LineItem>;
129
119
 
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
-
135
120
  /**
136
121
  * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
137
122
  */
@@ -157,11 +142,6 @@ declare module 'stripe' {
157
142
  */
158
143
  status: Quote.Status;
159
144
 
160
- /**
161
- * Details on when and why a quote has been marked as stale or canceled.
162
- */
163
- status_details?: Quote.StatusDetails | null;
164
-
165
145
  status_transitions: Quote.StatusTransitions;
166
146
 
167
147
  /**
@@ -171,23 +151,11 @@ declare module 'stripe' {
171
151
 
172
152
  subscription_data: Quote.SubscriptionData;
173
153
 
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
-
181
154
  /**
182
155
  * The subscription schedule that was created or updated from this quote.
183
156
  */
184
157
  subscription_schedule: string | Stripe.SubscriptionSchedule | null;
185
158
 
186
- /**
187
- * The subscription schedules that were created or updated from this quote.
188
- */
189
- subscription_schedules?: Array<Quote.SubscriptionSchedule> | null;
190
-
191
159
  /**
192
160
  * ID of the test clock this quote belongs to.
193
161
  */
@@ -247,62 +215,15 @@ declare module 'stripe' {
247
215
  type CollectionMethod = 'charge_automatically' | 'send_invoice';
248
216
 
249
217
  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
-
255
218
  /**
256
219
  * 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.
257
220
  */
258
221
  recurring: Computed.Recurring | null;
259
222
 
260
- /**
261
- * The time at which the quote's estimated schedules and upcoming invoices were generated.
262
- */
263
- updated_at?: number | null;
264
-
265
223
  upfront: Computed.Upfront;
266
224
  }
267
225
 
268
226
  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
-
306
227
  interface Recurring {
307
228
  /**
308
229
  * Total before any discounts or taxes are applied.
@@ -578,153 +499,7 @@ declare module 'stripe' {
578
499
  }
579
500
  }
580
501
 
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
- }
502
+ type Status = 'accepted' | 'canceled' | 'draft' | 'open';
728
503
 
729
504
  interface StatusTransitions {
730
505
  /**
@@ -745,24 +520,9 @@ declare module 'stripe' {
745
520
 
746
521
  interface SubscriptionData {
747
522
  /**
748
- * Describes the period to bill for upon accepting the quote.
523
+ * The billing mode of the quote.
749
524
  */
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
-
762
- /**
763
- * The [billing mode](https://docs.stripe.com/api/subscriptions/create#create_subscription-billing_mode) that will be set on the subscription once the quote is accepted.
764
- */
765
- billing_mode?: SubscriptionData.BillingMode;
525
+ billing_mode: SubscriptionData.BillingMode;
766
526
 
767
527
  /**
768
528
  * 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.
@@ -774,31 +534,11 @@ declare module 'stripe' {
774
534
  */
775
535
  effective_date: number | null;
776
536
 
777
- /**
778
- * Behavior of the subscription schedule and underlying subscription when it ends.
779
- */
780
- end_behavior?: SubscriptionData.EndBehavior | null;
781
-
782
- /**
783
- * The id of the subscription that will be updated when the quote is accepted.
784
- */
785
- from_subscription?: string | Stripe.Subscription | null;
786
-
787
537
  /**
788
538
  * 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.
789
539
  */
790
540
  metadata: Stripe.Metadata | null;
791
541
 
792
- /**
793
- * If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
794
- */
795
- prebilling?: SubscriptionData.Prebilling | null;
796
-
797
- /**
798
- * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
799
- */
800
- proration_behavior?: SubscriptionData.ProrationBehavior;
801
-
802
542
  /**
803
543
  * Integer representing the number of trial period days before the customer is charged for the first time.
804
544
  */
@@ -806,339 +546,15 @@ declare module 'stripe' {
806
546
  }
807
547
 
808
548
  namespace SubscriptionData {
809
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
810
-
811
- type BillingMode = 'classic' | 'flexible';
812
-
813
- interface BillOnAcceptance {
814
- /**
815
- * The start of the period to bill from when the Quote is accepted.
816
- */
817
- bill_from: BillOnAcceptance.BillFrom | null;
818
-
819
- /**
820
- * The end of the period to bill until when the Quote is accepted.
821
- */
822
- bill_until: BillOnAcceptance.BillUntil | null;
823
- }
824
-
825
- namespace BillOnAcceptance {
826
- interface BillFrom {
827
- /**
828
- * The materialized time.
829
- */
830
- computed: number | null;
831
-
832
- /**
833
- * The timestamp the given line starts at.
834
- */
835
- line_starts_at: BillFrom.LineStartsAt | null;
836
-
837
- /**
838
- * A precise Unix timestamp.
839
- */
840
- timestamp: number | null;
841
-
842
- /**
843
- * The type of method to specify the `bill_from` time.
844
- */
845
- type: BillFrom.Type;
846
- }
847
-
848
- namespace BillFrom {
849
- interface LineStartsAt {
850
- /**
851
- * Unique identifier for the object.
852
- */
853
- id: string;
854
- }
855
-
856
- type Type =
857
- | 'line_starts_at'
858
- | 'now'
859
- | 'pause_collection_start'
860
- | 'quote_acceptance_date'
861
- | 'timestamp';
862
- }
863
-
864
- interface BillUntil {
865
- /**
866
- * The materialized time.
867
- */
868
- computed: number | null;
869
-
870
- /**
871
- * Time span for the quote line starting from the `starts_at` date.
872
- */
873
- duration: BillUntil.Duration | null;
874
-
875
- /**
876
- * The timestamp the given line ends at.
877
- */
878
- line_ends_at: BillUntil.LineEndsAt | null;
879
-
880
- /**
881
- * A precise Unix timestamp.
882
- */
883
- timestamp: number | null;
884
-
885
- /**
886
- * The type of method to specify the `bill_until` time.
887
- */
888
- type: BillUntil.Type;
889
- }
890
-
891
- namespace BillUntil {
892
- interface Duration {
893
- /**
894
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
895
- */
896
- interval: Duration.Interval;
897
-
898
- /**
899
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
900
- */
901
- interval_count: number;
902
- }
903
-
904
- namespace Duration {
905
- type Interval = 'day' | 'month' | 'week' | 'year';
906
- }
907
-
908
- interface LineEndsAt {
909
- /**
910
- * Unique identifier for the object.
911
- */
912
- id: string;
913
- }
914
-
915
- type Type =
916
- | 'duration'
917
- | 'line_ends_at'
918
- | 'schedule_end'
919
- | 'timestamp'
920
- | 'upcoming_invoice';
921
- }
922
- }
923
-
924
- type EndBehavior = 'cancel' | 'release';
925
-
926
- interface Prebilling {
927
- iterations: number;
928
- }
929
-
930
- type ProrationBehavior =
931
- | 'always_invoice'
932
- | 'create_prorations'
933
- | 'none';
934
- }
935
-
936
- interface SubscriptionDataOverride {
937
- applies_to: SubscriptionDataOverride.AppliesTo;
938
-
939
- /**
940
- * Describes the period to bill for upon accepting the quote.
941
- */
942
- bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance | null;
943
-
944
- /**
945
- * 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.
946
- */
947
- billing_behavior?: SubscriptionDataOverride.BillingBehavior;
948
-
949
- /**
950
- * The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
951
- */
952
- customer: string | null;
953
-
954
- /**
955
- * 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.
956
- */
957
- description: string | null;
958
-
959
- /**
960
- * Behavior of the subscription schedule and underlying subscription when it ends.
961
- */
962
- end_behavior?: SubscriptionDataOverride.EndBehavior | null;
963
-
964
- /**
965
- * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
966
- */
967
- proration_behavior?: SubscriptionDataOverride.ProrationBehavior | null;
968
- }
969
-
970
- namespace SubscriptionDataOverride {
971
- interface AppliesTo {
972
- /**
973
- * 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.
974
- */
975
- new_reference: string | null;
976
-
977
- /**
978
- * The ID of the schedule the line applies to.
979
- */
980
- subscription_schedule: string | null;
981
-
982
- /**
983
- * Describes whether the quote line is affecting a new schedule or an existing schedule.
984
- */
985
- type: AppliesTo.Type;
986
- }
987
-
988
- namespace AppliesTo {
989
- type Type = 'new_reference' | 'subscription_schedule';
990
- }
991
-
992
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
993
-
994
- interface BillOnAcceptance {
995
- /**
996
- * The start of the period to bill from when the Quote is accepted.
997
- */
998
- bill_from: BillOnAcceptance.BillFrom | null;
999
-
1000
- /**
1001
- * The end of the period to bill until when the Quote is accepted.
1002
- */
1003
- bill_until: BillOnAcceptance.BillUntil | null;
1004
- }
1005
-
1006
- namespace BillOnAcceptance {
1007
- interface BillFrom {
1008
- /**
1009
- * The materialized time.
1010
- */
1011
- computed: number | null;
1012
-
1013
- /**
1014
- * The timestamp the given line starts at.
1015
- */
1016
- line_starts_at: BillFrom.LineStartsAt | null;
1017
-
1018
- /**
1019
- * A precise Unix timestamp.
1020
- */
1021
- timestamp: number | null;
1022
-
1023
- /**
1024
- * The type of method to specify the `bill_from` time.
1025
- */
1026
- type: BillFrom.Type;
1027
- }
1028
-
1029
- namespace BillFrom {
1030
- interface LineStartsAt {
1031
- /**
1032
- * Unique identifier for the object.
1033
- */
1034
- id: string;
1035
- }
1036
-
1037
- type Type =
1038
- | 'line_starts_at'
1039
- | 'now'
1040
- | 'pause_collection_start'
1041
- | 'quote_acceptance_date'
1042
- | 'timestamp';
1043
- }
1044
-
1045
- interface BillUntil {
1046
- /**
1047
- * The materialized time.
1048
- */
1049
- computed: number | null;
1050
-
1051
- /**
1052
- * Time span for the quote line starting from the `starts_at` date.
1053
- */
1054
- duration: BillUntil.Duration | null;
1055
-
1056
- /**
1057
- * The timestamp the given line ends at.
1058
- */
1059
- line_ends_at: BillUntil.LineEndsAt | null;
1060
-
1061
- /**
1062
- * A precise Unix timestamp.
1063
- */
1064
- timestamp: number | null;
1065
-
1066
- /**
1067
- * The type of method to specify the `bill_until` time.
1068
- */
1069
- type: BillUntil.Type;
1070
- }
1071
-
1072
- namespace BillUntil {
1073
- interface Duration {
1074
- /**
1075
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1076
- */
1077
- interval: Duration.Interval;
1078
-
1079
- /**
1080
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1081
- */
1082
- interval_count: number;
1083
- }
1084
-
1085
- namespace Duration {
1086
- type Interval = 'day' | 'month' | 'week' | 'year';
1087
- }
1088
-
1089
- interface LineEndsAt {
1090
- /**
1091
- * Unique identifier for the object.
1092
- */
1093
- id: string;
1094
- }
1095
-
1096
- type Type =
1097
- | 'duration'
1098
- | 'line_ends_at'
1099
- | 'schedule_end'
1100
- | 'timestamp'
1101
- | 'upcoming_invoice';
1102
- }
1103
- }
1104
-
1105
- type EndBehavior = 'cancel' | 'release';
1106
-
1107
- type ProrationBehavior =
1108
- | 'always_invoice'
1109
- | 'create_prorations'
1110
- | 'none';
1111
- }
1112
-
1113
- interface SubscriptionSchedule {
1114
- applies_to: SubscriptionSchedule.AppliesTo;
1115
-
1116
- /**
1117
- * The subscription schedule that was created or updated from this quote.
1118
- */
1119
- subscription_schedule: string;
1120
- }
1121
-
1122
- namespace SubscriptionSchedule {
1123
- interface AppliesTo {
1124
- /**
1125
- * 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.
1126
- */
1127
- new_reference: string | null;
1128
-
1129
- /**
1130
- * The ID of the schedule the line applies to.
1131
- */
1132
- subscription_schedule: string | null;
1133
-
549
+ interface BillingMode {
1134
550
  /**
1135
- * Describes whether the quote line is affecting a new schedule or an existing schedule.
551
+ * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1136
552
  */
1137
- type: AppliesTo.Type;
553
+ type: BillingMode.Type;
1138
554
  }
1139
555
 
1140
- namespace AppliesTo {
1141
- type Type = 'new_reference' | 'subscription_schedule';
556
+ namespace BillingMode {
557
+ type Type = 'classic' | 'flexible';
1142
558
  }
1143
559
  }
1144
560