stripe 18.1.0-beta.3 → 18.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/CHANGELOG.md +154 -1208
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +11 -12
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +3 -93
  6. package/cjs/RequestSender.js +5 -9
  7. package/cjs/StripeResource.js +1 -1
  8. package/cjs/Webhooks.js +6 -2
  9. package/cjs/apiVersion.js +1 -1
  10. package/cjs/net/FetchHttpClient.js +3 -4
  11. package/cjs/resources/FinancialConnections/Accounts.js +0 -5
  12. package/cjs/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +4 -4
  13. package/cjs/resources/Invoices.js +0 -4
  14. package/cjs/resources/PaymentIntents.js +0 -13
  15. package/cjs/resources/Quotes.js +0 -32
  16. package/cjs/resources/SubscriptionSchedules.js +0 -4
  17. package/cjs/resources/Terminal/Readers.js +0 -12
  18. package/cjs/resources/TestHelpers/Terminal/Readers.js +0 -8
  19. package/cjs/resources.js +18 -108
  20. package/cjs/stripe.core.js +2 -4
  21. package/cjs/utils.js +33 -4
  22. package/esm/Error.js +2 -81
  23. package/esm/RequestSender.js +6 -10
  24. package/esm/StripeResource.js +1 -1
  25. package/esm/Webhooks.js +6 -2
  26. package/esm/apiVersion.js +1 -1
  27. package/esm/net/FetchHttpClient.js +3 -4
  28. package/esm/resources/FinancialConnections/Accounts.js +0 -5
  29. package/esm/resources/{PaymentAttemptRecords.js → InvoicePayments.js} +3 -3
  30. package/esm/resources/Invoices.js +0 -4
  31. package/esm/resources/PaymentIntents.js +0 -13
  32. package/esm/resources/Quotes.js +0 -32
  33. package/esm/resources/SubscriptionSchedules.js +0 -4
  34. package/esm/resources/Terminal/Readers.js +0 -12
  35. package/esm/resources/TestHelpers/Terminal/Readers.js +0 -8
  36. package/esm/resources.js +1 -84
  37. package/esm/stripe.core.js +2 -4
  38. package/esm/utils.js +29 -3
  39. package/package.json +12 -3
  40. package/types/AccountLinksResource.d.ts +1 -5
  41. package/types/AccountSessions.d.ts +0 -45
  42. package/types/AccountSessionsResource.d.ts +0 -300
  43. package/types/Accounts.d.ts +1 -212
  44. package/types/AccountsResource.d.ts +2 -546
  45. package/types/Billing/CreditBalanceSummary.d.ts +0 -5
  46. package/types/Billing/CreditBalanceSummaryResource.d.ts +3 -8
  47. package/types/Billing/CreditBalanceTransactionsResource.d.ts +4 -12
  48. package/types/Billing/CreditGrants.d.ts +0 -5
  49. package/types/Billing/CreditGrantsResource.d.ts +1 -11
  50. package/types/BillingPortal/Sessions.d.ts +0 -5
  51. package/types/BillingPortal/SessionsResource.d.ts +4 -12
  52. package/types/Cards.d.ts +0 -5
  53. package/types/CashBalances.d.ts +0 -5
  54. package/types/Charges.d.ts +0 -166
  55. package/types/ChargesResource.d.ts +0 -1314
  56. package/types/Checkout/Sessions.d.ts +13 -306
  57. package/types/Checkout/SessionsResource.d.ts +1 -333
  58. package/types/ConfirmationTokens.d.ts +0 -120
  59. package/types/Coupons.d.ts +0 -33
  60. package/types/CouponsResource.d.ts +0 -21
  61. package/types/CreditNoteLineItems.d.ts +0 -17
  62. package/types/CreditNotes.d.ts +0 -9
  63. package/types/CreditNotesResource.d.ts +0 -5
  64. package/types/CustomerBalanceTransactions.d.ts +0 -2
  65. package/types/CustomerCashBalanceTransactions.d.ts +0 -2
  66. package/types/CustomerSessions.d.ts +0 -5
  67. package/types/CustomerSessionsResource.d.ts +1 -6
  68. package/types/Customers.d.ts +0 -2
  69. package/types/CustomersResource.d.ts +23 -11
  70. package/types/Discounts.d.ts +0 -10
  71. package/types/Errors.d.ts +2 -69
  72. package/types/EventTypes.d.ts +0 -698
  73. package/types/Events.d.ts +1 -100
  74. package/types/FinancialConnections/Accounts.d.ts +1 -31
  75. package/types/FinancialConnections/AccountsResource.d.ts +3 -40
  76. package/types/FinancialConnections/Sessions.d.ts +1 -51
  77. package/types/FinancialConnections/SessionsResource.d.ts +1 -43
  78. package/types/Identity/VerificationSessions.d.ts +0 -5
  79. package/types/Identity/VerificationSessionsResource.d.ts +0 -7
  80. package/types/InvoiceItems.d.ts +0 -10
  81. package/types/InvoiceItemsResource.d.ts +6 -117
  82. package/types/InvoiceLineItems.d.ts +2 -46
  83. package/types/InvoicePayments.d.ts +0 -5
  84. package/types/InvoicePaymentsResource.d.ts +74 -0
  85. package/types/Invoices.d.ts +15 -138
  86. package/types/InvoicesResource.d.ts +15 -1471
  87. package/types/Issuing/CardholdersResource.d.ts +1 -2
  88. package/types/Issuing/Transactions.d.ts +0 -5
  89. package/types/Issuing/TransactionsResource.d.ts +0 -5
  90. package/types/LineItems.d.ts +0 -49
  91. package/types/Mandates.d.ts +0 -77
  92. package/types/PaymentIntents.d.ts +2 -728
  93. package/types/PaymentIntentsResource.d.ts +3955 -8479
  94. package/types/PaymentLinks.d.ts +0 -6
  95. package/types/PaymentLinksResource.d.ts +0 -12
  96. package/types/PaymentMethodConfigurations.d.ts +0 -180
  97. package/types/PaymentMethodConfigurationsResource.d.ts +0 -250
  98. package/types/PaymentMethods.d.ts +0 -120
  99. package/types/PaymentMethodsResource.d.ts +2 -167
  100. package/types/Payouts.d.ts +0 -5
  101. package/types/PayoutsResource.d.ts +0 -5
  102. package/types/Prices.d.ts +0 -22
  103. package/types/PricesResource.d.ts +0 -22
  104. package/types/Products.d.ts +0 -39
  105. package/types/ProductsResource.d.ts +0 -36
  106. package/types/PromotionCodes.d.ts +0 -5
  107. package/types/PromotionCodesResource.d.ts +0 -10
  108. package/types/Quotes.d.ts +2 -597
  109. package/types/QuotesResource.d.ts +224 -2571
  110. package/types/Refunds.d.ts +0 -14
  111. package/types/SetupAttempts.d.ts +1 -50
  112. package/types/SetupIntents.d.ts +2 -121
  113. package/types/SetupIntentsResource.d.ts +3 -730
  114. package/types/Sources.d.ts +0 -29
  115. package/types/SubscriptionItems.d.ts +0 -23
  116. package/types/SubscriptionItemsResource.d.ts +0 -109
  117. package/types/SubscriptionSchedules.d.ts +0 -205
  118. package/types/SubscriptionSchedulesResource.d.ts +8 -1236
  119. package/types/Subscriptions.d.ts +1 -97
  120. package/types/SubscriptionsResource.d.ts +9 -391
  121. package/types/Tax/Calculations.d.ts +11 -1
  122. package/types/Tax/CalculationsResource.d.ts +11 -1
  123. package/types/Tax/Registrations.d.ts +27 -0
  124. package/types/Tax/RegistrationsResource.d.ts +36 -0
  125. package/types/Tax/Transactions.d.ts +11 -1
  126. package/types/TaxIds.d.ts +11 -11
  127. package/types/TaxIdsResource.d.ts +11 -11
  128. package/types/Terminal/Readers.d.ts +0 -300
  129. package/types/Terminal/ReadersResource.d.ts +0 -220
  130. package/types/TestHelpers/ConfirmationTokensResource.d.ts +7 -127
  131. package/types/TestHelpers/Terminal/ReadersResource.d.ts +0 -53
  132. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
  133. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
  134. package/types/Transfers.d.ts +0 -5
  135. package/types/TransfersResource.d.ts +0 -5
  136. package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
  137. package/types/Treasury/FinancialAccounts.d.ts +0 -5
  138. package/types/Treasury/FinancialAccountsResource.d.ts +0 -37
  139. package/types/Treasury/OutboundPaymentsResource.d.ts +0 -5
  140. package/types/Treasury/OutboundTransfers.d.ts +0 -26
  141. package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
  142. package/types/Treasury/ReceivedCredits.d.ts +0 -26
  143. package/types/Treasury/ReceivedDebits.d.ts +0 -31
  144. package/types/V2/EventTypes.d.ts +7 -677
  145. package/types/WebhookEndpointsResource.d.ts +4 -85
  146. package/types/index.d.ts +5 -146
  147. package/types/lib.d.ts +1 -11
  148. package/types/test/typescriptTest.ts +3 -3
  149. package/cjs/resources/AccountNotices.js +0 -21
  150. package/cjs/resources/BalanceSettings.js +0 -10
  151. package/cjs/resources/Capital/FinancingOffers.js +0 -21
  152. package/cjs/resources/Capital/FinancingSummary.js +0 -12
  153. package/cjs/resources/Capital/FinancingTransactions.js +0 -17
  154. package/cjs/resources/ExternalAccounts.js +0 -23
  155. package/cjs/resources/FinancialConnections/Institutions.js +0 -17
  156. package/cjs/resources/FxQuotes.js +0 -15
  157. package/cjs/resources/GiftCards/Cards.js +0 -23
  158. package/cjs/resources/GiftCards/Transactions.js +0 -33
  159. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
  160. package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
  161. package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
  162. package/cjs/resources/Margins.js +0 -22
  163. package/cjs/resources/Orders.js +0 -24
  164. package/cjs/resources/PaymentRecords.js +0 -29
  165. package/cjs/resources/Privacy/RedactionJobs.js +0 -46
  166. package/cjs/resources/Tax/Associations.js +0 -9
  167. package/cjs/resources/Tax/Forms.js +0 -20
  168. package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
  169. package/cjs/resources/V2/Core/AccountLinks.js +0 -9
  170. package/cjs/resources/V2/Core/Accounts/Persons.js +0 -29
  171. package/cjs/resources/V2/Core/Accounts.js +0 -25
  172. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -28
  173. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -24
  174. package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
  175. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -17
  176. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
  177. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
  178. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -12
  179. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
  180. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
  181. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
  182. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
  183. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
  184. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
  185. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
  186. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
  187. package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
  188. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
  189. package/esm/resources/AccountNotices.js +0 -18
  190. package/esm/resources/BalanceSettings.js +0 -7
  191. package/esm/resources/Capital/FinancingOffers.js +0 -18
  192. package/esm/resources/Capital/FinancingSummary.js +0 -9
  193. package/esm/resources/Capital/FinancingTransactions.js +0 -14
  194. package/esm/resources/ExternalAccounts.js +0 -20
  195. package/esm/resources/FinancialConnections/Institutions.js +0 -14
  196. package/esm/resources/FxQuotes.js +0 -12
  197. package/esm/resources/GiftCards/Cards.js +0 -20
  198. package/esm/resources/GiftCards/Transactions.js +0 -30
  199. package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
  200. package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
  201. package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
  202. package/esm/resources/Margins.js +0 -19
  203. package/esm/resources/Orders.js +0 -21
  204. package/esm/resources/PaymentRecords.js +0 -26
  205. package/esm/resources/Privacy/RedactionJobs.js +0 -43
  206. package/esm/resources/Tax/Associations.js +0 -6
  207. package/esm/resources/Tax/Forms.js +0 -17
  208. package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
  209. package/esm/resources/V2/Core/AccountLinks.js +0 -6
  210. package/esm/resources/V2/Core/Accounts/Persons.js +0 -26
  211. package/esm/resources/V2/Core/Accounts.js +0 -22
  212. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -25
  213. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -21
  214. package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
  215. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -14
  216. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
  217. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
  218. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -9
  219. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
  220. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
  221. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
  222. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
  223. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
  224. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
  225. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
  226. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
  227. package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
  228. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
  229. package/types/AccountNotices.d.ts +0 -113
  230. package/types/AccountNoticesResource.d.ts +0 -98
  231. package/types/BalanceSettings.d.ts +0 -89
  232. package/types/BalanceSettingsResource.d.ts +0 -108
  233. package/types/Billing/MeterErrorReports.d.ts +0 -106
  234. package/types/Capital/FinancingOffers.d.ts +0 -188
  235. package/types/Capital/FinancingOffersResource.d.ts +0 -97
  236. package/types/Capital/FinancingSummary.d.ts +0 -106
  237. package/types/Capital/FinancingSummaryResource.d.ts +0 -27
  238. package/types/Capital/FinancingTransactions.d.ts +0 -135
  239. package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
  240. package/types/ExternalAccountsResource.d.ts +0 -304
  241. package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
  242. package/types/FinancialConnections/Institutions.d.ts +0 -93
  243. package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
  244. package/types/FxQuotes.d.ts +0 -153
  245. package/types/FxQuotesResource.d.ts +0 -130
  246. package/types/GiftCards/Cards.d.ts +0 -118
  247. package/types/GiftCards/CardsResource.d.ts +0 -159
  248. package/types/GiftCards/Transactions.d.ts +0 -129
  249. package/types/GiftCards/TransactionsResource.d.ts +0 -201
  250. package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
  251. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
  252. package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
  253. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
  254. package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
  255. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
  256. package/types/Issuing/Settlements.d.ts +0 -113
  257. package/types/Margins.d.ts +0 -56
  258. package/types/MarginsResource.d.ts +0 -114
  259. package/types/Orders.d.ts +0 -1189
  260. package/types/OrdersResource.d.ts +0 -2981
  261. package/types/PaymentAttemptRecords.d.ts +0 -2112
  262. package/types/PaymentAttemptRecordsResource.d.ts +0 -47
  263. package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -110
  264. package/types/PaymentRecords.d.ts +0 -2105
  265. package/types/PaymentRecordsResource.d.ts +0 -455
  266. package/types/Privacy/RedactionJobRootObjects.d.ts +0 -35
  267. package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -30
  268. package/types/Privacy/RedactionJobs.d.ts +0 -43
  269. package/types/Privacy/RedactionJobsResource.d.ts +0 -240
  270. package/types/QuoteLines.d.ts +0 -634
  271. package/types/QuotePreviewInvoices.d.ts +0 -1687
  272. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -778
  273. package/types/Tax/Associations.d.ts +0 -126
  274. package/types/Tax/AssociationsResource.d.ts +0 -29
  275. package/types/Tax/Forms.d.ts +0 -220
  276. package/types/Tax/FormsResource.d.ts +0 -107
  277. package/types/Terminal/ReaderCollectedData.d.ts +0 -51
  278. package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
  279. package/types/V2/Core/AccountLinks.d.ts +0 -101
  280. package/types/V2/Core/AccountLinksResource.d.ts +0 -90
  281. package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -3760
  282. package/types/V2/Core/Accounts.d.ts +0 -8057
  283. package/types/V2/Core/AccountsResource.d.ts +0 -10184
  284. package/types/V2/Core/Persons.d.ts +0 -1857
  285. package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -155
  286. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
  287. package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -65
  288. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
  289. package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -22
  290. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -27
  291. package/types/V2/MoneyManagement/Adjustments.d.ts +0 -105
  292. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
  293. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -540
  294. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -52
  295. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -308
  296. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -287
  297. package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -201
  298. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
  299. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -141
  300. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -93
  301. package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -273
  302. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
  303. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -92
  304. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
  305. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -246
  306. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -207
  307. package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -146
  308. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
  309. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecs.d.ts +0 -82
  310. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
  311. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -280
  312. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
  313. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -219
  314. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
  315. package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -151
  316. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
  317. package/types/V2/MoneyManagement/Transactions.d.ts +0 -166
  318. package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
  319. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -66
@@ -3,11 +3,6 @@
3
3
  declare module 'stripe' {
4
4
  namespace Stripe {
5
5
  interface QuoteCreateParams {
6
- /**
7
- * Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
8
- */
9
- allow_backdated_lines?: boolean;
10
-
11
6
  /**
12
7
  * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
13
8
  */
@@ -33,11 +28,6 @@ declare module 'stripe' {
33
28
  */
34
29
  customer?: string;
35
30
 
36
- /**
37
- * The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
38
- */
39
- customer_account?: string;
40
-
41
31
  /**
42
32
  * The tax rates that will apply to any line item that does not have `tax_rates` set.
43
33
  */
@@ -88,11 +78,6 @@ declare module 'stripe' {
88
78
  */
89
79
  line_items?: Array<QuoteCreateParams.LineItem>;
90
80
 
91
- /**
92
- * 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.
93
- */
94
- lines?: Array<QuoteCreateParams.Line>;
95
-
96
81
  /**
97
82
  * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
98
83
  */
@@ -108,13 +93,6 @@ declare module 'stripe' {
108
93
  */
109
94
  subscription_data?: QuoteCreateParams.SubscriptionData;
110
95
 
111
- /**
112
- * List representing overrides for `subscription_data` configurations for specific subscription schedules.
113
- */
114
- subscription_data_overrides?: Array<
115
- QuoteCreateParams.SubscriptionDataOverride
116
- >;
117
-
118
96
  /**
119
97
  * ID of the test clock to attach to the quote.
120
98
  */
@@ -170,56 +148,12 @@ declare module 'stripe' {
170
148
  */
171
149
  discount?: string;
172
150
 
173
- /**
174
- * Details to determine how long the discount should be applied for.
175
- */
176
- discount_end?: Discount.DiscountEnd;
177
-
178
151
  /**
179
152
  * ID of the promotion code to create a new discount for.
180
153
  */
181
154
  promotion_code?: string;
182
155
  }
183
156
 
184
- namespace Discount {
185
- interface DiscountEnd {
186
- /**
187
- * Time span for the redeemed discount.
188
- */
189
- duration?: DiscountEnd.Duration;
190
-
191
- /**
192
- * A precise Unix timestamp for the discount to end. Must be in the future.
193
- */
194
- timestamp?: number;
195
-
196
- /**
197
- * The type of calculation made to determine when the discount ends.
198
- */
199
- type: DiscountEnd.Type;
200
- }
201
-
202
- namespace DiscountEnd {
203
- interface Duration {
204
- /**
205
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
206
- */
207
- interval: Duration.Interval;
208
-
209
- /**
210
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
211
- */
212
- interval_count: number;
213
- }
214
-
215
- namespace Duration {
216
- type Interval = 'day' | 'month' | 'week' | 'year';
217
- }
218
-
219
- type Type = 'duration' | 'timestamp';
220
- }
221
- }
222
-
223
157
  interface FromQuote {
224
158
  /**
225
159
  * Whether this quote is a revision of the previous quote.
@@ -262,2038 +196,320 @@ declare module 'stripe' {
262
196
  }
263
197
  }
264
198
 
265
- interface Line {
266
- /**
267
- * An array of operations the quote line performs.
268
- */
269
- actions?: Array<Line.Action>;
270
-
271
- /**
272
- * Details to identify the subscription schedule the quote line applies to.
273
- */
274
- applies_to?: Line.AppliesTo;
275
-
276
- /**
277
- * For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
278
- */
279
- billing_cycle_anchor?: Line.BillingCycleAnchor;
280
-
281
- /**
282
- * A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
283
- */
284
- cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
285
-
286
- /**
287
- * Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
288
- */
289
- ends_at?: Line.EndsAt;
290
-
199
+ interface LineItem {
291
200
  /**
292
- * Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
201
+ * The discounts applied to this line item.
293
202
  */
294
- proration_behavior?: Line.ProrationBehavior;
203
+ discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
295
204
 
296
205
  /**
297
- * Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
206
+ * The ID of the price object. One of `price` or `price_data` is required.
298
207
  */
299
- set_pause_collection?: Line.SetPauseCollection;
208
+ price?: string;
300
209
 
301
210
  /**
302
- * Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
211
+ * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
303
212
  */
304
- set_schedule_end?: Line.SetScheduleEnd;
213
+ price_data?: LineItem.PriceData;
305
214
 
306
215
  /**
307
- * Details to identify the earliest timestamp where the proposed change should take effect.
216
+ * The quantity of the line item.
308
217
  */
309
- starts_at?: Line.StartsAt;
218
+ quantity?: number;
310
219
 
311
220
  /**
312
- * Settings related to subscription trials.
221
+ * The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
313
222
  */
314
- trial_settings?: Line.TrialSettings;
223
+ tax_rates?: Stripe.Emptyable<Array<string>>;
315
224
  }
316
225
 
317
- namespace Line {
318
- interface Action {
319
- /**
320
- * Details for the `add_discount` type.
321
- */
322
- add_discount?: Action.AddDiscount;
323
-
226
+ namespace LineItem {
227
+ interface Discount {
324
228
  /**
325
- * Details for the `add_item` type.
229
+ * ID of the coupon to create a new discount for.
326
230
  */
327
- add_item?: Action.AddItem;
231
+ coupon?: string;
328
232
 
329
233
  /**
330
- * Details for the `add_metadata` type: specify a hash of key-value pairs.
234
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
331
235
  */
332
- add_metadata?: {
333
- [key: string]: string;
334
- };
236
+ discount?: string;
335
237
 
336
238
  /**
337
- * Details for the `remove_discount` type.
239
+ * ID of the promotion code to create a new discount for.
338
240
  */
339
- remove_discount?: Action.RemoveDiscount;
241
+ promotion_code?: string;
242
+ }
340
243
 
244
+ interface PriceData {
341
245
  /**
342
- * Details for the `remove_item` type.
246
+ * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
343
247
  */
344
- remove_item?: Action.RemoveItem;
248
+ currency: string;
345
249
 
346
250
  /**
347
- * Details for the `remove_metadata` type: specify an array of metadata keys.
251
+ * The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
348
252
  */
349
- remove_metadata?: Array<string>;
253
+ product: string;
350
254
 
351
255
  /**
352
- * Details for the `set_discounts` type.
256
+ * The recurring components of a price such as `interval` and `interval_count`.
353
257
  */
354
- set_discounts?: Array<Action.SetDiscount>;
258
+ recurring?: PriceData.Recurring;
355
259
 
356
260
  /**
357
- * Details for the `set_items` type.
261
+ * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
358
262
  */
359
- set_items?: Array<Action.SetItem>;
263
+ tax_behavior?: PriceData.TaxBehavior;
360
264
 
361
265
  /**
362
- * Details for the `set_metadata` type: specify an array of key-value pairs.
266
+ * A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
363
267
  */
364
- set_metadata?: Stripe.Emptyable<{
365
- [key: string]: string;
366
- }>;
268
+ unit_amount?: number;
367
269
 
368
270
  /**
369
- * The type of action the quote line performs.
271
+ * Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
370
272
  */
371
- type: Action.Type;
273
+ unit_amount_decimal?: string;
372
274
  }
373
275
 
374
- namespace Action {
375
- interface AddDiscount {
376
- /**
377
- * The coupon code to redeem.
378
- */
379
- coupon?: string;
380
-
381
- /**
382
- * An ID of an existing discount for a coupon that was already redeemed.
383
- */
384
- discount?: string;
385
-
386
- /**
387
- * Details to determine how long the discount should be applied for.
388
- */
389
- discount_end?: AddDiscount.DiscountEnd;
390
-
276
+ namespace PriceData {
277
+ interface Recurring {
391
278
  /**
392
- * The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
279
+ * Specifies billing frequency. Either `day`, `week`, `month` or `year`.
393
280
  */
394
- index?: number;
281
+ interval: Recurring.Interval;
395
282
 
396
283
  /**
397
- * The promotion code to redeem.
284
+ * The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
398
285
  */
399
- promotion_code?: string;
286
+ interval_count?: number;
400
287
  }
401
288
 
402
- namespace AddDiscount {
403
- interface DiscountEnd {
404
- /**
405
- * The type of calculation made to determine when the discount ends.
406
- */
407
- type: 'line_ends_at';
408
- }
289
+ namespace Recurring {
290
+ type Interval = 'day' | 'month' | 'week' | 'year';
409
291
  }
410
292
 
411
- interface AddItem {
412
- /**
413
- * The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
414
- */
415
- discounts?: Array<AddItem.Discount>;
416
-
417
- /**
418
- * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
419
- */
420
- metadata?: Stripe.MetadataParam;
293
+ type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
294
+ }
295
+ }
421
296
 
422
- /**
423
- * The ID of the price object.
424
- */
425
- price: string;
297
+ interface SubscriptionData {
298
+ /**
299
+ * 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.
300
+ */
301
+ description?: string;
426
302
 
427
- /**
428
- * Quantity for this item.
429
- */
430
- quantity?: number;
303
+ /**
304
+ * When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
305
+ */
306
+ effective_date?: Stripe.Emptyable<'current_period_end' | number>;
431
307
 
432
- /**
433
- * The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
434
- */
435
- tax_rates?: Array<string>;
308
+ /**
309
+ * 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.
310
+ */
311
+ metadata?: Stripe.MetadataParam;
436
312
 
437
- /**
438
- * Options that configure the trial on the subscription item.
439
- */
440
- trial?: AddItem.Trial;
441
- }
313
+ /**
314
+ * Integer representing the number of trial period days before the customer is charged for the first time.
315
+ */
316
+ trial_period_days?: Stripe.Emptyable<number>;
317
+ }
442
318
 
443
- namespace AddItem {
444
- interface Discount {
445
- /**
446
- * ID of the coupon to create a new discount for.
447
- */
448
- coupon?: string;
449
-
450
- /**
451
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
452
- */
453
- discount?: string;
454
-
455
- /**
456
- * Details to determine how long the discount should be applied for.
457
- */
458
- discount_end?: Discount.DiscountEnd;
459
-
460
- /**
461
- * ID of the promotion code to create a new discount for.
462
- */
463
- promotion_code?: string;
464
- }
465
-
466
- namespace Discount {
467
- interface DiscountEnd {
468
- /**
469
- * Time span for the redeemed discount.
470
- */
471
- duration?: DiscountEnd.Duration;
472
-
473
- /**
474
- * A precise Unix timestamp for the discount to end. Must be in the future.
475
- */
476
- timestamp?: number;
477
-
478
- /**
479
- * The type of calculation made to determine when the discount ends.
480
- */
481
- type: DiscountEnd.Type;
482
- }
483
-
484
- namespace DiscountEnd {
485
- interface Duration {
486
- /**
487
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
488
- */
489
- interval: Duration.Interval;
490
-
491
- /**
492
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
493
- */
494
- interval_count: number;
495
- }
496
-
497
- namespace Duration {
498
- type Interval = 'day' | 'month' | 'week' | 'year';
499
- }
500
-
501
- type Type = 'duration' | 'timestamp';
502
- }
503
- }
504
-
505
- interface Trial {
506
- /**
507
- * List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
508
- */
509
- converts_to?: Array<string>;
510
-
511
- /**
512
- * Determines the type of trial for this item.
513
- */
514
- type: Trial.Type;
515
- }
516
-
517
- namespace Trial {
518
- type Type = 'free' | 'paid';
519
- }
520
- }
319
+ interface TransferData {
320
+ /**
321
+ * The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
322
+ */
323
+ amount?: number;
521
324
 
522
- interface RemoveDiscount {
523
- /**
524
- * The coupon code to remove from the `discounts` array.
525
- */
526
- coupon?: string;
325
+ /**
326
+ * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
327
+ */
328
+ amount_percent?: number;
527
329
 
528
- /**
529
- * The ID of a discount to remove from the `discounts` array.
530
- */
531
- discount?: string;
330
+ /**
331
+ * ID of an existing, connected Stripe account.
332
+ */
333
+ destination: string;
334
+ }
335
+ }
532
336
 
533
- /**
534
- * The ID of a promotion code to remove from the `discounts` array.
535
- */
536
- promotion_code?: string;
537
- }
337
+ interface QuoteRetrieveParams {
338
+ /**
339
+ * Specifies which fields in the response should be expanded.
340
+ */
341
+ expand?: Array<string>;
342
+ }
538
343
 
539
- interface RemoveItem {
540
- /**
541
- * ID of a price to remove.
542
- */
543
- price: string;
544
- }
344
+ interface QuoteUpdateParams {
345
+ /**
346
+ * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
347
+ */
348
+ application_fee_amount?: Stripe.Emptyable<number>;
545
349
 
546
- interface SetDiscount {
547
- /**
548
- * The coupon code to replace the `discounts` array with.
549
- */
550
- coupon?: string;
350
+ /**
351
+ * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
352
+ */
353
+ application_fee_percent?: Stripe.Emptyable<number>;
551
354
 
552
- /**
553
- * An ID of an existing discount to replace the `discounts` array with.
554
- */
555
- discount?: string;
355
+ /**
356
+ * Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
357
+ */
358
+ automatic_tax?: QuoteUpdateParams.AutomaticTax;
556
359
 
557
- /**
558
- * An ID of an existing promotion code to replace the `discounts` array with.
559
- */
560
- promotion_code?: string;
561
- }
360
+ /**
361
+ * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
362
+ */
363
+ collection_method?: QuoteUpdateParams.CollectionMethod;
562
364
 
563
- interface SetItem {
564
- /**
565
- * If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
566
- */
567
- discounts?: Array<SetItem.Discount>;
365
+ /**
366
+ * The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
367
+ */
368
+ customer?: string;
568
369
 
569
- /**
570
- * If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
571
- */
572
- metadata?: Stripe.MetadataParam;
370
+ /**
371
+ * The tax rates that will apply to any line item that does not have `tax_rates` set.
372
+ */
373
+ default_tax_rates?: Stripe.Emptyable<Array<string>>;
573
374
 
574
- /**
575
- * The ID of the price object.
576
- */
577
- price: string;
375
+ /**
376
+ * A description that will be displayed on the quote PDF.
377
+ */
378
+ description?: Stripe.Emptyable<string>;
578
379
 
579
- /**
580
- * If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
581
- */
582
- quantity?: number;
380
+ /**
381
+ * The discounts applied to the quote.
382
+ */
383
+ discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
583
384
 
584
- /**
585
- * If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
586
- */
587
- tax_rates?: Array<string>;
385
+ /**
386
+ * Specifies which fields in the response should be expanded.
387
+ */
388
+ expand?: Array<string>;
588
389
 
589
- /**
590
- * If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
591
- */
592
- trial?: SetItem.Trial;
593
- }
390
+ /**
391
+ * A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
392
+ */
393
+ expires_at?: number;
594
394
 
595
- namespace SetItem {
596
- interface Discount {
597
- /**
598
- * ID of the coupon to create a new discount for.
599
- */
600
- coupon?: string;
601
-
602
- /**
603
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
604
- */
605
- discount?: string;
606
-
607
- /**
608
- * Details to determine how long the discount should be applied for.
609
- */
610
- discount_end?: Discount.DiscountEnd;
611
-
612
- /**
613
- * ID of the promotion code to create a new discount for.
614
- */
615
- promotion_code?: string;
616
- }
617
-
618
- namespace Discount {
619
- interface DiscountEnd {
620
- /**
621
- * Time span for the redeemed discount.
622
- */
623
- duration?: DiscountEnd.Duration;
624
-
625
- /**
626
- * A precise Unix timestamp for the discount to end. Must be in the future.
627
- */
628
- timestamp?: number;
629
-
630
- /**
631
- * The type of calculation made to determine when the discount ends.
632
- */
633
- type: DiscountEnd.Type;
634
- }
635
-
636
- namespace DiscountEnd {
637
- interface Duration {
638
- /**
639
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
640
- */
641
- interval: Duration.Interval;
642
-
643
- /**
644
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
645
- */
646
- interval_count: number;
647
- }
648
-
649
- namespace Duration {
650
- type Interval = 'day' | 'month' | 'week' | 'year';
651
- }
652
-
653
- type Type = 'duration' | 'timestamp';
654
- }
655
- }
656
-
657
- interface Trial {
658
- /**
659
- * List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
660
- */
661
- converts_to?: Array<string>;
662
-
663
- /**
664
- * Determines the type of trial for this item.
665
- */
666
- type: Trial.Type;
667
- }
668
-
669
- namespace Trial {
670
- type Type = 'free' | 'paid';
671
- }
672
- }
395
+ /**
396
+ * A footer that will be displayed on the quote PDF.
397
+ */
398
+ footer?: Stripe.Emptyable<string>;
673
399
 
674
- type Type =
675
- | 'add_discount'
676
- | 'add_item'
677
- | 'add_metadata'
678
- | 'clear_discounts'
679
- | 'clear_metadata'
680
- | 'remove_discount'
681
- | 'remove_item'
682
- | 'remove_metadata'
683
- | 'set_discounts'
684
- | 'set_items'
685
- | 'set_metadata';
686
- }
400
+ /**
401
+ * A header that will be displayed on the quote PDF.
402
+ */
403
+ header?: Stripe.Emptyable<string>;
687
404
 
688
- interface AppliesTo {
689
- /**
690
- * 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.
691
- */
692
- new_reference?: string;
405
+ /**
406
+ * All invoices will be billed using the specified settings.
407
+ */
408
+ invoice_settings?: QuoteUpdateParams.InvoiceSettings;
693
409
 
694
- /**
695
- * The ID of the schedule the line applies to.
696
- */
697
- subscription_schedule?: string;
410
+ /**
411
+ * A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
412
+ */
413
+ line_items?: Array<QuoteUpdateParams.LineItem>;
698
414
 
699
- /**
700
- * Describes whether the quote line is affecting a new schedule or an existing schedule.
701
- */
702
- type: AppliesTo.Type;
703
- }
704
-
705
- namespace AppliesTo {
706
- type Type = 'new_reference' | 'subscription_schedule';
707
- }
708
-
709
- type BillingCycleAnchor = 'automatic' | 'line_starts_at';
710
-
711
- interface CancelSubscriptionSchedule {
712
- /**
713
- * Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
714
- */
715
- cancel_at: 'line_starts_at';
716
-
717
- /**
718
- * If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
719
- */
720
- invoice_now?: boolean;
721
-
722
- /**
723
- * If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
724
- */
725
- prorate?: boolean;
726
- }
727
-
728
- interface EndsAt {
729
- /**
730
- * Use the `end` time of a given discount.
731
- */
732
- discount_end?: EndsAt.DiscountEnd;
733
-
734
- /**
735
- * Time span for the quote line starting from the `starts_at` date.
736
- */
737
- duration?: EndsAt.Duration;
738
-
739
- /**
740
- * A precise Unix timestamp.
741
- */
742
- timestamp?: number;
743
-
744
- /**
745
- * Select a way to pass in `ends_at`.
746
- */
747
- type: EndsAt.Type;
748
- }
749
-
750
- namespace EndsAt {
751
- interface DiscountEnd {
752
- /**
753
- * The ID of a specific discount.
754
- */
755
- discount: string;
756
- }
757
-
758
- interface Duration {
759
- /**
760
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
761
- */
762
- interval: Duration.Interval;
763
-
764
- /**
765
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
766
- */
767
- interval_count: number;
768
- }
769
-
770
- namespace Duration {
771
- type Interval = 'day' | 'month' | 'week' | 'year';
772
- }
773
-
774
- type Type =
775
- | 'billing_period_end'
776
- | 'discount_end'
777
- | 'duration'
778
- | 'quote_acceptance_date'
779
- | 'schedule_end'
780
- | 'timestamp'
781
- | 'upcoming_invoice';
782
- }
783
-
784
- type ProrationBehavior =
785
- | 'always_invoice'
786
- | 'create_prorations'
787
- | 'none';
788
-
789
- interface SetPauseCollection {
790
- /**
791
- * Details of the pause_collection behavior to apply to the amendment.
792
- */
793
- set?: SetPauseCollection.Set;
794
-
795
- /**
796
- * Determines the type of the pause_collection amendment.
797
- */
798
- type: SetPauseCollection.Type;
799
- }
800
-
801
- namespace SetPauseCollection {
802
- interface Set {
803
- /**
804
- * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
805
- */
806
- behavior: Set.Behavior;
807
- }
808
-
809
- namespace Set {
810
- type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
811
- }
812
-
813
- type Type = 'remove' | 'set';
814
- }
815
-
816
- type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
817
-
818
- interface StartsAt {
819
- /**
820
- * Use the `end` time of a given discount.
821
- */
822
- discount_end?: StartsAt.DiscountEnd;
823
-
824
- /**
825
- * The timestamp the given line ends at.
826
- */
827
- line_ends_at?: StartsAt.LineEndsAt;
828
-
829
- /**
830
- * A precise Unix timestamp.
831
- */
832
- timestamp?: number;
833
-
834
- /**
835
- * Select a way to pass in `starts_at`.
836
- */
837
- type: StartsAt.Type;
838
- }
839
-
840
- namespace StartsAt {
841
- interface DiscountEnd {
842
- /**
843
- * The ID of a specific discount.
844
- */
845
- discount: string;
846
- }
847
-
848
- interface LineEndsAt {
849
- /**
850
- * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
851
- */
852
- index?: number;
853
- }
854
-
855
- type Type =
856
- | 'discount_end'
857
- | 'line_ends_at'
858
- | 'now'
859
- | 'quote_acceptance_date'
860
- | 'schedule_end'
861
- | 'timestamp'
862
- | 'upcoming_invoice';
863
- }
864
-
865
- interface TrialSettings {
866
- /**
867
- * Defines how the subscription should behave when a trial ends.
868
- */
869
- end_behavior?: TrialSettings.EndBehavior;
870
- }
871
-
872
- namespace TrialSettings {
873
- interface EndBehavior {
874
- /**
875
- * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
876
- */
877
- prorate_up_front?: EndBehavior.ProrateUpFront;
878
- }
879
-
880
- namespace EndBehavior {
881
- type ProrateUpFront = 'defer' | 'include';
882
- }
883
- }
884
- }
885
-
886
- interface LineItem {
887
- /**
888
- * The discounts applied to this line item.
889
- */
890
- discounts?: Stripe.Emptyable<Array<LineItem.Discount>>;
891
-
892
- /**
893
- * The ID of the price object. One of `price` or `price_data` is required.
894
- */
895
- price?: string;
896
-
897
- /**
898
- * Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
899
- */
900
- price_data?: LineItem.PriceData;
901
-
902
- /**
903
- * The quantity of the line item.
904
- */
905
- quantity?: number;
906
-
907
- /**
908
- * The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item.
909
- */
910
- tax_rates?: Stripe.Emptyable<Array<string>>;
911
- }
912
-
913
- namespace LineItem {
914
- interface Discount {
915
- /**
916
- * ID of the coupon to create a new discount for.
917
- */
918
- coupon?: string;
919
-
920
- /**
921
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
922
- */
923
- discount?: string;
924
-
925
- /**
926
- * Details to determine how long the discount should be applied for.
927
- */
928
- discount_end?: Discount.DiscountEnd;
929
-
930
- /**
931
- * ID of the promotion code to create a new discount for.
932
- */
933
- promotion_code?: string;
934
- }
935
-
936
- namespace Discount {
937
- interface DiscountEnd {
938
- /**
939
- * Time span for the redeemed discount.
940
- */
941
- duration?: DiscountEnd.Duration;
942
-
943
- /**
944
- * A precise Unix timestamp for the discount to end. Must be in the future.
945
- */
946
- timestamp?: number;
947
-
948
- /**
949
- * The type of calculation made to determine when the discount ends.
950
- */
951
- type: DiscountEnd.Type;
952
- }
953
-
954
- namespace DiscountEnd {
955
- interface Duration {
956
- /**
957
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
958
- */
959
- interval: Duration.Interval;
960
-
961
- /**
962
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
963
- */
964
- interval_count: number;
965
- }
966
-
967
- namespace Duration {
968
- type Interval = 'day' | 'month' | 'week' | 'year';
969
- }
970
-
971
- type Type = 'duration' | 'timestamp';
972
- }
973
- }
974
-
975
- interface PriceData {
976
- /**
977
- * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
978
- */
979
- currency: string;
980
-
981
- /**
982
- * The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
983
- */
984
- product: string;
985
-
986
- /**
987
- * The recurring components of a price such as `interval` and `interval_count`.
988
- */
989
- recurring?: PriceData.Recurring;
990
-
991
- /**
992
- * Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
993
- */
994
- tax_behavior?: PriceData.TaxBehavior;
995
-
996
- /**
997
- * A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
998
- */
999
- unit_amount?: number;
1000
-
1001
- /**
1002
- * Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1003
- */
1004
- unit_amount_decimal?: string;
1005
- }
1006
-
1007
- namespace PriceData {
1008
- interface Recurring {
1009
- /**
1010
- * Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1011
- */
1012
- interval: Recurring.Interval;
1013
-
1014
- /**
1015
- * The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
1016
- */
1017
- interval_count?: number;
1018
- }
1019
-
1020
- namespace Recurring {
1021
- type Interval = 'day' | 'month' | 'week' | 'year';
1022
- }
1023
-
1024
- type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
1025
- }
1026
- }
1027
-
1028
- interface SubscriptionData {
1029
- /**
1030
- * Describes the period to bill for upon accepting the quote.
1031
- */
1032
- bill_on_acceptance?: SubscriptionData.BillOnAcceptance;
1033
-
1034
- /**
1035
- * 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.
1036
- */
1037
- billing_behavior?: SubscriptionData.BillingBehavior;
1038
-
1039
- /**
1040
- * When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
1041
- */
1042
- billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
1043
-
1044
- /**
1045
- * 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.
1046
- */
1047
- description?: string;
1048
-
1049
- /**
1050
- * When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
1051
- */
1052
- effective_date?: Stripe.Emptyable<'current_period_end' | number>;
1053
-
1054
- /**
1055
- * Behavior of the subscription schedule and underlying subscription when it ends.
1056
- */
1057
- end_behavior?: SubscriptionData.EndBehavior;
1058
-
1059
- /**
1060
- * The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden.
1061
- */
1062
- from_subscription?: string;
1063
-
1064
- /**
1065
- * 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.
1066
- */
1067
- metadata?: Stripe.MetadataParam;
1068
-
1069
- /**
1070
- * If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
1071
- */
1072
- prebilling?: Stripe.Emptyable<SubscriptionData.Prebilling>;
1073
-
1074
- /**
1075
- * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1076
- *
1077
- * When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1078
- *
1079
- * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
1080
- *
1081
- * Prorations can be disabled by passing `none`.
1082
- */
1083
- proration_behavior?: SubscriptionData.ProrationBehavior;
1084
-
1085
- /**
1086
- * Integer representing the number of trial period days before the customer is charged for the first time.
1087
- */
1088
- trial_period_days?: Stripe.Emptyable<number>;
1089
- }
1090
-
1091
- namespace SubscriptionData {
1092
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
1093
-
1094
- interface BillOnAcceptance {
1095
- /**
1096
- * The start of the period to bill from when the Quote is accepted.
1097
- */
1098
- bill_from?: BillOnAcceptance.BillFrom;
1099
-
1100
- /**
1101
- * The end of the period to bill until when the Quote is accepted.
1102
- */
1103
- bill_until?: BillOnAcceptance.BillUntil;
1104
- }
1105
-
1106
- namespace BillOnAcceptance {
1107
- interface BillFrom {
1108
- /**
1109
- * Details of a Quote line to start the bill period from.
1110
- */
1111
- line_starts_at?: BillFrom.LineStartsAt;
1112
-
1113
- /**
1114
- * A precise Unix timestamp.
1115
- */
1116
- timestamp?: number;
1117
-
1118
- /**
1119
- * The type of method to specify the `bill_from` time.
1120
- */
1121
- type: BillFrom.Type;
1122
- }
1123
-
1124
- namespace BillFrom {
1125
- interface LineStartsAt {
1126
- /**
1127
- * The ID of a quote line.
1128
- */
1129
- id?: string;
1130
-
1131
- /**
1132
- * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1133
- */
1134
- index?: number;
1135
- }
1136
-
1137
- type Type =
1138
- | 'line_starts_at'
1139
- | 'now'
1140
- | 'pause_collection_start'
1141
- | 'quote_acceptance_date'
1142
- | 'timestamp';
1143
- }
1144
-
1145
- interface BillUntil {
1146
- /**
1147
- * Details of the duration over which to bill.
1148
- */
1149
- duration?: BillUntil.Duration;
1150
-
1151
- /**
1152
- * Details of a Quote line item from which to bill until.
1153
- */
1154
- line_ends_at?: BillUntil.LineEndsAt;
1155
-
1156
- /**
1157
- * A precise Unix timestamp.
1158
- */
1159
- timestamp?: number;
1160
-
1161
- /**
1162
- * The type of method to specify the `bill_until` time.
1163
- */
1164
- type: BillUntil.Type;
1165
- }
1166
-
1167
- namespace BillUntil {
1168
- interface Duration {
1169
- /**
1170
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1171
- */
1172
- interval: Duration.Interval;
1173
-
1174
- /**
1175
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1176
- */
1177
- interval_count: number;
1178
- }
1179
-
1180
- namespace Duration {
1181
- type Interval = 'day' | 'month' | 'week' | 'year';
1182
- }
1183
-
1184
- interface LineEndsAt {
1185
- /**
1186
- * The ID of a quote line.
1187
- */
1188
- id?: string;
1189
-
1190
- /**
1191
- * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1192
- */
1193
- index?: number;
1194
- }
1195
-
1196
- type Type =
1197
- | 'duration'
1198
- | 'line_ends_at'
1199
- | 'schedule_end'
1200
- | 'timestamp'
1201
- | 'upcoming_invoice';
1202
- }
1203
- }
1204
-
1205
- type EndBehavior = 'cancel' | 'release';
1206
-
1207
- interface Prebilling {
1208
- /**
1209
- * This is used to determine the number of billing cycles to prebill.
1210
- */
1211
- iterations: number;
1212
- }
1213
-
1214
- type ProrationBehavior =
1215
- | 'always_invoice'
1216
- | 'create_prorations'
1217
- | 'none';
1218
- }
1219
-
1220
- interface SubscriptionDataOverride {
1221
- /**
1222
- * Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
1223
- */
1224
- applies_to: SubscriptionDataOverride.AppliesTo;
1225
-
1226
- /**
1227
- * Describes the period to bill for upon accepting the quote.
1228
- */
1229
- bill_on_acceptance?: SubscriptionDataOverride.BillOnAcceptance;
1230
-
1231
- /**
1232
- * 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.
1233
- */
1234
- billing_behavior?: SubscriptionDataOverride.BillingBehavior;
1235
-
1236
- /**
1237
- * The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
1238
- */
1239
- customer?: string;
1240
-
1241
- /**
1242
- * 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.
1243
- */
1244
- description?: string;
1245
-
1246
- /**
1247
- * Behavior of the subscription schedule and underlying subscription when it ends.
1248
- */
1249
- end_behavior?: SubscriptionDataOverride.EndBehavior;
1250
-
1251
- /**
1252
- * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1253
- *
1254
- * When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1255
- *
1256
- * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
1257
- *
1258
- * Prorations can be disabled by passing `none`.
1259
- */
1260
- proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
1261
- }
1262
-
1263
- namespace SubscriptionDataOverride {
1264
- interface AppliesTo {
1265
- /**
1266
- * 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.
1267
- */
1268
- new_reference?: string;
1269
-
1270
- /**
1271
- * The ID of the schedule the line applies to.
1272
- */
1273
- subscription_schedule?: string;
1274
-
1275
- /**
1276
- * Describes whether the quote line is affecting a new schedule or an existing schedule.
1277
- */
1278
- type: AppliesTo.Type;
1279
- }
1280
-
1281
- namespace AppliesTo {
1282
- type Type = 'new_reference' | 'subscription_schedule';
1283
- }
1284
-
1285
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
1286
-
1287
- interface BillOnAcceptance {
1288
- /**
1289
- * The start of the period to bill from when the Quote is accepted.
1290
- */
1291
- bill_from?: BillOnAcceptance.BillFrom;
1292
-
1293
- /**
1294
- * The end of the period to bill until when the Quote is accepted.
1295
- */
1296
- bill_until?: BillOnAcceptance.BillUntil;
1297
- }
1298
-
1299
- namespace BillOnAcceptance {
1300
- interface BillFrom {
1301
- /**
1302
- * Details of a Quote line to start the bill period from.
1303
- */
1304
- line_starts_at?: BillFrom.LineStartsAt;
1305
-
1306
- /**
1307
- * A precise Unix timestamp.
1308
- */
1309
- timestamp?: number;
1310
-
1311
- /**
1312
- * The type of method to specify the `bill_from` time.
1313
- */
1314
- type: BillFrom.Type;
1315
- }
1316
-
1317
- namespace BillFrom {
1318
- interface LineStartsAt {
1319
- /**
1320
- * The ID of a quote line.
1321
- */
1322
- id?: string;
1323
-
1324
- /**
1325
- * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1326
- */
1327
- index?: number;
1328
- }
1329
-
1330
- type Type =
1331
- | 'line_starts_at'
1332
- | 'now'
1333
- | 'pause_collection_start'
1334
- | 'quote_acceptance_date'
1335
- | 'timestamp';
1336
- }
1337
-
1338
- interface BillUntil {
1339
- /**
1340
- * Details of the duration over which to bill.
1341
- */
1342
- duration?: BillUntil.Duration;
1343
-
1344
- /**
1345
- * Details of a Quote line item from which to bill until.
1346
- */
1347
- line_ends_at?: BillUntil.LineEndsAt;
1348
-
1349
- /**
1350
- * A precise Unix timestamp.
1351
- */
1352
- timestamp?: number;
1353
-
1354
- /**
1355
- * The type of method to specify the `bill_until` time.
1356
- */
1357
- type: BillUntil.Type;
1358
- }
1359
-
1360
- namespace BillUntil {
1361
- interface Duration {
1362
- /**
1363
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1364
- */
1365
- interval: Duration.Interval;
1366
-
1367
- /**
1368
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1369
- */
1370
- interval_count: number;
1371
- }
1372
-
1373
- namespace Duration {
1374
- type Interval = 'day' | 'month' | 'week' | 'year';
1375
- }
1376
-
1377
- interface LineEndsAt {
1378
- /**
1379
- * The ID of a quote line.
1380
- */
1381
- id?: string;
1382
-
1383
- /**
1384
- * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
1385
- */
1386
- index?: number;
1387
- }
1388
-
1389
- type Type =
1390
- | 'duration'
1391
- | 'line_ends_at'
1392
- | 'schedule_end'
1393
- | 'timestamp'
1394
- | 'upcoming_invoice';
1395
- }
1396
- }
1397
-
1398
- type EndBehavior = 'cancel' | 'release';
1399
-
1400
- type ProrationBehavior =
1401
- | 'always_invoice'
1402
- | 'create_prorations'
1403
- | 'none';
1404
- }
1405
-
1406
- interface TransferData {
1407
- /**
1408
- * The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
1409
- */
1410
- amount?: number;
1411
-
1412
- /**
1413
- * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.
1414
- */
1415
- amount_percent?: number;
1416
-
1417
- /**
1418
- * ID of an existing, connected Stripe account.
1419
- */
1420
- destination: string;
1421
- }
1422
- }
1423
-
1424
- interface QuoteRetrieveParams {
1425
- /**
1426
- * Specifies which fields in the response should be expanded.
1427
- */
1428
- expand?: Array<string>;
1429
- }
1430
-
1431
- interface QuoteUpdateParams {
1432
- /**
1433
- * Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
1434
- */
1435
- allow_backdated_lines?: boolean;
1436
-
1437
- /**
1438
- * The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field.
1439
- */
1440
- application_fee_amount?: Stripe.Emptyable<number>;
1441
-
1442
- /**
1443
- * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field.
1444
- */
1445
- application_fee_percent?: Stripe.Emptyable<number>;
1446
-
1447
- /**
1448
- * Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
1449
- */
1450
- automatic_tax?: QuoteUpdateParams.AutomaticTax;
1451
-
1452
- /**
1453
- * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
1454
- */
1455
- collection_method?: QuoteUpdateParams.CollectionMethod;
1456
-
1457
- /**
1458
- * The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
1459
- */
1460
- customer?: string;
1461
-
1462
- /**
1463
- * The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
1464
- */
1465
- customer_account?: string;
1466
-
1467
- /**
1468
- * The tax rates that will apply to any line item that does not have `tax_rates` set.
1469
- */
1470
- default_tax_rates?: Stripe.Emptyable<Array<string>>;
1471
-
1472
- /**
1473
- * A description that will be displayed on the quote PDF.
1474
- */
1475
- description?: Stripe.Emptyable<string>;
1476
-
1477
- /**
1478
- * The discounts applied to the quote.
1479
- */
1480
- discounts?: Stripe.Emptyable<Array<QuoteUpdateParams.Discount>>;
1481
-
1482
- /**
1483
- * Specifies which fields in the response should be expanded.
1484
- */
1485
- expand?: Array<string>;
1486
-
1487
- /**
1488
- * A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
1489
- */
1490
- expires_at?: number;
1491
-
1492
- /**
1493
- * A footer that will be displayed on the quote PDF.
1494
- */
1495
- footer?: Stripe.Emptyable<string>;
1496
-
1497
- /**
1498
- * A header that will be displayed on the quote PDF.
1499
- */
1500
- header?: Stripe.Emptyable<string>;
1501
-
1502
- /**
1503
- * All invoices will be billed using the specified settings.
1504
- */
1505
- invoice_settings?: QuoteUpdateParams.InvoiceSettings;
1506
-
1507
- /**
1508
- * A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost.
1509
- */
1510
- line_items?: Array<QuoteUpdateParams.LineItem>;
1511
-
1512
- /**
1513
- * 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.
1514
- */
1515
- lines?: Array<QuoteUpdateParams.Line>;
1516
-
1517
- /**
1518
- * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
1519
- */
1520
- metadata?: Stripe.MetadataParam;
1521
-
1522
- /**
1523
- * The account on behalf of which to charge.
1524
- */
1525
- on_behalf_of?: Stripe.Emptyable<string>;
1526
-
1527
- /**
1528
- * When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
1529
- */
1530
- subscription_data?: QuoteUpdateParams.SubscriptionData;
1531
-
1532
- /**
1533
- * List representing overrides for `subscription_data` configurations for specific subscription schedules.
1534
- */
1535
- subscription_data_overrides?: Stripe.Emptyable<
1536
- Array<QuoteUpdateParams.SubscriptionDataOverride>
1537
- >;
1538
-
1539
- /**
1540
- * The data with which to automatically create a Transfer for each of the invoices.
1541
- */
1542
- transfer_data?: Stripe.Emptyable<QuoteUpdateParams.TransferData>;
1543
- }
1544
-
1545
- namespace QuoteUpdateParams {
1546
- interface AutomaticTax {
1547
- /**
1548
- * Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
1549
- */
1550
- enabled: boolean;
1551
-
1552
- /**
1553
- * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
1554
- */
1555
- liability?: AutomaticTax.Liability;
1556
- }
1557
-
1558
- namespace AutomaticTax {
1559
- interface Liability {
1560
- /**
1561
- * The connected account being referenced when `type` is `account`.
1562
- */
1563
- account?: string;
1564
-
1565
- /**
1566
- * Type of the account referenced in the request.
1567
- */
1568
- type: Liability.Type;
1569
- }
1570
-
1571
- namespace Liability {
1572
- type Type = 'account' | 'self';
1573
- }
1574
- }
1575
-
1576
- type CollectionMethod = 'charge_automatically' | 'send_invoice';
1577
-
1578
- interface Discount {
1579
- /**
1580
- * ID of the coupon to create a new discount for.
1581
- */
1582
- coupon?: string;
1583
-
1584
- /**
1585
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
1586
- */
1587
- discount?: string;
1588
-
1589
- /**
1590
- * Details to determine how long the discount should be applied for.
1591
- */
1592
- discount_end?: Discount.DiscountEnd;
1593
-
1594
- /**
1595
- * ID of the promotion code to create a new discount for.
1596
- */
1597
- promotion_code?: string;
1598
- }
1599
-
1600
- namespace Discount {
1601
- interface DiscountEnd {
1602
- /**
1603
- * Time span for the redeemed discount.
1604
- */
1605
- duration?: DiscountEnd.Duration;
1606
-
1607
- /**
1608
- * A precise Unix timestamp for the discount to end. Must be in the future.
1609
- */
1610
- timestamp?: number;
1611
-
1612
- /**
1613
- * The type of calculation made to determine when the discount ends.
1614
- */
1615
- type: DiscountEnd.Type;
1616
- }
1617
-
1618
- namespace DiscountEnd {
1619
- interface Duration {
1620
- /**
1621
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1622
- */
1623
- interval: Duration.Interval;
1624
-
1625
- /**
1626
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1627
- */
1628
- interval_count: number;
1629
- }
1630
-
1631
- namespace Duration {
1632
- type Interval = 'day' | 'month' | 'week' | 'year';
1633
- }
1634
-
1635
- type Type = 'duration' | 'timestamp';
1636
- }
1637
- }
1638
-
1639
- interface InvoiceSettings {
1640
- /**
1641
- * Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
1642
- */
1643
- days_until_due?: number;
1644
-
1645
- /**
1646
- * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1647
- */
1648
- issuer?: InvoiceSettings.Issuer;
1649
- }
1650
-
1651
- namespace InvoiceSettings {
1652
- interface Issuer {
1653
- /**
1654
- * The connected account being referenced when `type` is `account`.
1655
- */
1656
- account?: string;
1657
-
1658
- /**
1659
- * Type of the account referenced in the request.
1660
- */
1661
- type: Issuer.Type;
1662
- }
1663
-
1664
- namespace Issuer {
1665
- type Type = 'account' | 'self';
1666
- }
1667
- }
1668
-
1669
- interface Line {
1670
- /**
1671
- * An array of operations the quote line performs.
1672
- */
1673
- actions?: Array<Line.Action>;
1674
-
1675
- /**
1676
- * Details to identify the subscription schedule the quote line applies to.
1677
- */
1678
- applies_to?: Line.AppliesTo;
1679
-
1680
- /**
1681
- * For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line.
1682
- */
1683
- billing_cycle_anchor?: Line.BillingCycleAnchor;
1684
-
1685
- /**
1686
- * A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
1687
- */
1688
- cancel_subscription_schedule?: Line.CancelSubscriptionSchedule;
1689
-
1690
- /**
1691
- * Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
1692
- */
1693
- ends_at?: Line.EndsAt;
1694
-
1695
- /**
1696
- * The ID of an existing line on the quote.
1697
- */
1698
- id?: string;
1699
-
1700
- /**
1701
- * Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts.
1702
- */
1703
- proration_behavior?: Line.ProrationBehavior;
1704
-
1705
- /**
1706
- * Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
1707
- */
1708
- set_pause_collection?: Line.SetPauseCollection;
1709
-
1710
- /**
1711
- * Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
1712
- */
1713
- set_schedule_end?: Line.SetScheduleEnd;
1714
-
1715
- /**
1716
- * Details to identify the earliest timestamp where the proposed change should take effect.
1717
- */
1718
- starts_at?: Line.StartsAt;
1719
-
1720
- /**
1721
- * Settings related to subscription trials.
1722
- */
1723
- trial_settings?: Line.TrialSettings;
1724
- }
1725
-
1726
- namespace Line {
1727
- interface Action {
1728
- /**
1729
- * Details for the `add_discount` type.
1730
- */
1731
- add_discount?: Action.AddDiscount;
1732
-
1733
- /**
1734
- * Details for the `add_item` type.
1735
- */
1736
- add_item?: Action.AddItem;
1737
-
1738
- /**
1739
- * Details for the `add_metadata` type: specify a hash of key-value pairs.
1740
- */
1741
- add_metadata?: {
1742
- [key: string]: string;
1743
- };
1744
-
1745
- /**
1746
- * Details for the `remove_discount` type.
1747
- */
1748
- remove_discount?: Action.RemoveDiscount;
1749
-
1750
- /**
1751
- * Details for the `remove_item` type.
1752
- */
1753
- remove_item?: Action.RemoveItem;
1754
-
1755
- /**
1756
- * Details for the `remove_metadata` type: specify an array of metadata keys.
1757
- */
1758
- remove_metadata?: Array<string>;
1759
-
1760
- /**
1761
- * Details for the `set_discounts` type.
1762
- */
1763
- set_discounts?: Array<Action.SetDiscount>;
1764
-
1765
- /**
1766
- * Details for the `set_items` type.
1767
- */
1768
- set_items?: Array<Action.SetItem>;
1769
-
1770
- /**
1771
- * Details for the `set_metadata` type: specify an array of key-value pairs.
1772
- */
1773
- set_metadata?: Stripe.Emptyable<{
1774
- [key: string]: string;
1775
- }>;
1776
-
1777
- /**
1778
- * The type of action the quote line performs.
1779
- */
1780
- type: Action.Type;
1781
- }
1782
-
1783
- namespace Action {
1784
- interface AddDiscount {
1785
- /**
1786
- * The coupon code to redeem.
1787
- */
1788
- coupon?: string;
1789
-
1790
- /**
1791
- * An ID of an existing discount for a coupon that was already redeemed.
1792
- */
1793
- discount?: string;
1794
-
1795
- /**
1796
- * Details to determine how long the discount should be applied for.
1797
- */
1798
- discount_end?: AddDiscount.DiscountEnd;
1799
-
1800
- /**
1801
- * The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
1802
- */
1803
- index?: number;
1804
-
1805
- /**
1806
- * The promotion code to redeem.
1807
- */
1808
- promotion_code?: string;
1809
- }
1810
-
1811
- namespace AddDiscount {
1812
- interface DiscountEnd {
1813
- /**
1814
- * The type of calculation made to determine when the discount ends.
1815
- */
1816
- type: 'line_ends_at';
1817
- }
1818
- }
1819
-
1820
- interface AddItem {
1821
- /**
1822
- * The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
1823
- */
1824
- discounts?: Array<AddItem.Discount>;
1825
-
1826
- /**
1827
- * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
1828
- */
1829
- metadata?: Stripe.MetadataParam;
1830
-
1831
- /**
1832
- * The ID of the price object.
1833
- */
1834
- price: string;
1835
-
1836
- /**
1837
- * Quantity for this item.
1838
- */
1839
- quantity?: number;
1840
-
1841
- /**
1842
- * The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
1843
- */
1844
- tax_rates?: Array<string>;
1845
-
1846
- /**
1847
- * Options that configure the trial on the subscription item.
1848
- */
1849
- trial?: AddItem.Trial;
1850
- }
1851
-
1852
- namespace AddItem {
1853
- interface Discount {
1854
- /**
1855
- * ID of the coupon to create a new discount for.
1856
- */
1857
- coupon?: string;
1858
-
1859
- /**
1860
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
1861
- */
1862
- discount?: string;
1863
-
1864
- /**
1865
- * Details to determine how long the discount should be applied for.
1866
- */
1867
- discount_end?: Discount.DiscountEnd;
1868
-
1869
- /**
1870
- * ID of the promotion code to create a new discount for.
1871
- */
1872
- promotion_code?: string;
1873
- }
1874
-
1875
- namespace Discount {
1876
- interface DiscountEnd {
1877
- /**
1878
- * Time span for the redeemed discount.
1879
- */
1880
- duration?: DiscountEnd.Duration;
1881
-
1882
- /**
1883
- * A precise Unix timestamp for the discount to end. Must be in the future.
1884
- */
1885
- timestamp?: number;
1886
-
1887
- /**
1888
- * The type of calculation made to determine when the discount ends.
1889
- */
1890
- type: DiscountEnd.Type;
1891
- }
1892
-
1893
- namespace DiscountEnd {
1894
- interface Duration {
1895
- /**
1896
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1897
- */
1898
- interval: Duration.Interval;
1899
-
1900
- /**
1901
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1902
- */
1903
- interval_count: number;
1904
- }
1905
-
1906
- namespace Duration {
1907
- type Interval = 'day' | 'month' | 'week' | 'year';
1908
- }
1909
-
1910
- type Type = 'duration' | 'timestamp';
1911
- }
1912
- }
1913
-
1914
- interface Trial {
1915
- /**
1916
- * List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
1917
- */
1918
- converts_to?: Array<string>;
1919
-
1920
- /**
1921
- * Determines the type of trial for this item.
1922
- */
1923
- type: Trial.Type;
1924
- }
1925
-
1926
- namespace Trial {
1927
- type Type = 'free' | 'paid';
1928
- }
1929
- }
1930
-
1931
- interface RemoveDiscount {
1932
- /**
1933
- * The coupon code to remove from the `discounts` array.
1934
- */
1935
- coupon?: string;
1936
-
1937
- /**
1938
- * The ID of a discount to remove from the `discounts` array.
1939
- */
1940
- discount?: string;
1941
-
1942
- /**
1943
- * The ID of a promotion code to remove from the `discounts` array.
1944
- */
1945
- promotion_code?: string;
1946
- }
1947
-
1948
- interface RemoveItem {
1949
- /**
1950
- * ID of a price to remove.
1951
- */
1952
- price: string;
1953
- }
1954
-
1955
- interface SetDiscount {
1956
- /**
1957
- * The coupon code to replace the `discounts` array with.
1958
- */
1959
- coupon?: string;
1960
-
1961
- /**
1962
- * An ID of an existing discount to replace the `discounts` array with.
1963
- */
1964
- discount?: string;
1965
-
1966
- /**
1967
- * An ID of an existing promotion code to replace the `discounts` array with.
1968
- */
1969
- promotion_code?: string;
1970
- }
1971
-
1972
- interface SetItem {
1973
- /**
1974
- * If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
1975
- */
1976
- discounts?: Array<SetItem.Discount>;
1977
-
1978
- /**
1979
- * If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
1980
- */
1981
- metadata?: Stripe.MetadataParam;
1982
-
1983
- /**
1984
- * The ID of the price object.
1985
- */
1986
- price: string;
1987
-
1988
- /**
1989
- * If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
1990
- */
1991
- quantity?: number;
1992
-
1993
- /**
1994
- * If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
1995
- */
1996
- tax_rates?: Array<string>;
1997
-
1998
- /**
1999
- * If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
2000
- */
2001
- trial?: SetItem.Trial;
2002
- }
2003
-
2004
- namespace SetItem {
2005
- interface Discount {
2006
- /**
2007
- * ID of the coupon to create a new discount for.
2008
- */
2009
- coupon?: string;
2010
-
2011
- /**
2012
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
2013
- */
2014
- discount?: string;
2015
-
2016
- /**
2017
- * Details to determine how long the discount should be applied for.
2018
- */
2019
- discount_end?: Discount.DiscountEnd;
2020
-
2021
- /**
2022
- * ID of the promotion code to create a new discount for.
2023
- */
2024
- promotion_code?: string;
2025
- }
2026
-
2027
- namespace Discount {
2028
- interface DiscountEnd {
2029
- /**
2030
- * Time span for the redeemed discount.
2031
- */
2032
- duration?: DiscountEnd.Duration;
2033
-
2034
- /**
2035
- * A precise Unix timestamp for the discount to end. Must be in the future.
2036
- */
2037
- timestamp?: number;
2038
-
2039
- /**
2040
- * The type of calculation made to determine when the discount ends.
2041
- */
2042
- type: DiscountEnd.Type;
2043
- }
2044
-
2045
- namespace DiscountEnd {
2046
- interface Duration {
2047
- /**
2048
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2049
- */
2050
- interval: Duration.Interval;
2051
-
2052
- /**
2053
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2054
- */
2055
- interval_count: number;
2056
- }
2057
-
2058
- namespace Duration {
2059
- type Interval = 'day' | 'month' | 'week' | 'year';
2060
- }
2061
-
2062
- type Type = 'duration' | 'timestamp';
2063
- }
2064
- }
2065
-
2066
- interface Trial {
2067
- /**
2068
- * List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
2069
- */
2070
- converts_to?: Array<string>;
2071
-
2072
- /**
2073
- * Determines the type of trial for this item.
2074
- */
2075
- type: Trial.Type;
2076
- }
2077
-
2078
- namespace Trial {
2079
- type Type = 'free' | 'paid';
2080
- }
2081
- }
2082
-
2083
- type Type =
2084
- | 'add_discount'
2085
- | 'add_item'
2086
- | 'add_metadata'
2087
- | 'clear_discounts'
2088
- | 'clear_metadata'
2089
- | 'remove_discount'
2090
- | 'remove_item'
2091
- | 'remove_metadata'
2092
- | 'set_discounts'
2093
- | 'set_items'
2094
- | 'set_metadata';
2095
- }
2096
-
2097
- interface AppliesTo {
2098
- /**
2099
- * 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.
2100
- */
2101
- new_reference?: string;
2102
-
2103
- /**
2104
- * The ID of the schedule the line applies to.
2105
- */
2106
- subscription_schedule?: string;
2107
-
2108
- /**
2109
- * Describes whether the quote line is affecting a new schedule or an existing schedule.
2110
- */
2111
- type: AppliesTo.Type;
2112
- }
2113
-
2114
- namespace AppliesTo {
2115
- type Type = 'new_reference' | 'subscription_schedule';
2116
- }
2117
-
2118
- type BillingCycleAnchor = 'automatic' | 'line_starts_at';
415
+ /**
416
+ * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
417
+ */
418
+ metadata?: Stripe.MetadataParam;
2119
419
 
2120
- interface CancelSubscriptionSchedule {
2121
- /**
2122
- * Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
2123
- */
2124
- cancel_at: 'line_starts_at';
420
+ /**
421
+ * The account on behalf of which to charge.
422
+ */
423
+ on_behalf_of?: Stripe.Emptyable<string>;
2125
424
 
2126
- /**
2127
- * If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
2128
- */
2129
- invoice_now?: boolean;
425
+ /**
426
+ * When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
427
+ */
428
+ subscription_data?: QuoteUpdateParams.SubscriptionData;
2130
429
 
2131
- /**
2132
- * If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
2133
- */
2134
- prorate?: boolean;
2135
- }
430
+ /**
431
+ * The data with which to automatically create a Transfer for each of the invoices.
432
+ */
433
+ transfer_data?: Stripe.Emptyable<QuoteUpdateParams.TransferData>;
434
+ }
2136
435
 
2137
- interface EndsAt {
2138
- /**
2139
- * Use the `end` time of a given discount.
2140
- */
2141
- discount_end?: EndsAt.DiscountEnd;
436
+ namespace QuoteUpdateParams {
437
+ interface AutomaticTax {
438
+ /**
439
+ * Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
440
+ */
441
+ enabled: boolean;
2142
442
 
2143
- /**
2144
- * Time span for the quote line starting from the `starts_at` date.
2145
- */
2146
- duration?: EndsAt.Duration;
443
+ /**
444
+ * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
445
+ */
446
+ liability?: AutomaticTax.Liability;
447
+ }
2147
448
 
449
+ namespace AutomaticTax {
450
+ interface Liability {
2148
451
  /**
2149
- * A precise Unix timestamp.
452
+ * The connected account being referenced when `type` is `account`.
2150
453
  */
2151
- timestamp?: number;
454
+ account?: string;
2152
455
 
2153
456
  /**
2154
- * Select a way to pass in `ends_at`.
457
+ * Type of the account referenced in the request.
2155
458
  */
2156
- type: EndsAt.Type;
2157
- }
2158
-
2159
- namespace EndsAt {
2160
- interface DiscountEnd {
2161
- /**
2162
- * The ID of a specific discount.
2163
- */
2164
- discount: string;
2165
- }
2166
-
2167
- interface Duration {
2168
- /**
2169
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2170
- */
2171
- interval: Duration.Interval;
2172
-
2173
- /**
2174
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2175
- */
2176
- interval_count: number;
2177
- }
2178
-
2179
- namespace Duration {
2180
- type Interval = 'day' | 'month' | 'week' | 'year';
2181
- }
2182
-
2183
- type Type =
2184
- | 'billing_period_end'
2185
- | 'discount_end'
2186
- | 'duration'
2187
- | 'quote_acceptance_date'
2188
- | 'schedule_end'
2189
- | 'timestamp'
2190
- | 'upcoming_invoice';
459
+ type: Liability.Type;
2191
460
  }
2192
461
 
2193
- type ProrationBehavior =
2194
- | 'always_invoice'
2195
- | 'create_prorations'
2196
- | 'none';
2197
-
2198
- interface SetPauseCollection {
2199
- /**
2200
- * Details of the pause_collection behavior to apply to the amendment.
2201
- */
2202
- set?: SetPauseCollection.Set;
2203
-
2204
- /**
2205
- * Determines the type of the pause_collection amendment.
2206
- */
2207
- type: SetPauseCollection.Type;
462
+ namespace Liability {
463
+ type Type = 'account' | 'self';
2208
464
  }
465
+ }
2209
466
 
2210
- namespace SetPauseCollection {
2211
- interface Set {
2212
- /**
2213
- * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2214
- */
2215
- behavior: Set.Behavior;
2216
- }
2217
-
2218
- namespace Set {
2219
- type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
2220
- }
467
+ type CollectionMethod = 'charge_automatically' | 'send_invoice';
2221
468
 
2222
- type Type = 'remove' | 'set';
2223
- }
469
+ interface Discount {
470
+ /**
471
+ * ID of the coupon to create a new discount for.
472
+ */
473
+ coupon?: string;
2224
474
 
2225
- type SetScheduleEnd = 'line_ends_at' | 'line_starts_at';
475
+ /**
476
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
477
+ */
478
+ discount?: string;
2226
479
 
2227
- interface StartsAt {
2228
- /**
2229
- * Use the `end` time of a given discount.
2230
- */
2231
- discount_end?: StartsAt.DiscountEnd;
480
+ /**
481
+ * ID of the promotion code to create a new discount for.
482
+ */
483
+ promotion_code?: string;
484
+ }
2232
485
 
2233
- /**
2234
- * The timestamp the given line ends at.
2235
- */
2236
- line_ends_at?: StartsAt.LineEndsAt;
486
+ interface InvoiceSettings {
487
+ /**
488
+ * Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
489
+ */
490
+ days_until_due?: number;
2237
491
 
2238
- /**
2239
- * A precise Unix timestamp.
2240
- */
2241
- timestamp?: number;
492
+ /**
493
+ * The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
494
+ */
495
+ issuer?: InvoiceSettings.Issuer;
496
+ }
2242
497
 
498
+ namespace InvoiceSettings {
499
+ interface Issuer {
2243
500
  /**
2244
- * Select a way to pass in `starts_at`.
501
+ * The connected account being referenced when `type` is `account`.
2245
502
  */
2246
- type: StartsAt.Type;
2247
- }
2248
-
2249
- namespace StartsAt {
2250
- interface DiscountEnd {
2251
- /**
2252
- * The ID of a specific discount.
2253
- */
2254
- discount: string;
2255
- }
2256
-
2257
- interface LineEndsAt {
2258
- /**
2259
- * The ID of a quote line.
2260
- */
2261
- id?: string;
2262
-
2263
- /**
2264
- * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2265
- */
2266
- index?: number;
2267
- }
2268
-
2269
- type Type =
2270
- | 'discount_end'
2271
- | 'line_ends_at'
2272
- | 'now'
2273
- | 'quote_acceptance_date'
2274
- | 'schedule_end'
2275
- | 'timestamp'
2276
- | 'upcoming_invoice';
2277
- }
503
+ account?: string;
2278
504
 
2279
- interface TrialSettings {
2280
505
  /**
2281
- * Defines how the subscription should behave when a trial ends.
506
+ * Type of the account referenced in the request.
2282
507
  */
2283
- end_behavior?: TrialSettings.EndBehavior;
508
+ type: Issuer.Type;
2284
509
  }
2285
510
 
2286
- namespace TrialSettings {
2287
- interface EndBehavior {
2288
- /**
2289
- * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2290
- */
2291
- prorate_up_front?: EndBehavior.ProrateUpFront;
2292
- }
2293
-
2294
- namespace EndBehavior {
2295
- type ProrateUpFront = 'defer' | 'include';
2296
- }
511
+ namespace Issuer {
512
+ type Type = 'account' | 'self';
2297
513
  }
2298
514
  }
2299
515
 
@@ -2330,65 +546,21 @@ declare module 'stripe' {
2330
546
  }
2331
547
 
2332
548
  namespace LineItem {
2333
- interface Discount {
2334
- /**
2335
- * ID of the coupon to create a new discount for.
2336
- */
2337
- coupon?: string;
2338
-
2339
- /**
2340
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
2341
- */
2342
- discount?: string;
2343
-
2344
- /**
2345
- * Details to determine how long the discount should be applied for.
2346
- */
2347
- discount_end?: Discount.DiscountEnd;
2348
-
2349
- /**
2350
- * ID of the promotion code to create a new discount for.
2351
- */
2352
- promotion_code?: string;
2353
- }
2354
-
2355
- namespace Discount {
2356
- interface DiscountEnd {
2357
- /**
2358
- * Time span for the redeemed discount.
2359
- */
2360
- duration?: DiscountEnd.Duration;
2361
-
2362
- /**
2363
- * A precise Unix timestamp for the discount to end. Must be in the future.
2364
- */
2365
- timestamp?: number;
2366
-
2367
- /**
2368
- * The type of calculation made to determine when the discount ends.
2369
- */
2370
- type: DiscountEnd.Type;
2371
- }
2372
-
2373
- namespace DiscountEnd {
2374
- interface Duration {
2375
- /**
2376
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2377
- */
2378
- interval: Duration.Interval;
2379
-
2380
- /**
2381
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2382
- */
2383
- interval_count: number;
2384
- }
549
+ interface Discount {
550
+ /**
551
+ * ID of the coupon to create a new discount for.
552
+ */
553
+ coupon?: string;
2385
554
 
2386
- namespace Duration {
2387
- type Interval = 'day' | 'month' | 'week' | 'year';
2388
- }
555
+ /**
556
+ * ID of an existing discount on the object (or one of its ancestors) to reuse.
557
+ */
558
+ discount?: string;
2389
559
 
2390
- type Type = 'duration' | 'timestamp';
2391
- }
560
+ /**
561
+ * ID of the promotion code to create a new discount for.
562
+ */
563
+ promotion_code?: string;
2392
564
  }
2393
565
 
2394
566
  interface PriceData {
@@ -2445,23 +617,6 @@ declare module 'stripe' {
2445
617
  }
2446
618
 
2447
619
  interface SubscriptionData {
2448
- /**
2449
- * Describes the period to bill for upon accepting the quote.
2450
- */
2451
- bill_on_acceptance?: Stripe.Emptyable<
2452
- SubscriptionData.BillOnAcceptance
2453
- >;
2454
-
2455
- /**
2456
- * 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.
2457
- */
2458
- billing_behavior?: SubscriptionData.BillingBehavior;
2459
-
2460
- /**
2461
- * When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
2462
- */
2463
- billing_cycle_anchor?: Stripe.Emptyable<'reset'>;
2464
-
2465
620
  /**
2466
621
  * 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.
2467
622
  */
@@ -2472,355 +627,17 @@ declare module 'stripe' {
2472
627
  */
2473
628
  effective_date?: Stripe.Emptyable<'current_period_end' | number>;
2474
629
 
2475
- /**
2476
- * Behavior of the subscription schedule and underlying subscription when it ends.
2477
- */
2478
- end_behavior?: SubscriptionData.EndBehavior;
2479
-
2480
630
  /**
2481
631
  * 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.
2482
632
  */
2483
633
  metadata?: Stripe.MetadataParam;
2484
634
 
2485
- /**
2486
- * If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
2487
- */
2488
- prebilling?: Stripe.Emptyable<SubscriptionData.Prebilling>;
2489
-
2490
- /**
2491
- * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2492
- *
2493
- * When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2494
- *
2495
- * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
2496
- *
2497
- * Prorations can be disabled by passing `none`.
2498
- */
2499
- proration_behavior?: SubscriptionData.ProrationBehavior;
2500
-
2501
635
  /**
2502
636
  * Integer representing the number of trial period days before the customer is charged for the first time.
2503
637
  */
2504
638
  trial_period_days?: Stripe.Emptyable<number>;
2505
639
  }
2506
640
 
2507
- namespace SubscriptionData {
2508
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
2509
-
2510
- interface BillOnAcceptance {
2511
- /**
2512
- * The start of the period to bill from when the Quote is accepted.
2513
- */
2514
- bill_from?: BillOnAcceptance.BillFrom;
2515
-
2516
- /**
2517
- * The end of the period to bill until when the Quote is accepted.
2518
- */
2519
- bill_until?: BillOnAcceptance.BillUntil;
2520
- }
2521
-
2522
- namespace BillOnAcceptance {
2523
- interface BillFrom {
2524
- /**
2525
- * Details of a Quote line to start the bill period from.
2526
- */
2527
- line_starts_at?: BillFrom.LineStartsAt;
2528
-
2529
- /**
2530
- * A precise Unix timestamp.
2531
- */
2532
- timestamp?: number;
2533
-
2534
- /**
2535
- * The type of method to specify the `bill_from` time.
2536
- */
2537
- type: BillFrom.Type;
2538
- }
2539
-
2540
- namespace BillFrom {
2541
- interface LineStartsAt {
2542
- /**
2543
- * The ID of a quote line.
2544
- */
2545
- id?: string;
2546
-
2547
- /**
2548
- * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2549
- */
2550
- index?: number;
2551
- }
2552
-
2553
- type Type =
2554
- | 'line_starts_at'
2555
- | 'now'
2556
- | 'pause_collection_start'
2557
- | 'quote_acceptance_date'
2558
- | 'timestamp';
2559
- }
2560
-
2561
- interface BillUntil {
2562
- /**
2563
- * Details of the duration over which to bill.
2564
- */
2565
- duration?: BillUntil.Duration;
2566
-
2567
- /**
2568
- * Details of a Quote line item from which to bill until.
2569
- */
2570
- line_ends_at?: BillUntil.LineEndsAt;
2571
-
2572
- /**
2573
- * A precise Unix timestamp.
2574
- */
2575
- timestamp?: number;
2576
-
2577
- /**
2578
- * The type of method to specify the `bill_until` time.
2579
- */
2580
- type: BillUntil.Type;
2581
- }
2582
-
2583
- namespace BillUntil {
2584
- interface Duration {
2585
- /**
2586
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2587
- */
2588
- interval: Duration.Interval;
2589
-
2590
- /**
2591
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2592
- */
2593
- interval_count: number;
2594
- }
2595
-
2596
- namespace Duration {
2597
- type Interval = 'day' | 'month' | 'week' | 'year';
2598
- }
2599
-
2600
- interface LineEndsAt {
2601
- /**
2602
- * The ID of a quote line.
2603
- */
2604
- id?: string;
2605
-
2606
- /**
2607
- * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2608
- */
2609
- index?: number;
2610
- }
2611
-
2612
- type Type =
2613
- | 'duration'
2614
- | 'line_ends_at'
2615
- | 'schedule_end'
2616
- | 'timestamp'
2617
- | 'upcoming_invoice';
2618
- }
2619
- }
2620
-
2621
- type EndBehavior = 'cancel' | 'release';
2622
-
2623
- interface Prebilling {
2624
- /**
2625
- * This is used to determine the number of billing cycles to prebill.
2626
- */
2627
- iterations: number;
2628
- }
2629
-
2630
- type ProrationBehavior =
2631
- | 'always_invoice'
2632
- | 'create_prorations'
2633
- | 'none';
2634
- }
2635
-
2636
- interface SubscriptionDataOverride {
2637
- /**
2638
- * Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
2639
- */
2640
- applies_to: SubscriptionDataOverride.AppliesTo;
2641
-
2642
- /**
2643
- * Describes the period to bill for upon accepting the quote.
2644
- */
2645
- bill_on_acceptance?: Stripe.Emptyable<
2646
- SubscriptionDataOverride.BillOnAcceptance
2647
- >;
2648
-
2649
- /**
2650
- * 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.
2651
- */
2652
- billing_behavior?: SubscriptionDataOverride.BillingBehavior;
2653
-
2654
- /**
2655
- * The customer the Subscription Data override applies to.
2656
- */
2657
- customer?: string;
2658
-
2659
- /**
2660
- * 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.
2661
- */
2662
- description?: Stripe.Emptyable<string>;
2663
-
2664
- /**
2665
- * Behavior of the subscription schedule and underlying subscription when it ends.
2666
- */
2667
- end_behavior?: SubscriptionDataOverride.EndBehavior;
2668
-
2669
- /**
2670
- * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2671
- *
2672
- * When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2673
- *
2674
- * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.
2675
- *
2676
- * Prorations can be disabled by passing `none`.
2677
- */
2678
- proration_behavior?: SubscriptionDataOverride.ProrationBehavior;
2679
- }
2680
-
2681
- namespace SubscriptionDataOverride {
2682
- interface AppliesTo {
2683
- /**
2684
- * 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.
2685
- */
2686
- new_reference?: string;
2687
-
2688
- /**
2689
- * The ID of the schedule the line applies to.
2690
- */
2691
- subscription_schedule?: string;
2692
-
2693
- /**
2694
- * Describes whether the quote line is affecting a new schedule or an existing schedule.
2695
- */
2696
- type: AppliesTo.Type;
2697
- }
2698
-
2699
- namespace AppliesTo {
2700
- type Type = 'new_reference' | 'subscription_schedule';
2701
- }
2702
-
2703
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
2704
-
2705
- interface BillOnAcceptance {
2706
- /**
2707
- * The start of the period to bill from when the Quote is accepted.
2708
- */
2709
- bill_from?: BillOnAcceptance.BillFrom;
2710
-
2711
- /**
2712
- * The end of the period to bill until when the Quote is accepted.
2713
- */
2714
- bill_until?: BillOnAcceptance.BillUntil;
2715
- }
2716
-
2717
- namespace BillOnAcceptance {
2718
- interface BillFrom {
2719
- /**
2720
- * Details of a Quote line to start the bill period from.
2721
- */
2722
- line_starts_at?: BillFrom.LineStartsAt;
2723
-
2724
- /**
2725
- * A precise Unix timestamp.
2726
- */
2727
- timestamp?: number;
2728
-
2729
- /**
2730
- * The type of method to specify the `bill_from` time.
2731
- */
2732
- type: BillFrom.Type;
2733
- }
2734
-
2735
- namespace BillFrom {
2736
- interface LineStartsAt {
2737
- /**
2738
- * The ID of a quote line.
2739
- */
2740
- id?: string;
2741
-
2742
- /**
2743
- * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2744
- */
2745
- index?: number;
2746
- }
2747
-
2748
- type Type =
2749
- | 'line_starts_at'
2750
- | 'now'
2751
- | 'pause_collection_start'
2752
- | 'quote_acceptance_date'
2753
- | 'timestamp';
2754
- }
2755
-
2756
- interface BillUntil {
2757
- /**
2758
- * Details of the duration over which to bill.
2759
- */
2760
- duration?: BillUntil.Duration;
2761
-
2762
- /**
2763
- * Details of a Quote line item from which to bill until.
2764
- */
2765
- line_ends_at?: BillUntil.LineEndsAt;
2766
-
2767
- /**
2768
- * A precise Unix timestamp.
2769
- */
2770
- timestamp?: number;
2771
-
2772
- /**
2773
- * The type of method to specify the `bill_until` time.
2774
- */
2775
- type: BillUntil.Type;
2776
- }
2777
-
2778
- namespace BillUntil {
2779
- interface Duration {
2780
- /**
2781
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2782
- */
2783
- interval: Duration.Interval;
2784
-
2785
- /**
2786
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2787
- */
2788
- interval_count: number;
2789
- }
2790
-
2791
- namespace Duration {
2792
- type Interval = 'day' | 'month' | 'week' | 'year';
2793
- }
2794
-
2795
- interface LineEndsAt {
2796
- /**
2797
- * The ID of a quote line.
2798
- */
2799
- id?: string;
2800
-
2801
- /**
2802
- * The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array.
2803
- */
2804
- index?: number;
2805
- }
2806
-
2807
- type Type =
2808
- | 'duration'
2809
- | 'line_ends_at'
2810
- | 'schedule_end'
2811
- | 'timestamp'
2812
- | 'upcoming_invoice';
2813
- }
2814
- }
2815
-
2816
- type EndBehavior = 'cancel' | 'release';
2817
-
2818
- type ProrationBehavior =
2819
- | 'always_invoice'
2820
- | 'create_prorations'
2821
- | 'none';
2822
- }
2823
-
2824
641
  interface TransferData {
2825
642
  /**
2826
643
  * The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
@@ -2845,21 +662,11 @@ declare module 'stripe' {
2845
662
  */
2846
663
  customer?: string;
2847
664
 
2848
- /**
2849
- * The ID of the account whose quotes will be retrieved.
2850
- */
2851
- customer_account?: string;
2852
-
2853
665
  /**
2854
666
  * Specifies which fields in the response should be expanded.
2855
667
  */
2856
668
  expand?: Array<string>;
2857
669
 
2858
- /**
2859
- * The subscription which the quote updates.
2860
- */
2861
- from_subscription?: string;
2862
-
2863
670
  /**
2864
671
  * The status of the quote.
2865
672
  */
@@ -2872,13 +679,7 @@ declare module 'stripe' {
2872
679
  }
2873
680
 
2874
681
  namespace QuoteListParams {
2875
- type Status =
2876
- | 'accepted'
2877
- | 'accepting'
2878
- | 'canceled'
2879
- | 'draft'
2880
- | 'open'
2881
- | 'stale';
682
+ type Status = 'accepted' | 'canceled' | 'draft' | 'open';
2882
683
  }
2883
684
 
2884
685
  interface QuoteAcceptParams {
@@ -2907,13 +708,6 @@ declare module 'stripe' {
2907
708
  expires_at?: number;
2908
709
  }
2909
710
 
2910
- interface QuoteListPreviewInvoiceLinesParams extends PaginationParams {
2911
- /**
2912
- * Specifies which fields in the response should be expanded.
2913
- */
2914
- expand?: Array<string>;
2915
- }
2916
-
2917
711
  interface QuoteListComputedUpfrontLineItemsParams extends PaginationParams {
2918
712
  /**
2919
713
  * Specifies which fields in the response should be expanded.
@@ -2928,47 +722,6 @@ declare module 'stripe' {
2928
722
  expand?: Array<string>;
2929
723
  }
2930
724
 
2931
- interface QuoteListLinesParams extends PaginationParams {
2932
- /**
2933
- * Specifies which fields in the response should be expanded.
2934
- */
2935
- expand?: Array<string>;
2936
- }
2937
-
2938
- interface QuoteListPreviewInvoicesParams extends PaginationParams {
2939
- /**
2940
- * Specifies which fields in the response should be expanded.
2941
- */
2942
- expand?: Array<string>;
2943
- }
2944
-
2945
- interface QuoteListPreviewSubscriptionSchedulesParams
2946
- extends PaginationParams {
2947
- /**
2948
- * Specifies which fields in the response should be expanded.
2949
- */
2950
- expand?: Array<string>;
2951
- }
2952
-
2953
- interface QuoteMarkDraftParams {
2954
- /**
2955
- * Specifies which fields in the response should be expanded.
2956
- */
2957
- expand?: Array<string>;
2958
- }
2959
-
2960
- interface QuoteMarkStaleParams {
2961
- /**
2962
- * Specifies which fields in the response should be expanded.
2963
- */
2964
- expand?: Array<string>;
2965
-
2966
- /**
2967
- * Reason the Quote is being marked stale.
2968
- */
2969
- reason?: string;
2970
- }
2971
-
2972
725
  interface QuotePdfParams {
2973
726
  /**
2974
727
  * Specifies which fields in the response should be expanded.
@@ -2976,13 +729,6 @@ declare module 'stripe' {
2976
729
  expand?: Array<string>;
2977
730
  }
2978
731
 
2979
- interface QuoteReestimateParams {
2980
- /**
2981
- * Specifies which fields in the response should be expanded.
2982
- */
2983
- expand?: Array<string>;
2984
- }
2985
-
2986
732
  class QuotesResource {
2987
733
  /**
2988
734
  * A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote).
@@ -3063,21 +809,6 @@ declare module 'stripe' {
3063
809
  options?: RequestOptions
3064
810
  ): Promise<Stripe.Response<Stripe.Quote>>;
3065
811
 
3066
- /**
3067
- * Preview the invoice line items that would be generated by accepting the quote.
3068
- */
3069
- listPreviewInvoiceLines(
3070
- quoteId: string,
3071
- id: string,
3072
- params?: QuoteListPreviewInvoiceLinesParams,
3073
- options?: RequestOptions
3074
- ): ApiListPromise<Stripe.InvoiceLineItem>;
3075
- listPreviewInvoiceLines(
3076
- quoteId: string,
3077
- id: string,
3078
- options?: RequestOptions
3079
- ): ApiListPromise<Stripe.InvoiceLineItem>;
3080
-
3081
812
  /**
3082
813
  * When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
3083
814
  */
@@ -3104,71 +835,6 @@ declare module 'stripe' {
3104
835
  options?: RequestOptions
3105
836
  ): ApiListPromise<Stripe.LineItem>;
3106
837
 
3107
- /**
3108
- * Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
3109
- */
3110
- listLines(
3111
- id: string,
3112
- params?: QuoteListLinesParams,
3113
- options?: RequestOptions
3114
- ): ApiListPromise<Stripe.QuoteLine>;
3115
- listLines(
3116
- id: string,
3117
- options?: RequestOptions
3118
- ): ApiListPromise<Stripe.QuoteLine>;
3119
-
3120
- /**
3121
- * Preview the invoices that would be generated by accepting the quote.
3122
- */
3123
- listPreviewInvoices(
3124
- id: string,
3125
- params?: QuoteListPreviewInvoicesParams,
3126
- options?: RequestOptions
3127
- ): ApiListPromise<Stripe.QuotePreviewInvoice>;
3128
- listPreviewInvoices(
3129
- id: string,
3130
- options?: RequestOptions
3131
- ): ApiListPromise<Stripe.QuotePreviewInvoice>;
3132
-
3133
- /**
3134
- * Preview the schedules that would be generated by accepting the quote
3135
- */
3136
- listPreviewSubscriptionSchedules(
3137
- id: string,
3138
- params?: QuoteListPreviewSubscriptionSchedulesParams,
3139
- options?: RequestOptions
3140
- ): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
3141
- listPreviewSubscriptionSchedules(
3142
- id: string,
3143
- options?: RequestOptions
3144
- ): ApiListPromise<Stripe.QuotePreviewSubscriptionSchedule>;
3145
-
3146
- /**
3147
- * Converts a stale quote to draft.
3148
- */
3149
- markDraft(
3150
- id: string,
3151
- params?: QuoteMarkDraftParams,
3152
- options?: RequestOptions
3153
- ): Promise<Stripe.Response<Stripe.Quote>>;
3154
- markDraft(
3155
- id: string,
3156
- options?: RequestOptions
3157
- ): Promise<Stripe.Response<Stripe.Quote>>;
3158
-
3159
- /**
3160
- * Converts a draft or open quote to stale.
3161
- */
3162
- markStale(
3163
- id: string,
3164
- params?: QuoteMarkStaleParams,
3165
- options?: RequestOptions
3166
- ): Promise<Stripe.Response<Stripe.Quote>>;
3167
- markStale(
3168
- id: string,
3169
- options?: RequestOptions
3170
- ): Promise<Stripe.Response<Stripe.Quote>>;
3171
-
3172
838
  /**
3173
839
  * Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
3174
840
  */
@@ -3178,19 +844,6 @@ declare module 'stripe' {
3178
844
  options?: RequestOptions
3179
845
  ): Promise<StripeStreamResponse>;
3180
846
  pdf(id: string, options?: RequestOptions): Promise<StripeStreamResponse>;
3181
-
3182
- /**
3183
- * Recompute the upcoming invoice estimate for the quote.
3184
- */
3185
- reestimate(
3186
- id: string,
3187
- params?: QuoteReestimateParams,
3188
- options?: RequestOptions
3189
- ): Promise<Stripe.Response<Stripe.Quote>>;
3190
- reestimate(
3191
- id: string,
3192
- options?: RequestOptions
3193
- ): Promise<Stripe.Response<Stripe.Quote>>;
3194
847
  }
3195
848
  }
3196
849
  }