stripe 15.5.0.pre.beta.1 → 15.5.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 (616) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +680 -1634
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +6 -4
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_requestor.rb +0 -32
  8. data/lib/stripe/api_version.rb +2 -1
  9. data/lib/stripe/errors.rb +0 -60
  10. data/lib/stripe/event_types.rb +0 -102
  11. data/lib/stripe/object_types.rb +0 -53
  12. data/lib/stripe/resources/account.rb +3 -655
  13. data/lib/stripe/resources/account_session.rb +76 -250
  14. data/lib/stripe/resources/balance.rb +2 -7
  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/meter.rb +2 -2
  19. data/lib/stripe/resources/billing_portal/configuration.rb +12 -2
  20. data/lib/stripe/resources/billing_portal/session.rb +0 -6
  21. data/lib/stripe/resources/card.rb +0 -2
  22. data/lib/stripe/resources/cash_balance.rb +0 -2
  23. data/lib/stripe/resources/charge.rb +38 -1543
  24. data/lib/stripe/resources/checkout/session.rb +16 -403
  25. data/lib/stripe/resources/confirmation_token.rb +0 -170
  26. data/lib/stripe/resources/coupon.rb +1 -30
  27. data/lib/stripe/resources/credit_note.rb +3 -9
  28. data/lib/stripe/resources/credit_note_line_item.rb +0 -9
  29. data/lib/stripe/resources/customer.rb +0 -2
  30. data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
  31. data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
  32. data/lib/stripe/resources/customer_session.rb +1 -6
  33. data/lib/stripe/resources/discount.rb +0 -2
  34. data/lib/stripe/resources/dispute.rb +1 -12
  35. data/lib/stripe/resources/event.rb +0 -31
  36. data/lib/stripe/resources/file.rb +1 -1
  37. data/lib/stripe/resources/file_link.rb +1 -1
  38. data/lib/stripe/resources/financial_connections/account.rb +1 -22
  39. data/lib/stripe/resources/financial_connections/session.rb +2 -62
  40. data/lib/stripe/resources/identity/verification_session.rb +0 -10
  41. data/lib/stripe/resources/invoice.rb +55 -1136
  42. data/lib/stripe/resources/invoice_item.rb +2 -78
  43. data/lib/stripe/resources/invoice_line_item.rb +1 -55
  44. data/lib/stripe/resources/invoice_payment.rb +53 -2
  45. data/lib/stripe/resources/issuing/card.rb +8 -0
  46. data/lib/stripe/resources/issuing/cardholder.rb +1 -2
  47. data/lib/stripe/resources/issuing/transaction.rb +0 -6
  48. data/lib/stripe/resources/line_item.rb +0 -37
  49. data/lib/stripe/resources/mandate.rb +0 -24
  50. data/lib/stripe/resources/payment_intent.rb +401 -6126
  51. data/lib/stripe/resources/payment_link.rb +1 -1
  52. data/lib/stripe/resources/payment_method.rb +1 -192
  53. data/lib/stripe/resources/payment_method_configuration.rb +0 -295
  54. data/lib/stripe/resources/price.rb +0 -30
  55. data/lib/stripe/resources/promotion_code.rb +5 -12
  56. data/lib/stripe/resources/quote.rb +7 -2038
  57. data/lib/stripe/resources/refund.rb +0 -9
  58. data/lib/stripe/resources/setup_attempt.rb +1 -22
  59. data/lib/stripe/resources/setup_intent.rb +10 -579
  60. data/lib/stripe/resources/source.rb +0 -29
  61. data/lib/stripe/resources/subscription.rb +116 -374
  62. data/lib/stripe/resources/subscription_item.rb +3 -84
  63. data/lib/stripe/resources/subscription_schedule.rb +134 -1009
  64. data/lib/stripe/resources/tax_id.rb +2 -12
  65. data/lib/stripe/resources/terminal/configuration.rb +49 -0
  66. data/lib/stripe/resources/terminal/reader.rb +22 -8
  67. data/lib/stripe/resources/transfer.rb +0 -6
  68. data/lib/stripe/resources/treasury/financial_account.rb +3 -22
  69. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
  70. data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
  71. data/lib/stripe/resources/treasury/received_credit.rb +1 -38
  72. data/lib/stripe/resources/treasury/received_debit.rb +1 -40
  73. data/lib/stripe/resources.rb +0 -109
  74. data/lib/stripe/services/account_service.rb +1 -562
  75. data/lib/stripe/services/account_session_service.rb +46 -220
  76. data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
  77. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
  78. data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
  79. data/lib/stripe/services/billing/meter_service.rb +1 -1
  80. data/lib/stripe/services/billing_portal/configuration_service.rb +10 -2
  81. data/lib/stripe/services/billing_portal/session_service.rb +0 -4
  82. data/lib/stripe/services/billing_service.rb +1 -2
  83. data/lib/stripe/services/charge_service.rb +0 -1418
  84. data/lib/stripe/services/checkout/session_service.rb +13 -319
  85. data/lib/stripe/services/coupon_service.rb +1 -17
  86. data/lib/stripe/services/credit_note_preview_lines_service.rb +1 -1
  87. data/lib/stripe/services/credit_note_service.rb +2 -6
  88. data/lib/stripe/services/customer_service.rb +4 -4
  89. data/lib/stripe/services/customer_session_service.rb +1 -4
  90. data/lib/stripe/services/file_link_service.rb +1 -1
  91. data/lib/stripe/services/file_service.rb +1 -1
  92. data/lib/stripe/services/financial_connections/account_service.rb +2 -7
  93. data/lib/stripe/services/financial_connections/session_service.rb +2 -34
  94. data/lib/stripe/services/financial_connections_service.rb +1 -2
  95. data/lib/stripe/services/identity/verification_session_service.rb +0 -8
  96. data/lib/stripe/services/invoice_item_service.rb +2 -74
  97. data/lib/stripe/services/invoice_line_item_service.rb +1 -33
  98. data/lib/stripe/services/invoice_payment_service.rb +83 -0
  99. data/lib/stripe/services/invoice_service.rb +54 -1069
  100. data/lib/stripe/services/issuing/card_service.rb +8 -0
  101. data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
  102. data/lib/stripe/services/issuing/transaction_service.rb +0 -4
  103. data/lib/stripe/services/issuing_service.rb +1 -5
  104. data/lib/stripe/services/payment_intent_service.rb +351 -5612
  105. data/lib/stripe/services/payment_link_service.rb +1 -1
  106. data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
  107. data/lib/stripe/services/payment_method_service.rb +1 -120
  108. data/lib/stripe/services/price_service.rb +0 -19
  109. data/lib/stripe/services/promotion_code_service.rb +0 -8
  110. data/lib/stripe/services/quote_service.rb +9 -1724
  111. data/lib/stripe/services/setup_intent_service.rb +9 -538
  112. data/lib/stripe/services/subscription_item_service.rb +3 -75
  113. data/lib/stripe/services/subscription_schedule_service.rb +110 -913
  114. data/lib/stripe/services/subscription_service.rb +116 -318
  115. data/lib/stripe/services/tax_id_service.rb +2 -8
  116. data/lib/stripe/services/tax_service.rb +1 -3
  117. data/lib/stripe/services/terminal/configuration_service.rb +38 -0
  118. data/lib/stripe/services/terminal_service.rb +1 -3
  119. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -97
  120. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +22 -0
  121. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
  122. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
  123. data/lib/stripe/services/transfer_service.rb +0 -4
  124. data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
  125. data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
  126. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
  127. data/lib/stripe/services/v1_services.rb +5 -14
  128. data/lib/stripe/services/v2/billing_service.rb +2 -2
  129. data/lib/stripe/services/v2/core_service.rb +2 -5
  130. data/lib/stripe/services/v2_services.rb +1 -4
  131. data/lib/stripe/services.rb +1 -55
  132. data/lib/stripe/stripe_configuration.rb +1 -3
  133. data/lib/stripe/stripe_object.rb +1 -1
  134. data/lib/stripe/stripe_service.rb +3 -1
  135. data/lib/stripe/util.rb +1 -7
  136. data/lib/stripe/version.rb +1 -1
  137. data/lib/stripe.rb +0 -53
  138. data/rbi/stripe/resources/account.rbi +4991 -0
  139. data/rbi/stripe/resources/account_link.rbi +76 -0
  140. data/rbi/stripe/resources/account_session.rbi +1173 -0
  141. data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
  142. data/rbi/stripe/resources/application.rbi +20 -0
  143. data/rbi/stripe/resources/application_fee.rbi +118 -0
  144. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  145. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  146. data/rbi/stripe/resources/balance.rbi +230 -0
  147. data/rbi/stripe/resources/balance_transaction.rbi +147 -0
  148. data/rbi/stripe/resources/bank_account.rbi +127 -0
  149. data/rbi/stripe/resources/billing/alert.rbi +201 -0
  150. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  151. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
  152. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
  153. data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
  154. data/rbi/stripe/resources/billing/meter.rbi +226 -0
  155. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  156. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  157. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  158. data/rbi/stripe/resources/billing_portal/configuration.rbi +712 -0
  159. data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
  160. data/rbi/stripe/resources/capability.rbi +125 -0
  161. data/rbi/stripe/resources/card.rbi +125 -0
  162. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  163. data/rbi/stripe/resources/charge.rbi +2136 -0
  164. data/rbi/stripe/resources/checkout/session.rbi +4105 -0
  165. data/rbi/stripe/resources/climate/order.rbi +245 -0
  166. data/rbi/stripe/resources/climate/product.rbi +75 -0
  167. data/rbi/stripe/resources/climate/supplier.rbi +72 -0
  168. data/rbi/stripe/resources/confirmation_token.rbi +1818 -0
  169. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  170. data/rbi/stripe/resources/country_spec.rbi +85 -0
  171. data/rbi/stripe/resources/coupon.rbi +250 -0
  172. data/rbi/stripe/resources/credit_note.rbi +752 -0
  173. data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
  174. data/rbi/stripe/resources/customer.rbi +993 -0
  175. data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
  176. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  177. data/rbi/stripe/resources/customer_session.rbi +200 -0
  178. data/rbi/stripe/resources/discount.rbi +53 -0
  179. data/rbi/stripe/resources/dispute.rbi +761 -0
  180. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
  181. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  182. data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
  183. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  184. data/rbi/stripe/resources/event.rbi +137 -0
  185. data/rbi/stripe/resources/exchange_rate.rbi +66 -0
  186. data/rbi/stripe/resources/file.rbi +143 -0
  187. data/rbi/stripe/resources/file_link.rbi +141 -0
  188. data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
  189. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  190. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  191. data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
  192. data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
  193. data/rbi/stripe/resources/forwarding/request.rbi +216 -0
  194. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  195. data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
  196. data/rbi/stripe/resources/identity/verification_session.rbi +564 -0
  197. data/rbi/stripe/resources/invoice.rbi +3894 -0
  198. data/rbi/stripe/resources/invoice_item.rbi +470 -0
  199. data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
  200. data/rbi/stripe/resources/invoice_payment.rbi +121 -0
  201. data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
  202. data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
  203. data/rbi/stripe/resources/issuing/card.rbi +749 -0
  204. data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
  205. data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
  206. data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
  207. data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
  208. data/rbi/stripe/resources/issuing/token.rbi +226 -0
  209. data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
  210. data/rbi/stripe/resources/line_item.rbi +72 -0
  211. data/rbi/stripe/resources/login_link.rbi +19 -0
  212. data/rbi/stripe/resources/mandate.rbi +191 -0
  213. data/rbi/stripe/resources/payment_intent.rbi +10011 -0
  214. data/rbi/stripe/resources/payment_link.rbi +1891 -0
  215. data/rbi/stripe/resources/payment_method.rbi +1770 -0
  216. data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
  217. data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
  218. data/rbi/stripe/resources/payout.rbi +307 -0
  219. data/rbi/stripe/resources/person.rbi +401 -0
  220. data/rbi/stripe/resources/plan.rbi +371 -0
  221. data/rbi/stripe/resources/price.rbi +694 -0
  222. data/rbi/stripe/resources/product.rbi +553 -0
  223. data/rbi/stripe/resources/product_feature.rbi +26 -0
  224. data/rbi/stripe/resources/promotion_code.rbi +264 -0
  225. data/rbi/stripe/resources/quote.rbi +1137 -0
  226. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
  227. data/rbi/stripe/resources/radar/value_list.rbi +168 -0
  228. data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
  229. data/rbi/stripe/resources/refund.rbi +523 -0
  230. data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
  231. data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
  232. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  233. data/rbi/stripe/resources/reversal.rbi +51 -0
  234. data/rbi/stripe/resources/review.rbi +154 -0
  235. data/rbi/stripe/resources/setup_attempt.rbi +477 -0
  236. data/rbi/stripe/resources/setup_intent.rbi +3974 -0
  237. data/rbi/stripe/resources/shipping_rate.rbi +305 -0
  238. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
  239. data/rbi/stripe/resources/source.rbi +1496 -0
  240. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  241. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  242. data/rbi/stripe/resources/subscription.rbi +2154 -0
  243. data/rbi/stripe/resources/subscription_item.rbi +404 -0
  244. data/rbi/stripe/resources/subscription_schedule.rbi +1795 -0
  245. data/rbi/stripe/resources/tax/calculation.rbi +478 -0
  246. data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
  247. data/rbi/stripe/resources/tax/registration.rbi +3216 -0
  248. data/rbi/stripe/resources/tax/settings.rbi +141 -0
  249. data/rbi/stripe/resources/tax/transaction.rbi +351 -0
  250. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  251. data/rbi/stripe/resources/tax_code.rbi +44 -0
  252. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  253. data/rbi/stripe/resources/tax_id.rbi +165 -0
  254. data/rbi/stripe/resources/tax_rate.rbi +239 -0
  255. data/rbi/stripe/resources/terminal/configuration.rbi +1647 -0
  256. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  257. data/rbi/stripe/resources/terminal/location.rbi +222 -0
  258. data/rbi/stripe/resources/terminal/reader.rbi +1016 -0
  259. data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
  260. data/rbi/stripe/resources/token.rbi +1281 -0
  261. data/rbi/stripe/resources/topup.rbi +222 -0
  262. data/rbi/stripe/resources/transfer.rbi +199 -0
  263. data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
  264. data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
  265. data/rbi/stripe/resources/treasury/financial_account.rbi +869 -0
  266. data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
  267. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
  268. data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
  269. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
  270. data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
  271. data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
  272. data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
  273. data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
  274. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  275. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  276. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  277. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  278. data/rbi/stripe/resources/v2/event.rbi +48 -0
  279. data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
  280. data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
  281. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  282. data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +122 -135
  283. data/rbi/stripe/services/account_link_service.rbi +60 -0
  284. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  285. data/rbi/stripe/services/account_person_service.rbi +1007 -0
  286. data/rbi/stripe/services/account_service.rbi +4281 -0
  287. data/rbi/stripe/services/account_session_service.rbi +748 -0
  288. data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
  289. data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
  290. data/rbi/stripe/services/application_fee_service.rbi +78 -0
  291. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  292. data/rbi/stripe/services/apps_service.rbi +9 -0
  293. data/rbi/stripe/services/balance_service.rbi +21 -0
  294. data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
  295. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  296. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  297. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  298. data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
  299. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
  300. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  301. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  302. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  303. data/rbi/stripe/services/billing_portal/configuration_service.rbi +561 -0
  304. data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
  305. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  306. data/rbi/stripe/services/billing_service.rbi +15 -0
  307. data/rbi/stripe/services/charge_service.rbi +448 -0
  308. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  309. data/rbi/stripe/services/checkout/session_service.rbi +2697 -0
  310. data/rbi/stripe/services/checkout_service.rbi +9 -0
  311. data/rbi/stripe/services/climate/order_service.rbi +142 -0
  312. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  313. data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
  314. data/rbi/stripe/services/climate_service.rbi +11 -0
  315. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  316. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  317. data/rbi/stripe/services/coupon_service.rbi +194 -0
  318. data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
  319. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  320. data/rbi/stripe/services/credit_note_service.rbi +415 -0
  321. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  322. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  323. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  324. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  325. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  326. data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
  327. data/rbi/stripe/services/customer_service.rbi +635 -0
  328. data/rbi/stripe/services/customer_session_service.rbi +116 -0
  329. data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
  330. data/rbi/stripe/services/dispute_service.rbi +424 -0
  331. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  332. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  333. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  334. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  335. data/rbi/stripe/services/event_service.rbi +83 -0
  336. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  337. data/rbi/stripe/services/file_link_service.rbi +124 -0
  338. data/rbi/stripe/services/file_service.rbi +116 -0
  339. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  340. data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
  341. data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
  342. data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
  343. data/rbi/stripe/services/financial_connections_service.rbi +11 -0
  344. data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
  345. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  346. data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
  347. data/rbi/stripe/services/identity/verification_session_service.rbi +339 -0
  348. data/rbi/stripe/services/identity_service.rbi +10 -0
  349. data/rbi/stripe/services/invoice_item_service.rbi +366 -0
  350. data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
  351. data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
  352. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  353. data/rbi/stripe/services/invoice_service.rbi +3073 -0
  354. data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
  355. data/rbi/stripe/services/issuing/card_service.rbi +503 -0
  356. data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
  357. data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
  358. data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
  359. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  360. data/rbi/stripe/services/issuing/token_service.rbi +99 -0
  361. data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
  362. data/rbi/stripe/services/issuing_service.rbi +16 -0
  363. data/rbi/stripe/services/mandate_service.rbi +20 -0
  364. data/rbi/stripe/services/payment_intent_service.rbi +8010 -0
  365. data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
  366. data/rbi/stripe/services/payment_link_service.rbi +1441 -0
  367. data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
  368. data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
  369. data/rbi/stripe/services/payment_method_service.rbi +781 -0
  370. data/rbi/stripe/services/payout_service.rbi +209 -0
  371. data/rbi/stripe/services/plan_service.rbi +282 -0
  372. data/rbi/stripe/services/price_service.rbi +546 -0
  373. data/rbi/stripe/services/product_feature_service.rbi +67 -0
  374. data/rbi/stripe/services/product_service.rbi +477 -0
  375. data/rbi/stripe/services/promotion_code_service.rbi +214 -0
  376. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  377. data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
  378. data/rbi/stripe/services/quote_service.rbi +695 -0
  379. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
  380. data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
  381. data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
  382. data/rbi/stripe/services/radar_service.rbi +11 -0
  383. data/rbi/stripe/services/refund_service.rbi +185 -0
  384. data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
  385. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  386. data/rbi/stripe/services/reporting_service.rbi +10 -0
  387. data/rbi/stripe/services/review_service.rbi +84 -0
  388. data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
  389. data/rbi/stripe/services/setup_intent_service.rbi +3709 -0
  390. data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
  391. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  392. data/rbi/stripe/services/sigma_service.rbi +9 -0
  393. data/rbi/stripe/services/source_service.rbi +663 -0
  394. data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
  395. data/rbi/stripe/services/subscription_item_service.rbi +350 -0
  396. data/rbi/stripe/services/subscription_schedule_service.rbi +1425 -0
  397. data/rbi/stripe/services/subscription_service.rbi +1768 -0
  398. data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
  399. data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
  400. data/rbi/stripe/services/tax/registration_service.rbi +2278 -0
  401. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  402. data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
  403. data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
  404. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  405. data/rbi/stripe/services/tax_id_service.rbi +110 -0
  406. data/rbi/stripe/services/tax_rate_service.rbi +185 -0
  407. data/rbi/stripe/services/tax_service.rbi +12 -0
  408. data/rbi/stripe/services/terminal/configuration_service.rbi +1328 -0
  409. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  410. data/rbi/stripe/services/terminal/location_service.rbi +182 -0
  411. data/rbi/stripe/services/terminal/reader_service.rbi +540 -0
  412. data/rbi/stripe/services/terminal_service.rbi +12 -0
  413. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
  414. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  415. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
  416. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  417. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
  418. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
  419. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  420. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  421. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +117 -0
  422. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  423. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
  424. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  425. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
  426. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
  427. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
  428. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
  429. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  430. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  431. data/rbi/stripe/services/token_service.rbi +1255 -0
  432. data/rbi/stripe/services/topup_service.rbi +176 -0
  433. data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
  434. data/rbi/stripe/services/transfer_service.rbi +152 -0
  435. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  436. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  437. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
  438. data/rbi/stripe/services/treasury/financial_account_service.rbi +566 -0
  439. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  440. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
  441. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
  442. data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
  443. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  444. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
  445. data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
  446. data/rbi/stripe/services/treasury_service.rbi +18 -0
  447. data/rbi/stripe/services/v1_services.rbi +77 -0
  448. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  449. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  450. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
  451. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  452. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  453. data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
  454. data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
  455. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  456. data/rbi/stripe/services/v2_services.rbi +10 -0
  457. data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
  458. data/stripe.gemspec +1 -4
  459. metadata +325 -169
  460. data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
  461. data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
  462. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
  463. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
  464. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
  465. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
  466. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
  467. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
  468. data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +0 -23
  469. data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +0 -21
  470. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
  471. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
  472. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
  473. data/lib/stripe/events/v2_core_account_link_returned_event.rb +0 -13
  474. data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
  475. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
  476. data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
  477. data/lib/stripe/events/v2_core_account_updated_event.rb +0 -21
  478. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
  479. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
  480. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
  481. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
  482. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
  483. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
  484. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
  485. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
  486. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
  487. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
  488. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
  489. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
  490. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
  491. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
  492. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
  493. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
  494. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
  495. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
  496. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
  497. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
  498. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
  499. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
  500. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
  501. data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +0 -21
  502. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
  503. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
  504. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
  505. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
  506. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
  507. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
  508. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
  509. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
  510. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
  511. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
  512. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
  513. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +0 -21
  514. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +0 -22
  515. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +0 -21
  516. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +0 -21
  517. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +0 -21
  518. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +0 -21
  519. data/lib/stripe/resources/account_notice.rb +0 -123
  520. data/lib/stripe/resources/balance_settings.rb +0 -105
  521. data/lib/stripe/resources/billing/meter_usage.rb +0 -23
  522. data/lib/stripe/resources/billing/meter_usage_row.rb +0 -28
  523. data/lib/stripe/resources/capital/financing_offer.rb +0 -179
  524. data/lib/stripe/resources/capital/financing_summary.rb +0 -55
  525. data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
  526. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  527. data/lib/stripe/resources/financial_connections/institution.rb +0 -92
  528. data/lib/stripe/resources/fx_quote.rb +0 -186
  529. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
  530. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
  531. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
  532. data/lib/stripe/resources/issuing/settlement.rb +0 -53
  533. data/lib/stripe/resources/margin.rb +0 -115
  534. data/lib/stripe/resources/order.rb +0 -2958
  535. data/lib/stripe/resources/payment_attempt_record.rb +0 -1101
  536. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
  537. data/lib/stripe/resources/payment_record.rb +0 -1630
  538. data/lib/stripe/resources/privacy/redaction_job.rb +0 -298
  539. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -33
  540. data/lib/stripe/resources/quote_line.rb +0 -274
  541. data/lib/stripe/resources/quote_preview_invoice.rb +0 -680
  542. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -371
  543. data/lib/stripe/resources/tax/association.rb +0 -66
  544. data/lib/stripe/resources/tax/form.rb +0 -211
  545. data/lib/stripe/resources/terminal/onboarding_link.rb +0 -84
  546. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
  547. data/lib/stripe/resources/v2/core/account.rb +0 -1930
  548. data/lib/stripe/resources/v2/core/account_link.rb +0 -72
  549. data/lib/stripe/resources/v2/core/person.rb +0 -276
  550. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
  551. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
  552. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
  553. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
  554. data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
  555. data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -77
  556. data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
  557. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
  558. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
  559. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
  560. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
  561. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
  562. data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -77
  563. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
  564. data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -122
  565. data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
  566. data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
  567. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
  568. data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -89
  569. data/lib/stripe/services/account_notice_service.rb +0 -101
  570. data/lib/stripe/services/balance_settings_service.rb +0 -96
  571. data/lib/stripe/services/billing/meter_usage_service.rb +0 -76
  572. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  573. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  574. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  575. data/lib/stripe/services/capital_service.rb +0 -15
  576. data/lib/stripe/services/fx_quote_service.rb +0 -123
  577. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  578. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  579. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  580. data/lib/stripe/services/margin_service.rb +0 -119
  581. data/lib/stripe/services/order_service.rb +0 -2388
  582. data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
  583. data/lib/stripe/services/payment_record_service.rb +0 -542
  584. data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
  585. data/lib/stripe/services/privacy_service.rb +0 -13
  586. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
  587. data/lib/stripe/services/tax/association_service.rb +0 -31
  588. data/lib/stripe/services/tax/form_service.rb +0 -100
  589. data/lib/stripe/services/terminal/onboarding_link_service.rb +0 -56
  590. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  591. data/lib/stripe/services/v2/core/account_link_service.rb +0 -114
  592. data/lib/stripe/services/v2/core/account_service.rb +0 -4522
  593. data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1045
  594. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -130
  595. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
  596. data/lib/stripe/services/v2/core/vault_service.rb +0 -18
  597. data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
  598. data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -116
  599. data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -82
  600. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
  601. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
  602. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -199
  603. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
  604. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
  605. data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -90
  606. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
  607. data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -70
  608. data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
  609. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
  610. data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
  611. data/lib/stripe/services/v2/money_management_service.rb +0 -31
  612. data/lib/stripe/services/v2/payment_service.rb +0 -15
  613. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -152
  614. data/lib/stripe/services/v2/test_helper_service.rb +0 -15
  615. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -53
  616. data/rbi/stripe.rbi +0 -199016
@@ -95,41 +95,42 @@ module Stripe
95
95
  attr_reader :transfer_data
96
96
  end
97
97
 
98
- class LastPriceMigrationError < Stripe::StripeObject
99
- class FailedTransition < Stripe::StripeObject
100
- # The original price to be migrated.
101
- attr_reader :source_price
102
- # The intended resulting price of the migration.
103
- attr_reader :target_price
104
- end
105
- # The time at which the price migration encountered an error.
106
- attr_reader :errored_at
107
- # The involved price pairs in each failed transition.
108
- attr_reader :failed_transitions
109
- # The type of error encountered by the price migration.
110
- attr_reader :type
111
- end
112
-
113
98
  class Phase < Stripe::StripeObject
114
99
  class AddInvoiceItem < Stripe::StripeObject
115
100
  class Discount < Stripe::StripeObject
116
- class DiscountEnd < Stripe::StripeObject
117
- # The discount end timestamp.
118
- attr_reader :timestamp
119
- # The discount end type.
120
- attr_reader :type
121
- end
122
101
  # ID of the coupon to create a new discount for.
123
102
  attr_reader :coupon
124
103
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
125
104
  attr_reader :discount
126
- # Details to determine how long the discount should be applied for.
127
- attr_reader :discount_end
128
105
  # ID of the promotion code to create a new discount for.
129
106
  attr_reader :promotion_code
130
107
  end
108
+
109
+ class Period < Stripe::StripeObject
110
+ class End < Stripe::StripeObject
111
+ # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
112
+ attr_reader :timestamp
113
+ # Select how to calculate the end of the invoice item period.
114
+ attr_reader :type
115
+ end
116
+
117
+ class Start < Stripe::StripeObject
118
+ # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
119
+ attr_reader :timestamp
120
+ # Select how to calculate the start of the invoice item period.
121
+ attr_reader :type
122
+ end
123
+ # Attribute for field end
124
+ attr_reader :end
125
+ # Attribute for field start
126
+ attr_reader :start
127
+ end
131
128
  # The stackable discounts that will be applied to the item.
132
129
  attr_reader :discounts
130
+ # 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.
131
+ attr_reader :metadata
132
+ # Attribute for field period
133
+ attr_reader :period
133
134
  # ID of the price used to generate the invoice item.
134
135
  attr_reader :price
135
136
  # The quantity of the invoice item.
@@ -161,18 +162,10 @@ module Stripe
161
162
  end
162
163
 
163
164
  class Discount < Stripe::StripeObject
164
- class DiscountEnd < Stripe::StripeObject
165
- # The discount end timestamp.
166
- attr_reader :timestamp
167
- # The discount end type.
168
- attr_reader :type
169
- end
170
165
  # ID of the coupon to create a new discount for.
171
166
  attr_reader :coupon
172
167
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
173
168
  attr_reader :discount
174
- # Details to determine how long the discount should be applied for.
175
- attr_reader :discount_end
176
169
  # ID of the promotion code to create a new discount for.
177
170
  attr_reader :promotion_code
178
171
  end
@@ -199,28 +192,13 @@ module Stripe
199
192
  end
200
193
 
201
194
  class Discount < Stripe::StripeObject
202
- class DiscountEnd < Stripe::StripeObject
203
- # The discount end timestamp.
204
- attr_reader :timestamp
205
- # The discount end type.
206
- attr_reader :type
207
- end
208
195
  # ID of the coupon to create a new discount for.
209
196
  attr_reader :coupon
210
197
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
211
198
  attr_reader :discount
212
- # Details to determine how long the discount should be applied for.
213
- attr_reader :discount_end
214
199
  # ID of the promotion code to create a new discount for.
215
200
  attr_reader :promotion_code
216
201
  end
217
-
218
- class Trial < Stripe::StripeObject
219
- # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
220
- attr_reader :converts_to
221
- # Determines the type of trial for this item.
222
- attr_reader :type
223
- end
224
202
  # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
225
203
  attr_reader :billing_thresholds
226
204
  # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
@@ -235,13 +213,6 @@ module Stripe
235
213
  attr_reader :quantity
236
214
  # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`.
237
215
  attr_reader :tax_rates
238
- # Options that configure the trial on the subscription item.
239
- attr_reader :trial
240
- end
241
-
242
- class PauseCollection < Stripe::StripeObject
243
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
244
- attr_reader :behavior
245
216
  end
246
217
 
247
218
  class TransferData < Stripe::StripeObject
@@ -250,15 +221,6 @@ module Stripe
250
221
  # The account where funds from the payment will be transferred to upon payment success.
251
222
  attr_reader :destination
252
223
  end
253
-
254
- class TrialSettings < Stripe::StripeObject
255
- class EndBehavior < Stripe::StripeObject
256
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
257
- attr_reader :prorate_up_front
258
- end
259
- # Defines how the subscription should behave when a trial ends.
260
- attr_reader :end_behavior
261
- end
262
224
  # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
263
225
  attr_reader :add_invoice_items
264
226
  # 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 during this phase of the schedule.
@@ -291,31 +253,14 @@ module Stripe
291
253
  attr_reader :metadata
292
254
  # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details.
293
255
  attr_reader :on_behalf_of
294
- # 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).
295
- attr_reader :pause_collection
296
256
  # When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
297
257
  attr_reader :proration_behavior
298
258
  # The start of this phase of the subscription schedule.
299
259
  attr_reader :start_date
300
260
  # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
301
261
  attr_reader :transfer_data
302
- # Specify behavior of the trial when crossing schedule phase boundaries
303
- attr_reader :trial_continuation
304
262
  # When the trial ends within the phase.
305
263
  attr_reader :trial_end
306
- # Settings related to any trials on the subscription during this phase.
307
- attr_reader :trial_settings
308
- end
309
-
310
- class Prebilling < Stripe::StripeObject
311
- # ID of the prebilling invoice.
312
- attr_reader :invoice
313
- # The end of the last period for which the invoice pre-bills.
314
- attr_reader :period_end
315
- # The start of the first period for which the invoice pre-bills.
316
- attr_reader :period_start
317
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
318
- attr_reader :update_behavior
319
264
  end
320
265
 
321
266
  class ListParams < Stripe::RequestParams
@@ -398,8 +343,6 @@ module Stripe
398
343
  attr_accessor :created
399
344
  # Only return subscription schedules for the given customer.
400
345
  attr_accessor :customer
401
- # Only return subscription schedules for the given account.
402
- attr_accessor :customer_account
403
346
  # 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.
404
347
  attr_accessor :ending_before
405
348
  # Specifies which fields in the response should be expanded.
@@ -418,7 +361,6 @@ module Stripe
418
361
  completed_at: nil,
419
362
  created: nil,
420
363
  customer: nil,
421
- customer_account: nil,
422
364
  ending_before: nil,
423
365
  expand: nil,
424
366
  limit: nil,
@@ -430,7 +372,6 @@ module Stripe
430
372
  @completed_at = completed_at
431
373
  @created = created
432
374
  @customer = customer
433
- @customer_account = customer_account
434
375
  @ending_before = ending_before
435
376
  @expand = expand
436
377
  @limit = limit
@@ -572,48 +513,55 @@ module Stripe
572
513
  class Phase < Stripe::RequestParams
573
514
  class AddInvoiceItem < Stripe::RequestParams
574
515
  class Discount < Stripe::RequestParams
575
- class DiscountEnd < Stripe::RequestParams
576
- class Duration < Stripe::RequestParams
577
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
578
- attr_accessor :interval
579
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
580
- attr_accessor :interval_count
581
-
582
- def initialize(interval: nil, interval_count: nil)
583
- @interval = interval
584
- @interval_count = interval_count
585
- end
586
- end
587
- # Time span for the redeemed discount.
588
- attr_accessor :duration
589
- # A precise Unix timestamp for the discount to end. Must be in the future.
590
- attr_accessor :timestamp
591
- # The type of calculation made to determine when the discount ends.
592
- attr_accessor :type
593
-
594
- def initialize(duration: nil, timestamp: nil, type: nil)
595
- @duration = duration
596
- @timestamp = timestamp
597
- @type = type
598
- end
599
- end
600
516
  # ID of the coupon to create a new discount for.
601
517
  attr_accessor :coupon
602
518
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
603
519
  attr_accessor :discount
604
- # Details to determine how long the discount should be applied for.
605
- attr_accessor :discount_end
606
520
  # ID of the promotion code to create a new discount for.
607
521
  attr_accessor :promotion_code
608
522
 
609
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
523
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
610
524
  @coupon = coupon
611
525
  @discount = discount
612
- @discount_end = discount_end
613
526
  @promotion_code = promotion_code
614
527
  end
615
528
  end
616
529
 
530
+ class Period < Stripe::RequestParams
531
+ class End < Stripe::RequestParams
532
+ # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
533
+ attr_accessor :timestamp
534
+ # Select how to calculate the end of the invoice item period.
535
+ attr_accessor :type
536
+
537
+ def initialize(timestamp: nil, type: nil)
538
+ @timestamp = timestamp
539
+ @type = type
540
+ end
541
+ end
542
+
543
+ class Start < Stripe::RequestParams
544
+ # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
545
+ attr_accessor :timestamp
546
+ # Select how to calculate the start of the invoice item period.
547
+ attr_accessor :type
548
+
549
+ def initialize(timestamp: nil, type: nil)
550
+ @timestamp = timestamp
551
+ @type = type
552
+ end
553
+ end
554
+ # End of the invoice item period.
555
+ attr_accessor :end
556
+ # Start of the invoice item period.
557
+ attr_accessor :start
558
+
559
+ def initialize(end_: nil, start: nil)
560
+ @end = end_
561
+ @start = start
562
+ end
563
+ end
564
+
617
565
  class PriceData < Stripe::RequestParams
618
566
  # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
619
567
  attr_accessor :currency
@@ -642,6 +590,10 @@ module Stripe
642
590
  end
643
591
  # The coupons to redeem into discounts for the item.
644
592
  attr_accessor :discounts
593
+ # 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`.
594
+ attr_accessor :metadata
595
+ # The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
596
+ attr_accessor :period
645
597
  # The ID of the price object. One of `price` or `price_data` is required.
646
598
  attr_accessor :price
647
599
  # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
@@ -651,8 +603,18 @@ module Stripe
651
603
  # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
652
604
  attr_accessor :tax_rates
653
605
 
654
- def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
606
+ def initialize(
607
+ discounts: nil,
608
+ metadata: nil,
609
+ period: nil,
610
+ price: nil,
611
+ price_data: nil,
612
+ quantity: nil,
613
+ tax_rates: nil
614
+ )
655
615
  @discounts = discounts
616
+ @metadata = metadata
617
+ @period = period
656
618
  @price = price
657
619
  @price_data = price_data
658
620
  @quantity = quantity
@@ -696,44 +658,16 @@ module Stripe
696
658
  end
697
659
 
698
660
  class Discount < Stripe::RequestParams
699
- class DiscountEnd < Stripe::RequestParams
700
- class Duration < Stripe::RequestParams
701
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
702
- attr_accessor :interval
703
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
704
- attr_accessor :interval_count
705
-
706
- def initialize(interval: nil, interval_count: nil)
707
- @interval = interval
708
- @interval_count = interval_count
709
- end
710
- end
711
- # Time span for the redeemed discount.
712
- attr_accessor :duration
713
- # A precise Unix timestamp for the discount to end. Must be in the future.
714
- attr_accessor :timestamp
715
- # The type of calculation made to determine when the discount ends.
716
- attr_accessor :type
717
-
718
- def initialize(duration: nil, timestamp: nil, type: nil)
719
- @duration = duration
720
- @timestamp = timestamp
721
- @type = type
722
- end
723
- end
724
661
  # ID of the coupon to create a new discount for.
725
662
  attr_accessor :coupon
726
663
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
727
664
  attr_accessor :discount
728
- # Details to determine how long the discount should be applied for.
729
- attr_accessor :discount_end
730
665
  # ID of the promotion code to create a new discount for.
731
666
  attr_accessor :promotion_code
732
667
 
733
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
668
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
734
669
  @coupon = coupon
735
670
  @discount = discount
736
- @discount_end = discount_end
737
671
  @promotion_code = promotion_code
738
672
  end
739
673
  end
@@ -787,44 +721,16 @@ module Stripe
787
721
  end
788
722
 
789
723
  class Discount < Stripe::RequestParams
790
- class DiscountEnd < Stripe::RequestParams
791
- class Duration < Stripe::RequestParams
792
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
793
- attr_accessor :interval
794
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
795
- attr_accessor :interval_count
796
-
797
- def initialize(interval: nil, interval_count: nil)
798
- @interval = interval
799
- @interval_count = interval_count
800
- end
801
- end
802
- # Time span for the redeemed discount.
803
- attr_accessor :duration
804
- # A precise Unix timestamp for the discount to end. Must be in the future.
805
- attr_accessor :timestamp
806
- # The type of calculation made to determine when the discount ends.
807
- attr_accessor :type
808
-
809
- def initialize(duration: nil, timestamp: nil, type: nil)
810
- @duration = duration
811
- @timestamp = timestamp
812
- @type = type
813
- end
814
- end
815
724
  # ID of the coupon to create a new discount for.
816
725
  attr_accessor :coupon
817
726
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
818
727
  attr_accessor :discount
819
- # Details to determine how long the discount should be applied for.
820
- attr_accessor :discount_end
821
728
  # ID of the promotion code to create a new discount for.
822
729
  attr_accessor :promotion_code
823
730
 
824
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
731
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
825
732
  @coupon = coupon
826
733
  @discount = discount
827
- @discount_end = discount_end
828
734
  @promotion_code = promotion_code
829
735
  end
830
736
  end
@@ -870,18 +776,6 @@ module Stripe
870
776
  @unit_amount_decimal = unit_amount_decimal
871
777
  end
872
778
  end
873
-
874
- class Trial < Stripe::RequestParams
875
- # 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.
876
- attr_accessor :converts_to
877
- # Determines the type of trial for this item.
878
- attr_accessor :type
879
-
880
- def initialize(converts_to: nil, type: nil)
881
- @converts_to = converts_to
882
- @type = type
883
- end
884
- end
885
779
  # 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.
886
780
  attr_accessor :billing_thresholds
887
781
  # The coupons to redeem into discounts for the subscription item.
@@ -898,8 +792,6 @@ module Stripe
898
792
  attr_accessor :quantity
899
793
  # 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.
900
794
  attr_accessor :tax_rates
901
- # Options that configure the trial on the subscription item.
902
- attr_accessor :trial
903
795
 
904
796
  def initialize(
905
797
  billing_thresholds: nil,
@@ -909,8 +801,7 @@ module Stripe
909
801
  price: nil,
910
802
  price_data: nil,
911
803
  quantity: nil,
912
- tax_rates: nil,
913
- trial: nil
804
+ tax_rates: nil
914
805
  )
915
806
  @billing_thresholds = billing_thresholds
916
807
  @discounts = discounts
@@ -920,16 +811,6 @@ module Stripe
920
811
  @price_data = price_data
921
812
  @quantity = quantity
922
813
  @tax_rates = tax_rates
923
- @trial = trial
924
- end
925
- end
926
-
927
- class PauseCollection < Stripe::RequestParams
928
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
929
- attr_accessor :behavior
930
-
931
- def initialize(behavior: nil)
932
- @behavior = behavior
933
814
  end
934
815
  end
935
816
 
@@ -944,23 +825,6 @@ module Stripe
944
825
  @destination = destination
945
826
  end
946
827
  end
947
-
948
- class TrialSettings < Stripe::RequestParams
949
- class EndBehavior < Stripe::RequestParams
950
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
951
- attr_accessor :prorate_up_front
952
-
953
- def initialize(prorate_up_front: nil)
954
- @prorate_up_front = prorate_up_front
955
- end
956
- end
957
- # Defines how the subscription should behave when a trial ends.
958
- attr_accessor :end_behavior
959
-
960
- def initialize(end_behavior: nil)
961
- @end_behavior = end_behavior
962
- end
963
- end
964
828
  # 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.
965
829
  attr_accessor :add_invoice_items
966
830
  # 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).
@@ -997,20 +861,14 @@ module Stripe
997
861
  attr_accessor :metadata
998
862
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
999
863
  attr_accessor :on_behalf_of
1000
- # 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).
1001
- attr_accessor :pause_collection
1002
864
  # 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.
1003
865
  attr_accessor :proration_behavior
1004
866
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1005
867
  attr_accessor :transfer_data
1006
868
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1007
869
  attr_accessor :trial
1008
- # Specify trial behavior when crossing phase boundaries
1009
- attr_accessor :trial_continuation
1010
870
  # 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`
1011
871
  attr_accessor :trial_end
1012
- # Settings related to subscription trials.
1013
- attr_accessor :trial_settings
1014
872
 
1015
873
  def initialize(
1016
874
  add_invoice_items: nil,
@@ -1031,13 +889,10 @@ module Stripe
1031
889
  iterations: nil,
1032
890
  metadata: nil,
1033
891
  on_behalf_of: nil,
1034
- pause_collection: nil,
1035
892
  proration_behavior: nil,
1036
893
  transfer_data: nil,
1037
894
  trial: nil,
1038
- trial_continuation: nil,
1039
- trial_end: nil,
1040
- trial_settings: nil
895
+ trial_end: nil
1041
896
  )
1042
897
  @add_invoice_items = add_invoice_items
1043
898
  @application_fee_percent = application_fee_percent
@@ -1057,35 +912,16 @@ module Stripe
1057
912
  @iterations = iterations
1058
913
  @metadata = metadata
1059
914
  @on_behalf_of = on_behalf_of
1060
- @pause_collection = pause_collection
1061
915
  @proration_behavior = proration_behavior
1062
916
  @transfer_data = transfer_data
1063
917
  @trial = trial
1064
- @trial_continuation = trial_continuation
1065
918
  @trial_end = trial_end
1066
- @trial_settings = trial_settings
1067
919
  end
1068
920
  end
1069
-
1070
- class Prebilling < Stripe::RequestParams
1071
- # This is used to determine the number of billing cycles to prebill.
1072
- attr_accessor :iterations
1073
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1074
- attr_accessor :update_behavior
1075
-
1076
- def initialize(iterations: nil, update_behavior: nil)
1077
- @iterations = iterations
1078
- @update_behavior = update_behavior
1079
- end
1080
- end
1081
- # 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.
1082
- attr_accessor :billing_behavior
1083
921
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1084
922
  attr_accessor :billing_mode
1085
923
  # The identifier of the customer to create the subscription schedule for.
1086
924
  attr_accessor :customer
1087
- # The identifier of the account to create the subscription schedule for.
1088
- attr_accessor :customer_account
1089
925
  # Object representing the subscription schedule's default settings.
1090
926
  attr_accessor :default_settings
1091
927
  # 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.
@@ -1098,36 +934,28 @@ module Stripe
1098
934
  attr_accessor :metadata
1099
935
  # 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.
1100
936
  attr_accessor :phases
1101
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
1102
- attr_accessor :prebilling
1103
937
  # When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
1104
938
  attr_accessor :start_date
1105
939
 
1106
940
  def initialize(
1107
- billing_behavior: nil,
1108
941
  billing_mode: nil,
1109
942
  customer: nil,
1110
- customer_account: nil,
1111
943
  default_settings: nil,
1112
944
  end_behavior: nil,
1113
945
  expand: nil,
1114
946
  from_subscription: nil,
1115
947
  metadata: nil,
1116
948
  phases: nil,
1117
- prebilling: nil,
1118
949
  start_date: nil
1119
950
  )
1120
- @billing_behavior = billing_behavior
1121
951
  @billing_mode = billing_mode
1122
952
  @customer = customer
1123
- @customer_account = customer_account
1124
953
  @default_settings = default_settings
1125
954
  @end_behavior = end_behavior
1126
955
  @expand = expand
1127
956
  @from_subscription = from_subscription
1128
957
  @metadata = metadata
1129
958
  @phases = phases
1130
- @prebilling = prebilling
1131
959
  @start_date = start_date
1132
960
  end
1133
961
  end
@@ -1255,48 +1083,55 @@ module Stripe
1255
1083
  class Phase < Stripe::RequestParams
1256
1084
  class AddInvoiceItem < Stripe::RequestParams
1257
1085
  class Discount < Stripe::RequestParams
1258
- class DiscountEnd < Stripe::RequestParams
1259
- class Duration < Stripe::RequestParams
1260
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1261
- attr_accessor :interval
1262
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1263
- attr_accessor :interval_count
1264
-
1265
- def initialize(interval: nil, interval_count: nil)
1266
- @interval = interval
1267
- @interval_count = interval_count
1268
- end
1269
- end
1270
- # Time span for the redeemed discount.
1271
- attr_accessor :duration
1272
- # A precise Unix timestamp for the discount to end. Must be in the future.
1273
- attr_accessor :timestamp
1274
- # The type of calculation made to determine when the discount ends.
1275
- attr_accessor :type
1276
-
1277
- def initialize(duration: nil, timestamp: nil, type: nil)
1278
- @duration = duration
1279
- @timestamp = timestamp
1280
- @type = type
1281
- end
1282
- end
1283
1086
  # ID of the coupon to create a new discount for.
1284
1087
  attr_accessor :coupon
1285
1088
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1286
1089
  attr_accessor :discount
1287
- # Details to determine how long the discount should be applied for.
1288
- attr_accessor :discount_end
1289
1090
  # ID of the promotion code to create a new discount for.
1290
1091
  attr_accessor :promotion_code
1291
1092
 
1292
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1093
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1293
1094
  @coupon = coupon
1294
1095
  @discount = discount
1295
- @discount_end = discount_end
1296
1096
  @promotion_code = promotion_code
1297
1097
  end
1298
1098
  end
1299
1099
 
1100
+ class Period < Stripe::RequestParams
1101
+ class End < Stripe::RequestParams
1102
+ # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
1103
+ attr_accessor :timestamp
1104
+ # Select how to calculate the end of the invoice item period.
1105
+ attr_accessor :type
1106
+
1107
+ def initialize(timestamp: nil, type: nil)
1108
+ @timestamp = timestamp
1109
+ @type = type
1110
+ end
1111
+ end
1112
+
1113
+ class Start < Stripe::RequestParams
1114
+ # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
1115
+ attr_accessor :timestamp
1116
+ # Select how to calculate the start of the invoice item period.
1117
+ attr_accessor :type
1118
+
1119
+ def initialize(timestamp: nil, type: nil)
1120
+ @timestamp = timestamp
1121
+ @type = type
1122
+ end
1123
+ end
1124
+ # End of the invoice item period.
1125
+ attr_accessor :end
1126
+ # Start of the invoice item period.
1127
+ attr_accessor :start
1128
+
1129
+ def initialize(end_: nil, start: nil)
1130
+ @end = end_
1131
+ @start = start
1132
+ end
1133
+ end
1134
+
1300
1135
  class PriceData < Stripe::RequestParams
1301
1136
  # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1302
1137
  attr_accessor :currency
@@ -1325,6 +1160,10 @@ module Stripe
1325
1160
  end
1326
1161
  # The coupons to redeem into discounts for the item.
1327
1162
  attr_accessor :discounts
1163
+ # 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`.
1164
+ attr_accessor :metadata
1165
+ # The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
1166
+ attr_accessor :period
1328
1167
  # The ID of the price object. One of `price` or `price_data` is required.
1329
1168
  attr_accessor :price
1330
1169
  # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
@@ -1334,8 +1173,18 @@ module Stripe
1334
1173
  # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
1335
1174
  attr_accessor :tax_rates
1336
1175
 
1337
- def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
1176
+ def initialize(
1177
+ discounts: nil,
1178
+ metadata: nil,
1179
+ period: nil,
1180
+ price: nil,
1181
+ price_data: nil,
1182
+ quantity: nil,
1183
+ tax_rates: nil
1184
+ )
1338
1185
  @discounts = discounts
1186
+ @metadata = metadata
1187
+ @period = period
1339
1188
  @price = price
1340
1189
  @price_data = price_data
1341
1190
  @quantity = quantity
@@ -1379,44 +1228,16 @@ module Stripe
1379
1228
  end
1380
1229
 
1381
1230
  class Discount < Stripe::RequestParams
1382
- class DiscountEnd < Stripe::RequestParams
1383
- class Duration < Stripe::RequestParams
1384
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1385
- attr_accessor :interval
1386
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1387
- attr_accessor :interval_count
1388
-
1389
- def initialize(interval: nil, interval_count: nil)
1390
- @interval = interval
1391
- @interval_count = interval_count
1392
- end
1393
- end
1394
- # Time span for the redeemed discount.
1395
- attr_accessor :duration
1396
- # A precise Unix timestamp for the discount to end. Must be in the future.
1397
- attr_accessor :timestamp
1398
- # The type of calculation made to determine when the discount ends.
1399
- attr_accessor :type
1400
-
1401
- def initialize(duration: nil, timestamp: nil, type: nil)
1402
- @duration = duration
1403
- @timestamp = timestamp
1404
- @type = type
1405
- end
1406
- end
1407
1231
  # ID of the coupon to create a new discount for.
1408
1232
  attr_accessor :coupon
1409
1233
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1410
1234
  attr_accessor :discount
1411
- # Details to determine how long the discount should be applied for.
1412
- attr_accessor :discount_end
1413
1235
  # ID of the promotion code to create a new discount for.
1414
1236
  attr_accessor :promotion_code
1415
1237
 
1416
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1238
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1417
1239
  @coupon = coupon
1418
1240
  @discount = discount
1419
- @discount_end = discount_end
1420
1241
  @promotion_code = promotion_code
1421
1242
  end
1422
1243
  end
@@ -1470,44 +1291,16 @@ module Stripe
1470
1291
  end
1471
1292
 
1472
1293
  class Discount < Stripe::RequestParams
1473
- class DiscountEnd < Stripe::RequestParams
1474
- class Duration < Stripe::RequestParams
1475
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1476
- attr_accessor :interval
1477
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1478
- attr_accessor :interval_count
1479
-
1480
- def initialize(interval: nil, interval_count: nil)
1481
- @interval = interval
1482
- @interval_count = interval_count
1483
- end
1484
- end
1485
- # Time span for the redeemed discount.
1486
- attr_accessor :duration
1487
- # A precise Unix timestamp for the discount to end. Must be in the future.
1488
- attr_accessor :timestamp
1489
- # The type of calculation made to determine when the discount ends.
1490
- attr_accessor :type
1491
-
1492
- def initialize(duration: nil, timestamp: nil, type: nil)
1493
- @duration = duration
1494
- @timestamp = timestamp
1495
- @type = type
1496
- end
1497
- end
1498
1294
  # ID of the coupon to create a new discount for.
1499
1295
  attr_accessor :coupon
1500
1296
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1501
1297
  attr_accessor :discount
1502
- # Details to determine how long the discount should be applied for.
1503
- attr_accessor :discount_end
1504
1298
  # ID of the promotion code to create a new discount for.
1505
1299
  attr_accessor :promotion_code
1506
1300
 
1507
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1301
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1508
1302
  @coupon = coupon
1509
1303
  @discount = discount
1510
- @discount_end = discount_end
1511
1304
  @promotion_code = promotion_code
1512
1305
  end
1513
1306
  end
@@ -1553,18 +1346,6 @@ module Stripe
1553
1346
  @unit_amount_decimal = unit_amount_decimal
1554
1347
  end
1555
1348
  end
1556
-
1557
- class Trial < Stripe::RequestParams
1558
- # 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.
1559
- attr_accessor :converts_to
1560
- # Determines the type of trial for this item.
1561
- attr_accessor :type
1562
-
1563
- def initialize(converts_to: nil, type: nil)
1564
- @converts_to = converts_to
1565
- @type = type
1566
- end
1567
- end
1568
1349
  # 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.
1569
1350
  attr_accessor :billing_thresholds
1570
1351
  # The coupons to redeem into discounts for the subscription item.
@@ -1581,8 +1362,6 @@ module Stripe
1581
1362
  attr_accessor :quantity
1582
1363
  # 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.
1583
1364
  attr_accessor :tax_rates
1584
- # Options that configure the trial on the subscription item.
1585
- attr_accessor :trial
1586
1365
 
1587
1366
  def initialize(
1588
1367
  billing_thresholds: nil,
@@ -1592,8 +1371,7 @@ module Stripe
1592
1371
  price: nil,
1593
1372
  price_data: nil,
1594
1373
  quantity: nil,
1595
- tax_rates: nil,
1596
- trial: nil
1374
+ tax_rates: nil
1597
1375
  )
1598
1376
  @billing_thresholds = billing_thresholds
1599
1377
  @discounts = discounts
@@ -1603,16 +1381,6 @@ module Stripe
1603
1381
  @price_data = price_data
1604
1382
  @quantity = quantity
1605
1383
  @tax_rates = tax_rates
1606
- @trial = trial
1607
- end
1608
- end
1609
-
1610
- class PauseCollection < Stripe::RequestParams
1611
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1612
- attr_accessor :behavior
1613
-
1614
- def initialize(behavior: nil)
1615
- @behavior = behavior
1616
1384
  end
1617
1385
  end
1618
1386
 
@@ -1627,23 +1395,6 @@ module Stripe
1627
1395
  @destination = destination
1628
1396
  end
1629
1397
  end
1630
-
1631
- class TrialSettings < Stripe::RequestParams
1632
- class EndBehavior < Stripe::RequestParams
1633
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1634
- attr_accessor :prorate_up_front
1635
-
1636
- def initialize(prorate_up_front: nil)
1637
- @prorate_up_front = prorate_up_front
1638
- end
1639
- end
1640
- # Defines how the subscription should behave when a trial ends.
1641
- attr_accessor :end_behavior
1642
-
1643
- def initialize(end_behavior: nil)
1644
- @end_behavior = end_behavior
1645
- end
1646
- end
1647
1398
  # 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.
1648
1399
  attr_accessor :add_invoice_items
1649
1400
  # 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).
@@ -1680,8 +1431,6 @@ module Stripe
1680
1431
  attr_accessor :metadata
1681
1432
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
1682
1433
  attr_accessor :on_behalf_of
1683
- # 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).
1684
- attr_accessor :pause_collection
1685
1434
  # 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.
1686
1435
  attr_accessor :proration_behavior
1687
1436
  # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
@@ -1690,12 +1439,8 @@ module Stripe
1690
1439
  attr_accessor :transfer_data
1691
1440
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1692
1441
  attr_accessor :trial
1693
- # Specify trial behavior when crossing phase boundaries
1694
- attr_accessor :trial_continuation
1695
1442
  # 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`
1696
1443
  attr_accessor :trial_end
1697
- # Settings related to subscription trials.
1698
- attr_accessor :trial_settings
1699
1444
 
1700
1445
  def initialize(
1701
1446
  add_invoice_items: nil,
@@ -1716,14 +1461,11 @@ module Stripe
1716
1461
  iterations: nil,
1717
1462
  metadata: nil,
1718
1463
  on_behalf_of: nil,
1719
- pause_collection: nil,
1720
1464
  proration_behavior: nil,
1721
1465
  start_date: nil,
1722
1466
  transfer_data: nil,
1723
1467
  trial: nil,
1724
- trial_continuation: nil,
1725
- trial_end: nil,
1726
- trial_settings: nil
1468
+ trial_end: nil
1727
1469
  )
1728
1470
  @add_invoice_items = add_invoice_items
1729
1471
  @application_fee_percent = application_fee_percent
@@ -1743,30 +1485,13 @@ module Stripe
1743
1485
  @iterations = iterations
1744
1486
  @metadata = metadata
1745
1487
  @on_behalf_of = on_behalf_of
1746
- @pause_collection = pause_collection
1747
1488
  @proration_behavior = proration_behavior
1748
1489
  @start_date = start_date
1749
1490
  @transfer_data = transfer_data
1750
1491
  @trial = trial
1751
- @trial_continuation = trial_continuation
1752
1492
  @trial_end = trial_end
1753
- @trial_settings = trial_settings
1754
- end
1755
- end
1756
-
1757
- class Prebilling < Stripe::RequestParams
1758
- # This is used to determine the number of billing cycles to prebill.
1759
- attr_accessor :iterations
1760
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1761
- attr_accessor :update_behavior
1762
-
1763
- def initialize(iterations: nil, update_behavior: nil)
1764
- @iterations = iterations
1765
- @update_behavior = update_behavior
1766
1493
  end
1767
1494
  end
1768
- # 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.
1769
- attr_accessor :billing_behavior
1770
1495
  # Object representing the subscription schedule's default settings.
1771
1496
  attr_accessor :default_settings
1772
1497
  # 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.
@@ -1777,595 +1502,23 @@ module Stripe
1777
1502
  attr_accessor :metadata
1778
1503
  # 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. Note that past phases can be omitted.
1779
1504
  attr_accessor :phases
1780
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
1781
- attr_accessor :prebilling
1782
1505
  # If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
1783
1506
  attr_accessor :proration_behavior
1784
1507
 
1785
1508
  def initialize(
1786
- billing_behavior: nil,
1787
1509
  default_settings: nil,
1788
1510
  end_behavior: nil,
1789
1511
  expand: nil,
1790
1512
  metadata: nil,
1791
1513
  phases: nil,
1792
- prebilling: nil,
1793
1514
  proration_behavior: nil
1794
1515
  )
1795
- @billing_behavior = billing_behavior
1796
1516
  @default_settings = default_settings
1797
1517
  @end_behavior = end_behavior
1798
1518
  @expand = expand
1799
1519
  @metadata = metadata
1800
1520
  @phases = phases
1801
- @prebilling = prebilling
1802
- @proration_behavior = proration_behavior
1803
- end
1804
- end
1805
-
1806
- class AmendParams < Stripe::RequestParams
1807
- class Amendment < Stripe::RequestParams
1808
- class AmendmentEnd < Stripe::RequestParams
1809
- class DiscountEnd < Stripe::RequestParams
1810
- # The ID of a specific discount.
1811
- attr_accessor :discount
1812
-
1813
- def initialize(discount: nil)
1814
- @discount = discount
1815
- end
1816
- end
1817
-
1818
- class Duration < Stripe::RequestParams
1819
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1820
- attr_accessor :interval
1821
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1822
- attr_accessor :interval_count
1823
-
1824
- def initialize(interval: nil, interval_count: nil)
1825
- @interval = interval
1826
- @interval_count = interval_count
1827
- end
1828
- end
1829
- # Use the `end` time of a given discount.
1830
- attr_accessor :discount_end
1831
- # Time span for the amendment starting from the `amendment_start`.
1832
- attr_accessor :duration
1833
- # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
1834
- attr_accessor :timestamp
1835
- # Select one of three ways to pass the `amendment_end`.
1836
- attr_accessor :type
1837
-
1838
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
1839
- @discount_end = discount_end
1840
- @duration = duration
1841
- @timestamp = timestamp
1842
- @type = type
1843
- end
1844
- end
1845
-
1846
- class AmendmentStart < Stripe::RequestParams
1847
- class AmendmentEnd < Stripe::RequestParams
1848
- # 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.
1849
- attr_accessor :index
1850
-
1851
- def initialize(index: nil)
1852
- @index = index
1853
- end
1854
- end
1855
-
1856
- class DiscountEnd < Stripe::RequestParams
1857
- # The ID of a specific discount.
1858
- attr_accessor :discount
1859
-
1860
- def initialize(discount: nil)
1861
- @discount = discount
1862
- end
1863
- end
1864
- # Details of another amendment in the same array, immediately after which this amendment should begin.
1865
- attr_accessor :amendment_end
1866
- # Use the `end` time of a given discount.
1867
- attr_accessor :discount_end
1868
- # A precise Unix timestamp for the amendment to start.
1869
- attr_accessor :timestamp
1870
- # Select one of three ways to pass the `amendment_start`.
1871
- attr_accessor :type
1872
-
1873
- def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
1874
- @amendment_end = amendment_end
1875
- @discount_end = discount_end
1876
- @timestamp = timestamp
1877
- @type = type
1878
- end
1879
- end
1880
-
1881
- class DiscountAction < Stripe::RequestParams
1882
- class Add < Stripe::RequestParams
1883
- class DiscountEnd < Stripe::RequestParams
1884
- # The type of calculation made to determine when the discount ends.
1885
- attr_accessor :type
1886
-
1887
- def initialize(type: nil)
1888
- @type = type
1889
- end
1890
- end
1891
- # The coupon code to redeem.
1892
- attr_accessor :coupon
1893
- # An ID of an existing discount for a coupon that was already redeemed.
1894
- attr_accessor :discount
1895
- # Details to determine how long the discount should be applied for.
1896
- attr_accessor :discount_end
1897
- # 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.
1898
- attr_accessor :index
1899
- # The promotion code to redeem.
1900
- attr_accessor :promotion_code
1901
-
1902
- def initialize(
1903
- coupon: nil,
1904
- discount: nil,
1905
- discount_end: nil,
1906
- index: nil,
1907
- promotion_code: nil
1908
- )
1909
- @coupon = coupon
1910
- @discount = discount
1911
- @discount_end = discount_end
1912
- @index = index
1913
- @promotion_code = promotion_code
1914
- end
1915
- end
1916
-
1917
- class Remove < Stripe::RequestParams
1918
- # The coupon code to remove from the `discounts` array.
1919
- attr_accessor :coupon
1920
- # The ID of a discount to remove from the `discounts` array.
1921
- attr_accessor :discount
1922
- # The ID of a promotion code to remove from the `discounts` array.
1923
- attr_accessor :promotion_code
1924
-
1925
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1926
- @coupon = coupon
1927
- @discount = discount
1928
- @promotion_code = promotion_code
1929
- end
1930
- end
1931
-
1932
- class Set < Stripe::RequestParams
1933
- # The coupon code to replace the `discounts` array with.
1934
- attr_accessor :coupon
1935
- # An ID of an existing discount to replace the `discounts` array with.
1936
- attr_accessor :discount
1937
- # An ID of an existing promotion code to replace the `discounts` array with.
1938
- attr_accessor :promotion_code
1939
-
1940
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1941
- @coupon = coupon
1942
- @discount = discount
1943
- @promotion_code = promotion_code
1944
- end
1945
- end
1946
- # Details of the discount to add.
1947
- attr_accessor :add
1948
- # Details of the discount to remove.
1949
- attr_accessor :remove
1950
- # Details of the discount to replace the existing discounts with.
1951
- attr_accessor :set
1952
- # Determines the type of discount action.
1953
- attr_accessor :type
1954
-
1955
- def initialize(add: nil, remove: nil, set: nil, type: nil)
1956
- @add = add
1957
- @remove = remove
1958
- @set = set
1959
- @type = type
1960
- end
1961
- end
1962
-
1963
- class ItemAction < Stripe::RequestParams
1964
- class Add < Stripe::RequestParams
1965
- class Discount < Stripe::RequestParams
1966
- class DiscountEnd < Stripe::RequestParams
1967
- class Duration < Stripe::RequestParams
1968
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1969
- attr_accessor :interval
1970
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1971
- attr_accessor :interval_count
1972
-
1973
- def initialize(interval: nil, interval_count: nil)
1974
- @interval = interval
1975
- @interval_count = interval_count
1976
- end
1977
- end
1978
- # Time span for the redeemed discount.
1979
- attr_accessor :duration
1980
- # A precise Unix timestamp for the discount to end. Must be in the future.
1981
- attr_accessor :timestamp
1982
- # The type of calculation made to determine when the discount ends.
1983
- attr_accessor :type
1984
-
1985
- def initialize(duration: nil, timestamp: nil, type: nil)
1986
- @duration = duration
1987
- @timestamp = timestamp
1988
- @type = type
1989
- end
1990
- end
1991
- # ID of the coupon to create a new discount for.
1992
- attr_accessor :coupon
1993
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1994
- attr_accessor :discount
1995
- # Details to determine how long the discount should be applied for.
1996
- attr_accessor :discount_end
1997
- # ID of the promotion code to create a new discount for.
1998
- attr_accessor :promotion_code
1999
-
2000
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2001
- @coupon = coupon
2002
- @discount = discount
2003
- @discount_end = discount_end
2004
- @promotion_code = promotion_code
2005
- end
2006
- end
2007
-
2008
- class Trial < Stripe::RequestParams
2009
- # 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.
2010
- attr_accessor :converts_to
2011
- # Determines the type of trial for this item.
2012
- attr_accessor :type
2013
-
2014
- def initialize(converts_to: nil, type: nil)
2015
- @converts_to = converts_to
2016
- @type = type
2017
- end
2018
- end
2019
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
2020
- attr_accessor :discounts
2021
- # 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`.
2022
- attr_accessor :metadata
2023
- # The ID of the price object.
2024
- attr_accessor :price
2025
- # Quantity for this item.
2026
- attr_accessor :quantity
2027
- # 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`.
2028
- attr_accessor :tax_rates
2029
- # Options that configure the trial on the subscription item.
2030
- attr_accessor :trial
2031
-
2032
- def initialize(
2033
- discounts: nil,
2034
- metadata: nil,
2035
- price: nil,
2036
- quantity: nil,
2037
- tax_rates: nil,
2038
- trial: nil
2039
- )
2040
- @discounts = discounts
2041
- @metadata = metadata
2042
- @price = price
2043
- @quantity = quantity
2044
- @tax_rates = tax_rates
2045
- @trial = trial
2046
- end
2047
- end
2048
-
2049
- class Remove < Stripe::RequestParams
2050
- # ID of a price to remove.
2051
- attr_accessor :price
2052
-
2053
- def initialize(price: nil)
2054
- @price = price
2055
- end
2056
- end
2057
-
2058
- class Set < Stripe::RequestParams
2059
- class Discount < Stripe::RequestParams
2060
- class DiscountEnd < Stripe::RequestParams
2061
- class Duration < Stripe::RequestParams
2062
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2063
- attr_accessor :interval
2064
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2065
- attr_accessor :interval_count
2066
-
2067
- def initialize(interval: nil, interval_count: nil)
2068
- @interval = interval
2069
- @interval_count = interval_count
2070
- end
2071
- end
2072
- # Time span for the redeemed discount.
2073
- attr_accessor :duration
2074
- # A precise Unix timestamp for the discount to end. Must be in the future.
2075
- attr_accessor :timestamp
2076
- # The type of calculation made to determine when the discount ends.
2077
- attr_accessor :type
2078
-
2079
- def initialize(duration: nil, timestamp: nil, type: nil)
2080
- @duration = duration
2081
- @timestamp = timestamp
2082
- @type = type
2083
- end
2084
- end
2085
- # ID of the coupon to create a new discount for.
2086
- attr_accessor :coupon
2087
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2088
- attr_accessor :discount
2089
- # Details to determine how long the discount should be applied for.
2090
- attr_accessor :discount_end
2091
- # ID of the promotion code to create a new discount for.
2092
- attr_accessor :promotion_code
2093
-
2094
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2095
- @coupon = coupon
2096
- @discount = discount
2097
- @discount_end = discount_end
2098
- @promotion_code = promotion_code
2099
- end
2100
- end
2101
-
2102
- class Trial < Stripe::RequestParams
2103
- # 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.
2104
- attr_accessor :converts_to
2105
- # Determines the type of trial for this item.
2106
- attr_accessor :type
2107
-
2108
- def initialize(converts_to: nil, type: nil)
2109
- @converts_to = converts_to
2110
- @type = type
2111
- end
2112
- end
2113
- # 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`.
2114
- attr_accessor :discounts
2115
- # 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`.
2116
- attr_accessor :metadata
2117
- # The ID of the price object.
2118
- attr_accessor :price
2119
- # 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`.
2120
- attr_accessor :quantity
2121
- # 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`.
2122
- attr_accessor :tax_rates
2123
- # 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`.
2124
- attr_accessor :trial
2125
-
2126
- def initialize(
2127
- discounts: nil,
2128
- metadata: nil,
2129
- price: nil,
2130
- quantity: nil,
2131
- tax_rates: nil,
2132
- trial: nil
2133
- )
2134
- @discounts = discounts
2135
- @metadata = metadata
2136
- @price = price
2137
- @quantity = quantity
2138
- @tax_rates = tax_rates
2139
- @trial = trial
2140
- end
2141
- end
2142
- # 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.
2143
- attr_accessor :add
2144
- # Details of the subscription item to remove.
2145
- attr_accessor :remove
2146
- # 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.
2147
- attr_accessor :set
2148
- # Determines the type of item action.
2149
- attr_accessor :type
2150
-
2151
- def initialize(add: nil, remove: nil, set: nil, type: nil)
2152
- @add = add
2153
- @remove = remove
2154
- @set = set
2155
- @type = type
2156
- end
2157
- end
2158
-
2159
- class MetadataAction < Stripe::RequestParams
2160
- # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
2161
- attr_accessor :add
2162
- # Keys to remove from schedule phase metadata.
2163
- attr_accessor :remove
2164
- # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
2165
- attr_accessor :set
2166
- # Select one of three ways to update phase-level `metadata` on subscription schedules.
2167
- attr_accessor :type
2168
-
2169
- def initialize(add: nil, remove: nil, set: nil, type: nil)
2170
- @add = add
2171
- @remove = remove
2172
- @set = set
2173
- @type = type
2174
- end
2175
- end
2176
-
2177
- class SetPauseCollection < Stripe::RequestParams
2178
- class Set < Stripe::RequestParams
2179
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2180
- attr_accessor :behavior
2181
-
2182
- def initialize(behavior: nil)
2183
- @behavior = behavior
2184
- end
2185
- end
2186
- # Details of the pause_collection behavior to apply to the amendment.
2187
- attr_accessor :set
2188
- # Determines the type of the pause_collection amendment.
2189
- attr_accessor :type
2190
-
2191
- def initialize(set: nil, type: nil)
2192
- @set = set
2193
- @type = type
2194
- end
2195
- end
2196
-
2197
- class TrialSettings < Stripe::RequestParams
2198
- class EndBehavior < Stripe::RequestParams
2199
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2200
- attr_accessor :prorate_up_front
2201
-
2202
- def initialize(prorate_up_front: nil)
2203
- @prorate_up_front = prorate_up_front
2204
- end
2205
- end
2206
- # Defines how the subscription should behave when a trial ends.
2207
- attr_accessor :end_behavior
2208
-
2209
- def initialize(end_behavior: nil)
2210
- @end_behavior = end_behavior
2211
- end
2212
- end
2213
- # 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.
2214
- attr_accessor :amendment_end
2215
- # Details to identify the earliest timestamp where the proposed change should take effect.
2216
- attr_accessor :amendment_start
2217
- # 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.
2218
- attr_accessor :billing_cycle_anchor
2219
- # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2220
- attr_accessor :discount_actions
2221
- # Changes to the subscription items during the amendment time span.
2222
- attr_accessor :item_actions
2223
- # Instructions for how to modify phase metadata
2224
- attr_accessor :metadata_actions
2225
- # 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`.
2226
- attr_accessor :proration_behavior
2227
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2228
- attr_accessor :set_pause_collection
2229
- # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2230
- attr_accessor :set_schedule_end
2231
- # Settings related to subscription trials.
2232
- attr_accessor :trial_settings
2233
-
2234
- def initialize(
2235
- amendment_end: nil,
2236
- amendment_start: nil,
2237
- billing_cycle_anchor: nil,
2238
- discount_actions: nil,
2239
- item_actions: nil,
2240
- metadata_actions: nil,
2241
- proration_behavior: nil,
2242
- set_pause_collection: nil,
2243
- set_schedule_end: nil,
2244
- trial_settings: nil
2245
- )
2246
- @amendment_end = amendment_end
2247
- @amendment_start = amendment_start
2248
- @billing_cycle_anchor = billing_cycle_anchor
2249
- @discount_actions = discount_actions
2250
- @item_actions = item_actions
2251
- @metadata_actions = metadata_actions
2252
- @proration_behavior = proration_behavior
2253
- @set_pause_collection = set_pause_collection
2254
- @set_schedule_end = set_schedule_end
2255
- @trial_settings = trial_settings
2256
- end
2257
- end
2258
-
2259
- class Prebilling < Stripe::RequestParams
2260
- class BillFrom < Stripe::RequestParams
2261
- class AmendmentStart < Stripe::RequestParams
2262
- # The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments.
2263
- attr_accessor :index
2264
-
2265
- def initialize(index: nil)
2266
- @index = index
2267
- end
2268
- end
2269
- # Start the prebilled period when a specified amendment begins.
2270
- attr_accessor :amendment_start
2271
- # Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2272
- attr_accessor :timestamp
2273
- # Select one of several ways to pass the `bill_from` value.
2274
- attr_accessor :type
2275
-
2276
- def initialize(amendment_start: nil, timestamp: nil, type: nil)
2277
- @amendment_start = amendment_start
2278
- @timestamp = timestamp
2279
- @type = type
2280
- end
2281
- end
2282
-
2283
- class BillUntil < Stripe::RequestParams
2284
- class AmendmentEnd < Stripe::RequestParams
2285
- # 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.
2286
- attr_accessor :index
2287
-
2288
- def initialize(index: nil)
2289
- @index = index
2290
- end
2291
- end
2292
-
2293
- class Duration < Stripe::RequestParams
2294
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2295
- attr_accessor :interval
2296
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2297
- attr_accessor :interval_count
2298
-
2299
- def initialize(interval: nil, interval_count: nil)
2300
- @interval = interval
2301
- @interval_count = interval_count
2302
- end
2303
- end
2304
- # End the prebilled period when a specified amendment ends.
2305
- attr_accessor :amendment_end
2306
- # Time span for prebilling, starting from `bill_from`.
2307
- attr_accessor :duration
2308
- # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2309
- attr_accessor :timestamp
2310
- # Select one of several ways to pass the `bill_until` value.
2311
- attr_accessor :type
2312
-
2313
- def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
2314
- @amendment_end = amendment_end
2315
- @duration = duration
2316
- @timestamp = timestamp
2317
- @type = type
2318
- end
2319
- end
2320
- # The beginning of the prebilled time period. The default value is `now`.
2321
- attr_accessor :bill_from
2322
- # The end of the prebilled time period.
2323
- attr_accessor :bill_until
2324
- # When the prebilling invoice should be created. The default value is `now`.
2325
- attr_accessor :invoice_at
2326
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2327
- attr_accessor :update_behavior
2328
-
2329
- def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
2330
- @bill_from = bill_from
2331
- @bill_until = bill_until
2332
- @invoice_at = invoice_at
2333
- @update_behavior = update_behavior
2334
- end
2335
- end
2336
-
2337
- class ScheduleSettings < Stripe::RequestParams
2338
- # Behavior of the subscription schedule and underlying subscription when it ends.
2339
- attr_accessor :end_behavior
2340
-
2341
- def initialize(end_behavior: nil)
2342
- @end_behavior = end_behavior
2343
- end
2344
- end
2345
- # Changes to apply to the phases of the subscription schedule, in the order provided.
2346
- attr_accessor :amendments
2347
- # Specifies which fields in the response should be expanded.
2348
- attr_accessor :expand
2349
- # Provide any time periods to bill in advance.
2350
- attr_accessor :prebilling
2351
- # In cases where the amendment changes the currently active phase,
2352
- # specifies if and how to prorate at the time of the request.
2353
- attr_accessor :proration_behavior
2354
- # Changes to apply to the subscription schedule.
2355
- attr_accessor :schedule_settings
2356
-
2357
- def initialize(
2358
- amendments: nil,
2359
- expand: nil,
2360
- prebilling: nil,
2361
- proration_behavior: nil,
2362
- schedule_settings: nil
2363
- )
2364
- @amendments = amendments
2365
- @expand = expand
2366
- @prebilling = prebilling
2367
1521
  @proration_behavior = proration_behavior
2368
- @schedule_settings = schedule_settings
2369
1522
  end
2370
1523
  end
2371
1524
 
@@ -2397,8 +1550,6 @@ module Stripe
2397
1550
  end
2398
1551
  # ID of the Connect Application that created the schedule.
2399
1552
  attr_reader :application
2400
- # 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.
2401
- attr_reader :billing_behavior
2402
1553
  # The billing mode of the subscription.
2403
1554
  attr_reader :billing_mode
2404
1555
  # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
@@ -2411,16 +1562,12 @@ module Stripe
2411
1562
  attr_reader :current_phase
2412
1563
  # ID of the customer who owns the subscription schedule.
2413
1564
  attr_reader :customer
2414
- # ID of the account who owns the subscription schedule.
2415
- attr_reader :customer_account
2416
1565
  # Attribute for field default_settings
2417
1566
  attr_reader :default_settings
2418
1567
  # 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.
2419
1568
  attr_reader :end_behavior
2420
1569
  # Unique identifier for the object.
2421
1570
  attr_reader :id
2422
- # Details of the most recent price migration that failed for the subscription schedule.
2423
- attr_reader :last_price_migration_error
2424
1571
  # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
2425
1572
  attr_reader :livemode
2426
1573
  # 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.
@@ -2429,8 +1576,6 @@ module Stripe
2429
1576
  attr_reader :object
2430
1577
  # Configuration for the subscription schedule's phases.
2431
1578
  attr_reader :phases
2432
- # Time period and invoice for a Subscription billed in advance.
2433
- attr_reader :prebilling
2434
1579
  # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
2435
1580
  attr_reader :released_at
2436
1581
  # ID of the subscription once managed by the subscription schedule (if it is released).
@@ -2442,26 +1587,6 @@ module Stripe
2442
1587
  # ID of the test clock this subscription schedule belongs to.
2443
1588
  attr_reader :test_clock
2444
1589
 
2445
- # Amends an existing subscription schedule.
2446
- def amend(params = {}, opts = {})
2447
- request_stripe_object(
2448
- method: :post,
2449
- path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
2450
- params: params,
2451
- opts: opts
2452
- )
2453
- end
2454
-
2455
- # Amends an existing subscription schedule.
2456
- def self.amend(schedule, params = {}, opts = {})
2457
- request_stripe_object(
2458
- method: :post,
2459
- path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
2460
- params: params,
2461
- opts: opts
2462
- )
2463
- end
2464
-
2465
1590
  # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
2466
1591
  def cancel(params = {}, opts = {})
2467
1592
  request_stripe_object(