stripe 13.3.0 → 13.4.0.pre.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (743) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1410 -650
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/api_operations/request.rb +1 -0
  6. data/lib/stripe/api_requestor.rb +1 -0
  7. data/lib/stripe/object_types.rb +32 -0
  8. data/lib/stripe/request_params.rb +24 -0
  9. data/lib/stripe/request_signing_authenticator.rb +79 -0
  10. data/lib/stripe/resources/account.rb +5793 -0
  11. data/lib/stripe/resources/account_link.rb +64 -0
  12. data/lib/stripe/resources/account_notice.rb +154 -0
  13. data/lib/stripe/resources/account_session.rb +1002 -0
  14. data/lib/stripe/resources/apple_pay_domain.rb +73 -0
  15. data/lib/stripe/resources/application.rb +23 -0
  16. data/lib/stripe/resources/application_fee.rb +120 -0
  17. data/lib/stripe/resources/application_fee_refund.rb +24 -0
  18. data/lib/stripe/resources/apps/secret.rb +166 -0
  19. data/lib/stripe/resources/balance.rb +162 -0
  20. data/lib/stripe/resources/balance_transaction.rb +141 -0
  21. data/lib/stripe/resources/bank_account.rb +113 -2
  22. data/lib/stripe/resources/billing/alert.rb +166 -0
  23. data/lib/stripe/resources/billing/alert_triggered.rb +31 -0
  24. data/lib/stripe/resources/billing/credit_balance_summary.rb +89 -0
  25. data/lib/stripe/resources/billing/credit_balance_transaction.rb +140 -0
  26. data/lib/stripe/resources/billing/credit_grant.rb +235 -0
  27. data/lib/stripe/resources/billing/meter.rb +203 -0
  28. data/lib/stripe/resources/billing/meter_error_report.rb +70 -0
  29. data/lib/stripe/resources/billing/meter_event.rb +45 -0
  30. data/lib/stripe/resources/billing/meter_event_adjustment.rb +51 -0
  31. data/lib/stripe/resources/billing/meter_event_summary.rb +21 -0
  32. data/lib/stripe/resources/billing_portal/configuration.rb +639 -0
  33. data/lib/stripe/resources/billing_portal/session.rb +313 -0
  34. data/lib/stripe/resources/capability.rb +111 -0
  35. data/lib/stripe/resources/capital/financing_offer.rb +221 -0
  36. data/lib/stripe/resources/capital/financing_summary.rb +77 -0
  37. data/lib/stripe/resources/capital/financing_transaction.rb +147 -0
  38. data/lib/stripe/resources/card.rb +111 -0
  39. data/lib/stripe/resources/cash_balance.rb +22 -0
  40. data/lib/stripe/resources/charge.rb +3687 -0
  41. data/lib/stripe/resources/checkout/session.rb +4162 -0
  42. data/lib/stripe/resources/climate/order.rb +216 -0
  43. data/lib/stripe/resources/climate/product.rb +69 -0
  44. data/lib/stripe/resources/climate/supplier.rb +67 -0
  45. data/lib/stripe/resources/confirmation_token.rb +1855 -0
  46. data/lib/stripe/resources/connect_collection_transfer.rb +29 -0
  47. data/lib/stripe/resources/country_spec.rb +76 -0
  48. data/lib/stripe/resources/coupon.rb +237 -0
  49. data/lib/stripe/resources/credit_note.rb +798 -0
  50. data/lib/stripe/resources/credit_note_line_item.rb +89 -0
  51. data/lib/stripe/resources/customer.rb +995 -0
  52. data/lib/stripe/resources/customer_balance_transaction.rb +39 -0
  53. data/lib/stripe/resources/customer_cash_balance_transaction.rb +136 -0
  54. data/lib/stripe/resources/customer_session.rb +183 -0
  55. data/lib/stripe/resources/discount.rb +41 -0
  56. data/lib/stripe/resources/dispute.rb +767 -0
  57. data/lib/stripe/resources/entitlements/active_entitlement.rb +54 -0
  58. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +26 -0
  59. data/lib/stripe/resources/entitlements/feature.rb +107 -0
  60. data/lib/stripe/resources/ephemeral_key.rb +26 -0
  61. data/lib/stripe/resources/event.rb +157 -0
  62. data/lib/stripe/resources/exchange_rate.rb +38 -0
  63. data/lib/stripe/resources/file.rb +134 -0
  64. data/lib/stripe/resources/file_link.rb +134 -0
  65. data/lib/stripe/resources/financial_connections/account.rb +307 -0
  66. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +30 -0
  67. data/lib/stripe/resources/financial_connections/account_owner.rb +24 -0
  68. data/lib/stripe/resources/financial_connections/account_ownership.rb +12 -0
  69. data/lib/stripe/resources/financial_connections/institution.rb +112 -0
  70. data/lib/stripe/resources/financial_connections/session.rb +187 -0
  71. data/lib/stripe/resources/financial_connections/transaction.rb +122 -0
  72. data/lib/stripe/resources/forwarding/request.rb +196 -0
  73. data/lib/stripe/resources/funding_instructions.rb +415 -0
  74. data/lib/stripe/resources/gift_cards/card.rb +245 -0
  75. data/lib/stripe/resources/gift_cards/transaction.rb +313 -0
  76. data/lib/stripe/resources/identity/verification_report.rb +335 -0
  77. data/lib/stripe/resources/identity/verification_session.rb +430 -0
  78. data/lib/stripe/resources/invoice.rb +9348 -0
  79. data/lib/stripe/resources/invoice_item.rb +536 -0
  80. data/lib/stripe/resources/invoice_line_item.rb +409 -0
  81. data/lib/stripe/resources/invoice_payment.rb +72 -0
  82. data/lib/stripe/resources/invoice_rendering_template.rb +79 -0
  83. data/lib/stripe/resources/issuing/authorization.rb +1316 -2
  84. data/lib/stripe/resources/issuing/card.rb +794 -0
  85. data/lib/stripe/resources/issuing/cardholder.rb +768 -0
  86. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +693 -0
  87. data/lib/stripe/resources/issuing/dispute.rb +941 -0
  88. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +98 -0
  89. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +109 -0
  90. data/lib/stripe/resources/issuing/personalization_design.rb +333 -0
  91. data/lib/stripe/resources/issuing/physical_bundle.rb +76 -0
  92. data/lib/stripe/resources/issuing/settlement.rb +65 -0
  93. data/lib/stripe/resources/issuing/token.rb +221 -0
  94. data/lib/stripe/resources/issuing/transaction.rb +1098 -0
  95. data/lib/stripe/resources/line_item.rb +98 -0
  96. data/lib/stripe/resources/login_link.rb +9 -0
  97. data/lib/stripe/resources/mandate.rb +214 -0
  98. data/lib/stripe/resources/margin.rb +143 -0
  99. data/lib/stripe/resources/order.rb +3238 -0
  100. data/lib/stripe/resources/payment_attempt_record.rb +226 -0
  101. data/lib/stripe/resources/payment_intent.rb +14630 -0
  102. data/lib/stripe/resources/payment_link.rb +1761 -0
  103. data/lib/stripe/resources/payment_method.rb +1981 -0
  104. data/lib/stripe/resources/payment_method_configuration.rb +3137 -0
  105. data/lib/stripe/resources/payment_method_domain.rb +176 -0
  106. data/lib/stripe/resources/payment_record.rb +824 -0
  107. data/lib/stripe/resources/payout.rb +267 -0
  108. data/lib/stripe/resources/person.rb +353 -0
  109. data/lib/stripe/resources/plan.rb +386 -0
  110. data/lib/stripe/resources/price.rb +782 -0
  111. data/lib/stripe/resources/product.rb +636 -0
  112. data/lib/stripe/resources/product_feature.rb +16 -0
  113. data/lib/stripe/resources/promotion_code.rb +261 -0
  114. data/lib/stripe/resources/quote.rb +3404 -0
  115. data/lib/stripe/resources/quote_line.rb +340 -0
  116. data/lib/stripe/resources/quote_preview_invoice.rb +833 -0
  117. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +463 -0
  118. data/lib/stripe/resources/radar/early_fraud_warning.rb +93 -0
  119. data/lib/stripe/resources/radar/value_list.rb +151 -0
  120. data/lib/stripe/resources/radar/value_list_item.rb +113 -0
  121. data/lib/stripe/resources/refund.rb +489 -0
  122. data/lib/stripe/resources/reporting/report_run.rb +182 -0
  123. data/lib/stripe/resources/reporting/report_type.rb +44 -0
  124. data/lib/stripe/resources/reserve_transaction.rb +26 -0
  125. data/lib/stripe/resources/reversal.rb +30 -0
  126. data/lib/stripe/resources/review.rb +135 -0
  127. data/lib/stripe/resources/setup_attempt.rb +474 -0
  128. data/lib/stripe/resources/setup_intent.rb +4371 -0
  129. data/lib/stripe/resources/shipping_rate.rb +303 -0
  130. data/lib/stripe/resources/sigma/scheduled_query_run.rb +67 -0
  131. data/lib/stripe/resources/source.rb +1571 -0
  132. data/lib/stripe/resources/source_mandate_notification.rb +79 -0
  133. data/lib/stripe/resources/source_transaction.rb +114 -0
  134. data/lib/stripe/resources/subscription.rb +2395 -0
  135. data/lib/stripe/resources/subscription_item.rb +502 -0
  136. data/lib/stripe/resources/subscription_schedule.rb +2790 -0
  137. data/lib/stripe/resources/tax/association.rb +100 -0
  138. data/lib/stripe/resources/tax/calculation.rb +474 -0
  139. data/lib/stripe/resources/tax/calculation_line_item.rb +76 -0
  140. data/lib/stripe/resources/tax/form.rb +253 -0
  141. data/lib/stripe/resources/tax/registration.rb +2174 -0
  142. data/lib/stripe/resources/tax/settings.rb +146 -0
  143. data/lib/stripe/resources/tax/transaction.rb +332 -0
  144. data/lib/stripe/resources/tax/transaction_line_item.rb +43 -0
  145. data/lib/stripe/resources/tax_code.rb +41 -0
  146. data/lib/stripe/resources/tax_deducted_at_source.rb +26 -0
  147. data/lib/stripe/resources/tax_id.rb +147 -0
  148. data/lib/stripe/resources/tax_rate.rb +245 -0
  149. data/lib/stripe/resources/terminal/configuration.rb +1175 -0
  150. data/lib/stripe/resources/terminal/connection_token.rb +21 -0
  151. data/lib/stripe/resources/terminal/location.rb +208 -0
  152. data/lib/stripe/resources/terminal/reader.rb +911 -0
  153. data/lib/stripe/resources/terminal/reader_collected_data.rb +45 -0
  154. data/lib/stripe/resources/test_helpers/test_clock.rb +101 -0
  155. data/lib/stripe/resources/token.rb +1337 -0
  156. data/lib/stripe/resources/topup.rb +210 -0
  157. data/lib/stripe/resources/transfer.rb +188 -0
  158. data/lib/stripe/resources/treasury/credit_reversal.rb +113 -0
  159. data/lib/stripe/resources/treasury/debit_reversal.rb +126 -0
  160. data/lib/stripe/resources/treasury/financial_account.rb +766 -0
  161. data/lib/stripe/resources/treasury/financial_account_features.rb +237 -0
  162. data/lib/stripe/resources/treasury/inbound_transfer.rb +285 -0
  163. data/lib/stripe/resources/treasury/outbound_payment.rb +587 -0
  164. data/lib/stripe/resources/treasury/outbound_transfer.rb +428 -0
  165. data/lib/stripe/resources/treasury/received_credit.rb +335 -0
  166. data/lib/stripe/resources/treasury/received_debit.rb +298 -0
  167. data/lib/stripe/resources/treasury/transaction.rb +215 -0
  168. data/lib/stripe/resources/treasury/transaction_entry.rb +193 -0
  169. data/lib/stripe/resources/usage_record.rb +18 -0
  170. data/lib/stripe/resources/usage_record_summary.rb +28 -0
  171. data/lib/stripe/resources/v2/amount.rb +9 -0
  172. data/lib/stripe/resources/v2/billing/meter_event.rb +24 -0
  173. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +28 -0
  174. data/lib/stripe/resources/v2/billing/meter_event_session.rb +19 -0
  175. data/lib/stripe/resources/v2/event.rb +35 -0
  176. data/lib/stripe/resources/v2/event_destination.rb +78 -0
  177. data/lib/stripe/resources/webhook_endpoint.rb +148 -0
  178. data/lib/stripe/resources.rb +31 -0
  179. data/lib/stripe/services/account_capability_service.rb +33 -0
  180. data/lib/stripe/services/account_external_account_service.rb +293 -0
  181. data/lib/stripe/services/account_link_service.rb +53 -0
  182. data/lib/stripe/services/account_login_link_service.rb +9 -0
  183. data/lib/stripe/services/account_notice_service.rb +110 -0
  184. data/lib/stripe/services/account_person_service.rb +1014 -0
  185. data/lib/stripe/services/account_service.rb +4862 -0
  186. data/lib/stripe/services/account_session_service.rb +740 -0
  187. data/lib/stripe/services/apple_pay_domain_service.rb +56 -0
  188. data/lib/stripe/services/application_fee_refund_service.rb +60 -0
  189. data/lib/stripe/services/application_fee_service.rb +65 -0
  190. data/lib/stripe/services/apps/secret_service.rb +132 -0
  191. data/lib/stripe/services/balance_service.rb +9 -0
  192. data/lib/stripe/services/balance_transaction_service.rb +80 -0
  193. data/lib/stripe/services/billing/alert_service.rb +125 -0
  194. data/lib/stripe/services/billing/credit_balance_summary_service.rb +41 -0
  195. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +45 -0
  196. data/lib/stripe/services/billing/credit_grant_service.rb +167 -0
  197. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +29 -0
  198. data/lib/stripe/services/billing/meter_event_service.rb +25 -0
  199. data/lib/stripe/services/billing/meter_event_summary_service.rb +46 -0
  200. data/lib/stripe/services/billing/meter_service.rb +142 -0
  201. data/lib/stripe/services/billing_portal/configuration_service.rb +492 -0
  202. data/lib/stripe/services/billing_portal/session_service.rb +192 -0
  203. data/lib/stripe/services/capital/financing_offer_service.rb +121 -0
  204. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  205. data/lib/stripe/services/capital/financing_transaction_service.rb +86 -0
  206. data/lib/stripe/services/capital_service.rb +15 -0
  207. data/lib/stripe/services/charge_service.rb +2010 -0
  208. data/lib/stripe/services/checkout/session_line_item_service.rb +21 -0
  209. data/lib/stripe/services/checkout/session_service.rb +2736 -0
  210. data/lib/stripe/services/climate/order_service.rb +113 -0
  211. data/lib/stripe/services/climate/product_service.rb +30 -0
  212. data/lib/stripe/services/climate/supplier_service.rb +30 -0
  213. data/lib/stripe/services/confirmation_token_service.rb +9 -0
  214. data/lib/stripe/services/country_spec_service.rb +30 -0
  215. data/lib/stripe/services/coupon_service.rb +174 -0
  216. data/lib/stripe/services/credit_note_line_item_service.rb +21 -0
  217. data/lib/stripe/services/credit_note_preview_lines_service.rb +184 -0
  218. data/lib/stripe/services/credit_note_service.rb +434 -0
  219. data/lib/stripe/services/customer_balance_transaction_service.rb +72 -0
  220. data/lib/stripe/services/customer_cash_balance_service.rb +30 -0
  221. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +30 -0
  222. data/lib/stripe/services/customer_funding_instructions_service.rb +47 -0
  223. data/lib/stripe/services/customer_payment_method_service.rb +45 -0
  224. data/lib/stripe/services/customer_payment_source_service.rb +208 -0
  225. data/lib/stripe/services/customer_service.rb +684 -0
  226. data/lib/stripe/services/customer_session_service.rb +106 -0
  227. data/lib/stripe/services/customer_tax_id_service.rb +50 -0
  228. data/lib/stripe/services/dispute_service.rb +439 -0
  229. data/lib/stripe/services/entitlements/active_entitlement_service.rb +40 -0
  230. data/lib/stripe/services/entitlements/feature_service.rb +87 -0
  231. data/lib/stripe/services/ephemeral_key_service.rb +40 -0
  232. data/lib/stripe/services/event_service.rb +75 -0
  233. data/lib/stripe/services/exchange_rate_service.rb +30 -0
  234. data/lib/stripe/services/file_link_service.rb +108 -0
  235. data/lib/stripe/services/file_service.rb +102 -0
  236. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +40 -0
  237. data/lib/stripe/services/financial_connections/account_owner_service.rb +31 -0
  238. data/lib/stripe/services/financial_connections/account_service.rb +108 -1
  239. data/lib/stripe/services/financial_connections/institution_service.rb +60 -0
  240. data/lib/stripe/services/financial_connections/session_service.rb +108 -0
  241. data/lib/stripe/services/financial_connections/transaction_service.rb +79 -0
  242. data/lib/stripe/services/financial_connections_service.rb +2 -1
  243. data/lib/stripe/services/forwarding/request_service.rb +120 -0
  244. data/lib/stripe/services/gift_cards/card_service.rb +183 -0
  245. data/lib/stripe/services/gift_cards/transaction_service.rb +225 -0
  246. data/lib/stripe/services/gift_cards_service.rb +14 -0
  247. data/lib/stripe/services/identity/verification_report_service.rb +75 -0
  248. data/lib/stripe/services/identity/verification_session_service.rb +261 -0
  249. data/lib/stripe/services/invoice_item_service.rb +454 -0
  250. data/lib/stripe/services/invoice_line_item_service.rb +277 -0
  251. data/lib/stripe/services/invoice_payment_service.rb +58 -0
  252. data/lib/stripe/services/invoice_rendering_template_service.rb +56 -0
  253. data/lib/stripe/services/invoice_service.rb +6375 -1
  254. data/lib/stripe/services/invoice_upcoming_lines_service.rb +2142 -0
  255. data/lib/stripe/services/issuing/authorization_service.rb +118 -0
  256. data/lib/stripe/services/issuing/card_service.rb +525 -0
  257. data/lib/stripe/services/issuing/cardholder_service.rb +599 -0
  258. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +560 -0
  259. data/lib/stripe/services/issuing/dispute_service.rb +731 -0
  260. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +70 -0
  261. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +90 -0
  262. data/lib/stripe/services/issuing/personalization_design_service.rb +222 -0
  263. data/lib/stripe/services/issuing/physical_bundle_service.rb +45 -0
  264. data/lib/stripe/services/issuing/token_service.rb +83 -0
  265. data/lib/stripe/services/issuing/transaction_service.rb +93 -0
  266. data/lib/stripe/services/issuing_service.rb +5 -1
  267. data/lib/stripe/services/mandate_service.rb +9 -0
  268. data/lib/stripe/services/margin_service.rb +130 -0
  269. data/lib/stripe/services/order_line_item_service.rb +38 -0
  270. data/lib/stripe/services/order_service.rb +2518 -0
  271. data/lib/stripe/services/payment_attempt_record_service.rb +50 -0
  272. data/lib/stripe/services/payment_intent_service.rb +12203 -0
  273. data/lib/stripe/services/payment_link_line_item_service.rb +21 -0
  274. data/lib/stripe/services/payment_link_service.rb +1343 -0
  275. data/lib/stripe/services/payment_method_configuration_service.rb +2148 -0
  276. data/lib/stripe/services/payment_method_domain_service.rb +84 -0
  277. data/lib/stripe/services/payment_method_service.rb +977 -0
  278. data/lib/stripe/services/payment_record_service.rb +610 -0
  279. data/lib/stripe/services/payout_service.rb +182 -0
  280. data/lib/stripe/services/plan_service.rb +296 -0
  281. data/lib/stripe/services/price_service.rb +603 -0
  282. data/lib/stripe/services/product_feature_service.rb +46 -0
  283. data/lib/stripe/services/product_service.rb +533 -0
  284. data/lib/stripe/services/promotion_code_service.rb +203 -0
  285. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +21 -0
  286. data/lib/stripe/services/quote_line_item_service.rb +21 -0
  287. data/lib/stripe/services/quote_line_service.rb +38 -0
  288. data/lib/stripe/services/quote_preview_invoice_service.rb +38 -0
  289. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +38 -0
  290. data/lib/stripe/services/quote_service.rb +2628 -1
  291. data/lib/stripe/services/radar/early_fraud_warning_service.rb +70 -0
  292. data/lib/stripe/services/radar/value_list_item_service.rb +90 -0
  293. data/lib/stripe/services/radar/value_list_service.rb +119 -0
  294. data/lib/stripe/services/refund_service.rb +158 -0
  295. data/lib/stripe/services/reporting/report_run_service.rb +122 -0
  296. data/lib/stripe/services/reporting/report_type_service.rb +18 -0
  297. data/lib/stripe/services/review_service.rb +63 -0
  298. data/lib/stripe/services/setup_attempt_service.rb +59 -0
  299. data/lib/stripe/services/setup_intent_service.rb +3923 -0
  300. data/lib/stripe/services/shipping_rate_service.rb +227 -0
  301. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +30 -0
  302. data/lib/stripe/services/source_service.rb +693 -0
  303. data/lib/stripe/services/source_transaction_service.rb +21 -0
  304. data/lib/stripe/services/subscription_item_service.rb +439 -0
  305. data/lib/stripe/services/subscription_item_usage_record_service.rb +21 -0
  306. data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +21 -0
  307. data/lib/stripe/services/subscription_schedule_service.rb +2343 -0
  308. data/lib/stripe/services/subscription_service.rb +1967 -0
  309. data/lib/stripe/services/tax/association_service.rb +32 -0
  310. data/lib/stripe/services/tax/calculation_line_item_service.rb +21 -0
  311. data/lib/stripe/services/tax/calculation_service.rb +235 -0
  312. data/lib/stripe/services/tax/form_service.rb +107 -0
  313. data/lib/stripe/services/tax/registration_service.rb +1398 -0
  314. data/lib/stripe/services/tax/settings_service.rb +82 -0
  315. data/lib/stripe/services/tax/transaction_line_item_service.rb +21 -0
  316. data/lib/stripe/services/tax/transaction_service.rb +128 -0
  317. data/lib/stripe/services/tax_code_service.rb +30 -0
  318. data/lib/stripe/services/tax_id_service.rb +90 -0
  319. data/lib/stripe/services/tax_rate_service.rb +182 -0
  320. data/lib/stripe/services/tax_service.rb +3 -1
  321. data/lib/stripe/services/terminal/configuration_service.rb +901 -0
  322. data/lib/stripe/services/terminal/connection_token_service.rb +13 -0
  323. data/lib/stripe/services/terminal/location_service.rb +165 -0
  324. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  325. data/lib/stripe/services/terminal/reader_service.rb +496 -0
  326. data/lib/stripe/services/terminal_service.rb +2 -1
  327. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +762 -0
  328. data/lib/stripe/services/test_helpers/customer_service.rb +21 -0
  329. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +844 -0
  330. data/lib/stripe/services/test_helpers/issuing/card_service.rb +45 -0
  331. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +43 -0
  332. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +723 -0
  333. data/lib/stripe/services/test_helpers/refund_service.rb +9 -0
  334. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +48 -0
  335. data/lib/stripe/services/test_helpers/test_clock_service.rb +63 -0
  336. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +39 -0
  337. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +93 -0
  338. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +93 -0
  339. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +95 -0
  340. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +95 -0
  341. data/lib/stripe/services/token_service.rb +1301 -0
  342. data/lib/stripe/services/topup_service.rb +163 -0
  343. data/lib/stripe/services/transfer_reversal_service.rb +74 -0
  344. data/lib/stripe/services/transfer_service.rb +138 -0
  345. data/lib/stripe/services/treasury/credit_reversal_service.rb +67 -0
  346. data/lib/stripe/services/treasury/debit_reversal_service.rb +72 -0
  347. data/lib/stripe/services/treasury/financial_account_features_service.rb +179 -0
  348. data/lib/stripe/services/treasury/financial_account_service.rb +481 -0
  349. data/lib/stripe/services/treasury/inbound_transfer_service.rb +100 -0
  350. data/lib/stripe/services/treasury/outbound_payment_service.rb +296 -0
  351. data/lib/stripe/services/treasury/outbound_transfer_service.rb +147 -0
  352. data/lib/stripe/services/treasury/received_credit_service.rb +58 -0
  353. data/lib/stripe/services/treasury/received_debit_service.rb +45 -0
  354. data/lib/stripe/services/treasury/transaction_entry_service.rb +101 -0
  355. data/lib/stripe/services/treasury/transaction_service.rb +109 -0
  356. data/lib/stripe/services/v1_services.rb +8 -1
  357. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +25 -0
  358. data/lib/stripe/services/v2/billing/meter_event_service.rb +28 -0
  359. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +3 -0
  360. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +36 -0
  361. data/lib/stripe/services/v2/core/event_destination_service.rb +164 -0
  362. data/lib/stripe/services/v2/core/event_service.rb +20 -0
  363. data/lib/stripe/services/webhook_endpoint_service.rb +110 -0
  364. data/lib/stripe/services.rb +25 -0
  365. data/lib/stripe/stripe_client.rb +2 -2
  366. data/lib/stripe/stripe_configuration.rb +3 -1
  367. data/lib/stripe/stripe_object.rb +8 -3
  368. data/lib/stripe/util.rb +8 -2
  369. data/lib/stripe/version.rb +1 -1
  370. data/lib/stripe.rb +46 -0
  371. data/rbi/stripe/resources/account.rbi +6072 -0
  372. data/rbi/stripe/resources/account_link.rbi +87 -0
  373. data/rbi/stripe/resources/account_notice.rbi +166 -0
  374. data/rbi/stripe/resources/account_session.rbi +1173 -0
  375. data/rbi/stripe/resources/apple_pay_domain.rbi +111 -0
  376. data/rbi/stripe/resources/application.rbi +23 -0
  377. data/rbi/stripe/resources/application_fee.rbi +151 -0
  378. data/rbi/stripe/resources/application_fee_refund.rbi +44 -0
  379. data/rbi/stripe/resources/apps/secret.rbi +229 -0
  380. data/rbi/stripe/resources/balance.rbi +220 -0
  381. data/rbi/stripe/resources/balance_transaction.rbi +182 -0
  382. data/rbi/stripe/resources/bank_account.rbi +156 -0
  383. data/rbi/stripe/resources/billing/alert.rbi +237 -0
  384. data/rbi/stripe/resources/billing/alert_triggered.rbi +33 -0
  385. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +118 -0
  386. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +181 -0
  387. data/rbi/stripe/resources/billing/credit_grant.rbi +312 -0
  388. data/rbi/stripe/resources/billing/meter.rbi +268 -0
  389. data/rbi/stripe/resources/billing/meter_error_report.rbi +82 -0
  390. data/rbi/stripe/resources/billing/meter_event.rbi +76 -0
  391. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +75 -0
  392. data/rbi/stripe/resources/billing/meter_event_summary.rbi +39 -0
  393. data/rbi/stripe/resources/billing_portal/configuration.rbi +746 -0
  394. data/rbi/stripe/resources/billing_portal/session.rbi +396 -0
  395. data/rbi/stripe/resources/capability.rbi +152 -0
  396. data/rbi/stripe/resources/capital/financing_offer.rbi +228 -0
  397. data/rbi/stripe/resources/capital/financing_summary.rbi +89 -0
  398. data/rbi/stripe/resources/capital/financing_transaction.rbi +157 -0
  399. data/rbi/stripe/resources/card.rbi +159 -0
  400. data/rbi/stripe/resources/cash_balance.rbi +37 -0
  401. data/rbi/stripe/resources/charge.rbi +4216 -0
  402. data/rbi/stripe/resources/checkout/session.rbi +4627 -0
  403. data/rbi/stripe/resources/climate/order.rbi +298 -0
  404. data/rbi/stripe/resources/climate/product.rbi +98 -0
  405. data/rbi/stripe/resources/climate/supplier.rbi +95 -0
  406. data/rbi/stripe/resources/confirmation_token.rbi +2137 -0
  407. data/rbi/stripe/resources/connect_collection_transfer.rbi +31 -0
  408. data/rbi/stripe/resources/country_spec.rbi +108 -0
  409. data/rbi/stripe/resources/coupon.rbi +305 -0
  410. data/rbi/stripe/resources/credit_note.rbi +918 -0
  411. data/rbi/stripe/resources/credit_note_line_item.rbi +123 -0
  412. data/rbi/stripe/resources/customer.rbi +1188 -0
  413. data/rbi/stripe/resources/customer_balance_transaction.rbi +65 -0
  414. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +178 -0
  415. data/rbi/stripe/resources/customer_session.rbi +227 -0
  416. data/rbi/stripe/resources/discount.rbi +65 -0
  417. data/rbi/stripe/resources/dispute.rbi +926 -0
  418. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +76 -0
  419. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +26 -0
  420. data/rbi/stripe/resources/entitlements/feature.rbi +146 -0
  421. data/rbi/stripe/resources/ephemeral_key.rbi +51 -0
  422. data/rbi/stripe/resources/event.rbi +221 -0
  423. data/rbi/stripe/resources/exchange_rate.rbi +81 -0
  424. data/rbi/stripe/resources/file.rbi +177 -0
  425. data/rbi/stripe/resources/file_link.rbi +174 -0
  426. data/rbi/stripe/resources/financial_connections/account.rbi +414 -0
  427. data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +30 -0
  428. data/rbi/stripe/resources/financial_connections/account_owner.rbi +42 -0
  429. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +26 -0
  430. data/rbi/stripe/resources/financial_connections/institution.rbi +115 -0
  431. data/rbi/stripe/resources/financial_connections/session.rbi +221 -0
  432. data/rbi/stripe/resources/financial_connections/transaction.rbi +153 -0
  433. data/rbi/stripe/resources/forwarding/request.rbi +257 -0
  434. data/rbi/stripe/resources/funding_instructions.rbi +544 -0
  435. data/rbi/stripe/resources/gift_cards/card.rbi +242 -0
  436. data/rbi/stripe/resources/gift_cards/transaction.rbi +298 -0
  437. data/rbi/stripe/resources/identity/verification_report.rbi +427 -0
  438. data/rbi/stripe/resources/identity/verification_session.rbi +601 -0
  439. data/rbi/stripe/resources/invoice.rbi +10584 -0
  440. data/rbi/stripe/resources/invoice_item.rbi +621 -0
  441. data/rbi/stripe/resources/invoice_line_item.rbi +486 -0
  442. data/rbi/stripe/resources/invoice_payment.rbi +86 -0
  443. data/rbi/stripe/resources/invoice_rendering_template.rbi +131 -0
  444. data/rbi/stripe/resources/issuing/authorization.rbi +1511 -0
  445. data/rbi/stripe/resources/issuing/card.rbi +891 -0
  446. data/rbi/stripe/resources/issuing/cardholder.rbi +870 -0
  447. data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +731 -0
  448. data/rbi/stripe/resources/issuing/dispute.rbi +1077 -0
  449. data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +100 -0
  450. data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +108 -0
  451. data/rbi/stripe/resources/issuing/personalization_design.rbi +395 -0
  452. data/rbi/stripe/resources/issuing/physical_bundle.rbi +102 -0
  453. data/rbi/stripe/resources/issuing/settlement.rbi +78 -0
  454. data/rbi/stripe/resources/issuing/token.rbi +282 -0
  455. data/rbi/stripe/resources/issuing/transaction.rbi +1262 -0
  456. data/rbi/stripe/resources/line_item.rbi +131 -0
  457. data/rbi/stripe/resources/login_link.rbi +20 -0
  458. data/rbi/stripe/resources/mandate.rbi +266 -0
  459. data/rbi/stripe/resources/margin.rbi +151 -0
  460. data/rbi/stripe/resources/order.rbi +3505 -0
  461. data/rbi/stripe/resources/payment_attempt_record.rbi +260 -0
  462. data/rbi/stripe/resources/payment_intent.rbi +16064 -0
  463. data/rbi/stripe/resources/payment_link.rbi +1943 -0
  464. data/rbi/stripe/resources/payment_method.rbi +2287 -0
  465. data/rbi/stripe/resources/payment_method_configuration.rbi +3657 -0
  466. data/rbi/stripe/resources/payment_method_domain.rbi +246 -0
  467. data/rbi/stripe/resources/payment_record.rbi +856 -0
  468. data/rbi/stripe/resources/payout.rbi +357 -0
  469. data/rbi/stripe/resources/person.rbi +461 -0
  470. data/rbi/stripe/resources/plan.rbi +463 -0
  471. data/rbi/stripe/resources/price.rbi +884 -0
  472. data/rbi/stripe/resources/product.rbi +735 -0
  473. data/rbi/stripe/resources/product_feature.rbi +30 -0
  474. data/rbi/stripe/resources/promotion_code.rbi +316 -0
  475. data/rbi/stripe/resources/quote.rbi +3779 -0
  476. data/rbi/stripe/resources/quote_line.rbi +416 -0
  477. data/rbi/stripe/resources/quote_preview_invoice.rbi +1030 -0
  478. data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +575 -0
  479. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +121 -0
  480. data/rbi/stripe/resources/radar/value_list.rbi +207 -0
  481. data/rbi/stripe/resources/radar/value_list_item.rbi +157 -0
  482. data/rbi/stripe/resources/refund.rbi +615 -0
  483. data/rbi/stripe/resources/reporting/report_run.rbi +232 -0
  484. data/rbi/stripe/resources/reporting/report_type.rbi +75 -0
  485. data/rbi/stripe/resources/reserve_transaction.rbi +27 -0
  486. data/rbi/stripe/resources/reversal.rbi +60 -0
  487. data/rbi/stripe/resources/review.rbi +191 -0
  488. data/rbi/stripe/resources/setup_attempt.rbi +587 -0
  489. data/rbi/stripe/resources/setup_intent.rbi +4726 -0
  490. data/rbi/stripe/resources/shipping_rate.rbi +367 -0
  491. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +98 -0
  492. data/rbi/stripe/resources/source.rbi +1899 -0
  493. data/rbi/stripe/resources/source_mandate_notification.rbi +90 -0
  494. data/rbi/stripe/resources/source_transaction.rbi +156 -0
  495. data/rbi/stripe/resources/subscription.rbi +2739 -0
  496. data/rbi/stripe/resources/subscription_item.rbi +566 -0
  497. data/rbi/stripe/resources/subscription_schedule.rbi +3157 -0
  498. data/rbi/stripe/resources/tax/association.rbi +107 -0
  499. data/rbi/stripe/resources/tax/calculation.rbi +577 -0
  500. data/rbi/stripe/resources/tax/calculation_line_item.rbi +108 -0
  501. data/rbi/stripe/resources/tax/form.rbi +262 -0
  502. data/rbi/stripe/resources/tax/registration.rbi +2354 -0
  503. data/rbi/stripe/resources/tax/settings.rbi +174 -0
  504. data/rbi/stripe/resources/tax/transaction.rbi +428 -0
  505. data/rbi/stripe/resources/tax/transaction_line_item.rbi +66 -0
  506. data/rbi/stripe/resources/tax_code.rbi +60 -0
  507. data/rbi/stripe/resources/tax_deducted_at_source.rbi +27 -0
  508. data/rbi/stripe/resources/tax_id.rbi +206 -0
  509. data/rbi/stripe/resources/tax_rate.rbi +295 -0
  510. data/rbi/stripe/resources/terminal/configuration.rbi +1302 -0
  511. data/rbi/stripe/resources/terminal/connection_token.rbi +42 -0
  512. data/rbi/stripe/resources/terminal/location.rbi +271 -0
  513. data/rbi/stripe/resources/terminal/reader.rbi +1110 -0
  514. data/rbi/stripe/resources/terminal/reader_collected_data.rbi +48 -0
  515. data/rbi/stripe/resources/test_helpers/test_clock.rbi +159 -0
  516. data/rbi/stripe/resources/token.rbi +1405 -0
  517. data/rbi/stripe/resources/topup.rbi +269 -0
  518. data/rbi/stripe/resources/transfer.rbi +245 -0
  519. data/rbi/stripe/resources/treasury/credit_reversal.rbi +151 -0
  520. data/rbi/stripe/resources/treasury/debit_reversal.rbi +165 -0
  521. data/rbi/stripe/resources/treasury/financial_account.rbi +924 -0
  522. data/rbi/stripe/resources/treasury/financial_account_features.rbi +309 -0
  523. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +361 -0
  524. data/rbi/stripe/resources/treasury/outbound_payment.rbi +702 -0
  525. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +529 -0
  526. data/rbi/stripe/resources/treasury/received_credit.rbi +408 -0
  527. data/rbi/stripe/resources/treasury/received_debit.rbi +367 -0
  528. data/rbi/stripe/resources/treasury/transaction.rbi +261 -0
  529. data/rbi/stripe/resources/treasury/transaction_entry.rbi +234 -0
  530. data/rbi/stripe/resources/usage_record.rbi +37 -0
  531. data/rbi/stripe/resources/usage_record_summary.rbi +45 -0
  532. data/rbi/stripe/resources/v2/amount.rbi +14 -0
  533. data/rbi/stripe/resources/v2/billing/meter_event.rbi +43 -0
  534. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +48 -0
  535. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +36 -0
  536. data/rbi/stripe/resources/v2/event.rbi +55 -0
  537. data/rbi/stripe/resources/v2/event_destination.rbi +109 -0
  538. data/rbi/stripe/resources/webhook_endpoint.rbi +208 -0
  539. data/rbi/stripe/services/account_capability_service.rbi +55 -0
  540. data/rbi/stripe/services/account_external_account_service.rbi +358 -0
  541. data/rbi/stripe/services/account_link_service.rbi +67 -0
  542. data/rbi/stripe/services/account_login_link_service.rbi +23 -0
  543. data/rbi/stripe/services/account_notice_service.rbi +103 -0
  544. data/rbi/stripe/services/account_person_service.rbi +1077 -0
  545. data/rbi/stripe/services/account_service.rbi +4948 -0
  546. data/rbi/stripe/services/account_session_service.rbi +873 -0
  547. data/rbi/stripe/services/apple_pay_domain_service.rbi +86 -0
  548. data/rbi/stripe/services/application_fee_refund_service.rbi +101 -0
  549. data/rbi/stripe/services/application_fee_service.rbi +85 -0
  550. data/rbi/stripe/services/apps/secret_service.rbi +175 -0
  551. data/rbi/stripe/services/apps_service.rbi +9 -0
  552. data/rbi/stripe/services/balance_service.rbi +22 -0
  553. data/rbi/stripe/services/balance_transaction_service.rbi +103 -0
  554. data/rbi/stripe/services/billing/alert_service.rbi +172 -0
  555. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +61 -0
  556. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +66 -0
  557. data/rbi/stripe/services/billing/credit_grant_service.rbi +217 -0
  558. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +45 -0
  559. data/rbi/stripe/services/billing/meter_event_service.rbi +47 -0
  560. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +62 -0
  561. data/rbi/stripe/services/billing/meter_service.rbi +184 -0
  562. data/rbi/stripe/services/billing_portal/configuration_service.rbi +573 -0
  563. data/rbi/stripe/services/billing_portal/session_service.rbi +233 -0
  564. data/rbi/stripe/services/billing_portal_service.rbi +10 -0
  565. data/rbi/stripe/services/billing_service.rbi +15 -0
  566. data/rbi/stripe/services/capital/financing_offer_service.rbi +108 -0
  567. data/rbi/stripe/services/capital/financing_summary_service.rbi +23 -0
  568. data/rbi/stripe/services/capital/financing_transaction_service.rbi +77 -0
  569. data/rbi/stripe/services/capital_service.rbi +11 -0
  570. data/rbi/stripe/services/charge_service.rbi +2162 -0
  571. data/rbi/stripe/services/checkout/session_line_item_service.rbi +37 -0
  572. data/rbi/stripe/services/checkout/session_service.rbi +2975 -0
  573. data/rbi/stripe/services/checkout_service.rbi +9 -0
  574. data/rbi/stripe/services/climate/order_service.rbi +158 -0
  575. data/rbi/stripe/services/climate/product_service.rbi +51 -0
  576. data/rbi/stripe/services/climate/supplier_service.rbi +51 -0
  577. data/rbi/stripe/services/climate_service.rbi +11 -0
  578. data/rbi/stripe/services/confirmation_token_service.rbi +21 -0
  579. data/rbi/stripe/services/country_spec_service.rbi +49 -0
  580. data/rbi/stripe/services/coupon_service.rbi +220 -0
  581. data/rbi/stripe/services/credit_note_line_item_service.rbi +35 -0
  582. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +200 -0
  583. data/rbi/stripe/services/credit_note_service.rbi +496 -0
  584. data/rbi/stripe/services/customer_balance_transaction_service.rbi +105 -0
  585. data/rbi/stripe/services/customer_cash_balance_service.rbi +49 -0
  586. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +49 -0
  587. data/rbi/stripe/services/customer_funding_instructions_service.rbi +67 -0
  588. data/rbi/stripe/services/customer_payment_method_service.rbi +64 -0
  589. data/rbi/stripe/services/customer_payment_source_service.rbi +265 -0
  590. data/rbi/stripe/services/customer_service.rbi +763 -0
  591. data/rbi/stripe/services/customer_session_service.rbi +126 -0
  592. data/rbi/stripe/services/customer_tax_id_service.rbi +80 -0
  593. data/rbi/stripe/services/dispute_service.rbi +500 -0
  594. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +61 -0
  595. data/rbi/stripe/services/entitlements/feature_service.rbi +122 -0
  596. data/rbi/stripe/services/entitlements_service.rbi +10 -0
  597. data/rbi/stripe/services/ephemeral_key_service.rbi +59 -0
  598. data/rbi/stripe/services/event_service.rbi +94 -0
  599. data/rbi/stripe/services/exchange_rate_service.rbi +49 -0
  600. data/rbi/stripe/services/file_link_service.rbi +141 -0
  601. data/rbi/stripe/services/file_service.rbi +132 -0
  602. data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +37 -0
  603. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +47 -0
  604. data/rbi/stripe/services/financial_connections/account_service.rbi +148 -0
  605. data/rbi/stripe/services/financial_connections/institution_service.rbi +51 -0
  606. data/rbi/stripe/services/financial_connections/session_service.rbi +128 -0
  607. data/rbi/stripe/services/financial_connections/transaction_service.rbi +103 -0
  608. data/rbi/stripe/services/financial_connections_service.rbi +12 -0
  609. data/rbi/stripe/services/forwarding/request_service.rbi +152 -0
  610. data/rbi/stripe/services/forwarding_service.rbi +9 -0
  611. data/rbi/stripe/services/gift_cards/card_service.rbi +162 -0
  612. data/rbi/stripe/services/gift_cards/transaction_service.rbi +198 -0
  613. data/rbi/stripe/services/gift_cards_service.rbi +10 -0
  614. data/rbi/stripe/services/identity/verification_report_service.rbi +98 -0
  615. data/rbi/stripe/services/identity/verification_session_service.rbi +360 -0
  616. data/rbi/stripe/services/identity_service.rbi +10 -0
  617. data/rbi/stripe/services/invoice_item_service.rbi +505 -0
  618. data/rbi/stripe/services/invoice_line_item_service.rbi +320 -0
  619. data/rbi/stripe/services/invoice_payment_service.rbi +49 -0
  620. data/rbi/stripe/services/invoice_rendering_template_service.rbi +91 -0
  621. data/rbi/stripe/services/invoice_service.rbi +7138 -0
  622. data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +2397 -0
  623. data/rbi/stripe/services/issuing/authorization_service.rbi +160 -0
  624. data/rbi/stripe/services/issuing/card_service.rbi +568 -0
  625. data/rbi/stripe/services/issuing/cardholder_service.rbi +668 -0
  626. data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +580 -0
  627. data/rbi/stripe/services/issuing/dispute_service.rbi +824 -0
  628. data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +61 -0
  629. data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +83 -0
  630. data/rbi/stripe/services/issuing/personalization_design_service.rbi +271 -0
  631. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +66 -0
  632. data/rbi/stripe/services/issuing/token_service.rbi +109 -0
  633. data/rbi/stripe/services/issuing/transaction_service.rbi +119 -0
  634. data/rbi/stripe/services/issuing_service.rbi +19 -0
  635. data/rbi/stripe/services/mandate_service.rbi +21 -0
  636. data/rbi/stripe/services/margin_service.rbi +119 -0
  637. data/rbi/stripe/services/order_line_item_service.rbi +35 -0
  638. data/rbi/stripe/services/order_service.rbi +2669 -0
  639. data/rbi/stripe/services/payment_attempt_record_service.rbi +39 -0
  640. data/rbi/stripe/services/payment_intent_service.rbi +13193 -0
  641. data/rbi/stripe/services/payment_link_line_item_service.rbi +35 -0
  642. data/rbi/stripe/services/payment_link_service.rbi +1447 -0
  643. data/rbi/stripe/services/payment_method_configuration_service.rbi +2465 -0
  644. data/rbi/stripe/services/payment_method_domain_service.rbi +123 -0
  645. data/rbi/stripe/services/payment_method_service.rbi +1032 -0
  646. data/rbi/stripe/services/payment_record_service.rbi +613 -0
  647. data/rbi/stripe/services/payout_service.rbi +228 -0
  648. data/rbi/stripe/services/plan_service.rbi +337 -0
  649. data/rbi/stripe/services/price_service.rbi +657 -0
  650. data/rbi/stripe/services/product_feature_service.rbi +76 -0
  651. data/rbi/stripe/services/product_service.rbi +596 -0
  652. data/rbi/stripe/services/promotion_code_service.rbi +244 -0
  653. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +35 -0
  654. data/rbi/stripe/services/quote_line_item_service.rbi +35 -0
  655. data/rbi/stripe/services/quote_line_service.rbi +35 -0
  656. data/rbi/stripe/services/quote_preview_invoice_service.rbi +35 -0
  657. data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +35 -0
  658. data/rbi/stripe/services/quote_service.rbi +2830 -0
  659. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +95 -0
  660. data/rbi/stripe/services/radar/value_list_item_service.rbi +122 -0
  661. data/rbi/stripe/services/radar/value_list_service.rbi +160 -0
  662. data/rbi/stripe/services/radar_service.rbi +11 -0
  663. data/rbi/stripe/services/refund_service.rbi +208 -0
  664. data/rbi/stripe/services/reporting/report_run_service.rbi +152 -0
  665. data/rbi/stripe/services/reporting/report_type_service.rbi +37 -0
  666. data/rbi/stripe/services/reporting_service.rbi +10 -0
  667. data/rbi/stripe/services/review_service.rbi +93 -0
  668. data/rbi/stripe/services/setup_attempt_service.rbi +73 -0
  669. data/rbi/stripe/services/setup_intent_service.rbi +4204 -0
  670. data/rbi/stripe/services/shipping_rate_service.rbi +274 -0
  671. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +51 -0
  672. data/rbi/stripe/services/sigma_service.rbi +9 -0
  673. data/rbi/stripe/services/source_service.rbi +766 -0
  674. data/rbi/stripe/services/source_transaction_service.rbi +35 -0
  675. data/rbi/stripe/services/subscription_item_service.rbi +496 -0
  676. data/rbi/stripe/services/subscription_item_usage_record_service.rbi +41 -0
  677. data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +37 -0
  678. data/rbi/stripe/services/subscription_schedule_service.rbi +2613 -0
  679. data/rbi/stripe/services/subscription_service.rbi +2207 -0
  680. data/rbi/stripe/services/tax/association_service.rbi +27 -0
  681. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +37 -0
  682. data/rbi/stripe/services/tax/calculation_service.rbi +267 -0
  683. data/rbi/stripe/services/tax/form_service.rbi +96 -0
  684. data/rbi/stripe/services/tax/registration_service.rbi +1495 -0
  685. data/rbi/stripe/services/tax/settings_service.rbi +106 -0
  686. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +37 -0
  687. data/rbi/stripe/services/tax/transaction_service.rbi +164 -0
  688. data/rbi/stripe/services/tax_code_service.rbi +49 -0
  689. data/rbi/stripe/services/tax_id_service.rbi +128 -0
  690. data/rbi/stripe/services/tax_rate_service.rbi +215 -0
  691. data/rbi/stripe/services/tax_service.rbi +14 -0
  692. data/rbi/stripe/services/terminal/configuration_service.rbi +976 -0
  693. data/rbi/stripe/services/terminal/connection_token_service.rbi +27 -0
  694. data/rbi/stripe/services/terminal/location_service.rbi +211 -0
  695. data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +23 -0
  696. data/rbi/stripe/services/terminal/reader_service.rbi +591 -0
  697. data/rbi/stripe/services/terminal_service.rbi +13 -0
  698. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +892 -0
  699. data/rbi/stripe/services/test_helpers/customer_service.rbi +37 -0
  700. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +974 -0
  701. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +81 -0
  702. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +73 -0
  703. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +825 -0
  704. data/rbi/stripe/services/test_helpers/issuing_service.rbi +14 -0
  705. data/rbi/stripe/services/test_helpers/refund_service.rbi +23 -0
  706. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +69 -0
  707. data/rbi/stripe/services/test_helpers/terminal_service.rbi +11 -0
  708. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +100 -0
  709. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +69 -0
  710. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +137 -0
  711. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +137 -0
  712. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +130 -0
  713. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +130 -0
  714. data/rbi/stripe/services/test_helpers/treasury_service.rbi +15 -0
  715. data/rbi/stripe/services/test_helpers_service.rbi +15 -0
  716. data/rbi/stripe/services/token_service.rbi +1357 -0
  717. data/rbi/stripe/services/topup_service.rbi +200 -0
  718. data/rbi/stripe/services/transfer_reversal_service.rbi +111 -0
  719. data/rbi/stripe/services/transfer_service.rbi +174 -0
  720. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +95 -0
  721. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +100 -0
  722. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +226 -0
  723. data/rbi/stripe/services/treasury/financial_account_service.rbi +577 -0
  724. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +133 -0
  725. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +350 -0
  726. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +189 -0
  727. data/rbi/stripe/services/treasury/received_credit_service.rbi +79 -0
  728. data/rbi/stripe/services/treasury/received_debit_service.rbi +66 -0
  729. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +125 -0
  730. data/rbi/stripe/services/treasury/transaction_service.rbi +133 -0
  731. data/rbi/stripe/services/treasury_service.rbi +18 -0
  732. data/rbi/stripe/services/v1_services.rbi +83 -0
  733. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +43 -0
  734. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +46 -0
  735. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +20 -0
  736. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +60 -0
  737. data/rbi/stripe/services/v2/billing_service.rbi +14 -0
  738. data/rbi/stripe/services/v2/core/event_destination_service.rbi +228 -0
  739. data/rbi/stripe/services/v2/core/event_service.rbi +42 -0
  740. data/rbi/stripe/services/v2/core_service.rbi +12 -0
  741. data/rbi/stripe/services/v2_services.rbi +10 -0
  742. data/rbi/stripe/services/webhook_endpoint_service.rbi +149 -0
  743. metadata +435 -4
@@ -0,0 +1,2613 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ # typed: true
5
+ module Stripe
6
+ class SubscriptionScheduleService < StripeService
7
+ class ListParams < Stripe::RequestParams
8
+ class CanceledAt < Stripe::RequestParams
9
+ # Minimum value to filter by (exclusive)
10
+ sig { returns(Integer) }
11
+ attr_accessor :gt
12
+
13
+ # Minimum value to filter by (inclusive)
14
+ sig { returns(Integer) }
15
+ attr_accessor :gte
16
+
17
+ # Maximum value to filter by (exclusive)
18
+ sig { returns(Integer) }
19
+ attr_accessor :lt
20
+
21
+ # Maximum value to filter by (inclusive)
22
+ sig { returns(Integer) }
23
+ attr_accessor :lte
24
+
25
+ sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void }
26
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
27
+ end
28
+ class CompletedAt < Stripe::RequestParams
29
+ # Minimum value to filter by (exclusive)
30
+ sig { returns(Integer) }
31
+ attr_accessor :gt
32
+
33
+ # Minimum value to filter by (inclusive)
34
+ sig { returns(Integer) }
35
+ attr_accessor :gte
36
+
37
+ # Maximum value to filter by (exclusive)
38
+ sig { returns(Integer) }
39
+ attr_accessor :lt
40
+
41
+ # Maximum value to filter by (inclusive)
42
+ sig { returns(Integer) }
43
+ attr_accessor :lte
44
+
45
+ sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void }
46
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
47
+ end
48
+ class Created < Stripe::RequestParams
49
+ # Minimum value to filter by (exclusive)
50
+ sig { returns(Integer) }
51
+ attr_accessor :gt
52
+
53
+ # Minimum value to filter by (inclusive)
54
+ sig { returns(Integer) }
55
+ attr_accessor :gte
56
+
57
+ # Maximum value to filter by (exclusive)
58
+ sig { returns(Integer) }
59
+ attr_accessor :lt
60
+
61
+ # Maximum value to filter by (inclusive)
62
+ sig { returns(Integer) }
63
+ attr_accessor :lte
64
+
65
+ sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void }
66
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
67
+ end
68
+ class ReleasedAt < Stripe::RequestParams
69
+ # Minimum value to filter by (exclusive)
70
+ sig { returns(Integer) }
71
+ attr_accessor :gt
72
+
73
+ # Minimum value to filter by (inclusive)
74
+ sig { returns(Integer) }
75
+ attr_accessor :gte
76
+
77
+ # Maximum value to filter by (exclusive)
78
+ sig { returns(Integer) }
79
+ attr_accessor :lt
80
+
81
+ # Maximum value to filter by (inclusive)
82
+ sig { returns(Integer) }
83
+ attr_accessor :lte
84
+
85
+ sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void }
86
+ def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
87
+ end
88
+ # Only return subscription schedules that were created canceled the given date interval.
89
+ sig { returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::CanceledAt, Integer)) }
90
+ attr_accessor :canceled_at
91
+
92
+ # Only return subscription schedules that completed during the given date interval.
93
+ sig {
94
+ returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::CompletedAt, Integer))
95
+ }
96
+ attr_accessor :completed_at
97
+
98
+ # Only return subscription schedules that were created during the given date interval.
99
+ sig { returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::Created, Integer)) }
100
+ attr_accessor :created
101
+
102
+ # Only return subscription schedules for the given customer.
103
+ sig { returns(String) }
104
+ attr_accessor :customer
105
+
106
+ # 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.
107
+ sig { returns(String) }
108
+ attr_accessor :ending_before
109
+
110
+ # Specifies which fields in the response should be expanded.
111
+ sig { returns(T::Array[String]) }
112
+ attr_accessor :expand
113
+
114
+ # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
115
+ sig { returns(Integer) }
116
+ attr_accessor :limit
117
+
118
+ # Only return subscription schedules that were released during the given date interval.
119
+ sig { returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::ReleasedAt, Integer)) }
120
+ attr_accessor :released_at
121
+
122
+ # Only return subscription schedules that have not started yet.
123
+ sig { returns(T::Boolean) }
124
+ attr_accessor :scheduled
125
+
126
+ # 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.
127
+ sig { returns(String) }
128
+ attr_accessor :starting_after
129
+
130
+ sig {
131
+ params(canceled_at: T.any(::Stripe::SubscriptionScheduleService::ListParams::CanceledAt, Integer), completed_at: T.any(::Stripe::SubscriptionScheduleService::ListParams::CompletedAt, Integer), created: T.any(::Stripe::SubscriptionScheduleService::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, released_at: T.any(::Stripe::SubscriptionScheduleService::ListParams::ReleasedAt, Integer), scheduled: T::Boolean, starting_after: String).void
132
+ }
133
+ def initialize(
134
+ canceled_at: nil,
135
+ completed_at: nil,
136
+ created: nil,
137
+ customer: nil,
138
+ ending_before: nil,
139
+ expand: nil,
140
+ limit: nil,
141
+ released_at: nil,
142
+ scheduled: nil,
143
+ starting_after: nil
144
+ ); end
145
+ end
146
+ class CreateParams < Stripe::RequestParams
147
+ class DefaultSettings < Stripe::RequestParams
148
+ class AutomaticTax < Stripe::RequestParams
149
+ class Liability < Stripe::RequestParams
150
+ # The connected account being referenced when `type` is `account`.
151
+ sig { returns(String) }
152
+ attr_accessor :account
153
+
154
+ # Type of the account referenced in the request.
155
+ sig { returns(String) }
156
+ attr_accessor :type
157
+
158
+ sig { params(account: String, type: String).void }
159
+ def initialize(account: nil, type: nil); end
160
+ end
161
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
162
+ sig { returns(T::Boolean) }
163
+ attr_accessor :enabled
164
+
165
+ # 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.
166
+ sig {
167
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax::Liability)
168
+ }
169
+ attr_accessor :liability
170
+
171
+ sig {
172
+ params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax::Liability).void
173
+ }
174
+ def initialize(enabled: nil, liability: nil); end
175
+ end
176
+ class BillingThresholds < Stripe::RequestParams
177
+ # Monetary threshold that triggers the subscription to advance to a new billing period
178
+ sig { returns(Integer) }
179
+ attr_accessor :amount_gte
180
+
181
+ # 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.
182
+ sig { returns(T::Boolean) }
183
+ attr_accessor :reset_billing_cycle_anchor
184
+
185
+ sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
186
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
187
+ end
188
+ class InvoiceSettings < Stripe::RequestParams
189
+ class Issuer < Stripe::RequestParams
190
+ # The connected account being referenced when `type` is `account`.
191
+ sig { returns(String) }
192
+ attr_accessor :account
193
+
194
+ # Type of the account referenced in the request.
195
+ sig { returns(String) }
196
+ attr_accessor :type
197
+
198
+ sig { params(account: String, type: String).void }
199
+ def initialize(account: nil, type: nil); end
200
+ end
201
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
202
+ sig { returns(T.nilable(T::Array[String])) }
203
+ attr_accessor :account_tax_ids
204
+
205
+ # 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`.
206
+ sig { returns(Integer) }
207
+ attr_accessor :days_until_due
208
+
209
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
210
+ sig {
211
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings::Issuer)
212
+ }
213
+ attr_accessor :issuer
214
+
215
+ sig {
216
+ params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings::Issuer).void
217
+ }
218
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
219
+ end
220
+ class TransferData < Stripe::RequestParams
221
+ # 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.
222
+ sig { returns(Float) }
223
+ attr_accessor :amount_percent
224
+
225
+ # ID of an existing, connected Stripe account.
226
+ sig { returns(String) }
227
+ attr_accessor :destination
228
+
229
+ sig { params(amount_percent: Float, destination: String).void }
230
+ def initialize(amount_percent: nil, destination: nil); end
231
+ end
232
+ # 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).
233
+ sig { returns(Float) }
234
+ attr_accessor :application_fee_percent
235
+
236
+ # Default settings for automatic tax computation.
237
+ sig {
238
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax)
239
+ }
240
+ attr_accessor :automatic_tax
241
+
242
+ # 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).
243
+ sig { returns(String) }
244
+ attr_accessor :billing_cycle_anchor
245
+
246
+ # 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.
247
+ sig {
248
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::BillingThresholds))
249
+ }
250
+ attr_accessor :billing_thresholds
251
+
252
+ # 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.
253
+ sig { returns(String) }
254
+ attr_accessor :collection_method
255
+
256
+ # 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.
257
+ sig { returns(String) }
258
+ attr_accessor :default_payment_method
259
+
260
+ # 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.
261
+ sig { returns(T.nilable(String)) }
262
+ attr_accessor :description
263
+
264
+ # All invoices will be billed using the specified settings.
265
+ sig {
266
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings)
267
+ }
268
+ attr_accessor :invoice_settings
269
+
270
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
271
+ sig { returns(T.nilable(String)) }
272
+ attr_accessor :on_behalf_of
273
+
274
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
275
+ sig {
276
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::TransferData))
277
+ }
278
+ attr_accessor :transfer_data
279
+
280
+ sig {
281
+ params(application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::BillingThresholds), collection_method: String, default_payment_method: String, description: T.nilable(String), invoice_settings: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings, on_behalf_of: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::TransferData)).void
282
+ }
283
+ def initialize(
284
+ application_fee_percent: nil,
285
+ automatic_tax: nil,
286
+ billing_cycle_anchor: nil,
287
+ billing_thresholds: nil,
288
+ collection_method: nil,
289
+ default_payment_method: nil,
290
+ description: nil,
291
+ invoice_settings: nil,
292
+ on_behalf_of: nil,
293
+ transfer_data: nil
294
+ ); end
295
+ end
296
+ class Phase < Stripe::RequestParams
297
+ class AddInvoiceItem < Stripe::RequestParams
298
+ class Discount < Stripe::RequestParams
299
+ class DiscountEnd < Stripe::RequestParams
300
+ class Duration < Stripe::RequestParams
301
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
302
+ sig { returns(String) }
303
+ attr_accessor :interval
304
+
305
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
306
+ sig { returns(Integer) }
307
+ attr_accessor :interval_count
308
+
309
+ sig { params(interval: String, interval_count: Integer).void }
310
+ def initialize(interval: nil, interval_count: nil); end
311
+ end
312
+ # Time span for the redeemed discount.
313
+ sig {
314
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration)
315
+ }
316
+ attr_accessor :duration
317
+
318
+ # A precise Unix timestamp for the discount to end. Must be in the future.
319
+ sig { returns(Integer) }
320
+ attr_accessor :timestamp
321
+
322
+ # The type of calculation made to determine when the discount ends.
323
+ sig { returns(String) }
324
+ attr_accessor :type
325
+
326
+ sig {
327
+ params(duration: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
328
+ }
329
+ def initialize(duration: nil, timestamp: nil, type: nil); end
330
+ end
331
+ # ID of the coupon to create a new discount for.
332
+ sig { returns(String) }
333
+ attr_accessor :coupon
334
+
335
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
336
+ sig { returns(String) }
337
+ attr_accessor :discount
338
+
339
+ # Details to determine how long the discount should be applied for.
340
+ sig {
341
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd)
342
+ }
343
+ attr_accessor :discount_end
344
+
345
+ # ID of the promotion code to create a new discount for.
346
+ sig { returns(String) }
347
+ attr_accessor :promotion_code
348
+
349
+ sig {
350
+ params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void
351
+ }
352
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
353
+ end
354
+ class PriceData < Stripe::RequestParams
355
+ # 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).
356
+ sig { returns(String) }
357
+ attr_accessor :currency
358
+
359
+ # The ID of the product that this price will belong to.
360
+ sig { returns(String) }
361
+ attr_accessor :product
362
+
363
+ # 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.
364
+ sig { returns(String) }
365
+ attr_accessor :tax_behavior
366
+
367
+ # 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.
368
+ sig { returns(Integer) }
369
+ attr_accessor :unit_amount
370
+
371
+ # 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.
372
+ sig { returns(String) }
373
+ attr_accessor :unit_amount_decimal
374
+
375
+ sig {
376
+ params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
377
+ }
378
+ def initialize(
379
+ currency: nil,
380
+ product: nil,
381
+ tax_behavior: nil,
382
+ unit_amount: nil,
383
+ unit_amount_decimal: nil
384
+ ); end
385
+ end
386
+ # The coupons to redeem into discounts for the item.
387
+ sig {
388
+ returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount])
389
+ }
390
+ attr_accessor :discounts
391
+
392
+ # The ID of the price object. One of `price` or `price_data` is required.
393
+ sig { returns(String) }
394
+ attr_accessor :price
395
+
396
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
397
+ sig {
398
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::PriceData)
399
+ }
400
+ attr_accessor :price_data
401
+
402
+ # Quantity for this item. Defaults to 1.
403
+ sig { returns(Integer) }
404
+ attr_accessor :quantity
405
+
406
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
407
+ sig { returns(T.nilable(T::Array[String])) }
408
+ attr_accessor :tax_rates
409
+
410
+ sig {
411
+ params(discounts: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
412
+ }
413
+ def initialize(
414
+ discounts: nil,
415
+ price: nil,
416
+ price_data: nil,
417
+ quantity: nil,
418
+ tax_rates: nil
419
+ ); end
420
+ end
421
+ class AutomaticTax < Stripe::RequestParams
422
+ class Liability < Stripe::RequestParams
423
+ # The connected account being referenced when `type` is `account`.
424
+ sig { returns(String) }
425
+ attr_accessor :account
426
+
427
+ # Type of the account referenced in the request.
428
+ sig { returns(String) }
429
+ attr_accessor :type
430
+
431
+ sig { params(account: String, type: String).void }
432
+ def initialize(account: nil, type: nil); end
433
+ end
434
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
435
+ sig { returns(T::Boolean) }
436
+ attr_accessor :enabled
437
+
438
+ # 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.
439
+ sig {
440
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax::Liability)
441
+ }
442
+ attr_accessor :liability
443
+
444
+ sig {
445
+ params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax::Liability).void
446
+ }
447
+ def initialize(enabled: nil, liability: nil); end
448
+ end
449
+ class BillingThresholds < Stripe::RequestParams
450
+ # Monetary threshold that triggers the subscription to advance to a new billing period
451
+ sig { returns(Integer) }
452
+ attr_accessor :amount_gte
453
+
454
+ # 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.
455
+ sig { returns(T::Boolean) }
456
+ attr_accessor :reset_billing_cycle_anchor
457
+
458
+ sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
459
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
460
+ end
461
+ class Discount < Stripe::RequestParams
462
+ class DiscountEnd < Stripe::RequestParams
463
+ class Duration < Stripe::RequestParams
464
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
465
+ sig { returns(String) }
466
+ attr_accessor :interval
467
+
468
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
469
+ sig { returns(Integer) }
470
+ attr_accessor :interval_count
471
+
472
+ sig { params(interval: String, interval_count: Integer).void }
473
+ def initialize(interval: nil, interval_count: nil); end
474
+ end
475
+ # Time span for the redeemed discount.
476
+ sig {
477
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd::Duration)
478
+ }
479
+ attr_accessor :duration
480
+
481
+ # A precise Unix timestamp for the discount to end. Must be in the future.
482
+ sig { returns(Integer) }
483
+ attr_accessor :timestamp
484
+
485
+ # The type of calculation made to determine when the discount ends.
486
+ sig { returns(String) }
487
+ attr_accessor :type
488
+
489
+ sig {
490
+ params(duration: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
491
+ }
492
+ def initialize(duration: nil, timestamp: nil, type: nil); end
493
+ end
494
+ # ID of the coupon to create a new discount for.
495
+ sig { returns(String) }
496
+ attr_accessor :coupon
497
+
498
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
499
+ sig { returns(String) }
500
+ attr_accessor :discount
501
+
502
+ # Details to determine how long the discount should be applied for.
503
+ sig {
504
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd)
505
+ }
506
+ attr_accessor :discount_end
507
+
508
+ # ID of the promotion code to create a new discount for.
509
+ sig { returns(String) }
510
+ attr_accessor :promotion_code
511
+
512
+ sig {
513
+ params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd, promotion_code: String).void
514
+ }
515
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
516
+ end
517
+ class InvoiceSettings < Stripe::RequestParams
518
+ class Issuer < Stripe::RequestParams
519
+ # The connected account being referenced when `type` is `account`.
520
+ sig { returns(String) }
521
+ attr_accessor :account
522
+
523
+ # Type of the account referenced in the request.
524
+ sig { returns(String) }
525
+ attr_accessor :type
526
+
527
+ sig { params(account: String, type: String).void }
528
+ def initialize(account: nil, type: nil); end
529
+ end
530
+ # 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.
531
+ sig { returns(T.nilable(T::Array[String])) }
532
+ attr_accessor :account_tax_ids
533
+
534
+ # 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`.
535
+ sig { returns(Integer) }
536
+ attr_accessor :days_until_due
537
+
538
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
539
+ sig {
540
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings::Issuer)
541
+ }
542
+ attr_accessor :issuer
543
+
544
+ sig {
545
+ params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings::Issuer).void
546
+ }
547
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
548
+ end
549
+ class Item < Stripe::RequestParams
550
+ class BillingThresholds < Stripe::RequestParams
551
+ # 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))
552
+ sig { returns(Integer) }
553
+ attr_accessor :usage_gte
554
+
555
+ sig { params(usage_gte: Integer).void }
556
+ def initialize(usage_gte: nil); end
557
+ end
558
+ class Discount < Stripe::RequestParams
559
+ class DiscountEnd < Stripe::RequestParams
560
+ class Duration < Stripe::RequestParams
561
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
562
+ sig { returns(String) }
563
+ attr_accessor :interval
564
+
565
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
566
+ sig { returns(Integer) }
567
+ attr_accessor :interval_count
568
+
569
+ sig { params(interval: String, interval_count: Integer).void }
570
+ def initialize(interval: nil, interval_count: nil); end
571
+ end
572
+ # Time span for the redeemed discount.
573
+ sig {
574
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd::Duration)
575
+ }
576
+ attr_accessor :duration
577
+
578
+ # A precise Unix timestamp for the discount to end. Must be in the future.
579
+ sig { returns(Integer) }
580
+ attr_accessor :timestamp
581
+
582
+ # The type of calculation made to determine when the discount ends.
583
+ sig { returns(String) }
584
+ attr_accessor :type
585
+
586
+ sig {
587
+ params(duration: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
588
+ }
589
+ def initialize(duration: nil, timestamp: nil, type: nil); end
590
+ end
591
+ # ID of the coupon to create a new discount for.
592
+ sig { returns(String) }
593
+ attr_accessor :coupon
594
+
595
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
596
+ sig { returns(String) }
597
+ attr_accessor :discount
598
+
599
+ # Details to determine how long the discount should be applied for.
600
+ sig {
601
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd)
602
+ }
603
+ attr_accessor :discount_end
604
+
605
+ # ID of the promotion code to create a new discount for.
606
+ sig { returns(String) }
607
+ attr_accessor :promotion_code
608
+
609
+ sig {
610
+ params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd, promotion_code: String).void
611
+ }
612
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
613
+ end
614
+ class PriceData < Stripe::RequestParams
615
+ class Recurring < Stripe::RequestParams
616
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
617
+ sig { returns(String) }
618
+ attr_accessor :interval
619
+
620
+ # 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).
621
+ sig { returns(Integer) }
622
+ attr_accessor :interval_count
623
+
624
+ sig { params(interval: String, interval_count: Integer).void }
625
+ def initialize(interval: nil, interval_count: nil); end
626
+ end
627
+ # 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).
628
+ sig { returns(String) }
629
+ attr_accessor :currency
630
+
631
+ # The ID of the product that this price will belong to.
632
+ sig { returns(String) }
633
+ attr_accessor :product
634
+
635
+ # The recurring components of a price such as `interval` and `interval_count`.
636
+ sig {
637
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData::Recurring)
638
+ }
639
+ attr_accessor :recurring
640
+
641
+ # 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.
642
+ sig { returns(String) }
643
+ attr_accessor :tax_behavior
644
+
645
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
646
+ sig { returns(Integer) }
647
+ attr_accessor :unit_amount
648
+
649
+ # 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.
650
+ sig { returns(String) }
651
+ attr_accessor :unit_amount_decimal
652
+
653
+ sig {
654
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
655
+ }
656
+ def initialize(
657
+ currency: nil,
658
+ product: nil,
659
+ recurring: nil,
660
+ tax_behavior: nil,
661
+ unit_amount: nil,
662
+ unit_amount_decimal: nil
663
+ ); end
664
+ end
665
+ class Trial < Stripe::RequestParams
666
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
667
+ sig { returns(T::Array[String]) }
668
+ attr_accessor :converts_to
669
+
670
+ # Determines the type of trial for this item.
671
+ sig { returns(String) }
672
+ attr_accessor :type
673
+
674
+ sig { params(converts_to: T::Array[String], type: String).void }
675
+ def initialize(converts_to: nil, type: nil); end
676
+ end
677
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
678
+ sig {
679
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::BillingThresholds))
680
+ }
681
+ attr_accessor :billing_thresholds
682
+
683
+ # The coupons to redeem into discounts for the subscription item.
684
+ sig {
685
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount]))
686
+ }
687
+ attr_accessor :discounts
688
+
689
+ # 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`.
690
+ sig { returns(T::Hash[String, String]) }
691
+ attr_accessor :metadata
692
+
693
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
694
+ sig { returns(String) }
695
+ attr_accessor :plan
696
+
697
+ # The ID of the price object.
698
+ sig { returns(String) }
699
+ attr_accessor :price
700
+
701
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
702
+ sig {
703
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData)
704
+ }
705
+ attr_accessor :price_data
706
+
707
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
708
+ sig { returns(Integer) }
709
+ attr_accessor :quantity
710
+
711
+ # 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.
712
+ sig { returns(T.nilable(T::Array[String])) }
713
+ attr_accessor :tax_rates
714
+
715
+ # Options that configure the trial on the subscription item.
716
+ sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Trial) }
717
+ attr_accessor :trial
718
+
719
+ sig {
720
+ params(billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Trial).void
721
+ }
722
+ def initialize(
723
+ billing_thresholds: nil,
724
+ discounts: nil,
725
+ metadata: nil,
726
+ plan: nil,
727
+ price: nil,
728
+ price_data: nil,
729
+ quantity: nil,
730
+ tax_rates: nil,
731
+ trial: nil
732
+ ); end
733
+ end
734
+ class PauseCollection < Stripe::RequestParams
735
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
736
+ sig { returns(String) }
737
+ attr_accessor :behavior
738
+
739
+ sig { params(behavior: String).void }
740
+ def initialize(behavior: nil); end
741
+ end
742
+ class TransferData < Stripe::RequestParams
743
+ # 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.
744
+ sig { returns(Float) }
745
+ attr_accessor :amount_percent
746
+
747
+ # ID of an existing, connected Stripe account.
748
+ sig { returns(String) }
749
+ attr_accessor :destination
750
+
751
+ sig { params(amount_percent: Float, destination: String).void }
752
+ def initialize(amount_percent: nil, destination: nil); end
753
+ end
754
+ class TrialSettings < Stripe::RequestParams
755
+ class EndBehavior < Stripe::RequestParams
756
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
757
+ sig { returns(String) }
758
+ attr_accessor :prorate_up_front
759
+
760
+ sig { params(prorate_up_front: String).void }
761
+ def initialize(prorate_up_front: nil); end
762
+ end
763
+ # Defines how the subscription should behave when a trial ends.
764
+ sig {
765
+ returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings::EndBehavior)
766
+ }
767
+ attr_accessor :end_behavior
768
+
769
+ sig {
770
+ params(end_behavior: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings::EndBehavior).void
771
+ }
772
+ def initialize(end_behavior: nil); end
773
+ end
774
+ # 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.
775
+ sig {
776
+ returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem])
777
+ }
778
+ attr_accessor :add_invoice_items
779
+
780
+ # 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).
781
+ sig { returns(Float) }
782
+ attr_accessor :application_fee_percent
783
+
784
+ # Automatic tax settings for this phase.
785
+ sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax) }
786
+ attr_accessor :automatic_tax
787
+
788
+ # 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).
789
+ sig { returns(String) }
790
+ attr_accessor :billing_cycle_anchor
791
+
792
+ # 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.
793
+ sig {
794
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::BillingThresholds))
795
+ }
796
+ attr_accessor :billing_thresholds
797
+
798
+ # 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.
799
+ sig { returns(String) }
800
+ attr_accessor :collection_method
801
+
802
+ # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
803
+ sig { returns(String) }
804
+ attr_accessor :coupon
805
+
806
+ # 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).
807
+ sig { returns(String) }
808
+ attr_accessor :currency
809
+
810
+ # 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.
811
+ sig { returns(String) }
812
+ attr_accessor :default_payment_method
813
+
814
+ # 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.
815
+ sig { returns(T.nilable(T::Array[String])) }
816
+ attr_accessor :default_tax_rates
817
+
818
+ # 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.
819
+ sig { returns(T.nilable(String)) }
820
+ attr_accessor :description
821
+
822
+ # 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.
823
+ sig {
824
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]))
825
+ }
826
+ attr_accessor :discounts
827
+
828
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
829
+ sig { returns(Integer) }
830
+ attr_accessor :end_date
831
+
832
+ # All invoices will be billed using the specified settings.
833
+ sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings) }
834
+ attr_accessor :invoice_settings
835
+
836
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
837
+ sig { returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item]) }
838
+ attr_accessor :items
839
+
840
+ # 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.
841
+ sig { returns(Integer) }
842
+ attr_accessor :iterations
843
+
844
+ # 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`.
845
+ sig { returns(T::Hash[String, String]) }
846
+ attr_accessor :metadata
847
+
848
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
849
+ sig { returns(String) }
850
+ attr_accessor :on_behalf_of
851
+
852
+ # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
853
+ sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::PauseCollection) }
854
+ attr_accessor :pause_collection
855
+
856
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
857
+ sig { returns(String) }
858
+ attr_accessor :proration_behavior
859
+
860
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
861
+ sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TransferData) }
862
+ attr_accessor :transfer_data
863
+
864
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
865
+ sig { returns(T::Boolean) }
866
+ attr_accessor :trial
867
+
868
+ # Specify trial behavior when crossing phase boundaries
869
+ sig { returns(String) }
870
+ attr_accessor :trial_continuation
871
+
872
+ # 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`
873
+ sig { returns(Integer) }
874
+ attr_accessor :trial_end
875
+
876
+ # Settings related to subscription trials.
877
+ sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings) }
878
+ attr_accessor :trial_settings
879
+
880
+ sig {
881
+ params(add_invoice_items: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]), end_date: Integer, invoice_settings: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings, items: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::PauseCollection, proration_behavior: String, transfer_data: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: Integer, trial_settings: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings).void
882
+ }
883
+ def initialize(
884
+ add_invoice_items: nil,
885
+ application_fee_percent: nil,
886
+ automatic_tax: nil,
887
+ billing_cycle_anchor: nil,
888
+ billing_thresholds: nil,
889
+ collection_method: nil,
890
+ coupon: nil,
891
+ currency: nil,
892
+ default_payment_method: nil,
893
+ default_tax_rates: nil,
894
+ description: nil,
895
+ discounts: nil,
896
+ end_date: nil,
897
+ invoice_settings: nil,
898
+ items: nil,
899
+ iterations: nil,
900
+ metadata: nil,
901
+ on_behalf_of: nil,
902
+ pause_collection: nil,
903
+ proration_behavior: nil,
904
+ transfer_data: nil,
905
+ trial: nil,
906
+ trial_continuation: nil,
907
+ trial_end: nil,
908
+ trial_settings: nil
909
+ ); end
910
+ end
911
+ class Prebilling < Stripe::RequestParams
912
+ # This is used to determine the number of billing cycles to prebill.
913
+ sig { returns(Integer) }
914
+ attr_accessor :iterations
915
+
916
+ # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
917
+ sig { returns(String) }
918
+ attr_accessor :update_behavior
919
+
920
+ sig { params(iterations: Integer, update_behavior: String).void }
921
+ def initialize(iterations: nil, update_behavior: nil); end
922
+ end
923
+ # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
924
+ sig { returns(String) }
925
+ attr_accessor :billing_behavior
926
+
927
+ # The identifier of the customer to create the subscription schedule for.
928
+ sig { returns(String) }
929
+ attr_accessor :customer
930
+
931
+ # Object representing the subscription schedule's default settings.
932
+ sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings) }
933
+ attr_accessor :default_settings
934
+
935
+ # 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.
936
+ sig { returns(String) }
937
+ attr_accessor :end_behavior
938
+
939
+ # Specifies which fields in the response should be expanded.
940
+ sig { returns(T::Array[String]) }
941
+ attr_accessor :expand
942
+
943
+ # 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.
944
+ sig { returns(String) }
945
+ attr_accessor :from_subscription
946
+
947
+ # 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`.
948
+ sig { returns(T.nilable(T::Hash[String, String])) }
949
+ attr_accessor :metadata
950
+
951
+ # 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.
952
+ sig { returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase]) }
953
+ attr_accessor :phases
954
+
955
+ # If specified, the invoicing for the given billing cycle iterations will be processed now.
956
+ sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Prebilling) }
957
+ attr_accessor :prebilling
958
+
959
+ # 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.
960
+ sig { returns(T.any(Integer, String)) }
961
+ attr_accessor :start_date
962
+
963
+ sig {
964
+ params(billing_behavior: String, customer: String, default_settings: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings, end_behavior: String, expand: T::Array[String], from_subscription: String, metadata: T.nilable(T::Hash[String, String]), phases: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase], prebilling: ::Stripe::SubscriptionScheduleService::CreateParams::Prebilling, start_date: T.any(Integer, String)).void
965
+ }
966
+ def initialize(
967
+ billing_behavior: nil,
968
+ customer: nil,
969
+ default_settings: nil,
970
+ end_behavior: nil,
971
+ expand: nil,
972
+ from_subscription: nil,
973
+ metadata: nil,
974
+ phases: nil,
975
+ prebilling: nil,
976
+ start_date: nil
977
+ ); end
978
+ end
979
+ class RetrieveParams < Stripe::RequestParams
980
+ # Specifies which fields in the response should be expanded.
981
+ sig { returns(T::Array[String]) }
982
+ attr_accessor :expand
983
+
984
+ sig { params(expand: T::Array[String]).void }
985
+ def initialize(expand: nil); end
986
+ end
987
+ class UpdateParams < Stripe::RequestParams
988
+ class DefaultSettings < Stripe::RequestParams
989
+ class AutomaticTax < Stripe::RequestParams
990
+ class Liability < Stripe::RequestParams
991
+ # The connected account being referenced when `type` is `account`.
992
+ sig { returns(String) }
993
+ attr_accessor :account
994
+
995
+ # Type of the account referenced in the request.
996
+ sig { returns(String) }
997
+ attr_accessor :type
998
+
999
+ sig { params(account: String, type: String).void }
1000
+ def initialize(account: nil, type: nil); end
1001
+ end
1002
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1003
+ sig { returns(T::Boolean) }
1004
+ attr_accessor :enabled
1005
+
1006
+ # 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.
1007
+ sig {
1008
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax::Liability)
1009
+ }
1010
+ attr_accessor :liability
1011
+
1012
+ sig {
1013
+ params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax::Liability).void
1014
+ }
1015
+ def initialize(enabled: nil, liability: nil); end
1016
+ end
1017
+ class BillingThresholds < Stripe::RequestParams
1018
+ # Monetary threshold that triggers the subscription to advance to a new billing period
1019
+ sig { returns(Integer) }
1020
+ attr_accessor :amount_gte
1021
+
1022
+ # 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.
1023
+ sig { returns(T::Boolean) }
1024
+ attr_accessor :reset_billing_cycle_anchor
1025
+
1026
+ sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
1027
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1028
+ end
1029
+ class InvoiceSettings < Stripe::RequestParams
1030
+ class Issuer < Stripe::RequestParams
1031
+ # The connected account being referenced when `type` is `account`.
1032
+ sig { returns(String) }
1033
+ attr_accessor :account
1034
+
1035
+ # Type of the account referenced in the request.
1036
+ sig { returns(String) }
1037
+ attr_accessor :type
1038
+
1039
+ sig { params(account: String, type: String).void }
1040
+ def initialize(account: nil, type: nil); end
1041
+ end
1042
+ # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
1043
+ sig { returns(T.nilable(T::Array[String])) }
1044
+ attr_accessor :account_tax_ids
1045
+
1046
+ # 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`.
1047
+ sig { returns(Integer) }
1048
+ attr_accessor :days_until_due
1049
+
1050
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1051
+ sig {
1052
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings::Issuer)
1053
+ }
1054
+ attr_accessor :issuer
1055
+
1056
+ sig {
1057
+ params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings::Issuer).void
1058
+ }
1059
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
1060
+ end
1061
+ class TransferData < Stripe::RequestParams
1062
+ # 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.
1063
+ sig { returns(Float) }
1064
+ attr_accessor :amount_percent
1065
+
1066
+ # ID of an existing, connected Stripe account.
1067
+ sig { returns(String) }
1068
+ attr_accessor :destination
1069
+
1070
+ sig { params(amount_percent: Float, destination: String).void }
1071
+ def initialize(amount_percent: nil, destination: nil); end
1072
+ end
1073
+ # 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).
1074
+ sig { returns(Float) }
1075
+ attr_accessor :application_fee_percent
1076
+
1077
+ # Default settings for automatic tax computation.
1078
+ sig {
1079
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax)
1080
+ }
1081
+ attr_accessor :automatic_tax
1082
+
1083
+ # 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).
1084
+ sig { returns(String) }
1085
+ attr_accessor :billing_cycle_anchor
1086
+
1087
+ # 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.
1088
+ sig {
1089
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::BillingThresholds))
1090
+ }
1091
+ attr_accessor :billing_thresholds
1092
+
1093
+ # 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.
1094
+ sig { returns(String) }
1095
+ attr_accessor :collection_method
1096
+
1097
+ # 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.
1098
+ sig { returns(String) }
1099
+ attr_accessor :default_payment_method
1100
+
1101
+ # 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.
1102
+ sig { returns(T.nilable(String)) }
1103
+ attr_accessor :description
1104
+
1105
+ # All invoices will be billed using the specified settings.
1106
+ sig {
1107
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings)
1108
+ }
1109
+ attr_accessor :invoice_settings
1110
+
1111
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
1112
+ sig { returns(T.nilable(String)) }
1113
+ attr_accessor :on_behalf_of
1114
+
1115
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1116
+ sig {
1117
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::TransferData))
1118
+ }
1119
+ attr_accessor :transfer_data
1120
+
1121
+ sig {
1122
+ params(application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::BillingThresholds), collection_method: String, default_payment_method: String, description: T.nilable(String), invoice_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings, on_behalf_of: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::TransferData)).void
1123
+ }
1124
+ def initialize(
1125
+ application_fee_percent: nil,
1126
+ automatic_tax: nil,
1127
+ billing_cycle_anchor: nil,
1128
+ billing_thresholds: nil,
1129
+ collection_method: nil,
1130
+ default_payment_method: nil,
1131
+ description: nil,
1132
+ invoice_settings: nil,
1133
+ on_behalf_of: nil,
1134
+ transfer_data: nil
1135
+ ); end
1136
+ end
1137
+ class Phase < Stripe::RequestParams
1138
+ class AddInvoiceItem < Stripe::RequestParams
1139
+ class Discount < Stripe::RequestParams
1140
+ class DiscountEnd < Stripe::RequestParams
1141
+ class Duration < Stripe::RequestParams
1142
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1143
+ sig { returns(String) }
1144
+ attr_accessor :interval
1145
+
1146
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1147
+ sig { returns(Integer) }
1148
+ attr_accessor :interval_count
1149
+
1150
+ sig { params(interval: String, interval_count: Integer).void }
1151
+ def initialize(interval: nil, interval_count: nil); end
1152
+ end
1153
+ # Time span for the redeemed discount.
1154
+ sig {
1155
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration)
1156
+ }
1157
+ attr_accessor :duration
1158
+
1159
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1160
+ sig { returns(Integer) }
1161
+ attr_accessor :timestamp
1162
+
1163
+ # The type of calculation made to determine when the discount ends.
1164
+ sig { returns(String) }
1165
+ attr_accessor :type
1166
+
1167
+ sig {
1168
+ params(duration: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1169
+ }
1170
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1171
+ end
1172
+ # ID of the coupon to create a new discount for.
1173
+ sig { returns(String) }
1174
+ attr_accessor :coupon
1175
+
1176
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1177
+ sig { returns(String) }
1178
+ attr_accessor :discount
1179
+
1180
+ # Details to determine how long the discount should be applied for.
1181
+ sig {
1182
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd)
1183
+ }
1184
+ attr_accessor :discount_end
1185
+
1186
+ # ID of the promotion code to create a new discount for.
1187
+ sig { returns(String) }
1188
+ attr_accessor :promotion_code
1189
+
1190
+ sig {
1191
+ params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void
1192
+ }
1193
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1194
+ end
1195
+ class PriceData < Stripe::RequestParams
1196
+ # 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).
1197
+ sig { returns(String) }
1198
+ attr_accessor :currency
1199
+
1200
+ # The ID of the product that this price will belong to.
1201
+ sig { returns(String) }
1202
+ attr_accessor :product
1203
+
1204
+ # 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.
1205
+ sig { returns(String) }
1206
+ attr_accessor :tax_behavior
1207
+
1208
+ # 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.
1209
+ sig { returns(Integer) }
1210
+ attr_accessor :unit_amount
1211
+
1212
+ # 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.
1213
+ sig { returns(String) }
1214
+ attr_accessor :unit_amount_decimal
1215
+
1216
+ sig {
1217
+ params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
1218
+ }
1219
+ def initialize(
1220
+ currency: nil,
1221
+ product: nil,
1222
+ tax_behavior: nil,
1223
+ unit_amount: nil,
1224
+ unit_amount_decimal: nil
1225
+ ); end
1226
+ end
1227
+ # The coupons to redeem into discounts for the item.
1228
+ sig {
1229
+ returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount])
1230
+ }
1231
+ attr_accessor :discounts
1232
+
1233
+ # The ID of the price object. One of `price` or `price_data` is required.
1234
+ sig { returns(String) }
1235
+ attr_accessor :price
1236
+
1237
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1238
+ sig {
1239
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::PriceData)
1240
+ }
1241
+ attr_accessor :price_data
1242
+
1243
+ # Quantity for this item. Defaults to 1.
1244
+ sig { returns(Integer) }
1245
+ attr_accessor :quantity
1246
+
1247
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
1248
+ sig { returns(T.nilable(T::Array[String])) }
1249
+ attr_accessor :tax_rates
1250
+
1251
+ sig {
1252
+ params(discounts: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
1253
+ }
1254
+ def initialize(
1255
+ discounts: nil,
1256
+ price: nil,
1257
+ price_data: nil,
1258
+ quantity: nil,
1259
+ tax_rates: nil
1260
+ ); end
1261
+ end
1262
+ class AutomaticTax < Stripe::RequestParams
1263
+ class Liability < Stripe::RequestParams
1264
+ # The connected account being referenced when `type` is `account`.
1265
+ sig { returns(String) }
1266
+ attr_accessor :account
1267
+
1268
+ # Type of the account referenced in the request.
1269
+ sig { returns(String) }
1270
+ attr_accessor :type
1271
+
1272
+ sig { params(account: String, type: String).void }
1273
+ def initialize(account: nil, type: nil); end
1274
+ end
1275
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1276
+ sig { returns(T::Boolean) }
1277
+ attr_accessor :enabled
1278
+
1279
+ # 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.
1280
+ sig {
1281
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax::Liability)
1282
+ }
1283
+ attr_accessor :liability
1284
+
1285
+ sig {
1286
+ params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax::Liability).void
1287
+ }
1288
+ def initialize(enabled: nil, liability: nil); end
1289
+ end
1290
+ class BillingThresholds < Stripe::RequestParams
1291
+ # Monetary threshold that triggers the subscription to advance to a new billing period
1292
+ sig { returns(Integer) }
1293
+ attr_accessor :amount_gte
1294
+
1295
+ # 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.
1296
+ sig { returns(T::Boolean) }
1297
+ attr_accessor :reset_billing_cycle_anchor
1298
+
1299
+ sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
1300
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1301
+ end
1302
+ class Discount < Stripe::RequestParams
1303
+ class DiscountEnd < Stripe::RequestParams
1304
+ class Duration < Stripe::RequestParams
1305
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1306
+ sig { returns(String) }
1307
+ attr_accessor :interval
1308
+
1309
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1310
+ sig { returns(Integer) }
1311
+ attr_accessor :interval_count
1312
+
1313
+ sig { params(interval: String, interval_count: Integer).void }
1314
+ def initialize(interval: nil, interval_count: nil); end
1315
+ end
1316
+ # Time span for the redeemed discount.
1317
+ sig {
1318
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd::Duration)
1319
+ }
1320
+ attr_accessor :duration
1321
+
1322
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1323
+ sig { returns(Integer) }
1324
+ attr_accessor :timestamp
1325
+
1326
+ # The type of calculation made to determine when the discount ends.
1327
+ sig { returns(String) }
1328
+ attr_accessor :type
1329
+
1330
+ sig {
1331
+ params(duration: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1332
+ }
1333
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1334
+ end
1335
+ # ID of the coupon to create a new discount for.
1336
+ sig { returns(String) }
1337
+ attr_accessor :coupon
1338
+
1339
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1340
+ sig { returns(String) }
1341
+ attr_accessor :discount
1342
+
1343
+ # Details to determine how long the discount should be applied for.
1344
+ sig {
1345
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd)
1346
+ }
1347
+ attr_accessor :discount_end
1348
+
1349
+ # ID of the promotion code to create a new discount for.
1350
+ sig { returns(String) }
1351
+ attr_accessor :promotion_code
1352
+
1353
+ sig {
1354
+ params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd, promotion_code: String).void
1355
+ }
1356
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1357
+ end
1358
+ class InvoiceSettings < Stripe::RequestParams
1359
+ class Issuer < Stripe::RequestParams
1360
+ # The connected account being referenced when `type` is `account`.
1361
+ sig { returns(String) }
1362
+ attr_accessor :account
1363
+
1364
+ # Type of the account referenced in the request.
1365
+ sig { returns(String) }
1366
+ attr_accessor :type
1367
+
1368
+ sig { params(account: String, type: String).void }
1369
+ def initialize(account: nil, type: nil); end
1370
+ end
1371
+ # 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.
1372
+ sig { returns(T.nilable(T::Array[String])) }
1373
+ attr_accessor :account_tax_ids
1374
+
1375
+ # 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`.
1376
+ sig { returns(Integer) }
1377
+ attr_accessor :days_until_due
1378
+
1379
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1380
+ sig {
1381
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings::Issuer)
1382
+ }
1383
+ attr_accessor :issuer
1384
+
1385
+ sig {
1386
+ params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings::Issuer).void
1387
+ }
1388
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end
1389
+ end
1390
+ class Item < Stripe::RequestParams
1391
+ class BillingThresholds < Stripe::RequestParams
1392
+ # 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))
1393
+ sig { returns(Integer) }
1394
+ attr_accessor :usage_gte
1395
+
1396
+ sig { params(usage_gte: Integer).void }
1397
+ def initialize(usage_gte: nil); end
1398
+ end
1399
+ class Discount < Stripe::RequestParams
1400
+ class DiscountEnd < Stripe::RequestParams
1401
+ class Duration < Stripe::RequestParams
1402
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1403
+ sig { returns(String) }
1404
+ attr_accessor :interval
1405
+
1406
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1407
+ sig { returns(Integer) }
1408
+ attr_accessor :interval_count
1409
+
1410
+ sig { params(interval: String, interval_count: Integer).void }
1411
+ def initialize(interval: nil, interval_count: nil); end
1412
+ end
1413
+ # Time span for the redeemed discount.
1414
+ sig {
1415
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd::Duration)
1416
+ }
1417
+ attr_accessor :duration
1418
+
1419
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1420
+ sig { returns(Integer) }
1421
+ attr_accessor :timestamp
1422
+
1423
+ # The type of calculation made to determine when the discount ends.
1424
+ sig { returns(String) }
1425
+ attr_accessor :type
1426
+
1427
+ sig {
1428
+ params(duration: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1429
+ }
1430
+ def initialize(duration: nil, timestamp: nil, type: nil); end
1431
+ end
1432
+ # ID of the coupon to create a new discount for.
1433
+ sig { returns(String) }
1434
+ attr_accessor :coupon
1435
+
1436
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1437
+ sig { returns(String) }
1438
+ attr_accessor :discount
1439
+
1440
+ # Details to determine how long the discount should be applied for.
1441
+ sig {
1442
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd)
1443
+ }
1444
+ attr_accessor :discount_end
1445
+
1446
+ # ID of the promotion code to create a new discount for.
1447
+ sig { returns(String) }
1448
+ attr_accessor :promotion_code
1449
+
1450
+ sig {
1451
+ params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd, promotion_code: String).void
1452
+ }
1453
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1454
+ end
1455
+ class PriceData < Stripe::RequestParams
1456
+ class Recurring < Stripe::RequestParams
1457
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1458
+ sig { returns(String) }
1459
+ attr_accessor :interval
1460
+
1461
+ # 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).
1462
+ sig { returns(Integer) }
1463
+ attr_accessor :interval_count
1464
+
1465
+ sig { params(interval: String, interval_count: Integer).void }
1466
+ def initialize(interval: nil, interval_count: nil); end
1467
+ end
1468
+ # 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).
1469
+ sig { returns(String) }
1470
+ attr_accessor :currency
1471
+
1472
+ # The ID of the product that this price will belong to.
1473
+ sig { returns(String) }
1474
+ attr_accessor :product
1475
+
1476
+ # The recurring components of a price such as `interval` and `interval_count`.
1477
+ sig {
1478
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData::Recurring)
1479
+ }
1480
+ attr_accessor :recurring
1481
+
1482
+ # 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.
1483
+ sig { returns(String) }
1484
+ attr_accessor :tax_behavior
1485
+
1486
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1487
+ sig { returns(Integer) }
1488
+ attr_accessor :unit_amount
1489
+
1490
+ # 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.
1491
+ sig { returns(String) }
1492
+ attr_accessor :unit_amount_decimal
1493
+
1494
+ sig {
1495
+ params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
1496
+ }
1497
+ def initialize(
1498
+ currency: nil,
1499
+ product: nil,
1500
+ recurring: nil,
1501
+ tax_behavior: nil,
1502
+ unit_amount: nil,
1503
+ unit_amount_decimal: nil
1504
+ ); end
1505
+ end
1506
+ class Trial < Stripe::RequestParams
1507
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
1508
+ sig { returns(T::Array[String]) }
1509
+ attr_accessor :converts_to
1510
+
1511
+ # Determines the type of trial for this item.
1512
+ sig { returns(String) }
1513
+ attr_accessor :type
1514
+
1515
+ sig { params(converts_to: T::Array[String], type: String).void }
1516
+ def initialize(converts_to: nil, type: nil); end
1517
+ end
1518
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
1519
+ sig {
1520
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::BillingThresholds))
1521
+ }
1522
+ attr_accessor :billing_thresholds
1523
+
1524
+ # The coupons to redeem into discounts for the subscription item.
1525
+ sig {
1526
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount]))
1527
+ }
1528
+ attr_accessor :discounts
1529
+
1530
+ # 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`.
1531
+ sig { returns(T::Hash[String, String]) }
1532
+ attr_accessor :metadata
1533
+
1534
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
1535
+ sig { returns(String) }
1536
+ attr_accessor :plan
1537
+
1538
+ # The ID of the price object.
1539
+ sig { returns(String) }
1540
+ attr_accessor :price
1541
+
1542
+ # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1543
+ sig {
1544
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData)
1545
+ }
1546
+ attr_accessor :price_data
1547
+
1548
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
1549
+ sig { returns(Integer) }
1550
+ attr_accessor :quantity
1551
+
1552
+ # 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.
1553
+ sig { returns(T.nilable(T::Array[String])) }
1554
+ attr_accessor :tax_rates
1555
+
1556
+ # Options that configure the trial on the subscription item.
1557
+ sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Trial) }
1558
+ attr_accessor :trial
1559
+
1560
+ sig {
1561
+ params(billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Trial).void
1562
+ }
1563
+ def initialize(
1564
+ billing_thresholds: nil,
1565
+ discounts: nil,
1566
+ metadata: nil,
1567
+ plan: nil,
1568
+ price: nil,
1569
+ price_data: nil,
1570
+ quantity: nil,
1571
+ tax_rates: nil,
1572
+ trial: nil
1573
+ ); end
1574
+ end
1575
+ class PauseCollection < Stripe::RequestParams
1576
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1577
+ sig { returns(String) }
1578
+ attr_accessor :behavior
1579
+
1580
+ sig { params(behavior: String).void }
1581
+ def initialize(behavior: nil); end
1582
+ end
1583
+ class TransferData < Stripe::RequestParams
1584
+ # 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.
1585
+ sig { returns(Float) }
1586
+ attr_accessor :amount_percent
1587
+
1588
+ # ID of an existing, connected Stripe account.
1589
+ sig { returns(String) }
1590
+ attr_accessor :destination
1591
+
1592
+ sig { params(amount_percent: Float, destination: String).void }
1593
+ def initialize(amount_percent: nil, destination: nil); end
1594
+ end
1595
+ class TrialSettings < Stripe::RequestParams
1596
+ class EndBehavior < Stripe::RequestParams
1597
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1598
+ sig { returns(String) }
1599
+ attr_accessor :prorate_up_front
1600
+
1601
+ sig { params(prorate_up_front: String).void }
1602
+ def initialize(prorate_up_front: nil); end
1603
+ end
1604
+ # Defines how the subscription should behave when a trial ends.
1605
+ sig {
1606
+ returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings::EndBehavior)
1607
+ }
1608
+ attr_accessor :end_behavior
1609
+
1610
+ sig {
1611
+ params(end_behavior: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings::EndBehavior).void
1612
+ }
1613
+ def initialize(end_behavior: nil); end
1614
+ end
1615
+ # 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.
1616
+ sig {
1617
+ returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem])
1618
+ }
1619
+ attr_accessor :add_invoice_items
1620
+
1621
+ # 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).
1622
+ sig { returns(Float) }
1623
+ attr_accessor :application_fee_percent
1624
+
1625
+ # Automatic tax settings for this phase.
1626
+ sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax) }
1627
+ attr_accessor :automatic_tax
1628
+
1629
+ # 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).
1630
+ sig { returns(String) }
1631
+ attr_accessor :billing_cycle_anchor
1632
+
1633
+ # 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.
1634
+ sig {
1635
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::BillingThresholds))
1636
+ }
1637
+ attr_accessor :billing_thresholds
1638
+
1639
+ # 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.
1640
+ sig { returns(String) }
1641
+ attr_accessor :collection_method
1642
+
1643
+ # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
1644
+ sig { returns(String) }
1645
+ attr_accessor :coupon
1646
+
1647
+ # 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).
1648
+ sig { returns(String) }
1649
+ attr_accessor :currency
1650
+
1651
+ # 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.
1652
+ sig { returns(String) }
1653
+ attr_accessor :default_payment_method
1654
+
1655
+ # 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.
1656
+ sig { returns(T.nilable(T::Array[String])) }
1657
+ attr_accessor :default_tax_rates
1658
+
1659
+ # 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.
1660
+ sig { returns(T.nilable(String)) }
1661
+ attr_accessor :description
1662
+
1663
+ # 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.
1664
+ sig {
1665
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]))
1666
+ }
1667
+ attr_accessor :discounts
1668
+
1669
+ # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
1670
+ sig { returns(T.any(Integer, String)) }
1671
+ attr_accessor :end_date
1672
+
1673
+ # All invoices will be billed using the specified settings.
1674
+ sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings) }
1675
+ attr_accessor :invoice_settings
1676
+
1677
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
1678
+ sig { returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item]) }
1679
+ attr_accessor :items
1680
+
1681
+ # 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.
1682
+ sig { returns(Integer) }
1683
+ attr_accessor :iterations
1684
+
1685
+ # 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`.
1686
+ sig { returns(T::Hash[String, String]) }
1687
+ attr_accessor :metadata
1688
+
1689
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
1690
+ sig { returns(String) }
1691
+ attr_accessor :on_behalf_of
1692
+
1693
+ # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
1694
+ sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::PauseCollection) }
1695
+ attr_accessor :pause_collection
1696
+
1697
+ # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
1698
+ sig { returns(String) }
1699
+ attr_accessor :proration_behavior
1700
+
1701
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
1702
+ sig { returns(T.any(Integer, String)) }
1703
+ attr_accessor :start_date
1704
+
1705
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1706
+ sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TransferData) }
1707
+ attr_accessor :transfer_data
1708
+
1709
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1710
+ sig { returns(T::Boolean) }
1711
+ attr_accessor :trial
1712
+
1713
+ # Specify trial behavior when crossing phase boundaries
1714
+ sig { returns(String) }
1715
+ attr_accessor :trial_continuation
1716
+
1717
+ # 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`
1718
+ sig { returns(T.any(Integer, String)) }
1719
+ attr_accessor :trial_end
1720
+
1721
+ # Settings related to subscription trials.
1722
+ sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings) }
1723
+ attr_accessor :trial_settings
1724
+
1725
+ sig {
1726
+ params(add_invoice_items: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]), end_date: T.any(Integer, String), invoice_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings, items: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::PauseCollection, proration_behavior: String, start_date: T.any(Integer, String), transfer_data: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: T.any(Integer, String), trial_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings).void
1727
+ }
1728
+ def initialize(
1729
+ add_invoice_items: nil,
1730
+ application_fee_percent: nil,
1731
+ automatic_tax: nil,
1732
+ billing_cycle_anchor: nil,
1733
+ billing_thresholds: nil,
1734
+ collection_method: nil,
1735
+ coupon: nil,
1736
+ currency: nil,
1737
+ default_payment_method: nil,
1738
+ default_tax_rates: nil,
1739
+ description: nil,
1740
+ discounts: nil,
1741
+ end_date: nil,
1742
+ invoice_settings: nil,
1743
+ items: nil,
1744
+ iterations: nil,
1745
+ metadata: nil,
1746
+ on_behalf_of: nil,
1747
+ pause_collection: nil,
1748
+ proration_behavior: nil,
1749
+ start_date: nil,
1750
+ transfer_data: nil,
1751
+ trial: nil,
1752
+ trial_continuation: nil,
1753
+ trial_end: nil,
1754
+ trial_settings: nil
1755
+ ); end
1756
+ end
1757
+ class Prebilling < Stripe::RequestParams
1758
+ # This is used to determine the number of billing cycles to prebill.
1759
+ sig { returns(Integer) }
1760
+ attr_accessor :iterations
1761
+
1762
+ # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1763
+ sig { returns(String) }
1764
+ attr_accessor :update_behavior
1765
+
1766
+ sig { params(iterations: Integer, update_behavior: String).void }
1767
+ def initialize(iterations: nil, update_behavior: nil); end
1768
+ end
1769
+ # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
1770
+ sig { returns(String) }
1771
+ attr_accessor :billing_behavior
1772
+
1773
+ # Object representing the subscription schedule's default settings.
1774
+ sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings) }
1775
+ attr_accessor :default_settings
1776
+
1777
+ # 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.
1778
+ sig { returns(String) }
1779
+ attr_accessor :end_behavior
1780
+
1781
+ # Specifies which fields in the response should be expanded.
1782
+ sig { returns(T::Array[String]) }
1783
+ attr_accessor :expand
1784
+
1785
+ # 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`.
1786
+ sig { returns(T.nilable(T::Hash[String, String])) }
1787
+ attr_accessor :metadata
1788
+
1789
+ # 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.
1790
+ sig { returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase]) }
1791
+ attr_accessor :phases
1792
+
1793
+ # If specified, the invoicing for the given billing cycle iterations will be processed now.
1794
+ sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Prebilling) }
1795
+ attr_accessor :prebilling
1796
+
1797
+ # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`.
1798
+ sig { returns(String) }
1799
+ attr_accessor :proration_behavior
1800
+
1801
+ sig {
1802
+ params(billing_behavior: String, default_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings, end_behavior: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), phases: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase], prebilling: ::Stripe::SubscriptionScheduleService::UpdateParams::Prebilling, proration_behavior: String).void
1803
+ }
1804
+ def initialize(
1805
+ billing_behavior: nil,
1806
+ default_settings: nil,
1807
+ end_behavior: nil,
1808
+ expand: nil,
1809
+ metadata: nil,
1810
+ phases: nil,
1811
+ prebilling: nil,
1812
+ proration_behavior: nil
1813
+ ); end
1814
+ end
1815
+ class AmendParams < Stripe::RequestParams
1816
+ class Amendment < Stripe::RequestParams
1817
+ class AmendmentEnd < Stripe::RequestParams
1818
+ class DiscountEnd < Stripe::RequestParams
1819
+ # The ID of a specific discount.
1820
+ sig { returns(String) }
1821
+ attr_accessor :discount
1822
+
1823
+ sig { params(discount: String).void }
1824
+ def initialize(discount: nil); end
1825
+ end
1826
+ class Duration < Stripe::RequestParams
1827
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1828
+ sig { returns(String) }
1829
+ attr_accessor :interval
1830
+
1831
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1832
+ sig { returns(Integer) }
1833
+ attr_accessor :interval_count
1834
+
1835
+ sig { params(interval: String, interval_count: Integer).void }
1836
+ def initialize(interval: nil, interval_count: nil); end
1837
+ end
1838
+ # Use the `end` time of a given discount.
1839
+ sig {
1840
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::DiscountEnd)
1841
+ }
1842
+ attr_accessor :discount_end
1843
+
1844
+ # Time span for the amendment starting from the `amendment_start`.
1845
+ sig {
1846
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::Duration)
1847
+ }
1848
+ attr_accessor :duration
1849
+
1850
+ # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
1851
+ sig { returns(Integer) }
1852
+ attr_accessor :timestamp
1853
+
1854
+ # Select one of three ways to pass the `amendment_end`.
1855
+ sig { returns(String) }
1856
+ attr_accessor :type
1857
+
1858
+ sig {
1859
+ params(discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::DiscountEnd, duration: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::Duration, timestamp: Integer, type: String).void
1860
+ }
1861
+ def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end
1862
+ end
1863
+ class AmendmentStart < Stripe::RequestParams
1864
+ class AmendmentEnd < Stripe::RequestParams
1865
+ # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
1866
+ sig { returns(Integer) }
1867
+ attr_accessor :index
1868
+
1869
+ sig { params(index: Integer).void }
1870
+ def initialize(index: nil); end
1871
+ end
1872
+ class DiscountEnd < Stripe::RequestParams
1873
+ # The ID of a specific discount.
1874
+ sig { returns(String) }
1875
+ attr_accessor :discount
1876
+
1877
+ sig { params(discount: String).void }
1878
+ def initialize(discount: nil); end
1879
+ end
1880
+ # Details of another amendment in the same array, immediately after which this amendment should begin.
1881
+ sig {
1882
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::AmendmentEnd)
1883
+ }
1884
+ attr_accessor :amendment_end
1885
+
1886
+ # Use the `end` time of a given discount.
1887
+ sig {
1888
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::DiscountEnd)
1889
+ }
1890
+ attr_accessor :discount_end
1891
+
1892
+ # A precise Unix timestamp for the amendment to start.
1893
+ sig { returns(Integer) }
1894
+ attr_accessor :timestamp
1895
+
1896
+ # Select one of three ways to pass the `amendment_start`.
1897
+ sig { returns(String) }
1898
+ attr_accessor :type
1899
+
1900
+ sig {
1901
+ params(amendment_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::AmendmentEnd, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::DiscountEnd, timestamp: Integer, type: String).void
1902
+ }
1903
+ def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil); end
1904
+ end
1905
+ class DiscountAction < Stripe::RequestParams
1906
+ class Add < Stripe::RequestParams
1907
+ class DiscountEnd < Stripe::RequestParams
1908
+ # The type of calculation made to determine when the discount ends.
1909
+ sig { returns(String) }
1910
+ attr_accessor :type
1911
+
1912
+ sig { params(type: String).void }
1913
+ def initialize(type: nil); end
1914
+ end
1915
+ # The coupon code to redeem.
1916
+ sig { returns(String) }
1917
+ attr_accessor :coupon
1918
+
1919
+ # An ID of an existing discount for a coupon that was already redeemed.
1920
+ sig { returns(String) }
1921
+ attr_accessor :discount
1922
+
1923
+ # Details to determine how long the discount should be applied for.
1924
+ sig {
1925
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add::DiscountEnd)
1926
+ }
1927
+ attr_accessor :discount_end
1928
+
1929
+ # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
1930
+ sig { returns(Integer) }
1931
+ attr_accessor :index
1932
+
1933
+ # The promotion code to redeem.
1934
+ sig { returns(String) }
1935
+ attr_accessor :promotion_code
1936
+
1937
+ sig {
1938
+ params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add::DiscountEnd, index: Integer, promotion_code: String).void
1939
+ }
1940
+ def initialize(
1941
+ coupon: nil,
1942
+ discount: nil,
1943
+ discount_end: nil,
1944
+ index: nil,
1945
+ promotion_code: nil
1946
+ ); end
1947
+ end
1948
+ class Remove < Stripe::RequestParams
1949
+ # The coupon code to remove from the `discounts` array.
1950
+ sig { returns(String) }
1951
+ attr_accessor :coupon
1952
+
1953
+ # The ID of a discount to remove from the `discounts` array.
1954
+ sig { returns(String) }
1955
+ attr_accessor :discount
1956
+
1957
+ # The ID of a promotion code to remove from the `discounts` array.
1958
+ sig { returns(String) }
1959
+ attr_accessor :promotion_code
1960
+
1961
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
1962
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1963
+ end
1964
+ class Set < Stripe::RequestParams
1965
+ # The coupon code to replace the `discounts` array with.
1966
+ sig { returns(String) }
1967
+ attr_accessor :coupon
1968
+
1969
+ # An ID of an existing discount to replace the `discounts` array with.
1970
+ sig { returns(String) }
1971
+ attr_accessor :discount
1972
+
1973
+ # An ID of an existing promotion code to replace the `discounts` array with.
1974
+ sig { returns(String) }
1975
+ attr_accessor :promotion_code
1976
+
1977
+ sig { params(coupon: String, discount: String, promotion_code: String).void }
1978
+ def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1979
+ end
1980
+ # Details of the discount to add.
1981
+ sig {
1982
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add)
1983
+ }
1984
+ attr_accessor :add
1985
+
1986
+ # Details of the discount to remove.
1987
+ sig {
1988
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Remove)
1989
+ }
1990
+ attr_accessor :remove
1991
+
1992
+ # Details of the discount to replace the existing discounts with.
1993
+ sig {
1994
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Set)
1995
+ }
1996
+ attr_accessor :set
1997
+
1998
+ # Determines the type of discount action.
1999
+ sig { returns(String) }
2000
+ attr_accessor :type
2001
+
2002
+ sig {
2003
+ params(add: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add, remove: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Remove, set: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Set, type: String).void
2004
+ }
2005
+ def initialize(add: nil, remove: nil, set: nil, type: nil); end
2006
+ end
2007
+ class ItemAction < Stripe::RequestParams
2008
+ class Add < Stripe::RequestParams
2009
+ class Discount < Stripe::RequestParams
2010
+ class DiscountEnd < Stripe::RequestParams
2011
+ class Duration < Stripe::RequestParams
2012
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2013
+ sig { returns(String) }
2014
+ attr_accessor :interval
2015
+
2016
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2017
+ sig { returns(Integer) }
2018
+ attr_accessor :interval_count
2019
+
2020
+ sig { params(interval: String, interval_count: Integer).void }
2021
+ def initialize(interval: nil, interval_count: nil); end
2022
+ end
2023
+ # Time span for the redeemed discount.
2024
+ sig {
2025
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration)
2026
+ }
2027
+ attr_accessor :duration
2028
+
2029
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2030
+ sig { returns(Integer) }
2031
+ attr_accessor :timestamp
2032
+
2033
+ # The type of calculation made to determine when the discount ends.
2034
+ sig { returns(String) }
2035
+ attr_accessor :type
2036
+
2037
+ sig {
2038
+ params(duration: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
2039
+ }
2040
+ def initialize(duration: nil, timestamp: nil, type: nil); end
2041
+ end
2042
+ # ID of the coupon to create a new discount for.
2043
+ sig { returns(String) }
2044
+ attr_accessor :coupon
2045
+
2046
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
2047
+ sig { returns(String) }
2048
+ attr_accessor :discount
2049
+
2050
+ # Details to determine how long the discount should be applied for.
2051
+ sig {
2052
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd)
2053
+ }
2054
+ attr_accessor :discount_end
2055
+
2056
+ # ID of the promotion code to create a new discount for.
2057
+ sig { returns(String) }
2058
+ attr_accessor :promotion_code
2059
+
2060
+ sig {
2061
+ params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd, promotion_code: String).void
2062
+ }
2063
+ def initialize(
2064
+ coupon: nil,
2065
+ discount: nil,
2066
+ discount_end: nil,
2067
+ promotion_code: nil
2068
+ ); end
2069
+ end
2070
+ class Trial < Stripe::RequestParams
2071
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
2072
+ sig { returns(T::Array[String]) }
2073
+ attr_accessor :converts_to
2074
+
2075
+ # Determines the type of trial for this item.
2076
+ sig { returns(String) }
2077
+ attr_accessor :type
2078
+
2079
+ sig { params(converts_to: T::Array[String], type: String).void }
2080
+ def initialize(converts_to: nil, type: nil); end
2081
+ end
2082
+ # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
2083
+ sig {
2084
+ returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount])
2085
+ }
2086
+ attr_accessor :discounts
2087
+
2088
+ # 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`.
2089
+ sig { returns(T::Hash[String, String]) }
2090
+ attr_accessor :metadata
2091
+
2092
+ # The ID of the price object.
2093
+ sig { returns(String) }
2094
+ attr_accessor :price
2095
+
2096
+ # Quantity for this item.
2097
+ sig { returns(Integer) }
2098
+ attr_accessor :quantity
2099
+
2100
+ # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
2101
+ sig { returns(T::Array[String]) }
2102
+ attr_accessor :tax_rates
2103
+
2104
+ # Options that configure the trial on the subscription item.
2105
+ sig {
2106
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Trial)
2107
+ }
2108
+ attr_accessor :trial
2109
+
2110
+ sig {
2111
+ params(discounts: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Trial).void
2112
+ }
2113
+ def initialize(
2114
+ discounts: nil,
2115
+ metadata: nil,
2116
+ price: nil,
2117
+ quantity: nil,
2118
+ tax_rates: nil,
2119
+ trial: nil
2120
+ ); end
2121
+ end
2122
+ class Remove < Stripe::RequestParams
2123
+ # ID of a price to remove.
2124
+ sig { returns(String) }
2125
+ attr_accessor :price
2126
+
2127
+ sig { params(price: String).void }
2128
+ def initialize(price: nil); end
2129
+ end
2130
+ class Set < Stripe::RequestParams
2131
+ class Discount < Stripe::RequestParams
2132
+ class DiscountEnd < Stripe::RequestParams
2133
+ class Duration < Stripe::RequestParams
2134
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2135
+ sig { returns(String) }
2136
+ attr_accessor :interval
2137
+
2138
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2139
+ sig { returns(Integer) }
2140
+ attr_accessor :interval_count
2141
+
2142
+ sig { params(interval: String, interval_count: Integer).void }
2143
+ def initialize(interval: nil, interval_count: nil); end
2144
+ end
2145
+ # Time span for the redeemed discount.
2146
+ sig {
2147
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration)
2148
+ }
2149
+ attr_accessor :duration
2150
+
2151
+ # A precise Unix timestamp for the discount to end. Must be in the future.
2152
+ sig { returns(Integer) }
2153
+ attr_accessor :timestamp
2154
+
2155
+ # The type of calculation made to determine when the discount ends.
2156
+ sig { returns(String) }
2157
+ attr_accessor :type
2158
+
2159
+ sig {
2160
+ params(duration: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
2161
+ }
2162
+ def initialize(duration: nil, timestamp: nil, type: nil); end
2163
+ end
2164
+ # ID of the coupon to create a new discount for.
2165
+ sig { returns(String) }
2166
+ attr_accessor :coupon
2167
+
2168
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
2169
+ sig { returns(String) }
2170
+ attr_accessor :discount
2171
+
2172
+ # Details to determine how long the discount should be applied for.
2173
+ sig {
2174
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd)
2175
+ }
2176
+ attr_accessor :discount_end
2177
+
2178
+ # ID of the promotion code to create a new discount for.
2179
+ sig { returns(String) }
2180
+ attr_accessor :promotion_code
2181
+
2182
+ sig {
2183
+ params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd, promotion_code: String).void
2184
+ }
2185
+ def initialize(
2186
+ coupon: nil,
2187
+ discount: nil,
2188
+ discount_end: nil,
2189
+ promotion_code: nil
2190
+ ); end
2191
+ end
2192
+ class Trial < Stripe::RequestParams
2193
+ # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
2194
+ sig { returns(T::Array[String]) }
2195
+ attr_accessor :converts_to
2196
+
2197
+ # Determines the type of trial for this item.
2198
+ sig { returns(String) }
2199
+ attr_accessor :type
2200
+
2201
+ sig { params(converts_to: T::Array[String], type: String).void }
2202
+ def initialize(converts_to: nil, type: nil); end
2203
+ end
2204
+ # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
2205
+ sig {
2206
+ returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount])
2207
+ }
2208
+ attr_accessor :discounts
2209
+
2210
+ # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
2211
+ sig { returns(T::Hash[String, String]) }
2212
+ attr_accessor :metadata
2213
+
2214
+ # The ID of the price object.
2215
+ sig { returns(String) }
2216
+ attr_accessor :price
2217
+
2218
+ # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
2219
+ sig { returns(Integer) }
2220
+ attr_accessor :quantity
2221
+
2222
+ # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
2223
+ sig { returns(T::Array[String]) }
2224
+ attr_accessor :tax_rates
2225
+
2226
+ # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
2227
+ sig {
2228
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Trial)
2229
+ }
2230
+ attr_accessor :trial
2231
+
2232
+ sig {
2233
+ params(discounts: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Trial).void
2234
+ }
2235
+ def initialize(
2236
+ discounts: nil,
2237
+ metadata: nil,
2238
+ price: nil,
2239
+ quantity: nil,
2240
+ tax_rates: nil,
2241
+ trial: nil
2242
+ ); end
2243
+ end
2244
+ # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
2245
+ sig {
2246
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add)
2247
+ }
2248
+ attr_accessor :add
2249
+
2250
+ # Details of the subscription item to remove.
2251
+ sig {
2252
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Remove)
2253
+ }
2254
+ attr_accessor :remove
2255
+
2256
+ # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
2257
+ sig {
2258
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set)
2259
+ }
2260
+ attr_accessor :set
2261
+
2262
+ # Determines the type of item action.
2263
+ sig { returns(String) }
2264
+ attr_accessor :type
2265
+
2266
+ sig {
2267
+ params(add: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add, remove: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Remove, set: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set, type: String).void
2268
+ }
2269
+ def initialize(add: nil, remove: nil, set: nil, type: nil); end
2270
+ end
2271
+ class MetadataAction < Stripe::RequestParams
2272
+ # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
2273
+ sig { returns(T::Hash[String, String]) }
2274
+ attr_accessor :add
2275
+
2276
+ # Keys to remove from schedule phase metadata.
2277
+ sig { returns(T::Array[String]) }
2278
+ attr_accessor :remove
2279
+
2280
+ # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
2281
+ sig { returns(T.nilable(T::Hash[String, String])) }
2282
+ attr_accessor :set
2283
+
2284
+ # Select one of three ways to update phase-level `metadata` on subscription schedules.
2285
+ sig { returns(String) }
2286
+ attr_accessor :type
2287
+
2288
+ sig {
2289
+ params(add: T::Hash[String, String], remove: T::Array[String], set: T.nilable(T::Hash[String, String]), type: String).void
2290
+ }
2291
+ def initialize(add: nil, remove: nil, set: nil, type: nil); end
2292
+ end
2293
+ class SetPauseCollection < Stripe::RequestParams
2294
+ class Set < Stripe::RequestParams
2295
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2296
+ sig { returns(String) }
2297
+ attr_accessor :behavior
2298
+
2299
+ sig { params(behavior: String).void }
2300
+ def initialize(behavior: nil); end
2301
+ end
2302
+ # Details of the pause_collection behavior to apply to the amendment.
2303
+ sig {
2304
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection::Set)
2305
+ }
2306
+ attr_accessor :set
2307
+
2308
+ # Determines the type of the pause_collection amendment.
2309
+ sig { returns(String) }
2310
+ attr_accessor :type
2311
+
2312
+ sig {
2313
+ params(set: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection::Set, type: String).void
2314
+ }
2315
+ def initialize(set: nil, type: nil); end
2316
+ end
2317
+ class TrialSettings < Stripe::RequestParams
2318
+ class EndBehavior < Stripe::RequestParams
2319
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2320
+ sig { returns(String) }
2321
+ attr_accessor :prorate_up_front
2322
+
2323
+ sig { params(prorate_up_front: String).void }
2324
+ def initialize(prorate_up_front: nil); end
2325
+ end
2326
+ # Defines how the subscription should behave when a trial ends.
2327
+ sig {
2328
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings::EndBehavior)
2329
+ }
2330
+ attr_accessor :end_behavior
2331
+
2332
+ sig {
2333
+ params(end_behavior: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings::EndBehavior).void
2334
+ }
2335
+ def initialize(end_behavior: nil); end
2336
+ end
2337
+ # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
2338
+ sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd) }
2339
+ attr_accessor :amendment_end
2340
+
2341
+ # Details to identify the earliest timestamp where the proposed change should take effect.
2342
+ sig {
2343
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart)
2344
+ }
2345
+ attr_accessor :amendment_start
2346
+
2347
+ # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
2348
+ sig { returns(String) }
2349
+ attr_accessor :billing_cycle_anchor
2350
+
2351
+ # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2352
+ sig {
2353
+ returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction])
2354
+ }
2355
+ attr_accessor :discount_actions
2356
+
2357
+ # Changes to the subscription items during the amendment time span.
2358
+ sig {
2359
+ returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction])
2360
+ }
2361
+ attr_accessor :item_actions
2362
+
2363
+ # Instructions for how to modify phase metadata
2364
+ sig {
2365
+ returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::MetadataAction])
2366
+ }
2367
+ attr_accessor :metadata_actions
2368
+
2369
+ # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
2370
+ sig { returns(String) }
2371
+ attr_accessor :proration_behavior
2372
+
2373
+ # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2374
+ sig {
2375
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection)
2376
+ }
2377
+ attr_accessor :set_pause_collection
2378
+
2379
+ # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2380
+ sig { returns(String) }
2381
+ attr_accessor :set_schedule_end
2382
+
2383
+ # Settings related to subscription trials.
2384
+ sig {
2385
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings)
2386
+ }
2387
+ attr_accessor :trial_settings
2388
+
2389
+ sig {
2390
+ params(amendment_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd, amendment_start: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart, billing_cycle_anchor: String, discount_actions: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction], item_actions: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction], metadata_actions: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::MetadataAction], proration_behavior: String, set_pause_collection: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection, set_schedule_end: String, trial_settings: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings).void
2391
+ }
2392
+ def initialize(
2393
+ amendment_end: nil,
2394
+ amendment_start: nil,
2395
+ billing_cycle_anchor: nil,
2396
+ discount_actions: nil,
2397
+ item_actions: nil,
2398
+ metadata_actions: nil,
2399
+ proration_behavior: nil,
2400
+ set_pause_collection: nil,
2401
+ set_schedule_end: nil,
2402
+ trial_settings: nil
2403
+ ); end
2404
+ end
2405
+ class Prebilling < Stripe::RequestParams
2406
+ class BillFrom < Stripe::RequestParams
2407
+ class AmendmentStart < Stripe::RequestParams
2408
+ # The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments.
2409
+ sig { returns(Integer) }
2410
+ attr_accessor :index
2411
+
2412
+ sig { params(index: Integer).void }
2413
+ def initialize(index: nil); end
2414
+ end
2415
+ # Start the prebilled period when a specified amendment begins.
2416
+ sig {
2417
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom::AmendmentStart)
2418
+ }
2419
+ attr_accessor :amendment_start
2420
+
2421
+ # Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2422
+ sig { returns(Integer) }
2423
+ attr_accessor :timestamp
2424
+
2425
+ # Select one of several ways to pass the `bill_from` value.
2426
+ sig { returns(String) }
2427
+ attr_accessor :type
2428
+
2429
+ sig {
2430
+ params(amendment_start: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom::AmendmentStart, timestamp: Integer, type: String).void
2431
+ }
2432
+ def initialize(amendment_start: nil, timestamp: nil, type: nil); end
2433
+ end
2434
+ class BillUntil < Stripe::RequestParams
2435
+ class AmendmentEnd < Stripe::RequestParams
2436
+ # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
2437
+ sig { returns(Integer) }
2438
+ attr_accessor :index
2439
+
2440
+ sig { params(index: Integer).void }
2441
+ def initialize(index: nil); end
2442
+ end
2443
+ class Duration < Stripe::RequestParams
2444
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2445
+ sig { returns(String) }
2446
+ attr_accessor :interval
2447
+
2448
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2449
+ sig { returns(Integer) }
2450
+ attr_accessor :interval_count
2451
+
2452
+ sig { params(interval: String, interval_count: Integer).void }
2453
+ def initialize(interval: nil, interval_count: nil); end
2454
+ end
2455
+ # End the prebilled period when a specified amendment ends.
2456
+ sig {
2457
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::AmendmentEnd)
2458
+ }
2459
+ attr_accessor :amendment_end
2460
+
2461
+ # Time span for prebilling, starting from `bill_from`.
2462
+ sig {
2463
+ returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::Duration)
2464
+ }
2465
+ attr_accessor :duration
2466
+
2467
+ # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2468
+ sig { returns(Integer) }
2469
+ attr_accessor :timestamp
2470
+
2471
+ # Select one of several ways to pass the `bill_until` value.
2472
+ sig { returns(String) }
2473
+ attr_accessor :type
2474
+
2475
+ sig {
2476
+ params(amendment_end: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::AmendmentEnd, duration: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::Duration, timestamp: Integer, type: String).void
2477
+ }
2478
+ def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil); end
2479
+ end
2480
+ # The beginning of the prebilled time period. The default value is `now`.
2481
+ sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom) }
2482
+ attr_accessor :bill_from
2483
+
2484
+ # The end of the prebilled time period.
2485
+ sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil) }
2486
+ attr_accessor :bill_until
2487
+
2488
+ # When the prebilling invoice should be created. The default value is `now`.
2489
+ sig { returns(String) }
2490
+ attr_accessor :invoice_at
2491
+
2492
+ # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2493
+ sig { returns(String) }
2494
+ attr_accessor :update_behavior
2495
+
2496
+ sig {
2497
+ params(bill_from: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom, bill_until: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil, invoice_at: String, update_behavior: String).void
2498
+ }
2499
+ def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil); end
2500
+ end
2501
+ class ScheduleSettings < Stripe::RequestParams
2502
+ # Behavior of the subscription schedule and underlying subscription when it ends.
2503
+ sig { returns(String) }
2504
+ attr_accessor :end_behavior
2505
+
2506
+ sig { params(end_behavior: String).void }
2507
+ def initialize(end_behavior: nil); end
2508
+ end
2509
+ # Changes to apply to the phases of the subscription schedule, in the order provided.
2510
+ sig { returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment]) }
2511
+ attr_accessor :amendments
2512
+
2513
+ # Specifies which fields in the response should be expanded.
2514
+ sig { returns(T::Array[String]) }
2515
+ attr_accessor :expand
2516
+
2517
+ # Provide any time periods to bill in advance.
2518
+ sig {
2519
+ returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Prebilling]))
2520
+ }
2521
+ attr_accessor :prebilling
2522
+
2523
+ # In cases where the amendment changes the currently active phase,
2524
+ # specifies if and how to prorate at the time of the request.
2525
+ sig { returns(String) }
2526
+ attr_accessor :proration_behavior
2527
+
2528
+ # Changes to apply to the subscription schedule.
2529
+ sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::ScheduleSettings) }
2530
+ attr_accessor :schedule_settings
2531
+
2532
+ sig {
2533
+ params(amendments: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment], expand: T::Array[String], prebilling: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Prebilling]), proration_behavior: String, schedule_settings: ::Stripe::SubscriptionScheduleService::AmendParams::ScheduleSettings).void
2534
+ }
2535
+ def initialize(
2536
+ amendments: nil,
2537
+ expand: nil,
2538
+ prebilling: nil,
2539
+ proration_behavior: nil,
2540
+ schedule_settings: nil
2541
+ ); end
2542
+ end
2543
+ class CancelParams < Stripe::RequestParams
2544
+ # Specifies which fields in the response should be expanded.
2545
+ sig { returns(T::Array[String]) }
2546
+ attr_accessor :expand
2547
+
2548
+ # 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`.
2549
+ sig { returns(T::Boolean) }
2550
+ attr_accessor :invoice_now
2551
+
2552
+ # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
2553
+ sig { returns(T::Boolean) }
2554
+ attr_accessor :prorate
2555
+
2556
+ sig { params(expand: T::Array[String], invoice_now: T::Boolean, prorate: T::Boolean).void }
2557
+ def initialize(expand: nil, invoice_now: nil, prorate: nil); end
2558
+ end
2559
+ class ReleaseParams < Stripe::RequestParams
2560
+ # Specifies which fields in the response should be expanded.
2561
+ sig { returns(T::Array[String]) }
2562
+ attr_accessor :expand
2563
+
2564
+ # Keep any cancellation on the subscription that the schedule has set
2565
+ sig { returns(T::Boolean) }
2566
+ attr_accessor :preserve_cancel_date
2567
+
2568
+ sig { params(expand: T::Array[String], preserve_cancel_date: T::Boolean).void }
2569
+ def initialize(expand: nil, preserve_cancel_date: nil); end
2570
+ end
2571
+ # Amends an existing subscription schedule.
2572
+ sig {
2573
+ params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::AmendParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
2574
+ }
2575
+ def amend(schedule, params = {}, opts = {}); end
2576
+
2577
+ # 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.
2578
+ sig {
2579
+ params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
2580
+ }
2581
+ def cancel(schedule, params = {}, opts = {}); end
2582
+
2583
+ # Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
2584
+ sig {
2585
+ params(params: T.any(::Stripe::SubscriptionScheduleService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
2586
+ }
2587
+ def create(params = {}, opts = {}); end
2588
+
2589
+ # Retrieves the list of your subscription schedules.
2590
+ sig {
2591
+ params(params: T.any(::Stripe::SubscriptionScheduleService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
2592
+ }
2593
+ def list(params = {}, opts = {}); end
2594
+
2595
+ # 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.
2596
+ sig {
2597
+ params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::ReleaseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
2598
+ }
2599
+ def release(schedule, params = {}, opts = {}); end
2600
+
2601
+ # Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.
2602
+ sig {
2603
+ params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
2604
+ }
2605
+ def retrieve(schedule, params = {}, opts = {}); end
2606
+
2607
+ # Updates an existing subscription schedule.
2608
+ sig {
2609
+ params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule)
2610
+ }
2611
+ def update(schedule, params = {}, opts = {}); end
2612
+ end
2613
+ end