stripe 14.1.0.pre.beta.1 → 15.0.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 (574) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +689 -1512
  3. data/OPENAPI_VERSION +1 -1
  4. data/README.md +3 -3
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_operations/save.rb +2 -1
  7. data/lib/stripe/api_operations/singleton_save.rb +2 -1
  8. data/lib/stripe/api_requestor.rb +3 -29
  9. data/lib/stripe/api_resource.rb +10 -3
  10. data/lib/stripe/api_version.rb +1 -1
  11. data/lib/stripe/errors.rb +0 -54
  12. data/lib/stripe/event_types.rb +0 -75
  13. data/lib/stripe/object_types.rb +0 -48
  14. data/lib/stripe/request_options.rb +2 -1
  15. data/lib/stripe/resources/account.rb +1 -653
  16. data/lib/stripe/resources/account_session.rb +1 -247
  17. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
  18. data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
  19. data/lib/stripe/resources/billing/credit_grant.rb +0 -10
  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 +0 -1454
  24. data/lib/stripe/resources/checkout/session.rb +4 -260
  25. data/lib/stripe/resources/confirmation_token.rb +0 -234
  26. data/lib/stripe/resources/coupon.rb +1 -1
  27. data/lib/stripe/resources/credit_note.rb +0 -10
  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/event.rb +0 -33
  35. data/lib/stripe/resources/financial_connections/account.rb +1 -20
  36. data/lib/stripe/resources/financial_connections/session.rb +2 -62
  37. data/lib/stripe/resources/identity/verification_session.rb +0 -10
  38. data/lib/stripe/resources/invoice.rb +16 -1176
  39. data/lib/stripe/resources/invoice_item.rb +2 -78
  40. data/lib/stripe/resources/invoice_line_item.rb +1 -55
  41. data/lib/stripe/resources/invoice_payment.rb +53 -2
  42. data/lib/stripe/resources/issuing/cardholder.rb +1 -2
  43. data/lib/stripe/resources/issuing/transaction.rb +0 -6
  44. data/lib/stripe/resources/line_item.rb +0 -37
  45. data/lib/stripe/resources/mandate.rb +0 -24
  46. data/lib/stripe/resources/payment_intent.rb +307 -5109
  47. data/lib/stripe/resources/payment_method.rb +1 -196
  48. data/lib/stripe/resources/payment_method_configuration.rb +0 -295
  49. data/lib/stripe/resources/payout.rb +0 -6
  50. data/lib/stripe/resources/price.rb +0 -30
  51. data/lib/stripe/resources/product.rb +0 -59
  52. data/lib/stripe/resources/promotion_code.rb +0 -10
  53. data/lib/stripe/resources/quote.rb +6 -2042
  54. data/lib/stripe/resources/refund.rb +0 -9
  55. data/lib/stripe/resources/setup_attempt.rb +0 -21
  56. data/lib/stripe/resources/setup_intent.rb +9 -596
  57. data/lib/stripe/resources/source.rb +1 -30
  58. data/lib/stripe/resources/subscription.rb +9 -292
  59. data/lib/stripe/resources/subscription_item.rb +3 -84
  60. data/lib/stripe/resources/subscription_schedule.rb +10 -1007
  61. data/lib/stripe/resources/tax_id.rb +2 -12
  62. data/lib/stripe/resources/terminal/reader.rb +0 -406
  63. data/lib/stripe/resources/treasury/financial_account.rb +3 -22
  64. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
  65. data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
  66. data/lib/stripe/resources/treasury/received_credit.rb +1 -38
  67. data/lib/stripe/resources/treasury/received_debit.rb +1 -40
  68. data/lib/stripe/resources.rb +0 -85
  69. data/lib/stripe/services/account_service.rb +1 -562
  70. data/lib/stripe/services/account_session_service.rb +1 -217
  71. data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
  72. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
  73. data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
  74. data/lib/stripe/services/billing_portal/session_service.rb +0 -4
  75. data/lib/stripe/services/charge_service.rb +0 -1334
  76. data/lib/stripe/services/checkout/session_service.rb +2 -172
  77. data/lib/stripe/services/credit_note_service.rb +0 -4
  78. data/lib/stripe/services/customer_session_service.rb +1 -4
  79. data/lib/stripe/services/financial_connections/account_service.rb +2 -7
  80. data/lib/stripe/services/financial_connections/session_service.rb +2 -34
  81. data/lib/stripe/services/financial_connections_service.rb +1 -2
  82. data/lib/stripe/services/identity/verification_session_service.rb +0 -8
  83. data/lib/stripe/services/invoice_item_service.rb +2 -74
  84. data/lib/stripe/services/invoice_line_item_service.rb +1 -33
  85. data/lib/stripe/services/invoice_payment_service.rb +33 -5
  86. data/lib/stripe/services/invoice_service.rb +17 -1088
  87. data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
  88. data/lib/stripe/services/issuing/transaction_service.rb +0 -4
  89. data/lib/stripe/services/issuing_service.rb +1 -5
  90. data/lib/stripe/services/payment_intent_service.rb +264 -4637
  91. data/lib/stripe/services/payment_method_configuration_service.rb +0 -210
  92. data/lib/stripe/services/payment_method_service.rb +1 -126
  93. data/lib/stripe/services/payout_service.rb +0 -4
  94. data/lib/stripe/services/price_service.rb +0 -19
  95. data/lib/stripe/services/product_service.rb +0 -38
  96. data/lib/stripe/services/promotion_code_service.rb +0 -8
  97. data/lib/stripe/services/quote_service.rb +7 -1726
  98. data/lib/stripe/services/setup_intent_service.rb +9 -556
  99. data/lib/stripe/services/subscription_item_service.rb +3 -75
  100. data/lib/stripe/services/subscription_schedule_service.rb +10 -911
  101. data/lib/stripe/services/subscription_service.rb +9 -253
  102. data/lib/stripe/services/tax_id_service.rb +2 -8
  103. data/lib/stripe/services/tax_service.rb +1 -3
  104. data/lib/stripe/services/terminal/reader_service.rb +0 -180
  105. data/lib/stripe/services/terminal_service.rb +1 -2
  106. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -148
  107. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
  108. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
  109. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
  110. data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
  111. data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
  112. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
  113. data/lib/stripe/services/v1_services.rb +2 -10
  114. data/lib/stripe/services/v2/core/event_service.rb +5 -3
  115. data/lib/stripe/services/v2/core_service.rb +1 -4
  116. data/lib/stripe/services/v2_services.rb +2 -4
  117. data/lib/stripe/services.rb +0 -49
  118. data/lib/stripe/stripe_configuration.rb +1 -3
  119. data/lib/stripe/stripe_object.rb +14 -4
  120. data/lib/stripe/util.rb +12 -7
  121. data/lib/stripe/version.rb +1 -1
  122. data/lib/stripe.rb +0 -55
  123. data/rbi/stripe/resources/account.rbi +4840 -0
  124. data/rbi/stripe/resources/account_link.rbi +74 -0
  125. data/rbi/stripe/resources/account_session.rbi +894 -0
  126. data/rbi/stripe/resources/apple_pay_domain.rbi +90 -0
  127. data/rbi/stripe/resources/application.rbi +20 -0
  128. data/rbi/stripe/resources/application_fee.rbi +118 -0
  129. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  130. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  131. data/rbi/stripe/resources/balance.rbi +180 -0
  132. data/rbi/stripe/resources/balance_transaction.rbi +144 -0
  133. data/rbi/stripe/resources/bank_account.rbi +127 -0
  134. data/rbi/stripe/resources/billing/alert.rbi +201 -0
  135. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  136. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
  137. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
  138. data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
  139. data/rbi/stripe/resources/billing/meter.rbi +226 -0
  140. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  141. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  142. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  143. data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
  144. data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
  145. data/rbi/stripe/resources/capability.rbi +125 -0
  146. data/rbi/stripe/resources/card.rbi +125 -0
  147. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  148. data/rbi/stripe/resources/charge.rbi +2054 -0
  149. data/rbi/stripe/resources/checkout/session.rbi +3951 -0
  150. data/rbi/stripe/resources/climate/order.rbi +245 -0
  151. data/rbi/stripe/resources/climate/product.rbi +75 -0
  152. data/rbi/stripe/resources/climate/supplier.rbi +72 -0
  153. data/rbi/stripe/resources/confirmation_token.rbi +1793 -0
  154. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  155. data/rbi/stripe/resources/country_spec.rbi +85 -0
  156. data/rbi/stripe/resources/coupon.rbi +252 -0
  157. data/rbi/stripe/resources/credit_note.rbi +747 -0
  158. data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
  159. data/rbi/stripe/resources/customer.rbi +1009 -0
  160. data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
  161. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  162. data/rbi/stripe/resources/customer_session.rbi +200 -0
  163. data/rbi/stripe/resources/discount.rbi +53 -0
  164. data/rbi/stripe/resources/dispute.rbi +761 -0
  165. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
  166. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  167. data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
  168. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  169. data/rbi/stripe/resources/event.rbi +146 -0
  170. data/rbi/stripe/resources/exchange_rate.rbi +66 -0
  171. data/rbi/stripe/resources/file.rbi +143 -0
  172. data/rbi/stripe/resources/file_link.rbi +141 -0
  173. data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
  174. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  175. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  176. data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
  177. data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
  178. data/rbi/stripe/resources/forwarding/request.rbi +216 -0
  179. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  180. data/rbi/stripe/resources/identity/verification_report.rbi +351 -0
  181. data/rbi/stripe/resources/identity/verification_session.rbi +517 -0
  182. data/rbi/stripe/resources/invoice.rbi +3733 -0
  183. data/rbi/stripe/resources/invoice_item.rbi +475 -0
  184. data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
  185. data/rbi/stripe/resources/invoice_payment.rbi +114 -0
  186. data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
  187. data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
  188. data/rbi/stripe/resources/issuing/card.rbi +741 -0
  189. data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
  190. data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
  191. data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
  192. data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
  193. data/rbi/stripe/resources/issuing/token.rbi +226 -0
  194. data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
  195. data/rbi/stripe/resources/line_item.rbi +72 -0
  196. data/rbi/stripe/resources/login_link.rbi +18 -0
  197. data/rbi/stripe/resources/mandate.rbi +187 -0
  198. data/rbi/stripe/resources/payment_intent.rbi +9731 -0
  199. data/rbi/stripe/resources/payment_link.rbi +1801 -0
  200. data/rbi/stripe/resources/payment_method.rbi +1822 -0
  201. data/rbi/stripe/resources/payment_method_configuration.rbi +3154 -0
  202. data/rbi/stripe/resources/payment_method_domain.rbi +212 -0
  203. data/rbi/stripe/resources/payout.rbi +300 -0
  204. data/rbi/stripe/resources/person.rbi +371 -0
  205. data/rbi/stripe/resources/plan.rbi +373 -0
  206. data/rbi/stripe/resources/price.rbi +694 -0
  207. data/rbi/stripe/resources/product.rbi +557 -0
  208. data/rbi/stripe/resources/product_feature.rbi +26 -0
  209. data/rbi/stripe/resources/promotion_code.rbi +261 -0
  210. data/rbi/stripe/resources/quote.rbi +1123 -0
  211. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
  212. data/rbi/stripe/resources/radar/value_list.rbi +170 -0
  213. data/rbi/stripe/resources/radar/value_list_item.rbi +131 -0
  214. data/rbi/stripe/resources/refund.rbi +516 -0
  215. data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
  216. data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
  217. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  218. data/rbi/stripe/resources/reversal.rbi +51 -0
  219. data/rbi/stripe/resources/review.rbi +154 -0
  220. data/rbi/stripe/resources/setup_attempt.rbi +477 -0
  221. data/rbi/stripe/resources/setup_intent.rbi +3860 -0
  222. data/rbi/stripe/resources/shipping_rate.rbi +305 -0
  223. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
  224. data/rbi/stripe/resources/source.rbi +1496 -0
  225. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  226. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  227. data/rbi/stripe/resources/subscription.rbi +1964 -0
  228. data/rbi/stripe/resources/subscription_item.rbi +370 -0
  229. data/rbi/stripe/resources/subscription_schedule.rbi +1495 -0
  230. data/rbi/stripe/resources/tax/calculation.rbi +474 -0
  231. data/rbi/stripe/resources/tax/calculation_line_item.rbi +88 -0
  232. data/rbi/stripe/resources/tax/registration.rbi +2485 -0
  233. data/rbi/stripe/resources/tax/settings.rbi +141 -0
  234. data/rbi/stripe/resources/tax/transaction.rbi +351 -0
  235. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  236. data/rbi/stripe/resources/tax_code.rbi +44 -0
  237. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  238. data/rbi/stripe/resources/tax_id.rbi +167 -0
  239. data/rbi/stripe/resources/tax_rate.rbi +239 -0
  240. data/rbi/stripe/resources/terminal/configuration.rbi +1388 -0
  241. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  242. data/rbi/stripe/resources/terminal/location.rbi +224 -0
  243. data/rbi/stripe/resources/terminal/reader.rbi +587 -0
  244. data/rbi/stripe/resources/test_helpers/test_clock.rbi +134 -0
  245. data/rbi/stripe/resources/token.rbi +1217 -0
  246. data/rbi/stripe/resources/topup.rbi +222 -0
  247. data/rbi/stripe/resources/transfer.rbi +199 -0
  248. data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
  249. data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
  250. data/rbi/stripe/resources/treasury/financial_account.rbi +865 -0
  251. data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
  252. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
  253. data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
  254. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
  255. data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
  256. data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
  257. data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
  258. data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
  259. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  260. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  261. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  262. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  263. data/rbi/stripe/resources/v2/event.rbi +48 -0
  264. data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
  265. data/rbi/stripe/resources/webhook_endpoint.rbi +170 -0
  266. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  267. data/rbi/stripe/services/account_external_account_service.rbi +306 -0
  268. data/rbi/stripe/services/account_link_service.rbi +58 -0
  269. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  270. data/rbi/stripe/services/account_person_service.rbi +923 -0
  271. data/rbi/stripe/services/account_service.rbi +4143 -0
  272. data/rbi/stripe/services/account_session_service.rbi +572 -0
  273. data/rbi/stripe/services/apple_pay_domain_service.rbi +78 -0
  274. data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
  275. data/rbi/stripe/services/application_fee_service.rbi +78 -0
  276. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  277. data/rbi/stripe/services/apps_service.rbi +9 -0
  278. data/rbi/stripe/services/balance_service.rbi +21 -0
  279. data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
  280. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  281. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  282. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  283. data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
  284. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
  285. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  286. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  287. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  288. data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
  289. data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
  290. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  291. data/rbi/stripe/services/billing_service.rbi +15 -0
  292. data/rbi/stripe/services/charge_service.rbi +448 -0
  293. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  294. data/rbi/stripe/services/checkout/session_service.rbi +2585 -0
  295. data/rbi/stripe/services/checkout_service.rbi +9 -0
  296. data/rbi/stripe/services/climate/order_service.rbi +142 -0
  297. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  298. data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
  299. data/rbi/stripe/services/climate_service.rbi +11 -0
  300. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  301. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  302. data/rbi/stripe/services/coupon_service.rbi +196 -0
  303. data/{lib/stripe/services/quote_preview_subscription_schedule_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
  304. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  305. data/rbi/stripe/services/credit_note_service.rbi +416 -0
  306. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  307. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  308. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  309. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  310. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  311. data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
  312. data/rbi/stripe/services/customer_service.rbi +651 -0
  313. data/rbi/stripe/services/customer_session_service.rbi +116 -0
  314. data/rbi/stripe/services/customer_tax_id_service.rbi +72 -0
  315. data/rbi/stripe/services/dispute_service.rbi +424 -0
  316. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  317. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  318. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  319. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  320. data/rbi/stripe/services/event_service.rbi +83 -0
  321. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  322. data/rbi/stripe/services/file_link_service.rbi +124 -0
  323. data/rbi/stripe/services/file_service.rbi +116 -0
  324. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  325. data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
  326. data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
  327. data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
  328. data/rbi/stripe/services/financial_connections_service.rbi +11 -0
  329. data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
  330. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  331. data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
  332. data/rbi/stripe/services/identity/verification_session_service.rbi +323 -0
  333. data/rbi/stripe/services/identity_service.rbi +10 -0
  334. data/rbi/stripe/services/invoice_item_service.rbi +368 -0
  335. data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
  336. data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
  337. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  338. data/rbi/stripe/services/invoice_service.rbi +2920 -0
  339. data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
  340. data/rbi/stripe/services/issuing/card_service.rbi +495 -0
  341. data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
  342. data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
  343. data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
  344. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  345. data/rbi/stripe/services/issuing/token_service.rbi +99 -0
  346. data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
  347. data/rbi/stripe/services/issuing_service.rbi +16 -0
  348. data/rbi/stripe/services/mandate_service.rbi +20 -0
  349. data/rbi/stripe/services/payment_intent_service.rbi +7759 -0
  350. data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
  351. data/rbi/stripe/services/payment_link_service.rbi +1352 -0
  352. data/rbi/stripe/services/payment_method_configuration_service.rbi +2211 -0
  353. data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
  354. data/rbi/stripe/services/payment_method_service.rbi +840 -0
  355. data/rbi/stripe/services/payout_service.rbi +205 -0
  356. data/rbi/stripe/services/plan_service.rbi +284 -0
  357. data/rbi/stripe/services/price_service.rbi +546 -0
  358. data/rbi/stripe/services/product_feature_service.rbi +69 -0
  359. data/rbi/stripe/services/product_service.rbi +479 -0
  360. data/rbi/stripe/services/promotion_code_service.rbi +214 -0
  361. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  362. data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
  363. data/rbi/stripe/services/quote_service.rbi +686 -0
  364. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
  365. data/rbi/stripe/services/radar/value_list_item_service.rbi +111 -0
  366. data/rbi/stripe/services/radar/value_list_service.rbi +143 -0
  367. data/rbi/stripe/services/radar_service.rbi +11 -0
  368. data/rbi/stripe/services/refund_service.rbi +185 -0
  369. data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
  370. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  371. data/rbi/stripe/services/reporting_service.rbi +10 -0
  372. data/rbi/stripe/services/review_service.rbi +84 -0
  373. data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
  374. data/rbi/stripe/services/setup_intent_service.rbi +3596 -0
  375. data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
  376. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  377. data/rbi/stripe/services/sigma_service.rbi +9 -0
  378. data/rbi/stripe/services/source_service.rbi +663 -0
  379. data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
  380. data/rbi/stripe/services/subscription_item_service.rbi +324 -0
  381. data/rbi/stripe/services/subscription_schedule_service.rbi +1192 -0
  382. data/rbi/stripe/services/subscription_service.rbi +1596 -0
  383. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +33 -0
  384. data/rbi/stripe/services/tax/calculation_service.rbi +230 -0
  385. data/rbi/stripe/services/tax/registration_service.rbi +1689 -0
  386. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  387. data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
  388. data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
  389. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  390. data/rbi/stripe/services/tax_id_service.rbi +112 -0
  391. data/rbi/stripe/services/tax_rate_service.rbi +185 -0
  392. data/rbi/stripe/services/tax_service.rbi +12 -0
  393. data/rbi/stripe/services/terminal/configuration_service.rbi +1120 -0
  394. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  395. data/rbi/stripe/services/terminal/location_service.rbi +184 -0
  396. data/rbi/stripe/services/terminal/reader_service.rbi +344 -0
  397. data/rbi/stripe/services/terminal_service.rbi +12 -0
  398. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +746 -0
  399. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  400. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
  401. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  402. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
  403. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
  404. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  405. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  406. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +62 -0
  407. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  408. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +92 -0
  409. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  410. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
  411. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
  412. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
  413. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
  414. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  415. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  416. data/rbi/stripe/services/token_service.rbi +1189 -0
  417. data/rbi/stripe/services/topup_service.rbi +176 -0
  418. data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
  419. data/rbi/stripe/services/transfer_service.rbi +152 -0
  420. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  421. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  422. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
  423. data/rbi/stripe/services/treasury/financial_account_service.rbi +562 -0
  424. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  425. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
  426. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
  427. data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
  428. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  429. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
  430. data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
  431. data/rbi/stripe/services/treasury_service.rbi +18 -0
  432. data/rbi/stripe/services/v1_services.rbi +77 -0
  433. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  434. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  435. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +20 -0
  436. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  437. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  438. data/rbi/stripe/services/v2/core/event_destination_service.rbi +200 -0
  439. data/rbi/stripe/services/v2/core/event_service.rbi +38 -0
  440. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  441. data/rbi/stripe/services/v2_services.rbi +10 -0
  442. data/rbi/stripe/services/webhook_endpoint_service.rbi +131 -0
  443. data/stripe.gemspec +1 -4
  444. metadata +324 -140
  445. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
  446. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
  447. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
  448. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
  449. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
  450. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
  451. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
  452. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
  453. data/lib/stripe/events/v2_core_account_link_completed_event.rb +0 -13
  454. data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
  455. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
  456. data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
  457. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
  458. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
  459. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
  460. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
  461. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
  462. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
  463. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
  464. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
  465. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
  466. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
  467. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
  468. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
  469. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
  470. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
  471. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
  472. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
  473. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
  474. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
  475. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
  476. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
  477. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
  478. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
  479. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
  480. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
  481. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
  482. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
  483. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
  484. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
  485. data/lib/stripe/request_signing_authenticator.rb +0 -79
  486. data/lib/stripe/resources/account_notice.rb +0 -123
  487. data/lib/stripe/resources/balance_settings.rb +0 -101
  488. data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
  489. data/lib/stripe/resources/capital/financing_offer.rb +0 -179
  490. data/lib/stripe/resources/capital/financing_summary.rb +0 -55
  491. data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
  492. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  493. data/lib/stripe/resources/financial_connections/institution.rb +0 -90
  494. data/lib/stripe/resources/gift_cards/card.rb +0 -208
  495. data/lib/stripe/resources/gift_cards/transaction.rb +0 -272
  496. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
  497. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
  498. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
  499. data/lib/stripe/resources/issuing/settlement.rb +0 -53
  500. data/lib/stripe/resources/margin.rb +0 -115
  501. data/lib/stripe/resources/order.rb +0 -2859
  502. data/lib/stripe/resources/payment_attempt_record.rb +0 -1078
  503. data/lib/stripe/resources/payment_record.rb +0 -1607
  504. data/lib/stripe/resources/quote_line.rb +0 -274
  505. data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
  506. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -337
  507. data/lib/stripe/resources/tax/association.rb +0 -89
  508. data/lib/stripe/resources/tax/form.rb +0 -211
  509. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
  510. data/lib/stripe/resources/v2/core/account.rb +0 -1715
  511. data/lib/stripe/resources/v2/core/account_link.rb +0 -54
  512. data/lib/stripe/resources/v2/core/person.rb +0 -272
  513. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -72
  514. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -37
  515. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -18
  516. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -20
  517. data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -49
  518. data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -56
  519. data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -66
  520. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -92
  521. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -127
  522. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -74
  523. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -43
  524. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -115
  525. data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -73
  526. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -47
  527. data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -134
  528. data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -106
  529. data/lib/stripe/resources/v2/money_management/transaction.rb +0 -76
  530. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -66
  531. data/lib/stripe/services/account_notice_service.rb +0 -101
  532. data/lib/stripe/services/balance_settings_service.rb +0 -96
  533. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  534. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  535. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  536. data/lib/stripe/services/capital_service.rb +0 -15
  537. data/lib/stripe/services/external_account_service.rb +0 -206
  538. data/lib/stripe/services/gift_cards/card_service.rb +0 -170
  539. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
  540. data/lib/stripe/services/gift_cards_service.rb +0 -14
  541. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  542. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  543. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  544. data/lib/stripe/services/margin_service.rb +0 -119
  545. data/lib/stripe/services/order_service.rb +0 -2268
  546. data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
  547. data/lib/stripe/services/payment_record_service.rb +0 -542
  548. data/lib/stripe/services/tax/association_service.rb +0 -31
  549. data/lib/stripe/services/tax/form_service.rb +0 -100
  550. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  551. data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
  552. data/lib/stripe/services/v2/core/account_service.rb +0 -4130
  553. data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1040
  554. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -135
  555. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -109
  556. data/lib/stripe/services/v2/core/vault_service.rb +0 -18
  557. data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -75
  558. data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -44
  559. data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
  560. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -126
  561. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -80
  562. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -202
  563. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -237
  564. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -174
  565. data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -95
  566. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
  567. data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -71
  568. data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -44
  569. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -70
  570. data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -74
  571. data/lib/stripe/services/v2/money_management_service.rb +0 -31
  572. data/lib/stripe/services/v2/test_helper_service.rb +0 -15
  573. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -50
  574. data/rbi/stripe.rbi +0 -189274
@@ -79,36 +79,13 @@ module Stripe
79
79
  attr_reader :transfer_data
80
80
  end
81
81
 
82
- class LastPriceMigrationError < Stripe::StripeObject
83
- class FailedTransition < Stripe::StripeObject
84
- # The original price to be migrated.
85
- attr_reader :source_price
86
- # The intended resulting price of the migration.
87
- attr_reader :target_price
88
- end
89
- # The time at which the price migration encountered an error.
90
- attr_reader :errored_at
91
- # The involved price pairs in each failed transition.
92
- attr_reader :failed_transitions
93
- # The type of error encountered by the price migration.
94
- attr_reader :type
95
- end
96
-
97
82
  class Phase < Stripe::StripeObject
98
83
  class AddInvoiceItem < Stripe::StripeObject
99
84
  class Discount < Stripe::StripeObject
100
- class DiscountEnd < Stripe::StripeObject
101
- # The discount end timestamp.
102
- attr_reader :timestamp
103
- # The discount end type.
104
- attr_reader :type
105
- end
106
85
  # ID of the coupon to create a new discount for.
107
86
  attr_reader :coupon
108
87
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
109
88
  attr_reader :discount
110
- # Details to determine how long the discount should be applied for.
111
- attr_reader :discount_end
112
89
  # ID of the promotion code to create a new discount for.
113
90
  attr_reader :promotion_code
114
91
  end
@@ -138,18 +115,10 @@ module Stripe
138
115
  end
139
116
 
140
117
  class Discount < Stripe::StripeObject
141
- class DiscountEnd < Stripe::StripeObject
142
- # The discount end timestamp.
143
- attr_reader :timestamp
144
- # The discount end type.
145
- attr_reader :type
146
- end
147
118
  # ID of the coupon to create a new discount for.
148
119
  attr_reader :coupon
149
120
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
150
121
  attr_reader :discount
151
- # Details to determine how long the discount should be applied for.
152
- attr_reader :discount_end
153
122
  # ID of the promotion code to create a new discount for.
154
123
  attr_reader :promotion_code
155
124
  end
@@ -171,28 +140,13 @@ module Stripe
171
140
 
172
141
  class Item < Stripe::StripeObject
173
142
  class Discount < Stripe::StripeObject
174
- class DiscountEnd < Stripe::StripeObject
175
- # The discount end timestamp.
176
- attr_reader :timestamp
177
- # The discount end type.
178
- attr_reader :type
179
- end
180
143
  # ID of the coupon to create a new discount for.
181
144
  attr_reader :coupon
182
145
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
183
146
  attr_reader :discount
184
- # Details to determine how long the discount should be applied for.
185
- attr_reader :discount_end
186
147
  # ID of the promotion code to create a new discount for.
187
148
  attr_reader :promotion_code
188
149
  end
189
-
190
- class Trial < Stripe::StripeObject
191
- # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
192
- attr_reader :converts_to
193
- # Determines the type of trial for this item.
194
- attr_reader :type
195
- end
196
150
  # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
197
151
  attr_reader :discounts
198
152
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered.
@@ -205,13 +159,6 @@ module Stripe
205
159
  attr_reader :quantity
206
160
  # 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`.
207
161
  attr_reader :tax_rates
208
- # Options that configure the trial on the subscription item.
209
- attr_reader :trial
210
- end
211
-
212
- class PauseCollection < Stripe::StripeObject
213
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
214
- attr_reader :behavior
215
162
  end
216
163
 
217
164
  class TransferData < Stripe::StripeObject
@@ -220,15 +167,6 @@ module Stripe
220
167
  # The account where funds from the payment will be transferred to upon payment success.
221
168
  attr_reader :destination
222
169
  end
223
-
224
- class TrialSettings < Stripe::StripeObject
225
- class EndBehavior < Stripe::StripeObject
226
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
227
- attr_reader :prorate_up_front
228
- end
229
- # Defines how the subscription should behave when a trial ends.
230
- attr_reader :end_behavior
231
- end
232
170
  # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
233
171
  attr_reader :add_invoice_items
234
172
  # 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.
@@ -259,31 +197,14 @@ module Stripe
259
197
  attr_reader :metadata
260
198
  # 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.
261
199
  attr_reader :on_behalf_of
262
- # 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).
263
- attr_reader :pause_collection
264
200
  # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.
265
201
  attr_reader :proration_behavior
266
202
  # The start of this phase of the subscription schedule.
267
203
  attr_reader :start_date
268
204
  # 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.
269
205
  attr_reader :transfer_data
270
- # Specify behavior of the trial when crossing schedule phase boundaries
271
- attr_reader :trial_continuation
272
206
  # When the trial ends within the phase.
273
207
  attr_reader :trial_end
274
- # Settings related to any trials on the subscription during this phase.
275
- attr_reader :trial_settings
276
- end
277
-
278
- class Prebilling < Stripe::StripeObject
279
- # ID of the prebilling invoice.
280
- attr_reader :invoice
281
- # The end of the last period for which the invoice pre-bills.
282
- attr_reader :period_end
283
- # The start of the first period for which the invoice pre-bills.
284
- attr_reader :period_start
285
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
286
- attr_reader :update_behavior
287
208
  end
288
209
 
289
210
  class ListParams < Stripe::RequestParams
@@ -366,8 +287,6 @@ module Stripe
366
287
  attr_accessor :created
367
288
  # Only return subscription schedules for the given customer.
368
289
  attr_accessor :customer
369
- # Only return subscription schedules for the given account.
370
- attr_accessor :customer_account
371
290
  # 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.
372
291
  attr_accessor :ending_before
373
292
  # Specifies which fields in the response should be expanded.
@@ -386,7 +305,6 @@ module Stripe
386
305
  completed_at: nil,
387
306
  created: nil,
388
307
  customer: nil,
389
- customer_account: nil,
390
308
  ending_before: nil,
391
309
  expand: nil,
392
310
  limit: nil,
@@ -398,7 +316,6 @@ module Stripe
398
316
  @completed_at = completed_at
399
317
  @created = created
400
318
  @customer = customer
401
- @customer_account = customer_account
402
319
  @ending_before = ending_before
403
320
  @expand = expand
404
321
  @limit = limit
@@ -515,44 +432,16 @@ module Stripe
515
432
  class Phase < Stripe::RequestParams
516
433
  class AddInvoiceItem < Stripe::RequestParams
517
434
  class Discount < Stripe::RequestParams
518
- class DiscountEnd < Stripe::RequestParams
519
- class Duration < Stripe::RequestParams
520
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
521
- attr_accessor :interval
522
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
523
- attr_accessor :interval_count
524
-
525
- def initialize(interval: nil, interval_count: nil)
526
- @interval = interval
527
- @interval_count = interval_count
528
- end
529
- end
530
- # Time span for the redeemed discount.
531
- attr_accessor :duration
532
- # A precise Unix timestamp for the discount to end. Must be in the future.
533
- attr_accessor :timestamp
534
- # The type of calculation made to determine when the discount ends.
535
- attr_accessor :type
536
-
537
- def initialize(duration: nil, timestamp: nil, type: nil)
538
- @duration = duration
539
- @timestamp = timestamp
540
- @type = type
541
- end
542
- end
543
435
  # ID of the coupon to create a new discount for.
544
436
  attr_accessor :coupon
545
437
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
546
438
  attr_accessor :discount
547
- # Details to determine how long the discount should be applied for.
548
- attr_accessor :discount_end
549
439
  # ID of the promotion code to create a new discount for.
550
440
  attr_accessor :promotion_code
551
441
 
552
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
442
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
553
443
  @coupon = coupon
554
444
  @discount = discount
555
- @discount_end = discount_end
556
445
  @promotion_code = promotion_code
557
446
  end
558
447
  end
@@ -627,44 +516,16 @@ module Stripe
627
516
  end
628
517
 
629
518
  class Discount < Stripe::RequestParams
630
- class DiscountEnd < Stripe::RequestParams
631
- class Duration < Stripe::RequestParams
632
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
633
- attr_accessor :interval
634
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
635
- attr_accessor :interval_count
636
-
637
- def initialize(interval: nil, interval_count: nil)
638
- @interval = interval
639
- @interval_count = interval_count
640
- end
641
- end
642
- # Time span for the redeemed discount.
643
- attr_accessor :duration
644
- # A precise Unix timestamp for the discount to end. Must be in the future.
645
- attr_accessor :timestamp
646
- # The type of calculation made to determine when the discount ends.
647
- attr_accessor :type
648
-
649
- def initialize(duration: nil, timestamp: nil, type: nil)
650
- @duration = duration
651
- @timestamp = timestamp
652
- @type = type
653
- end
654
- end
655
519
  # ID of the coupon to create a new discount for.
656
520
  attr_accessor :coupon
657
521
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
658
522
  attr_accessor :discount
659
- # Details to determine how long the discount should be applied for.
660
- attr_accessor :discount_end
661
523
  # ID of the promotion code to create a new discount for.
662
524
  attr_accessor :promotion_code
663
525
 
664
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
526
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
665
527
  @coupon = coupon
666
528
  @discount = discount
667
- @discount_end = discount_end
668
529
  @promotion_code = promotion_code
669
530
  end
670
531
  end
@@ -697,44 +558,16 @@ module Stripe
697
558
 
698
559
  class Item < Stripe::RequestParams
699
560
  class Discount < Stripe::RequestParams
700
- class DiscountEnd < Stripe::RequestParams
701
- class Duration < Stripe::RequestParams
702
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
703
- attr_accessor :interval
704
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
705
- attr_accessor :interval_count
706
-
707
- def initialize(interval: nil, interval_count: nil)
708
- @interval = interval
709
- @interval_count = interval_count
710
- end
711
- end
712
- # Time span for the redeemed discount.
713
- attr_accessor :duration
714
- # A precise Unix timestamp for the discount to end. Must be in the future.
715
- attr_accessor :timestamp
716
- # The type of calculation made to determine when the discount ends.
717
- attr_accessor :type
718
-
719
- def initialize(duration: nil, timestamp: nil, type: nil)
720
- @duration = duration
721
- @timestamp = timestamp
722
- @type = type
723
- end
724
- end
725
561
  # ID of the coupon to create a new discount for.
726
562
  attr_accessor :coupon
727
563
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
728
564
  attr_accessor :discount
729
- # Details to determine how long the discount should be applied for.
730
- attr_accessor :discount_end
731
565
  # ID of the promotion code to create a new discount for.
732
566
  attr_accessor :promotion_code
733
567
 
734
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
568
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
735
569
  @coupon = coupon
736
570
  @discount = discount
737
- @discount_end = discount_end
738
571
  @promotion_code = promotion_code
739
572
  end
740
573
  end
@@ -780,18 +613,6 @@ module Stripe
780
613
  @unit_amount_decimal = unit_amount_decimal
781
614
  end
782
615
  end
783
-
784
- class Trial < Stripe::RequestParams
785
- # 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.
786
- attr_accessor :converts_to
787
- # Determines the type of trial for this item.
788
- attr_accessor :type
789
-
790
- def initialize(converts_to: nil, type: nil)
791
- @converts_to = converts_to
792
- @type = type
793
- end
794
- end
795
616
  # The coupons to redeem into discounts for the subscription item.
796
617
  attr_accessor :discounts
797
618
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
@@ -806,8 +627,6 @@ module Stripe
806
627
  attr_accessor :quantity
807
628
  # 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.
808
629
  attr_accessor :tax_rates
809
- # Options that configure the trial on the subscription item.
810
- attr_accessor :trial
811
630
 
812
631
  def initialize(
813
632
  discounts: nil,
@@ -816,8 +635,7 @@ module Stripe
816
635
  price: nil,
817
636
  price_data: nil,
818
637
  quantity: nil,
819
- tax_rates: nil,
820
- trial: nil
638
+ tax_rates: nil
821
639
  )
822
640
  @discounts = discounts
823
641
  @metadata = metadata
@@ -826,16 +644,6 @@ module Stripe
826
644
  @price_data = price_data
827
645
  @quantity = quantity
828
646
  @tax_rates = tax_rates
829
- @trial = trial
830
- end
831
- end
832
-
833
- class PauseCollection < Stripe::RequestParams
834
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
835
- attr_accessor :behavior
836
-
837
- def initialize(behavior: nil)
838
- @behavior = behavior
839
647
  end
840
648
  end
841
649
 
@@ -850,23 +658,6 @@ module Stripe
850
658
  @destination = destination
851
659
  end
852
660
  end
853
-
854
- class TrialSettings < Stripe::RequestParams
855
- class EndBehavior < Stripe::RequestParams
856
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
857
- attr_accessor :prorate_up_front
858
-
859
- def initialize(prorate_up_front: nil)
860
- @prorate_up_front = prorate_up_front
861
- end
862
- end
863
- # Defines how the subscription should behave when a trial ends.
864
- attr_accessor :end_behavior
865
-
866
- def initialize(end_behavior: nil)
867
- @end_behavior = end_behavior
868
- end
869
- end
870
661
  # 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.
871
662
  attr_accessor :add_invoice_items
872
663
  # 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).
@@ -899,20 +690,14 @@ module Stripe
899
690
  attr_accessor :metadata
900
691
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
901
692
  attr_accessor :on_behalf_of
902
- # 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).
903
- attr_accessor :pause_collection
904
693
  # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. 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 of the current phase.
905
694
  attr_accessor :proration_behavior
906
695
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
907
696
  attr_accessor :transfer_data
908
697
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
909
698
  attr_accessor :trial
910
- # Specify trial behavior when crossing phase boundaries
911
- attr_accessor :trial_continuation
912
699
  # 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`
913
700
  attr_accessor :trial_end
914
- # Settings related to subscription trials.
915
- attr_accessor :trial_settings
916
701
 
917
702
  def initialize(
918
703
  add_invoice_items: nil,
@@ -931,13 +716,10 @@ module Stripe
931
716
  iterations: nil,
932
717
  metadata: nil,
933
718
  on_behalf_of: nil,
934
- pause_collection: nil,
935
719
  proration_behavior: nil,
936
720
  transfer_data: nil,
937
721
  trial: nil,
938
- trial_continuation: nil,
939
- trial_end: nil,
940
- trial_settings: nil
722
+ trial_end: nil
941
723
  )
942
724
  @add_invoice_items = add_invoice_items
943
725
  @application_fee_percent = application_fee_percent
@@ -955,33 +737,14 @@ module Stripe
955
737
  @iterations = iterations
956
738
  @metadata = metadata
957
739
  @on_behalf_of = on_behalf_of
958
- @pause_collection = pause_collection
959
740
  @proration_behavior = proration_behavior
960
741
  @transfer_data = transfer_data
961
742
  @trial = trial
962
- @trial_continuation = trial_continuation
963
743
  @trial_end = trial_end
964
- @trial_settings = trial_settings
965
- end
966
- end
967
-
968
- class Prebilling < Stripe::RequestParams
969
- # This is used to determine the number of billing cycles to prebill.
970
- attr_accessor :iterations
971
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
972
- attr_accessor :update_behavior
973
-
974
- def initialize(iterations: nil, update_behavior: nil)
975
- @iterations = iterations
976
- @update_behavior = update_behavior
977
744
  end
978
745
  end
979
- # 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.
980
- attr_accessor :billing_behavior
981
746
  # The identifier of the customer to create the subscription schedule for.
982
747
  attr_accessor :customer
983
- # The identifier of the account to create the subscription schedule for.
984
- attr_accessor :customer_account
985
748
  # Object representing the subscription schedule's default settings.
986
749
  attr_accessor :default_settings
987
750
  # 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.
@@ -994,34 +757,26 @@ module Stripe
994
757
  attr_accessor :metadata
995
758
  # 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.
996
759
  attr_accessor :phases
997
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
998
- attr_accessor :prebilling
999
760
  # 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.
1000
761
  attr_accessor :start_date
1001
762
 
1002
763
  def initialize(
1003
- billing_behavior: nil,
1004
764
  customer: nil,
1005
- customer_account: nil,
1006
765
  default_settings: nil,
1007
766
  end_behavior: nil,
1008
767
  expand: nil,
1009
768
  from_subscription: nil,
1010
769
  metadata: nil,
1011
770
  phases: nil,
1012
- prebilling: nil,
1013
771
  start_date: nil
1014
772
  )
1015
- @billing_behavior = billing_behavior
1016
773
  @customer = customer
1017
- @customer_account = customer_account
1018
774
  @default_settings = default_settings
1019
775
  @end_behavior = end_behavior
1020
776
  @expand = expand
1021
777
  @from_subscription = from_subscription
1022
778
  @metadata = metadata
1023
779
  @phases = phases
1024
- @prebilling = prebilling
1025
780
  @start_date = start_date
1026
781
  end
1027
782
  end
@@ -1133,44 +888,16 @@ module Stripe
1133
888
  class Phase < Stripe::RequestParams
1134
889
  class AddInvoiceItem < Stripe::RequestParams
1135
890
  class Discount < Stripe::RequestParams
1136
- class DiscountEnd < Stripe::RequestParams
1137
- class Duration < Stripe::RequestParams
1138
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1139
- attr_accessor :interval
1140
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1141
- attr_accessor :interval_count
1142
-
1143
- def initialize(interval: nil, interval_count: nil)
1144
- @interval = interval
1145
- @interval_count = interval_count
1146
- end
1147
- end
1148
- # Time span for the redeemed discount.
1149
- attr_accessor :duration
1150
- # A precise Unix timestamp for the discount to end. Must be in the future.
1151
- attr_accessor :timestamp
1152
- # The type of calculation made to determine when the discount ends.
1153
- attr_accessor :type
1154
-
1155
- def initialize(duration: nil, timestamp: nil, type: nil)
1156
- @duration = duration
1157
- @timestamp = timestamp
1158
- @type = type
1159
- end
1160
- end
1161
891
  # ID of the coupon to create a new discount for.
1162
892
  attr_accessor :coupon
1163
893
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1164
894
  attr_accessor :discount
1165
- # Details to determine how long the discount should be applied for.
1166
- attr_accessor :discount_end
1167
895
  # ID of the promotion code to create a new discount for.
1168
896
  attr_accessor :promotion_code
1169
897
 
1170
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
898
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1171
899
  @coupon = coupon
1172
900
  @discount = discount
1173
- @discount_end = discount_end
1174
901
  @promotion_code = promotion_code
1175
902
  end
1176
903
  end
@@ -1245,44 +972,16 @@ module Stripe
1245
972
  end
1246
973
 
1247
974
  class Discount < Stripe::RequestParams
1248
- class DiscountEnd < Stripe::RequestParams
1249
- class Duration < Stripe::RequestParams
1250
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1251
- attr_accessor :interval
1252
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1253
- attr_accessor :interval_count
1254
-
1255
- def initialize(interval: nil, interval_count: nil)
1256
- @interval = interval
1257
- @interval_count = interval_count
1258
- end
1259
- end
1260
- # Time span for the redeemed discount.
1261
- attr_accessor :duration
1262
- # A precise Unix timestamp for the discount to end. Must be in the future.
1263
- attr_accessor :timestamp
1264
- # The type of calculation made to determine when the discount ends.
1265
- attr_accessor :type
1266
-
1267
- def initialize(duration: nil, timestamp: nil, type: nil)
1268
- @duration = duration
1269
- @timestamp = timestamp
1270
- @type = type
1271
- end
1272
- end
1273
975
  # ID of the coupon to create a new discount for.
1274
976
  attr_accessor :coupon
1275
977
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1276
978
  attr_accessor :discount
1277
- # Details to determine how long the discount should be applied for.
1278
- attr_accessor :discount_end
1279
979
  # ID of the promotion code to create a new discount for.
1280
980
  attr_accessor :promotion_code
1281
981
 
1282
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
982
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1283
983
  @coupon = coupon
1284
984
  @discount = discount
1285
- @discount_end = discount_end
1286
985
  @promotion_code = promotion_code
1287
986
  end
1288
987
  end
@@ -1315,44 +1014,16 @@ module Stripe
1315
1014
 
1316
1015
  class Item < Stripe::RequestParams
1317
1016
  class Discount < Stripe::RequestParams
1318
- class DiscountEnd < Stripe::RequestParams
1319
- class Duration < Stripe::RequestParams
1320
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1321
- attr_accessor :interval
1322
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1323
- attr_accessor :interval_count
1324
-
1325
- def initialize(interval: nil, interval_count: nil)
1326
- @interval = interval
1327
- @interval_count = interval_count
1328
- end
1329
- end
1330
- # Time span for the redeemed discount.
1331
- attr_accessor :duration
1332
- # A precise Unix timestamp for the discount to end. Must be in the future.
1333
- attr_accessor :timestamp
1334
- # The type of calculation made to determine when the discount ends.
1335
- attr_accessor :type
1336
-
1337
- def initialize(duration: nil, timestamp: nil, type: nil)
1338
- @duration = duration
1339
- @timestamp = timestamp
1340
- @type = type
1341
- end
1342
- end
1343
1017
  # ID of the coupon to create a new discount for.
1344
1018
  attr_accessor :coupon
1345
1019
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1346
1020
  attr_accessor :discount
1347
- # Details to determine how long the discount should be applied for.
1348
- attr_accessor :discount_end
1349
1021
  # ID of the promotion code to create a new discount for.
1350
1022
  attr_accessor :promotion_code
1351
1023
 
1352
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1024
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1353
1025
  @coupon = coupon
1354
1026
  @discount = discount
1355
- @discount_end = discount_end
1356
1027
  @promotion_code = promotion_code
1357
1028
  end
1358
1029
  end
@@ -1398,18 +1069,6 @@ module Stripe
1398
1069
  @unit_amount_decimal = unit_amount_decimal
1399
1070
  end
1400
1071
  end
1401
-
1402
- class Trial < Stripe::RequestParams
1403
- # 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.
1404
- attr_accessor :converts_to
1405
- # Determines the type of trial for this item.
1406
- attr_accessor :type
1407
-
1408
- def initialize(converts_to: nil, type: nil)
1409
- @converts_to = converts_to
1410
- @type = type
1411
- end
1412
- end
1413
1072
  # The coupons to redeem into discounts for the subscription item.
1414
1073
  attr_accessor :discounts
1415
1074
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
@@ -1424,8 +1083,6 @@ module Stripe
1424
1083
  attr_accessor :quantity
1425
1084
  # 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.
1426
1085
  attr_accessor :tax_rates
1427
- # Options that configure the trial on the subscription item.
1428
- attr_accessor :trial
1429
1086
 
1430
1087
  def initialize(
1431
1088
  discounts: nil,
@@ -1434,8 +1091,7 @@ module Stripe
1434
1091
  price: nil,
1435
1092
  price_data: nil,
1436
1093
  quantity: nil,
1437
- tax_rates: nil,
1438
- trial: nil
1094
+ tax_rates: nil
1439
1095
  )
1440
1096
  @discounts = discounts
1441
1097
  @metadata = metadata
@@ -1444,16 +1100,6 @@ module Stripe
1444
1100
  @price_data = price_data
1445
1101
  @quantity = quantity
1446
1102
  @tax_rates = tax_rates
1447
- @trial = trial
1448
- end
1449
- end
1450
-
1451
- class PauseCollection < Stripe::RequestParams
1452
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1453
- attr_accessor :behavior
1454
-
1455
- def initialize(behavior: nil)
1456
- @behavior = behavior
1457
1103
  end
1458
1104
  end
1459
1105
 
@@ -1468,23 +1114,6 @@ module Stripe
1468
1114
  @destination = destination
1469
1115
  end
1470
1116
  end
1471
-
1472
- class TrialSettings < Stripe::RequestParams
1473
- class EndBehavior < Stripe::RequestParams
1474
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1475
- attr_accessor :prorate_up_front
1476
-
1477
- def initialize(prorate_up_front: nil)
1478
- @prorate_up_front = prorate_up_front
1479
- end
1480
- end
1481
- # Defines how the subscription should behave when a trial ends.
1482
- attr_accessor :end_behavior
1483
-
1484
- def initialize(end_behavior: nil)
1485
- @end_behavior = end_behavior
1486
- end
1487
- end
1488
1117
  # 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.
1489
1118
  attr_accessor :add_invoice_items
1490
1119
  # 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).
@@ -1517,8 +1146,6 @@ module Stripe
1517
1146
  attr_accessor :metadata
1518
1147
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
1519
1148
  attr_accessor :on_behalf_of
1520
- # 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).
1521
- attr_accessor :pause_collection
1522
1149
  # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. 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 of the current phase.
1523
1150
  attr_accessor :proration_behavior
1524
1151
  # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
@@ -1527,12 +1154,8 @@ module Stripe
1527
1154
  attr_accessor :transfer_data
1528
1155
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1529
1156
  attr_accessor :trial
1530
- # Specify trial behavior when crossing phase boundaries
1531
- attr_accessor :trial_continuation
1532
1157
  # 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`
1533
1158
  attr_accessor :trial_end
1534
- # Settings related to subscription trials.
1535
- attr_accessor :trial_settings
1536
1159
 
1537
1160
  def initialize(
1538
1161
  add_invoice_items: nil,
@@ -1551,14 +1174,11 @@ module Stripe
1551
1174
  iterations: nil,
1552
1175
  metadata: nil,
1553
1176
  on_behalf_of: nil,
1554
- pause_collection: nil,
1555
1177
  proration_behavior: nil,
1556
1178
  start_date: nil,
1557
1179
  transfer_data: nil,
1558
1180
  trial: nil,
1559
- trial_continuation: nil,
1560
- trial_end: nil,
1561
- trial_settings: nil
1181
+ trial_end: nil
1562
1182
  )
1563
1183
  @add_invoice_items = add_invoice_items
1564
1184
  @application_fee_percent = application_fee_percent
@@ -1576,30 +1196,13 @@ module Stripe
1576
1196
  @iterations = iterations
1577
1197
  @metadata = metadata
1578
1198
  @on_behalf_of = on_behalf_of
1579
- @pause_collection = pause_collection
1580
1199
  @proration_behavior = proration_behavior
1581
1200
  @start_date = start_date
1582
1201
  @transfer_data = transfer_data
1583
1202
  @trial = trial
1584
- @trial_continuation = trial_continuation
1585
1203
  @trial_end = trial_end
1586
- @trial_settings = trial_settings
1587
- end
1588
- end
1589
-
1590
- class Prebilling < Stripe::RequestParams
1591
- # This is used to determine the number of billing cycles to prebill.
1592
- attr_accessor :iterations
1593
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1594
- attr_accessor :update_behavior
1595
-
1596
- def initialize(iterations: nil, update_behavior: nil)
1597
- @iterations = iterations
1598
- @update_behavior = update_behavior
1599
1204
  end
1600
1205
  end
1601
- # 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.
1602
- attr_accessor :billing_behavior
1603
1206
  # Object representing the subscription schedule's default settings.
1604
1207
  attr_accessor :default_settings
1605
1208
  # 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.
@@ -1610,595 +1213,23 @@ module Stripe
1610
1213
  attr_accessor :metadata
1611
1214
  # 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.
1612
1215
  attr_accessor :phases
1613
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
1614
- attr_accessor :prebilling
1615
1216
  # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
1616
1217
  attr_accessor :proration_behavior
1617
1218
 
1618
1219
  def initialize(
1619
- billing_behavior: nil,
1620
1220
  default_settings: nil,
1621
1221
  end_behavior: nil,
1622
1222
  expand: nil,
1623
1223
  metadata: nil,
1624
1224
  phases: nil,
1625
- prebilling: nil,
1626
1225
  proration_behavior: nil
1627
1226
  )
1628
- @billing_behavior = billing_behavior
1629
1227
  @default_settings = default_settings
1630
1228
  @end_behavior = end_behavior
1631
1229
  @expand = expand
1632
1230
  @metadata = metadata
1633
1231
  @phases = phases
1634
- @prebilling = prebilling
1635
- @proration_behavior = proration_behavior
1636
- end
1637
- end
1638
-
1639
- class AmendParams < Stripe::RequestParams
1640
- class Amendment < Stripe::RequestParams
1641
- class AmendmentEnd < Stripe::RequestParams
1642
- class DiscountEnd < Stripe::RequestParams
1643
- # The ID of a specific discount.
1644
- attr_accessor :discount
1645
-
1646
- def initialize(discount: nil)
1647
- @discount = discount
1648
- end
1649
- end
1650
-
1651
- class Duration < Stripe::RequestParams
1652
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1653
- attr_accessor :interval
1654
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1655
- attr_accessor :interval_count
1656
-
1657
- def initialize(interval: nil, interval_count: nil)
1658
- @interval = interval
1659
- @interval_count = interval_count
1660
- end
1661
- end
1662
- # Use the `end` time of a given discount.
1663
- attr_accessor :discount_end
1664
- # Time span for the amendment starting from the `amendment_start`.
1665
- attr_accessor :duration
1666
- # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
1667
- attr_accessor :timestamp
1668
- # Select one of three ways to pass the `amendment_end`.
1669
- attr_accessor :type
1670
-
1671
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
1672
- @discount_end = discount_end
1673
- @duration = duration
1674
- @timestamp = timestamp
1675
- @type = type
1676
- end
1677
- end
1678
-
1679
- class AmendmentStart < Stripe::RequestParams
1680
- class AmendmentEnd < Stripe::RequestParams
1681
- # 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.
1682
- attr_accessor :index
1683
-
1684
- def initialize(index: nil)
1685
- @index = index
1686
- end
1687
- end
1688
-
1689
- class DiscountEnd < Stripe::RequestParams
1690
- # The ID of a specific discount.
1691
- attr_accessor :discount
1692
-
1693
- def initialize(discount: nil)
1694
- @discount = discount
1695
- end
1696
- end
1697
- # Details of another amendment in the same array, immediately after which this amendment should begin.
1698
- attr_accessor :amendment_end
1699
- # Use the `end` time of a given discount.
1700
- attr_accessor :discount_end
1701
- # A precise Unix timestamp for the amendment to start.
1702
- attr_accessor :timestamp
1703
- # Select one of three ways to pass the `amendment_start`.
1704
- attr_accessor :type
1705
-
1706
- def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
1707
- @amendment_end = amendment_end
1708
- @discount_end = discount_end
1709
- @timestamp = timestamp
1710
- @type = type
1711
- end
1712
- end
1713
-
1714
- class DiscountAction < Stripe::RequestParams
1715
- class Add < Stripe::RequestParams
1716
- class DiscountEnd < Stripe::RequestParams
1717
- # The type of calculation made to determine when the discount ends.
1718
- attr_accessor :type
1719
-
1720
- def initialize(type: nil)
1721
- @type = type
1722
- end
1723
- end
1724
- # The coupon code to redeem.
1725
- attr_accessor :coupon
1726
- # An ID of an existing discount for a coupon that was already redeemed.
1727
- attr_accessor :discount
1728
- # Details to determine how long the discount should be applied for.
1729
- attr_accessor :discount_end
1730
- # 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.
1731
- attr_accessor :index
1732
- # The promotion code to redeem.
1733
- attr_accessor :promotion_code
1734
-
1735
- def initialize(
1736
- coupon: nil,
1737
- discount: nil,
1738
- discount_end: nil,
1739
- index: nil,
1740
- promotion_code: nil
1741
- )
1742
- @coupon = coupon
1743
- @discount = discount
1744
- @discount_end = discount_end
1745
- @index = index
1746
- @promotion_code = promotion_code
1747
- end
1748
- end
1749
-
1750
- class Remove < Stripe::RequestParams
1751
- # The coupon code to remove from the `discounts` array.
1752
- attr_accessor :coupon
1753
- # The ID of a discount to remove from the `discounts` array.
1754
- attr_accessor :discount
1755
- # The ID of a promotion code to remove from the `discounts` array.
1756
- attr_accessor :promotion_code
1757
-
1758
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1759
- @coupon = coupon
1760
- @discount = discount
1761
- @promotion_code = promotion_code
1762
- end
1763
- end
1764
-
1765
- class Set < Stripe::RequestParams
1766
- # The coupon code to replace the `discounts` array with.
1767
- attr_accessor :coupon
1768
- # An ID of an existing discount to replace the `discounts` array with.
1769
- attr_accessor :discount
1770
- # An ID of an existing promotion code to replace the `discounts` array with.
1771
- attr_accessor :promotion_code
1772
-
1773
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1774
- @coupon = coupon
1775
- @discount = discount
1776
- @promotion_code = promotion_code
1777
- end
1778
- end
1779
- # Details of the discount to add.
1780
- attr_accessor :add
1781
- # Details of the discount to remove.
1782
- attr_accessor :remove
1783
- # Details of the discount to replace the existing discounts with.
1784
- attr_accessor :set
1785
- # Determines the type of discount action.
1786
- attr_accessor :type
1787
-
1788
- def initialize(add: nil, remove: nil, set: nil, type: nil)
1789
- @add = add
1790
- @remove = remove
1791
- @set = set
1792
- @type = type
1793
- end
1794
- end
1795
-
1796
- class ItemAction < Stripe::RequestParams
1797
- class Add < Stripe::RequestParams
1798
- class Discount < Stripe::RequestParams
1799
- class DiscountEnd < Stripe::RequestParams
1800
- class Duration < Stripe::RequestParams
1801
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1802
- attr_accessor :interval
1803
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1804
- attr_accessor :interval_count
1805
-
1806
- def initialize(interval: nil, interval_count: nil)
1807
- @interval = interval
1808
- @interval_count = interval_count
1809
- end
1810
- end
1811
- # Time span for the redeemed discount.
1812
- attr_accessor :duration
1813
- # A precise Unix timestamp for the discount to end. Must be in the future.
1814
- attr_accessor :timestamp
1815
- # The type of calculation made to determine when the discount ends.
1816
- attr_accessor :type
1817
-
1818
- def initialize(duration: nil, timestamp: nil, type: nil)
1819
- @duration = duration
1820
- @timestamp = timestamp
1821
- @type = type
1822
- end
1823
- end
1824
- # ID of the coupon to create a new discount for.
1825
- attr_accessor :coupon
1826
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1827
- attr_accessor :discount
1828
- # Details to determine how long the discount should be applied for.
1829
- attr_accessor :discount_end
1830
- # ID of the promotion code to create a new discount for.
1831
- attr_accessor :promotion_code
1832
-
1833
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1834
- @coupon = coupon
1835
- @discount = discount
1836
- @discount_end = discount_end
1837
- @promotion_code = promotion_code
1838
- end
1839
- end
1840
-
1841
- class Trial < Stripe::RequestParams
1842
- # 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.
1843
- attr_accessor :converts_to
1844
- # Determines the type of trial for this item.
1845
- attr_accessor :type
1846
-
1847
- def initialize(converts_to: nil, type: nil)
1848
- @converts_to = converts_to
1849
- @type = type
1850
- end
1851
- end
1852
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
1853
- attr_accessor :discounts
1854
- # 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`.
1855
- attr_accessor :metadata
1856
- # The ID of the price object.
1857
- attr_accessor :price
1858
- # Quantity for this item.
1859
- attr_accessor :quantity
1860
- # 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`.
1861
- attr_accessor :tax_rates
1862
- # Options that configure the trial on the subscription item.
1863
- attr_accessor :trial
1864
-
1865
- def initialize(
1866
- discounts: nil,
1867
- metadata: nil,
1868
- price: nil,
1869
- quantity: nil,
1870
- tax_rates: nil,
1871
- trial: nil
1872
- )
1873
- @discounts = discounts
1874
- @metadata = metadata
1875
- @price = price
1876
- @quantity = quantity
1877
- @tax_rates = tax_rates
1878
- @trial = trial
1879
- end
1880
- end
1881
-
1882
- class Remove < Stripe::RequestParams
1883
- # ID of a price to remove.
1884
- attr_accessor :price
1885
-
1886
- def initialize(price: nil)
1887
- @price = price
1888
- end
1889
- end
1890
-
1891
- class Set < Stripe::RequestParams
1892
- class Discount < Stripe::RequestParams
1893
- class DiscountEnd < Stripe::RequestParams
1894
- class Duration < Stripe::RequestParams
1895
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1896
- attr_accessor :interval
1897
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1898
- attr_accessor :interval_count
1899
-
1900
- def initialize(interval: nil, interval_count: nil)
1901
- @interval = interval
1902
- @interval_count = interval_count
1903
- end
1904
- end
1905
- # Time span for the redeemed discount.
1906
- attr_accessor :duration
1907
- # A precise Unix timestamp for the discount to end. Must be in the future.
1908
- attr_accessor :timestamp
1909
- # The type of calculation made to determine when the discount ends.
1910
- attr_accessor :type
1911
-
1912
- def initialize(duration: nil, timestamp: nil, type: nil)
1913
- @duration = duration
1914
- @timestamp = timestamp
1915
- @type = type
1916
- end
1917
- end
1918
- # ID of the coupon to create a new discount for.
1919
- attr_accessor :coupon
1920
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1921
- attr_accessor :discount
1922
- # Details to determine how long the discount should be applied for.
1923
- attr_accessor :discount_end
1924
- # ID of the promotion code to create a new discount for.
1925
- attr_accessor :promotion_code
1926
-
1927
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1928
- @coupon = coupon
1929
- @discount = discount
1930
- @discount_end = discount_end
1931
- @promotion_code = promotion_code
1932
- end
1933
- end
1934
-
1935
- class Trial < Stripe::RequestParams
1936
- # 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.
1937
- attr_accessor :converts_to
1938
- # Determines the type of trial for this item.
1939
- attr_accessor :type
1940
-
1941
- def initialize(converts_to: nil, type: nil)
1942
- @converts_to = converts_to
1943
- @type = type
1944
- end
1945
- end
1946
- # 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`.
1947
- attr_accessor :discounts
1948
- # 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`.
1949
- attr_accessor :metadata
1950
- # The ID of the price object.
1951
- attr_accessor :price
1952
- # 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`.
1953
- attr_accessor :quantity
1954
- # 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`.
1955
- attr_accessor :tax_rates
1956
- # 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`.
1957
- attr_accessor :trial
1958
-
1959
- def initialize(
1960
- discounts: nil,
1961
- metadata: nil,
1962
- price: nil,
1963
- quantity: nil,
1964
- tax_rates: nil,
1965
- trial: nil
1966
- )
1967
- @discounts = discounts
1968
- @metadata = metadata
1969
- @price = price
1970
- @quantity = quantity
1971
- @tax_rates = tax_rates
1972
- @trial = trial
1973
- end
1974
- end
1975
- # 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.
1976
- attr_accessor :add
1977
- # Details of the subscription item to remove.
1978
- attr_accessor :remove
1979
- # 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.
1980
- attr_accessor :set
1981
- # Determines the type of item action.
1982
- attr_accessor :type
1983
-
1984
- def initialize(add: nil, remove: nil, set: nil, type: nil)
1985
- @add = add
1986
- @remove = remove
1987
- @set = set
1988
- @type = type
1989
- end
1990
- end
1991
-
1992
- class MetadataAction < Stripe::RequestParams
1993
- # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
1994
- attr_accessor :add
1995
- # Keys to remove from schedule phase metadata.
1996
- attr_accessor :remove
1997
- # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
1998
- attr_accessor :set
1999
- # Select one of three ways to update phase-level `metadata` on subscription schedules.
2000
- attr_accessor :type
2001
-
2002
- def initialize(add: nil, remove: nil, set: nil, type: nil)
2003
- @add = add
2004
- @remove = remove
2005
- @set = set
2006
- @type = type
2007
- end
2008
- end
2009
-
2010
- class SetPauseCollection < Stripe::RequestParams
2011
- class Set < Stripe::RequestParams
2012
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2013
- attr_accessor :behavior
2014
-
2015
- def initialize(behavior: nil)
2016
- @behavior = behavior
2017
- end
2018
- end
2019
- # Details of the pause_collection behavior to apply to the amendment.
2020
- attr_accessor :set
2021
- # Determines the type of the pause_collection amendment.
2022
- attr_accessor :type
2023
-
2024
- def initialize(set: nil, type: nil)
2025
- @set = set
2026
- @type = type
2027
- end
2028
- end
2029
-
2030
- class TrialSettings < Stripe::RequestParams
2031
- class EndBehavior < Stripe::RequestParams
2032
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2033
- attr_accessor :prorate_up_front
2034
-
2035
- def initialize(prorate_up_front: nil)
2036
- @prorate_up_front = prorate_up_front
2037
- end
2038
- end
2039
- # Defines how the subscription should behave when a trial ends.
2040
- attr_accessor :end_behavior
2041
-
2042
- def initialize(end_behavior: nil)
2043
- @end_behavior = end_behavior
2044
- end
2045
- end
2046
- # 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.
2047
- attr_accessor :amendment_end
2048
- # Details to identify the earliest timestamp where the proposed change should take effect.
2049
- attr_accessor :amendment_start
2050
- # 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.
2051
- attr_accessor :billing_cycle_anchor
2052
- # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2053
- attr_accessor :discount_actions
2054
- # Changes to the subscription items during the amendment time span.
2055
- attr_accessor :item_actions
2056
- # Instructions for how to modify phase metadata
2057
- attr_accessor :metadata_actions
2058
- # 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`.
2059
- attr_accessor :proration_behavior
2060
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2061
- attr_accessor :set_pause_collection
2062
- # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2063
- attr_accessor :set_schedule_end
2064
- # Settings related to subscription trials.
2065
- attr_accessor :trial_settings
2066
-
2067
- def initialize(
2068
- amendment_end: nil,
2069
- amendment_start: nil,
2070
- billing_cycle_anchor: nil,
2071
- discount_actions: nil,
2072
- item_actions: nil,
2073
- metadata_actions: nil,
2074
- proration_behavior: nil,
2075
- set_pause_collection: nil,
2076
- set_schedule_end: nil,
2077
- trial_settings: nil
2078
- )
2079
- @amendment_end = amendment_end
2080
- @amendment_start = amendment_start
2081
- @billing_cycle_anchor = billing_cycle_anchor
2082
- @discount_actions = discount_actions
2083
- @item_actions = item_actions
2084
- @metadata_actions = metadata_actions
2085
- @proration_behavior = proration_behavior
2086
- @set_pause_collection = set_pause_collection
2087
- @set_schedule_end = set_schedule_end
2088
- @trial_settings = trial_settings
2089
- end
2090
- end
2091
-
2092
- class Prebilling < Stripe::RequestParams
2093
- class BillFrom < Stripe::RequestParams
2094
- class AmendmentStart < Stripe::RequestParams
2095
- # 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.
2096
- attr_accessor :index
2097
-
2098
- def initialize(index: nil)
2099
- @index = index
2100
- end
2101
- end
2102
- # Start the prebilled period when a specified amendment begins.
2103
- attr_accessor :amendment_start
2104
- # Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2105
- attr_accessor :timestamp
2106
- # Select one of several ways to pass the `bill_from` value.
2107
- attr_accessor :type
2108
-
2109
- def initialize(amendment_start: nil, timestamp: nil, type: nil)
2110
- @amendment_start = amendment_start
2111
- @timestamp = timestamp
2112
- @type = type
2113
- end
2114
- end
2115
-
2116
- class BillUntil < Stripe::RequestParams
2117
- class AmendmentEnd < Stripe::RequestParams
2118
- # 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.
2119
- attr_accessor :index
2120
-
2121
- def initialize(index: nil)
2122
- @index = index
2123
- end
2124
- end
2125
-
2126
- class Duration < Stripe::RequestParams
2127
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2128
- attr_accessor :interval
2129
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2130
- attr_accessor :interval_count
2131
-
2132
- def initialize(interval: nil, interval_count: nil)
2133
- @interval = interval
2134
- @interval_count = interval_count
2135
- end
2136
- end
2137
- # End the prebilled period when a specified amendment ends.
2138
- attr_accessor :amendment_end
2139
- # Time span for prebilling, starting from `bill_from`.
2140
- attr_accessor :duration
2141
- # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2142
- attr_accessor :timestamp
2143
- # Select one of several ways to pass the `bill_until` value.
2144
- attr_accessor :type
2145
-
2146
- def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
2147
- @amendment_end = amendment_end
2148
- @duration = duration
2149
- @timestamp = timestamp
2150
- @type = type
2151
- end
2152
- end
2153
- # The beginning of the prebilled time period. The default value is `now`.
2154
- attr_accessor :bill_from
2155
- # The end of the prebilled time period.
2156
- attr_accessor :bill_until
2157
- # When the prebilling invoice should be created. The default value is `now`.
2158
- attr_accessor :invoice_at
2159
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2160
- attr_accessor :update_behavior
2161
-
2162
- def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
2163
- @bill_from = bill_from
2164
- @bill_until = bill_until
2165
- @invoice_at = invoice_at
2166
- @update_behavior = update_behavior
2167
- end
2168
- end
2169
-
2170
- class ScheduleSettings < Stripe::RequestParams
2171
- # Behavior of the subscription schedule and underlying subscription when it ends.
2172
- attr_accessor :end_behavior
2173
-
2174
- def initialize(end_behavior: nil)
2175
- @end_behavior = end_behavior
2176
- end
2177
- end
2178
- # Changes to apply to the phases of the subscription schedule, in the order provided.
2179
- attr_accessor :amendments
2180
- # Specifies which fields in the response should be expanded.
2181
- attr_accessor :expand
2182
- # Provide any time periods to bill in advance.
2183
- attr_accessor :prebilling
2184
- # In cases where the amendment changes the currently active phase,
2185
- # specifies if and how to prorate at the time of the request.
2186
- attr_accessor :proration_behavior
2187
- # Changes to apply to the subscription schedule.
2188
- attr_accessor :schedule_settings
2189
-
2190
- def initialize(
2191
- amendments: nil,
2192
- expand: nil,
2193
- prebilling: nil,
2194
- proration_behavior: nil,
2195
- schedule_settings: nil
2196
- )
2197
- @amendments = amendments
2198
- @expand = expand
2199
- @prebilling = prebilling
2200
1232
  @proration_behavior = proration_behavior
2201
- @schedule_settings = schedule_settings
2202
1233
  end
2203
1234
  end
2204
1235
 
@@ -2230,8 +1261,6 @@ module Stripe
2230
1261
  end
2231
1262
  # ID of the Connect Application that created the schedule.
2232
1263
  attr_reader :application
2233
- # 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.
2234
- attr_reader :billing_behavior
2235
1264
  # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
2236
1265
  attr_reader :canceled_at
2237
1266
  # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
@@ -2242,16 +1271,12 @@ module Stripe
2242
1271
  attr_reader :current_phase
2243
1272
  # ID of the customer who owns the subscription schedule.
2244
1273
  attr_reader :customer
2245
- # ID of the account who owns the subscription schedule.
2246
- attr_reader :customer_account
2247
1274
  # Attribute for field default_settings
2248
1275
  attr_reader :default_settings
2249
1276
  # 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.
2250
1277
  attr_reader :end_behavior
2251
1278
  # Unique identifier for the object.
2252
1279
  attr_reader :id
2253
- # Details of the most recent price migration that failed for the subscription schedule.
2254
- attr_reader :last_price_migration_error
2255
1280
  # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
2256
1281
  attr_reader :livemode
2257
1282
  # 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.
@@ -2260,8 +1285,6 @@ module Stripe
2260
1285
  attr_reader :object
2261
1286
  # Configuration for the subscription schedule's phases.
2262
1287
  attr_reader :phases
2263
- # Time period and invoice for a Subscription billed in advance.
2264
- attr_reader :prebilling
2265
1288
  # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
2266
1289
  attr_reader :released_at
2267
1290
  # ID of the subscription once managed by the subscription schedule (if it is released).
@@ -2273,26 +1296,6 @@ module Stripe
2273
1296
  # ID of the test clock this subscription schedule belongs to.
2274
1297
  attr_reader :test_clock
2275
1298
 
2276
- # Amends an existing subscription schedule.
2277
- def amend(params = {}, opts = {})
2278
- request_stripe_object(
2279
- method: :post,
2280
- path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
2281
- params: params,
2282
- opts: opts
2283
- )
2284
- end
2285
-
2286
- # Amends an existing subscription schedule.
2287
- def self.amend(schedule, params = {}, opts = {})
2288
- request_stripe_object(
2289
- method: :post,
2290
- path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
2291
- params: params,
2292
- opts: opts
2293
- )
2294
- end
2295
-
2296
1299
  # 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.
2297
1300
  def cancel(params = {}, opts = {})
2298
1301
  request_stripe_object(