stripe 15.3.0.pre.beta.1 → 15.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (600) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -0
  3. data/CHANGELOG.md +683 -1581
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +14 -50
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_requestor.rb +0 -28
  8. data/lib/stripe/api_version.rb +2 -1
  9. data/lib/stripe/errors.rb +0 -54
  10. data/lib/stripe/event_types.rb +0 -98
  11. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
  12. data/lib/stripe/object_types.rb +0 -50
  13. data/lib/stripe/resources/account.rb +82 -650
  14. data/lib/stripe/resources/account_session.rb +80 -335
  15. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
  16. data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
  17. data/lib/stripe/resources/billing/credit_grant.rb +0 -10
  18. data/lib/stripe/resources/billing_portal/session.rb +2 -8
  19. data/lib/stripe/resources/card.rb +0 -2
  20. data/lib/stripe/resources/cash_balance.rb +0 -2
  21. data/lib/stripe/resources/charge.rb +28 -1553
  22. data/lib/stripe/resources/checkout/session.rb +55 -333
  23. data/lib/stripe/resources/confirmation_token.rb +19 -181
  24. data/lib/stripe/resources/coupon.rb +1 -30
  25. data/lib/stripe/resources/credit_note.rb +9 -15
  26. data/lib/stripe/resources/credit_note_line_item.rb +0 -9
  27. data/lib/stripe/resources/customer.rb +0 -2
  28. data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
  29. data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
  30. data/lib/stripe/resources/customer_session.rb +3 -8
  31. data/lib/stripe/resources/discount.rb +0 -2
  32. data/lib/stripe/resources/event.rb +1 -32
  33. data/lib/stripe/resources/financial_connections/account.rb +1 -22
  34. data/lib/stripe/resources/financial_connections/session.rb +2 -62
  35. data/lib/stripe/resources/identity/verification_session.rb +34 -10
  36. data/lib/stripe/resources/invoice.rb +33 -1062
  37. data/lib/stripe/resources/invoice_item.rb +3 -82
  38. data/lib/stripe/resources/invoice_line_item.rb +1 -55
  39. data/lib/stripe/resources/invoice_payment.rb +53 -2
  40. data/lib/stripe/resources/issuing/cardholder.rb +1 -2
  41. data/lib/stripe/resources/issuing/transaction.rb +0 -6
  42. data/lib/stripe/resources/line_item.rb +0 -37
  43. data/lib/stripe/resources/mandate.rb +3 -24
  44. data/lib/stripe/resources/payment_intent.rb +875 -5512
  45. data/lib/stripe/resources/payment_method.rb +18 -201
  46. data/lib/stripe/resources/payment_method_configuration.rb +0 -295
  47. data/lib/stripe/resources/payout.rb +0 -6
  48. data/lib/stripe/resources/price.rb +0 -30
  49. data/lib/stripe/resources/promotion_code.rb +0 -10
  50. data/lib/stripe/resources/quote.rb +16 -2033
  51. data/lib/stripe/resources/refund.rb +0 -9
  52. data/lib/stripe/resources/setup_attempt.rb +1 -22
  53. data/lib/stripe/resources/setup_intent.rb +294 -581
  54. data/lib/stripe/resources/source.rb +0 -29
  55. data/lib/stripe/resources/subscription.rb +36 -298
  56. data/lib/stripe/resources/subscription_item.rb +3 -84
  57. data/lib/stripe/resources/subscription_schedule.rb +27 -1008
  58. data/lib/stripe/resources/tax/registration.rb +20 -0
  59. data/lib/stripe/resources/tax_id.rb +2 -12
  60. data/lib/stripe/resources/terminal/configuration.rb +1 -0
  61. data/lib/stripe/resources/terminal/reader.rb +10 -18
  62. data/lib/stripe/resources/token.rb +1 -1
  63. data/lib/stripe/resources/transfer.rb +0 -6
  64. data/lib/stripe/resources/treasury/financial_account.rb +8 -23
  65. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
  66. data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
  67. data/lib/stripe/resources/treasury/received_credit.rb +1 -38
  68. data/lib/stripe/resources/treasury/received_debit.rb +1 -40
  69. data/lib/stripe/resources.rb +0 -104
  70. data/lib/stripe/services/account_service.rb +76 -559
  71. data/lib/stripe/services/account_session_service.rb +49 -274
  72. data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
  73. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
  74. data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
  75. data/lib/stripe/services/billing_portal/session_service.rb +1 -5
  76. data/lib/stripe/services/charge_service.rb +0 -1418
  77. data/lib/stripe/services/checkout/session_service.rb +55 -250
  78. data/lib/stripe/services/coupon_service.rb +1 -17
  79. data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
  80. data/lib/stripe/services/credit_note_service.rb +6 -10
  81. data/lib/stripe/services/customer_session_service.rb +2 -5
  82. data/lib/stripe/services/financial_connections/account_service.rb +2 -7
  83. data/lib/stripe/services/financial_connections/session_service.rb +2 -34
  84. data/lib/stripe/services/financial_connections_service.rb +1 -2
  85. data/lib/stripe/services/identity/verification_session_service.rb +16 -8
  86. data/lib/stripe/services/invoice_item_service.rb +2 -74
  87. data/lib/stripe/services/invoice_line_item_service.rb +1 -33
  88. data/lib/stripe/services/invoice_payment_service.rb +83 -0
  89. data/lib/stripe/services/invoice_service.rb +33 -1013
  90. data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
  91. data/lib/stripe/services/issuing/transaction_service.rb +0 -4
  92. data/lib/stripe/services/issuing_service.rb +1 -5
  93. data/lib/stripe/services/payment_intent_service.rb +650 -4832
  94. data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
  95. data/lib/stripe/services/payment_method_service.rb +6 -120
  96. data/lib/stripe/services/payout_service.rb +0 -4
  97. data/lib/stripe/services/price_service.rb +0 -19
  98. data/lib/stripe/services/promotion_code_service.rb +0 -8
  99. data/lib/stripe/services/quote_service.rb +13 -1719
  100. data/lib/stripe/services/setup_intent_service.rb +284 -540
  101. data/lib/stripe/services/subscription_item_service.rb +3 -75
  102. data/lib/stripe/services/subscription_schedule_service.rb +19 -911
  103. data/lib/stripe/services/subscription_service.rb +30 -253
  104. data/lib/stripe/services/tax/registration_service.rb +13 -0
  105. data/lib/stripe/services/tax_id_service.rb +2 -8
  106. data/lib/stripe/services/tax_service.rb +1 -3
  107. data/lib/stripe/services/terminal/reader_service.rb +4 -4
  108. data/lib/stripe/services/terminal_service.rb +1 -2
  109. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -98
  110. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
  111. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
  112. data/lib/stripe/services/token_service.rb +1 -1
  113. data/lib/stripe/services/transfer_service.rb +0 -4
  114. data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
  115. data/lib/stripe/services/treasury/financial_account_service.rb +7 -17
  116. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
  117. data/lib/stripe/services/v1_services.rb +2 -11
  118. data/lib/stripe/services/v2/billing_service.rb +2 -2
  119. data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
  120. data/lib/stripe/services/v2/core_service.rb +1 -4
  121. data/lib/stripe/services/v2_services.rb +2 -5
  122. data/lib/stripe/services.rb +1 -53
  123. data/lib/stripe/stripe_configuration.rb +1 -3
  124. data/lib/stripe/stripe_object.rb +1 -1
  125. data/lib/stripe/util.rb +1 -7
  126. data/lib/stripe/version.rb +1 -1
  127. data/lib/stripe/webhook.rb +1 -1
  128. data/lib/stripe.rb +0 -53
  129. data/rbi/stripe/resources/account.rbi +4995 -0
  130. data/rbi/stripe/resources/account_link.rbi +74 -0
  131. data/rbi/stripe/resources/account_session.rbi +1013 -0
  132. data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
  133. data/rbi/stripe/resources/application.rbi +20 -0
  134. data/rbi/stripe/resources/application_fee.rbi +118 -0
  135. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  136. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  137. data/rbi/stripe/resources/balance.rbi +235 -0
  138. data/rbi/stripe/resources/balance_transaction.rbi +147 -0
  139. data/rbi/stripe/resources/bank_account.rbi +127 -0
  140. data/rbi/stripe/resources/billing/alert.rbi +201 -0
  141. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  142. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
  143. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
  144. data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
  145. data/rbi/stripe/resources/billing/meter.rbi +226 -0
  146. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  147. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  148. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  149. data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
  150. data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
  151. data/rbi/stripe/resources/capability.rbi +125 -0
  152. data/rbi/stripe/resources/card.rbi +125 -0
  153. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  154. data/rbi/stripe/resources/charge.rbi +2086 -0
  155. data/rbi/stripe/resources/checkout/session.rbi +4060 -0
  156. data/rbi/stripe/resources/climate/order.rbi +245 -0
  157. data/rbi/stripe/resources/climate/product.rbi +75 -0
  158. data/rbi/stripe/resources/climate/supplier.rbi +72 -0
  159. data/rbi/stripe/resources/confirmation_token.rbi +1818 -0
  160. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  161. data/rbi/stripe/resources/country_spec.rbi +85 -0
  162. data/rbi/stripe/resources/coupon.rbi +250 -0
  163. data/rbi/stripe/resources/credit_note.rbi +752 -0
  164. data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
  165. data/rbi/stripe/resources/customer.rbi +1005 -0
  166. data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
  167. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  168. data/rbi/stripe/resources/customer_session.rbi +200 -0
  169. data/rbi/stripe/resources/discount.rbi +53 -0
  170. data/rbi/stripe/resources/dispute.rbi +761 -0
  171. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
  172. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  173. data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
  174. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  175. data/rbi/stripe/resources/event.rbi +149 -0
  176. data/rbi/stripe/resources/exchange_rate.rbi +66 -0
  177. data/rbi/stripe/resources/file.rbi +143 -0
  178. data/rbi/stripe/resources/file_link.rbi +141 -0
  179. data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
  180. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  181. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  182. data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
  183. data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
  184. data/rbi/stripe/resources/forwarding/request.rbi +216 -0
  185. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  186. data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
  187. data/rbi/stripe/resources/identity/verification_session.rbi +564 -0
  188. data/rbi/stripe/resources/invoice.rbi +3842 -0
  189. data/rbi/stripe/resources/invoice_item.rbi +470 -0
  190. data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
  191. data/rbi/stripe/resources/invoice_payment.rbi +121 -0
  192. data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
  193. data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
  194. data/rbi/stripe/resources/issuing/card.rbi +741 -0
  195. data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
  196. data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
  197. data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
  198. data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
  199. data/rbi/stripe/resources/issuing/token.rbi +226 -0
  200. data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
  201. data/rbi/stripe/resources/line_item.rbi +72 -0
  202. data/rbi/stripe/resources/login_link.rbi +19 -0
  203. data/rbi/stripe/resources/mandate.rbi +191 -0
  204. data/rbi/stripe/resources/payment_intent.rbi +9987 -0
  205. data/rbi/stripe/resources/payment_link.rbi +1801 -0
  206. data/rbi/stripe/resources/payment_method.rbi +1770 -0
  207. data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
  208. data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
  209. data/rbi/stripe/resources/payout.rbi +300 -0
  210. data/rbi/stripe/resources/person.rbi +401 -0
  211. data/rbi/stripe/resources/plan.rbi +371 -0
  212. data/rbi/stripe/resources/price.rbi +694 -0
  213. data/rbi/stripe/resources/product.rbi +555 -0
  214. data/rbi/stripe/resources/product_feature.rbi +26 -0
  215. data/rbi/stripe/resources/promotion_code.rbi +261 -0
  216. data/rbi/stripe/resources/quote.rbi +1145 -0
  217. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
  218. data/rbi/stripe/resources/radar/value_list.rbi +168 -0
  219. data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
  220. data/rbi/stripe/resources/refund.rbi +523 -0
  221. data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
  222. data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
  223. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  224. data/rbi/stripe/resources/reversal.rbi +51 -0
  225. data/rbi/stripe/resources/review.rbi +154 -0
  226. data/rbi/stripe/resources/setup_attempt.rbi +477 -0
  227. data/rbi/stripe/resources/setup_intent.rbi +3978 -0
  228. data/rbi/stripe/resources/shipping_rate.rbi +305 -0
  229. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
  230. data/rbi/stripe/resources/source.rbi +1496 -0
  231. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  232. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  233. data/rbi/stripe/resources/subscription.rbi +2080 -0
  234. data/rbi/stripe/resources/subscription_item.rbi +404 -0
  235. data/rbi/stripe/resources/subscription_schedule.rbi +1645 -0
  236. data/rbi/stripe/resources/tax/calculation.rbi +478 -0
  237. data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
  238. data/rbi/stripe/resources/tax/registration.rbi +2732 -0
  239. data/rbi/stripe/resources/tax/settings.rbi +141 -0
  240. data/rbi/stripe/resources/tax/transaction.rbi +351 -0
  241. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  242. data/rbi/stripe/resources/tax_code.rbi +44 -0
  243. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  244. data/rbi/stripe/resources/tax_id.rbi +165 -0
  245. data/rbi/stripe/resources/tax_rate.rbi +239 -0
  246. data/rbi/stripe/resources/terminal/configuration.rbi +1387 -0
  247. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  248. data/rbi/stripe/resources/terminal/location.rbi +222 -0
  249. data/rbi/stripe/resources/terminal/reader.rbi +994 -0
  250. data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
  251. data/rbi/stripe/resources/token.rbi +1283 -0
  252. data/rbi/stripe/resources/topup.rbi +222 -0
  253. data/rbi/stripe/resources/transfer.rbi +199 -0
  254. data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
  255. data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
  256. data/rbi/stripe/resources/treasury/financial_account.rbi +869 -0
  257. data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
  258. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
  259. data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
  260. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
  261. data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
  262. data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
  263. data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
  264. data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
  265. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  266. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  267. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  268. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  269. data/rbi/stripe/resources/v2/event.rbi +48 -0
  270. data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
  271. data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
  272. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  273. data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +122 -135
  274. data/rbi/stripe/services/account_link_service.rbi +58 -0
  275. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  276. data/rbi/stripe/services/account_person_service.rbi +1011 -0
  277. data/rbi/stripe/services/account_service.rbi +4281 -0
  278. data/rbi/stripe/services/account_session_service.rbi +646 -0
  279. data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
  280. data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
  281. data/rbi/stripe/services/application_fee_service.rbi +78 -0
  282. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  283. data/rbi/stripe/services/apps_service.rbi +9 -0
  284. data/rbi/stripe/services/balance_service.rbi +21 -0
  285. data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
  286. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  287. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  288. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  289. data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
  290. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
  291. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  292. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  293. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  294. data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
  295. data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
  296. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  297. data/rbi/stripe/services/billing_service.rbi +15 -0
  298. data/rbi/stripe/services/charge_service.rbi +448 -0
  299. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  300. data/rbi/stripe/services/checkout/session_service.rbi +2670 -0
  301. data/rbi/stripe/services/checkout_service.rbi +9 -0
  302. data/rbi/stripe/services/climate/order_service.rbi +142 -0
  303. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  304. data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
  305. data/rbi/stripe/services/climate_service.rbi +11 -0
  306. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  307. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  308. data/rbi/stripe/services/coupon_service.rbi +194 -0
  309. data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
  310. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  311. data/rbi/stripe/services/credit_note_service.rbi +415 -0
  312. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  313. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  314. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  315. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  316. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  317. data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
  318. data/rbi/stripe/services/customer_service.rbi +647 -0
  319. data/rbi/stripe/services/customer_session_service.rbi +116 -0
  320. data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
  321. data/rbi/stripe/services/dispute_service.rbi +424 -0
  322. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  323. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  324. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  325. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  326. data/rbi/stripe/services/event_service.rbi +83 -0
  327. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  328. data/rbi/stripe/services/file_link_service.rbi +124 -0
  329. data/rbi/stripe/services/file_service.rbi +116 -0
  330. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  331. data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
  332. data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
  333. data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
  334. data/rbi/stripe/services/financial_connections_service.rbi +11 -0
  335. data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
  336. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  337. data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
  338. data/rbi/stripe/services/identity/verification_session_service.rbi +339 -0
  339. data/rbi/stripe/services/identity_service.rbi +10 -0
  340. data/rbi/stripe/services/invoice_item_service.rbi +366 -0
  341. data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
  342. data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
  343. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  344. data/rbi/stripe/services/invoice_service.rbi +3011 -0
  345. data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
  346. data/rbi/stripe/services/issuing/card_service.rbi +495 -0
  347. data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
  348. data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
  349. data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
  350. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  351. data/rbi/stripe/services/issuing/token_service.rbi +99 -0
  352. data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
  353. data/rbi/stripe/services/issuing_service.rbi +16 -0
  354. data/rbi/stripe/services/mandate_service.rbi +20 -0
  355. data/rbi/stripe/services/payment_intent_service.rbi +7989 -0
  356. data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
  357. data/rbi/stripe/services/payment_link_service.rbi +1352 -0
  358. data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
  359. data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
  360. data/rbi/stripe/services/payment_method_service.rbi +781 -0
  361. data/rbi/stripe/services/payout_service.rbi +205 -0
  362. data/rbi/stripe/services/plan_service.rbi +282 -0
  363. data/rbi/stripe/services/price_service.rbi +546 -0
  364. data/rbi/stripe/services/product_feature_service.rbi +67 -0
  365. data/rbi/stripe/services/product_service.rbi +477 -0
  366. data/rbi/stripe/services/promotion_code_service.rbi +214 -0
  367. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  368. data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
  369. data/rbi/stripe/services/quote_service.rbi +699 -0
  370. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
  371. data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
  372. data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
  373. data/rbi/stripe/services/radar_service.rbi +11 -0
  374. data/rbi/stripe/services/refund_service.rbi +185 -0
  375. data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
  376. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  377. data/rbi/stripe/services/reporting_service.rbi +10 -0
  378. data/rbi/stripe/services/review_service.rbi +84 -0
  379. data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
  380. data/rbi/stripe/services/setup_intent_service.rbi +3709 -0
  381. data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
  382. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  383. data/rbi/stripe/services/sigma_service.rbi +9 -0
  384. data/rbi/stripe/services/source_service.rbi +663 -0
  385. data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
  386. data/rbi/stripe/services/subscription_item_service.rbi +350 -0
  387. data/rbi/stripe/services/subscription_schedule_service.rbi +1301 -0
  388. data/rbi/stripe/services/subscription_service.rbi +1684 -0
  389. data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
  390. data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
  391. data/rbi/stripe/services/tax/registration_service.rbi +1858 -0
  392. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  393. data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
  394. data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
  395. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  396. data/rbi/stripe/services/tax_id_service.rbi +110 -0
  397. data/rbi/stripe/services/tax_rate_service.rbi +185 -0
  398. data/rbi/stripe/services/tax_service.rbi +12 -0
  399. data/rbi/stripe/services/terminal/configuration_service.rbi +1118 -0
  400. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  401. data/rbi/stripe/services/terminal/location_service.rbi +182 -0
  402. data/rbi/stripe/services/terminal/reader_service.rbi +540 -0
  403. data/rbi/stripe/services/terminal_service.rbi +12 -0
  404. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
  405. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  406. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
  407. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  408. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
  409. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
  410. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  411. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  412. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +93 -0
  413. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  414. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
  415. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  416. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
  417. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
  418. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
  419. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
  420. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  421. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  422. data/rbi/stripe/services/token_service.rbi +1257 -0
  423. data/rbi/stripe/services/topup_service.rbi +176 -0
  424. data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
  425. data/rbi/stripe/services/transfer_service.rbi +152 -0
  426. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  427. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  428. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
  429. data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
  430. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  431. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
  432. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
  433. data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
  434. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  435. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
  436. data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
  437. data/rbi/stripe/services/treasury_service.rbi +18 -0
  438. data/rbi/stripe/services/v1_services.rbi +77 -0
  439. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  440. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  441. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
  442. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  443. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  444. data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
  445. data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
  446. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  447. data/rbi/stripe/services/v2_services.rbi +10 -0
  448. data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
  449. data/stripe.gemspec +1 -4
  450. metadata +326 -162
  451. data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
  452. data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
  453. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
  454. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
  455. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
  456. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
  457. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
  458. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
  459. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
  460. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
  461. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
  462. data/lib/stripe/events/v2_core_account_link_completed_event.rb +0 -13
  463. data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
  464. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
  465. data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
  466. data/lib/stripe/events/v2_core_account_updated_event.rb +0 -21
  467. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
  468. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
  469. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
  470. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
  471. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
  472. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
  473. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
  474. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
  475. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
  476. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
  477. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
  478. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
  479. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
  480. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
  481. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
  482. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
  483. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
  484. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
  485. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
  486. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
  487. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
  488. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
  489. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
  490. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
  491. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
  492. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
  493. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
  494. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
  495. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
  496. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
  497. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
  498. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
  499. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
  500. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
  501. data/lib/stripe/events/v2_off_session_payment_requires_capture_event.rb +0 -21
  502. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +0 -21
  503. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +0 -21
  504. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +0 -21
  505. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +0 -21
  506. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +0 -21
  507. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +0 -21
  508. data/lib/stripe/resources/account_notice.rb +0 -123
  509. data/lib/stripe/resources/balance_settings.rb +0 -105
  510. data/lib/stripe/resources/capital/financing_offer.rb +0 -179
  511. data/lib/stripe/resources/capital/financing_summary.rb +0 -55
  512. data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
  513. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  514. data/lib/stripe/resources/financial_connections/institution.rb +0 -92
  515. data/lib/stripe/resources/fx_quote.rb +0 -184
  516. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
  517. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
  518. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
  519. data/lib/stripe/resources/issuing/settlement.rb +0 -53
  520. data/lib/stripe/resources/margin.rb +0 -115
  521. data/lib/stripe/resources/order.rb +0 -2806
  522. data/lib/stripe/resources/payment_attempt_record.rb +0 -1086
  523. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
  524. data/lib/stripe/resources/payment_record.rb +0 -1615
  525. data/lib/stripe/resources/privacy/redaction_job.rb +0 -298
  526. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -33
  527. data/lib/stripe/resources/quote_line.rb +0 -274
  528. data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
  529. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -364
  530. data/lib/stripe/resources/tax/association.rb +0 -66
  531. data/lib/stripe/resources/tax/form.rb +0 -211
  532. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
  533. data/lib/stripe/resources/v2/core/account.rb +0 -1746
  534. data/lib/stripe/resources/v2/core/account_link.rb +0 -56
  535. data/lib/stripe/resources/v2/core/person.rb +0 -276
  536. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
  537. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
  538. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
  539. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
  540. data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
  541. data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -58
  542. data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
  543. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
  544. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
  545. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
  546. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
  547. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
  548. data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -75
  549. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
  550. data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -116
  551. data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
  552. data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
  553. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
  554. data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -74
  555. data/lib/stripe/services/account_notice_service.rb +0 -101
  556. data/lib/stripe/services/balance_settings_service.rb +0 -96
  557. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  558. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  559. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  560. data/lib/stripe/services/capital_service.rb +0 -15
  561. data/lib/stripe/services/fx_quote_service.rb +0 -123
  562. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  563. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  564. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  565. data/lib/stripe/services/margin_service.rb +0 -119
  566. data/lib/stripe/services/order_service.rb +0 -2236
  567. data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
  568. data/lib/stripe/services/payment_record_service.rb +0 -542
  569. data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
  570. data/lib/stripe/services/privacy_service.rb +0 -13
  571. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
  572. data/lib/stripe/services/tax/association_service.rb +0 -31
  573. data/lib/stripe/services/tax/form_service.rb +0 -100
  574. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  575. data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
  576. data/lib/stripe/services/v2/core/account_service.rb +0 -4138
  577. data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1046
  578. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -131
  579. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
  580. data/lib/stripe/services/v2/core/vault_service.rb +0 -18
  581. data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
  582. data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -43
  583. data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
  584. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
  585. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
  586. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -200
  587. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
  588. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
  589. data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -91
  590. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
  591. data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -70
  592. data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
  593. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
  594. data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
  595. data/lib/stripe/services/v2/money_management_service.rb +0 -31
  596. data/lib/stripe/services/v2/payment_service.rb +0 -15
  597. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -138
  598. data/lib/stripe/services/v2/test_helper_service.rb +0 -15
  599. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -49
  600. data/rbi/stripe.rbi +0 -191639
@@ -49,25 +49,6 @@ module Stripe
49
49
 
50
50
  nested_resource_class_methods :line, operations: %i[list]
51
51
 
52
- class AmountsDue < Stripe::StripeObject
53
- # Incremental amount due for this payment in cents (or local equivalent).
54
- attr_reader :amount
55
- # The amount in cents (or local equivalent) that was paid for this payment.
56
- attr_reader :amount_paid
57
- # The difference between the payment’s amount and amount_paid, in cents (or local equivalent).
58
- attr_reader :amount_remaining
59
- # Number of days from when invoice is finalized until the payment is due.
60
- attr_reader :days_until_due
61
- # An arbitrary string attached to the object. Often useful for displaying to users.
62
- attr_reader :description
63
- # Date on which a payment plan’s payment is due.
64
- attr_reader :due_date
65
- # Timestamp when the payment was paid.
66
- attr_reader :paid_at
67
- # The status of the payment, one of `open`, `paid`, or `past_due`
68
- attr_reader :status
69
- end
70
-
71
52
  class AutomaticTax < Stripe::StripeObject
72
53
  class Liability < Stripe::StripeObject
73
54
  # The connected account being referenced when `type` is `account`.
@@ -240,17 +221,9 @@ module Stripe
240
221
  end
241
222
 
242
223
  class SubscriptionDetails < Stripe::StripeObject
243
- class PauseCollection < Stripe::StripeObject
244
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
245
- attr_reader :behavior
246
- # The time after which the subscription will resume collecting payments.
247
- attr_reader :resumes_at
248
- end
249
224
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
250
225
  # *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
251
226
  attr_reader :metadata
252
- # 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).
253
- attr_reader :pause_collection
254
227
  # The subscription that generated this invoice
255
228
  attr_reader :subscription
256
229
  # Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
@@ -310,7 +283,6 @@ module Stripe
310
283
  attr_reader :funding_type
311
284
  end
312
285
 
313
- class IdBankTransfer < Stripe::StripeObject; end
314
286
  class Konbini < Stripe::StripeObject; end
315
287
  class SepaDebit < Stripe::StripeObject; end
316
288
 
@@ -319,8 +291,6 @@ module Stripe
319
291
  class Filters < Stripe::StripeObject
320
292
  # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
321
293
  attr_reader :account_subcategories
322
- # The institution to use to filter for possible accounts to link.
323
- attr_reader :institution
324
294
  end
325
295
  # Attribute for field filters
326
296
  attr_reader :filters
@@ -342,8 +312,6 @@ module Stripe
342
312
  attr_reader :card
343
313
  # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
344
314
  attr_reader :customer_balance
345
- # 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.
346
- attr_reader :id_bank_transfer
347
315
  # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
348
316
  attr_reader :konbini
349
317
  # 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.
@@ -457,13 +425,6 @@ module Stripe
457
425
  attr_reader :discount
458
426
  end
459
427
 
460
- class TotalMarginAmount < Stripe::StripeObject
461
- # The amount, in cents (or local equivalent), of the reduction in line item amount.
462
- attr_reader :amount
463
- # The margin that was applied to get this margin amount.
464
- attr_reader :margin
465
- end
466
-
467
428
  class TotalPretaxCreditAmount < Stripe::StripeObject
468
429
  # The amount, in cents (or local equivalent), of the pretax credit amount.
469
430
  attr_reader :amount
@@ -471,8 +432,6 @@ module Stripe
471
432
  attr_reader :credit_balance_transaction
472
433
  # The discount that was applied to get this pretax credit amount.
473
434
  attr_reader :discount
474
- # The margin that was applied to get this pretax credit amount.
475
- attr_reader :margin
476
435
  # Type of the pretax credit amount referenced.
477
436
  attr_reader :type
478
437
  end
@@ -499,24 +458,6 @@ module Stripe
499
458
  class DeleteParams < Stripe::RequestParams; end
500
459
 
501
460
  class UpdateParams < Stripe::RequestParams
502
- class AmountsDue < Stripe::RequestParams
503
- # The amount in cents (or local equivalent).
504
- attr_accessor :amount
505
- # Number of days from when invoice is finalized until the payment is due.
506
- attr_accessor :days_until_due
507
- # An arbitrary string attached to the object. Often useful for displaying to users.
508
- attr_accessor :description
509
- # Date on which a payment plan’s payment is due.
510
- attr_accessor :due_date
511
-
512
- def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
513
- @amount = amount
514
- @days_until_due = days_until_due
515
- @description = description
516
- @due_date = due_date
517
- end
518
- end
519
-
520
461
  class AutomaticTax < Stripe::RequestParams
521
462
  class Liability < Stripe::RequestParams
522
463
  # The connected account being referenced when `type` is `account`.
@@ -553,44 +494,16 @@ module Stripe
553
494
  end
554
495
 
555
496
  class Discount < Stripe::RequestParams
556
- class DiscountEnd < Stripe::RequestParams
557
- class Duration < Stripe::RequestParams
558
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
559
- attr_accessor :interval
560
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
561
- attr_accessor :interval_count
562
-
563
- def initialize(interval: nil, interval_count: nil)
564
- @interval = interval
565
- @interval_count = interval_count
566
- end
567
- end
568
- # Time span for the redeemed discount.
569
- attr_accessor :duration
570
- # A precise Unix timestamp for the discount to end. Must be in the future.
571
- attr_accessor :timestamp
572
- # The type of calculation made to determine when the discount ends.
573
- attr_accessor :type
574
-
575
- def initialize(duration: nil, timestamp: nil, type: nil)
576
- @duration = duration
577
- @timestamp = timestamp
578
- @type = type
579
- end
580
- end
581
497
  # ID of the coupon to create a new discount for.
582
498
  attr_accessor :coupon
583
499
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
584
500
  attr_accessor :discount
585
- # Details to determine how long the discount should be applied for.
586
- attr_accessor :discount_end
587
501
  # ID of the promotion code to create a new discount for.
588
502
  attr_accessor :promotion_code
589
503
 
590
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
504
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
591
505
  @coupon = coupon
592
506
  @discount = discount
593
- @discount_end = discount_end
594
507
  @promotion_code = promotion_code
595
508
  end
596
509
  end
@@ -646,7 +559,7 @@ module Stripe
646
559
  # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
647
560
  # One of `month`.
648
561
  attr_accessor :interval
649
- # Type of installment plan, one of `fixed_count`.
562
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
650
563
  attr_accessor :type
651
564
 
652
565
  def initialize(count: nil, interval: nil, type: nil)
@@ -710,7 +623,6 @@ module Stripe
710
623
  end
711
624
  end
712
625
 
713
- class IdBankTransfer < Stripe::RequestParams; end
714
626
  class Konbini < Stripe::RequestParams; end
715
627
  class SepaDebit < Stripe::RequestParams; end
716
628
 
@@ -719,12 +631,9 @@ module Stripe
719
631
  class Filters < Stripe::RequestParams
720
632
  # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
721
633
  attr_accessor :account_subcategories
722
- # ID of the institution to use to filter for selectable accounts.
723
- attr_accessor :institution
724
634
 
725
- def initialize(account_subcategories: nil, institution: nil)
635
+ def initialize(account_subcategories: nil)
726
636
  @account_subcategories = account_subcategories
727
- @institution = institution
728
637
  end
729
638
  end
730
639
  # Provide filters for the linked accounts that the customer can select for the payment method.
@@ -758,8 +667,6 @@ module Stripe
758
667
  attr_accessor :card
759
668
  # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
760
669
  attr_accessor :customer_balance
761
- # 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.
762
- attr_accessor :id_bank_transfer
763
670
  # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
764
671
  attr_accessor :konbini
765
672
  # 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.
@@ -772,7 +679,6 @@ module Stripe
772
679
  bancontact: nil,
773
680
  card: nil,
774
681
  customer_balance: nil,
775
- id_bank_transfer: nil,
776
682
  konbini: nil,
777
683
  sepa_debit: nil,
778
684
  us_bank_account: nil
@@ -781,7 +687,6 @@ module Stripe
781
687
  @bancontact = bancontact
782
688
  @card = card
783
689
  @customer_balance = customer_balance
784
- @id_bank_transfer = id_bank_transfer
785
690
  @konbini = konbini
786
691
  @sepa_debit = sepa_debit
787
692
  @us_bank_account = us_bank_account
@@ -993,8 +898,6 @@ module Stripe
993
898
  end
994
899
  # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
995
900
  attr_accessor :account_tax_ids
996
- # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
997
- attr_accessor :amounts_due
998
901
  # 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).
999
902
  attr_accessor :application_fee_amount
1000
903
  # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
@@ -1009,8 +912,6 @@ module Stripe
1009
912
  attr_accessor :custom_fields
1010
913
  # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
1011
914
  attr_accessor :days_until_due
1012
- # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
1013
- attr_accessor :default_margins
1014
915
  # 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.
1015
916
  attr_accessor :default_payment_method
1016
917
  # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
@@ -1052,7 +953,6 @@ module Stripe
1052
953
 
1053
954
  def initialize(
1054
955
  account_tax_ids: nil,
1055
- amounts_due: nil,
1056
956
  application_fee_amount: nil,
1057
957
  auto_advance: nil,
1058
958
  automatic_tax: nil,
@@ -1060,7 +960,6 @@ module Stripe
1060
960
  collection_method: nil,
1061
961
  custom_fields: nil,
1062
962
  days_until_due: nil,
1063
- default_margins: nil,
1064
963
  default_payment_method: nil,
1065
964
  default_source: nil,
1066
965
  default_tax_rates: nil,
@@ -1082,7 +981,6 @@ module Stripe
1082
981
  transfer_data: nil
1083
982
  )
1084
983
  @account_tax_ids = account_tax_ids
1085
- @amounts_due = amounts_due
1086
984
  @application_fee_amount = application_fee_amount
1087
985
  @auto_advance = auto_advance
1088
986
  @automatic_tax = automatic_tax
@@ -1090,7 +988,6 @@ module Stripe
1090
988
  @collection_method = collection_method
1091
989
  @custom_fields = custom_fields
1092
990
  @days_until_due = days_until_due
1093
- @default_margins = default_margins
1094
991
  @default_payment_method = default_payment_method
1095
992
  @default_source = default_source
1096
993
  @default_tax_rates = default_tax_rates
@@ -1155,8 +1052,6 @@ module Stripe
1155
1052
  attr_accessor :created
1156
1053
  # Only return invoices for the customer specified by this customer ID.
1157
1054
  attr_accessor :customer
1158
- # Only return invoices for the account specified by this account ID.
1159
- attr_accessor :customer_account
1160
1055
  # Attribute for param field due_date
1161
1056
  attr_accessor :due_date
1162
1057
  # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
@@ -1176,7 +1071,6 @@ module Stripe
1176
1071
  collection_method: nil,
1177
1072
  created: nil,
1178
1073
  customer: nil,
1179
- customer_account: nil,
1180
1074
  due_date: nil,
1181
1075
  ending_before: nil,
1182
1076
  expand: nil,
@@ -1188,7 +1082,6 @@ module Stripe
1188
1082
  @collection_method = collection_method
1189
1083
  @created = created
1190
1084
  @customer = customer
1191
- @customer_account = customer_account
1192
1085
  @due_date = due_date
1193
1086
  @ending_before = ending_before
1194
1087
  @expand = expand
@@ -1200,24 +1093,6 @@ module Stripe
1200
1093
  end
1201
1094
 
1202
1095
  class CreateParams < Stripe::RequestParams
1203
- class AmountsDue < Stripe::RequestParams
1204
- # The amount in cents (or local equivalent).
1205
- attr_accessor :amount
1206
- # Number of days from when invoice is finalized until the payment is due.
1207
- attr_accessor :days_until_due
1208
- # An arbitrary string attached to the object. Often useful for displaying to users.
1209
- attr_accessor :description
1210
- # Date on which a payment plan’s payment is due.
1211
- attr_accessor :due_date
1212
-
1213
- def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
1214
- @amount = amount
1215
- @days_until_due = days_until_due
1216
- @description = description
1217
- @due_date = due_date
1218
- end
1219
- end
1220
-
1221
1096
  class AutomaticTax < Stripe::RequestParams
1222
1097
  class Liability < Stripe::RequestParams
1223
1098
  # The connected account being referenced when `type` is `account`.
@@ -1254,44 +1129,16 @@ module Stripe
1254
1129
  end
1255
1130
 
1256
1131
  class Discount < Stripe::RequestParams
1257
- class DiscountEnd < Stripe::RequestParams
1258
- class Duration < Stripe::RequestParams
1259
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1260
- attr_accessor :interval
1261
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1262
- attr_accessor :interval_count
1263
-
1264
- def initialize(interval: nil, interval_count: nil)
1265
- @interval = interval
1266
- @interval_count = interval_count
1267
- end
1268
- end
1269
- # Time span for the redeemed discount.
1270
- attr_accessor :duration
1271
- # A precise Unix timestamp for the discount to end. Must be in the future.
1272
- attr_accessor :timestamp
1273
- # The type of calculation made to determine when the discount ends.
1274
- attr_accessor :type
1275
-
1276
- def initialize(duration: nil, timestamp: nil, type: nil)
1277
- @duration = duration
1278
- @timestamp = timestamp
1279
- @type = type
1280
- end
1281
- end
1282
1132
  # ID of the coupon to create a new discount for.
1283
1133
  attr_accessor :coupon
1284
1134
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1285
1135
  attr_accessor :discount
1286
- # Details to determine how long the discount should be applied for.
1287
- attr_accessor :discount_end
1288
1136
  # ID of the promotion code to create a new discount for.
1289
1137
  attr_accessor :promotion_code
1290
1138
 
1291
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1139
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1292
1140
  @coupon = coupon
1293
1141
  @discount = discount
1294
- @discount_end = discount_end
1295
1142
  @promotion_code = promotion_code
1296
1143
  end
1297
1144
  end
@@ -1359,7 +1206,7 @@ module Stripe
1359
1206
  # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
1360
1207
  # One of `month`.
1361
1208
  attr_accessor :interval
1362
- # Type of installment plan, one of `fixed_count`.
1209
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
1363
1210
  attr_accessor :type
1364
1211
 
1365
1212
  def initialize(count: nil, interval: nil, type: nil)
@@ -1423,7 +1270,6 @@ module Stripe
1423
1270
  end
1424
1271
  end
1425
1272
 
1426
- class IdBankTransfer < Stripe::RequestParams; end
1427
1273
  class Konbini < Stripe::RequestParams; end
1428
1274
  class SepaDebit < Stripe::RequestParams; end
1429
1275
 
@@ -1432,12 +1278,9 @@ module Stripe
1432
1278
  class Filters < Stripe::RequestParams
1433
1279
  # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1434
1280
  attr_accessor :account_subcategories
1435
- # ID of the institution to use to filter for selectable accounts.
1436
- attr_accessor :institution
1437
1281
 
1438
- def initialize(account_subcategories: nil, institution: nil)
1282
+ def initialize(account_subcategories: nil)
1439
1283
  @account_subcategories = account_subcategories
1440
- @institution = institution
1441
1284
  end
1442
1285
  end
1443
1286
  # Provide filters for the linked accounts that the customer can select for the payment method.
@@ -1471,8 +1314,6 @@ module Stripe
1471
1314
  attr_accessor :card
1472
1315
  # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
1473
1316
  attr_accessor :customer_balance
1474
- # 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.
1475
- attr_accessor :id_bank_transfer
1476
1317
  # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
1477
1318
  attr_accessor :konbini
1478
1319
  # 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.
@@ -1485,7 +1326,6 @@ module Stripe
1485
1326
  bancontact: nil,
1486
1327
  card: nil,
1487
1328
  customer_balance: nil,
1488
- id_bank_transfer: nil,
1489
1329
  konbini: nil,
1490
1330
  sepa_debit: nil,
1491
1331
  us_bank_account: nil
@@ -1494,7 +1334,6 @@ module Stripe
1494
1334
  @bancontact = bancontact
1495
1335
  @card = card
1496
1336
  @customer_balance = customer_balance
1497
- @id_bank_transfer = id_bank_transfer
1498
1337
  @konbini = konbini
1499
1338
  @sepa_debit = sepa_debit
1500
1339
  @us_bank_account = us_bank_account
@@ -1706,8 +1545,6 @@ module Stripe
1706
1545
  end
1707
1546
  # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
1708
1547
  attr_accessor :account_tax_ids
1709
- # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
1710
- attr_accessor :amounts_due
1711
1548
  # 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).
1712
1549
  attr_accessor :application_fee_amount
1713
1550
  # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
@@ -1724,12 +1561,8 @@ module Stripe
1724
1561
  attr_accessor :custom_fields
1725
1562
  # The ID of the customer who will be billed.
1726
1563
  attr_accessor :customer
1727
- # The ID of the account who will be billed.
1728
- attr_accessor :customer_account
1729
1564
  # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
1730
1565
  attr_accessor :days_until_due
1731
- # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
1732
- attr_accessor :default_margins
1733
1566
  # 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.
1734
1567
  attr_accessor :default_payment_method
1735
1568
  # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
@@ -1777,7 +1610,6 @@ module Stripe
1777
1610
 
1778
1611
  def initialize(
1779
1612
  account_tax_ids: nil,
1780
- amounts_due: nil,
1781
1613
  application_fee_amount: nil,
1782
1614
  auto_advance: nil,
1783
1615
  automatic_tax: nil,
@@ -1786,9 +1618,7 @@ module Stripe
1786
1618
  currency: nil,
1787
1619
  custom_fields: nil,
1788
1620
  customer: nil,
1789
- customer_account: nil,
1790
1621
  days_until_due: nil,
1791
- default_margins: nil,
1792
1622
  default_payment_method: nil,
1793
1623
  default_source: nil,
1794
1624
  default_tax_rates: nil,
@@ -1813,7 +1643,6 @@ module Stripe
1813
1643
  transfer_data: nil
1814
1644
  )
1815
1645
  @account_tax_ids = account_tax_ids
1816
- @amounts_due = amounts_due
1817
1646
  @application_fee_amount = application_fee_amount
1818
1647
  @auto_advance = auto_advance
1819
1648
  @automatic_tax = automatic_tax
@@ -1822,9 +1651,7 @@ module Stripe
1822
1651
  @currency = currency
1823
1652
  @custom_fields = custom_fields
1824
1653
  @customer = customer
1825
- @customer_account = customer_account
1826
1654
  @days_until_due = days_until_due
1827
- @default_margins = default_margins
1828
1655
  @default_payment_method = default_payment_method
1829
1656
  @default_source = default_source
1830
1657
  @default_tax_rates = default_tax_rates
@@ -1871,44 +1698,16 @@ module Stripe
1871
1698
  class AddLinesParams < Stripe::RequestParams
1872
1699
  class Line < Stripe::RequestParams
1873
1700
  class Discount < Stripe::RequestParams
1874
- class DiscountEnd < Stripe::RequestParams
1875
- class Duration < Stripe::RequestParams
1876
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1877
- attr_accessor :interval
1878
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1879
- attr_accessor :interval_count
1880
-
1881
- def initialize(interval: nil, interval_count: nil)
1882
- @interval = interval
1883
- @interval_count = interval_count
1884
- end
1885
- end
1886
- # Time span for the redeemed discount.
1887
- attr_accessor :duration
1888
- # A precise Unix timestamp for the discount to end. Must be in the future.
1889
- attr_accessor :timestamp
1890
- # The type of calculation made to determine when the discount ends.
1891
- attr_accessor :type
1892
-
1893
- def initialize(duration: nil, timestamp: nil, type: nil)
1894
- @duration = duration
1895
- @timestamp = timestamp
1896
- @type = type
1897
- end
1898
- end
1899
1701
  # ID of the coupon to create a new discount for.
1900
1702
  attr_accessor :coupon
1901
1703
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1902
1704
  attr_accessor :discount
1903
- # Details to determine how long the discount should be applied for.
1904
- attr_accessor :discount_end
1905
1705
  # ID of the promotion code to create a new discount for.
1906
1706
  attr_accessor :promotion_code
1907
1707
 
1908
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1708
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1909
1709
  @coupon = coupon
1910
1710
  @discount = discount
1911
- @discount_end = discount_end
1912
1711
  @promotion_code = promotion_code
1913
1712
  end
1914
1713
  end
@@ -2061,8 +1860,6 @@ module Stripe
2061
1860
  attr_accessor :discounts
2062
1861
  # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
2063
1862
  attr_accessor :invoice_item
2064
- # 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.
2065
- attr_accessor :margins
2066
1863
  # 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`.
2067
1864
  attr_accessor :metadata
2068
1865
  # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
@@ -2084,7 +1881,6 @@ module Stripe
2084
1881
  discountable: nil,
2085
1882
  discounts: nil,
2086
1883
  invoice_item: nil,
2087
- margins: nil,
2088
1884
  metadata: nil,
2089
1885
  period: nil,
2090
1886
  price_data: nil,
@@ -2098,7 +1894,6 @@ module Stripe
2098
1894
  @discountable = discountable
2099
1895
  @discounts = discounts
2100
1896
  @invoice_item = invoice_item
2101
- @margins = margins
2102
1897
  @metadata = metadata
2103
1898
  @period = period
2104
1899
  @price_data = price_data
@@ -2123,59 +1918,14 @@ module Stripe
2123
1918
  end
2124
1919
 
2125
1920
  class AttachPaymentParams < Stripe::RequestParams
2126
- class PaymentRecordData < Stripe::RequestParams
2127
- # The amount that was paid out of band.
2128
- attr_accessor :amount
2129
- # The currency that was paid out of band.
2130
- attr_accessor :currency
2131
- # 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`.
2132
- attr_accessor :metadata
2133
- # The type of money movement for this out of band payment record.
2134
- attr_accessor :money_movement_type
2135
- # The timestamp when this out of band payment was paid.
2136
- attr_accessor :paid_at
2137
- # The reference for this out of band payment record.
2138
- attr_accessor :payment_reference
2139
-
2140
- def initialize(
2141
- amount: nil,
2142
- currency: nil,
2143
- metadata: nil,
2144
- money_movement_type: nil,
2145
- paid_at: nil,
2146
- payment_reference: nil
2147
- )
2148
- @amount = amount
2149
- @currency = currency
2150
- @metadata = metadata
2151
- @money_movement_type = money_movement_type
2152
- @paid_at = paid_at
2153
- @payment_reference = payment_reference
2154
- end
2155
- end
2156
- # The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
2157
- attr_accessor :amount_requested
2158
1921
  # Specifies which fields in the response should be expanded.
2159
1922
  attr_accessor :expand
2160
1923
  # The ID of the PaymentIntent to attach to the invoice.
2161
1924
  attr_accessor :payment_intent
2162
- # The ID of the PaymentRecord to attach to the invoice.
2163
- attr_accessor :payment_record
2164
- # The PaymentRecord data for attaching an out of band payment to the invoice.
2165
- attr_accessor :payment_record_data
2166
1925
 
2167
- def initialize(
2168
- amount_requested: nil,
2169
- expand: nil,
2170
- payment_intent: nil,
2171
- payment_record: nil,
2172
- payment_record_data: nil
2173
- )
2174
- @amount_requested = amount_requested
1926
+ def initialize(expand: nil, payment_intent: nil)
2175
1927
  @expand = expand
2176
1928
  @payment_intent = payment_intent
2177
- @payment_record = payment_record
2178
- @payment_record_data = payment_record_data
2179
1929
  end
2180
1930
  end
2181
1931
 
@@ -2275,44 +2025,16 @@ module Stripe
2275
2025
  class UpdateLinesParams < Stripe::RequestParams
2276
2026
  class Line < Stripe::RequestParams
2277
2027
  class Discount < Stripe::RequestParams
2278
- class DiscountEnd < Stripe::RequestParams
2279
- class Duration < Stripe::RequestParams
2280
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2281
- attr_accessor :interval
2282
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2283
- attr_accessor :interval_count
2284
-
2285
- def initialize(interval: nil, interval_count: nil)
2286
- @interval = interval
2287
- @interval_count = interval_count
2288
- end
2289
- end
2290
- # Time span for the redeemed discount.
2291
- attr_accessor :duration
2292
- # A precise Unix timestamp for the discount to end. Must be in the future.
2293
- attr_accessor :timestamp
2294
- # The type of calculation made to determine when the discount ends.
2295
- attr_accessor :type
2296
-
2297
- def initialize(duration: nil, timestamp: nil, type: nil)
2298
- @duration = duration
2299
- @timestamp = timestamp
2300
- @type = type
2301
- end
2302
- end
2303
2028
  # ID of the coupon to create a new discount for.
2304
2029
  attr_accessor :coupon
2305
2030
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2306
2031
  attr_accessor :discount
2307
- # Details to determine how long the discount should be applied for.
2308
- attr_accessor :discount_end
2309
2032
  # ID of the promotion code to create a new discount for.
2310
2033
  attr_accessor :promotion_code
2311
2034
 
2312
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2035
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
2313
2036
  @coupon = coupon
2314
2037
  @discount = discount
2315
- @discount_end = discount_end
2316
2038
  @promotion_code = promotion_code
2317
2039
  end
2318
2040
  end
@@ -2465,8 +2187,6 @@ module Stripe
2465
2187
  attr_accessor :discounts
2466
2188
  # ID of an existing line item on the invoice.
2467
2189
  attr_accessor :id
2468
- # 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.
2469
- attr_accessor :margins
2470
2190
  # 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.
2471
2191
  attr_accessor :metadata
2472
2192
  # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
@@ -2488,7 +2208,6 @@ module Stripe
2488
2208
  discountable: nil,
2489
2209
  discounts: nil,
2490
2210
  id: nil,
2491
- margins: nil,
2492
2211
  metadata: nil,
2493
2212
  period: nil,
2494
2213
  price_data: nil,
@@ -2502,7 +2221,6 @@ module Stripe
2502
2221
  @discountable = discountable
2503
2222
  @discounts = discounts
2504
2223
  @id = id
2505
- @margins = margins
2506
2224
  @metadata = metadata
2507
2225
  @period = period
2508
2226
  @price_data = price_data
@@ -2677,88 +2395,32 @@ module Stripe
2677
2395
  end
2678
2396
 
2679
2397
  class Discount < Stripe::RequestParams
2680
- class DiscountEnd < Stripe::RequestParams
2681
- class Duration < Stripe::RequestParams
2682
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2683
- attr_accessor :interval
2684
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2685
- attr_accessor :interval_count
2686
-
2687
- def initialize(interval: nil, interval_count: nil)
2688
- @interval = interval
2689
- @interval_count = interval_count
2690
- end
2691
- end
2692
- # Time span for the redeemed discount.
2693
- attr_accessor :duration
2694
- # A precise Unix timestamp for the discount to end. Must be in the future.
2695
- attr_accessor :timestamp
2696
- # The type of calculation made to determine when the discount ends.
2697
- attr_accessor :type
2698
-
2699
- def initialize(duration: nil, timestamp: nil, type: nil)
2700
- @duration = duration
2701
- @timestamp = timestamp
2702
- @type = type
2703
- end
2704
- end
2705
2398
  # ID of the coupon to create a new discount for.
2706
2399
  attr_accessor :coupon
2707
2400
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2708
2401
  attr_accessor :discount
2709
- # Details to determine how long the discount should be applied for.
2710
- attr_accessor :discount_end
2711
2402
  # ID of the promotion code to create a new discount for.
2712
2403
  attr_accessor :promotion_code
2713
2404
 
2714
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2405
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
2715
2406
  @coupon = coupon
2716
2407
  @discount = discount
2717
- @discount_end = discount_end
2718
2408
  @promotion_code = promotion_code
2719
2409
  end
2720
2410
  end
2721
2411
 
2722
2412
  class InvoiceItem < Stripe::RequestParams
2723
2413
  class Discount < Stripe::RequestParams
2724
- class DiscountEnd < Stripe::RequestParams
2725
- class Duration < Stripe::RequestParams
2726
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2727
- attr_accessor :interval
2728
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2729
- attr_accessor :interval_count
2730
-
2731
- def initialize(interval: nil, interval_count: nil)
2732
- @interval = interval
2733
- @interval_count = interval_count
2734
- end
2735
- end
2736
- # Time span for the redeemed discount.
2737
- attr_accessor :duration
2738
- # A precise Unix timestamp for the discount to end. Must be in the future.
2739
- attr_accessor :timestamp
2740
- # The type of calculation made to determine when the discount ends.
2741
- attr_accessor :type
2742
-
2743
- def initialize(duration: nil, timestamp: nil, type: nil)
2744
- @duration = duration
2745
- @timestamp = timestamp
2746
- @type = type
2747
- end
2748
- end
2749
2414
  # ID of the coupon to create a new discount for.
2750
2415
  attr_accessor :coupon
2751
2416
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
2752
2417
  attr_accessor :discount
2753
- # Details to determine how long the discount should be applied for.
2754
- attr_accessor :discount_end
2755
2418
  # ID of the promotion code to create a new discount for.
2756
2419
  attr_accessor :promotion_code
2757
2420
 
2758
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2421
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
2759
2422
  @coupon = coupon
2760
2423
  @discount = discount
2761
- @discount_end = discount_end
2762
2424
  @promotion_code = promotion_code
2763
2425
  end
2764
2426
  end
@@ -2884,499 +2546,28 @@ module Stripe
2884
2546
  end
2885
2547
 
2886
2548
  class ScheduleDetails < Stripe::RequestParams
2887
- class Amendment < Stripe::RequestParams
2888
- class AmendmentEnd < Stripe::RequestParams
2889
- class DiscountEnd < Stripe::RequestParams
2890
- # The ID of a specific discount.
2891
- attr_accessor :discount
2892
-
2893
- def initialize(discount: nil)
2894
- @discount = discount
2895
- end
2896
- end
2897
-
2898
- class Duration < Stripe::RequestParams
2899
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2900
- attr_accessor :interval
2901
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2902
- attr_accessor :interval_count
2903
-
2904
- def initialize(interval: nil, interval_count: nil)
2905
- @interval = interval
2906
- @interval_count = interval_count
2907
- end
2908
- end
2909
- # Use the `end` time of a given discount.
2910
- attr_accessor :discount_end
2911
- # Time span for the amendment starting from the `amendment_start`.
2912
- attr_accessor :duration
2913
- # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
2914
- attr_accessor :timestamp
2915
- # Select one of three ways to pass the `amendment_end`.
2916
- attr_accessor :type
2917
-
2918
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
2919
- @discount_end = discount_end
2920
- @duration = duration
2921
- @timestamp = timestamp
2922
- @type = type
2923
- end
2924
- end
2925
-
2926
- class AmendmentStart < Stripe::RequestParams
2927
- class AmendmentEnd < Stripe::RequestParams
2928
- # 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.
2929
- attr_accessor :index
2930
-
2931
- def initialize(index: nil)
2932
- @index = index
2933
- end
2934
- end
2935
-
2936
- class DiscountEnd < Stripe::RequestParams
2937
- # The ID of a specific discount.
2938
- attr_accessor :discount
2939
-
2940
- def initialize(discount: nil)
2941
- @discount = discount
2942
- end
2943
- end
2944
- # Details of another amendment in the same array, immediately after which this amendment should begin.
2945
- attr_accessor :amendment_end
2946
- # Use the `end` time of a given discount.
2947
- attr_accessor :discount_end
2948
- # A precise Unix timestamp for the amendment to start.
2949
- attr_accessor :timestamp
2950
- # Select one of three ways to pass the `amendment_start`.
2951
- attr_accessor :type
2952
-
2953
- def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
2954
- @amendment_end = amendment_end
2955
- @discount_end = discount_end
2956
- @timestamp = timestamp
2957
- @type = type
2958
- end
2959
- end
2960
-
2961
- class DiscountAction < Stripe::RequestParams
2962
- class Add < Stripe::RequestParams
2963
- class DiscountEnd < Stripe::RequestParams
2964
- # The type of calculation made to determine when the discount ends.
2965
- attr_accessor :type
2966
-
2967
- def initialize(type: nil)
2968
- @type = type
2969
- end
2970
- end
2971
- # The coupon code to redeem.
2972
- attr_accessor :coupon
2973
- # An ID of an existing discount for a coupon that was already redeemed.
2974
- attr_accessor :discount
2975
- # Details to determine how long the discount should be applied for.
2976
- attr_accessor :discount_end
2977
- # 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.
2978
- attr_accessor :index
2979
- # The promotion code to redeem.
2980
- attr_accessor :promotion_code
2981
-
2982
- def initialize(
2983
- coupon: nil,
2984
- discount: nil,
2985
- discount_end: nil,
2986
- index: nil,
2987
- promotion_code: nil
2988
- )
2989
- @coupon = coupon
2990
- @discount = discount
2991
- @discount_end = discount_end
2992
- @index = index
2993
- @promotion_code = promotion_code
2994
- end
2995
- end
2996
-
2997
- class Remove < Stripe::RequestParams
2998
- # The coupon code to remove from the `discounts` array.
2999
- attr_accessor :coupon
3000
- # The ID of a discount to remove from the `discounts` array.
3001
- attr_accessor :discount
3002
- # The ID of a promotion code to remove from the `discounts` array.
3003
- attr_accessor :promotion_code
3004
-
3005
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
3006
- @coupon = coupon
3007
- @discount = discount
3008
- @promotion_code = promotion_code
3009
- end
3010
- end
3011
-
3012
- class Set < Stripe::RequestParams
3013
- # The coupon code to replace the `discounts` array with.
3014
- attr_accessor :coupon
3015
- # An ID of an existing discount to replace the `discounts` array with.
3016
- attr_accessor :discount
3017
- # An ID of an existing promotion code to replace the `discounts` array with.
3018
- attr_accessor :promotion_code
3019
-
3020
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
3021
- @coupon = coupon
3022
- @discount = discount
3023
- @promotion_code = promotion_code
3024
- end
3025
- end
3026
- # Details of the discount to add.
3027
- attr_accessor :add
3028
- # Details of the discount to remove.
3029
- attr_accessor :remove
3030
- # Details of the discount to replace the existing discounts with.
3031
- attr_accessor :set
3032
- # Determines the type of discount action.
3033
- attr_accessor :type
3034
-
3035
- def initialize(add: nil, remove: nil, set: nil, type: nil)
3036
- @add = add
3037
- @remove = remove
3038
- @set = set
3039
- @type = type
3040
- end
3041
- end
3042
-
3043
- class ItemAction < Stripe::RequestParams
3044
- class Add < Stripe::RequestParams
3045
- class Discount < Stripe::RequestParams
3046
- class DiscountEnd < Stripe::RequestParams
3047
- class Duration < Stripe::RequestParams
3048
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3049
- attr_accessor :interval
3050
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3051
- attr_accessor :interval_count
3052
-
3053
- def initialize(interval: nil, interval_count: nil)
3054
- @interval = interval
3055
- @interval_count = interval_count
3056
- end
3057
- end
3058
- # Time span for the redeemed discount.
3059
- attr_accessor :duration
3060
- # A precise Unix timestamp for the discount to end. Must be in the future.
3061
- attr_accessor :timestamp
3062
- # The type of calculation made to determine when the discount ends.
3063
- attr_accessor :type
3064
-
3065
- def initialize(duration: nil, timestamp: nil, type: nil)
3066
- @duration = duration
3067
- @timestamp = timestamp
3068
- @type = type
3069
- end
3070
- end
3071
- # ID of the coupon to create a new discount for.
3072
- attr_accessor :coupon
3073
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
3074
- attr_accessor :discount
3075
- # Details to determine how long the discount should be applied for.
3076
- attr_accessor :discount_end
3077
- # ID of the promotion code to create a new discount for.
3078
- attr_accessor :promotion_code
3079
-
3080
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
3081
- @coupon = coupon
3082
- @discount = discount
3083
- @discount_end = discount_end
3084
- @promotion_code = promotion_code
3085
- end
3086
- end
3087
-
3088
- class Trial < Stripe::RequestParams
3089
- # 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.
3090
- attr_accessor :converts_to
3091
- # Determines the type of trial for this item.
3092
- attr_accessor :type
3093
-
3094
- def initialize(converts_to: nil, type: nil)
3095
- @converts_to = converts_to
3096
- @type = type
3097
- end
3098
- end
3099
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
3100
- attr_accessor :discounts
3101
- # 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`.
3102
- attr_accessor :metadata
3103
- # The ID of the price object.
3104
- attr_accessor :price
3105
- # Quantity for this item.
3106
- attr_accessor :quantity
3107
- # 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`.
3108
- attr_accessor :tax_rates
3109
- # Options that configure the trial on the subscription item.
3110
- attr_accessor :trial
3111
-
3112
- def initialize(
3113
- discounts: nil,
3114
- metadata: nil,
3115
- price: nil,
3116
- quantity: nil,
3117
- tax_rates: nil,
3118
- trial: nil
3119
- )
3120
- @discounts = discounts
3121
- @metadata = metadata
3122
- @price = price
3123
- @quantity = quantity
3124
- @tax_rates = tax_rates
3125
- @trial = trial
3126
- end
3127
- end
3128
-
3129
- class Remove < Stripe::RequestParams
3130
- # ID of a price to remove.
3131
- attr_accessor :price
3132
-
3133
- def initialize(price: nil)
3134
- @price = price
3135
- end
3136
- end
3137
-
3138
- class Set < Stripe::RequestParams
3139
- class Discount < Stripe::RequestParams
3140
- class DiscountEnd < Stripe::RequestParams
3141
- class Duration < Stripe::RequestParams
3142
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3143
- attr_accessor :interval
3144
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3145
- attr_accessor :interval_count
3146
-
3147
- def initialize(interval: nil, interval_count: nil)
3148
- @interval = interval
3149
- @interval_count = interval_count
3150
- end
3151
- end
3152
- # Time span for the redeemed discount.
3153
- attr_accessor :duration
3154
- # A precise Unix timestamp for the discount to end. Must be in the future.
3155
- attr_accessor :timestamp
3156
- # The type of calculation made to determine when the discount ends.
3157
- attr_accessor :type
3158
-
3159
- def initialize(duration: nil, timestamp: nil, type: nil)
3160
- @duration = duration
3161
- @timestamp = timestamp
3162
- @type = type
3163
- end
3164
- end
3165
- # ID of the coupon to create a new discount for.
3166
- attr_accessor :coupon
3167
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
3168
- attr_accessor :discount
3169
- # Details to determine how long the discount should be applied for.
3170
- attr_accessor :discount_end
3171
- # ID of the promotion code to create a new discount for.
3172
- attr_accessor :promotion_code
3173
-
3174
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
3175
- @coupon = coupon
3176
- @discount = discount
3177
- @discount_end = discount_end
3178
- @promotion_code = promotion_code
3179
- end
3180
- end
3181
-
3182
- class Trial < Stripe::RequestParams
3183
- # 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.
3184
- attr_accessor :converts_to
3185
- # Determines the type of trial for this item.
3186
- attr_accessor :type
3187
-
3188
- def initialize(converts_to: nil, type: nil)
3189
- @converts_to = converts_to
3190
- @type = type
3191
- end
3192
- end
3193
- # 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`.
3194
- attr_accessor :discounts
3195
- # 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`.
3196
- attr_accessor :metadata
3197
- # The ID of the price object.
3198
- attr_accessor :price
3199
- # 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`.
3200
- attr_accessor :quantity
3201
- # 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`.
3202
- attr_accessor :tax_rates
3203
- # 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`.
3204
- attr_accessor :trial
3205
-
3206
- def initialize(
3207
- discounts: nil,
3208
- metadata: nil,
3209
- price: nil,
3210
- quantity: nil,
3211
- tax_rates: nil,
3212
- trial: nil
3213
- )
3214
- @discounts = discounts
3215
- @metadata = metadata
3216
- @price = price
3217
- @quantity = quantity
3218
- @tax_rates = tax_rates
3219
- @trial = trial
3220
- end
3221
- end
3222
- # 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.
3223
- attr_accessor :add
3224
- # Details of the subscription item to remove.
3225
- attr_accessor :remove
3226
- # 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.
3227
- attr_accessor :set
3228
- # Determines the type of item action.
3229
- attr_accessor :type
3230
-
3231
- def initialize(add: nil, remove: nil, set: nil, type: nil)
3232
- @add = add
3233
- @remove = remove
3234
- @set = set
3235
- @type = type
3236
- end
3237
- end
3238
-
3239
- class MetadataAction < Stripe::RequestParams
3240
- # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
3241
- attr_accessor :add
3242
- # Keys to remove from schedule phase metadata.
3243
- attr_accessor :remove
3244
- # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
3245
- attr_accessor :set
3246
- # Select one of three ways to update phase-level `metadata` on subscription schedules.
3247
- attr_accessor :type
3248
-
3249
- def initialize(add: nil, remove: nil, set: nil, type: nil)
3250
- @add = add
3251
- @remove = remove
3252
- @set = set
3253
- @type = type
3254
- end
3255
- end
3256
-
3257
- class SetPauseCollection < Stripe::RequestParams
3258
- class Set < Stripe::RequestParams
3259
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3260
- attr_accessor :behavior
3261
-
3262
- def initialize(behavior: nil)
3263
- @behavior = behavior
3264
- end
3265
- end
3266
- # Details of the pause_collection behavior to apply to the amendment.
3267
- attr_accessor :set
3268
- # Determines the type of the pause_collection amendment.
3269
- attr_accessor :type
3270
-
3271
- def initialize(set: nil, type: nil)
3272
- @set = set
3273
- @type = type
3274
- end
3275
- end
3276
-
3277
- class TrialSettings < Stripe::RequestParams
3278
- class EndBehavior < Stripe::RequestParams
3279
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3280
- attr_accessor :prorate_up_front
3281
-
3282
- def initialize(prorate_up_front: nil)
3283
- @prorate_up_front = prorate_up_front
3284
- end
3285
- end
3286
- # Defines how the subscription should behave when a trial ends.
3287
- attr_accessor :end_behavior
3288
-
3289
- def initialize(end_behavior: nil)
3290
- @end_behavior = end_behavior
3291
- end
3292
- end
3293
- # 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.
3294
- attr_accessor :amendment_end
3295
- # Details to identify the earliest timestamp where the proposed change should take effect.
3296
- attr_accessor :amendment_start
3297
- # 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.
3298
- attr_accessor :billing_cycle_anchor
3299
- # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
3300
- attr_accessor :discount_actions
3301
- # Changes to the subscription items during the amendment time span.
3302
- attr_accessor :item_actions
3303
- # Instructions for how to modify phase metadata
3304
- attr_accessor :metadata_actions
3305
- # 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`.
3306
- attr_accessor :proration_behavior
3307
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
3308
- attr_accessor :set_pause_collection
3309
- # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
3310
- attr_accessor :set_schedule_end
3311
- # Settings related to subscription trials.
3312
- attr_accessor :trial_settings
2549
+ class BillingMode < Stripe::RequestParams
2550
+ # Attribute for param field type
2551
+ attr_accessor :type
3313
2552
 
3314
- def initialize(
3315
- amendment_end: nil,
3316
- amendment_start: nil,
3317
- billing_cycle_anchor: nil,
3318
- discount_actions: nil,
3319
- item_actions: nil,
3320
- metadata_actions: nil,
3321
- proration_behavior: nil,
3322
- set_pause_collection: nil,
3323
- set_schedule_end: nil,
3324
- trial_settings: nil
3325
- )
3326
- @amendment_end = amendment_end
3327
- @amendment_start = amendment_start
3328
- @billing_cycle_anchor = billing_cycle_anchor
3329
- @discount_actions = discount_actions
3330
- @item_actions = item_actions
3331
- @metadata_actions = metadata_actions
3332
- @proration_behavior = proration_behavior
3333
- @set_pause_collection = set_pause_collection
3334
- @set_schedule_end = set_schedule_end
3335
- @trial_settings = trial_settings
2553
+ def initialize(type: nil)
2554
+ @type = type
3336
2555
  end
3337
2556
  end
3338
2557
 
3339
2558
  class Phase < Stripe::RequestParams
3340
2559
  class AddInvoiceItem < Stripe::RequestParams
3341
2560
  class Discount < Stripe::RequestParams
3342
- class DiscountEnd < Stripe::RequestParams
3343
- class Duration < Stripe::RequestParams
3344
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3345
- attr_accessor :interval
3346
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3347
- attr_accessor :interval_count
3348
-
3349
- def initialize(interval: nil, interval_count: nil)
3350
- @interval = interval
3351
- @interval_count = interval_count
3352
- end
3353
- end
3354
- # Time span for the redeemed discount.
3355
- attr_accessor :duration
3356
- # A precise Unix timestamp for the discount to end. Must be in the future.
3357
- attr_accessor :timestamp
3358
- # The type of calculation made to determine when the discount ends.
3359
- attr_accessor :type
3360
-
3361
- def initialize(duration: nil, timestamp: nil, type: nil)
3362
- @duration = duration
3363
- @timestamp = timestamp
3364
- @type = type
3365
- end
3366
- end
3367
2561
  # ID of the coupon to create a new discount for.
3368
2562
  attr_accessor :coupon
3369
2563
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
3370
2564
  attr_accessor :discount
3371
- # Details to determine how long the discount should be applied for.
3372
- attr_accessor :discount_end
3373
2565
  # ID of the promotion code to create a new discount for.
3374
2566
  attr_accessor :promotion_code
3375
2567
 
3376
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2568
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
3377
2569
  @coupon = coupon
3378
2570
  @discount = discount
3379
- @discount_end = discount_end
3380
2571
  @promotion_code = promotion_code
3381
2572
  end
3382
2573
  end
@@ -3469,44 +2660,16 @@ module Stripe
3469
2660
  end
3470
2661
 
3471
2662
  class Discount < Stripe::RequestParams
3472
- class DiscountEnd < Stripe::RequestParams
3473
- class Duration < Stripe::RequestParams
3474
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3475
- attr_accessor :interval
3476
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3477
- attr_accessor :interval_count
3478
-
3479
- def initialize(interval: nil, interval_count: nil)
3480
- @interval = interval
3481
- @interval_count = interval_count
3482
- end
3483
- end
3484
- # Time span for the redeemed discount.
3485
- attr_accessor :duration
3486
- # A precise Unix timestamp for the discount to end. Must be in the future.
3487
- attr_accessor :timestamp
3488
- # The type of calculation made to determine when the discount ends.
3489
- attr_accessor :type
3490
-
3491
- def initialize(duration: nil, timestamp: nil, type: nil)
3492
- @duration = duration
3493
- @timestamp = timestamp
3494
- @type = type
3495
- end
3496
- end
3497
2663
  # ID of the coupon to create a new discount for.
3498
2664
  attr_accessor :coupon
3499
2665
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
3500
2666
  attr_accessor :discount
3501
- # Details to determine how long the discount should be applied for.
3502
- attr_accessor :discount_end
3503
2667
  # ID of the promotion code to create a new discount for.
3504
2668
  attr_accessor :promotion_code
3505
2669
 
3506
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2670
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
3507
2671
  @coupon = coupon
3508
2672
  @discount = discount
3509
- @discount_end = discount_end
3510
2673
  @promotion_code = promotion_code
3511
2674
  end
3512
2675
  end
@@ -3548,44 +2711,16 @@ module Stripe
3548
2711
  end
3549
2712
 
3550
2713
  class Discount < Stripe::RequestParams
3551
- class DiscountEnd < Stripe::RequestParams
3552
- class Duration < Stripe::RequestParams
3553
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3554
- attr_accessor :interval
3555
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3556
- attr_accessor :interval_count
3557
-
3558
- def initialize(interval: nil, interval_count: nil)
3559
- @interval = interval
3560
- @interval_count = interval_count
3561
- end
3562
- end
3563
- # Time span for the redeemed discount.
3564
- attr_accessor :duration
3565
- # A precise Unix timestamp for the discount to end. Must be in the future.
3566
- attr_accessor :timestamp
3567
- # The type of calculation made to determine when the discount ends.
3568
- attr_accessor :type
3569
-
3570
- def initialize(duration: nil, timestamp: nil, type: nil)
3571
- @duration = duration
3572
- @timestamp = timestamp
3573
- @type = type
3574
- end
3575
- end
3576
2714
  # ID of the coupon to create a new discount for.
3577
2715
  attr_accessor :coupon
3578
2716
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
3579
2717
  attr_accessor :discount
3580
- # Details to determine how long the discount should be applied for.
3581
- attr_accessor :discount_end
3582
2718
  # ID of the promotion code to create a new discount for.
3583
2719
  attr_accessor :promotion_code
3584
2720
 
3585
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2721
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
3586
2722
  @coupon = coupon
3587
2723
  @discount = discount
3588
- @discount_end = discount_end
3589
2724
  @promotion_code = promotion_code
3590
2725
  end
3591
2726
  end
@@ -3631,18 +2766,6 @@ module Stripe
3631
2766
  @unit_amount_decimal = unit_amount_decimal
3632
2767
  end
3633
2768
  end
3634
-
3635
- class Trial < Stripe::RequestParams
3636
- # 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.
3637
- attr_accessor :converts_to
3638
- # Determines the type of trial for this item.
3639
- attr_accessor :type
3640
-
3641
- def initialize(converts_to: nil, type: nil)
3642
- @converts_to = converts_to
3643
- @type = type
3644
- end
3645
- end
3646
2769
  # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
3647
2770
  attr_accessor :billing_thresholds
3648
2771
  # The coupons to redeem into discounts for the subscription item.
@@ -3659,8 +2782,6 @@ module Stripe
3659
2782
  attr_accessor :quantity
3660
2783
  # 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.
3661
2784
  attr_accessor :tax_rates
3662
- # Options that configure the trial on the subscription item.
3663
- attr_accessor :trial
3664
2785
 
3665
2786
  def initialize(
3666
2787
  billing_thresholds: nil,
@@ -3670,8 +2791,7 @@ module Stripe
3670
2791
  price: nil,
3671
2792
  price_data: nil,
3672
2793
  quantity: nil,
3673
- tax_rates: nil,
3674
- trial: nil
2794
+ tax_rates: nil
3675
2795
  )
3676
2796
  @billing_thresholds = billing_thresholds
3677
2797
  @discounts = discounts
@@ -3681,16 +2801,6 @@ module Stripe
3681
2801
  @price_data = price_data
3682
2802
  @quantity = quantity
3683
2803
  @tax_rates = tax_rates
3684
- @trial = trial
3685
- end
3686
- end
3687
-
3688
- class PauseCollection < Stripe::RequestParams
3689
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3690
- attr_accessor :behavior
3691
-
3692
- def initialize(behavior: nil)
3693
- @behavior = behavior
3694
2804
  end
3695
2805
  end
3696
2806
 
@@ -3705,23 +2815,6 @@ module Stripe
3705
2815
  @destination = destination
3706
2816
  end
3707
2817
  end
3708
-
3709
- class TrialSettings < Stripe::RequestParams
3710
- class EndBehavior < Stripe::RequestParams
3711
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3712
- attr_accessor :prorate_up_front
3713
-
3714
- def initialize(prorate_up_front: nil)
3715
- @prorate_up_front = prorate_up_front
3716
- end
3717
- end
3718
- # Defines how the subscription should behave when a trial ends.
3719
- attr_accessor :end_behavior
3720
-
3721
- def initialize(end_behavior: nil)
3722
- @end_behavior = end_behavior
3723
- end
3724
- end
3725
2818
  # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
3726
2819
  attr_accessor :add_invoice_items
3727
2820
  # 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. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
@@ -3756,8 +2849,6 @@ module Stripe
3756
2849
  attr_accessor :metadata
3757
2850
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
3758
2851
  attr_accessor :on_behalf_of
3759
- # 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).
3760
- attr_accessor :pause_collection
3761
2852
  # 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.
3762
2853
  attr_accessor :proration_behavior
3763
2854
  # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
@@ -3766,12 +2857,8 @@ module Stripe
3766
2857
  attr_accessor :transfer_data
3767
2858
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
3768
2859
  attr_accessor :trial
3769
- # Specify trial behavior when crossing phase boundaries
3770
- attr_accessor :trial_continuation
3771
2860
  # 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`
3772
2861
  attr_accessor :trial_end
3773
- # Settings related to subscription trials.
3774
- attr_accessor :trial_settings
3775
2862
 
3776
2863
  def initialize(
3777
2864
  add_invoice_items: nil,
@@ -3791,14 +2878,11 @@ module Stripe
3791
2878
  iterations: nil,
3792
2879
  metadata: nil,
3793
2880
  on_behalf_of: nil,
3794
- pause_collection: nil,
3795
2881
  proration_behavior: nil,
3796
2882
  start_date: nil,
3797
2883
  transfer_data: nil,
3798
2884
  trial: nil,
3799
- trial_continuation: nil,
3800
- trial_end: nil,
3801
- trial_settings: nil
2885
+ trial_end: nil
3802
2886
  )
3803
2887
  @add_invoice_items = add_invoice_items
3804
2888
  @application_fee_percent = application_fee_percent
@@ -3817,100 +2901,40 @@ module Stripe
3817
2901
  @iterations = iterations
3818
2902
  @metadata = metadata
3819
2903
  @on_behalf_of = on_behalf_of
3820
- @pause_collection = pause_collection
3821
2904
  @proration_behavior = proration_behavior
3822
2905
  @start_date = start_date
3823
2906
  @transfer_data = transfer_data
3824
2907
  @trial = trial
3825
- @trial_continuation = trial_continuation
3826
2908
  @trial_end = trial_end
3827
- @trial_settings = trial_settings
3828
2909
  end
3829
2910
  end
3830
-
3831
- class Prebilling < Stripe::RequestParams
3832
- class BillUntil < Stripe::RequestParams
3833
- class AmendmentEnd < Stripe::RequestParams
3834
- # 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.
3835
- attr_accessor :index
3836
-
3837
- def initialize(index: nil)
3838
- @index = index
3839
- end
3840
- end
3841
-
3842
- class Duration < Stripe::RequestParams
3843
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3844
- attr_accessor :interval
3845
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3846
- attr_accessor :interval_count
3847
-
3848
- def initialize(interval: nil, interval_count: nil)
3849
- @interval = interval
3850
- @interval_count = interval_count
3851
- end
3852
- end
3853
- # End the prebilled period when a specified amendment ends.
3854
- attr_accessor :amendment_end
3855
- # Time span for prebilling, starting from `bill_from`.
3856
- attr_accessor :duration
3857
- # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
3858
- attr_accessor :timestamp
3859
- # Select one of several ways to pass the `bill_until` value.
3860
- attr_accessor :type
3861
-
3862
- def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
3863
- @amendment_end = amendment_end
3864
- @duration = duration
3865
- @timestamp = timestamp
3866
- @type = type
3867
- end
3868
- end
3869
- # The end of the prebilled time period.
3870
- attr_accessor :bill_until
3871
- # This is used to determine the number of billing cycles to prebill.
3872
- attr_accessor :iterations
3873
-
3874
- def initialize(bill_until: nil, iterations: nil)
3875
- @bill_until = bill_until
3876
- @iterations = iterations
3877
- end
3878
- end
3879
- # Changes to apply to the phases of the subscription schedule, in the order provided.
3880
- attr_accessor :amendments
3881
- # 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.
3882
- attr_accessor :billing_behavior
3883
2911
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
3884
2912
  attr_accessor :billing_mode
3885
2913
  # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
3886
2914
  attr_accessor :end_behavior
3887
2915
  # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
3888
2916
  attr_accessor :phases
3889
- # Provide any time periods to bill in advance.
3890
- attr_accessor :prebilling
3891
2917
  # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
3892
2918
  attr_accessor :proration_behavior
3893
2919
 
3894
- def initialize(
3895
- amendments: nil,
3896
- billing_behavior: nil,
3897
- billing_mode: nil,
3898
- end_behavior: nil,
3899
- phases: nil,
3900
- prebilling: nil,
3901
- proration_behavior: nil
3902
- )
3903
- @amendments = amendments
3904
- @billing_behavior = billing_behavior
2920
+ def initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil)
3905
2921
  @billing_mode = billing_mode
3906
2922
  @end_behavior = end_behavior
3907
2923
  @phases = phases
3908
- @prebilling = prebilling
3909
2924
  @proration_behavior = proration_behavior
3910
2925
  end
3911
2926
  end
3912
2927
 
3913
2928
  class SubscriptionDetails < Stripe::RequestParams
2929
+ class BillingMode < Stripe::RequestParams
2930
+ # Attribute for param field type
2931
+ attr_accessor :type
2932
+
2933
+ def initialize(type: nil)
2934
+ @type = type
2935
+ end
2936
+ end
2937
+
3914
2938
  class Item < Stripe::RequestParams
3915
2939
  class BillingThresholds < Stripe::RequestParams
3916
2940
  # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
@@ -3922,44 +2946,16 @@ module Stripe
3922
2946
  end
3923
2947
 
3924
2948
  class Discount < Stripe::RequestParams
3925
- class DiscountEnd < Stripe::RequestParams
3926
- class Duration < Stripe::RequestParams
3927
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3928
- attr_accessor :interval
3929
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3930
- attr_accessor :interval_count
3931
-
3932
- def initialize(interval: nil, interval_count: nil)
3933
- @interval = interval
3934
- @interval_count = interval_count
3935
- end
3936
- end
3937
- # Time span for the redeemed discount.
3938
- attr_accessor :duration
3939
- # A precise Unix timestamp for the discount to end. Must be in the future.
3940
- attr_accessor :timestamp
3941
- # The type of calculation made to determine when the discount ends.
3942
- attr_accessor :type
3943
-
3944
- def initialize(duration: nil, timestamp: nil, type: nil)
3945
- @duration = duration
3946
- @timestamp = timestamp
3947
- @type = type
3948
- end
3949
- end
3950
2949
  # ID of the coupon to create a new discount for.
3951
2950
  attr_accessor :coupon
3952
2951
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
3953
2952
  attr_accessor :discount
3954
- # Details to determine how long the discount should be applied for.
3955
- attr_accessor :discount_end
3956
2953
  # ID of the promotion code to create a new discount for.
3957
2954
  attr_accessor :promotion_code
3958
2955
 
3959
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2956
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
3960
2957
  @coupon = coupon
3961
2958
  @discount = discount
3962
- @discount_end = discount_end
3963
2959
  @promotion_code = promotion_code
3964
2960
  end
3965
2961
  end
@@ -4054,22 +3050,13 @@ module Stripe
4054
3050
  @tax_rates = tax_rates
4055
3051
  end
4056
3052
  end
4057
-
4058
- class Prebilling < Stripe::RequestParams
4059
- # This is used to determine the number of billing cycles to prebill.
4060
- attr_accessor :iterations
4061
-
4062
- def initialize(iterations: nil)
4063
- @iterations = iterations
4064
- end
4065
- end
4066
3053
  # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
4067
3054
  attr_accessor :billing_cycle_anchor
4068
3055
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
4069
3056
  attr_accessor :billing_mode
4070
3057
  # 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.
4071
3058
  attr_accessor :cancel_at
4072
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
3059
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
4073
3060
  attr_accessor :cancel_at_period_end
4074
3061
  # This simulates the subscription being canceled or expired immediately.
4075
3062
  attr_accessor :cancel_now
@@ -4077,8 +3064,6 @@ module Stripe
4077
3064
  attr_accessor :default_tax_rates
4078
3065
  # A list of up to 20 subscription items, each with an attached price.
4079
3066
  attr_accessor :items
4080
- # The pre-billing to apply to the subscription as a preview.
4081
- attr_accessor :prebilling
4082
3067
  # 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`.
4083
3068
  attr_accessor :proration_behavior
4084
3069
  # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
@@ -4098,7 +3083,6 @@ module Stripe
4098
3083
  cancel_now: nil,
4099
3084
  default_tax_rates: nil,
4100
3085
  items: nil,
4101
- prebilling: nil,
4102
3086
  proration_behavior: nil,
4103
3087
  proration_date: nil,
4104
3088
  resume_at: nil,
@@ -4112,7 +3096,6 @@ module Stripe
4112
3096
  @cancel_now = cancel_now
4113
3097
  @default_tax_rates = default_tax_rates
4114
3098
  @items = items
4115
- @prebilling = prebilling
4116
3099
  @proration_behavior = proration_behavior
4117
3100
  @proration_date = proration_date
4118
3101
  @resume_at = resume_at
@@ -4126,8 +3109,6 @@ module Stripe
4126
3109
  attr_accessor :currency
4127
3110
  # 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.
4128
3111
  attr_accessor :customer
4129
- # 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.
4130
- attr_accessor :customer_account
4131
3112
  # 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.
4132
3113
  attr_accessor :customer_details
4133
3114
  # 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.
@@ -4155,7 +3136,6 @@ module Stripe
4155
3136
  automatic_tax: nil,
4156
3137
  currency: nil,
4157
3138
  customer: nil,
4158
- customer_account: nil,
4159
3139
  customer_details: nil,
4160
3140
  discounts: nil,
4161
3141
  expand: nil,
@@ -4171,7 +3151,6 @@ module Stripe
4171
3151
  @automatic_tax = automatic_tax
4172
3152
  @currency = currency
4173
3153
  @customer = customer
4174
- @customer_account = customer_account
4175
3154
  @customer_details = customer_details
4176
3155
  @discounts = discounts
4177
3156
  @expand = expand
@@ -4201,8 +3180,6 @@ module Stripe
4201
3180
  attr_reader :amount_remaining
4202
3181
  # This is the sum of all the shipping amounts.
4203
3182
  attr_reader :amount_shipping
4204
- # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
4205
- attr_reader :amounts_due
4206
3183
  # ID of the Connect Application that created the invoice.
4207
3184
  attr_reader :application
4208
3185
  # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
@@ -4237,8 +3214,6 @@ module Stripe
4237
3214
  attr_reader :custom_fields
4238
3215
  # The ID of the customer who will be billed.
4239
3216
  attr_reader :customer
4240
- # The ID of the account who will be billed.
4241
- attr_reader :customer_account
4242
3217
  # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
4243
3218
  attr_reader :customer_address
4244
3219
  # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
@@ -4253,8 +3228,6 @@ module Stripe
4253
3228
  attr_reader :customer_tax_exempt
4254
3229
  # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
4255
3230
  attr_reader :customer_tax_ids
4256
- # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
4257
- attr_reader :default_margins
4258
3231
  # 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.
4259
3232
  attr_reader :default_payment_method
4260
3233
  # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
@@ -4345,8 +3318,6 @@ module Stripe
4345
3318
  attr_reader :total_discount_amounts
4346
3319
  # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
4347
3320
  attr_reader :total_excluding_tax
4348
- # The aggregate amounts calculated per margin across all line items.
4349
- attr_reader :total_margin_amounts
4350
3321
  # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
4351
3322
  attr_reader :total_pretax_credit_amounts
4352
3323
  # The aggregate tax information of all line items.