stripe 13.6.0.pre.beta.1 → 14.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 (556) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +699 -1457
  3. data/OPENAPI_VERSION +1 -1
  4. data/README.md +29 -0
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_requestor.rb +2 -0
  7. data/lib/stripe/api_version.rb +1 -1
  8. data/lib/stripe/errors.rb +0 -7
  9. data/lib/stripe/object_types.rb +0 -26
  10. data/lib/stripe/resources/account.rb +83 -614
  11. data/lib/stripe/resources/account_session.rb +1 -247
  12. data/lib/stripe/resources/apple_pay_domain.rb +0 -9
  13. data/lib/stripe/resources/application_fee.rb +1 -10
  14. data/lib/stripe/resources/balance.rb +0 -9
  15. data/lib/stripe/resources/balance_transaction.rb +2 -11
  16. data/lib/stripe/resources/bank_account.rb +1 -1
  17. data/lib/stripe/resources/billing/alert.rb +0 -9
  18. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -48
  19. data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -9
  20. data/lib/stripe/resources/billing/credit_grant.rb +4 -13
  21. data/lib/stripe/resources/billing/meter.rb +1 -10
  22. data/lib/stripe/resources/billing_portal/configuration.rb +0 -9
  23. data/lib/stripe/resources/card.rb +2 -4
  24. data/lib/stripe/resources/charge.rb +35 -1457
  25. data/lib/stripe/resources/checkout/session.rb +100 -293
  26. data/lib/stripe/resources/climate/order.rb +0 -9
  27. data/lib/stripe/resources/climate/product.rb +0 -9
  28. data/lib/stripe/resources/climate/supplier.rb +0 -9
  29. data/lib/stripe/resources/confirmation_token.rb +74 -156
  30. data/lib/stripe/resources/country_spec.rb +0 -9
  31. data/lib/stripe/resources/coupon.rb +0 -9
  32. data/lib/stripe/resources/credit_note.rb +14 -35
  33. data/lib/stripe/resources/credit_note_line_item.rb +14 -12
  34. data/lib/stripe/resources/customer.rb +12 -28
  35. data/lib/stripe/resources/customer_balance_transaction.rb +3 -1
  36. data/lib/stripe/resources/dispute.rb +0 -9
  37. data/lib/stripe/resources/entitlements/active_entitlement.rb +0 -9
  38. data/lib/stripe/resources/entitlements/feature.rb +0 -9
  39. data/lib/stripe/resources/event.rb +0 -40
  40. data/lib/stripe/resources/exchange_rate.rb +0 -9
  41. data/lib/stripe/resources/file.rb +0 -9
  42. data/lib/stripe/resources/file_link.rb +0 -9
  43. data/lib/stripe/resources/financial_connections/account.rb +0 -23
  44. data/lib/stripe/resources/financial_connections/session.rb +1 -65
  45. data/lib/stripe/resources/financial_connections/transaction.rb +0 -9
  46. data/lib/stripe/resources/forwarding/request.rb +0 -9
  47. data/lib/stripe/resources/identity/verification_report.rb +0 -9
  48. data/lib/stripe/resources/identity/verification_session.rb +0 -9
  49. data/lib/stripe/resources/invoice.rb +225 -5120
  50. data/lib/stripe/resources/invoice_item.rb +65 -110
  51. data/lib/stripe/resources/invoice_line_item.rb +106 -89
  52. data/lib/stripe/resources/invoice_payment.rb +53 -4
  53. data/lib/stripe/resources/invoice_rendering_template.rb +0 -12
  54. data/lib/stripe/resources/issuing/authorization.rb +0 -9
  55. data/lib/stripe/resources/issuing/card.rb +0 -9
  56. data/lib/stripe/resources/issuing/cardholder.rb +1 -11
  57. data/lib/stripe/resources/issuing/dispute.rb +0 -9
  58. data/lib/stripe/resources/issuing/personalization_design.rb +0 -9
  59. data/lib/stripe/resources/issuing/physical_bundle.rb +0 -9
  60. data/lib/stripe/resources/issuing/token.rb +0 -9
  61. data/lib/stripe/resources/issuing/transaction.rb +0 -15
  62. data/lib/stripe/resources/line_item.rb +0 -28
  63. data/lib/stripe/resources/mandate.rb +6 -33
  64. data/lib/stripe/resources/payment_intent.rb +642 -4975
  65. data/lib/stripe/resources/payment_link.rb +84 -15
  66. data/lib/stripe/resources/payment_method.rb +74 -187
  67. data/lib/stripe/resources/payment_method_configuration.rb +87 -214
  68. data/lib/stripe/resources/payment_method_domain.rb +9 -18
  69. data/lib/stripe/resources/payout.rb +0 -9
  70. data/lib/stripe/resources/person.rb +9 -9
  71. data/lib/stripe/resources/plan.rb +0 -15
  72. data/lib/stripe/resources/price.rb +2 -47
  73. data/lib/stripe/resources/product.rb +0 -68
  74. data/lib/stripe/resources/promotion_code.rb +0 -9
  75. data/lib/stripe/resources/quote.rb +8 -2037
  76. data/lib/stripe/resources/radar/early_fraud_warning.rb +0 -9
  77. data/lib/stripe/resources/radar/value_list.rb +0 -9
  78. data/lib/stripe/resources/radar/value_list_item.rb +0 -9
  79. data/lib/stripe/resources/refund.rb +13 -18
  80. data/lib/stripe/resources/reporting/report_run.rb +0 -9
  81. data/lib/stripe/resources/reporting/report_type.rb +0 -9
  82. data/lib/stripe/resources/review.rb +2 -11
  83. data/lib/stripe/resources/setup_attempt.rb +11 -16
  84. data/lib/stripe/resources/setup_intent.rb +158 -540
  85. data/lib/stripe/resources/shipping_rate.rb +0 -9
  86. data/lib/stripe/resources/sigma/scheduled_query_run.rb +0 -9
  87. data/lib/stripe/resources/source.rb +0 -41
  88. data/lib/stripe/resources/subscription.rb +14 -385
  89. data/lib/stripe/resources/subscription_item.rb +9 -134
  90. data/lib/stripe/resources/subscription_schedule.rb +14 -1135
  91. data/lib/stripe/resources/tax/calculation.rb +0 -9
  92. data/lib/stripe/resources/tax/registration.rb +1 -10
  93. data/lib/stripe/resources/tax/settings.rb +0 -9
  94. data/lib/stripe/resources/tax/transaction.rb +0 -9
  95. data/lib/stripe/resources/tax_code.rb +0 -9
  96. data/lib/stripe/resources/tax_id.rb +0 -9
  97. data/lib/stripe/resources/tax_rate.rb +0 -9
  98. data/lib/stripe/resources/terminal/configuration.rb +214 -14
  99. data/lib/stripe/resources/terminal/location.rb +0 -9
  100. data/lib/stripe/resources/terminal/reader.rb +0 -408
  101. data/lib/stripe/resources/test_helpers/test_clock.rb +0 -9
  102. data/lib/stripe/resources/token.rb +1 -10
  103. data/lib/stripe/resources/topup.rb +0 -9
  104. data/lib/stripe/resources/transfer.rb +0 -9
  105. data/lib/stripe/resources/treasury/credit_reversal.rb +0 -9
  106. data/lib/stripe/resources/treasury/debit_reversal.rb +0 -9
  107. data/lib/stripe/resources/treasury/financial_account.rb +4 -32
  108. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
  109. data/lib/stripe/resources/treasury/inbound_transfer.rb +0 -9
  110. data/lib/stripe/resources/treasury/outbound_payment.rb +0 -9
  111. data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -46
  112. data/lib/stripe/resources/treasury/received_credit.rb +1 -47
  113. data/lib/stripe/resources/treasury/received_debit.rb +1 -49
  114. data/lib/stripe/resources/treasury/transaction.rb +0 -9
  115. data/lib/stripe/resources/treasury/transaction_entry.rb +0 -9
  116. data/lib/stripe/resources/v2/event.rb +1 -0
  117. data/lib/stripe/resources/v2/event_destination.rb +1 -0
  118. data/lib/stripe/resources/webhook_endpoint.rb +0 -9
  119. data/lib/stripe/resources.rb +0 -25
  120. data/lib/stripe/services/account_external_account_service.rb +1 -1
  121. data/lib/stripe/services/account_service.rb +68 -509
  122. data/lib/stripe/services/account_session_service.rb +1 -217
  123. data/lib/stripe/services/balance_transaction_service.rb +1 -1
  124. data/lib/stripe/services/billing/credit_balance_summary_service.rb +2 -2
  125. data/lib/stripe/services/billing/credit_grant_service.rb +2 -2
  126. data/lib/stripe/services/billing/meter_service.rb +1 -1
  127. data/lib/stripe/services/charge_service.rb +1 -1335
  128. data/lib/stripe/services/checkout/session_service.rb +60 -168
  129. data/lib/stripe/services/credit_note_preview_lines_service.rb +0 -4
  130. data/lib/stripe/services/credit_note_service.rb +0 -8
  131. data/lib/stripe/services/customer_service.rb +0 -16
  132. data/lib/stripe/services/financial_connections/account_service.rb +1 -3
  133. data/lib/stripe/services/financial_connections/session_service.rb +1 -30
  134. data/lib/stripe/services/financial_connections_service.rb +1 -2
  135. data/lib/stripe/services/invoice_item_service.rb +34 -88
  136. data/lib/stripe/services/invoice_line_item_service.rb +25 -41
  137. data/lib/stripe/services/invoice_payment_service.rb +33 -5
  138. data/lib/stripe/services/invoice_service.rb +210 -3147
  139. data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
  140. data/lib/stripe/services/issuing/transaction_service.rb +0 -4
  141. data/lib/stripe/services/issuing_service.rb +1 -5
  142. data/lib/stripe/services/payment_intent_service.rb +568 -4513
  143. data/lib/stripe/services/payment_link_service.rb +59 -6
  144. data/lib/stripe/services/payment_method_configuration_service.rb +62 -146
  145. data/lib/stripe/services/payment_method_domain_service.rb +6 -6
  146. data/lib/stripe/services/payment_method_service.rb +49 -119
  147. data/lib/stripe/services/plan_service.rb +0 -4
  148. data/lib/stripe/services/price_service.rb +2 -25
  149. data/lib/stripe/services/product_service.rb +0 -38
  150. data/lib/stripe/services/quote_service.rb +9 -1716
  151. data/lib/stripe/services/setup_intent_service.rb +158 -492
  152. data/lib/stripe/services/subscription_item_service.rb +5 -111
  153. data/lib/stripe/services/subscription_schedule_service.rb +14 -1005
  154. data/lib/stripe/services/subscription_service.rb +13 -323
  155. data/lib/stripe/services/tax/registration_service.rb +1 -1
  156. data/lib/stripe/services/tax_service.rb +1 -3
  157. data/lib/stripe/services/terminal/configuration_service.rb +170 -4
  158. data/lib/stripe/services/terminal/reader_service.rb +0 -177
  159. data/lib/stripe/services/terminal_service.rb +1 -2
  160. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +49 -87
  161. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -43
  162. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
  163. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
  164. data/lib/stripe/services/token_service.rb +1 -1
  165. data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
  166. data/lib/stripe/services/treasury/financial_account_service.rb +3 -17
  167. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
  168. data/lib/stripe/services/v1_services.rb +2 -8
  169. data/lib/stripe/services/v2/core/event_destination_service.rb +1 -4
  170. data/lib/stripe/services/v2/core/event_service.rb +1 -4
  171. data/lib/stripe/services.rb +0 -27
  172. data/lib/stripe/stripe_client.rb +1 -0
  173. data/lib/stripe/stripe_configuration.rb +1 -3
  174. data/lib/stripe/util.rb +1 -7
  175. data/lib/stripe/version.rb +1 -1
  176. data/lib/stripe.rb +0 -45
  177. data/rbi/stripe/resources/account.rbi +1131 -1479
  178. data/rbi/stripe/resources/account_link.rbi +9 -9
  179. data/rbi/stripe/resources/account_session.rbi +118 -367
  180. data/rbi/stripe/resources/apple_pay_domain.rbi +8 -15
  181. data/rbi/stripe/resources/application_fee.rbi +15 -20
  182. data/rbi/stripe/resources/apps/secret.rbi +20 -20
  183. data/rbi/stripe/resources/balance.rbi +0 -7
  184. data/rbi/stripe/resources/balance_transaction.rbi +19 -24
  185. data/rbi/stripe/resources/bank_account.rbi +1 -1
  186. data/rbi/stripe/resources/billing/alert.rbi +23 -28
  187. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -53
  188. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +6 -13
  189. data/rbi/stripe/resources/billing/credit_grant.rbi +30 -37
  190. data/rbi/stripe/resources/billing/meter.rbi +19 -26
  191. data/rbi/stripe/resources/billing/meter_event.rbi +4 -4
  192. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +5 -5
  193. data/rbi/stripe/resources/billing_portal/configuration.rbi +86 -81
  194. data/rbi/stripe/resources/billing_portal/session.rbi +31 -27
  195. data/rbi/stripe/resources/card.rbi +2 -5
  196. data/rbi/stripe/resources/charge.rbi +136 -1576
  197. data/rbi/stripe/resources/checkout/session.rbi +631 -748
  198. data/rbi/stripe/resources/climate/order.rbi +20 -25
  199. data/rbi/stripe/resources/climate/product.rbi +5 -12
  200. data/rbi/stripe/resources/climate/supplier.rbi +5 -12
  201. data/rbi/stripe/resources/confirmation_token.rbi +274 -268
  202. data/rbi/stripe/resources/country_spec.rbi +5 -12
  203. data/rbi/stripe/resources/coupon.rbi +34 -39
  204. data/rbi/stripe/resources/credit_note.rbi +134 -146
  205. data/rbi/stripe/resources/credit_note_line_item.rbi +20 -18
  206. data/rbi/stripe/resources/customer.rbi +172 -164
  207. data/rbi/stripe/resources/customer_balance_transaction.rbi +4 -1
  208. data/rbi/stripe/resources/customer_session.rbi +19 -15
  209. data/rbi/stripe/resources/dispute.rbi +92 -95
  210. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +5 -12
  211. data/rbi/stripe/resources/entitlements/feature.rbi +15 -22
  212. data/rbi/stripe/resources/ephemeral_key.rbi +2 -2
  213. data/rbi/stripe/resources/event.rbi +16 -60
  214. data/rbi/stripe/resources/exchange_rate.rbi +5 -12
  215. data/rbi/stripe/resources/file.rbi +20 -25
  216. data/rbi/stripe/resources/file_link.rbi +23 -28
  217. data/rbi/stripe/resources/financial_connections/account.rbi +25 -44
  218. data/rbi/stripe/resources/financial_connections/session.rbi +12 -75
  219. data/rbi/stripe/resources/financial_connections/transaction.rbi +16 -19
  220. data/rbi/stripe/resources/forwarding/request.rbi +21 -24
  221. data/rbi/stripe/resources/identity/verification_report.rbi +18 -21
  222. data/rbi/stripe/resources/identity/verification_session.rbi +60 -61
  223. data/rbi/stripe/resources/invoice.rbi +723 -5918
  224. data/rbi/stripe/resources/invoice_item.rbi +138 -177
  225. data/rbi/stripe/resources/invoice_line_item.rbi +199 -264
  226. data/rbi/stripe/resources/invoice_payment.rbi +51 -7
  227. data/rbi/stripe/resources/invoice_rendering_template.rbi +10 -20
  228. data/rbi/stripe/resources/issuing/authorization.rbi +216 -199
  229. data/rbi/stripe/resources/issuing/card.rbi +104 -101
  230. data/rbi/stripe/resources/issuing/cardholder.rbi +120 -108
  231. data/rbi/stripe/resources/issuing/dispute.rbi +164 -151
  232. data/rbi/stripe/resources/issuing/personalization_design.rbi +61 -56
  233. data/rbi/stripe/resources/issuing/physical_bundle.rbi +7 -14
  234. data/rbi/stripe/resources/issuing/token.rbi +16 -21
  235. data/rbi/stripe/resources/issuing/transaction.rbi +180 -176
  236. data/rbi/stripe/resources/line_item.rbi +0 -36
  237. data/rbi/stripe/resources/mandate.rbi +8 -40
  238. data/rbi/stripe/resources/payment_intent.rbi +2252 -6482
  239. data/rbi/stripe/resources/payment_link.rbi +346 -211
  240. data/rbi/stripe/resources/payment_method.rbi +226 -330
  241. data/rbi/stripe/resources/payment_method_configuration.rbi +602 -685
  242. data/rbi/stripe/resources/payment_method_domain.rbi +26 -31
  243. data/rbi/stripe/resources/payout.rbi +43 -42
  244. data/rbi/stripe/resources/person.rbi +9 -9
  245. data/rbi/stripe/resources/plan.rbi +51 -63
  246. data/rbi/stripe/resources/price.rbi +114 -151
  247. data/rbi/stripe/resources/product.rbi +90 -152
  248. data/rbi/stripe/resources/promotion_code.rbi +42 -47
  249. data/rbi/stripe/resources/quote.rbi +168 -2231
  250. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +17 -20
  251. data/rbi/stripe/resources/radar/value_list.rbi +24 -29
  252. data/rbi/stripe/resources/radar/value_list_item.rbi +18 -21
  253. data/rbi/stripe/resources/refund.rbi +52 -51
  254. data/rbi/stripe/resources/reporting/report_run.rbi +27 -30
  255. data/rbi/stripe/resources/reporting/report_type.rbi +2 -9
  256. data/rbi/stripe/resources/review.rbi +17 -22
  257. data/rbi/stripe/resources/setup_attempt.rbi +25 -32
  258. data/rbi/stripe/resources/setup_intent.rbi +900 -1102
  259. data/rbi/stripe/resources/shipping_rate.rbi +41 -46
  260. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +5 -12
  261. data/rbi/stripe/resources/source.rbi +132 -179
  262. data/rbi/stripe/resources/subscription.rbi +363 -707
  263. data/rbi/stripe/resources/subscription_item.rbi +69 -177
  264. data/rbi/stripe/resources/subscription_schedule.rbi +289 -1447
  265. data/rbi/stripe/resources/tax/calculation.rbi +43 -48
  266. data/rbi/stripe/resources/tax/registration.rbi +217 -170
  267. data/rbi/stripe/resources/tax/settings.rbi +14 -21
  268. data/rbi/stripe/resources/tax/transaction.rbi +20 -25
  269. data/rbi/stripe/resources/tax_code.rbi +5 -12
  270. data/rbi/stripe/resources/tax_id.rbi +15 -22
  271. data/rbi/stripe/resources/tax_rate.rbi +34 -39
  272. data/rbi/stripe/resources/terminal/configuration.rbi +457 -212
  273. data/rbi/stripe/resources/terminal/connection_token.rbi +3 -3
  274. data/rbi/stripe/resources/terminal/location.rbi +28 -35
  275. data/rbi/stripe/resources/terminal/reader.rbi +71 -441
  276. data/rbi/stripe/resources/test_helpers/test_clock.rbi +12 -17
  277. data/rbi/stripe/resources/token.rbi +288 -263
  278. data/rbi/stripe/resources/topup.rbi +35 -38
  279. data/rbi/stripe/resources/transfer.rbi +27 -32
  280. data/rbi/stripe/resources/treasury/credit_reversal.rbi +10 -17
  281. data/rbi/stripe/resources/treasury/debit_reversal.rbi +11 -18
  282. data/rbi/stripe/resources/treasury/financial_account.rbi +125 -130
  283. data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -3
  284. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +22 -29
  285. data/rbi/stripe/resources/treasury/outbound_payment.rbi +82 -79
  286. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +44 -86
  287. data/rbi/stripe/resources/treasury/received_credit.rbi +18 -64
  288. data/rbi/stripe/resources/treasury/received_debit.rbi +17 -66
  289. data/rbi/stripe/resources/treasury/transaction.rbi +27 -28
  290. data/rbi/stripe/resources/treasury/transaction_entry.rbi +25 -26
  291. data/rbi/stripe/resources/v2/amount.rbi +1 -1
  292. data/rbi/stripe/resources/v2/event.rbi +1 -0
  293. data/rbi/stripe/resources/v2/event_destination.rbi +1 -0
  294. data/rbi/stripe/resources/webhook_endpoint.rbi +18 -25
  295. data/rbi/stripe/services/account_capability_service.rbi +7 -7
  296. data/rbi/stripe/services/account_external_account_service.rbi +52 -52
  297. data/rbi/stripe/services/account_link_service.rbi +9 -9
  298. data/rbi/stripe/services/account_login_link_service.rbi +2 -2
  299. data/rbi/stripe/services/account_person_service.rbi +221 -201
  300. data/rbi/stripe/services/account_service.rbi +1221 -1345
  301. data/rbi/stripe/services/account_session_service.rbi +115 -346
  302. data/rbi/stripe/services/apple_pay_domain_service.rbi +10 -10
  303. data/rbi/stripe/services/application_fee_refund_service.rbi +16 -14
  304. data/rbi/stripe/services/application_fee_service.rbi +18 -14
  305. data/rbi/stripe/services/apps/secret_service.rbi +20 -20
  306. data/rbi/stripe/services/balance_service.rbi +2 -2
  307. data/rbi/stripe/services/balance_transaction_service.rbi +22 -18
  308. data/rbi/stripe/services/billing/alert_service.rbi +23 -23
  309. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +10 -10
  310. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +8 -8
  311. data/rbi/stripe/services/billing/credit_grant_service.rbi +32 -30
  312. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +7 -5
  313. data/rbi/stripe/services/billing/meter_event_service.rbi +4 -4
  314. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +6 -6
  315. data/rbi/stripe/services/billing/meter_service.rbi +21 -21
  316. data/rbi/stripe/services/billing_portal/configuration_service.rbi +90 -76
  317. data/rbi/stripe/services/billing_portal/session_service.rbi +29 -27
  318. data/rbi/stripe/services/charge_service.rbi +96 -1464
  319. data/rbi/stripe/services/checkout/session_line_item_service.rbi +5 -5
  320. data/rbi/stripe/services/checkout/session_service.rbi +555 -591
  321. data/rbi/stripe/services/climate/order_service.rbi +22 -20
  322. data/rbi/stripe/services/climate/product_service.rbi +7 -7
  323. data/rbi/stripe/services/climate/supplier_service.rbi +7 -7
  324. data/rbi/stripe/services/confirmation_token_service.rbi +2 -2
  325. data/rbi/stripe/services/country_spec_service.rbi +7 -7
  326. data/rbi/stripe/services/coupon_service.rbi +40 -34
  327. data/rbi/stripe/services/credit_note_line_item_service.rbi +5 -5
  328. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +35 -35
  329. data/rbi/stripe/services/credit_note_service.rbi +81 -85
  330. data/rbi/stripe/services/customer_balance_transaction_service.rbi +15 -15
  331. data/rbi/stripe/services/customer_cash_balance_service.rbi +7 -7
  332. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +7 -7
  333. data/rbi/stripe/services/customer_funding_instructions_service.rbi +5 -5
  334. data/rbi/stripe/services/customer_payment_method_service.rbi +9 -9
  335. data/rbi/stripe/services/customer_payment_source_service.rbi +48 -44
  336. data/rbi/stripe/services/customer_service.rbi +143 -139
  337. data/rbi/stripe/services/customer_session_service.rbi +21 -15
  338. data/rbi/stripe/services/customer_tax_id_service.rbi +9 -9
  339. data/rbi/stripe/services/dispute_service.rbi +92 -90
  340. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +7 -7
  341. data/rbi/stripe/services/entitlements/feature_service.rbi +17 -17
  342. data/rbi/stripe/services/ephemeral_key_service.rbi +8 -8
  343. data/rbi/stripe/services/event_service.rbi +18 -16
  344. data/rbi/stripe/services/exchange_rate_service.rbi +7 -7
  345. data/rbi/stripe/services/file_link_service.rbi +25 -23
  346. data/rbi/stripe/services/file_service.rbi +22 -20
  347. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +5 -5
  348. data/rbi/stripe/services/financial_connections/account_service.rbi +22 -21
  349. data/rbi/stripe/services/financial_connections/session_service.rbi +16 -39
  350. data/rbi/stripe/services/financial_connections/transaction_service.rbi +16 -14
  351. data/rbi/stripe/services/financial_connections_service.rbi +0 -1
  352. data/rbi/stripe/services/forwarding/request_service.rbi +21 -19
  353. data/rbi/stripe/services/identity/verification_report_service.rbi +18 -16
  354. data/rbi/stripe/services/identity/verification_session_service.rbi +62 -56
  355. data/rbi/stripe/services/invoice_item_service.rbi +99 -155
  356. data/rbi/stripe/services/invoice_line_item_service.rbi +71 -82
  357. data/rbi/stripe/services/invoice_payment_service.rbi +39 -12
  358. data/rbi/stripe/services/invoice_rendering_template_service.rbi +13 -13
  359. data/rbi/stripe/services/invoice_service.rbi +679 -3799
  360. data/rbi/stripe/services/issuing/authorization_service.rbi +32 -26
  361. data/rbi/stripe/services/issuing/card_service.rbi +102 -86
  362. data/rbi/stripe/services/issuing/cardholder_service.rbi +122 -103
  363. data/rbi/stripe/services/issuing/dispute_service.rbi +152 -146
  364. data/rbi/stripe/services/issuing/personalization_design_service.rbi +52 -42
  365. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +9 -9
  366. data/rbi/stripe/services/issuing/token_service.rbi +20 -16
  367. data/rbi/stripe/services/issuing/transaction_service.rbi +25 -23
  368. data/rbi/stripe/services/issuing_service.rbi +0 -3
  369. data/rbi/stripe/services/mandate_service.rbi +2 -2
  370. data/rbi/stripe/services/payment_intent_service.rbi +2312 -6081
  371. data/rbi/stripe/services/payment_link_line_item_service.rbi +5 -5
  372. data/rbi/stripe/services/payment_link_service.rbi +303 -201
  373. data/rbi/stripe/services/payment_method_configuration_service.rbi +616 -620
  374. data/rbi/stripe/services/payment_method_domain_service.rbi +25 -23
  375. data/rbi/stripe/services/payment_method_service.rbi +192 -249
  376. data/rbi/stripe/services/payout_service.rbi +45 -37
  377. data/rbi/stripe/services/plan_service.rbi +53 -55
  378. data/rbi/stripe/services/price_service.rbi +124 -129
  379. data/rbi/stripe/services/product_feature_service.rbi +9 -9
  380. data/rbi/stripe/services/product_service.rbi +94 -122
  381. data/rbi/stripe/services/promotion_code_service.rbi +46 -42
  382. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +5 -5
  383. data/rbi/stripe/services/quote_line_item_service.rbi +5 -5
  384. data/rbi/stripe/services/quote_service.rbi +159 -1863
  385. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +17 -15
  386. data/rbi/stripe/services/radar/value_list_item_service.rbi +20 -16
  387. data/rbi/stripe/services/radar/value_list_service.rbi +28 -24
  388. data/rbi/stripe/services/refund_service.rbi +37 -33
  389. data/rbi/stripe/services/reporting/report_run_service.rbi +29 -25
  390. data/rbi/stripe/services/reporting/report_type_service.rbi +4 -4
  391. data/rbi/stripe/services/review_service.rbi +17 -15
  392. data/rbi/stripe/services/setup_attempt_service.rbi +13 -11
  393. data/rbi/stripe/services/setup_intent_service.rbi +1028 -1062
  394. data/rbi/stripe/services/shipping_rate_service.rbi +47 -41
  395. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +7 -7
  396. data/rbi/stripe/services/source_service.rbi +149 -133
  397. data/rbi/stripe/services/source_transaction_service.rbi +5 -5
  398. data/rbi/stripe/services/subscription_item_service.rbi +61 -159
  399. data/rbi/stripe/services/subscription_schedule_service.rbi +289 -1305
  400. data/rbi/stripe/services/subscription_service.rbi +366 -640
  401. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +5 -5
  402. data/rbi/stripe/services/tax/calculation_service.rbi +40 -38
  403. data/rbi/stripe/services/tax/registration_service.rbi +337 -165
  404. data/rbi/stripe/services/tax/settings_service.rbi +16 -16
  405. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +5 -5
  406. data/rbi/stripe/services/tax/transaction_service.rbi +19 -15
  407. data/rbi/stripe/services/tax_code_service.rbi +7 -7
  408. data/rbi/stripe/services/tax_id_service.rbi +17 -17
  409. data/rbi/stripe/services/tax_rate_service.rbi +36 -34
  410. data/rbi/stripe/services/tax_service.rbi +0 -2
  411. data/rbi/stripe/services/terminal/configuration_service.rbi +464 -204
  412. data/rbi/stripe/services/terminal/connection_token_service.rbi +3 -3
  413. data/rbi/stripe/services/terminal/location_service.rbi +30 -30
  414. data/rbi/stripe/services/terminal/reader_service.rbi +57 -226
  415. data/rbi/stripe/services/terminal_service.rbi +0 -1
  416. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +157 -198
  417. data/rbi/stripe/services/test_helpers/customer_service.rbi +3 -3
  418. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +180 -168
  419. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +10 -10
  420. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +11 -9
  421. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +151 -145
  422. data/rbi/stripe/services/test_helpers/refund_service.rbi +2 -2
  423. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +10 -39
  424. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +14 -12
  425. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +9 -9
  426. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +20 -18
  427. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +20 -18
  428. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +11 -38
  429. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +11 -38
  430. data/rbi/stripe/services/token_service.rbi +292 -258
  431. data/rbi/stripe/services/topup_service.rbi +37 -33
  432. data/rbi/stripe/services/transfer_reversal_service.rbi +18 -16
  433. data/rbi/stripe/services/transfer_service.rbi +29 -27
  434. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +12 -12
  435. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +13 -13
  436. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +23 -26
  437. data/rbi/stripe/services/treasury/financial_account_service.rbi +92 -96
  438. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +15 -15
  439. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +60 -56
  440. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +24 -49
  441. data/rbi/stripe/services/treasury/received_credit_service.rbi +11 -9
  442. data/rbi/stripe/services/treasury/received_debit_service.rbi +8 -8
  443. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +25 -21
  444. data/rbi/stripe/services/treasury/transaction_service.rbi +31 -23
  445. data/rbi/stripe/services/v1_services.rbi +1 -7
  446. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +3 -3
  447. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +3 -3
  448. data/rbi/stripe/services/v2/core/event_destination_service.rbi +21 -24
  449. data/rbi/stripe/services/v2/core/event_service.rbi +3 -6
  450. data/rbi/stripe/services/webhook_endpoint_service.rbi +20 -20
  451. metadata +4 -109
  452. data/lib/stripe/request_signing_authenticator.rb +0 -79
  453. data/lib/stripe/resources/account_notice.rb +0 -132
  454. data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
  455. data/lib/stripe/resources/capital/financing_offer.rb +0 -188
  456. data/lib/stripe/resources/capital/financing_summary.rb +0 -64
  457. data/lib/stripe/resources/capital/financing_transaction.rb +0 -123
  458. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  459. data/lib/stripe/resources/financial_connections/institution.rb +0 -99
  460. data/lib/stripe/resources/gift_cards/card.rb +0 -217
  461. data/lib/stripe/resources/gift_cards/transaction.rb +0 -281
  462. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -611
  463. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -84
  464. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -95
  465. data/lib/stripe/resources/issuing/settlement.rb +0 -49
  466. data/lib/stripe/resources/margin.rb +0 -124
  467. data/lib/stripe/resources/order.rb +0 -2868
  468. data/lib/stripe/resources/payment_attempt_record.rb +0 -184
  469. data/lib/stripe/resources/payment_record.rb +0 -715
  470. data/lib/stripe/resources/quote_line.rb +0 -274
  471. data/lib/stripe/resources/quote_preview_invoice.rb +0 -652
  472. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -362
  473. data/lib/stripe/resources/tax/association.rb +0 -89
  474. data/lib/stripe/resources/tax/form.rb +0 -220
  475. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -40
  476. data/lib/stripe/resources/usage_record.rb +0 -30
  477. data/lib/stripe/resources/usage_record_summary.rb +0 -33
  478. data/lib/stripe/services/account_notice_service.rb +0 -101
  479. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  480. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  481. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  482. data/lib/stripe/services/capital_service.rb +0 -15
  483. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -37
  484. data/lib/stripe/services/financial_connections/institution_service.rb +0 -57
  485. data/lib/stripe/services/gift_cards/card_service.rb +0 -170
  486. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
  487. data/lib/stripe/services/gift_cards_service.rb +0 -14
  488. data/lib/stripe/services/invoice_upcoming_lines_service.rb +0 -1881
  489. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  490. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  491. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  492. data/lib/stripe/services/margin_service.rb +0 -119
  493. data/lib/stripe/services/order_line_item_service.rb +0 -35
  494. data/lib/stripe/services/order_service.rb +0 -2268
  495. data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
  496. data/lib/stripe/services/payment_record_service.rb +0 -542
  497. data/lib/stripe/services/quote_line_service.rb +0 -35
  498. data/lib/stripe/services/quote_preview_invoice_service.rb +0 -35
  499. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
  500. data/lib/stripe/services/subscription_item_usage_record_service.rb +0 -41
  501. data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +0 -37
  502. data/lib/stripe/services/tax/association_service.rb +0 -31
  503. data/lib/stripe/services/tax/form_service.rb +0 -100
  504. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  505. data/rbi/stripe/resources/account_notice.rbi +0 -139
  506. data/rbi/stripe/resources/billing/meter_error_report.rbi +0 -71
  507. data/rbi/stripe/resources/capital/financing_offer.rbi +0 -190
  508. data/rbi/stripe/resources/capital/financing_summary.rbi +0 -74
  509. data/rbi/stripe/resources/capital/financing_transaction.rbi +0 -130
  510. data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +0 -27
  511. data/rbi/stripe/resources/financial_connections/institution.rbi +0 -99
  512. data/rbi/stripe/resources/gift_cards/card.rbi +0 -206
  513. data/rbi/stripe/resources/gift_cards/transaction.rbi +0 -257
  514. data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +0 -622
  515. data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +0 -83
  516. data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +0 -90
  517. data/rbi/stripe/resources/issuing/settlement.rbi +0 -62
  518. data/rbi/stripe/resources/margin.rbi +0 -127
  519. data/rbi/stripe/resources/order.rbi +0 -3036
  520. data/rbi/stripe/resources/payment_attempt_record.rbi +0 -215
  521. data/rbi/stripe/resources/payment_record.rbi +0 -722
  522. data/rbi/stripe/resources/quote_line.rbi +0 -350
  523. data/rbi/stripe/resources/quote_preview_invoice.rbi +0 -850
  524. data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +0 -474
  525. data/rbi/stripe/resources/tax/association.rbi +0 -94
  526. data/rbi/stripe/resources/tax/form.rbi +0 -224
  527. data/rbi/stripe/resources/terminal/reader_collected_data.rbi +0 -41
  528. data/rbi/stripe/resources/usage_record.rbi +0 -32
  529. data/rbi/stripe/resources/usage_record_summary.rbi +0 -38
  530. data/rbi/stripe/services/account_notice_service.rbi +0 -90
  531. data/rbi/stripe/services/capital/financing_offer_service.rbi +0 -95
  532. data/rbi/stripe/services/capital/financing_summary_service.rbi +0 -22
  533. data/rbi/stripe/services/capital/financing_transaction_service.rbi +0 -68
  534. data/rbi/stripe/services/capital_service.rbi +0 -11
  535. data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +0 -33
  536. data/rbi/stripe/services/financial_connections/institution_service.rbi +0 -46
  537. data/rbi/stripe/services/gift_cards/card_service.rbi +0 -142
  538. data/rbi/stripe/services/gift_cards/transaction_service.rbi +0 -174
  539. data/rbi/stripe/services/gift_cards_service.rbi +0 -10
  540. data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +0 -2023
  541. data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +0 -498
  542. data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +0 -55
  543. data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +0 -73
  544. data/rbi/stripe/services/margin_service.rbi +0 -104
  545. data/rbi/stripe/services/order_line_item_service.rbi +0 -31
  546. data/rbi/stripe/services/order_service.rbi +0 -2320
  547. data/rbi/stripe/services/payment_attempt_record_service.rbi +0 -36
  548. data/rbi/stripe/services/payment_record_service.rbi +0 -521
  549. data/rbi/stripe/services/quote_line_service.rbi +0 -31
  550. data/rbi/stripe/services/quote_preview_invoice_service.rbi +0 -31
  551. data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +0 -31
  552. data/rbi/stripe/services/subscription_item_usage_record_service.rbi +0 -37
  553. data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +0 -33
  554. data/rbi/stripe/services/tax/association_service.rbi +0 -25
  555. data/rbi/stripe/services/tax/form_service.rbi +0 -85
  556. data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +0 -22
@@ -38,13 +38,6 @@ module Stripe
38
38
  attr_reader :liability
39
39
  end
40
40
 
41
- class BillingThresholds < Stripe::StripeObject
42
- # Monetary threshold that triggers the subscription to create an invoice
43
- attr_reader :amount_gte
44
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
45
- attr_reader :reset_billing_cycle_anchor
46
- end
47
-
48
41
  class InvoiceSettings < Stripe::StripeObject
49
42
  class Issuer < Stripe::StripeObject
50
43
  # The connected account being referenced when `type` is `account`.
@@ -72,8 +65,6 @@ module Stripe
72
65
  attr_reader :automatic_tax
73
66
  # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
74
67
  attr_reader :billing_cycle_anchor
75
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
76
- attr_reader :billing_thresholds
77
68
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
78
69
  attr_reader :collection_method
79
70
  # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
@@ -88,36 +79,13 @@ module Stripe
88
79
  attr_reader :transfer_data
89
80
  end
90
81
 
91
- class LastPriceMigrationError < Stripe::StripeObject
92
- class FailedTransition < Stripe::StripeObject
93
- # The original price to be migrated.
94
- attr_reader :source_price
95
- # The intended resulting price of the migration.
96
- attr_reader :target_price
97
- end
98
- # The time at which the price migration encountered an error.
99
- attr_reader :errored_at
100
- # The involved price pairs in each failed transition.
101
- attr_reader :failed_transitions
102
- # The type of error encountered by the price migration.
103
- attr_reader :type
104
- end
105
-
106
82
  class Phase < Stripe::StripeObject
107
83
  class AddInvoiceItem < Stripe::StripeObject
108
84
  class Discount < Stripe::StripeObject
109
- class DiscountEnd < Stripe::StripeObject
110
- # The discount end timestamp.
111
- attr_reader :timestamp
112
- # The discount end type.
113
- attr_reader :type
114
- end
115
85
  # ID of the coupon to create a new discount for.
116
86
  attr_reader :coupon
117
87
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
118
88
  attr_reader :discount
119
- # Details to determine how long the discount should be applied for.
120
- attr_reader :discount_end
121
89
  # ID of the promotion code to create a new discount for.
122
90
  attr_reader :promotion_code
123
91
  end
@@ -146,26 +114,11 @@ module Stripe
146
114
  attr_reader :liability
147
115
  end
148
116
 
149
- class BillingThresholds < Stripe::StripeObject
150
- # Monetary threshold that triggers the subscription to create an invoice
151
- attr_reader :amount_gte
152
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
153
- attr_reader :reset_billing_cycle_anchor
154
- end
155
-
156
117
  class Discount < Stripe::StripeObject
157
- class DiscountEnd < Stripe::StripeObject
158
- # The discount end timestamp.
159
- attr_reader :timestamp
160
- # The discount end type.
161
- attr_reader :type
162
- end
163
118
  # ID of the coupon to create a new discount for.
164
119
  attr_reader :coupon
165
120
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
166
121
  attr_reader :discount
167
- # Details to determine how long the discount should be applied for.
168
- attr_reader :discount_end
169
122
  # ID of the promotion code to create a new discount for.
170
123
  attr_reader :promotion_code
171
124
  end
@@ -186,36 +139,14 @@ module Stripe
186
139
  end
187
140
 
188
141
  class Item < Stripe::StripeObject
189
- class BillingThresholds < Stripe::StripeObject
190
- # Usage threshold that triggers the subscription to create an invoice
191
- attr_reader :usage_gte
192
- end
193
-
194
142
  class Discount < Stripe::StripeObject
195
- class DiscountEnd < Stripe::StripeObject
196
- # The discount end timestamp.
197
- attr_reader :timestamp
198
- # The discount end type.
199
- attr_reader :type
200
- end
201
143
  # ID of the coupon to create a new discount for.
202
144
  attr_reader :coupon
203
145
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
204
146
  attr_reader :discount
205
- # Details to determine how long the discount should be applied for.
206
- attr_reader :discount_end
207
147
  # ID of the promotion code to create a new discount for.
208
148
  attr_reader :promotion_code
209
149
  end
210
-
211
- class Trial < Stripe::StripeObject
212
- # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial.
213
- attr_reader :converts_to
214
- # Determines the type of trial for this item.
215
- attr_reader :type
216
- end
217
- # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
218
- attr_reader :billing_thresholds
219
150
  # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
220
151
  attr_reader :discounts
221
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.
@@ -228,13 +159,6 @@ module Stripe
228
159
  attr_reader :quantity
229
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`.
230
161
  attr_reader :tax_rates
231
- # Options that configure the trial on the subscription item.
232
- attr_reader :trial
233
- end
234
-
235
- class PauseCollection < Stripe::StripeObject
236
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
237
- attr_reader :behavior
238
162
  end
239
163
 
240
164
  class TransferData < Stripe::StripeObject
@@ -243,15 +167,6 @@ module Stripe
243
167
  # The account where funds from the payment will be transferred to upon payment success.
244
168
  attr_reader :destination
245
169
  end
246
-
247
- class TrialSettings < Stripe::StripeObject
248
- class EndBehavior < Stripe::StripeObject
249
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
250
- attr_reader :prorate_up_front
251
- end
252
- # Defines how the subscription should behave when a trial ends.
253
- attr_reader :end_behavior
254
- end
255
170
  # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
256
171
  attr_reader :add_invoice_items
257
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.
@@ -260,12 +175,8 @@ module Stripe
260
175
  attr_reader :automatic_tax
261
176
  # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
262
177
  attr_reader :billing_cycle_anchor
263
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
264
- attr_reader :billing_thresholds
265
178
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
266
179
  attr_reader :collection_method
267
- # ID of the coupon to use during this phase of the subscription schedule.
268
- attr_reader :coupon
269
180
  # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
270
181
  attr_reader :currency
271
182
  # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
@@ -286,31 +197,14 @@ module Stripe
286
197
  attr_reader :metadata
287
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.
288
199
  attr_reader :on_behalf_of
289
- # 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).
290
- attr_reader :pause_collection
291
200
  # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.
292
201
  attr_reader :proration_behavior
293
202
  # The start of this phase of the subscription schedule.
294
203
  attr_reader :start_date
295
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.
296
205
  attr_reader :transfer_data
297
- # Specify behavior of the trial when crossing schedule phase boundaries
298
- attr_reader :trial_continuation
299
206
  # When the trial ends within the phase.
300
207
  attr_reader :trial_end
301
- # Settings related to any trials on the subscription during this phase.
302
- attr_reader :trial_settings
303
- end
304
-
305
- class Prebilling < Stripe::StripeObject
306
- # ID of the prebilling invoice.
307
- attr_reader :invoice
308
- # The end of the last period for which the invoice pre-bills.
309
- attr_reader :period_end
310
- # The start of the first period for which the invoice pre-bills.
311
- attr_reader :period_start
312
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
313
- attr_reader :update_behavior
314
208
  end
315
209
 
316
210
  class ListParams < Stripe::RequestParams
@@ -456,18 +350,6 @@ module Stripe
456
350
  end
457
351
  end
458
352
 
459
- class BillingThresholds < Stripe::RequestParams
460
- # Monetary threshold that triggers the subscription to advance to a new billing period
461
- attr_accessor :amount_gte
462
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
463
- attr_accessor :reset_billing_cycle_anchor
464
-
465
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
466
- @amount_gte = amount_gte
467
- @reset_billing_cycle_anchor = reset_billing_cycle_anchor
468
- end
469
- end
470
-
471
353
  class InvoiceSettings < Stripe::RequestParams
472
354
  class Issuer < Stripe::RequestParams
473
355
  # The connected account being referenced when `type` is `account`.
@@ -511,8 +393,6 @@ module Stripe
511
393
  attr_accessor :automatic_tax
512
394
  # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
513
395
  attr_accessor :billing_cycle_anchor
514
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
515
- attr_accessor :billing_thresholds
516
396
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
517
397
  attr_accessor :collection_method
518
398
  # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
@@ -530,7 +410,6 @@ module Stripe
530
410
  application_fee_percent: nil,
531
411
  automatic_tax: nil,
532
412
  billing_cycle_anchor: nil,
533
- billing_thresholds: nil,
534
413
  collection_method: nil,
535
414
  default_payment_method: nil,
536
415
  description: nil,
@@ -541,7 +420,6 @@ module Stripe
541
420
  @application_fee_percent = application_fee_percent
542
421
  @automatic_tax = automatic_tax
543
422
  @billing_cycle_anchor = billing_cycle_anchor
544
- @billing_thresholds = billing_thresholds
545
423
  @collection_method = collection_method
546
424
  @default_payment_method = default_payment_method
547
425
  @description = description
@@ -554,44 +432,16 @@ module Stripe
554
432
  class Phase < Stripe::RequestParams
555
433
  class AddInvoiceItem < Stripe::RequestParams
556
434
  class Discount < Stripe::RequestParams
557
- class DiscountEnd < Stripe::RequestParams
558
- class Duration < Stripe::RequestParams
559
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
560
- attr_accessor :interval
561
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
562
- attr_accessor :interval_count
563
-
564
- def initialize(interval: nil, interval_count: nil)
565
- @interval = interval
566
- @interval_count = interval_count
567
- end
568
- end
569
- # Time span for the redeemed discount.
570
- attr_accessor :duration
571
- # A precise Unix timestamp for the discount to end. Must be in the future.
572
- attr_accessor :timestamp
573
- # The type of calculation made to determine when the discount ends.
574
- attr_accessor :type
575
-
576
- def initialize(duration: nil, timestamp: nil, type: nil)
577
- @duration = duration
578
- @timestamp = timestamp
579
- @type = type
580
- end
581
- end
582
435
  # ID of the coupon to create a new discount for.
583
436
  attr_accessor :coupon
584
437
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
585
438
  attr_accessor :discount
586
- # Details to determine how long the discount should be applied for.
587
- attr_accessor :discount_end
588
439
  # ID of the promotion code to create a new discount for.
589
440
  attr_accessor :promotion_code
590
441
 
591
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
442
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
592
443
  @coupon = coupon
593
444
  @discount = discount
594
- @discount_end = discount_end
595
445
  @promotion_code = promotion_code
596
446
  end
597
447
  end
@@ -599,7 +449,7 @@ module Stripe
599
449
  class PriceData < Stripe::RequestParams
600
450
  # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
601
451
  attr_accessor :currency
602
- # The ID of the product that this price will belong to.
452
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
603
453
  attr_accessor :product
604
454
  # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
605
455
  attr_accessor :tax_behavior
@@ -665,57 +515,17 @@ module Stripe
665
515
  end
666
516
  end
667
517
 
668
- class BillingThresholds < Stripe::RequestParams
669
- # Monetary threshold that triggers the subscription to advance to a new billing period
670
- attr_accessor :amount_gte
671
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
672
- attr_accessor :reset_billing_cycle_anchor
673
-
674
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
675
- @amount_gte = amount_gte
676
- @reset_billing_cycle_anchor = reset_billing_cycle_anchor
677
- end
678
- end
679
-
680
518
  class Discount < Stripe::RequestParams
681
- class DiscountEnd < Stripe::RequestParams
682
- class Duration < Stripe::RequestParams
683
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
684
- attr_accessor :interval
685
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
686
- attr_accessor :interval_count
687
-
688
- def initialize(interval: nil, interval_count: nil)
689
- @interval = interval
690
- @interval_count = interval_count
691
- end
692
- end
693
- # Time span for the redeemed discount.
694
- attr_accessor :duration
695
- # A precise Unix timestamp for the discount to end. Must be in the future.
696
- attr_accessor :timestamp
697
- # The type of calculation made to determine when the discount ends.
698
- attr_accessor :type
699
-
700
- def initialize(duration: nil, timestamp: nil, type: nil)
701
- @duration = duration
702
- @timestamp = timestamp
703
- @type = type
704
- end
705
- end
706
519
  # ID of the coupon to create a new discount for.
707
520
  attr_accessor :coupon
708
521
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
709
522
  attr_accessor :discount
710
- # Details to determine how long the discount should be applied for.
711
- attr_accessor :discount_end
712
523
  # ID of the promotion code to create a new discount for.
713
524
  attr_accessor :promotion_code
714
525
 
715
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
526
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
716
527
  @coupon = coupon
717
528
  @discount = discount
718
- @discount_end = discount_end
719
529
  @promotion_code = promotion_code
720
530
  end
721
531
  end
@@ -747,54 +557,17 @@ module Stripe
747
557
  end
748
558
 
749
559
  class Item < Stripe::RequestParams
750
- class BillingThresholds < Stripe::RequestParams
751
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
752
- attr_accessor :usage_gte
753
-
754
- def initialize(usage_gte: nil)
755
- @usage_gte = usage_gte
756
- end
757
- end
758
-
759
560
  class Discount < Stripe::RequestParams
760
- class DiscountEnd < Stripe::RequestParams
761
- class Duration < Stripe::RequestParams
762
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
763
- attr_accessor :interval
764
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
765
- attr_accessor :interval_count
766
-
767
- def initialize(interval: nil, interval_count: nil)
768
- @interval = interval
769
- @interval_count = interval_count
770
- end
771
- end
772
- # Time span for the redeemed discount.
773
- attr_accessor :duration
774
- # A precise Unix timestamp for the discount to end. Must be in the future.
775
- attr_accessor :timestamp
776
- # The type of calculation made to determine when the discount ends.
777
- attr_accessor :type
778
-
779
- def initialize(duration: nil, timestamp: nil, type: nil)
780
- @duration = duration
781
- @timestamp = timestamp
782
- @type = type
783
- end
784
- end
785
561
  # ID of the coupon to create a new discount for.
786
562
  attr_accessor :coupon
787
563
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
788
564
  attr_accessor :discount
789
- # Details to determine how long the discount should be applied for.
790
- attr_accessor :discount_end
791
565
  # ID of the promotion code to create a new discount for.
792
566
  attr_accessor :promotion_code
793
567
 
794
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
568
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
795
569
  @coupon = coupon
796
570
  @discount = discount
797
- @discount_end = discount_end
798
571
  @promotion_code = promotion_code
799
572
  end
800
573
  end
@@ -813,7 +586,7 @@ module Stripe
813
586
  end
814
587
  # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
815
588
  attr_accessor :currency
816
- # The ID of the product that this price will belong to.
589
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
817
590
  attr_accessor :product
818
591
  # The recurring components of a price such as `interval` and `interval_count`.
819
592
  attr_accessor :recurring
@@ -840,20 +613,6 @@ module Stripe
840
613
  @unit_amount_decimal = unit_amount_decimal
841
614
  end
842
615
  end
843
-
844
- class Trial < Stripe::RequestParams
845
- # 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.
846
- attr_accessor :converts_to
847
- # Determines the type of trial for this item.
848
- attr_accessor :type
849
-
850
- def initialize(converts_to: nil, type: nil)
851
- @converts_to = converts_to
852
- @type = type
853
- end
854
- end
855
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
856
- attr_accessor :billing_thresholds
857
616
  # The coupons to redeem into discounts for the subscription item.
858
617
  attr_accessor :discounts
859
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`.
@@ -868,21 +627,16 @@ module Stripe
868
627
  attr_accessor :quantity
869
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.
870
629
  attr_accessor :tax_rates
871
- # Options that configure the trial on the subscription item.
872
- attr_accessor :trial
873
630
 
874
631
  def initialize(
875
- billing_thresholds: nil,
876
632
  discounts: nil,
877
633
  metadata: nil,
878
634
  plan: nil,
879
635
  price: nil,
880
636
  price_data: nil,
881
637
  quantity: nil,
882
- tax_rates: nil,
883
- trial: nil
638
+ tax_rates: nil
884
639
  )
885
- @billing_thresholds = billing_thresholds
886
640
  @discounts = discounts
887
641
  @metadata = metadata
888
642
  @plan = plan
@@ -890,16 +644,6 @@ module Stripe
890
644
  @price_data = price_data
891
645
  @quantity = quantity
892
646
  @tax_rates = tax_rates
893
- @trial = trial
894
- end
895
- end
896
-
897
- class PauseCollection < Stripe::RequestParams
898
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
899
- attr_accessor :behavior
900
-
901
- def initialize(behavior: nil)
902
- @behavior = behavior
903
647
  end
904
648
  end
905
649
 
@@ -914,23 +658,6 @@ module Stripe
914
658
  @destination = destination
915
659
  end
916
660
  end
917
-
918
- class TrialSettings < Stripe::RequestParams
919
- class EndBehavior < Stripe::RequestParams
920
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
921
- attr_accessor :prorate_up_front
922
-
923
- def initialize(prorate_up_front: nil)
924
- @prorate_up_front = prorate_up_front
925
- end
926
- end
927
- # Defines how the subscription should behave when a trial ends.
928
- attr_accessor :end_behavior
929
-
930
- def initialize(end_behavior: nil)
931
- @end_behavior = end_behavior
932
- end
933
- end
934
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.
935
662
  attr_accessor :add_invoice_items
936
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).
@@ -939,12 +666,8 @@ module Stripe
939
666
  attr_accessor :automatic_tax
940
667
  # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
941
668
  attr_accessor :billing_cycle_anchor
942
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
943
- attr_accessor :billing_thresholds
944
669
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
945
670
  attr_accessor :collection_method
946
- # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
947
- attr_accessor :coupon
948
671
  # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
949
672
  attr_accessor :currency
950
673
  # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
@@ -967,29 +690,21 @@ module Stripe
967
690
  attr_accessor :metadata
968
691
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
969
692
  attr_accessor :on_behalf_of
970
- # 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).
971
- attr_accessor :pause_collection
972
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.
973
694
  attr_accessor :proration_behavior
974
695
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
975
696
  attr_accessor :transfer_data
976
697
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
977
698
  attr_accessor :trial
978
- # Specify trial behavior when crossing phase boundaries
979
- attr_accessor :trial_continuation
980
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`
981
700
  attr_accessor :trial_end
982
- # Settings related to subscription trials.
983
- attr_accessor :trial_settings
984
701
 
985
702
  def initialize(
986
703
  add_invoice_items: nil,
987
704
  application_fee_percent: nil,
988
705
  automatic_tax: nil,
989
706
  billing_cycle_anchor: nil,
990
- billing_thresholds: nil,
991
707
  collection_method: nil,
992
- coupon: nil,
993
708
  currency: nil,
994
709
  default_payment_method: nil,
995
710
  default_tax_rates: nil,
@@ -1001,21 +716,16 @@ module Stripe
1001
716
  iterations: nil,
1002
717
  metadata: nil,
1003
718
  on_behalf_of: nil,
1004
- pause_collection: nil,
1005
719
  proration_behavior: nil,
1006
720
  transfer_data: nil,
1007
721
  trial: nil,
1008
- trial_continuation: nil,
1009
- trial_end: nil,
1010
- trial_settings: nil
722
+ trial_end: nil
1011
723
  )
1012
724
  @add_invoice_items = add_invoice_items
1013
725
  @application_fee_percent = application_fee_percent
1014
726
  @automatic_tax = automatic_tax
1015
727
  @billing_cycle_anchor = billing_cycle_anchor
1016
- @billing_thresholds = billing_thresholds
1017
728
  @collection_method = collection_method
1018
- @coupon = coupon
1019
729
  @currency = currency
1020
730
  @default_payment_method = default_payment_method
1021
731
  @default_tax_rates = default_tax_rates
@@ -1027,29 +737,12 @@ module Stripe
1027
737
  @iterations = iterations
1028
738
  @metadata = metadata
1029
739
  @on_behalf_of = on_behalf_of
1030
- @pause_collection = pause_collection
1031
740
  @proration_behavior = proration_behavior
1032
741
  @transfer_data = transfer_data
1033
742
  @trial = trial
1034
- @trial_continuation = trial_continuation
1035
743
  @trial_end = trial_end
1036
- @trial_settings = trial_settings
1037
- end
1038
- end
1039
-
1040
- class Prebilling < Stripe::RequestParams
1041
- # This is used to determine the number of billing cycles to prebill.
1042
- attr_accessor :iterations
1043
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1044
- attr_accessor :update_behavior
1045
-
1046
- def initialize(iterations: nil, update_behavior: nil)
1047
- @iterations = iterations
1048
- @update_behavior = update_behavior
1049
744
  end
1050
745
  end
1051
- # 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.
1052
- attr_accessor :billing_behavior
1053
746
  # The identifier of the customer to create the subscription schedule for.
1054
747
  attr_accessor :customer
1055
748
  # Object representing the subscription schedule's default settings.
@@ -1064,13 +757,10 @@ module Stripe
1064
757
  attr_accessor :metadata
1065
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.
1066
759
  attr_accessor :phases
1067
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
1068
- attr_accessor :prebilling
1069
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.
1070
761
  attr_accessor :start_date
1071
762
 
1072
763
  def initialize(
1073
- billing_behavior: nil,
1074
764
  customer: nil,
1075
765
  default_settings: nil,
1076
766
  end_behavior: nil,
@@ -1078,10 +768,8 @@ module Stripe
1078
768
  from_subscription: nil,
1079
769
  metadata: nil,
1080
770
  phases: nil,
1081
- prebilling: nil,
1082
771
  start_date: nil
1083
772
  )
1084
- @billing_behavior = billing_behavior
1085
773
  @customer = customer
1086
774
  @default_settings = default_settings
1087
775
  @end_behavior = end_behavior
@@ -1089,20 +777,10 @@ module Stripe
1089
777
  @from_subscription = from_subscription
1090
778
  @metadata = metadata
1091
779
  @phases = phases
1092
- @prebilling = prebilling
1093
780
  @start_date = start_date
1094
781
  end
1095
782
  end
1096
783
 
1097
- class RetrieveParams < Stripe::RequestParams
1098
- # Specifies which fields in the response should be expanded.
1099
- attr_accessor :expand
1100
-
1101
- def initialize(expand: nil)
1102
- @expand = expand
1103
- end
1104
- end
1105
-
1106
784
  class UpdateParams < Stripe::RequestParams
1107
785
  class DefaultSettings < Stripe::RequestParams
1108
786
  class AutomaticTax < Stripe::RequestParams
@@ -1128,18 +806,6 @@ module Stripe
1128
806
  end
1129
807
  end
1130
808
 
1131
- class BillingThresholds < Stripe::RequestParams
1132
- # Monetary threshold that triggers the subscription to advance to a new billing period
1133
- attr_accessor :amount_gte
1134
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
1135
- attr_accessor :reset_billing_cycle_anchor
1136
-
1137
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
1138
- @amount_gte = amount_gte
1139
- @reset_billing_cycle_anchor = reset_billing_cycle_anchor
1140
- end
1141
- end
1142
-
1143
809
  class InvoiceSettings < Stripe::RequestParams
1144
810
  class Issuer < Stripe::RequestParams
1145
811
  # The connected account being referenced when `type` is `account`.
@@ -1183,8 +849,6 @@ module Stripe
1183
849
  attr_accessor :automatic_tax
1184
850
  # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
1185
851
  attr_accessor :billing_cycle_anchor
1186
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
1187
- attr_accessor :billing_thresholds
1188
852
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
1189
853
  attr_accessor :collection_method
1190
854
  # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
@@ -1202,7 +866,6 @@ module Stripe
1202
866
  application_fee_percent: nil,
1203
867
  automatic_tax: nil,
1204
868
  billing_cycle_anchor: nil,
1205
- billing_thresholds: nil,
1206
869
  collection_method: nil,
1207
870
  default_payment_method: nil,
1208
871
  description: nil,
@@ -1213,7 +876,6 @@ module Stripe
1213
876
  @application_fee_percent = application_fee_percent
1214
877
  @automatic_tax = automatic_tax
1215
878
  @billing_cycle_anchor = billing_cycle_anchor
1216
- @billing_thresholds = billing_thresholds
1217
879
  @collection_method = collection_method
1218
880
  @default_payment_method = default_payment_method
1219
881
  @description = description
@@ -1226,44 +888,16 @@ module Stripe
1226
888
  class Phase < Stripe::RequestParams
1227
889
  class AddInvoiceItem < Stripe::RequestParams
1228
890
  class Discount < Stripe::RequestParams
1229
- class DiscountEnd < Stripe::RequestParams
1230
- class Duration < Stripe::RequestParams
1231
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1232
- attr_accessor :interval
1233
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1234
- attr_accessor :interval_count
1235
-
1236
- def initialize(interval: nil, interval_count: nil)
1237
- @interval = interval
1238
- @interval_count = interval_count
1239
- end
1240
- end
1241
- # Time span for the redeemed discount.
1242
- attr_accessor :duration
1243
- # A precise Unix timestamp for the discount to end. Must be in the future.
1244
- attr_accessor :timestamp
1245
- # The type of calculation made to determine when the discount ends.
1246
- attr_accessor :type
1247
-
1248
- def initialize(duration: nil, timestamp: nil, type: nil)
1249
- @duration = duration
1250
- @timestamp = timestamp
1251
- @type = type
1252
- end
1253
- end
1254
891
  # ID of the coupon to create a new discount for.
1255
892
  attr_accessor :coupon
1256
893
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1257
894
  attr_accessor :discount
1258
- # Details to determine how long the discount should be applied for.
1259
- attr_accessor :discount_end
1260
895
  # ID of the promotion code to create a new discount for.
1261
896
  attr_accessor :promotion_code
1262
897
 
1263
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
898
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1264
899
  @coupon = coupon
1265
900
  @discount = discount
1266
- @discount_end = discount_end
1267
901
  @promotion_code = promotion_code
1268
902
  end
1269
903
  end
@@ -1271,7 +905,7 @@ module Stripe
1271
905
  class PriceData < Stripe::RequestParams
1272
906
  # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1273
907
  attr_accessor :currency
1274
- # The ID of the product that this price will belong to.
908
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1275
909
  attr_accessor :product
1276
910
  # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
1277
911
  attr_accessor :tax_behavior
@@ -1337,57 +971,17 @@ module Stripe
1337
971
  end
1338
972
  end
1339
973
 
1340
- class BillingThresholds < Stripe::RequestParams
1341
- # Monetary threshold that triggers the subscription to advance to a new billing period
1342
- attr_accessor :amount_gte
1343
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
1344
- attr_accessor :reset_billing_cycle_anchor
1345
-
1346
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
1347
- @amount_gte = amount_gte
1348
- @reset_billing_cycle_anchor = reset_billing_cycle_anchor
1349
- end
1350
- end
1351
-
1352
974
  class Discount < Stripe::RequestParams
1353
- class DiscountEnd < Stripe::RequestParams
1354
- class Duration < Stripe::RequestParams
1355
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1356
- attr_accessor :interval
1357
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1358
- attr_accessor :interval_count
1359
-
1360
- def initialize(interval: nil, interval_count: nil)
1361
- @interval = interval
1362
- @interval_count = interval_count
1363
- end
1364
- end
1365
- # Time span for the redeemed discount.
1366
- attr_accessor :duration
1367
- # A precise Unix timestamp for the discount to end. Must be in the future.
1368
- attr_accessor :timestamp
1369
- # The type of calculation made to determine when the discount ends.
1370
- attr_accessor :type
1371
-
1372
- def initialize(duration: nil, timestamp: nil, type: nil)
1373
- @duration = duration
1374
- @timestamp = timestamp
1375
- @type = type
1376
- end
1377
- end
1378
975
  # ID of the coupon to create a new discount for.
1379
976
  attr_accessor :coupon
1380
977
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1381
978
  attr_accessor :discount
1382
- # Details to determine how long the discount should be applied for.
1383
- attr_accessor :discount_end
1384
979
  # ID of the promotion code to create a new discount for.
1385
980
  attr_accessor :promotion_code
1386
981
 
1387
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
982
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1388
983
  @coupon = coupon
1389
984
  @discount = discount
1390
- @discount_end = discount_end
1391
985
  @promotion_code = promotion_code
1392
986
  end
1393
987
  end
@@ -1419,54 +1013,17 @@ module Stripe
1419
1013
  end
1420
1014
 
1421
1015
  class Item < Stripe::RequestParams
1422
- class BillingThresholds < Stripe::RequestParams
1423
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
1424
- attr_accessor :usage_gte
1425
-
1426
- def initialize(usage_gte: nil)
1427
- @usage_gte = usage_gte
1428
- end
1429
- end
1430
-
1431
1016
  class Discount < Stripe::RequestParams
1432
- class DiscountEnd < Stripe::RequestParams
1433
- class Duration < Stripe::RequestParams
1434
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1435
- attr_accessor :interval
1436
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1437
- attr_accessor :interval_count
1438
-
1439
- def initialize(interval: nil, interval_count: nil)
1440
- @interval = interval
1441
- @interval_count = interval_count
1442
- end
1443
- end
1444
- # Time span for the redeemed discount.
1445
- attr_accessor :duration
1446
- # A precise Unix timestamp for the discount to end. Must be in the future.
1447
- attr_accessor :timestamp
1448
- # The type of calculation made to determine when the discount ends.
1449
- attr_accessor :type
1450
-
1451
- def initialize(duration: nil, timestamp: nil, type: nil)
1452
- @duration = duration
1453
- @timestamp = timestamp
1454
- @type = type
1455
- end
1456
- end
1457
1017
  # ID of the coupon to create a new discount for.
1458
1018
  attr_accessor :coupon
1459
1019
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1460
1020
  attr_accessor :discount
1461
- # Details to determine how long the discount should be applied for.
1462
- attr_accessor :discount_end
1463
1021
  # ID of the promotion code to create a new discount for.
1464
1022
  attr_accessor :promotion_code
1465
1023
 
1466
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1024
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1467
1025
  @coupon = coupon
1468
1026
  @discount = discount
1469
- @discount_end = discount_end
1470
1027
  @promotion_code = promotion_code
1471
1028
  end
1472
1029
  end
@@ -1485,7 +1042,7 @@ module Stripe
1485
1042
  end
1486
1043
  # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1487
1044
  attr_accessor :currency
1488
- # The ID of the product that this price will belong to.
1045
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1489
1046
  attr_accessor :product
1490
1047
  # The recurring components of a price such as `interval` and `interval_count`.
1491
1048
  attr_accessor :recurring
@@ -1512,20 +1069,6 @@ module Stripe
1512
1069
  @unit_amount_decimal = unit_amount_decimal
1513
1070
  end
1514
1071
  end
1515
-
1516
- class Trial < Stripe::RequestParams
1517
- # 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.
1518
- attr_accessor :converts_to
1519
- # Determines the type of trial for this item.
1520
- attr_accessor :type
1521
-
1522
- def initialize(converts_to: nil, type: nil)
1523
- @converts_to = converts_to
1524
- @type = type
1525
- end
1526
- end
1527
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
1528
- attr_accessor :billing_thresholds
1529
1072
  # The coupons to redeem into discounts for the subscription item.
1530
1073
  attr_accessor :discounts
1531
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`.
@@ -1540,21 +1083,16 @@ module Stripe
1540
1083
  attr_accessor :quantity
1541
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.
1542
1085
  attr_accessor :tax_rates
1543
- # Options that configure the trial on the subscription item.
1544
- attr_accessor :trial
1545
1086
 
1546
1087
  def initialize(
1547
- billing_thresholds: nil,
1548
1088
  discounts: nil,
1549
1089
  metadata: nil,
1550
1090
  plan: nil,
1551
1091
  price: nil,
1552
1092
  price_data: nil,
1553
1093
  quantity: nil,
1554
- tax_rates: nil,
1555
- trial: nil
1094
+ tax_rates: nil
1556
1095
  )
1557
- @billing_thresholds = billing_thresholds
1558
1096
  @discounts = discounts
1559
1097
  @metadata = metadata
1560
1098
  @plan = plan
@@ -1562,16 +1100,6 @@ module Stripe
1562
1100
  @price_data = price_data
1563
1101
  @quantity = quantity
1564
1102
  @tax_rates = tax_rates
1565
- @trial = trial
1566
- end
1567
- end
1568
-
1569
- class PauseCollection < Stripe::RequestParams
1570
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1571
- attr_accessor :behavior
1572
-
1573
- def initialize(behavior: nil)
1574
- @behavior = behavior
1575
1103
  end
1576
1104
  end
1577
1105
 
@@ -1586,23 +1114,6 @@ module Stripe
1586
1114
  @destination = destination
1587
1115
  end
1588
1116
  end
1589
-
1590
- class TrialSettings < Stripe::RequestParams
1591
- class EndBehavior < Stripe::RequestParams
1592
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1593
- attr_accessor :prorate_up_front
1594
-
1595
- def initialize(prorate_up_front: nil)
1596
- @prorate_up_front = prorate_up_front
1597
- end
1598
- end
1599
- # Defines how the subscription should behave when a trial ends.
1600
- attr_accessor :end_behavior
1601
-
1602
- def initialize(end_behavior: nil)
1603
- @end_behavior = end_behavior
1604
- end
1605
- end
1606
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.
1607
1118
  attr_accessor :add_invoice_items
1608
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).
@@ -1611,12 +1122,8 @@ module Stripe
1611
1122
  attr_accessor :automatic_tax
1612
1123
  # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
1613
1124
  attr_accessor :billing_cycle_anchor
1614
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
1615
- attr_accessor :billing_thresholds
1616
1125
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
1617
1126
  attr_accessor :collection_method
1618
- # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
1619
- attr_accessor :coupon
1620
1127
  # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1621
1128
  attr_accessor :currency
1622
1129
  # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
@@ -1639,8 +1146,6 @@ module Stripe
1639
1146
  attr_accessor :metadata
1640
1147
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
1641
1148
  attr_accessor :on_behalf_of
1642
- # 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).
1643
- attr_accessor :pause_collection
1644
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.
1645
1150
  attr_accessor :proration_behavior
1646
1151
  # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
@@ -1649,21 +1154,15 @@ module Stripe
1649
1154
  attr_accessor :transfer_data
1650
1155
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1651
1156
  attr_accessor :trial
1652
- # Specify trial behavior when crossing phase boundaries
1653
- attr_accessor :trial_continuation
1654
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`
1655
1158
  attr_accessor :trial_end
1656
- # Settings related to subscription trials.
1657
- attr_accessor :trial_settings
1658
1159
 
1659
1160
  def initialize(
1660
1161
  add_invoice_items: nil,
1661
1162
  application_fee_percent: nil,
1662
1163
  automatic_tax: nil,
1663
1164
  billing_cycle_anchor: nil,
1664
- billing_thresholds: nil,
1665
1165
  collection_method: nil,
1666
- coupon: nil,
1667
1166
  currency: nil,
1668
1167
  default_payment_method: nil,
1669
1168
  default_tax_rates: nil,
@@ -1675,22 +1174,17 @@ module Stripe
1675
1174
  iterations: nil,
1676
1175
  metadata: nil,
1677
1176
  on_behalf_of: nil,
1678
- pause_collection: nil,
1679
1177
  proration_behavior: nil,
1680
1178
  start_date: nil,
1681
1179
  transfer_data: nil,
1682
1180
  trial: nil,
1683
- trial_continuation: nil,
1684
- trial_end: nil,
1685
- trial_settings: nil
1181
+ trial_end: nil
1686
1182
  )
1687
1183
  @add_invoice_items = add_invoice_items
1688
1184
  @application_fee_percent = application_fee_percent
1689
1185
  @automatic_tax = automatic_tax
1690
1186
  @billing_cycle_anchor = billing_cycle_anchor
1691
- @billing_thresholds = billing_thresholds
1692
1187
  @collection_method = collection_method
1693
- @coupon = coupon
1694
1188
  @currency = currency
1695
1189
  @default_payment_method = default_payment_method
1696
1190
  @default_tax_rates = default_tax_rates
@@ -1702,30 +1196,13 @@ module Stripe
1702
1196
  @iterations = iterations
1703
1197
  @metadata = metadata
1704
1198
  @on_behalf_of = on_behalf_of
1705
- @pause_collection = pause_collection
1706
1199
  @proration_behavior = proration_behavior
1707
1200
  @start_date = start_date
1708
1201
  @transfer_data = transfer_data
1709
1202
  @trial = trial
1710
- @trial_continuation = trial_continuation
1711
1203
  @trial_end = trial_end
1712
- @trial_settings = trial_settings
1713
1204
  end
1714
1205
  end
1715
-
1716
- class Prebilling < Stripe::RequestParams
1717
- # This is used to determine the number of billing cycles to prebill.
1718
- attr_accessor :iterations
1719
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1720
- attr_accessor :update_behavior
1721
-
1722
- def initialize(iterations: nil, update_behavior: nil)
1723
- @iterations = iterations
1724
- @update_behavior = update_behavior
1725
- end
1726
- end
1727
- # 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.
1728
- attr_accessor :billing_behavior
1729
1206
  # Object representing the subscription schedule's default settings.
1730
1207
  attr_accessor :default_settings
1731
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.
@@ -1736,598 +1213,26 @@ module Stripe
1736
1213
  attr_accessor :metadata
1737
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.
1738
1215
  attr_accessor :phases
1739
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
1740
- attr_accessor :prebilling
1741
1216
  # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
1742
1217
  attr_accessor :proration_behavior
1743
1218
 
1744
1219
  def initialize(
1745
- billing_behavior: nil,
1746
1220
  default_settings: nil,
1747
1221
  end_behavior: nil,
1748
1222
  expand: nil,
1749
1223
  metadata: nil,
1750
1224
  phases: nil,
1751
- prebilling: nil,
1752
1225
  proration_behavior: nil
1753
1226
  )
1754
- @billing_behavior = billing_behavior
1755
1227
  @default_settings = default_settings
1756
1228
  @end_behavior = end_behavior
1757
1229
  @expand = expand
1758
1230
  @metadata = metadata
1759
1231
  @phases = phases
1760
- @prebilling = prebilling
1761
1232
  @proration_behavior = proration_behavior
1762
1233
  end
1763
1234
  end
1764
1235
 
1765
- class AmendParams < Stripe::RequestParams
1766
- class Amendment < Stripe::RequestParams
1767
- class AmendmentEnd < Stripe::RequestParams
1768
- class DiscountEnd < Stripe::RequestParams
1769
- # The ID of a specific discount.
1770
- attr_accessor :discount
1771
-
1772
- def initialize(discount: nil)
1773
- @discount = discount
1774
- end
1775
- end
1776
-
1777
- class Duration < Stripe::RequestParams
1778
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1779
- attr_accessor :interval
1780
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1781
- attr_accessor :interval_count
1782
-
1783
- def initialize(interval: nil, interval_count: nil)
1784
- @interval = interval
1785
- @interval_count = interval_count
1786
- end
1787
- end
1788
- # Use the `end` time of a given discount.
1789
- attr_accessor :discount_end
1790
- # Time span for the amendment starting from the `amendment_start`.
1791
- attr_accessor :duration
1792
- # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
1793
- attr_accessor :timestamp
1794
- # Select one of three ways to pass the `amendment_end`.
1795
- attr_accessor :type
1796
-
1797
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
1798
- @discount_end = discount_end
1799
- @duration = duration
1800
- @timestamp = timestamp
1801
- @type = type
1802
- end
1803
- end
1804
-
1805
- class AmendmentStart < Stripe::RequestParams
1806
- class AmendmentEnd < Stripe::RequestParams
1807
- # 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.
1808
- attr_accessor :index
1809
-
1810
- def initialize(index: nil)
1811
- @index = index
1812
- end
1813
- end
1814
-
1815
- class DiscountEnd < Stripe::RequestParams
1816
- # The ID of a specific discount.
1817
- attr_accessor :discount
1818
-
1819
- def initialize(discount: nil)
1820
- @discount = discount
1821
- end
1822
- end
1823
- # Details of another amendment in the same array, immediately after which this amendment should begin.
1824
- attr_accessor :amendment_end
1825
- # Use the `end` time of a given discount.
1826
- attr_accessor :discount_end
1827
- # A precise Unix timestamp for the amendment to start.
1828
- attr_accessor :timestamp
1829
- # Select one of three ways to pass the `amendment_start`.
1830
- attr_accessor :type
1831
-
1832
- def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
1833
- @amendment_end = amendment_end
1834
- @discount_end = discount_end
1835
- @timestamp = timestamp
1836
- @type = type
1837
- end
1838
- end
1839
-
1840
- class DiscountAction < Stripe::RequestParams
1841
- class Add < Stripe::RequestParams
1842
- class DiscountEnd < Stripe::RequestParams
1843
- # The type of calculation made to determine when the discount ends.
1844
- attr_accessor :type
1845
-
1846
- def initialize(type: nil)
1847
- @type = type
1848
- end
1849
- end
1850
- # The coupon code to redeem.
1851
- attr_accessor :coupon
1852
- # An ID of an existing discount for a coupon that was already redeemed.
1853
- attr_accessor :discount
1854
- # Details to determine how long the discount should be applied for.
1855
- attr_accessor :discount_end
1856
- # 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.
1857
- attr_accessor :index
1858
- # The promotion code to redeem.
1859
- attr_accessor :promotion_code
1860
-
1861
- def initialize(
1862
- coupon: nil,
1863
- discount: nil,
1864
- discount_end: nil,
1865
- index: nil,
1866
- promotion_code: nil
1867
- )
1868
- @coupon = coupon
1869
- @discount = discount
1870
- @discount_end = discount_end
1871
- @index = index
1872
- @promotion_code = promotion_code
1873
- end
1874
- end
1875
-
1876
- class Remove < Stripe::RequestParams
1877
- # The coupon code to remove from the `discounts` array.
1878
- attr_accessor :coupon
1879
- # The ID of a discount to remove from the `discounts` array.
1880
- attr_accessor :discount
1881
- # The ID of a promotion code to remove from the `discounts` array.
1882
- attr_accessor :promotion_code
1883
-
1884
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1885
- @coupon = coupon
1886
- @discount = discount
1887
- @promotion_code = promotion_code
1888
- end
1889
- end
1890
-
1891
- class Set < Stripe::RequestParams
1892
- # The coupon code to replace the `discounts` array with.
1893
- attr_accessor :coupon
1894
- # An ID of an existing discount to replace the `discounts` array with.
1895
- attr_accessor :discount
1896
- # An ID of an existing promotion code to replace the `discounts` array with.
1897
- attr_accessor :promotion_code
1898
-
1899
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1900
- @coupon = coupon
1901
- @discount = discount
1902
- @promotion_code = promotion_code
1903
- end
1904
- end
1905
- # Details of the discount to add.
1906
- attr_accessor :add
1907
- # Details of the discount to remove.
1908
- attr_accessor :remove
1909
- # Details of the discount to replace the existing discounts with.
1910
- attr_accessor :set
1911
- # Determines the type of discount action.
1912
- attr_accessor :type
1913
-
1914
- def initialize(add: nil, remove: nil, set: nil, type: nil)
1915
- @add = add
1916
- @remove = remove
1917
- @set = set
1918
- @type = type
1919
- end
1920
- end
1921
-
1922
- class ItemAction < Stripe::RequestParams
1923
- class Add < Stripe::RequestParams
1924
- class Discount < Stripe::RequestParams
1925
- class DiscountEnd < Stripe::RequestParams
1926
- class Duration < Stripe::RequestParams
1927
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1928
- attr_accessor :interval
1929
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1930
- attr_accessor :interval_count
1931
-
1932
- def initialize(interval: nil, interval_count: nil)
1933
- @interval = interval
1934
- @interval_count = interval_count
1935
- end
1936
- end
1937
- # Time span for the redeemed discount.
1938
- attr_accessor :duration
1939
- # A precise Unix timestamp for the discount to end. Must be in the future.
1940
- attr_accessor :timestamp
1941
- # The type of calculation made to determine when the discount ends.
1942
- attr_accessor :type
1943
-
1944
- def initialize(duration: nil, timestamp: nil, type: nil)
1945
- @duration = duration
1946
- @timestamp = timestamp
1947
- @type = type
1948
- end
1949
- end
1950
- # ID of the coupon to create a new discount for.
1951
- attr_accessor :coupon
1952
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1953
- attr_accessor :discount
1954
- # Details to determine how long the discount should be applied for.
1955
- attr_accessor :discount_end
1956
- # ID of the promotion code to create a new discount for.
1957
- attr_accessor :promotion_code
1958
-
1959
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1960
- @coupon = coupon
1961
- @discount = discount
1962
- @discount_end = discount_end
1963
- @promotion_code = promotion_code
1964
- end
1965
- end
1966
-
1967
- class Trial < Stripe::RequestParams
1968
- # 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.
1969
- attr_accessor :converts_to
1970
- # Determines the type of trial for this item.
1971
- attr_accessor :type
1972
-
1973
- def initialize(converts_to: nil, type: nil)
1974
- @converts_to = converts_to
1975
- @type = type
1976
- end
1977
- end
1978
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
1979
- attr_accessor :discounts
1980
- # 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`.
1981
- attr_accessor :metadata
1982
- # The ID of the price object.
1983
- attr_accessor :price
1984
- # Quantity for this item.
1985
- attr_accessor :quantity
1986
- # 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`.
1987
- attr_accessor :tax_rates
1988
- # Options that configure the trial on the subscription item.
1989
- attr_accessor :trial
1990
-
1991
- def initialize(
1992
- discounts: nil,
1993
- metadata: nil,
1994
- price: nil,
1995
- quantity: nil,
1996
- tax_rates: nil,
1997
- trial: nil
1998
- )
1999
- @discounts = discounts
2000
- @metadata = metadata
2001
- @price = price
2002
- @quantity = quantity
2003
- @tax_rates = tax_rates
2004
- @trial = trial
2005
- end
2006
- end
2007
-
2008
- class Remove < Stripe::RequestParams
2009
- # ID of a price to remove.
2010
- attr_accessor :price
2011
-
2012
- def initialize(price: nil)
2013
- @price = price
2014
- end
2015
- end
2016
-
2017
- class Set < Stripe::RequestParams
2018
- class Discount < Stripe::RequestParams
2019
- class DiscountEnd < Stripe::RequestParams
2020
- class Duration < Stripe::RequestParams
2021
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2022
- attr_accessor :interval
2023
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2024
- attr_accessor :interval_count
2025
-
2026
- def initialize(interval: nil, interval_count: nil)
2027
- @interval = interval
2028
- @interval_count = interval_count
2029
- end
2030
- end
2031
- # Time span for the redeemed discount.
2032
- attr_accessor :duration
2033
- # A precise Unix timestamp for the discount to end. Must be in the future.
2034
- attr_accessor :timestamp
2035
- # The type of calculation made to determine when the discount ends.
2036
- attr_accessor :type
2037
-
2038
- def initialize(duration: nil, timestamp: nil, type: nil)
2039
- @duration = duration
2040
- @timestamp = timestamp
2041
- @type = type
2042
- end
2043
- end
2044
- # ID of the coupon to create a new discount for.
2045
- attr_accessor :coupon
2046
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2047
- attr_accessor :discount
2048
- # Details to determine how long the discount should be applied for.
2049
- attr_accessor :discount_end
2050
- # ID of the promotion code to create a new discount for.
2051
- attr_accessor :promotion_code
2052
-
2053
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2054
- @coupon = coupon
2055
- @discount = discount
2056
- @discount_end = discount_end
2057
- @promotion_code = promotion_code
2058
- end
2059
- end
2060
-
2061
- class Trial < Stripe::RequestParams
2062
- # 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.
2063
- attr_accessor :converts_to
2064
- # Determines the type of trial for this item.
2065
- attr_accessor :type
2066
-
2067
- def initialize(converts_to: nil, type: nil)
2068
- @converts_to = converts_to
2069
- @type = type
2070
- end
2071
- end
2072
- # 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`.
2073
- attr_accessor :discounts
2074
- # 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`.
2075
- attr_accessor :metadata
2076
- # The ID of the price object.
2077
- attr_accessor :price
2078
- # 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`.
2079
- attr_accessor :quantity
2080
- # 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`.
2081
- attr_accessor :tax_rates
2082
- # 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`.
2083
- attr_accessor :trial
2084
-
2085
- def initialize(
2086
- discounts: nil,
2087
- metadata: nil,
2088
- price: nil,
2089
- quantity: nil,
2090
- tax_rates: nil,
2091
- trial: nil
2092
- )
2093
- @discounts = discounts
2094
- @metadata = metadata
2095
- @price = price
2096
- @quantity = quantity
2097
- @tax_rates = tax_rates
2098
- @trial = trial
2099
- end
2100
- end
2101
- # 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.
2102
- attr_accessor :add
2103
- # Details of the subscription item to remove.
2104
- attr_accessor :remove
2105
- # 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.
2106
- attr_accessor :set
2107
- # Determines the type of item action.
2108
- attr_accessor :type
2109
-
2110
- def initialize(add: nil, remove: nil, set: nil, type: nil)
2111
- @add = add
2112
- @remove = remove
2113
- @set = set
2114
- @type = type
2115
- end
2116
- end
2117
-
2118
- class MetadataAction < Stripe::RequestParams
2119
- # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
2120
- attr_accessor :add
2121
- # Keys to remove from schedule phase metadata.
2122
- attr_accessor :remove
2123
- # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
2124
- attr_accessor :set
2125
- # Select one of three ways to update phase-level `metadata` on subscription schedules.
2126
- attr_accessor :type
2127
-
2128
- def initialize(add: nil, remove: nil, set: nil, type: nil)
2129
- @add = add
2130
- @remove = remove
2131
- @set = set
2132
- @type = type
2133
- end
2134
- end
2135
-
2136
- class SetPauseCollection < Stripe::RequestParams
2137
- class Set < Stripe::RequestParams
2138
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2139
- attr_accessor :behavior
2140
-
2141
- def initialize(behavior: nil)
2142
- @behavior = behavior
2143
- end
2144
- end
2145
- # Details of the pause_collection behavior to apply to the amendment.
2146
- attr_accessor :set
2147
- # Determines the type of the pause_collection amendment.
2148
- attr_accessor :type
2149
-
2150
- def initialize(set: nil, type: nil)
2151
- @set = set
2152
- @type = type
2153
- end
2154
- end
2155
-
2156
- class TrialSettings < Stripe::RequestParams
2157
- class EndBehavior < Stripe::RequestParams
2158
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2159
- attr_accessor :prorate_up_front
2160
-
2161
- def initialize(prorate_up_front: nil)
2162
- @prorate_up_front = prorate_up_front
2163
- end
2164
- end
2165
- # Defines how the subscription should behave when a trial ends.
2166
- attr_accessor :end_behavior
2167
-
2168
- def initialize(end_behavior: nil)
2169
- @end_behavior = end_behavior
2170
- end
2171
- end
2172
- # 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.
2173
- attr_accessor :amendment_end
2174
- # Details to identify the earliest timestamp where the proposed change should take effect.
2175
- attr_accessor :amendment_start
2176
- # 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.
2177
- attr_accessor :billing_cycle_anchor
2178
- # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2179
- attr_accessor :discount_actions
2180
- # Changes to the subscription items during the amendment time span.
2181
- attr_accessor :item_actions
2182
- # Instructions for how to modify phase metadata
2183
- attr_accessor :metadata_actions
2184
- # 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`.
2185
- attr_accessor :proration_behavior
2186
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2187
- attr_accessor :set_pause_collection
2188
- # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2189
- attr_accessor :set_schedule_end
2190
- # Settings related to subscription trials.
2191
- attr_accessor :trial_settings
2192
-
2193
- def initialize(
2194
- amendment_end: nil,
2195
- amendment_start: nil,
2196
- billing_cycle_anchor: nil,
2197
- discount_actions: nil,
2198
- item_actions: nil,
2199
- metadata_actions: nil,
2200
- proration_behavior: nil,
2201
- set_pause_collection: nil,
2202
- set_schedule_end: nil,
2203
- trial_settings: nil
2204
- )
2205
- @amendment_end = amendment_end
2206
- @amendment_start = amendment_start
2207
- @billing_cycle_anchor = billing_cycle_anchor
2208
- @discount_actions = discount_actions
2209
- @item_actions = item_actions
2210
- @metadata_actions = metadata_actions
2211
- @proration_behavior = proration_behavior
2212
- @set_pause_collection = set_pause_collection
2213
- @set_schedule_end = set_schedule_end
2214
- @trial_settings = trial_settings
2215
- end
2216
- end
2217
-
2218
- class Prebilling < Stripe::RequestParams
2219
- class BillFrom < Stripe::RequestParams
2220
- class AmendmentStart < Stripe::RequestParams
2221
- # 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.
2222
- attr_accessor :index
2223
-
2224
- def initialize(index: nil)
2225
- @index = index
2226
- end
2227
- end
2228
- # Start the prebilled period when a specified amendment begins.
2229
- attr_accessor :amendment_start
2230
- # Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2231
- attr_accessor :timestamp
2232
- # Select one of several ways to pass the `bill_from` value.
2233
- attr_accessor :type
2234
-
2235
- def initialize(amendment_start: nil, timestamp: nil, type: nil)
2236
- @amendment_start = amendment_start
2237
- @timestamp = timestamp
2238
- @type = type
2239
- end
2240
- end
2241
-
2242
- class BillUntil < Stripe::RequestParams
2243
- class AmendmentEnd < Stripe::RequestParams
2244
- # 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.
2245
- attr_accessor :index
2246
-
2247
- def initialize(index: nil)
2248
- @index = index
2249
- end
2250
- end
2251
-
2252
- class Duration < Stripe::RequestParams
2253
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2254
- attr_accessor :interval
2255
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2256
- attr_accessor :interval_count
2257
-
2258
- def initialize(interval: nil, interval_count: nil)
2259
- @interval = interval
2260
- @interval_count = interval_count
2261
- end
2262
- end
2263
- # End the prebilled period when a specified amendment ends.
2264
- attr_accessor :amendment_end
2265
- # Time span for prebilling, starting from `bill_from`.
2266
- attr_accessor :duration
2267
- # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2268
- attr_accessor :timestamp
2269
- # Select one of several ways to pass the `bill_until` value.
2270
- attr_accessor :type
2271
-
2272
- def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
2273
- @amendment_end = amendment_end
2274
- @duration = duration
2275
- @timestamp = timestamp
2276
- @type = type
2277
- end
2278
- end
2279
- # The beginning of the prebilled time period. The default value is `now`.
2280
- attr_accessor :bill_from
2281
- # The end of the prebilled time period.
2282
- attr_accessor :bill_until
2283
- # When the prebilling invoice should be created. The default value is `now`.
2284
- attr_accessor :invoice_at
2285
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2286
- attr_accessor :update_behavior
2287
-
2288
- def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
2289
- @bill_from = bill_from
2290
- @bill_until = bill_until
2291
- @invoice_at = invoice_at
2292
- @update_behavior = update_behavior
2293
- end
2294
- end
2295
-
2296
- class ScheduleSettings < Stripe::RequestParams
2297
- # Behavior of the subscription schedule and underlying subscription when it ends.
2298
- attr_accessor :end_behavior
2299
-
2300
- def initialize(end_behavior: nil)
2301
- @end_behavior = end_behavior
2302
- end
2303
- end
2304
- # Changes to apply to the phases of the subscription schedule, in the order provided.
2305
- attr_accessor :amendments
2306
- # Specifies which fields in the response should be expanded.
2307
- attr_accessor :expand
2308
- # Provide any time periods to bill in advance.
2309
- attr_accessor :prebilling
2310
- # In cases where the amendment changes the currently active phase,
2311
- # specifies if and how to prorate at the time of the request.
2312
- attr_accessor :proration_behavior
2313
- # Changes to apply to the subscription schedule.
2314
- attr_accessor :schedule_settings
2315
-
2316
- def initialize(
2317
- amendments: nil,
2318
- expand: nil,
2319
- prebilling: nil,
2320
- proration_behavior: nil,
2321
- schedule_settings: nil
2322
- )
2323
- @amendments = amendments
2324
- @expand = expand
2325
- @prebilling = prebilling
2326
- @proration_behavior = proration_behavior
2327
- @schedule_settings = schedule_settings
2328
- end
2329
- end
2330
-
2331
1236
  class CancelParams < Stripe::RequestParams
2332
1237
  # Specifies which fields in the response should be expanded.
2333
1238
  attr_accessor :expand
@@ -2356,8 +1261,6 @@ module Stripe
2356
1261
  end
2357
1262
  # ID of the Connect Application that created the schedule.
2358
1263
  attr_reader :application
2359
- # 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.
2360
- attr_reader :billing_behavior
2361
1264
  # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
2362
1265
  attr_reader :canceled_at
2363
1266
  # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
@@ -2374,8 +1277,6 @@ module Stripe
2374
1277
  attr_reader :end_behavior
2375
1278
  # Unique identifier for the object.
2376
1279
  attr_reader :id
2377
- # Details of the most recent price migration that failed for the subscription schedule.
2378
- attr_reader :last_price_migration_error
2379
1280
  # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
2380
1281
  attr_reader :livemode
2381
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.
@@ -2384,8 +1285,6 @@ module Stripe
2384
1285
  attr_reader :object
2385
1286
  # Configuration for the subscription schedule's phases.
2386
1287
  attr_reader :phases
2387
- # Time period and invoice for a Subscription billed in advance.
2388
- attr_reader :prebilling
2389
1288
  # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
2390
1289
  attr_reader :released_at
2391
1290
  # ID of the subscription once managed by the subscription schedule (if it is released).
@@ -2397,26 +1296,6 @@ module Stripe
2397
1296
  # ID of the test clock this subscription schedule belongs to.
2398
1297
  attr_reader :test_clock
2399
1298
 
2400
- # Amends an existing subscription schedule.
2401
- def amend(params = {}, opts = {})
2402
- request_stripe_object(
2403
- method: :post,
2404
- path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
2405
- params: params,
2406
- opts: opts
2407
- )
2408
- end
2409
-
2410
- # Amends an existing subscription schedule.
2411
- def self.amend(schedule, params = {}, opts = {})
2412
- request_stripe_object(
2413
- method: :post,
2414
- path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
2415
- params: params,
2416
- opts: opts
2417
- )
2418
- end
2419
-
2420
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.
2421
1300
  def cancel(params = {}, opts = {})
2422
1301
  request_stripe_object(