stripe 19.1.0-beta.1 → 19.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/CHANGELOG.md +21 -1433
  2. package/OPENAPI_VERSION +1 -1
  3. package/README.md +2 -3
  4. package/VERSION +1 -1
  5. package/cjs/Error.js +1 -115
  6. package/cjs/apiVersion.js +3 -2
  7. package/cjs/resources/FinancialConnections/Accounts.js +0 -5
  8. package/cjs/resources/Mandates.js +0 -5
  9. package/cjs/resources/PaymentIntents.js +0 -13
  10. package/cjs/resources/Quotes.js +0 -32
  11. package/cjs/resources/SubscriptionSchedules.js +0 -4
  12. package/cjs/resources/Subscriptions.js +0 -4
  13. package/cjs/resources.js +8 -110
  14. package/cjs/stripe.core.js +9 -8
  15. package/esm/Error.js +0 -100
  16. package/esm/apiVersion.js +2 -1
  17. package/esm/resources/FinancialConnections/Accounts.js +0 -5
  18. package/esm/resources/Mandates.js +0 -5
  19. package/esm/resources/PaymentIntents.js +0 -13
  20. package/esm/resources/Quotes.js +0 -32
  21. package/esm/resources/SubscriptionSchedules.js +0 -4
  22. package/esm/resources/Subscriptions.js +0 -4
  23. package/esm/resources.js +0 -95
  24. package/esm/stripe.core.js +9 -8
  25. package/package.json +1 -1
  26. package/types/AccountLinksResource.d.ts +1 -5
  27. package/types/AccountSessions.d.ts +0 -45
  28. package/types/AccountSessionsResource.d.ts +0 -264
  29. package/types/Accounts.d.ts +1 -212
  30. package/types/AccountsResource.d.ts +0 -544
  31. package/types/Billing/AlertTriggereds.d.ts +1 -1
  32. package/types/Billing/CreditBalanceSummary.d.ts +0 -5
  33. package/types/Billing/CreditBalanceSummaryResource.d.ts +3 -8
  34. package/types/Billing/CreditBalanceTransactionsResource.d.ts +4 -12
  35. package/types/Billing/CreditGrants.d.ts +0 -5
  36. package/types/Billing/CreditGrantsResource.d.ts +1 -11
  37. package/types/BillingPortal/Sessions.d.ts +0 -5
  38. package/types/BillingPortal/SessionsResource.d.ts +4 -12
  39. package/types/Cards.d.ts +0 -5
  40. package/types/CashBalances.d.ts +0 -5
  41. package/types/Charges.d.ts +0 -171
  42. package/types/ChargesResource.d.ts +0 -1406
  43. package/types/Checkout/Sessions.d.ts +2 -369
  44. package/types/Checkout/SessionsResource.d.ts +2 -634
  45. package/types/ConfirmationTokens.d.ts +0 -125
  46. package/types/Coupons.d.ts +0 -33
  47. package/types/CouponsResource.d.ts +0 -21
  48. package/types/CreditNoteLineItems.d.ts +0 -17
  49. package/types/CreditNotes.d.ts +0 -5
  50. package/types/CreditNotesResource.d.ts +0 -5
  51. package/types/CustomerBalanceTransactions.d.ts +0 -2
  52. package/types/CustomerCashBalanceTransactions.d.ts +0 -2
  53. package/types/CustomerSessions.d.ts +0 -5
  54. package/types/CustomerSessionsResource.d.ts +1 -6
  55. package/types/Customers.d.ts +0 -2
  56. package/types/CustomersResource.d.ts +0 -8
  57. package/types/Discounts.d.ts +0 -10
  58. package/types/Disputes.d.ts +0 -40
  59. package/types/DisputesResource.d.ts +0 -11
  60. package/types/Errors.d.ts +0 -85
  61. package/types/EventTypes.d.ts +0 -664
  62. package/types/Events.d.ts +0 -97
  63. package/types/FinancialConnections/Accounts.d.ts +1 -36
  64. package/types/FinancialConnections/AccountsResource.d.ts +3 -40
  65. package/types/FinancialConnections/Sessions.d.ts +1 -51
  66. package/types/FinancialConnections/SessionsResource.d.ts +1 -43
  67. package/types/Identity/VerificationSessions.d.ts +0 -5
  68. package/types/Identity/VerificationSessionsResource.d.ts +0 -7
  69. package/types/InvoiceItems.d.ts +0 -10
  70. package/types/InvoiceItemsResource.d.ts +6 -117
  71. package/types/InvoiceLineItems.d.ts +1 -45
  72. package/types/InvoicePayments.d.ts +0 -5
  73. package/types/InvoicePaymentsResource.d.ts +1 -10
  74. package/types/Invoices.d.ts +4 -204
  75. package/types/InvoicesResource.d.ts +22 -1647
  76. package/types/Issuing/CardholdersResource.d.ts +1 -2
  77. package/types/Issuing/Transactions.d.ts +0 -5
  78. package/types/Issuing/TransactionsResource.d.ts +0 -5
  79. package/types/LineItems.d.ts +0 -49
  80. package/types/Mandates.d.ts +1 -135
  81. package/types/MandatesResource.d.ts +0 -31
  82. package/types/PaymentIntents.d.ts +3 -825
  83. package/types/PaymentIntentsResource.d.ts +5597 -11436
  84. package/types/PaymentLinks.d.ts +0 -7
  85. package/types/PaymentLinksResource.d.ts +0 -14
  86. package/types/PaymentMethodConfigurations.d.ts +0 -216
  87. package/types/PaymentMethodConfigurationsResource.d.ts +0 -300
  88. package/types/PaymentMethods.d.ts +0 -130
  89. package/types/PaymentMethodsResource.d.ts +2 -167
  90. package/types/Prices.d.ts +0 -22
  91. package/types/PricesResource.d.ts +0 -22
  92. package/types/PromotionCodes.d.ts +0 -5
  93. package/types/PromotionCodesResource.d.ts +0 -10
  94. package/types/Quotes.d.ts +1 -594
  95. package/types/QuotesResource.d.ts +290 -2635
  96. package/types/Refunds.d.ts +0 -14
  97. package/types/SetupAttempts.d.ts +1 -51
  98. package/types/SetupIntents.d.ts +2 -210
  99. package/types/SetupIntentsResource.d.ts +3 -937
  100. package/types/Sources.d.ts +0 -29
  101. package/types/SubscriptionItems.d.ts +0 -26
  102. package/types/SubscriptionItemsResource.d.ts +0 -109
  103. package/types/SubscriptionSchedules.d.ts +0 -205
  104. package/types/SubscriptionSchedulesResource.d.ts +4 -1232
  105. package/types/Subscriptions.d.ts +1 -263
  106. package/types/SubscriptionsResource.d.ts +8 -747
  107. package/types/TaxIds.d.ts +0 -10
  108. package/types/TaxIdsResource.d.ts +0 -10
  109. package/types/Terminal/Configurations.d.ts +0 -9
  110. package/types/Terminal/ConfigurationsResource.d.ts +0 -28
  111. package/types/Terminal/Readers.d.ts +0 -20
  112. package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -126
  113. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
  114. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
  115. package/types/Transfers.d.ts +0 -5
  116. package/types/TransfersResource.d.ts +0 -5
  117. package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
  118. package/types/Treasury/FinancialAccounts.d.ts +0 -5
  119. package/types/Treasury/FinancialAccountsResource.d.ts +0 -37
  120. package/types/Treasury/OutboundTransfers.d.ts +0 -26
  121. package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
  122. package/types/Treasury/ReceivedCredits.d.ts +0 -26
  123. package/types/Treasury/ReceivedDebits.d.ts +0 -31
  124. package/types/V2/Core/EventTypes.d.ts +10 -1647
  125. package/types/V2/EventMisc.d.ts +8 -0
  126. package/types/WebhookEndpointsResource.d.ts +0 -78
  127. package/types/apiVersion.d.ts +2 -1
  128. package/types/index.d.ts +0 -160
  129. package/types/lib.d.ts +0 -10
  130. package/types/test/typescriptTest.ts +7 -0
  131. package/cjs/resources/AccountNotices.js +0 -21
  132. package/cjs/resources/Billing/Analytics/MeterUsage.js +0 -12
  133. package/cjs/resources/Capital/FinancingOffers.js +0 -21
  134. package/cjs/resources/Capital/FinancingSummary.js +0 -12
  135. package/cjs/resources/Capital/FinancingTransactions.js +0 -17
  136. package/cjs/resources/ExternalAccounts.js +0 -23
  137. package/cjs/resources/FinancialConnections/Institutions.js +0 -17
  138. package/cjs/resources/FxQuotes.js +0 -15
  139. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
  140. package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
  141. package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
  142. package/cjs/resources/Margins.js +0 -22
  143. package/cjs/resources/Orders.js +0 -24
  144. package/cjs/resources/PaymentAttemptRecords.js +0 -17
  145. package/cjs/resources/PaymentRecords.js +0 -33
  146. package/cjs/resources/Privacy/RedactionJobs.js +0 -42
  147. package/cjs/resources/Tax/Associations.js +0 -9
  148. package/cjs/resources/Tax/Forms.js +0 -20
  149. package/cjs/resources/Terminal/OnboardingLinks.js +0 -12
  150. package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
  151. package/cjs/resources/V2/Billing/BillSettings/Versions.js +0 -17
  152. package/cjs/resources/V2/Billing/BillSettings.js +0 -27
  153. package/cjs/resources/V2/Billing/Cadences.js +0 -23
  154. package/cjs/resources/V2/Billing/CollectionSettings/Versions.js +0 -17
  155. package/cjs/resources/V2/Billing/CollectionSettings.js +0 -30
  156. package/cjs/resources/V2/Billing/Profiles.js +0 -19
  157. package/cjs/resources/V2/Core/AccountLinks.js +0 -9
  158. package/cjs/resources/V2/Core/Accounts/Persons.js +0 -29
  159. package/cjs/resources/V2/Core/Accounts.js +0 -25
  160. package/cjs/resources/V2/Core/Vault/GbBankAccounts.js +0 -28
  161. package/cjs/resources/V2/Core/Vault/UsBankAccounts.js +0 -24
  162. package/cjs/resources/V2/MoneyManagement/Adjustments.js +0 -17
  163. package/cjs/resources/V2/MoneyManagement/FinancialAccounts.js +0 -25
  164. package/cjs/resources/V2/MoneyManagement/FinancialAddresses.js +0 -21
  165. package/cjs/resources/V2/MoneyManagement/InboundTransfers.js +0 -21
  166. package/cjs/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -16
  167. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js +0 -25
  168. package/cjs/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -29
  169. package/cjs/resources/V2/MoneyManagement/OutboundTransfers.js +0 -25
  170. package/cjs/resources/V2/MoneyManagement/PayoutMethods.js +0 -25
  171. package/cjs/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -12
  172. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.js +0 -17
  173. package/cjs/resources/V2/MoneyManagement/ReceivedDebits.js +0 -17
  174. package/cjs/resources/V2/MoneyManagement/TransactionEntries.js +0 -17
  175. package/cjs/resources/V2/MoneyManagement/Transactions.js +0 -17
  176. package/cjs/resources/V2/Payments/OffSessionPayments.js +0 -29
  177. package/cjs/resources/V2/TestHelpers/FinancialAddresses.js +0 -16
  178. package/esm/resources/AccountNotices.js +0 -18
  179. package/esm/resources/Billing/Analytics/MeterUsage.js +0 -9
  180. package/esm/resources/Capital/FinancingOffers.js +0 -18
  181. package/esm/resources/Capital/FinancingSummary.js +0 -9
  182. package/esm/resources/Capital/FinancingTransactions.js +0 -14
  183. package/esm/resources/ExternalAccounts.js +0 -20
  184. package/esm/resources/FinancialConnections/Institutions.js +0 -14
  185. package/esm/resources/FxQuotes.js +0 -12
  186. package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
  187. package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
  188. package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
  189. package/esm/resources/Margins.js +0 -19
  190. package/esm/resources/Orders.js +0 -21
  191. package/esm/resources/PaymentAttemptRecords.js +0 -14
  192. package/esm/resources/PaymentRecords.js +0 -30
  193. package/esm/resources/Privacy/RedactionJobs.js +0 -39
  194. package/esm/resources/Tax/Associations.js +0 -6
  195. package/esm/resources/Tax/Forms.js +0 -17
  196. package/esm/resources/Terminal/OnboardingLinks.js +0 -9
  197. package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
  198. package/esm/resources/V2/Billing/BillSettings/Versions.js +0 -14
  199. package/esm/resources/V2/Billing/BillSettings.js +0 -24
  200. package/esm/resources/V2/Billing/Cadences.js +0 -20
  201. package/esm/resources/V2/Billing/CollectionSettings/Versions.js +0 -14
  202. package/esm/resources/V2/Billing/CollectionSettings.js +0 -27
  203. package/esm/resources/V2/Billing/Profiles.js +0 -16
  204. package/esm/resources/V2/Core/AccountLinks.js +0 -6
  205. package/esm/resources/V2/Core/Accounts/Persons.js +0 -26
  206. package/esm/resources/V2/Core/Accounts.js +0 -22
  207. package/esm/resources/V2/Core/Vault/GbBankAccounts.js +0 -25
  208. package/esm/resources/V2/Core/Vault/UsBankAccounts.js +0 -21
  209. package/esm/resources/V2/MoneyManagement/Adjustments.js +0 -14
  210. package/esm/resources/V2/MoneyManagement/FinancialAccounts.js +0 -22
  211. package/esm/resources/V2/MoneyManagement/FinancialAddresses.js +0 -18
  212. package/esm/resources/V2/MoneyManagement/InboundTransfers.js +0 -18
  213. package/esm/resources/V2/MoneyManagement/OutboundPaymentQuotes.js +0 -13
  214. package/esm/resources/V2/MoneyManagement/OutboundPayments.js +0 -22
  215. package/esm/resources/V2/MoneyManagement/OutboundSetupIntents.js +0 -26
  216. package/esm/resources/V2/MoneyManagement/OutboundTransfers.js +0 -22
  217. package/esm/resources/V2/MoneyManagement/PayoutMethods.js +0 -22
  218. package/esm/resources/V2/MoneyManagement/PayoutMethodsBankAccountSpec.js +0 -9
  219. package/esm/resources/V2/MoneyManagement/ReceivedCredits.js +0 -14
  220. package/esm/resources/V2/MoneyManagement/ReceivedDebits.js +0 -14
  221. package/esm/resources/V2/MoneyManagement/TransactionEntries.js +0 -14
  222. package/esm/resources/V2/MoneyManagement/Transactions.js +0 -14
  223. package/esm/resources/V2/Payments/OffSessionPayments.js +0 -26
  224. package/esm/resources/V2/TestHelpers/FinancialAddresses.js +0 -13
  225. package/types/AccountNotices.d.ts +0 -113
  226. package/types/AccountNoticesResource.d.ts +0 -98
  227. package/types/Billing/Analytics/MeterUsage.d.ts +0 -31
  228. package/types/Billing/Analytics/MeterUsageResource.d.ts +0 -689
  229. package/types/Billing/Analytics/MeterUsageRows.d.ts +0 -51
  230. package/types/Capital/FinancingOffers.d.ts +0 -188
  231. package/types/Capital/FinancingOffersResource.d.ts +0 -97
  232. package/types/Capital/FinancingSummary.d.ts +0 -106
  233. package/types/Capital/FinancingSummaryResource.d.ts +0 -27
  234. package/types/Capital/FinancingTransactions.d.ts +0 -135
  235. package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
  236. package/types/ExternalAccountsResource.d.ts +0 -304
  237. package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
  238. package/types/FinancialConnections/Institutions.d.ts +0 -98
  239. package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
  240. package/types/FxQuotes.d.ts +0 -155
  241. package/types/FxQuotesResource.d.ts +0 -130
  242. package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
  243. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
  244. package/types/Issuing/DisputeSettlementDetails.d.ts +0 -85
  245. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
  246. package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
  247. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
  248. package/types/Issuing/Settlements.d.ts +0 -113
  249. package/types/Margins.d.ts +0 -56
  250. package/types/MarginsResource.d.ts +0 -114
  251. package/types/Orders.d.ts +0 -1163
  252. package/types/OrdersResource.d.ts +0 -3139
  253. package/types/PaymentAttemptRecords.d.ts +0 -2360
  254. package/types/PaymentAttemptRecordsResource.d.ts +0 -52
  255. package/types/PaymentIntentAmountDetailsLineItems.d.ts +0 -116
  256. package/types/PaymentRecords.d.ts +0 -2353
  257. package/types/PaymentRecordsResource.d.ts +0 -559
  258. package/types/Privacy/RedactionJobValidationErrors.d.ts +0 -60
  259. package/types/Privacy/RedactionJobs.d.ts +0 -111
  260. package/types/Privacy/RedactionJobsResource.d.ts +0 -230
  261. package/types/QuoteLines.d.ts +0 -634
  262. package/types/QuotePreviewInvoices.d.ts +0 -1770
  263. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -908
  264. package/types/Tax/Associations.d.ts +0 -82
  265. package/types/Tax/AssociationsResource.d.ts +0 -29
  266. package/types/Tax/Forms.d.ts +0 -220
  267. package/types/Tax/FormsResource.d.ts +0 -107
  268. package/types/Terminal/OnboardingLinks.d.ts +0 -57
  269. package/types/Terminal/OnboardingLinksResource.d.ts +0 -62
  270. package/types/Terminal/ReaderCollectedData.d.ts +0 -51
  271. package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
  272. package/types/V2/Billing/BillSettingVersions.d.ts +0 -97
  273. package/types/V2/Billing/BillSettings/VersionsResource.d.ts +0 -58
  274. package/types/V2/Billing/BillSettings.d.ts +0 -120
  275. package/types/V2/Billing/BillSettingsResource.d.ts +0 -241
  276. package/types/V2/Billing/Cadences.d.ts +0 -686
  277. package/types/V2/Billing/CadencesResource.d.ts +0 -487
  278. package/types/V2/Billing/CollectionSettingVersions.d.ts +0 -314
  279. package/types/V2/Billing/CollectionSettings/VersionsResource.d.ts +0 -62
  280. package/types/V2/Billing/CollectionSettings.d.ts +0 -337
  281. package/types/V2/Billing/CollectionSettingsResource.d.ts +0 -675
  282. package/types/V2/Billing/Profiles.d.ts +0 -70
  283. package/types/V2/Billing/ProfilesResource.d.ts +0 -150
  284. package/types/V2/Core/AccountLinks.d.ts +0 -168
  285. package/types/V2/Core/AccountLinksResource.d.ts +0 -152
  286. package/types/V2/Core/AccountPersons.d.ts +0 -615
  287. package/types/V2/Core/Accounts/PersonsResource.d.ts +0 -1153
  288. package/types/V2/Core/Accounts.d.ts +0 -5919
  289. package/types/V2/Core/AccountsResource.d.ts +0 -4999
  290. package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -160
  291. package/types/V2/Core/Vault/GbBankAccountsResource.d.ts +0 -172
  292. package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -70
  293. package/types/V2/Core/Vault/UsBankAccountsResource.d.ts +0 -123
  294. package/types/V2/FinancialAddressCreditSimulations.d.ts +0 -27
  295. package/types/V2/FinancialAddressGeneratedMicrodeposits.d.ts +0 -32
  296. package/types/V2/MoneyManagement/Adjustments.d.ts +0 -110
  297. package/types/V2/MoneyManagement/AdjustmentsResource.d.ts +0 -83
  298. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +0 -148
  299. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -147
  300. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +0 -178
  301. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +0 -112
  302. package/types/V2/MoneyManagement/InboundTransfers.d.ts +0 -206
  303. package/types/V2/MoneyManagement/InboundTransfersResource.d.ts +0 -144
  304. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -170
  305. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -115
  306. package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -278
  307. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -242
  308. package/types/V2/MoneyManagement/OutboundSetupIntents.d.ts +0 -97
  309. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -296
  310. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -251
  311. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -208
  312. package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -160
  313. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpec.d.ts +0 -93
  314. package/types/V2/MoneyManagement/PayoutMethodsBankAccountSpecResource.d.ts +0 -41
  315. package/types/V2/MoneyManagement/PayoutMethodsResource.d.ts +0 -113
  316. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +0 -302
  317. package/types/V2/MoneyManagement/ReceivedCreditsResource.d.ts +0 -78
  318. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +0 -176
  319. package/types/V2/MoneyManagement/ReceivedDebitsResource.d.ts +0 -48
  320. package/types/V2/MoneyManagement/TransactionEntries.d.ts +0 -162
  321. package/types/V2/MoneyManagement/TransactionEntriesResource.d.ts +0 -82
  322. package/types/V2/MoneyManagement/Transactions.d.ts +0 -177
  323. package/types/V2/MoneyManagement/TransactionsResource.d.ts +0 -83
  324. package/types/V2/Payments/OffSessionPayments.d.ts +0 -326
  325. package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -401
  326. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +0 -68
@@ -8,11 +8,6 @@ declare module 'stripe' {
8
8
  */
9
9
  account_tax_ids?: Stripe.Emptyable<Array<string>>;
10
10
 
11
- /**
12
- * List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
13
- */
14
- amounts_due?: Stripe.Emptyable<Array<InvoiceCreateParams.AmountsDue>>;
15
-
16
11
  /**
17
12
  * A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
18
13
  */
@@ -53,21 +48,11 @@ declare module 'stripe' {
53
48
  */
54
49
  customer?: string;
55
50
 
56
- /**
57
- * The ID of the account who will be billed.
58
- */
59
- customer_account?: string;
60
-
61
51
  /**
62
52
  * The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
63
53
  */
64
54
  days_until_due?: number;
65
55
 
66
- /**
67
- * The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
68
- */
69
- default_margins?: Array<string>;
70
-
71
56
  /**
72
57
  * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
73
58
  */
@@ -180,28 +165,6 @@ declare module 'stripe' {
180
165
  }
181
166
 
182
167
  namespace InvoiceCreateParams {
183
- interface AmountsDue {
184
- /**
185
- * The amount in cents (or local equivalent).
186
- */
187
- amount: number;
188
-
189
- /**
190
- * Number of days from when invoice is finalized until the payment is due.
191
- */
192
- days_until_due?: number;
193
-
194
- /**
195
- * An arbitrary string attached to the object. Often useful for displaying to users.
196
- */
197
- description: string;
198
-
199
- /**
200
- * Date on which a payment plan's payment is due.
201
- */
202
- due_date?: number;
203
- }
204
-
205
168
  interface AutomaticTax {
206
169
  /**
207
170
  * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
@@ -257,56 +220,12 @@ declare module 'stripe' {
257
220
  */
258
221
  discount?: string;
259
222
 
260
- /**
261
- * Details to determine how long the discount should be applied for.
262
- */
263
- discount_end?: Discount.DiscountEnd;
264
-
265
223
  /**
266
224
  * ID of the promotion code to create a new discount for.
267
225
  */
268
226
  promotion_code?: string;
269
227
  }
270
228
 
271
- namespace Discount {
272
- interface DiscountEnd {
273
- /**
274
- * Time span for the redeemed discount.
275
- */
276
- duration?: DiscountEnd.Duration;
277
-
278
- /**
279
- * A precise Unix timestamp for the discount to end. Must be in the future.
280
- */
281
- timestamp?: number;
282
-
283
- /**
284
- * The type of calculation made to determine when the discount ends.
285
- */
286
- type: DiscountEnd.Type;
287
- }
288
-
289
- namespace DiscountEnd {
290
- interface Duration {
291
- /**
292
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
293
- */
294
- interval: Duration.Interval;
295
-
296
- /**
297
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
298
- */
299
- interval_count: number;
300
- }
301
-
302
- namespace Duration {
303
- type Interval = 'day' | 'month' | 'week' | 'year';
304
- }
305
-
306
- type Type = 'duration' | 'timestamp';
307
- }
308
- }
309
-
310
229
  interface FromInvoice {
311
230
  /**
312
231
  * The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
@@ -378,33 +297,16 @@ declare module 'stripe' {
378
297
  PaymentMethodOptions.CustomerBalance
379
298
  >;
380
299
 
381
- /**
382
- * If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
383
- */
384
- id_bank_transfer?: Stripe.Emptyable<
385
- PaymentMethodOptions.IdBankTransfer
386
- >;
387
-
388
300
  /**
389
301
  * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
390
302
  */
391
303
  konbini?: Stripe.Emptyable<PaymentMethodOptions.Konbini>;
392
304
 
393
- /**
394
- * If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent.
395
- */
396
- pix?: Stripe.Emptyable<PaymentMethodOptions.Pix>;
397
-
398
305
  /**
399
306
  * If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
400
307
  */
401
308
  sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
402
309
 
403
- /**
404
- * If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
405
- */
406
- upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
407
-
408
310
  /**
409
311
  * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
410
312
  */
@@ -542,58 +444,10 @@ declare module 'stripe' {
542
444
  }
543
445
  }
544
446
 
545
- interface IdBankTransfer {}
546
-
547
447
  interface Konbini {}
548
448
 
549
- interface Pix {
550
- /**
551
- * Determines if the amount includes the IOF tax. Defaults to `never`.
552
- */
553
- amount_includes_iof?: Pix.AmountIncludesIof;
554
- }
555
-
556
- namespace Pix {
557
- type AmountIncludesIof = 'always' | 'never';
558
- }
559
-
560
449
  interface SepaDebit {}
561
450
 
562
- interface Upi {
563
- /**
564
- * Configuration options for setting up an eMandate
565
- */
566
- mandate_options?: Upi.MandateOptions;
567
- }
568
-
569
- namespace Upi {
570
- interface MandateOptions {
571
- /**
572
- * Amount to be charged for future payments.
573
- */
574
- amount?: number;
575
-
576
- /**
577
- * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
578
- */
579
- amount_type?: MandateOptions.AmountType;
580
-
581
- /**
582
- * A description of the mandate or subscription that is meant to be displayed to the customer.
583
- */
584
- description?: string;
585
-
586
- /**
587
- * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
588
- */
589
- end_date?: number;
590
- }
591
-
592
- namespace MandateOptions {
593
- type AmountType = 'fixed' | 'maximum';
594
- }
595
- }
596
-
597
451
  interface UsBankAccount {
598
452
  /**
599
453
  * Additional fields for Financial Connections Session creation
@@ -630,11 +484,6 @@ declare module 'stripe' {
630
484
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
631
485
  */
632
486
  account_subcategories?: Array<Filters.AccountSubcategory>;
633
-
634
- /**
635
- * ID of the institution to use to filter for selectable accounts.
636
- */
637
- institution?: string;
638
487
  }
639
488
 
640
489
  namespace Filters {
@@ -647,11 +496,7 @@ declare module 'stripe' {
647
496
  | 'payment_method'
648
497
  | 'transactions';
649
498
 
650
- type Prefetch =
651
- | 'balances'
652
- | 'inferred_balances'
653
- | 'ownership'
654
- | 'transactions';
499
+ type Prefetch = 'balances' | 'ownership' | 'transactions';
655
500
  }
656
501
 
657
502
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -671,13 +516,11 @@ declare module 'stripe' {
671
516
  | 'card'
672
517
  | 'cashapp'
673
518
  | 'crypto'
674
- | 'custom'
675
519
  | 'customer_balance'
676
520
  | 'eps'
677
521
  | 'fpx'
678
522
  | 'giropay'
679
523
  | 'grabpay'
680
- | 'id_bank_transfer'
681
524
  | 'ideal'
682
525
  | 'jp_credit_transfer'
683
526
  | 'kakao_pay'
@@ -692,15 +535,12 @@ declare module 'stripe' {
692
535
  | 'payco'
693
536
  | 'paynow'
694
537
  | 'paypal'
695
- | 'pix'
696
538
  | 'promptpay'
697
539
  | 'revolut_pay'
698
540
  | 'sepa_credit_transfer'
699
541
  | 'sepa_debit'
700
542
  | 'sofort'
701
- | 'stripe_balance'
702
543
  | 'swish'
703
- | 'upi'
704
544
  | 'us_bank_account'
705
545
  | 'wechat_pay';
706
546
  }
@@ -927,11 +767,6 @@ declare module 'stripe' {
927
767
  */
928
768
  account_tax_ids?: Stripe.Emptyable<Array<string>>;
929
769
 
930
- /**
931
- * List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
932
- */
933
- amounts_due?: Stripe.Emptyable<Array<InvoiceUpdateParams.AmountsDue>>;
934
-
935
770
  /**
936
771
  * A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
937
772
  */
@@ -967,11 +802,6 @@ declare module 'stripe' {
967
802
  */
968
803
  days_until_due?: number;
969
804
 
970
- /**
971
- * The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
972
- */
973
- default_margins?: Stripe.Emptyable<Array<string>>;
974
-
975
805
  /**
976
806
  * ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
977
807
  */
@@ -1069,28 +899,6 @@ declare module 'stripe' {
1069
899
  }
1070
900
 
1071
901
  namespace InvoiceUpdateParams {
1072
- interface AmountsDue {
1073
- /**
1074
- * The amount in cents (or local equivalent).
1075
- */
1076
- amount: number;
1077
-
1078
- /**
1079
- * Number of days from when invoice is finalized until the payment is due.
1080
- */
1081
- days_until_due?: number;
1082
-
1083
- /**
1084
- * An arbitrary string attached to the object. Often useful for displaying to users.
1085
- */
1086
- description: string;
1087
-
1088
- /**
1089
- * Date on which a payment plan's payment is due.
1090
- */
1091
- due_date?: number;
1092
- }
1093
-
1094
902
  interface AutomaticTax {
1095
903
  /**
1096
904
  * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
@@ -1146,56 +954,12 @@ declare module 'stripe' {
1146
954
  */
1147
955
  discount?: string;
1148
956
 
1149
- /**
1150
- * Details to determine how long the discount should be applied for.
1151
- */
1152
- discount_end?: Discount.DiscountEnd;
1153
-
1154
957
  /**
1155
958
  * ID of the promotion code to create a new discount for.
1156
959
  */
1157
960
  promotion_code?: string;
1158
961
  }
1159
962
 
1160
- namespace Discount {
1161
- interface DiscountEnd {
1162
- /**
1163
- * Time span for the redeemed discount.
1164
- */
1165
- duration?: DiscountEnd.Duration;
1166
-
1167
- /**
1168
- * A precise Unix timestamp for the discount to end. Must be in the future.
1169
- */
1170
- timestamp?: number;
1171
-
1172
- /**
1173
- * The type of calculation made to determine when the discount ends.
1174
- */
1175
- type: DiscountEnd.Type;
1176
- }
1177
-
1178
- namespace DiscountEnd {
1179
- interface Duration {
1180
- /**
1181
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1182
- */
1183
- interval: Duration.Interval;
1184
-
1185
- /**
1186
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1187
- */
1188
- interval_count: number;
1189
- }
1190
-
1191
- namespace Duration {
1192
- type Interval = 'day' | 'month' | 'week' | 'year';
1193
- }
1194
-
1195
- type Type = 'duration' | 'timestamp';
1196
- }
1197
- }
1198
-
1199
963
  interface Issuer {
1200
964
  /**
1201
965
  * The connected account being referenced when `type` is `account`.
@@ -1255,33 +1019,16 @@ declare module 'stripe' {
1255
1019
  PaymentMethodOptions.CustomerBalance
1256
1020
  >;
1257
1021
 
1258
- /**
1259
- * If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent.
1260
- */
1261
- id_bank_transfer?: Stripe.Emptyable<
1262
- PaymentMethodOptions.IdBankTransfer
1263
- >;
1264
-
1265
1022
  /**
1266
1023
  * If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
1267
1024
  */
1268
1025
  konbini?: Stripe.Emptyable<PaymentMethodOptions.Konbini>;
1269
1026
 
1270
- /**
1271
- * If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent.
1272
- */
1273
- pix?: Stripe.Emptyable<PaymentMethodOptions.Pix>;
1274
-
1275
1027
  /**
1276
1028
  * If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
1277
1029
  */
1278
1030
  sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
1279
1031
 
1280
- /**
1281
- * If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
1282
- */
1283
- upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
1284
-
1285
1032
  /**
1286
1033
  * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
1287
1034
  */
@@ -1419,58 +1166,10 @@ declare module 'stripe' {
1419
1166
  }
1420
1167
  }
1421
1168
 
1422
- interface IdBankTransfer {}
1423
-
1424
1169
  interface Konbini {}
1425
1170
 
1426
- interface Pix {
1427
- /**
1428
- * Determines if the amount includes the IOF tax. Defaults to `never`.
1429
- */
1430
- amount_includes_iof?: Pix.AmountIncludesIof;
1431
- }
1432
-
1433
- namespace Pix {
1434
- type AmountIncludesIof = 'always' | 'never';
1435
- }
1436
-
1437
1171
  interface SepaDebit {}
1438
1172
 
1439
- interface Upi {
1440
- /**
1441
- * Configuration options for setting up an eMandate
1442
- */
1443
- mandate_options?: Upi.MandateOptions;
1444
- }
1445
-
1446
- namespace Upi {
1447
- interface MandateOptions {
1448
- /**
1449
- * Amount to be charged for future payments.
1450
- */
1451
- amount?: number;
1452
-
1453
- /**
1454
- * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
1455
- */
1456
- amount_type?: MandateOptions.AmountType;
1457
-
1458
- /**
1459
- * A description of the mandate or subscription that is meant to be displayed to the customer.
1460
- */
1461
- description?: string;
1462
-
1463
- /**
1464
- * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
1465
- */
1466
- end_date?: number;
1467
- }
1468
-
1469
- namespace MandateOptions {
1470
- type AmountType = 'fixed' | 'maximum';
1471
- }
1472
- }
1473
-
1474
1173
  interface UsBankAccount {
1475
1174
  /**
1476
1175
  * Additional fields for Financial Connections Session creation
@@ -1507,11 +1206,6 @@ declare module 'stripe' {
1507
1206
  * The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1508
1207
  */
1509
1208
  account_subcategories?: Array<Filters.AccountSubcategory>;
1510
-
1511
- /**
1512
- * ID of the institution to use to filter for selectable accounts.
1513
- */
1514
- institution?: string;
1515
1209
  }
1516
1210
 
1517
1211
  namespace Filters {
@@ -1524,11 +1218,7 @@ declare module 'stripe' {
1524
1218
  | 'payment_method'
1525
1219
  | 'transactions';
1526
1220
 
1527
- type Prefetch =
1528
- | 'balances'
1529
- | 'inferred_balances'
1530
- | 'ownership'
1531
- | 'transactions';
1221
+ type Prefetch = 'balances' | 'ownership' | 'transactions';
1532
1222
  }
1533
1223
 
1534
1224
  type VerificationMethod = 'automatic' | 'instant' | 'microdeposits';
@@ -1548,13 +1238,11 @@ declare module 'stripe' {
1548
1238
  | 'card'
1549
1239
  | 'cashapp'
1550
1240
  | 'crypto'
1551
- | 'custom'
1552
1241
  | 'customer_balance'
1553
1242
  | 'eps'
1554
1243
  | 'fpx'
1555
1244
  | 'giropay'
1556
1245
  | 'grabpay'
1557
- | 'id_bank_transfer'
1558
1246
  | 'ideal'
1559
1247
  | 'jp_credit_transfer'
1560
1248
  | 'kakao_pay'
@@ -1569,15 +1257,12 @@ declare module 'stripe' {
1569
1257
  | 'payco'
1570
1258
  | 'paynow'
1571
1259
  | 'paypal'
1572
- | 'pix'
1573
1260
  | 'promptpay'
1574
1261
  | 'revolut_pay'
1575
1262
  | 'sepa_credit_transfer'
1576
1263
  | 'sepa_debit'
1577
1264
  | 'sofort'
1578
- | 'stripe_balance'
1579
1265
  | 'swish'
1580
- | 'upi'
1581
1266
  | 'us_bank_account'
1582
1267
  | 'wechat_pay';
1583
1268
  }
@@ -1805,11 +1490,6 @@ declare module 'stripe' {
1805
1490
  */
1806
1491
  customer?: string;
1807
1492
 
1808
- /**
1809
- * Only return invoices for the account specified by this account ID.
1810
- */
1811
- customer_account?: string;
1812
-
1813
1493
  due_date?: Stripe.RangeQueryParam | number;
1814
1494
 
1815
1495
  /**
@@ -1882,11 +1562,6 @@ declare module 'stripe' {
1882
1562
  */
1883
1563
  invoice_item?: string;
1884
1564
 
1885
- /**
1886
- * The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
1887
- */
1888
- margins?: Stripe.Emptyable<Array<string>>;
1889
-
1890
1565
  /**
1891
1566
  * 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`.
1892
1567
  */
@@ -1935,56 +1610,12 @@ declare module 'stripe' {
1935
1610
  */
1936
1611
  discount?: string;
1937
1612
 
1938
- /**
1939
- * Details to determine how long the discount should be applied for.
1940
- */
1941
- discount_end?: Discount.DiscountEnd;
1942
-
1943
1613
  /**
1944
1614
  * ID of the promotion code to create a new discount for.
1945
1615
  */
1946
1616
  promotion_code?: string;
1947
1617
  }
1948
1618
 
1949
- namespace Discount {
1950
- interface DiscountEnd {
1951
- /**
1952
- * Time span for the redeemed discount.
1953
- */
1954
- duration?: DiscountEnd.Duration;
1955
-
1956
- /**
1957
- * A precise Unix timestamp for the discount to end. Must be in the future.
1958
- */
1959
- timestamp?: number;
1960
-
1961
- /**
1962
- * The type of calculation made to determine when the discount ends.
1963
- */
1964
- type: DiscountEnd.Type;
1965
- }
1966
-
1967
- namespace DiscountEnd {
1968
- interface Duration {
1969
- /**
1970
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1971
- */
1972
- interval: Duration.Interval;
1973
-
1974
- /**
1975
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1976
- */
1977
- interval_count: number;
1978
- }
1979
-
1980
- namespace Duration {
1981
- type Interval = 'day' | 'month' | 'week' | 'year';
1982
- }
1983
-
1984
- type Type = 'duration' | 'timestamp';
1985
- }
1986
- }
1987
-
1988
1619
  interface Period {
1989
1620
  /**
1990
1621
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -2191,11 +1822,6 @@ declare module 'stripe' {
2191
1822
  }
2192
1823
 
2193
1824
  interface InvoiceAttachPaymentParams {
2194
- /**
2195
- * The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
2196
- */
2197
- amount_requested?: number;
2198
-
2199
1825
  /**
2200
1826
  * Specifies which fields in the response should be expanded.
2201
1827
  */
@@ -2205,87 +1831,33 @@ declare module 'stripe' {
2205
1831
  * The ID of the PaymentIntent to attach to the invoice.
2206
1832
  */
2207
1833
  payment_intent?: string;
1834
+ }
2208
1835
 
1836
+ interface InvoiceCreatePreviewParams {
2209
1837
  /**
2210
- * The ID of the PaymentRecord to attach to the invoice.
1838
+ * Settings for automatic tax lookup for this invoice preview.
2211
1839
  */
2212
- payment_record?: string;
1840
+ automatic_tax?: InvoiceCreatePreviewParams.AutomaticTax;
2213
1841
 
2214
1842
  /**
2215
- * The PaymentRecord data for attaching an out of band payment to the invoice.
1843
+ * The currency to preview this invoice in. Defaults to that of `customer` if not specified.
2216
1844
  */
2217
- payment_record_data?: InvoiceAttachPaymentParams.PaymentRecordData;
2218
- }
1845
+ currency?: string;
2219
1846
 
2220
- namespace InvoiceAttachPaymentParams {
2221
- interface PaymentRecordData {
2222
- /**
2223
- * The amount that was paid out of band.
2224
- */
2225
- amount: number;
1847
+ /**
1848
+ * The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
1849
+ */
1850
+ customer?: string;
2226
1851
 
2227
- /**
2228
- * The currency that was paid out of band.
2229
- */
2230
- currency: string;
1852
+ /**
1853
+ * Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
1854
+ */
1855
+ customer_details?: InvoiceCreatePreviewParams.CustomerDetails;
2231
1856
 
2232
- /**
2233
- * 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`.
2234
- */
2235
- metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
2236
-
2237
- /**
2238
- * The type of money movement for this out of band payment record.
2239
- */
2240
- money_movement_type: string;
2241
-
2242
- /**
2243
- * The timestamp when this out of band payment was paid.
2244
- */
2245
- paid_at?: number;
2246
-
2247
- /**
2248
- * The reference for this out of band payment record.
2249
- */
2250
- payment_reference?: string;
2251
- }
2252
- }
2253
-
2254
- interface InvoiceCreatePreviewParams {
2255
- /**
2256
- * Settings for automatic tax lookup for this invoice preview.
2257
- */
2258
- automatic_tax?: InvoiceCreatePreviewParams.AutomaticTax;
2259
-
2260
- /**
2261
- * The identifier of the billing cadence for which you'd like to retrieve the upcoming invoice.Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
2262
- */
2263
- billing_cadence?: string;
2264
-
2265
- /**
2266
- * The currency to preview this invoice in. Defaults to that of `customer` if not specified.
2267
- */
2268
- currency?: string;
2269
-
2270
- /**
2271
- * The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
2272
- */
2273
- customer?: string;
2274
-
2275
- /**
2276
- * The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
2277
- */
2278
- customer_account?: string;
2279
-
2280
- /**
2281
- * Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
2282
- */
2283
- customer_details?: InvoiceCreatePreviewParams.CustomerDetails;
2284
-
2285
- /**
2286
- * The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
2287
- */
2288
- discounts?: Stripe.Emptyable<Array<InvoiceCreatePreviewParams.Discount>>;
1857
+ /**
1858
+ * The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
1859
+ */
1860
+ discounts?: Stripe.Emptyable<Array<InvoiceCreatePreviewParams.Discount>>;
2289
1861
 
2290
1862
  /**
2291
1863
  * Specifies which fields in the response should be expanded.
@@ -2556,56 +2128,12 @@ declare module 'stripe' {
2556
2128
  */
2557
2129
  discount?: string;
2558
2130
 
2559
- /**
2560
- * Details to determine how long the discount should be applied for.
2561
- */
2562
- discount_end?: Discount.DiscountEnd;
2563
-
2564
2131
  /**
2565
2132
  * ID of the promotion code to create a new discount for.
2566
2133
  */
2567
2134
  promotion_code?: string;
2568
2135
  }
2569
2136
 
2570
- namespace Discount {
2571
- interface DiscountEnd {
2572
- /**
2573
- * Time span for the redeemed discount.
2574
- */
2575
- duration?: DiscountEnd.Duration;
2576
-
2577
- /**
2578
- * A precise Unix timestamp for the discount to end. Must be in the future.
2579
- */
2580
- timestamp?: number;
2581
-
2582
- /**
2583
- * The type of calculation made to determine when the discount ends.
2584
- */
2585
- type: DiscountEnd.Type;
2586
- }
2587
-
2588
- namespace DiscountEnd {
2589
- interface Duration {
2590
- /**
2591
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2592
- */
2593
- interval: Duration.Interval;
2594
-
2595
- /**
2596
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2597
- */
2598
- interval_count: number;
2599
- }
2600
-
2601
- namespace Duration {
2602
- type Interval = 'day' | 'month' | 'week' | 'year';
2603
- }
2604
-
2605
- type Type = 'duration' | 'timestamp';
2606
- }
2607
- }
2608
-
2609
2137
  interface InvoiceItem {
2610
2138
  /**
2611
2139
  * The integer amount in cents (or local equivalent) of previewed invoice item.
@@ -2700,56 +2228,12 @@ declare module 'stripe' {
2700
2228
  */
2701
2229
  discount?: string;
2702
2230
 
2703
- /**
2704
- * Details to determine how long the discount should be applied for.
2705
- */
2706
- discount_end?: Discount.DiscountEnd;
2707
-
2708
2231
  /**
2709
2232
  * ID of the promotion code to create a new discount for.
2710
2233
  */
2711
2234
  promotion_code?: string;
2712
2235
  }
2713
2236
 
2714
- namespace Discount {
2715
- interface DiscountEnd {
2716
- /**
2717
- * Time span for the redeemed discount.
2718
- */
2719
- duration?: DiscountEnd.Duration;
2720
-
2721
- /**
2722
- * A precise Unix timestamp for the discount to end. Must be in the future.
2723
- */
2724
- timestamp?: number;
2725
-
2726
- /**
2727
- * The type of calculation made to determine when the discount ends.
2728
- */
2729
- type: DiscountEnd.Type;
2730
- }
2731
-
2732
- namespace DiscountEnd {
2733
- interface Duration {
2734
- /**
2735
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2736
- */
2737
- interval: Duration.Interval;
2738
-
2739
- /**
2740
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2741
- */
2742
- interval_count: number;
2743
- }
2744
-
2745
- namespace Duration {
2746
- type Interval = 'day' | 'month' | 'week' | 'year';
2747
- }
2748
-
2749
- type Type = 'duration' | 'timestamp';
2750
- }
2751
- }
2752
-
2753
2237
  interface Period {
2754
2238
  /**
2755
2239
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -2815,16 +2299,6 @@ declare module 'stripe' {
2815
2299
  type PreviewMode = 'next' | 'recurring';
2816
2300
 
2817
2301
  interface ScheduleDetails {
2818
- /**
2819
- * Changes to apply to the phases of the subscription schedule, in the order provided.
2820
- */
2821
- amendments?: Array<ScheduleDetails.Amendment>;
2822
-
2823
- /**
2824
- * 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.
2825
- */
2826
- billing_behavior?: ScheduleDetails.BillingBehavior;
2827
-
2828
2302
  /**
2829
2303
  * Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2830
2304
  */
@@ -2840,11 +2314,6 @@ declare module 'stripe' {
2840
2314
  */
2841
2315
  phases?: Array<ScheduleDetails.Phase>;
2842
2316
 
2843
- /**
2844
- * Provide any time periods to bill in advance.
2845
- */
2846
- prebilling?: Stripe.Emptyable<Array<ScheduleDetails.Prebilling>>;
2847
-
2848
2317
  /**
2849
2318
  * In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
2850
2319
  */
@@ -2852,603 +2321,6 @@ declare module 'stripe' {
2852
2321
  }
2853
2322
 
2854
2323
  namespace ScheduleDetails {
2855
- interface Amendment {
2856
- /**
2857
- * Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
2858
- */
2859
- amendment_end?: Amendment.AmendmentEnd;
2860
-
2861
- /**
2862
- * Details to identify the earliest timestamp where the proposed change should take effect.
2863
- */
2864
- amendment_start: Amendment.AmendmentStart;
2865
-
2866
- /**
2867
- * For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
2868
- */
2869
- billing_cycle_anchor?: Amendment.BillingCycleAnchor;
2870
-
2871
- /**
2872
- * Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2873
- */
2874
- discount_actions?: Array<Amendment.DiscountAction>;
2875
-
2876
- /**
2877
- * Changes to the subscription items during the amendment time span.
2878
- */
2879
- item_actions?: Array<Amendment.ItemAction>;
2880
-
2881
- /**
2882
- * Instructions for how to modify phase metadata
2883
- */
2884
- metadata_actions?: Array<Amendment.MetadataAction>;
2885
-
2886
- /**
2887
- * Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
2888
- */
2889
- proration_behavior?: Amendment.ProrationBehavior;
2890
-
2891
- /**
2892
- * Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2893
- */
2894
- set_pause_collection?: Amendment.SetPauseCollection;
2895
-
2896
- /**
2897
- * Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2898
- */
2899
- set_schedule_end?: Amendment.SetScheduleEnd;
2900
-
2901
- /**
2902
- * Settings related to subscription trials.
2903
- */
2904
- trial_settings?: Amendment.TrialSettings;
2905
- }
2906
-
2907
- namespace Amendment {
2908
- interface AmendmentEnd {
2909
- /**
2910
- * Use the `end` time of a given discount.
2911
- */
2912
- discount_end?: AmendmentEnd.DiscountEnd;
2913
-
2914
- /**
2915
- * Time span for the amendment starting from the `amendment_start`.
2916
- */
2917
- duration?: AmendmentEnd.Duration;
2918
-
2919
- /**
2920
- * A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
2921
- */
2922
- timestamp?: number;
2923
-
2924
- /**
2925
- * Select one of three ways to pass the `amendment_end`.
2926
- */
2927
- type: AmendmentEnd.Type;
2928
- }
2929
-
2930
- namespace AmendmentEnd {
2931
- interface DiscountEnd {
2932
- /**
2933
- * The ID of a specific discount.
2934
- */
2935
- discount: string;
2936
- }
2937
-
2938
- interface Duration {
2939
- /**
2940
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2941
- */
2942
- interval: Duration.Interval;
2943
-
2944
- /**
2945
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2946
- */
2947
- interval_count: number;
2948
- }
2949
-
2950
- namespace Duration {
2951
- type Interval = 'day' | 'month' | 'week' | 'year';
2952
- }
2953
-
2954
- type Type =
2955
- | 'discount_end'
2956
- | 'duration'
2957
- | 'schedule_end'
2958
- | 'timestamp'
2959
- | 'trial_end'
2960
- | 'trial_start'
2961
- | 'upcoming_invoice';
2962
- }
2963
-
2964
- interface AmendmentStart {
2965
- /**
2966
- * Details of another amendment in the same array, immediately after which this amendment should begin.
2967
- */
2968
- amendment_end?: AmendmentStart.AmendmentEnd;
2969
-
2970
- /**
2971
- * Use the `end` time of a given discount.
2972
- */
2973
- discount_end?: AmendmentStart.DiscountEnd;
2974
-
2975
- /**
2976
- * A precise Unix timestamp for the amendment to start.
2977
- */
2978
- timestamp?: number;
2979
-
2980
- /**
2981
- * Select one of three ways to pass the `amendment_start`.
2982
- */
2983
- type: AmendmentStart.Type;
2984
- }
2985
-
2986
- namespace AmendmentStart {
2987
- interface AmendmentEnd {
2988
- /**
2989
- * The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
2990
- */
2991
- index: number;
2992
- }
2993
-
2994
- interface DiscountEnd {
2995
- /**
2996
- * The ID of a specific discount.
2997
- */
2998
- discount: string;
2999
- }
3000
-
3001
- type Type =
3002
- | 'amendment_end'
3003
- | 'discount_end'
3004
- | 'now'
3005
- | 'schedule_end'
3006
- | 'timestamp'
3007
- | 'trial_end'
3008
- | 'trial_start'
3009
- | 'upcoming_invoice';
3010
- }
3011
-
3012
- type BillingCycleAnchor = 'amendment_start' | 'automatic';
3013
-
3014
- interface DiscountAction {
3015
- /**
3016
- * Details of the discount to add.
3017
- */
3018
- add?: DiscountAction.Add;
3019
-
3020
- /**
3021
- * Details of the discount to remove.
3022
- */
3023
- remove?: DiscountAction.Remove;
3024
-
3025
- /**
3026
- * Details of the discount to replace the existing discounts with.
3027
- */
3028
- set?: DiscountAction.Set;
3029
-
3030
- /**
3031
- * Determines the type of discount action.
3032
- */
3033
- type: DiscountAction.Type;
3034
- }
3035
-
3036
- namespace DiscountAction {
3037
- interface Add {
3038
- /**
3039
- * The coupon code to redeem.
3040
- */
3041
- coupon?: string;
3042
-
3043
- /**
3044
- * An ID of an existing discount for a coupon that was already redeemed.
3045
- */
3046
- discount?: string;
3047
-
3048
- /**
3049
- * Details to determine how long the discount should be applied for.
3050
- */
3051
- discount_end?: Add.DiscountEnd;
3052
-
3053
- /**
3054
- * 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.
3055
- */
3056
- index?: number;
3057
-
3058
- /**
3059
- * The promotion code to redeem.
3060
- */
3061
- promotion_code?: string;
3062
- }
3063
-
3064
- namespace Add {
3065
- interface DiscountEnd {
3066
- /**
3067
- * The type of calculation made to determine when the discount ends.
3068
- */
3069
- type: 'amendment_end';
3070
- }
3071
- }
3072
-
3073
- interface Remove {
3074
- /**
3075
- * The coupon code to remove from the `discounts` array.
3076
- */
3077
- coupon?: string;
3078
-
3079
- /**
3080
- * The ID of a discount to remove from the `discounts` array.
3081
- */
3082
- discount?: string;
3083
-
3084
- /**
3085
- * The ID of a promotion code to remove from the `discounts` array.
3086
- */
3087
- promotion_code?: string;
3088
- }
3089
-
3090
- interface Set {
3091
- /**
3092
- * The coupon code to replace the `discounts` array with.
3093
- */
3094
- coupon?: string;
3095
-
3096
- /**
3097
- * An ID of an existing discount to replace the `discounts` array with.
3098
- */
3099
- discount?: string;
3100
-
3101
- /**
3102
- * An ID of an existing promotion code to replace the `discounts` array with.
3103
- */
3104
- promotion_code?: string;
3105
- }
3106
-
3107
- type Type = 'add' | 'remove' | 'set';
3108
- }
3109
-
3110
- interface ItemAction {
3111
- /**
3112
- * Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
3113
- */
3114
- add?: ItemAction.Add;
3115
-
3116
- /**
3117
- * Details of the subscription item to remove.
3118
- */
3119
- remove?: ItemAction.Remove;
3120
-
3121
- /**
3122
- * Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
3123
- */
3124
- set?: ItemAction.Set;
3125
-
3126
- /**
3127
- * Determines the type of item action.
3128
- */
3129
- type: ItemAction.Type;
3130
- }
3131
-
3132
- namespace ItemAction {
3133
- interface Add {
3134
- /**
3135
- * The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
3136
- */
3137
- discounts?: Array<Add.Discount>;
3138
-
3139
- /**
3140
- * 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`.
3141
- */
3142
- metadata?: Stripe.MetadataParam;
3143
-
3144
- /**
3145
- * The ID of the price object.
3146
- */
3147
- price: string;
3148
-
3149
- /**
3150
- * Quantity for this item.
3151
- */
3152
- quantity?: number;
3153
-
3154
- /**
3155
- * 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`.
3156
- */
3157
- tax_rates?: Array<string>;
3158
-
3159
- /**
3160
- * Options that configure the trial on the subscription item.
3161
- */
3162
- trial?: Add.Trial;
3163
- }
3164
-
3165
- namespace Add {
3166
- interface Discount {
3167
- /**
3168
- * ID of the coupon to create a new discount for.
3169
- */
3170
- coupon?: string;
3171
-
3172
- /**
3173
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
3174
- */
3175
- discount?: string;
3176
-
3177
- /**
3178
- * Details to determine how long the discount should be applied for.
3179
- */
3180
- discount_end?: Discount.DiscountEnd;
3181
-
3182
- /**
3183
- * ID of the promotion code to create a new discount for.
3184
- */
3185
- promotion_code?: string;
3186
- }
3187
-
3188
- namespace Discount {
3189
- interface DiscountEnd {
3190
- /**
3191
- * Time span for the redeemed discount.
3192
- */
3193
- duration?: DiscountEnd.Duration;
3194
-
3195
- /**
3196
- * A precise Unix timestamp for the discount to end. Must be in the future.
3197
- */
3198
- timestamp?: number;
3199
-
3200
- /**
3201
- * The type of calculation made to determine when the discount ends.
3202
- */
3203
- type: DiscountEnd.Type;
3204
- }
3205
-
3206
- namespace DiscountEnd {
3207
- interface Duration {
3208
- /**
3209
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3210
- */
3211
- interval: Duration.Interval;
3212
-
3213
- /**
3214
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3215
- */
3216
- interval_count: number;
3217
- }
3218
-
3219
- namespace Duration {
3220
- type Interval = 'day' | 'month' | 'week' | 'year';
3221
- }
3222
-
3223
- type Type = 'duration' | 'timestamp';
3224
- }
3225
- }
3226
-
3227
- interface Trial {
3228
- /**
3229
- * 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.
3230
- */
3231
- converts_to?: Array<string>;
3232
-
3233
- /**
3234
- * Determines the type of trial for this item.
3235
- */
3236
- type: Trial.Type;
3237
- }
3238
-
3239
- namespace Trial {
3240
- type Type = 'free' | 'paid';
3241
- }
3242
- }
3243
-
3244
- interface Remove {
3245
- /**
3246
- * ID of a price to remove.
3247
- */
3248
- price: string;
3249
- }
3250
-
3251
- interface Set {
3252
- /**
3253
- * 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`.
3254
- */
3255
- discounts?: Array<Set.Discount>;
3256
-
3257
- /**
3258
- * 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`.
3259
- */
3260
- metadata?: Stripe.MetadataParam;
3261
-
3262
- /**
3263
- * The ID of the price object.
3264
- */
3265
- price: string;
3266
-
3267
- /**
3268
- * 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`.
3269
- */
3270
- quantity?: number;
3271
-
3272
- /**
3273
- * 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`.
3274
- */
3275
- tax_rates?: Array<string>;
3276
-
3277
- /**
3278
- * 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`.
3279
- */
3280
- trial?: Set.Trial;
3281
- }
3282
-
3283
- namespace Set {
3284
- interface Discount {
3285
- /**
3286
- * ID of the coupon to create a new discount for.
3287
- */
3288
- coupon?: string;
3289
-
3290
- /**
3291
- * ID of an existing discount on the object (or one of its ancestors) to reuse.
3292
- */
3293
- discount?: string;
3294
-
3295
- /**
3296
- * Details to determine how long the discount should be applied for.
3297
- */
3298
- discount_end?: Discount.DiscountEnd;
3299
-
3300
- /**
3301
- * ID of the promotion code to create a new discount for.
3302
- */
3303
- promotion_code?: string;
3304
- }
3305
-
3306
- namespace Discount {
3307
- interface DiscountEnd {
3308
- /**
3309
- * Time span for the redeemed discount.
3310
- */
3311
- duration?: DiscountEnd.Duration;
3312
-
3313
- /**
3314
- * A precise Unix timestamp for the discount to end. Must be in the future.
3315
- */
3316
- timestamp?: number;
3317
-
3318
- /**
3319
- * The type of calculation made to determine when the discount ends.
3320
- */
3321
- type: DiscountEnd.Type;
3322
- }
3323
-
3324
- namespace DiscountEnd {
3325
- interface Duration {
3326
- /**
3327
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3328
- */
3329
- interval: Duration.Interval;
3330
-
3331
- /**
3332
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3333
- */
3334
- interval_count: number;
3335
- }
3336
-
3337
- namespace Duration {
3338
- type Interval = 'day' | 'month' | 'week' | 'year';
3339
- }
3340
-
3341
- type Type = 'duration' | 'timestamp';
3342
- }
3343
- }
3344
-
3345
- interface Trial {
3346
- /**
3347
- * 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.
3348
- */
3349
- converts_to?: Array<string>;
3350
-
3351
- /**
3352
- * Determines the type of trial for this item.
3353
- */
3354
- type: Trial.Type;
3355
- }
3356
-
3357
- namespace Trial {
3358
- type Type = 'free' | 'paid';
3359
- }
3360
- }
3361
-
3362
- type Type = 'add' | 'remove' | 'set';
3363
- }
3364
-
3365
- interface MetadataAction {
3366
- /**
3367
- * Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
3368
- */
3369
- add?: {
3370
- [key: string]: string;
3371
- };
3372
-
3373
- /**
3374
- * Keys to remove from schedule phase metadata.
3375
- */
3376
- remove?: Array<string>;
3377
-
3378
- /**
3379
- * Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
3380
- */
3381
- set?: Stripe.Emptyable<{
3382
- [key: string]: string;
3383
- }>;
3384
-
3385
- /**
3386
- * Select one of three ways to update phase-level `metadata` on subscription schedules.
3387
- */
3388
- type: MetadataAction.Type;
3389
- }
3390
-
3391
- namespace MetadataAction {
3392
- type Type = 'add' | 'remove' | 'set';
3393
- }
3394
-
3395
- type ProrationBehavior =
3396
- | 'always_invoice'
3397
- | 'create_prorations'
3398
- | 'none';
3399
-
3400
- interface SetPauseCollection {
3401
- /**
3402
- * Details of the pause_collection behavior to apply to the amendment.
3403
- */
3404
- set?: SetPauseCollection.Set;
3405
-
3406
- /**
3407
- * Determines the type of the pause_collection amendment.
3408
- */
3409
- type: SetPauseCollection.Type;
3410
- }
3411
-
3412
- namespace SetPauseCollection {
3413
- interface Set {
3414
- /**
3415
- * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3416
- */
3417
- behavior: Set.Behavior;
3418
- }
3419
-
3420
- namespace Set {
3421
- type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
3422
- }
3423
-
3424
- type Type = 'remove' | 'set';
3425
- }
3426
-
3427
- type SetScheduleEnd = 'amendment_end' | 'amendment_start';
3428
-
3429
- interface TrialSettings {
3430
- /**
3431
- * Defines how the subscription should behave when a trial ends.
3432
- */
3433
- end_behavior?: TrialSettings.EndBehavior;
3434
- }
3435
-
3436
- namespace TrialSettings {
3437
- interface EndBehavior {
3438
- /**
3439
- * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3440
- */
3441
- prorate_up_front?: EndBehavior.ProrateUpFront;
3442
- }
3443
-
3444
- namespace EndBehavior {
3445
- type ProrateUpFront = 'defer' | 'include';
3446
- }
3447
- }
3448
- }
3449
-
3450
- type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
3451
-
3452
2324
  interface BillingMode {
3453
2325
  /**
3454
2326
  * Configure behavior for flexible billing mode.
@@ -3564,11 +2436,6 @@ declare module 'stripe' {
3564
2436
  */
3565
2437
  on_behalf_of?: string;
3566
2438
 
3567
- /**
3568
- * If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
3569
- */
3570
- pause_collection?: Phase.PauseCollection;
3571
-
3572
2439
  /**
3573
2440
  * Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
3574
2441
  */
@@ -3589,20 +2456,10 @@ declare module 'stripe' {
3589
2456
  */
3590
2457
  trial?: boolean;
3591
2458
 
3592
- /**
3593
- * Specify trial behavior when crossing phase boundaries
3594
- */
3595
- trial_continuation?: Phase.TrialContinuation;
3596
-
3597
2459
  /**
3598
2460
  * Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
3599
2461
  */
3600
2462
  trial_end?: number | 'now';
3601
-
3602
- /**
3603
- * Settings related to subscription trials.
3604
- */
3605
- trial_settings?: Phase.TrialSettings;
3606
2463
  }
3607
2464
 
3608
2465
  namespace Phase {
@@ -3655,54 +2512,10 @@ declare module 'stripe' {
3655
2512
  */
3656
2513
  discount?: string;
3657
2514
 
3658
- /**
3659
- * Details to determine how long the discount should be applied for.
3660
- */
3661
- discount_end?: Discount.DiscountEnd;
3662
-
3663
2515
  /**
3664
2516
  * ID of the promotion code to create a new discount for.
3665
- */
3666
- promotion_code?: string;
3667
- }
3668
-
3669
- namespace Discount {
3670
- interface DiscountEnd {
3671
- /**
3672
- * Time span for the redeemed discount.
3673
- */
3674
- duration?: DiscountEnd.Duration;
3675
-
3676
- /**
3677
- * A precise Unix timestamp for the discount to end. Must be in the future.
3678
- */
3679
- timestamp?: number;
3680
-
3681
- /**
3682
- * The type of calculation made to determine when the discount ends.
3683
- */
3684
- type: DiscountEnd.Type;
3685
- }
3686
-
3687
- namespace DiscountEnd {
3688
- interface Duration {
3689
- /**
3690
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3691
- */
3692
- interval: Duration.Interval;
3693
-
3694
- /**
3695
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3696
- */
3697
- interval_count: number;
3698
- }
3699
-
3700
- namespace Duration {
3701
- type Interval = 'day' | 'month' | 'week' | 'year';
3702
- }
3703
-
3704
- type Type = 'duration' | 'timestamp';
3705
- }
2517
+ */
2518
+ promotion_code?: string;
3706
2519
  }
3707
2520
 
3708
2521
  interface Period {
@@ -3843,56 +2656,12 @@ declare module 'stripe' {
3843
2656
  */
3844
2657
  discount?: string;
3845
2658
 
3846
- /**
3847
- * Details to determine how long the discount should be applied for.
3848
- */
3849
- discount_end?: Discount.DiscountEnd;
3850
-
3851
2659
  /**
3852
2660
  * ID of the promotion code to create a new discount for.
3853
2661
  */
3854
2662
  promotion_code?: string;
3855
2663
  }
3856
2664
 
3857
- namespace Discount {
3858
- interface DiscountEnd {
3859
- /**
3860
- * Time span for the redeemed discount.
3861
- */
3862
- duration?: DiscountEnd.Duration;
3863
-
3864
- /**
3865
- * A precise Unix timestamp for the discount to end. Must be in the future.
3866
- */
3867
- timestamp?: number;
3868
-
3869
- /**
3870
- * The type of calculation made to determine when the discount ends.
3871
- */
3872
- type: DiscountEnd.Type;
3873
- }
3874
-
3875
- namespace DiscountEnd {
3876
- interface Duration {
3877
- /**
3878
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3879
- */
3880
- interval: Duration.Interval;
3881
-
3882
- /**
3883
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3884
- */
3885
- interval_count: number;
3886
- }
3887
-
3888
- namespace Duration {
3889
- type Interval = 'day' | 'month' | 'week' | 'year';
3890
- }
3891
-
3892
- type Type = 'duration' | 'timestamp';
3893
- }
3894
- }
3895
-
3896
2665
  interface Duration {
3897
2666
  /**
3898
2667
  * Specifies phase duration. Either `day`, `week`, `month` or `year`.
@@ -3984,11 +2753,6 @@ declare module 'stripe' {
3984
2753
  * A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
3985
2754
  */
3986
2755
  tax_rates?: Stripe.Emptyable<Array<string>>;
3987
-
3988
- /**
3989
- * Options that configure the trial on the subscription item.
3990
- */
3991
- trial?: Item.Trial;
3992
2756
  }
3993
2757
 
3994
2758
  namespace Item {
@@ -4010,56 +2774,12 @@ declare module 'stripe' {
4010
2774
  */
4011
2775
  discount?: string;
4012
2776
 
4013
- /**
4014
- * Details to determine how long the discount should be applied for.
4015
- */
4016
- discount_end?: Discount.DiscountEnd;
4017
-
4018
2777
  /**
4019
2778
  * ID of the promotion code to create a new discount for.
4020
2779
  */
4021
2780
  promotion_code?: string;
4022
2781
  }
4023
2782
 
4024
- namespace Discount {
4025
- interface DiscountEnd {
4026
- /**
4027
- * Time span for the redeemed discount.
4028
- */
4029
- duration?: DiscountEnd.Duration;
4030
-
4031
- /**
4032
- * A precise Unix timestamp for the discount to end. Must be in the future.
4033
- */
4034
- timestamp?: number;
4035
-
4036
- /**
4037
- * The type of calculation made to determine when the discount ends.
4038
- */
4039
- type: DiscountEnd.Type;
4040
- }
4041
-
4042
- namespace DiscountEnd {
4043
- interface Duration {
4044
- /**
4045
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4046
- */
4047
- interval: Duration.Interval;
4048
-
4049
- /**
4050
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4051
- */
4052
- interval_count: number;
4053
- }
4054
-
4055
- namespace Duration {
4056
- type Interval = 'day' | 'month' | 'week' | 'year';
4057
- }
4058
-
4059
- type Type = 'duration' | 'timestamp';
4060
- }
4061
- }
4062
-
4063
2783
  interface PriceData {
4064
2784
  /**
4065
2785
  * 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).
@@ -4111,33 +2831,6 @@ declare module 'stripe' {
4111
2831
 
4112
2832
  type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
4113
2833
  }
4114
-
4115
- interface Trial {
4116
- /**
4117
- * 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.
4118
- */
4119
- converts_to?: Array<string>;
4120
-
4121
- /**
4122
- * Determines the type of trial for this item.
4123
- */
4124
- type: Trial.Type;
4125
- }
4126
-
4127
- namespace Trial {
4128
- type Type = 'free' | 'paid';
4129
- }
4130
- }
4131
-
4132
- interface PauseCollection {
4133
- /**
4134
- * The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
4135
- */
4136
- behavior: PauseCollection.Behavior;
4137
- }
4138
-
4139
- namespace PauseCollection {
4140
- type Behavior = 'keep_as_draft' | 'mark_uncollectible' | 'void';
4141
2834
  }
4142
2835
 
4143
2836
  type ProrationBehavior =
@@ -4156,95 +2849,6 @@ declare module 'stripe' {
4156
2849
  */
4157
2850
  destination: string;
4158
2851
  }
4159
-
4160
- type TrialContinuation = 'continue' | 'none';
4161
-
4162
- interface TrialSettings {
4163
- /**
4164
- * Defines how the subscription should behave when a trial ends.
4165
- */
4166
- end_behavior?: TrialSettings.EndBehavior;
4167
- }
4168
-
4169
- namespace TrialSettings {
4170
- interface EndBehavior {
4171
- /**
4172
- * Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
4173
- */
4174
- prorate_up_front?: EndBehavior.ProrateUpFront;
4175
- }
4176
-
4177
- namespace EndBehavior {
4178
- type ProrateUpFront = 'defer' | 'include';
4179
- }
4180
- }
4181
- }
4182
-
4183
- interface Prebilling {
4184
- /**
4185
- * The end of the prebilled time period.
4186
- */
4187
- bill_until?: Prebilling.BillUntil;
4188
-
4189
- /**
4190
- * This is used to determine the number of billing cycles to prebill.
4191
- */
4192
- iterations?: number;
4193
- }
4194
-
4195
- namespace Prebilling {
4196
- interface BillUntil {
4197
- /**
4198
- * End the prebilled period when a specified amendment ends.
4199
- */
4200
- amendment_end?: BillUntil.AmendmentEnd;
4201
-
4202
- /**
4203
- * Time span for prebilling, starting from `bill_from`.
4204
- */
4205
- duration?: BillUntil.Duration;
4206
-
4207
- /**
4208
- * End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
4209
- */
4210
- timestamp?: number;
4211
-
4212
- /**
4213
- * Select one of several ways to pass the `bill_until` value.
4214
- */
4215
- type: BillUntil.Type;
4216
- }
4217
-
4218
- namespace BillUntil {
4219
- interface AmendmentEnd {
4220
- /**
4221
- * The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
4222
- */
4223
- index: number;
4224
- }
4225
-
4226
- interface Duration {
4227
- /**
4228
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4229
- */
4230
- interval: Duration.Interval;
4231
-
4232
- /**
4233
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4234
- */
4235
- interval_count: number;
4236
- }
4237
-
4238
- namespace Duration {
4239
- type Interval = 'day' | 'month' | 'week' | 'year';
4240
- }
4241
-
4242
- type Type =
4243
- | 'amendment_end'
4244
- | 'duration'
4245
- | 'schedule_end'
4246
- | 'timestamp';
4247
- }
4248
2852
  }
4249
2853
 
4250
2854
  type ProrationBehavior =
@@ -4264,13 +2868,6 @@ declare module 'stripe' {
4264
2868
  */
4265
2869
  billing_mode?: SubscriptionDetails.BillingMode;
4266
2870
 
4267
- /**
4268
- * Sets the billing schedules for the subscription.
4269
- */
4270
- billing_schedules?: Stripe.Emptyable<
4271
- Array<SubscriptionDetails.BillingSchedule>
4272
- >;
4273
-
4274
2871
  /**
4275
2872
  * A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
4276
2873
  */
@@ -4296,11 +2893,6 @@ declare module 'stripe' {
4296
2893
  */
4297
2894
  items?: Array<SubscriptionDetails.Item>;
4298
2895
 
4299
- /**
4300
- * The pre-billing to apply to the subscription as a preview.
4301
- */
4302
- prebilling?: SubscriptionDetails.Prebilling;
4303
-
4304
2896
  /**
4305
2897
  * Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
4306
2898
  */
@@ -4357,74 +2949,6 @@ declare module 'stripe' {
4357
2949
  type Type = 'classic' | 'flexible';
4358
2950
  }
4359
2951
 
4360
- interface BillingSchedule {
4361
- /**
4362
- * Configure billing schedule differently for individual subscription items.
4363
- */
4364
- applies_to?: Array<BillingSchedule.AppliesTo>;
4365
-
4366
- /**
4367
- * The end date for the billing schedule.
4368
- */
4369
- bill_until?: BillingSchedule.BillUntil;
4370
-
4371
- /**
4372
- * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
4373
- */
4374
- key?: string;
4375
- }
4376
-
4377
- namespace BillingSchedule {
4378
- interface AppliesTo {
4379
- /**
4380
- * The ID of the price object.
4381
- */
4382
- price?: string;
4383
-
4384
- /**
4385
- * Controls which subscription items the billing schedule applies to.
4386
- */
4387
- type: 'price';
4388
- }
4389
-
4390
- interface BillUntil {
4391
- /**
4392
- * Specifies the billing period.
4393
- */
4394
- duration?: BillUntil.Duration;
4395
-
4396
- /**
4397
- * The end date of the billing schedule.
4398
- */
4399
- timestamp?: number;
4400
-
4401
- /**
4402
- * Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
4403
- */
4404
- type: BillUntil.Type;
4405
- }
4406
-
4407
- namespace BillUntil {
4408
- interface Duration {
4409
- /**
4410
- * Specifies billing duration. Either `day`, `week`, `month` or `year`.
4411
- */
4412
- interval: Duration.Interval;
4413
-
4414
- /**
4415
- * The multiplier applied to the interval.
4416
- */
4417
- interval_count?: number;
4418
- }
4419
-
4420
- namespace Duration {
4421
- type Interval = 'day' | 'month' | 'week' | 'year';
4422
- }
4423
-
4424
- type Type = 'duration' | 'timestamp';
4425
- }
4426
- }
4427
-
4428
2952
  type CancelAt = 'max_period_end' | 'min_period_end';
4429
2953
 
4430
2954
  interface Item {
@@ -4503,56 +3027,12 @@ declare module 'stripe' {
4503
3027
  */
4504
3028
  discount?: string;
4505
3029
 
4506
- /**
4507
- * Details to determine how long the discount should be applied for.
4508
- */
4509
- discount_end?: Discount.DiscountEnd;
4510
-
4511
3030
  /**
4512
3031
  * ID of the promotion code to create a new discount for.
4513
3032
  */
4514
3033
  promotion_code?: string;
4515
3034
  }
4516
3035
 
4517
- namespace Discount {
4518
- interface DiscountEnd {
4519
- /**
4520
- * Time span for the redeemed discount.
4521
- */
4522
- duration?: DiscountEnd.Duration;
4523
-
4524
- /**
4525
- * A precise Unix timestamp for the discount to end. Must be in the future.
4526
- */
4527
- timestamp?: number;
4528
-
4529
- /**
4530
- * The type of calculation made to determine when the discount ends.
4531
- */
4532
- type: DiscountEnd.Type;
4533
- }
4534
-
4535
- namespace DiscountEnd {
4536
- interface Duration {
4537
- /**
4538
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4539
- */
4540
- interval: Duration.Interval;
4541
-
4542
- /**
4543
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4544
- */
4545
- interval_count: number;
4546
- }
4547
-
4548
- namespace Duration {
4549
- type Interval = 'day' | 'month' | 'week' | 'year';
4550
- }
4551
-
4552
- type Type = 'duration' | 'timestamp';
4553
- }
4554
- }
4555
-
4556
3036
  interface PriceData {
4557
3037
  /**
4558
3038
  * 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).
@@ -4606,13 +3086,6 @@ declare module 'stripe' {
4606
3086
  }
4607
3087
  }
4608
3088
 
4609
- interface Prebilling {
4610
- /**
4611
- * This is used to determine the number of billing cycles to prebill.
4612
- */
4613
- iterations: number;
4614
- }
4615
-
4616
3089
  type ProrationBehavior =
4617
3090
  | 'always_invoice'
4618
3091
  | 'create_prorations'
@@ -4797,11 +3270,6 @@ declare module 'stripe' {
4797
3270
  */
4798
3271
  id: string;
4799
3272
 
4800
- /**
4801
- * The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
4802
- */
4803
- margins?: Stripe.Emptyable<Array<string>>;
4804
-
4805
3273
  /**
4806
3274
  * 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`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
4807
3275
  */
@@ -4850,56 +3318,12 @@ declare module 'stripe' {
4850
3318
  */
4851
3319
  discount?: string;
4852
3320
 
4853
- /**
4854
- * Details to determine how long the discount should be applied for.
4855
- */
4856
- discount_end?: Discount.DiscountEnd;
4857
-
4858
3321
  /**
4859
3322
  * ID of the promotion code to create a new discount for.
4860
3323
  */
4861
3324
  promotion_code?: string;
4862
3325
  }
4863
3326
 
4864
- namespace Discount {
4865
- interface DiscountEnd {
4866
- /**
4867
- * Time span for the redeemed discount.
4868
- */
4869
- duration?: DiscountEnd.Duration;
4870
-
4871
- /**
4872
- * A precise Unix timestamp for the discount to end. Must be in the future.
4873
- */
4874
- timestamp?: number;
4875
-
4876
- /**
4877
- * The type of calculation made to determine when the discount ends.
4878
- */
4879
- type: DiscountEnd.Type;
4880
- }
4881
-
4882
- namespace DiscountEnd {
4883
- interface Duration {
4884
- /**
4885
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4886
- */
4887
- interval: Duration.Interval;
4888
-
4889
- /**
4890
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4891
- */
4892
- interval_count: number;
4893
- }
4894
-
4895
- namespace Duration {
4896
- type Interval = 'day' | 'month' | 'week' | 'year';
4897
- }
4898
-
4899
- type Type = 'duration' | 'timestamp';
4900
- }
4901
- }
4902
-
4903
3327
  interface Period {
4904
3328
  /**
4905
3329
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.
@@ -5131,11 +3555,6 @@ declare module 'stripe' {
5131
3555
  */
5132
3556
  expand?: Array<string>;
5133
3557
 
5134
- /**
5135
- * The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
5136
- */
5137
- margins?: Stripe.Emptyable<Array<string>>;
5138
-
5139
3558
  /**
5140
3559
  * 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`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
5141
3560
  */
@@ -5186,56 +3605,12 @@ declare module 'stripe' {
5186
3605
  */
5187
3606
  discount?: string;
5188
3607
 
5189
- /**
5190
- * Details to determine how long the discount should be applied for.
5191
- */
5192
- discount_end?: Discount.DiscountEnd;
5193
-
5194
3608
  /**
5195
3609
  * ID of the promotion code to create a new discount for.
5196
3610
  */
5197
3611
  promotion_code?: string;
5198
3612
  }
5199
3613
 
5200
- namespace Discount {
5201
- interface DiscountEnd {
5202
- /**
5203
- * Time span for the redeemed discount.
5204
- */
5205
- duration?: DiscountEnd.Duration;
5206
-
5207
- /**
5208
- * A precise Unix timestamp for the discount to end. Must be in the future.
5209
- */
5210
- timestamp?: number;
5211
-
5212
- /**
5213
- * The type of calculation made to determine when the discount ends.
5214
- */
5215
- type: DiscountEnd.Type;
5216
- }
5217
-
5218
- namespace DiscountEnd {
5219
- interface Duration {
5220
- /**
5221
- * Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
5222
- */
5223
- interval: Duration.Interval;
5224
-
5225
- /**
5226
- * The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
5227
- */
5228
- interval_count: number;
5229
- }
5230
-
5231
- namespace Duration {
5232
- type Interval = 'day' | 'month' | 'week' | 'year';
5233
- }
5234
-
5235
- type Type = 'duration' | 'timestamp';
5236
- }
5237
- }
5238
-
5239
3614
  interface Period {
5240
3615
  /**
5241
3616
  * The end of the period, which must be greater than or equal to the start. This value is inclusive.