stripe 15.2.0.pre.beta.1 → 15.2.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 (648) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +718 -1556
  3. data/CONTRIBUTING.md +25 -0
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +10 -7
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_requestor.rb +0 -28
  8. data/lib/stripe/api_version.rb +1 -1
  9. data/lib/stripe/errors.rb +0 -54
  10. data/lib/stripe/event_types.rb +0 -89
  11. data/lib/stripe/object_types.rb +0 -52
  12. data/lib/stripe/resources/account.rb +32 -657
  13. data/lib/stripe/resources/account_session.rb +59 -253
  14. data/lib/stripe/resources/apple_pay_domain.rb +1 -2
  15. data/lib/stripe/resources/balance.rb +42 -0
  16. data/lib/stripe/resources/balance_transaction.rb +2 -0
  17. data/lib/stripe/resources/bank_account.rb +2 -2
  18. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -2
  19. data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -4
  20. data/lib/stripe/resources/billing/credit_grant.rb +0 -10
  21. data/lib/stripe/resources/billing_portal/session.rb +1 -7
  22. data/lib/stripe/resources/capability.rb +1 -1
  23. data/lib/stripe/resources/card.rb +0 -2
  24. data/lib/stripe/resources/cash_balance.rb +0 -2
  25. data/lib/stripe/resources/charge.rb +13 -1475
  26. data/lib/stripe/resources/checkout/session.rb +21 -333
  27. data/lib/stripe/resources/confirmation_token.rb +33 -263
  28. data/lib/stripe/resources/country_spec.rb +1 -1
  29. data/lib/stripe/resources/coupon.rb +2 -32
  30. data/lib/stripe/resources/credit_note.rb +10 -17
  31. data/lib/stripe/resources/credit_note_line_item.rb +0 -9
  32. data/lib/stripe/resources/customer.rb +2 -6
  33. data/lib/stripe/resources/customer_balance_transaction.rb +0 -2
  34. data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -2
  35. data/lib/stripe/resources/customer_session.rb +4 -9
  36. data/lib/stripe/resources/discount.rb +0 -2
  37. data/lib/stripe/resources/dispute.rb +2 -2
  38. data/lib/stripe/resources/event.rb +1 -32
  39. data/lib/stripe/resources/file.rb +1 -1
  40. data/lib/stripe/resources/financial_connections/account.rb +1 -20
  41. data/lib/stripe/resources/financial_connections/session.rb +2 -62
  42. data/lib/stripe/resources/identity/verification_report.rb +6 -0
  43. data/lib/stripe/resources/identity/verification_session.rb +17 -21
  44. data/lib/stripe/resources/invoice.rb +79 -1106
  45. data/lib/stripe/resources/invoice_item.rb +4 -81
  46. data/lib/stripe/resources/invoice_line_item.rb +2 -56
  47. data/lib/stripe/resources/invoice_payment.rb +62 -4
  48. data/lib/stripe/resources/issuing/authorization.rb +8 -8
  49. data/lib/stripe/resources/issuing/card.rb +1 -1
  50. data/lib/stripe/resources/issuing/cardholder.rb +1 -2
  51. data/lib/stripe/resources/issuing/dispute.rb +3 -3
  52. data/lib/stripe/resources/issuing/transaction.rb +0 -6
  53. data/lib/stripe/resources/line_item.rb +0 -37
  54. data/lib/stripe/resources/mandate.rb +0 -24
  55. data/lib/stripe/resources/payment_intent.rb +1912 -6840
  56. data/lib/stripe/resources/payment_method.rb +47 -301
  57. data/lib/stripe/resources/payment_method_configuration.rb +112 -112
  58. data/lib/stripe/resources/payment_method_domain.rb +2 -2
  59. data/lib/stripe/resources/payout.rb +4 -10
  60. data/lib/stripe/resources/person.rb +2 -2
  61. data/lib/stripe/resources/plan.rb +2 -3
  62. data/lib/stripe/resources/price.rb +1 -31
  63. data/lib/stripe/resources/product.rb +1 -61
  64. data/lib/stripe/resources/promotion_code.rb +0 -10
  65. data/lib/stripe/resources/quote.rb +6 -2046
  66. data/lib/stripe/resources/radar/value_list.rb +1 -2
  67. data/lib/stripe/resources/radar/value_list_item.rb +1 -2
  68. data/lib/stripe/resources/refund.rb +6 -10
  69. data/lib/stripe/resources/reversal.rb +1 -1
  70. data/lib/stripe/resources/review.rb +1 -1
  71. data/lib/stripe/resources/setup_attempt.rb +0 -21
  72. data/lib/stripe/resources/setup_intent.rb +120 -877
  73. data/lib/stripe/resources/source.rb +1 -30
  74. data/lib/stripe/resources/subscription.rb +97 -326
  75. data/lib/stripe/resources/subscription_item.rb +32 -80
  76. data/lib/stripe/resources/subscription_schedule.rb +127 -1015
  77. data/lib/stripe/resources/tax/calculation.rb +4 -0
  78. data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
  79. data/lib/stripe/resources/tax/registration.rb +1 -1
  80. data/lib/stripe/resources/tax_id.rb +3 -14
  81. data/lib/stripe/resources/tax_rate.rb +2 -2
  82. data/lib/stripe/resources/terminal/configuration.rb +1 -2
  83. data/lib/stripe/resources/terminal/location.rb +2 -3
  84. data/lib/stripe/resources/terminal/reader.rb +8 -142
  85. data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
  86. data/lib/stripe/resources/token.rb +2 -2
  87. data/lib/stripe/resources/transfer.rb +1 -7
  88. data/lib/stripe/resources/treasury/financial_account.rb +3 -22
  89. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -2
  90. data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -37
  91. data/lib/stripe/resources/treasury/received_credit.rb +1 -38
  92. data/lib/stripe/resources/treasury/received_debit.rb +1 -40
  93. data/lib/stripe/resources/webhook_endpoint.rb +1 -2
  94. data/lib/stripe/resources.rb +0 -99
  95. data/lib/stripe/services/account_external_account_service.rb +2 -3
  96. data/lib/stripe/services/account_login_link_service.rb +1 -1
  97. data/lib/stripe/services/account_person_service.rb +1 -2
  98. data/lib/stripe/services/account_service.rb +23 -559
  99. data/lib/stripe/services/account_session_service.rb +29 -229
  100. data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
  101. data/lib/stripe/services/balance_service.rb +1 -1
  102. data/lib/stripe/services/billing/credit_balance_summary_service.rb +1 -4
  103. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -4
  104. data/lib/stripe/services/billing/credit_grant_service.rb +0 -8
  105. data/lib/stripe/services/billing_portal/session_service.rb +0 -4
  106. data/lib/stripe/services/charge_service.rb +4 -1354
  107. data/lib/stripe/services/checkout/session_service.rb +13 -250
  108. data/lib/stripe/services/coupon_service.rb +2 -19
  109. data/lib/stripe/services/credit_note_service.rb +7 -12
  110. data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
  111. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
  112. data/lib/stripe/services/customer_payment_source_service.rb +1 -1
  113. data/lib/stripe/services/customer_service.rb +3 -5
  114. data/lib/stripe/services/customer_session_service.rb +1 -4
  115. data/lib/stripe/services/customer_tax_id_service.rb +1 -2
  116. data/lib/stripe/services/dispute_service.rb +1 -1
  117. data/lib/stripe/services/file_service.rb +1 -1
  118. data/lib/stripe/services/financial_connections/account_service.rb +2 -7
  119. data/lib/stripe/services/financial_connections/session_service.rb +2 -34
  120. data/lib/stripe/services/financial_connections_service.rb +1 -2
  121. data/lib/stripe/services/identity/verification_session_service.rb +5 -13
  122. data/lib/stripe/services/invoice_item_service.rb +3 -76
  123. data/lib/stripe/services/invoice_line_item_service.rb +1 -33
  124. data/lib/stripe/services/invoice_payment_service.rb +83 -0
  125. data/lib/stripe/services/invoice_service.rb +74 -1049
  126. data/lib/stripe/services/issuing/authorization_service.rb +4 -4
  127. data/lib/stripe/services/issuing/card_service.rb +1 -1
  128. data/lib/stripe/services/issuing/cardholder_service.rb +1 -2
  129. data/lib/stripe/services/issuing/dispute_service.rb +2 -2
  130. data/lib/stripe/services/issuing/transaction_service.rb +0 -4
  131. data/lib/stripe/services/issuing_service.rb +1 -5
  132. data/lib/stripe/services/payment_intent_service.rb +439 -4928
  133. data/lib/stripe/services/payment_method_configuration_service.rb +82 -82
  134. data/lib/stripe/services/payment_method_domain_service.rb +1 -1
  135. data/lib/stripe/services/payment_method_service.rb +44 -226
  136. data/lib/stripe/services/payout_service.rb +2 -6
  137. data/lib/stripe/services/plan_service.rb +2 -3
  138. data/lib/stripe/services/price_service.rb +2 -21
  139. data/lib/stripe/services/product_feature_service.rb +1 -2
  140. data/lib/stripe/services/product_service.rb +2 -41
  141. data/lib/stripe/services/promotion_code_service.rb +1 -9
  142. data/lib/stripe/services/quote_service.rb +7 -1730
  143. data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
  144. data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
  145. data/lib/stripe/services/radar/value_list_service.rb +1 -2
  146. data/lib/stripe/services/setup_intent_service.rb +119 -836
  147. data/lib/stripe/services/source_service.rb +1 -1
  148. data/lib/stripe/services/subscription_item_service.rb +27 -73
  149. data/lib/stripe/services/subscription_schedule_service.rb +101 -916
  150. data/lib/stripe/services/subscription_service.rb +85 -282
  151. data/lib/stripe/services/tax/calculation_service.rb +4 -0
  152. data/lib/stripe/services/tax/registration_service.rb +1 -1
  153. data/lib/stripe/services/tax_id_service.rb +3 -10
  154. data/lib/stripe/services/tax_service.rb +1 -3
  155. data/lib/stripe/services/terminal/configuration_service.rb +1 -2
  156. data/lib/stripe/services/terminal/location_service.rb +2 -3
  157. data/lib/stripe/services/terminal/reader_service.rb +5 -81
  158. data/lib/stripe/services/terminal_service.rb +1 -2
  159. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +33 -190
  160. data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
  161. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -25
  162. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -25
  163. data/lib/stripe/services/token_service.rb +1 -1
  164. data/lib/stripe/services/transfer_service.rb +1 -5
  165. data/lib/stripe/services/treasury/financial_account_features_service.rb +1 -4
  166. data/lib/stripe/services/treasury/financial_account_service.rb +2 -16
  167. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -24
  168. data/lib/stripe/services/v1_services.rb +2 -12
  169. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
  170. data/lib/stripe/services/v2/core/event_destination_service.rb +4 -10
  171. data/lib/stripe/services/v2/core/event_service.rb +1 -2
  172. data/lib/stripe/services/v2/core_service.rb +1 -4
  173. data/lib/stripe/services/v2_services.rb +2 -4
  174. data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
  175. data/lib/stripe/services.rb +1 -54
  176. data/lib/stripe/stripe_configuration.rb +1 -3
  177. data/lib/stripe/stripe_object.rb +1 -1
  178. data/lib/stripe/util.rb +1 -7
  179. data/lib/stripe/version.rb +1 -1
  180. data/lib/stripe.rb +0 -53
  181. data/rbi/stripe/resources/account.rbi +4926 -0
  182. data/rbi/stripe/resources/account_link.rbi +74 -0
  183. data/rbi/stripe/resources/account_session.rbi +1013 -0
  184. data/rbi/stripe/resources/apple_pay_domain.rbi +88 -0
  185. data/rbi/stripe/resources/application.rbi +20 -0
  186. data/rbi/stripe/resources/application_fee.rbi +118 -0
  187. data/rbi/stripe/resources/application_fee_refund.rbi +37 -0
  188. data/rbi/stripe/resources/apps/secret.rbi +195 -0
  189. data/rbi/stripe/resources/balance.rbi +235 -0
  190. data/rbi/stripe/resources/balance_transaction.rbi +147 -0
  191. data/rbi/stripe/resources/bank_account.rbi +127 -0
  192. data/rbi/stripe/resources/billing/alert.rbi +201 -0
  193. data/rbi/stripe/resources/billing/alert_triggered.rbi +28 -0
  194. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +63 -0
  195. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +147 -0
  196. data/rbi/stripe/resources/billing/credit_grant.rbi +291 -0
  197. data/rbi/stripe/resources/billing/meter.rbi +226 -0
  198. data/rbi/stripe/resources/billing/meter_event.rbi +64 -0
  199. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +64 -0
  200. data/rbi/stripe/resources/billing/meter_event_summary.rbi +35 -0
  201. data/rbi/stripe/resources/billing_portal/configuration.rbi +645 -0
  202. data/rbi/stripe/resources/billing_portal/session.rbi +345 -0
  203. data/rbi/stripe/resources/capability.rbi +125 -0
  204. data/rbi/stripe/resources/card.rbi +125 -0
  205. data/rbi/stripe/resources/cash_balance.rbi +32 -0
  206. data/rbi/stripe/resources/charge.rbi +2069 -0
  207. data/rbi/stripe/resources/checkout/session.rbi +4004 -0
  208. data/rbi/stripe/resources/climate/order.rbi +245 -0
  209. data/rbi/stripe/resources/climate/product.rbi +75 -0
  210. data/rbi/stripe/resources/climate/supplier.rbi +72 -0
  211. data/rbi/stripe/resources/confirmation_token.rbi +1807 -0
  212. data/rbi/stripe/resources/connect_collection_transfer.rbi +26 -0
  213. data/rbi/stripe/resources/country_spec.rbi +85 -0
  214. data/rbi/stripe/resources/coupon.rbi +250 -0
  215. data/rbi/stripe/resources/credit_note.rbi +752 -0
  216. data/rbi/stripe/resources/credit_note_line_item.rbi +101 -0
  217. data/rbi/stripe/resources/customer.rbi +1005 -0
  218. data/rbi/stripe/resources/customer_balance_transaction.rbi +56 -0
  219. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +151 -0
  220. data/rbi/stripe/resources/customer_session.rbi +200 -0
  221. data/rbi/stripe/resources/discount.rbi +53 -0
  222. data/rbi/stripe/resources/dispute.rbi +761 -0
  223. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +58 -0
  224. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +23 -0
  225. data/rbi/stripe/resources/entitlements/feature.rbi +117 -0
  226. data/rbi/stripe/resources/ephemeral_key.rbi +44 -0
  227. data/rbi/stripe/resources/event.rbi +149 -0
  228. data/rbi/stripe/resources/exchange_rate.rbi +66 -0
  229. data/rbi/stripe/resources/file.rbi +143 -0
  230. data/rbi/stripe/resources/file_link.rbi +141 -0
  231. data/rbi/stripe/resources/financial_connections/account.rbi +339 -0
  232. data/rbi/stripe/resources/financial_connections/account_owner.rbi +35 -0
  233. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +23 -0
  234. data/rbi/stripe/resources/financial_connections/session.rbi +123 -0
  235. data/rbi/stripe/resources/financial_connections/transaction.rbi +124 -0
  236. data/rbi/stripe/resources/forwarding/request.rbi +216 -0
  237. data/rbi/stripe/resources/funding_instructions.rbi +437 -0
  238. data/rbi/stripe/resources/identity/verification_report.rbi +360 -0
  239. data/rbi/stripe/resources/identity/verification_session.rbi +526 -0
  240. data/rbi/stripe/resources/invoice.rbi +3812 -0
  241. data/rbi/stripe/resources/invoice_item.rbi +473 -0
  242. data/rbi/stripe/resources/invoice_line_item.rbi +432 -0
  243. data/rbi/stripe/resources/invoice_payment.rbi +121 -0
  244. data/rbi/stripe/resources/invoice_rendering_template.rbi +104 -0
  245. data/rbi/stripe/resources/issuing/authorization.rbi +1283 -0
  246. data/rbi/stripe/resources/issuing/card.rbi +741 -0
  247. data/rbi/stripe/resources/issuing/cardholder.rbi +744 -0
  248. data/rbi/stripe/resources/issuing/dispute.rbi +913 -0
  249. data/rbi/stripe/resources/issuing/personalization_design.rbi +338 -0
  250. data/rbi/stripe/resources/issuing/physical_bundle.rbi +79 -0
  251. data/rbi/stripe/resources/issuing/token.rbi +226 -0
  252. data/rbi/stripe/resources/issuing/transaction.rbi +1061 -0
  253. data/rbi/stripe/resources/line_item.rbi +72 -0
  254. data/rbi/stripe/resources/login_link.rbi +19 -0
  255. data/rbi/stripe/resources/mandate.rbi +187 -0
  256. data/rbi/stripe/resources/payment_intent.rbi +9647 -0
  257. data/rbi/stripe/resources/payment_link.rbi +1801 -0
  258. data/rbi/stripe/resources/payment_method.rbi +1761 -0
  259. data/rbi/stripe/resources/payment_method_configuration.rbi +3550 -0
  260. data/rbi/stripe/resources/payment_method_domain.rbi +228 -0
  261. data/rbi/stripe/resources/payout.rbi +300 -0
  262. data/rbi/stripe/resources/person.rbi +401 -0
  263. data/rbi/stripe/resources/plan.rbi +371 -0
  264. data/rbi/stripe/resources/price.rbi +694 -0
  265. data/rbi/stripe/resources/product.rbi +555 -0
  266. data/rbi/stripe/resources/product_feature.rbi +26 -0
  267. data/rbi/stripe/resources/promotion_code.rbi +261 -0
  268. data/rbi/stripe/resources/quote.rbi +1126 -0
  269. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +98 -0
  270. data/rbi/stripe/resources/radar/value_list.rbi +168 -0
  271. data/rbi/stripe/resources/radar/value_list_item.rbi +129 -0
  272. data/rbi/stripe/resources/refund.rbi +523 -0
  273. data/rbi/stripe/resources/reporting/report_run.rbi +191 -0
  274. data/rbi/stripe/resources/reporting/report_type.rbi +57 -0
  275. data/rbi/stripe/resources/reserve_transaction.rbi +23 -0
  276. data/rbi/stripe/resources/reversal.rbi +51 -0
  277. data/rbi/stripe/resources/review.rbi +154 -0
  278. data/rbi/stripe/resources/setup_attempt.rbi +477 -0
  279. data/rbi/stripe/resources/setup_intent.rbi +3655 -0
  280. data/rbi/stripe/resources/shipping_rate.rbi +305 -0
  281. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +75 -0
  282. data/rbi/stripe/resources/source.rbi +1496 -0
  283. data/rbi/stripe/resources/source_mandate_notification.rbi +77 -0
  284. data/rbi/stripe/resources/source_transaction.rbi +127 -0
  285. data/rbi/stripe/resources/subscription.rbi +2027 -0
  286. data/rbi/stripe/resources/subscription_item.rbi +404 -0
  287. data/rbi/stripe/resources/subscription_schedule.rbi +1623 -0
  288. data/rbi/stripe/resources/tax/calculation.rbi +478 -0
  289. data/rbi/stripe/resources/tax/calculation_line_item.rbi +91 -0
  290. data/rbi/stripe/resources/tax/registration.rbi +2713 -0
  291. data/rbi/stripe/resources/tax/settings.rbi +141 -0
  292. data/rbi/stripe/resources/tax/transaction.rbi +351 -0
  293. data/rbi/stripe/resources/tax/transaction_line_item.rbi +54 -0
  294. data/rbi/stripe/resources/tax_code.rbi +44 -0
  295. data/rbi/stripe/resources/tax_deducted_at_source.rbi +23 -0
  296. data/rbi/stripe/resources/tax_id.rbi +165 -0
  297. data/rbi/stripe/resources/tax_rate.rbi +239 -0
  298. data/rbi/stripe/resources/terminal/configuration.rbi +1386 -0
  299. data/rbi/stripe/resources/terminal/connection_token.rbi +37 -0
  300. data/rbi/stripe/resources/terminal/location.rbi +222 -0
  301. data/rbi/stripe/resources/terminal/reader.rbi +847 -0
  302. data/rbi/stripe/resources/test_helpers/test_clock.rbi +132 -0
  303. data/rbi/stripe/resources/token.rbi +1283 -0
  304. data/rbi/stripe/resources/topup.rbi +222 -0
  305. data/rbi/stripe/resources/transfer.rbi +199 -0
  306. data/rbi/stripe/resources/treasury/credit_reversal.rbi +119 -0
  307. data/rbi/stripe/resources/treasury/debit_reversal.rbi +131 -0
  308. data/rbi/stripe/resources/treasury/financial_account.rbi +865 -0
  309. data/rbi/stripe/resources/treasury/financial_account_features.rbi +260 -0
  310. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +295 -0
  311. data/rbi/stripe/resources/treasury/outbound_payment.rbi +592 -0
  312. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +431 -0
  313. data/rbi/stripe/resources/treasury/received_credit.rbi +302 -0
  314. data/rbi/stripe/resources/treasury/received_debit.rbi +256 -0
  315. data/rbi/stripe/resources/treasury/transaction.rbi +215 -0
  316. data/rbi/stripe/resources/treasury/transaction_entry.rbi +192 -0
  317. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  318. data/rbi/stripe/resources/v2/billing/meter_event.rbi +37 -0
  319. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +41 -0
  320. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +31 -0
  321. data/rbi/stripe/resources/v2/event.rbi +48 -0
  322. data/rbi/stripe/resources/v2/event_destination.rbi +91 -0
  323. data/rbi/stripe/resources/webhook_endpoint.rbi +168 -0
  324. data/rbi/stripe/services/account_capability_service.rbi +51 -0
  325. data/{lib/stripe/services/external_account_service.rb → rbi/stripe/services/account_external_account_service.rbi} +124 -138
  326. data/rbi/stripe/services/account_link_service.rbi +58 -0
  327. data/rbi/stripe/services/account_login_link_service.rbi +22 -0
  328. data/rbi/stripe/services/account_person_service.rbi +1011 -0
  329. data/rbi/stripe/services/account_service.rbi +4213 -0
  330. data/rbi/stripe/services/account_session_service.rbi +646 -0
  331. data/rbi/stripe/services/apple_pay_domain_service.rbi +76 -0
  332. data/rbi/stripe/services/application_fee_refund_service.rbi +93 -0
  333. data/rbi/stripe/services/application_fee_service.rbi +78 -0
  334. data/rbi/stripe/services/apps/secret_service.rbi +151 -0
  335. data/rbi/stripe/services/apps_service.rbi +9 -0
  336. data/rbi/stripe/services/balance_service.rbi +21 -0
  337. data/rbi/stripe/services/balance_transaction_service.rbi +93 -0
  338. data/rbi/stripe/services/billing/alert_service.rbi +152 -0
  339. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +68 -0
  340. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +59 -0
  341. data/rbi/stripe/services/billing/credit_grant_service.rbi +211 -0
  342. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +42 -0
  343. data/rbi/stripe/services/billing/meter_event_service.rbi +42 -0
  344. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +54 -0
  345. data/rbi/stripe/services/billing/meter_service.rbi +163 -0
  346. data/rbi/stripe/services/billing_portal/configuration_service.rbi +511 -0
  347. data/rbi/stripe/services/billing_portal/session_service.rbi +204 -0
  348. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  349. data/rbi/stripe/services/billing_service.rbi +15 -0
  350. data/rbi/stripe/services/charge_service.rbi +448 -0
  351. data/rbi/stripe/services/checkout/session_line_item_service.rbi +33 -0
  352. data/rbi/stripe/services/checkout/session_service.rbi +2614 -0
  353. data/rbi/stripe/services/checkout_service.rbi +9 -0
  354. data/rbi/stripe/services/climate/order_service.rbi +142 -0
  355. data/rbi/stripe/services/climate/product_service.rbi +46 -0
  356. data/{lib/stripe/services/financial_connections/institution_service.rb → rbi/stripe/services/climate/supplier_service.rbi} +25 -36
  357. data/rbi/stripe/services/climate_service.rbi +11 -0
  358. data/rbi/stripe/services/confirmation_token_service.rbi +20 -0
  359. data/rbi/stripe/services/country_spec_service.rbi +44 -0
  360. data/rbi/stripe/services/coupon_service.rbi +194 -0
  361. data/{lib/stripe/services/quote_preview_invoice_service.rb → rbi/stripe/services/credit_note_line_item_service.rbi} +16 -20
  362. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +167 -0
  363. data/rbi/stripe/services/credit_note_service.rbi +415 -0
  364. data/rbi/stripe/services/customer_balance_transaction_service.rbi +92 -0
  365. data/rbi/stripe/services/customer_cash_balance_service.rbi +45 -0
  366. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +44 -0
  367. data/rbi/stripe/services/customer_funding_instructions_service.rbi +59 -0
  368. data/rbi/stripe/services/customer_payment_method_service.rbi +57 -0
  369. data/rbi/stripe/services/customer_payment_source_service.rbi +232 -0
  370. data/rbi/stripe/services/customer_service.rbi +647 -0
  371. data/rbi/stripe/services/customer_session_service.rbi +116 -0
  372. data/rbi/stripe/services/customer_tax_id_service.rbi +70 -0
  373. data/rbi/stripe/services/dispute_service.rbi +424 -0
  374. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +55 -0
  375. data/rbi/stripe/services/entitlements/feature_service.rbi +107 -0
  376. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  377. data/rbi/stripe/services/ephemeral_key_service.rbi +53 -0
  378. data/rbi/stripe/services/event_service.rbi +83 -0
  379. data/rbi/stripe/services/exchange_rate_service.rbi +44 -0
  380. data/rbi/stripe/services/file_link_service.rbi +124 -0
  381. data/rbi/stripe/services/file_service.rbi +116 -0
  382. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +42 -0
  383. data/rbi/stripe/services/financial_connections/account_service.rbi +133 -0
  384. data/rbi/stripe/services/financial_connections/session_service.rbi +88 -0
  385. data/rbi/stripe/services/financial_connections/transaction_service.rbi +92 -0
  386. data/rbi/stripe/services/financial_connections_service.rbi +11 -0
  387. data/rbi/stripe/services/forwarding/request_service.rbi +134 -0
  388. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  389. data/rbi/stripe/services/identity/verification_report_service.rbi +87 -0
  390. data/rbi/stripe/services/identity/verification_session_service.rbi +323 -0
  391. data/rbi/stripe/services/identity_service.rbi +10 -0
  392. data/rbi/stripe/services/invoice_item_service.rbi +366 -0
  393. data/rbi/stripe/services/invoice_line_item_service.rbi +259 -0
  394. data/rbi/stripe/services/invoice_payment_service.rbi +71 -0
  395. data/rbi/stripe/services/invoice_rendering_template_service.rbi +82 -0
  396. data/rbi/stripe/services/invoice_service.rbi +2981 -0
  397. data/rbi/stripe/services/issuing/authorization_service.rbi +146 -0
  398. data/rbi/stripe/services/issuing/card_service.rbi +495 -0
  399. data/rbi/stripe/services/issuing/cardholder_service.rbi +587 -0
  400. data/rbi/stripe/services/issuing/dispute_service.rbi +707 -0
  401. data/rbi/stripe/services/issuing/personalization_design_service.rbi +243 -0
  402. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +59 -0
  403. data/rbi/stripe/services/issuing/token_service.rbi +99 -0
  404. data/rbi/stripe/services/issuing/transaction_service.rbi +105 -0
  405. data/rbi/stripe/services/issuing_service.rbi +16 -0
  406. data/rbi/stripe/services/mandate_service.rbi +20 -0
  407. data/rbi/stripe/services/payment_intent_service.rbi +7659 -0
  408. data/{lib/stripe/services/payment_intent_amount_details_line_item_service.rb → rbi/stripe/services/payment_link_line_item_service.rbi} +16 -20
  409. data/rbi/stripe/services/payment_link_service.rbi +1352 -0
  410. data/rbi/stripe/services/payment_method_configuration_service.rbi +2487 -0
  411. data/rbi/stripe/services/payment_method_domain_service.rbi +112 -0
  412. data/rbi/stripe/services/payment_method_service.rbi +776 -0
  413. data/rbi/stripe/services/payout_service.rbi +205 -0
  414. data/rbi/stripe/services/plan_service.rbi +282 -0
  415. data/rbi/stripe/services/price_service.rbi +546 -0
  416. data/rbi/stripe/services/product_feature_service.rbi +67 -0
  417. data/rbi/stripe/services/product_service.rbi +477 -0
  418. data/rbi/stripe/services/promotion_code_service.rbi +214 -0
  419. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +31 -0
  420. data/{lib/stripe/services/order_line_item_service.rb → rbi/stripe/services/quote_line_item_service.rbi} +16 -20
  421. data/rbi/stripe/services/quote_service.rbi +686 -0
  422. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +85 -0
  423. data/rbi/stripe/services/radar/value_list_item_service.rbi +109 -0
  424. data/rbi/stripe/services/radar/value_list_service.rbi +141 -0
  425. data/rbi/stripe/services/radar_service.rbi +11 -0
  426. data/rbi/stripe/services/refund_service.rbi +185 -0
  427. data/rbi/stripe/services/reporting/report_run_service.rbi +135 -0
  428. data/rbi/stripe/services/reporting/report_type_service.rbi +35 -0
  429. data/rbi/stripe/services/reporting_service.rbi +10 -0
  430. data/rbi/stripe/services/review_service.rbi +84 -0
  431. data/rbi/stripe/services/setup_attempt_service.rbi +65 -0
  432. data/rbi/stripe/services/setup_intent_service.rbi +3391 -0
  433. data/rbi/stripe/services/shipping_rate_service.rbi +241 -0
  434. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +46 -0
  435. data/rbi/stripe/services/sigma_service.rbi +9 -0
  436. data/rbi/stripe/services/source_service.rbi +663 -0
  437. data/{lib/stripe/services/quote_line_service.rb → rbi/stripe/services/source_transaction_service.rbi} +16 -20
  438. data/rbi/stripe/services/subscription_item_service.rbi +350 -0
  439. data/rbi/stripe/services/subscription_schedule_service.rbi +1290 -0
  440. data/rbi/stripe/services/subscription_service.rbi +1648 -0
  441. data/{lib/stripe/services/financial_connections/account_inferred_balance_service.rb → rbi/stripe/services/tax/calculation_line_item_service.rbi} +17 -21
  442. data/rbi/stripe/services/tax/calculation_service.rbi +234 -0
  443. data/rbi/stripe/services/tax/registration_service.rbi +1845 -0
  444. data/rbi/stripe/services/tax/settings_service.rbi +93 -0
  445. data/{lib/stripe/services/privacy/redaction_job_validation_error_service.rb → rbi/stripe/services/tax/transaction_line_item_service.rbi} +17 -21
  446. data/rbi/stripe/services/tax/transaction_service.rbi +146 -0
  447. data/rbi/stripe/services/tax_code_service.rbi +44 -0
  448. data/rbi/stripe/services/tax_id_service.rbi +110 -0
  449. data/rbi/stripe/services/tax_rate_service.rbi +185 -0
  450. data/rbi/stripe/services/tax_service.rbi +12 -0
  451. data/rbi/stripe/services/terminal/configuration_service.rbi +1118 -0
  452. data/rbi/stripe/services/terminal/connection_token_service.rbi +25 -0
  453. data/rbi/stripe/services/terminal/location_service.rbi +182 -0
  454. data/rbi/stripe/services/terminal/reader_service.rbi +455 -0
  455. data/rbi/stripe/services/terminal_service.rbi +12 -0
  456. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +739 -0
  457. data/rbi/stripe/services/test_helpers/customer_service.rbi +33 -0
  458. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +848 -0
  459. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +76 -0
  460. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +69 -0
  461. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +711 -0
  462. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  463. data/rbi/stripe/services/test_helpers/refund_service.rbi +22 -0
  464. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +93 -0
  465. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  466. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +90 -0
  467. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +64 -0
  468. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +125 -0
  469. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +125 -0
  470. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +87 -0
  471. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +87 -0
  472. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  473. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  474. data/rbi/stripe/services/token_service.rbi +1257 -0
  475. data/rbi/stripe/services/topup_service.rbi +176 -0
  476. data/rbi/stripe/services/transfer_reversal_service.rbi +101 -0
  477. data/rbi/stripe/services/transfer_service.rbi +152 -0
  478. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +84 -0
  479. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +88 -0
  480. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +198 -0
  481. data/rbi/stripe/services/treasury/financial_account_service.rbi +562 -0
  482. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +117 -0
  483. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +304 -0
  484. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +157 -0
  485. data/rbi/stripe/services/treasury/received_credit_service.rbi +72 -0
  486. data/rbi/stripe/services/treasury/received_debit_service.rbi +59 -0
  487. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +111 -0
  488. data/rbi/stripe/services/treasury/transaction_service.rbi +122 -0
  489. data/rbi/stripe/services/treasury_service.rbi +18 -0
  490. data/rbi/stripe/services/v1_services.rbi +77 -0
  491. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +39 -0
  492. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +42 -0
  493. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +18 -0
  494. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +55 -0
  495. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  496. data/rbi/stripe/services/v2/core/event_destination_service.rbi +192 -0
  497. data/rbi/stripe/services/v2/core/event_service.rbi +36 -0
  498. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  499. data/rbi/stripe/services/v2_services.rbi +10 -0
  500. data/rbi/stripe/services/webhook_endpoint_service.rbi +129 -0
  501. data/stripe.gemspec +1 -4
  502. metadata +326 -158
  503. data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
  504. data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
  505. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
  506. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
  507. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
  508. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
  509. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
  510. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
  511. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
  512. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
  513. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
  514. data/lib/stripe/events/v2_core_account_link_completed_event.rb +0 -13
  515. data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
  516. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
  517. data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
  518. data/lib/stripe/events/v2_core_account_updated_event.rb +0 -21
  519. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
  520. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
  521. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
  522. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
  523. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
  524. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
  525. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
  526. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
  527. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
  528. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
  529. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
  530. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
  531. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
  532. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
  533. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
  534. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
  535. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
  536. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
  537. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
  538. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
  539. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
  540. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
  541. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
  542. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
  543. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
  544. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
  545. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
  546. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
  547. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
  548. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
  549. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
  550. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
  551. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
  552. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
  553. data/lib/stripe/resources/account_notice.rb +0 -123
  554. data/lib/stripe/resources/balance_settings.rb +0 -105
  555. data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
  556. data/lib/stripe/resources/capital/financing_offer.rb +0 -179
  557. data/lib/stripe/resources/capital/financing_summary.rb +0 -55
  558. data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
  559. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  560. data/lib/stripe/resources/financial_connections/institution.rb +0 -90
  561. data/lib/stripe/resources/fx_quote.rb +0 -184
  562. data/lib/stripe/resources/gift_cards/card.rb +0 -208
  563. data/lib/stripe/resources/gift_cards/transaction.rb +0 -272
  564. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
  565. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
  566. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
  567. data/lib/stripe/resources/issuing/settlement.rb +0 -53
  568. data/lib/stripe/resources/margin.rb +0 -115
  569. data/lib/stripe/resources/order.rb +0 -2859
  570. data/lib/stripe/resources/payment_attempt_record.rb +0 -1078
  571. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -65
  572. data/lib/stripe/resources/payment_record.rb +0 -1607
  573. data/lib/stripe/resources/privacy/redaction_job.rb +0 -275
  574. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -25
  575. data/lib/stripe/resources/quote_line.rb +0 -274
  576. data/lib/stripe/resources/quote_preview_invoice.rb +0 -663
  577. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -339
  578. data/lib/stripe/resources/tax/association.rb +0 -89
  579. data/lib/stripe/resources/tax/form.rb +0 -211
  580. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
  581. data/lib/stripe/resources/v2/core/account.rb +0 -1746
  582. data/lib/stripe/resources/v2/core/account_link.rb +0 -56
  583. data/lib/stripe/resources/v2/core/person.rb +0 -276
  584. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
  585. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
  586. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
  587. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
  588. data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
  589. data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -58
  590. data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
  591. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
  592. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
  593. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
  594. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
  595. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
  596. data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -75
  597. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
  598. data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -136
  599. data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -108
  600. data/lib/stripe/resources/v2/money_management/transaction.rb +0 -78
  601. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -68
  602. data/lib/stripe/services/account_notice_service.rb +0 -101
  603. data/lib/stripe/services/balance_settings_service.rb +0 -96
  604. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  605. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  606. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  607. data/lib/stripe/services/capital_service.rb +0 -15
  608. data/lib/stripe/services/fx_quote_service.rb +0 -123
  609. data/lib/stripe/services/gift_cards/card_service.rb +0 -170
  610. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
  611. data/lib/stripe/services/gift_cards_service.rb +0 -14
  612. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  613. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  614. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  615. data/lib/stripe/services/margin_service.rb +0 -119
  616. data/lib/stripe/services/order_service.rb +0 -2268
  617. data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
  618. data/lib/stripe/services/payment_record_service.rb +0 -542
  619. data/lib/stripe/services/privacy/redaction_job_service.rb +0 -231
  620. data/lib/stripe/services/privacy_service.rb +0 -13
  621. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
  622. data/lib/stripe/services/tax/association_service.rb +0 -31
  623. data/lib/stripe/services/tax/form_service.rb +0 -100
  624. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  625. data/lib/stripe/services/v2/core/account_link_service.rb +0 -76
  626. data/lib/stripe/services/v2/core/account_service.rb +0 -4138
  627. data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1048
  628. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -135
  629. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -109
  630. data/lib/stripe/services/v2/core/vault_service.rb +0 -18
  631. data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -75
  632. data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -44
  633. data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -81
  634. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -126
  635. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -96
  636. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -202
  637. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -237
  638. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -174
  639. data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -95
  640. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
  641. data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -71
  642. data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -44
  643. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -70
  644. data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -74
  645. data/lib/stripe/services/v2/money_management_service.rb +0 -31
  646. data/lib/stripe/services/v2/test_helper_service.rb +0 -15
  647. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -50
  648. data/rbi/stripe.rbi +0 -191867
@@ -0,0 +1,1623 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ # typed: true
5
+ module Stripe
6
+ # A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.
7
+ #
8
+ # Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules)
9
+ class SubscriptionSchedule < APIResource
10
+ class CurrentPhase < Stripe::StripeObject
11
+ # The end of this phase of the subscription schedule.
12
+ sig { returns(Integer) }
13
+ attr_reader :end_date
14
+ # The start of this phase of the subscription schedule.
15
+ sig { returns(Integer) }
16
+ attr_reader :start_date
17
+ end
18
+ class DefaultSettings < Stripe::StripeObject
19
+ class AutomaticTax < Stripe::StripeObject
20
+ class Liability < Stripe::StripeObject
21
+ # The connected account being referenced when `type` is `account`.
22
+ sig { returns(T.any(String, Stripe::Account)) }
23
+ attr_reader :account
24
+ # Type of the account referenced.
25
+ sig { returns(String) }
26
+ attr_reader :type
27
+ end
28
+ # If Stripe disabled automatic tax, this enum describes why.
29
+ sig { returns(T.nilable(String)) }
30
+ attr_reader :disabled_reason
31
+ # Whether Stripe automatically computes tax on invoices created during this phase.
32
+ sig { returns(T::Boolean) }
33
+ attr_reader :enabled
34
+ # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
35
+ sig { returns(T.nilable(Liability)) }
36
+ attr_reader :liability
37
+ end
38
+ class BillingThresholds < Stripe::StripeObject
39
+ # Monetary threshold that triggers the subscription to create an invoice
40
+ sig { returns(T.nilable(Integer)) }
41
+ attr_reader :amount_gte
42
+ # 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`.
43
+ sig { returns(T.nilable(T::Boolean)) }
44
+ attr_reader :reset_billing_cycle_anchor
45
+ end
46
+ class InvoiceSettings < Stripe::StripeObject
47
+ class Issuer < Stripe::StripeObject
48
+ # The connected account being referenced when `type` is `account`.
49
+ sig { returns(T.any(String, Stripe::Account)) }
50
+ attr_reader :account
51
+ # Type of the account referenced.
52
+ sig { returns(String) }
53
+ attr_reader :type
54
+ end
55
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
56
+ sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
57
+ attr_reader :account_tax_ids
58
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
59
+ sig { returns(T.nilable(Integer)) }
60
+ attr_reader :days_until_due
61
+ # Attribute for field issuer
62
+ sig { returns(Issuer) }
63
+ attr_reader :issuer
64
+ end
65
+ class TransferData < Stripe::StripeObject
66
+ # 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 destination account. By default, the entire amount is transferred to the destination.
67
+ sig { returns(T.nilable(Float)) }
68
+ attr_reader :amount_percent
69
+ # The account where funds from the payment will be transferred to upon payment success.
70
+ sig { returns(T.any(String, Stripe::Account)) }
71
+ attr_reader :destination
72
+ end
73
+ # 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.
74
+ sig { returns(T.nilable(Float)) }
75
+ attr_reader :application_fee_percent
76
+ # Attribute for field automatic_tax
77
+ sig { returns(AutomaticTax) }
78
+ attr_reader :automatic_tax
79
+ # 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).
80
+ sig { returns(String) }
81
+ attr_reader :billing_cycle_anchor
82
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
83
+ sig { returns(T.nilable(BillingThresholds)) }
84
+ attr_reader :billing_thresholds
85
+ # 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`.
86
+ sig { returns(T.nilable(String)) }
87
+ attr_reader :collection_method
88
+ # 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.
89
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
90
+ attr_reader :default_payment_method
91
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
92
+ sig { returns(T.nilable(String)) }
93
+ attr_reader :description
94
+ # Attribute for field invoice_settings
95
+ sig { returns(InvoiceSettings) }
96
+ attr_reader :invoice_settings
97
+ # 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.
98
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
99
+ attr_reader :on_behalf_of
100
+ # 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.
101
+ sig { returns(T.nilable(TransferData)) }
102
+ attr_reader :transfer_data
103
+ end
104
+ class Phase < Stripe::StripeObject
105
+ class AddInvoiceItem < Stripe::StripeObject
106
+ class Discount < Stripe::StripeObject
107
+ # ID of the coupon to create a new discount for.
108
+ sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
109
+ attr_reader :coupon
110
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
111
+ sig { returns(T.nilable(T.any(String, Stripe::Discount))) }
112
+ attr_reader :discount
113
+ # ID of the promotion code to create a new discount for.
114
+ sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
115
+ attr_reader :promotion_code
116
+ end
117
+ # The stackable discounts that will be applied to the item.
118
+ sig { returns(T::Array[Discount]) }
119
+ attr_reader :discounts
120
+ # ID of the price used to generate the invoice item.
121
+ sig { returns(T.any(String, Stripe::Price)) }
122
+ attr_reader :price
123
+ # The quantity of the invoice item.
124
+ sig { returns(T.nilable(Integer)) }
125
+ attr_reader :quantity
126
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
127
+ sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
128
+ attr_reader :tax_rates
129
+ end
130
+ class AutomaticTax < Stripe::StripeObject
131
+ class Liability < Stripe::StripeObject
132
+ # The connected account being referenced when `type` is `account`.
133
+ sig { returns(T.any(String, Stripe::Account)) }
134
+ attr_reader :account
135
+ # Type of the account referenced.
136
+ sig { returns(String) }
137
+ attr_reader :type
138
+ end
139
+ # If Stripe disabled automatic tax, this enum describes why.
140
+ sig { returns(T.nilable(String)) }
141
+ attr_reader :disabled_reason
142
+ # Whether Stripe automatically computes tax on invoices created during this phase.
143
+ sig { returns(T::Boolean) }
144
+ attr_reader :enabled
145
+ # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
146
+ sig { returns(T.nilable(Liability)) }
147
+ attr_reader :liability
148
+ end
149
+ class BillingThresholds < Stripe::StripeObject
150
+ # Monetary threshold that triggers the subscription to create an invoice
151
+ sig { returns(T.nilable(Integer)) }
152
+ attr_reader :amount_gte
153
+ # 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`.
154
+ sig { returns(T.nilable(T::Boolean)) }
155
+ attr_reader :reset_billing_cycle_anchor
156
+ end
157
+ class Discount < Stripe::StripeObject
158
+ # ID of the coupon to create a new discount for.
159
+ sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
160
+ attr_reader :coupon
161
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
162
+ sig { returns(T.nilable(T.any(String, Stripe::Discount))) }
163
+ attr_reader :discount
164
+ # ID of the promotion code to create a new discount for.
165
+ sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
166
+ attr_reader :promotion_code
167
+ end
168
+ class InvoiceSettings < Stripe::StripeObject
169
+ class Issuer < Stripe::StripeObject
170
+ # The connected account being referenced when `type` is `account`.
171
+ sig { returns(T.any(String, Stripe::Account)) }
172
+ attr_reader :account
173
+ # Type of the account referenced.
174
+ sig { returns(String) }
175
+ attr_reader :type
176
+ end
177
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
178
+ sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
179
+ attr_reader :account_tax_ids
180
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
181
+ sig { returns(T.nilable(Integer)) }
182
+ attr_reader :days_until_due
183
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
184
+ sig { returns(T.nilable(Issuer)) }
185
+ attr_reader :issuer
186
+ end
187
+ class Item < Stripe::StripeObject
188
+ class BillingThresholds < Stripe::StripeObject
189
+ # Usage threshold that triggers the subscription to create an invoice
190
+ sig { returns(T.nilable(Integer)) }
191
+ attr_reader :usage_gte
192
+ end
193
+ class Discount < Stripe::StripeObject
194
+ # ID of the coupon to create a new discount for.
195
+ sig { returns(T.nilable(T.any(String, Stripe::Coupon))) }
196
+ attr_reader :coupon
197
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
198
+ sig { returns(T.nilable(T.any(String, Stripe::Discount))) }
199
+ attr_reader :discount
200
+ # ID of the promotion code to create a new discount for.
201
+ sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) }
202
+ attr_reader :promotion_code
203
+ end
204
+ # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
205
+ sig { returns(T.nilable(BillingThresholds)) }
206
+ attr_reader :billing_thresholds
207
+ # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
208
+ sig { returns(T::Array[Discount]) }
209
+ attr_reader :discounts
210
+ # 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.
211
+ sig { returns(T.nilable(T::Hash[String, String])) }
212
+ attr_reader :metadata
213
+ # ID of the plan to which the customer should be subscribed.
214
+ sig { returns(T.any(String, Stripe::Plan)) }
215
+ attr_reader :plan
216
+ # ID of the price to which the customer should be subscribed.
217
+ sig { returns(T.any(String, Stripe::Price)) }
218
+ attr_reader :price
219
+ # Quantity of the plan to which the customer should be subscribed.
220
+ sig { returns(Integer) }
221
+ attr_reader :quantity
222
+ # 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`.
223
+ sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
224
+ attr_reader :tax_rates
225
+ end
226
+ class TransferData < Stripe::StripeObject
227
+ # 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 destination account. By default, the entire amount is transferred to the destination.
228
+ sig { returns(T.nilable(Float)) }
229
+ attr_reader :amount_percent
230
+ # The account where funds from the payment will be transferred to upon payment success.
231
+ sig { returns(T.any(String, Stripe::Account)) }
232
+ attr_reader :destination
233
+ end
234
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
235
+ sig { returns(T::Array[AddInvoiceItem]) }
236
+ attr_reader :add_invoice_items
237
+ # 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.
238
+ sig { returns(T.nilable(Float)) }
239
+ attr_reader :application_fee_percent
240
+ # Attribute for field automatic_tax
241
+ sig { returns(AutomaticTax) }
242
+ attr_reader :automatic_tax
243
+ # 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).
244
+ sig { returns(T.nilable(String)) }
245
+ attr_reader :billing_cycle_anchor
246
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
247
+ sig { returns(T.nilable(BillingThresholds)) }
248
+ attr_reader :billing_thresholds
249
+ # 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`.
250
+ sig { returns(T.nilable(String)) }
251
+ attr_reader :collection_method
252
+ # 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).
253
+ sig { returns(String) }
254
+ attr_reader :currency
255
+ # 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.
256
+ sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
257
+ attr_reader :default_payment_method
258
+ # The default tax rates to apply to the subscription during this phase of the subscription schedule.
259
+ sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
260
+ attr_reader :default_tax_rates
261
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
262
+ sig { returns(T.nilable(String)) }
263
+ attr_reader :description
264
+ # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
265
+ sig { returns(T::Array[Discount]) }
266
+ attr_reader :discounts
267
+ # The end of this phase of the subscription schedule.
268
+ sig { returns(Integer) }
269
+ attr_reader :end_date
270
+ # The invoice settings applicable during this phase.
271
+ sig { returns(T.nilable(InvoiceSettings)) }
272
+ attr_reader :invoice_settings
273
+ # Subscription items to configure the subscription to during this phase of the subscription schedule.
274
+ sig { returns(T::Array[Item]) }
275
+ attr_reader :items
276
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`.
277
+ sig { returns(T.nilable(T::Hash[String, String])) }
278
+ attr_reader :metadata
279
+ # 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.
280
+ sig { returns(T.nilable(T.any(String, Stripe::Account))) }
281
+ attr_reader :on_behalf_of
282
+ # When transitioning phases, controls how prorations are handled (if any). Possible values are `create_prorations`, `none`, and `always_invoice`.
283
+ sig { returns(String) }
284
+ attr_reader :proration_behavior
285
+ # The start of this phase of the subscription schedule.
286
+ sig { returns(Integer) }
287
+ attr_reader :start_date
288
+ # 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.
289
+ sig { returns(T.nilable(TransferData)) }
290
+ attr_reader :transfer_data
291
+ # When the trial ends within the phase.
292
+ sig { returns(T.nilable(Integer)) }
293
+ attr_reader :trial_end
294
+ end
295
+ # ID of the Connect Application that created the schedule.
296
+ sig { returns(T.nilable(T.any(String, Stripe::Application))) }
297
+ attr_reader :application
298
+ # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
299
+ sig { returns(T.nilable(Integer)) }
300
+ attr_reader :canceled_at
301
+ # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
302
+ sig { returns(T.nilable(Integer)) }
303
+ attr_reader :completed_at
304
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
305
+ sig { returns(Integer) }
306
+ attr_reader :created
307
+ # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.
308
+ sig { returns(T.nilable(CurrentPhase)) }
309
+ attr_reader :current_phase
310
+ # ID of the customer who owns the subscription schedule.
311
+ sig { returns(T.any(String, Stripe::Customer)) }
312
+ attr_reader :customer
313
+ # Attribute for field default_settings
314
+ sig { returns(DefaultSettings) }
315
+ attr_reader :default_settings
316
+ # 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.
317
+ sig { returns(String) }
318
+ attr_reader :end_behavior
319
+ # Unique identifier for the object.
320
+ sig { returns(String) }
321
+ attr_reader :id
322
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
323
+ sig { returns(T::Boolean) }
324
+ attr_reader :livemode
325
+ # 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.
326
+ sig { returns(T.nilable(T::Hash[String, String])) }
327
+ attr_reader :metadata
328
+ # String representing the object's type. Objects of the same type share the same value.
329
+ sig { returns(String) }
330
+ attr_reader :object
331
+ # Configuration for the subscription schedule's phases.
332
+ sig { returns(T::Array[Phase]) }
333
+ attr_reader :phases
334
+ # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
335
+ sig { returns(T.nilable(Integer)) }
336
+ attr_reader :released_at
337
+ # ID of the subscription once managed by the subscription schedule (if it is released).
338
+ sig { returns(T.nilable(String)) }
339
+ attr_reader :released_subscription
340
+ # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).
341
+ sig { returns(String) }
342
+ attr_reader :status
343
+ # ID of the subscription managed by the subscription schedule.
344
+ sig { returns(T.nilable(T.any(String, Stripe::Subscription))) }
345
+ attr_reader :subscription
346
+ # ID of the test clock this subscription schedule belongs to.
347
+ sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
348
+ attr_reader :test_clock
349
+ class ListParams < Stripe::RequestParams
350
+ class CanceledAt < Stripe::RequestParams
351
+ # Minimum value to filter by (exclusive)
352
+ sig { returns(T.nilable(Integer)) }
353
+ attr_accessor :gt
354
+ # Minimum value to filter by (inclusive)
355
+ sig { returns(T.nilable(Integer)) }
356
+ attr_accessor :gte
357
+ # Maximum value to filter by (exclusive)
358
+ sig { returns(T.nilable(Integer)) }
359
+ attr_accessor :lt
360
+ # Maximum value to filter by (inclusive)
361
+ sig { returns(T.nilable(Integer)) }
362
+ attr_accessor :lte
363
+ sig {
364
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
365
+ }
366
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
367
+ end
368
+ class CompletedAt < Stripe::RequestParams
369
+ # Minimum value to filter by (exclusive)
370
+ sig { returns(T.nilable(Integer)) }
371
+ attr_accessor :gt
372
+ # Minimum value to filter by (inclusive)
373
+ sig { returns(T.nilable(Integer)) }
374
+ attr_accessor :gte
375
+ # Maximum value to filter by (exclusive)
376
+ sig { returns(T.nilable(Integer)) }
377
+ attr_accessor :lt
378
+ # Maximum value to filter by (inclusive)
379
+ sig { returns(T.nilable(Integer)) }
380
+ attr_accessor :lte
381
+ sig {
382
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
383
+ }
384
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
385
+ end
386
+ class Created < Stripe::RequestParams
387
+ # Minimum value to filter by (exclusive)
388
+ sig { returns(T.nilable(Integer)) }
389
+ attr_accessor :gt
390
+ # Minimum value to filter by (inclusive)
391
+ sig { returns(T.nilable(Integer)) }
392
+ attr_accessor :gte
393
+ # Maximum value to filter by (exclusive)
394
+ sig { returns(T.nilable(Integer)) }
395
+ attr_accessor :lt
396
+ # Maximum value to filter by (inclusive)
397
+ sig { returns(T.nilable(Integer)) }
398
+ attr_accessor :lte
399
+ sig {
400
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
401
+ }
402
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
403
+ end
404
+ class ReleasedAt < Stripe::RequestParams
405
+ # Minimum value to filter by (exclusive)
406
+ sig { returns(T.nilable(Integer)) }
407
+ attr_accessor :gt
408
+ # Minimum value to filter by (inclusive)
409
+ sig { returns(T.nilable(Integer)) }
410
+ attr_accessor :gte
411
+ # Maximum value to filter by (exclusive)
412
+ sig { returns(T.nilable(Integer)) }
413
+ attr_accessor :lt
414
+ # Maximum value to filter by (inclusive)
415
+ sig { returns(T.nilable(Integer)) }
416
+ attr_accessor :lte
417
+ sig {
418
+ params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
419
+ }
420
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
421
+ end
422
+ # Only return subscription schedules that were created canceled the given date interval.
423
+ sig {
424
+ returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CanceledAt, Integer)))
425
+ }
426
+ attr_accessor :canceled_at
427
+ # Only return subscription schedules that completed during the given date interval.
428
+ sig {
429
+ returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CompletedAt, Integer)))
430
+ }
431
+ attr_accessor :completed_at
432
+ # Only return subscription schedules that were created during the given date interval.
433
+ sig {
434
+ returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::Created, Integer)))
435
+ }
436
+ attr_accessor :created
437
+ # Only return subscription schedules for the given customer.
438
+ sig { returns(T.nilable(String)) }
439
+ attr_accessor :customer
440
+ # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
441
+ sig { returns(T.nilable(String)) }
442
+ attr_accessor :ending_before
443
+ # Specifies which fields in the response should be expanded.
444
+ sig { returns(T.nilable(T::Array[String])) }
445
+ attr_accessor :expand
446
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
447
+ sig { returns(T.nilable(Integer)) }
448
+ attr_accessor :limit
449
+ # Only return subscription schedules that were released during the given date interval.
450
+ sig {
451
+ returns(T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::ReleasedAt, Integer)))
452
+ }
453
+ attr_accessor :released_at
454
+ # Only return subscription schedules that have not started yet.
455
+ sig { returns(T.nilable(T::Boolean)) }
456
+ attr_accessor :scheduled
457
+ # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
458
+ sig { returns(T.nilable(String)) }
459
+ attr_accessor :starting_after
460
+ sig {
461
+ params(canceled_at: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CanceledAt, Integer)), completed_at: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::CompletedAt, Integer)), created: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::Created, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), released_at: T.nilable(T.any(::Stripe::SubscriptionSchedule::ListParams::ReleasedAt, Integer)), scheduled: T.nilable(T::Boolean), starting_after: T.nilable(String)).void
462
+ }
463
+ def initialize(
464
+ canceled_at: nil,
465
+ completed_at: nil,
466
+ created: nil,
467
+ customer: nil,
468
+ ending_before: nil,
469
+ expand: nil,
470
+ limit: nil,
471
+ released_at: nil,
472
+ scheduled: nil,
473
+ starting_after: nil
474
+ ); end
475
+ end
476
+ class CreateParams < Stripe::RequestParams
477
+ class DefaultSettings < Stripe::RequestParams
478
+ class AutomaticTax < Stripe::RequestParams
479
+ class Liability < Stripe::RequestParams
480
+ # The connected account being referenced when `type` is `account`.
481
+ sig { returns(T.nilable(String)) }
482
+ attr_accessor :account
483
+ # Type of the account referenced in the request.
484
+ sig { returns(String) }
485
+ attr_accessor :type
486
+ sig { params(account: T.nilable(String), type: String).void }
487
+ def initialize(account: nil, type: nil); end
488
+ end
489
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
490
+ sig { returns(T::Boolean) }
491
+ attr_accessor :enabled
492
+ # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
493
+ sig {
494
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax::Liability))
495
+ }
496
+ attr_accessor :liability
497
+ sig {
498
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax::Liability)).void
499
+ }
500
+ def initialize(enabled: nil, liability: nil); end
501
+ end
502
+ class BillingThresholds < Stripe::RequestParams
503
+ # Monetary threshold that triggers the subscription to advance to a new billing period
504
+ sig { returns(T.nilable(Integer)) }
505
+ attr_accessor :amount_gte
506
+ # 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.
507
+ sig { returns(T.nilable(T::Boolean)) }
508
+ attr_accessor :reset_billing_cycle_anchor
509
+ sig {
510
+ params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
511
+ }
512
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
513
+ end
514
+ class InvoiceSettings < Stripe::RequestParams
515
+ class Issuer < Stripe::RequestParams
516
+ # The connected account being referenced when `type` is `account`.
517
+ sig { returns(T.nilable(String)) }
518
+ attr_accessor :account
519
+ # Type of the account referenced in the request.
520
+ sig { returns(String) }
521
+ attr_accessor :type
522
+ sig { params(account: T.nilable(String), type: String).void }
523
+ def initialize(account: nil, type: nil); end
524
+ end
525
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
526
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
527
+ attr_accessor :account_tax_ids
528
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
529
+ sig { returns(T.nilable(Integer)) }
530
+ attr_accessor :days_until_due
531
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
532
+ sig {
533
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings::Issuer))
534
+ }
535
+ attr_accessor :issuer
536
+ sig {
537
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings::Issuer)).void
538
+ }
539
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
540
+ end
541
+ class TransferData < Stripe::RequestParams
542
+ # 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 destination account. By default, the entire amount is transferred to the destination.
543
+ sig { returns(T.nilable(Float)) }
544
+ attr_accessor :amount_percent
545
+ # ID of an existing, connected Stripe account.
546
+ sig { returns(String) }
547
+ attr_accessor :destination
548
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
549
+ def initialize(amount_percent: nil, destination: nil); end
550
+ end
551
+ # 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).
552
+ sig { returns(T.nilable(Float)) }
553
+ attr_accessor :application_fee_percent
554
+ # Default settings for automatic tax computation.
555
+ sig {
556
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax))
557
+ }
558
+ attr_accessor :automatic_tax
559
+ # 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).
560
+ sig { returns(T.nilable(String)) }
561
+ attr_accessor :billing_cycle_anchor
562
+ # 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.
563
+ sig {
564
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::BillingThresholds))))
565
+ }
566
+ attr_accessor :billing_thresholds
567
+ # 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.
568
+ sig { returns(T.nilable(String)) }
569
+ attr_accessor :collection_method
570
+ # 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.
571
+ sig { returns(T.nilable(String)) }
572
+ attr_accessor :default_payment_method
573
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
574
+ sig { returns(T.nilable(T.nilable(String))) }
575
+ attr_accessor :description
576
+ # All invoices will be billed using the specified settings.
577
+ sig {
578
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings))
579
+ }
580
+ attr_accessor :invoice_settings
581
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
582
+ sig { returns(T.nilable(T.nilable(String))) }
583
+ attr_accessor :on_behalf_of
584
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
585
+ sig {
586
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData))))
587
+ }
588
+ attr_accessor :transfer_data
589
+ sig {
590
+ params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::BillingThresholds))), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData)))).void
591
+ }
592
+ def initialize(
593
+ application_fee_percent: nil,
594
+ automatic_tax: nil,
595
+ billing_cycle_anchor: nil,
596
+ billing_thresholds: nil,
597
+ collection_method: nil,
598
+ default_payment_method: nil,
599
+ description: nil,
600
+ invoice_settings: nil,
601
+ on_behalf_of: nil,
602
+ transfer_data: nil
603
+ ); end
604
+ end
605
+ class Phase < Stripe::RequestParams
606
+ class AddInvoiceItem < Stripe::RequestParams
607
+ class Discount < Stripe::RequestParams
608
+ # ID of the coupon to create a new discount for.
609
+ sig { returns(T.nilable(String)) }
610
+ attr_accessor :coupon
611
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
612
+ sig { returns(T.nilable(String)) }
613
+ attr_accessor :discount
614
+ # ID of the promotion code to create a new discount for.
615
+ sig { returns(T.nilable(String)) }
616
+ attr_accessor :promotion_code
617
+ sig {
618
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
619
+ }
620
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
621
+ end
622
+ class PriceData < Stripe::RequestParams
623
+ # 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).
624
+ sig { returns(String) }
625
+ attr_accessor :currency
626
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
627
+ sig { returns(String) }
628
+ attr_accessor :product
629
+ # 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.
630
+ sig { returns(T.nilable(String)) }
631
+ attr_accessor :tax_behavior
632
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
633
+ sig { returns(T.nilable(Integer)) }
634
+ attr_accessor :unit_amount
635
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
636
+ sig { returns(T.nilable(String)) }
637
+ attr_accessor :unit_amount_decimal
638
+ sig {
639
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
640
+ }
641
+ def initialize(
642
+ currency: nil,
643
+ product: nil,
644
+ tax_behavior: nil,
645
+ unit_amount: nil,
646
+ unit_amount_decimal: nil
647
+ ); end
648
+ end
649
+ # The coupons to redeem into discounts for the item.
650
+ sig {
651
+ returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount]))
652
+ }
653
+ attr_accessor :discounts
654
+ # The ID of the price object. One of `price` or `price_data` is required.
655
+ sig { returns(T.nilable(String)) }
656
+ attr_accessor :price
657
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
658
+ sig {
659
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::PriceData))
660
+ }
661
+ attr_accessor :price_data
662
+ # Quantity for this item. Defaults to 1.
663
+ sig { returns(T.nilable(Integer)) }
664
+ attr_accessor :quantity
665
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
666
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
667
+ attr_accessor :tax_rates
668
+ sig {
669
+ params(discounts: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
670
+ }
671
+ def initialize(
672
+ discounts: nil,
673
+ price: nil,
674
+ price_data: nil,
675
+ quantity: nil,
676
+ tax_rates: nil
677
+ ); end
678
+ end
679
+ class AutomaticTax < Stripe::RequestParams
680
+ class Liability < Stripe::RequestParams
681
+ # The connected account being referenced when `type` is `account`.
682
+ sig { returns(T.nilable(String)) }
683
+ attr_accessor :account
684
+ # Type of the account referenced in the request.
685
+ sig { returns(String) }
686
+ attr_accessor :type
687
+ sig { params(account: T.nilable(String), type: String).void }
688
+ def initialize(account: nil, type: nil); end
689
+ end
690
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
691
+ sig { returns(T::Boolean) }
692
+ attr_accessor :enabled
693
+ # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
694
+ sig {
695
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax::Liability))
696
+ }
697
+ attr_accessor :liability
698
+ sig {
699
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax::Liability)).void
700
+ }
701
+ def initialize(enabled: nil, liability: nil); end
702
+ end
703
+ class BillingThresholds < Stripe::RequestParams
704
+ # Monetary threshold that triggers the subscription to advance to a new billing period
705
+ sig { returns(T.nilable(Integer)) }
706
+ attr_accessor :amount_gte
707
+ # 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.
708
+ sig { returns(T.nilable(T::Boolean)) }
709
+ attr_accessor :reset_billing_cycle_anchor
710
+ sig {
711
+ params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
712
+ }
713
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
714
+ end
715
+ class Discount < Stripe::RequestParams
716
+ # ID of the coupon to create a new discount for.
717
+ sig { returns(T.nilable(String)) }
718
+ attr_accessor :coupon
719
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
720
+ sig { returns(T.nilable(String)) }
721
+ attr_accessor :discount
722
+ # ID of the promotion code to create a new discount for.
723
+ sig { returns(T.nilable(String)) }
724
+ attr_accessor :promotion_code
725
+ sig {
726
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
727
+ }
728
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
729
+ end
730
+ class InvoiceSettings < Stripe::RequestParams
731
+ class Issuer < Stripe::RequestParams
732
+ # The connected account being referenced when `type` is `account`.
733
+ sig { returns(T.nilable(String)) }
734
+ attr_accessor :account
735
+ # Type of the account referenced in the request.
736
+ sig { returns(String) }
737
+ attr_accessor :type
738
+ sig { params(account: T.nilable(String), type: String).void }
739
+ def initialize(account: nil, type: nil); end
740
+ end
741
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
742
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
743
+ attr_accessor :account_tax_ids
744
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
745
+ sig { returns(T.nilable(Integer)) }
746
+ attr_accessor :days_until_due
747
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
748
+ sig {
749
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings::Issuer))
750
+ }
751
+ attr_accessor :issuer
752
+ sig {
753
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings::Issuer)).void
754
+ }
755
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
756
+ end
757
+ class Item < Stripe::RequestParams
758
+ class BillingThresholds < Stripe::RequestParams
759
+ # 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))
760
+ sig { returns(Integer) }
761
+ attr_accessor :usage_gte
762
+ sig { params(usage_gte: Integer).void }
763
+ def initialize(usage_gte: nil); end
764
+ end
765
+ class Discount < Stripe::RequestParams
766
+ # ID of the coupon to create a new discount for.
767
+ sig { returns(T.nilable(String)) }
768
+ attr_accessor :coupon
769
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
770
+ sig { returns(T.nilable(String)) }
771
+ attr_accessor :discount
772
+ # ID of the promotion code to create a new discount for.
773
+ sig { returns(T.nilable(String)) }
774
+ attr_accessor :promotion_code
775
+ sig {
776
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
777
+ }
778
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
779
+ end
780
+ class PriceData < Stripe::RequestParams
781
+ class Recurring < Stripe::RequestParams
782
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
783
+ sig { returns(String) }
784
+ attr_accessor :interval
785
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
786
+ sig { returns(T.nilable(Integer)) }
787
+ attr_accessor :interval_count
788
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
789
+ def initialize(interval: nil, interval_count: nil); end
790
+ end
791
+ # 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).
792
+ sig { returns(String) }
793
+ attr_accessor :currency
794
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
795
+ sig { returns(String) }
796
+ attr_accessor :product
797
+ # The recurring components of a price such as `interval` and `interval_count`.
798
+ sig {
799
+ returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData::Recurring)
800
+ }
801
+ attr_accessor :recurring
802
+ # 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.
803
+ sig { returns(T.nilable(String)) }
804
+ attr_accessor :tax_behavior
805
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
806
+ sig { returns(T.nilable(Integer)) }
807
+ attr_accessor :unit_amount
808
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
809
+ sig { returns(T.nilable(String)) }
810
+ attr_accessor :unit_amount_decimal
811
+ sig {
812
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
813
+ }
814
+ def initialize(
815
+ currency: nil,
816
+ product: nil,
817
+ recurring: nil,
818
+ tax_behavior: nil,
819
+ unit_amount: nil,
820
+ unit_amount_decimal: nil
821
+ ); end
822
+ end
823
+ # 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.
824
+ sig {
825
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::BillingThresholds))))
826
+ }
827
+ attr_accessor :billing_thresholds
828
+ # The coupons to redeem into discounts for the subscription item.
829
+ sig {
830
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount]))))
831
+ }
832
+ attr_accessor :discounts
833
+ # 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`.
834
+ sig { returns(T.nilable(T::Hash[String, String])) }
835
+ attr_accessor :metadata
836
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
837
+ sig { returns(T.nilable(String)) }
838
+ attr_accessor :plan
839
+ # The ID of the price object.
840
+ sig { returns(T.nilable(String)) }
841
+ attr_accessor :price
842
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
843
+ sig {
844
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData))
845
+ }
846
+ attr_accessor :price_data
847
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
848
+ sig { returns(T.nilable(Integer)) }
849
+ attr_accessor :quantity
850
+ # 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.
851
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
852
+ attr_accessor :tax_rates
853
+ sig {
854
+ params(billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::BillingThresholds))), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
855
+ }
856
+ def initialize(
857
+ billing_thresholds: nil,
858
+ discounts: nil,
859
+ metadata: nil,
860
+ plan: nil,
861
+ price: nil,
862
+ price_data: nil,
863
+ quantity: nil,
864
+ tax_rates: nil
865
+ ); end
866
+ end
867
+ class TransferData < Stripe::RequestParams
868
+ # 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 destination account. By default, the entire amount is transferred to the destination.
869
+ sig { returns(T.nilable(Float)) }
870
+ attr_accessor :amount_percent
871
+ # ID of an existing, connected Stripe account.
872
+ sig { returns(String) }
873
+ attr_accessor :destination
874
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
875
+ def initialize(amount_percent: nil, destination: nil); end
876
+ end
877
+ # 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.
878
+ sig {
879
+ returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem]))
880
+ }
881
+ attr_accessor :add_invoice_items
882
+ # 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).
883
+ sig { returns(T.nilable(Float)) }
884
+ attr_accessor :application_fee_percent
885
+ # Automatic tax settings for this phase.
886
+ sig {
887
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax))
888
+ }
889
+ attr_accessor :automatic_tax
890
+ # 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).
891
+ sig { returns(T.nilable(String)) }
892
+ attr_accessor :billing_cycle_anchor
893
+ # 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.
894
+ sig {
895
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::BillingThresholds))))
896
+ }
897
+ attr_accessor :billing_thresholds
898
+ # 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.
899
+ sig { returns(T.nilable(String)) }
900
+ attr_accessor :collection_method
901
+ # 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).
902
+ sig { returns(T.nilable(String)) }
903
+ attr_accessor :currency
904
+ # 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.
905
+ sig { returns(T.nilable(String)) }
906
+ attr_accessor :default_payment_method
907
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
908
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
909
+ attr_accessor :default_tax_rates
910
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
911
+ sig { returns(T.nilable(T.nilable(String))) }
912
+ attr_accessor :description
913
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
914
+ sig {
915
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount]))))
916
+ }
917
+ attr_accessor :discounts
918
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
919
+ sig { returns(T.nilable(Integer)) }
920
+ attr_accessor :end_date
921
+ # All invoices will be billed using the specified settings.
922
+ sig {
923
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings))
924
+ }
925
+ attr_accessor :invoice_settings
926
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
927
+ sig { returns(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item]) }
928
+ attr_accessor :items
929
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
930
+ sig { returns(T.nilable(Integer)) }
931
+ attr_accessor :iterations
932
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
933
+ sig { returns(T.nilable(T::Hash[String, String])) }
934
+ attr_accessor :metadata
935
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
936
+ sig { returns(T.nilable(String)) }
937
+ attr_accessor :on_behalf_of
938
+ # Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
939
+ sig { returns(T.nilable(String)) }
940
+ attr_accessor :proration_behavior
941
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
942
+ sig {
943
+ returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData))
944
+ }
945
+ attr_accessor :transfer_data
946
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
947
+ sig { returns(T.nilable(T::Boolean)) }
948
+ attr_accessor :trial
949
+ # 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`
950
+ sig { returns(T.nilable(Integer)) }
951
+ attr_accessor :trial_end
952
+ sig {
953
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::CreateParams::Phase::BillingThresholds))), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount]))), end_date: T.nilable(Integer), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(Integer)).void
954
+ }
955
+ def initialize(
956
+ add_invoice_items: nil,
957
+ application_fee_percent: nil,
958
+ automatic_tax: nil,
959
+ billing_cycle_anchor: nil,
960
+ billing_thresholds: nil,
961
+ collection_method: nil,
962
+ currency: nil,
963
+ default_payment_method: nil,
964
+ default_tax_rates: nil,
965
+ description: nil,
966
+ discounts: nil,
967
+ end_date: nil,
968
+ invoice_settings: nil,
969
+ items: nil,
970
+ iterations: nil,
971
+ metadata: nil,
972
+ on_behalf_of: nil,
973
+ proration_behavior: nil,
974
+ transfer_data: nil,
975
+ trial: nil,
976
+ trial_end: nil
977
+ ); end
978
+ end
979
+ # The identifier of the customer to create the subscription schedule for.
980
+ sig { returns(T.nilable(String)) }
981
+ attr_accessor :customer
982
+ # Object representing the subscription schedule's default settings.
983
+ sig { returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings)) }
984
+ attr_accessor :default_settings
985
+ # 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.
986
+ sig { returns(T.nilable(String)) }
987
+ attr_accessor :end_behavior
988
+ # Specifies which fields in the response should be expanded.
989
+ sig { returns(T.nilable(T::Array[String])) }
990
+ attr_accessor :expand
991
+ # Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
992
+ sig { returns(T.nilable(String)) }
993
+ attr_accessor :from_subscription
994
+ # 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`.
995
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
996
+ attr_accessor :metadata
997
+ # 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.
998
+ sig { returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase])) }
999
+ attr_accessor :phases
1000
+ # 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.
1001
+ sig { returns(T.nilable(T.any(Integer, String))) }
1002
+ attr_accessor :start_date
1003
+ sig {
1004
+ params(customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void
1005
+ }
1006
+ def initialize(
1007
+ customer: nil,
1008
+ default_settings: nil,
1009
+ end_behavior: nil,
1010
+ expand: nil,
1011
+ from_subscription: nil,
1012
+ metadata: nil,
1013
+ phases: nil,
1014
+ start_date: nil
1015
+ ); end
1016
+ end
1017
+ class UpdateParams < Stripe::RequestParams
1018
+ class DefaultSettings < Stripe::RequestParams
1019
+ class AutomaticTax < Stripe::RequestParams
1020
+ class Liability < Stripe::RequestParams
1021
+ # The connected account being referenced when `type` is `account`.
1022
+ sig { returns(T.nilable(String)) }
1023
+ attr_accessor :account
1024
+ # Type of the account referenced in the request.
1025
+ sig { returns(String) }
1026
+ attr_accessor :type
1027
+ sig { params(account: T.nilable(String), type: String).void }
1028
+ def initialize(account: nil, type: nil); end
1029
+ end
1030
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1031
+ sig { returns(T::Boolean) }
1032
+ attr_accessor :enabled
1033
+ # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
1034
+ sig {
1035
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax::Liability))
1036
+ }
1037
+ attr_accessor :liability
1038
+ sig {
1039
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax::Liability)).void
1040
+ }
1041
+ def initialize(enabled: nil, liability: nil); end
1042
+ end
1043
+ class BillingThresholds < Stripe::RequestParams
1044
+ # Monetary threshold that triggers the subscription to advance to a new billing period
1045
+ sig { returns(T.nilable(Integer)) }
1046
+ attr_accessor :amount_gte
1047
+ # 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.
1048
+ sig { returns(T.nilable(T::Boolean)) }
1049
+ attr_accessor :reset_billing_cycle_anchor
1050
+ sig {
1051
+ params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
1052
+ }
1053
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1054
+ end
1055
+ class InvoiceSettings < Stripe::RequestParams
1056
+ class Issuer < Stripe::RequestParams
1057
+ # The connected account being referenced when `type` is `account`.
1058
+ sig { returns(T.nilable(String)) }
1059
+ attr_accessor :account
1060
+ # Type of the account referenced in the request.
1061
+ sig { returns(String) }
1062
+ attr_accessor :type
1063
+ sig { params(account: T.nilable(String), type: String).void }
1064
+ def initialize(account: nil, type: nil); end
1065
+ end
1066
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
1067
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1068
+ attr_accessor :account_tax_ids
1069
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
1070
+ sig { returns(T.nilable(Integer)) }
1071
+ attr_accessor :days_until_due
1072
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1073
+ sig {
1074
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings::Issuer))
1075
+ }
1076
+ attr_accessor :issuer
1077
+ sig {
1078
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings::Issuer)).void
1079
+ }
1080
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
1081
+ end
1082
+ class TransferData < Stripe::RequestParams
1083
+ # 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 destination account. By default, the entire amount is transferred to the destination.
1084
+ sig { returns(T.nilable(Float)) }
1085
+ attr_accessor :amount_percent
1086
+ # ID of an existing, connected Stripe account.
1087
+ sig { returns(String) }
1088
+ attr_accessor :destination
1089
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
1090
+ def initialize(amount_percent: nil, destination: nil); end
1091
+ end
1092
+ # 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).
1093
+ sig { returns(T.nilable(Float)) }
1094
+ attr_accessor :application_fee_percent
1095
+ # Default settings for automatic tax computation.
1096
+ sig {
1097
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax))
1098
+ }
1099
+ attr_accessor :automatic_tax
1100
+ # 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).
1101
+ sig { returns(T.nilable(String)) }
1102
+ attr_accessor :billing_cycle_anchor
1103
+ # 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.
1104
+ sig {
1105
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::BillingThresholds))))
1106
+ }
1107
+ attr_accessor :billing_thresholds
1108
+ # 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.
1109
+ sig { returns(T.nilable(String)) }
1110
+ attr_accessor :collection_method
1111
+ # 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.
1112
+ sig { returns(T.nilable(String)) }
1113
+ attr_accessor :default_payment_method
1114
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1115
+ sig { returns(T.nilable(T.nilable(String))) }
1116
+ attr_accessor :description
1117
+ # All invoices will be billed using the specified settings.
1118
+ sig {
1119
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings))
1120
+ }
1121
+ attr_accessor :invoice_settings
1122
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
1123
+ sig { returns(T.nilable(T.nilable(String))) }
1124
+ attr_accessor :on_behalf_of
1125
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1126
+ sig {
1127
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData))))
1128
+ }
1129
+ attr_accessor :transfer_data
1130
+ sig {
1131
+ params(application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::BillingThresholds))), collection_method: T.nilable(String), default_payment_method: T.nilable(String), description: T.nilable(T.nilable(String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings), on_behalf_of: T.nilable(T.nilable(String)), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData)))).void
1132
+ }
1133
+ def initialize(
1134
+ application_fee_percent: nil,
1135
+ automatic_tax: nil,
1136
+ billing_cycle_anchor: nil,
1137
+ billing_thresholds: nil,
1138
+ collection_method: nil,
1139
+ default_payment_method: nil,
1140
+ description: nil,
1141
+ invoice_settings: nil,
1142
+ on_behalf_of: nil,
1143
+ transfer_data: nil
1144
+ ); end
1145
+ end
1146
+ class Phase < Stripe::RequestParams
1147
+ class AddInvoiceItem < Stripe::RequestParams
1148
+ class Discount < Stripe::RequestParams
1149
+ # ID of the coupon to create a new discount for.
1150
+ sig { returns(T.nilable(String)) }
1151
+ attr_accessor :coupon
1152
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1153
+ sig { returns(T.nilable(String)) }
1154
+ attr_accessor :discount
1155
+ # ID of the promotion code to create a new discount for.
1156
+ sig { returns(T.nilable(String)) }
1157
+ attr_accessor :promotion_code
1158
+ sig {
1159
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1160
+ }
1161
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1162
+ end
1163
+ class PriceData < Stripe::RequestParams
1164
+ # 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).
1165
+ sig { returns(String) }
1166
+ attr_accessor :currency
1167
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1168
+ sig { returns(String) }
1169
+ attr_accessor :product
1170
+ # 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.
1171
+ sig { returns(T.nilable(String)) }
1172
+ attr_accessor :tax_behavior
1173
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
1174
+ sig { returns(T.nilable(Integer)) }
1175
+ attr_accessor :unit_amount
1176
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1177
+ sig { returns(T.nilable(String)) }
1178
+ attr_accessor :unit_amount_decimal
1179
+ sig {
1180
+ params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
1181
+ }
1182
+ def initialize(
1183
+ currency: nil,
1184
+ product: nil,
1185
+ tax_behavior: nil,
1186
+ unit_amount: nil,
1187
+ unit_amount_decimal: nil
1188
+ ); end
1189
+ end
1190
+ # The coupons to redeem into discounts for the item.
1191
+ sig {
1192
+ returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount]))
1193
+ }
1194
+ attr_accessor :discounts
1195
+ # The ID of the price object. One of `price` or `price_data` is required.
1196
+ sig { returns(T.nilable(String)) }
1197
+ attr_accessor :price
1198
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1199
+ sig {
1200
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::PriceData))
1201
+ }
1202
+ attr_accessor :price_data
1203
+ # Quantity for this item. Defaults to 1.
1204
+ sig { returns(T.nilable(Integer)) }
1205
+ attr_accessor :quantity
1206
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
1207
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1208
+ attr_accessor :tax_rates
1209
+ sig {
1210
+ params(discounts: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
1211
+ }
1212
+ def initialize(
1213
+ discounts: nil,
1214
+ price: nil,
1215
+ price_data: nil,
1216
+ quantity: nil,
1217
+ tax_rates: nil
1218
+ ); end
1219
+ end
1220
+ class AutomaticTax < Stripe::RequestParams
1221
+ class Liability < Stripe::RequestParams
1222
+ # The connected account being referenced when `type` is `account`.
1223
+ sig { returns(T.nilable(String)) }
1224
+ attr_accessor :account
1225
+ # Type of the account referenced in the request.
1226
+ sig { returns(String) }
1227
+ attr_accessor :type
1228
+ sig { params(account: T.nilable(String), type: String).void }
1229
+ def initialize(account: nil, type: nil); end
1230
+ end
1231
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1232
+ sig { returns(T::Boolean) }
1233
+ attr_accessor :enabled
1234
+ # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
1235
+ sig {
1236
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax::Liability))
1237
+ }
1238
+ attr_accessor :liability
1239
+ sig {
1240
+ params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax::Liability)).void
1241
+ }
1242
+ def initialize(enabled: nil, liability: nil); end
1243
+ end
1244
+ class BillingThresholds < Stripe::RequestParams
1245
+ # Monetary threshold that triggers the subscription to advance to a new billing period
1246
+ sig { returns(T.nilable(Integer)) }
1247
+ attr_accessor :amount_gte
1248
+ # 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.
1249
+ sig { returns(T.nilable(T::Boolean)) }
1250
+ attr_accessor :reset_billing_cycle_anchor
1251
+ sig {
1252
+ params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
1253
+ }
1254
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1255
+ end
1256
+ class Discount < Stripe::RequestParams
1257
+ # ID of the coupon to create a new discount for.
1258
+ sig { returns(T.nilable(String)) }
1259
+ attr_accessor :coupon
1260
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1261
+ sig { returns(T.nilable(String)) }
1262
+ attr_accessor :discount
1263
+ # ID of the promotion code to create a new discount for.
1264
+ sig { returns(T.nilable(String)) }
1265
+ attr_accessor :promotion_code
1266
+ sig {
1267
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1268
+ }
1269
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1270
+ end
1271
+ class InvoiceSettings < Stripe::RequestParams
1272
+ class Issuer < Stripe::RequestParams
1273
+ # The connected account being referenced when `type` is `account`.
1274
+ sig { returns(T.nilable(String)) }
1275
+ attr_accessor :account
1276
+ # Type of the account referenced in the request.
1277
+ sig { returns(String) }
1278
+ attr_accessor :type
1279
+ sig { params(account: T.nilable(String), type: String).void }
1280
+ def initialize(account: nil, type: nil); end
1281
+ end
1282
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
1283
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1284
+ attr_accessor :account_tax_ids
1285
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
1286
+ sig { returns(T.nilable(Integer)) }
1287
+ attr_accessor :days_until_due
1288
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1289
+ sig {
1290
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings::Issuer))
1291
+ }
1292
+ attr_accessor :issuer
1293
+ sig {
1294
+ params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), days_until_due: T.nilable(Integer), issuer: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings::Issuer)).void
1295
+ }
1296
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
1297
+ end
1298
+ class Item < Stripe::RequestParams
1299
+ class BillingThresholds < Stripe::RequestParams
1300
+ # 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))
1301
+ sig { returns(Integer) }
1302
+ attr_accessor :usage_gte
1303
+ sig { params(usage_gte: Integer).void }
1304
+ def initialize(usage_gte: nil); end
1305
+ end
1306
+ class Discount < Stripe::RequestParams
1307
+ # ID of the coupon to create a new discount for.
1308
+ sig { returns(T.nilable(String)) }
1309
+ attr_accessor :coupon
1310
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1311
+ sig { returns(T.nilable(String)) }
1312
+ attr_accessor :discount
1313
+ # ID of the promotion code to create a new discount for.
1314
+ sig { returns(T.nilable(String)) }
1315
+ attr_accessor :promotion_code
1316
+ sig {
1317
+ params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1318
+ }
1319
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1320
+ end
1321
+ class PriceData < Stripe::RequestParams
1322
+ class Recurring < Stripe::RequestParams
1323
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1324
+ sig { returns(String) }
1325
+ attr_accessor :interval
1326
+ # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
1327
+ sig { returns(T.nilable(Integer)) }
1328
+ attr_accessor :interval_count
1329
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
1330
+ def initialize(interval: nil, interval_count: nil); end
1331
+ end
1332
+ # 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).
1333
+ sig { returns(String) }
1334
+ attr_accessor :currency
1335
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1336
+ sig { returns(String) }
1337
+ attr_accessor :product
1338
+ # The recurring components of a price such as `interval` and `interval_count`.
1339
+ sig {
1340
+ returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData::Recurring)
1341
+ }
1342
+ attr_accessor :recurring
1343
+ # 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.
1344
+ sig { returns(T.nilable(String)) }
1345
+ attr_accessor :tax_behavior
1346
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1347
+ sig { returns(T.nilable(Integer)) }
1348
+ attr_accessor :unit_amount
1349
+ # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1350
+ sig { returns(T.nilable(String)) }
1351
+ attr_accessor :unit_amount_decimal
1352
+ sig {
1353
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
1354
+ }
1355
+ def initialize(
1356
+ currency: nil,
1357
+ product: nil,
1358
+ recurring: nil,
1359
+ tax_behavior: nil,
1360
+ unit_amount: nil,
1361
+ unit_amount_decimal: nil
1362
+ ); end
1363
+ end
1364
+ # 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.
1365
+ sig {
1366
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::BillingThresholds))))
1367
+ }
1368
+ attr_accessor :billing_thresholds
1369
+ # The coupons to redeem into discounts for the subscription item.
1370
+ sig {
1371
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount]))))
1372
+ }
1373
+ attr_accessor :discounts
1374
+ # 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`.
1375
+ sig { returns(T.nilable(T::Hash[String, String])) }
1376
+ attr_accessor :metadata
1377
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
1378
+ sig { returns(T.nilable(String)) }
1379
+ attr_accessor :plan
1380
+ # The ID of the price object.
1381
+ sig { returns(T.nilable(String)) }
1382
+ attr_accessor :price
1383
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1384
+ sig {
1385
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData))
1386
+ }
1387
+ attr_accessor :price_data
1388
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
1389
+ sig { returns(T.nilable(Integer)) }
1390
+ attr_accessor :quantity
1391
+ # 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.
1392
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1393
+ attr_accessor :tax_rates
1394
+ sig {
1395
+ params(billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::BillingThresholds))), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
1396
+ }
1397
+ def initialize(
1398
+ billing_thresholds: nil,
1399
+ discounts: nil,
1400
+ metadata: nil,
1401
+ plan: nil,
1402
+ price: nil,
1403
+ price_data: nil,
1404
+ quantity: nil,
1405
+ tax_rates: nil
1406
+ ); end
1407
+ end
1408
+ class TransferData < Stripe::RequestParams
1409
+ # 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 destination account. By default, the entire amount is transferred to the destination.
1410
+ sig { returns(T.nilable(Float)) }
1411
+ attr_accessor :amount_percent
1412
+ # ID of an existing, connected Stripe account.
1413
+ sig { returns(String) }
1414
+ attr_accessor :destination
1415
+ sig { params(amount_percent: T.nilable(Float), destination: String).void }
1416
+ def initialize(amount_percent: nil, destination: nil); end
1417
+ end
1418
+ # 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.
1419
+ sig {
1420
+ returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem]))
1421
+ }
1422
+ attr_accessor :add_invoice_items
1423
+ # 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).
1424
+ sig { returns(T.nilable(Float)) }
1425
+ attr_accessor :application_fee_percent
1426
+ # Automatic tax settings for this phase.
1427
+ sig {
1428
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax))
1429
+ }
1430
+ attr_accessor :automatic_tax
1431
+ # 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).
1432
+ sig { returns(T.nilable(String)) }
1433
+ attr_accessor :billing_cycle_anchor
1434
+ # 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.
1435
+ sig {
1436
+ returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::BillingThresholds))))
1437
+ }
1438
+ attr_accessor :billing_thresholds
1439
+ # 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.
1440
+ sig { returns(T.nilable(String)) }
1441
+ attr_accessor :collection_method
1442
+ # 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).
1443
+ sig { returns(T.nilable(String)) }
1444
+ attr_accessor :currency
1445
+ # 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.
1446
+ sig { returns(T.nilable(String)) }
1447
+ attr_accessor :default_payment_method
1448
+ # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
1449
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1450
+ attr_accessor :default_tax_rates
1451
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1452
+ sig { returns(T.nilable(T.nilable(String))) }
1453
+ attr_accessor :description
1454
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
1455
+ sig {
1456
+ returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount]))))
1457
+ }
1458
+ attr_accessor :discounts
1459
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
1460
+ sig { returns(T.nilable(T.any(Integer, String))) }
1461
+ attr_accessor :end_date
1462
+ # All invoices will be billed using the specified settings.
1463
+ sig {
1464
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings))
1465
+ }
1466
+ attr_accessor :invoice_settings
1467
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
1468
+ sig { returns(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item]) }
1469
+ attr_accessor :items
1470
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
1471
+ sig { returns(T.nilable(Integer)) }
1472
+ attr_accessor :iterations
1473
+ # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
1474
+ sig { returns(T.nilable(T::Hash[String, String])) }
1475
+ attr_accessor :metadata
1476
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
1477
+ sig { returns(T.nilable(String)) }
1478
+ attr_accessor :on_behalf_of
1479
+ # Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
1480
+ sig { returns(T.nilable(String)) }
1481
+ attr_accessor :proration_behavior
1482
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
1483
+ sig { returns(T.nilable(T.any(Integer, String))) }
1484
+ attr_accessor :start_date
1485
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1486
+ sig {
1487
+ returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData))
1488
+ }
1489
+ attr_accessor :transfer_data
1490
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1491
+ sig { returns(T.nilable(T::Boolean)) }
1492
+ attr_accessor :trial
1493
+ # 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`
1494
+ sig { returns(T.nilable(T.any(Integer, String))) }
1495
+ attr_accessor :trial_end
1496
+ sig {
1497
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionSchedule::UpdateParams::Phase::BillingThresholds))), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
1498
+ }
1499
+ def initialize(
1500
+ add_invoice_items: nil,
1501
+ application_fee_percent: nil,
1502
+ automatic_tax: nil,
1503
+ billing_cycle_anchor: nil,
1504
+ billing_thresholds: nil,
1505
+ collection_method: nil,
1506
+ currency: nil,
1507
+ default_payment_method: nil,
1508
+ default_tax_rates: nil,
1509
+ description: nil,
1510
+ discounts: nil,
1511
+ end_date: nil,
1512
+ invoice_settings: nil,
1513
+ items: nil,
1514
+ iterations: nil,
1515
+ metadata: nil,
1516
+ on_behalf_of: nil,
1517
+ proration_behavior: nil,
1518
+ start_date: nil,
1519
+ transfer_data: nil,
1520
+ trial: nil,
1521
+ trial_end: nil
1522
+ ); end
1523
+ end
1524
+ # Object representing the subscription schedule's default settings.
1525
+ sig { returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings)) }
1526
+ attr_accessor :default_settings
1527
+ # 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.
1528
+ sig { returns(T.nilable(String)) }
1529
+ attr_accessor :end_behavior
1530
+ # Specifies which fields in the response should be expanded.
1531
+ sig { returns(T.nilable(T::Array[String])) }
1532
+ attr_accessor :expand
1533
+ # 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`.
1534
+ sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1535
+ attr_accessor :metadata
1536
+ # 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.
1537
+ sig { returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase])) }
1538
+ attr_accessor :phases
1539
+ # If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
1540
+ sig { returns(T.nilable(String)) }
1541
+ attr_accessor :proration_behavior
1542
+ sig {
1543
+ params(default_settings: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase]), proration_behavior: T.nilable(String)).void
1544
+ }
1545
+ def initialize(
1546
+ default_settings: nil,
1547
+ end_behavior: nil,
1548
+ expand: nil,
1549
+ metadata: nil,
1550
+ phases: nil,
1551
+ proration_behavior: nil
1552
+ ); end
1553
+ end
1554
+ class CancelParams < Stripe::RequestParams
1555
+ # Specifies which fields in the response should be expanded.
1556
+ sig { returns(T.nilable(T::Array[String])) }
1557
+ attr_accessor :expand
1558
+ # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
1559
+ sig { returns(T.nilable(T::Boolean)) }
1560
+ attr_accessor :invoice_now
1561
+ # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
1562
+ sig { returns(T.nilable(T::Boolean)) }
1563
+ attr_accessor :prorate
1564
+ sig {
1565
+ params(expand: T.nilable(T::Array[String]), invoice_now: T.nilable(T::Boolean), prorate: T.nilable(T::Boolean)).void
1566
+ }
1567
+ def initialize(expand: nil, invoice_now: nil, prorate: nil); end
1568
+ end
1569
+ class ReleaseParams < Stripe::RequestParams
1570
+ # Specifies which fields in the response should be expanded.
1571
+ sig { returns(T.nilable(T::Array[String])) }
1572
+ attr_accessor :expand
1573
+ # Keep any cancellation on the subscription that the schedule has set
1574
+ sig { returns(T.nilable(T::Boolean)) }
1575
+ attr_accessor :preserve_cancel_date
1576
+ sig {
1577
+ params(expand: T.nilable(T::Array[String]), preserve_cancel_date: T.nilable(T::Boolean)).void
1578
+ }
1579
+ def initialize(expand: nil, preserve_cancel_date: nil); end
1580
+ end
1581
+ # 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.
1582
+ sig {
1583
+ params(params: T.any(::Stripe::SubscriptionSchedule::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1584
+ }
1585
+ def cancel(params = {}, opts = {}); end
1586
+
1587
+ # 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.
1588
+ sig {
1589
+ params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1590
+ }
1591
+ def self.cancel(schedule, params = {}, opts = {}); end
1592
+
1593
+ # Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
1594
+ sig {
1595
+ params(params: T.any(::Stripe::SubscriptionSchedule::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1596
+ }
1597
+ def self.create(params = {}, opts = {}); end
1598
+
1599
+ # Retrieves the list of your subscription schedules.
1600
+ sig {
1601
+ params(params: T.any(::Stripe::SubscriptionSchedule::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
1602
+ }
1603
+ def self.list(params = {}, opts = {}); end
1604
+
1605
+ # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
1606
+ sig {
1607
+ params(params: T.any(::Stripe::SubscriptionSchedule::ReleaseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1608
+ }
1609
+ def release(params = {}, opts = {}); end
1610
+
1611
+ # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property.
1612
+ sig {
1613
+ params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::ReleaseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1614
+ }
1615
+ def self.release(schedule, params = {}, opts = {}); end
1616
+
1617
+ # Updates an existing subscription schedule.
1618
+ sig {
1619
+ params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
1620
+ }
1621
+ def self.update(schedule, params = {}, opts = {}); end
1622
+ end
1623
+ end