stripe 15.5.0 → 15.6.0.pre.alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (803) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +1723 -642
  4. data/OPENAPI_VERSION +1 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_requestor.rb +34 -0
  7. data/lib/stripe/api_version.rb +1 -2
  8. data/lib/stripe/errors.rb +63 -0
  9. data/lib/stripe/event_types.rb +185 -0
  10. data/lib/stripe/events/v2_billing_cadence_billed_event.rb +21 -0
  11. data/lib/stripe/events/v2_billing_cadence_canceled_event.rb +21 -0
  12. data/lib/stripe/events/v2_billing_cadence_created_event.rb +23 -0
  13. data/lib/stripe/events/v2_billing_cadence_errored_event.rb +21 -0
  14. data/lib/stripe/events/v2_billing_license_fee_created_event.rb +21 -0
  15. data/lib/stripe/events/v2_billing_license_fee_updated_event.rb +21 -0
  16. data/lib/stripe/events/v2_billing_license_fee_version_created_event.rb +23 -0
  17. data/lib/stripe/events/v2_billing_licensed_item_created_event.rb +21 -0
  18. data/lib/stripe/events/v2_billing_licensed_item_updated_event.rb +21 -0
  19. data/lib/stripe/events/v2_billing_metered_item_created_event.rb +21 -0
  20. data/lib/stripe/events/v2_billing_metered_item_updated_event.rb +21 -0
  21. data/lib/stripe/events/v2_billing_pricing_plan_component_created_event.rb +23 -0
  22. data/lib/stripe/events/v2_billing_pricing_plan_component_updated_event.rb +23 -0
  23. data/lib/stripe/events/v2_billing_pricing_plan_created_event.rb +21 -0
  24. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.rb +21 -0
  25. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_current_event.rb +21 -0
  26. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_past_due_event.rb +21 -0
  27. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_paused_event.rb +21 -0
  28. data/lib/stripe/events/v2_billing_pricing_plan_subscription_collection_unpaid_event.rb +21 -0
  29. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_activated_event.rb +21 -0
  30. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_canceled_event.rb +21 -0
  31. data/lib/stripe/events/v2_billing_pricing_plan_subscription_servicing_paused_event.rb +21 -0
  32. data/lib/stripe/events/v2_billing_pricing_plan_updated_event.rb +21 -0
  33. data/lib/stripe/events/v2_billing_pricing_plan_version_created_event.rb +23 -0
  34. data/lib/stripe/events/v2_billing_rate_card_created_event.rb +23 -0
  35. data/lib/stripe/events/v2_billing_rate_card_rate_created_event.rb +23 -0
  36. data/lib/stripe/events/v2_billing_rate_card_subscription_activated_event.rb +21 -0
  37. data/lib/stripe/events/v2_billing_rate_card_subscription_canceled_event.rb +21 -0
  38. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.rb +21 -0
  39. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_current_event.rb +21 -0
  40. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_past_due_event.rb +21 -0
  41. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_paused_event.rb +21 -0
  42. data/lib/stripe/events/v2_billing_rate_card_subscription_collection_unpaid_event.rb +21 -0
  43. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_activated_event.rb +21 -0
  44. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_canceled_event.rb +21 -0
  45. data/lib/stripe/events/v2_billing_rate_card_subscription_servicing_paused_event.rb +21 -0
  46. data/lib/stripe/events/v2_billing_rate_card_updated_event.rb +21 -0
  47. data/lib/stripe/events/v2_billing_rate_card_version_created_event.rb +23 -0
  48. data/lib/stripe/events/v2_core_account_closed_event.rb +21 -0
  49. data/lib/stripe/events/v2_core_account_created_event.rb +21 -0
  50. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +23 -0
  51. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +21 -0
  52. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +23 -0
  53. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +21 -0
  54. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +23 -0
  55. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +21 -0
  56. data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +23 -0
  57. data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +21 -0
  58. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +21 -0
  59. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +21 -0
  60. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +21 -0
  61. data/lib/stripe/events/v2_core_account_link_returned_event.rb +13 -0
  62. data/lib/stripe/events/v2_core_account_person_created_event.rb +23 -0
  63. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +23 -0
  64. data/lib/stripe/events/v2_core_account_person_updated_event.rb +23 -0
  65. data/lib/stripe/events/v2_core_account_updated_event.rb +21 -0
  66. data/lib/stripe/events/v2_core_health_api_error_firing_event.rb +13 -0
  67. data/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +13 -0
  68. data/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +13 -0
  69. data/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +13 -0
  70. data/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb +13 -0
  71. data/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb +13 -0
  72. data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +13 -0
  73. data/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +13 -0
  74. data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +13 -0
  75. data/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +13 -0
  76. data/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +13 -0
  77. data/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +13 -0
  78. data/lib/stripe/events/v2_core_health_traffic_volume_drop_firing_event.rb +13 -0
  79. data/lib/stripe/events/v2_core_health_traffic_volume_drop_resolved_event.rb +13 -0
  80. data/lib/stripe/events/v2_core_health_webhook_latency_firing_event.rb +13 -0
  81. data/lib/stripe/events/v2_core_health_webhook_latency_resolved_event.rb +13 -0
  82. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +21 -0
  83. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +21 -0
  84. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +21 -0
  85. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +21 -0
  86. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +21 -0
  87. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +23 -0
  88. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +21 -0
  89. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +21 -0
  90. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +21 -0
  91. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +21 -0
  92. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +21 -0
  93. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +21 -0
  94. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +21 -0
  95. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +21 -0
  96. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +21 -0
  97. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +21 -0
  98. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +21 -0
  99. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +21 -0
  100. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +21 -0
  101. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +21 -0
  102. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +21 -0
  103. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +21 -0
  104. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +21 -0
  105. data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +21 -0
  106. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +23 -0
  107. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +21 -0
  108. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +21 -0
  109. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +21 -0
  110. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +21 -0
  111. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +21 -0
  112. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +21 -0
  113. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +21 -0
  114. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +21 -0
  115. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +21 -0
  116. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +21 -0
  117. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
  118. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +22 -0
  119. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
  120. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
  121. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
  122. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
  123. data/lib/stripe/events/v2_reporting_report_run_created_event.rb +21 -0
  124. data/lib/stripe/events/v2_reporting_report_run_failed_event.rb +21 -0
  125. data/lib/stripe/events/v2_reporting_report_run_succeeded_event.rb +21 -0
  126. data/lib/stripe/events/v2_reporting_report_run_updated_event.rb +21 -0
  127. data/lib/stripe/object_types.rb +80 -0
  128. data/lib/stripe/resources/account.rb +1137 -42
  129. data/lib/stripe/resources/account_link.rb +8 -0
  130. data/lib/stripe/resources/account_notice.rb +147 -0
  131. data/lib/stripe/resources/account_session.rb +688 -8
  132. data/lib/stripe/resources/apple_pay_domain.rb +8 -0
  133. data/lib/stripe/resources/application.rb +8 -0
  134. data/lib/stripe/resources/application_fee.rb +16 -0
  135. data/lib/stripe/resources/application_fee_refund.rb +8 -0
  136. data/lib/stripe/resources/apps/secret.rb +16 -0
  137. data/lib/stripe/resources/balance.rb +159 -0
  138. data/lib/stripe/resources/balance_settings.rb +152 -0
  139. data/lib/stripe/resources/balance_transaction.rb +16 -0
  140. data/lib/stripe/resources/bank_account.rb +40 -0
  141. data/lib/stripe/resources/billing/alert.rb +203 -1
  142. data/lib/stripe/resources/billing/alert_triggered.rb +14 -0
  143. data/lib/stripe/resources/billing/credit_balance_summary.rb +132 -0
  144. data/lib/stripe/resources/billing/credit_balance_transaction.rb +161 -0
  145. data/lib/stripe/resources/billing/credit_grant.rb +143 -2
  146. data/lib/stripe/resources/billing/meter.rb +45 -0
  147. data/lib/stripe/resources/billing/meter_event.rb +8 -0
  148. data/lib/stripe/resources/billing/meter_event_adjustment.rb +16 -0
  149. data/lib/stripe/resources/billing/meter_event_summary.rb +8 -0
  150. data/lib/stripe/resources/billing/meter_usage.rb +31 -0
  151. data/lib/stripe/resources/billing/meter_usage_row.rb +36 -0
  152. data/lib/stripe/resources/billing_portal/configuration.rb +122 -0
  153. data/lib/stripe/resources/billing_portal/session.rb +107 -0
  154. data/lib/stripe/resources/capability.rb +56 -0
  155. data/lib/stripe/resources/capital/financing_offer.rb +203 -0
  156. data/lib/stripe/resources/capital/financing_summary.rb +79 -0
  157. data/lib/stripe/resources/capital/financing_transaction.rb +138 -0
  158. data/lib/stripe/resources/card.rb +18 -0
  159. data/lib/stripe/resources/cash_balance.rb +18 -0
  160. data/lib/stripe/resources/charge.rb +2587 -15
  161. data/lib/stripe/resources/checkout/session.rb +1583 -15
  162. data/lib/stripe/resources/climate/order.rb +32 -0
  163. data/lib/stripe/resources/climate/product.rb +16 -0
  164. data/lib/stripe/resources/climate/supplier.rb +16 -0
  165. data/lib/stripe/resources/confirmation_token.rb +1126 -34
  166. data/lib/stripe/resources/connect_collection_transfer.rb +8 -0
  167. data/lib/stripe/resources/country_spec.rb +32 -0
  168. data/lib/stripe/resources/coupon.rb +66 -1
  169. data/lib/stripe/resources/credit_note.rb +76 -0
  170. data/lib/stripe/resources/credit_note_line_item.rb +62 -0
  171. data/lib/stripe/resources/customer.rb +79 -0
  172. data/lib/stripe/resources/customer_balance_transaction.rb +10 -0
  173. data/lib/stripe/resources/customer_cash_balance_transaction.rb +110 -0
  174. data/lib/stripe/resources/customer_session.rb +58 -1
  175. data/lib/stripe/resources/discount.rb +10 -0
  176. data/lib/stripe/resources/dispute.rb +177 -0
  177. data/lib/stripe/resources/entitlements/active_entitlement.rb +8 -0
  178. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +8 -0
  179. data/lib/stripe/resources/entitlements/feature.rb +8 -0
  180. data/lib/stripe/resources/ephemeral_key.rb +8 -0
  181. data/lib/stripe/resources/event.rb +87 -0
  182. data/lib/stripe/resources/exchange_rate.rb +8 -0
  183. data/lib/stripe/resources/file.rb +8 -0
  184. data/lib/stripe/resources/file_link.rb +8 -0
  185. data/lib/stripe/resources/financial_connections/account.rb +101 -1
  186. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +35 -0
  187. data/lib/stripe/resources/financial_connections/account_owner.rb +8 -0
  188. data/lib/stripe/resources/financial_connections/account_ownership.rb +8 -0
  189. data/lib/stripe/resources/financial_connections/institution.rb +145 -0
  190. data/lib/stripe/resources/financial_connections/session.rb +124 -2
  191. data/lib/stripe/resources/financial_connections/transaction.rb +16 -0
  192. data/lib/stripe/resources/forwarding/request.rb +52 -0
  193. data/lib/stripe/resources/funding_instructions.rb +193 -0
  194. data/lib/stripe/resources/fx_quote.rb +234 -0
  195. data/lib/stripe/resources/identity/verification_report.rb +166 -1
  196. data/lib/stripe/resources/identity/verification_session.rb +136 -1
  197. data/lib/stripe/resources/invoice.rb +1591 -18
  198. data/lib/stripe/resources/invoice_item.rb +214 -2
  199. data/lib/stripe/resources/invoice_line_item.rb +293 -1
  200. data/lib/stripe/resources/invoice_payment.rb +30 -1
  201. data/lib/stripe/resources/invoice_rendering_template.rb +8 -0
  202. data/lib/stripe/resources/issuing/authorization.rb +177 -0
  203. data/lib/stripe/resources/issuing/card.rb +96 -8
  204. data/lib/stripe/resources/issuing/cardholder.rb +112 -1
  205. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +684 -0
  206. data/lib/stripe/resources/issuing/dispute.rb +97 -0
  207. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +98 -0
  208. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +94 -0
  209. data/lib/stripe/resources/issuing/personalization_design.rb +36 -0
  210. data/lib/stripe/resources/issuing/physical_bundle.rb +16 -0
  211. data/lib/stripe/resources/issuing/settlement.rb +61 -0
  212. data/lib/stripe/resources/issuing/token.rb +61 -0
  213. data/lib/stripe/resources/issuing/transaction.rb +157 -0
  214. data/lib/stripe/resources/line_item.rb +91 -0
  215. data/lib/stripe/resources/login_link.rb +8 -0
  216. data/lib/stripe/resources/mandate.rb +331 -12
  217. data/lib/stripe/resources/margin.rb +123 -0
  218. data/lib/stripe/resources/order.rb +3306 -0
  219. data/lib/stripe/resources/payment_attempt_record.rb +2056 -0
  220. data/lib/stripe/resources/payment_intent.rb +11019 -3714
  221. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +128 -0
  222. data/lib/stripe/resources/payment_link.rb +337 -0
  223. data/lib/stripe/resources/payment_method.rb +1074 -35
  224. data/lib/stripe/resources/payment_method_configuration.rb +1260 -4
  225. data/lib/stripe/resources/payment_method_domain.rb +111 -0
  226. data/lib/stripe/resources/payment_record.rb +2602 -0
  227. data/lib/stripe/resources/payout.rb +16 -0
  228. data/lib/stripe/resources/person.rb +180 -0
  229. data/lib/stripe/resources/plan.rb +24 -0
  230. data/lib/stripe/resources/price.rb +109 -0
  231. data/lib/stripe/resources/privacy/redaction_job.rb +314 -0
  232. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +49 -0
  233. data/lib/stripe/resources/product.rb +27 -0
  234. data/lib/stripe/resources/product_feature.rb +8 -0
  235. data/lib/stripe/resources/promotion_code.rb +34 -0
  236. data/lib/stripe/resources/quote.rb +2512 -49
  237. data/lib/stripe/resources/quote_line.rb +521 -0
  238. data/lib/stripe/resources/quote_preview_invoice.rb +1134 -0
  239. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +718 -0
  240. data/lib/stripe/resources/radar/early_fraud_warning.rb +8 -0
  241. data/lib/stripe/resources/radar/value_list.rb +8 -0
  242. data/lib/stripe/resources/radar/value_list_item.rb +8 -0
  243. data/lib/stripe/resources/refund.rb +389 -19
  244. data/lib/stripe/resources/reporting/report_run.rb +16 -0
  245. data/lib/stripe/resources/reporting/report_type.rb +8 -0
  246. data/lib/stripe/resources/reserve_transaction.rb +8 -0
  247. data/lib/stripe/resources/reversal.rb +8 -0
  248. data/lib/stripe/resources/review.rb +24 -0
  249. data/lib/stripe/resources/setup_attempt.rb +352 -17
  250. data/lib/stripe/resources/setup_intent.rb +1065 -12
  251. data/lib/stripe/resources/shipping_rate.rb +48 -0
  252. data/lib/stripe/resources/sigma/scheduled_query_run.rb +16 -0
  253. data/lib/stripe/resources/source.rb +303 -0
  254. data/lib/stripe/resources/source_mandate_notification.rb +32 -0
  255. data/lib/stripe/resources/source_transaction.rb +54 -0
  256. data/lib/stripe/resources/subscription.rb +720 -11
  257. data/lib/stripe/resources/subscription_item.rb +108 -3
  258. data/lib/stripe/resources/subscription_schedule.rb +1321 -10
  259. data/lib/stripe/resources/tax/association.rb +98 -0
  260. data/lib/stripe/resources/tax/calculation.rb +109 -0
  261. data/lib/stripe/resources/tax/calculation_line_item.rb +32 -0
  262. data/lib/stripe/resources/tax/form.rb +318 -0
  263. data/lib/stripe/resources/tax/registration.rb +1232 -0
  264. data/lib/stripe/resources/tax/settings.rb +61 -1
  265. data/lib/stripe/resources/tax/transaction.rb +93 -0
  266. data/lib/stripe/resources/tax/transaction_line_item.rb +16 -0
  267. data/lib/stripe/resources/tax_code.rb +8 -0
  268. data/lib/stripe/resources/tax_deducted_at_source.rb +8 -0
  269. data/lib/stripe/resources/tax_id.rb +36 -2
  270. data/lib/stripe/resources/tax_rate.rb +16 -0
  271. data/lib/stripe/resources/terminal/configuration.rb +332 -0
  272. data/lib/stripe/resources/terminal/connection_token.rb +8 -0
  273. data/lib/stripe/resources/terminal/location.rb +16 -0
  274. data/lib/stripe/resources/terminal/onboarding_link.rb +108 -0
  275. data/lib/stripe/resources/terminal/reader.rb +249 -0
  276. data/lib/stripe/resources/terminal/reader_collected_data.rb +47 -0
  277. data/lib/stripe/resources/test_helpers/test_clock.rb +24 -0
  278. data/lib/stripe/resources/token.rb +8 -0
  279. data/lib/stripe/resources/topup.rb +8 -0
  280. data/lib/stripe/resources/transfer.rb +14 -0
  281. data/lib/stripe/resources/treasury/credit_reversal.rb +16 -0
  282. data/lib/stripe/resources/treasury/debit_reversal.rb +24 -0
  283. data/lib/stripe/resources/treasury/financial_account.rb +83 -3
  284. data/lib/stripe/resources/treasury/financial_account_features.rb +194 -0
  285. data/lib/stripe/resources/treasury/inbound_transfer.rb +69 -0
  286. data/lib/stripe/resources/treasury/outbound_payment.rb +106 -0
  287. data/lib/stripe/resources/treasury/outbound_transfer.rb +151 -0
  288. data/lib/stripe/resources/treasury/received_credit.rb +135 -1
  289. data/lib/stripe/resources/treasury/received_debit.rb +129 -1
  290. data/lib/stripe/resources/treasury/transaction.rb +36 -0
  291. data/lib/stripe/resources/treasury/transaction_entry.rb +24 -0
  292. data/lib/stripe/resources/v2/billing/bill_setting.rb +102 -0
  293. data/lib/stripe/resources/v2/billing/bill_setting_version.rb +90 -0
  294. data/lib/stripe/resources/v2/billing/cadence.rb +323 -0
  295. data/lib/stripe/resources/v2/billing/collection_setting.rb +296 -0
  296. data/lib/stripe/resources/v2/billing/collection_setting_version.rb +284 -0
  297. data/lib/stripe/resources/v2/billing/custom_pricing_unit.rb +43 -0
  298. data/lib/stripe/resources/v2/billing/intent.rb +86 -0
  299. data/lib/stripe/resources/v2/billing/intent_action.rb +395 -0
  300. data/lib/stripe/resources/v2/billing/license_fee.rb +103 -0
  301. data/lib/stripe/resources/v2/billing/license_fee_subscription.rb +44 -0
  302. data/lib/stripe/resources/v2/billing/license_fee_version.rb +80 -0
  303. data/lib/stripe/resources/v2/billing/licensed_item.rb +60 -0
  304. data/lib/stripe/resources/v2/billing/meter_event.rb +8 -0
  305. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +16 -0
  306. data/lib/stripe/resources/v2/billing/meter_event_session.rb +8 -0
  307. data/lib/stripe/resources/v2/billing/metered_item.rb +85 -0
  308. data/lib/stripe/resources/v2/billing/pricing_plan.rb +51 -0
  309. data/lib/stripe/resources/v2/billing/pricing_plan_component.rb +94 -0
  310. data/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb +90 -0
  311. data/lib/stripe/resources/v2/billing/pricing_plan_version.rb +38 -0
  312. data/lib/stripe/resources/v2/billing/profile.rb +46 -0
  313. data/lib/stripe/resources/v2/billing/rate_card.rb +61 -0
  314. data/lib/stripe/resources/v2/billing/rate_card_rate.rb +107 -0
  315. data/lib/stripe/resources/v2/billing/rate_card_subscription.rb +90 -0
  316. data/lib/stripe/resources/v2/billing/rate_card_version.rb +34 -0
  317. data/lib/stripe/resources/v2/billing/service_action.rb +232 -0
  318. data/lib/stripe/resources/v2/core/account.rb +3838 -0
  319. data/lib/stripe/resources/v2/core/account_link.rb +123 -0
  320. data/lib/stripe/resources/v2/core/claimable_sandbox.rb +81 -0
  321. data/lib/stripe/resources/v2/core/person.rb +477 -0
  322. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +114 -0
  323. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +47 -0
  324. data/lib/stripe/resources/v2/event.rb +26 -0
  325. data/lib/stripe/resources/v2/event_destination.rb +44 -0
  326. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +28 -0
  327. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +30 -0
  328. data/lib/stripe/resources/v2/money_management/adjustment.rb +67 -0
  329. data/lib/stripe/resources/v2/money_management/financial_account.rb +140 -0
  330. data/lib/stripe/resources/v2/money_management/financial_address.rb +100 -0
  331. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +181 -0
  332. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +217 -0
  333. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +144 -0
  334. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +69 -0
  335. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +196 -0
  336. data/lib/stripe/resources/v2/money_management/payout_method.rb +109 -0
  337. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +81 -0
  338. data/lib/stripe/resources/v2/money_management/received_credit.rb +199 -0
  339. data/lib/stripe/resources/v2/money_management/received_debit.rb +136 -0
  340. data/lib/stripe/resources/v2/money_management/transaction.rb +116 -0
  341. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +105 -0
  342. data/lib/stripe/resources/v2/payments/off_session_payment.rb +113 -0
  343. data/lib/stripe/resources/v2/reporting/report.rb +116 -0
  344. data/lib/stripe/resources/v2/reporting/report_run.rb +158 -0
  345. data/lib/stripe/resources/v2/tax/automatic_rule.rb +39 -0
  346. data/lib/stripe/resources/webhook_endpoint.rb +8 -0
  347. data/lib/stripe/resources.rb +194 -0
  348. data/lib/stripe/services/account_notice_service.rb +101 -0
  349. data/lib/stripe/services/account_service.rb +562 -1
  350. data/lib/stripe/services/account_session_service.rb +226 -1
  351. data/lib/stripe/services/balance_settings_service.rb +99 -0
  352. data/lib/stripe/services/billing/alert_service.rb +75 -1
  353. data/lib/stripe/services/billing/credit_balance_summary_service.rb +17 -2
  354. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
  355. data/lib/stripe/services/billing/credit_grant_service.rb +37 -2
  356. data/lib/stripe/services/billing/meter_usage_service.rb +76 -0
  357. data/lib/stripe/services/billing_portal/session_service.rb +4 -0
  358. data/lib/stripe/services/billing_service.rb +2 -1
  359. data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
  360. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  361. data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
  362. data/lib/stripe/services/capital_service.rb +15 -0
  363. data/lib/stripe/services/charge_service.rb +1418 -0
  364. data/lib/stripe/services/checkout/session_service.rb +472 -5
  365. data/lib/stripe/services/coupon_service.rb +17 -1
  366. data/lib/stripe/services/credit_note_service.rb +4 -0
  367. data/lib/stripe/services/customer_session_service.rb +4 -1
  368. data/{rbi/stripe/services/account_external_account_service.rbi → lib/stripe/services/external_account_service.rb} +135 -122
  369. data/{rbi/stripe/services/tax/transaction_line_item_service.rbi → lib/stripe/services/financial_connections/account_inferred_balance_service.rb} +21 -17
  370. data/lib/stripe/services/financial_connections/account_service.rb +7 -2
  371. data/{rbi/stripe/services/climate/supplier_service.rbi → lib/stripe/services/financial_connections/institution_service.rb} +36 -25
  372. data/lib/stripe/services/financial_connections/session_service.rb +34 -2
  373. data/lib/stripe/services/financial_connections_service.rb +2 -1
  374. data/lib/stripe/services/fx_quote_service.rb +123 -0
  375. data/lib/stripe/services/identity/verification_session_service.rb +8 -0
  376. data/lib/stripe/services/invoice_item_service.rb +74 -2
  377. data/lib/stripe/services/invoice_line_item_service.rb +33 -1
  378. data/lib/stripe/services/invoice_payment_service.rb +4 -1
  379. data/lib/stripe/services/invoice_service.rb +1078 -16
  380. data/lib/stripe/services/issuing/card_service.rb +0 -8
  381. data/lib/stripe/services/issuing/cardholder_service.rb +2 -1
  382. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
  383. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
  384. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
  385. data/lib/stripe/services/issuing/transaction_service.rb +4 -0
  386. data/lib/stripe/services/issuing_service.rb +5 -1
  387. data/lib/stripe/services/mandate_service.rb +40 -0
  388. data/lib/stripe/services/margin_service.rb +119 -0
  389. data/{rbi/stripe/services/source_transaction_service.rbi → lib/stripe/services/order_line_item_service.rb} +20 -16
  390. data/lib/stripe/services/order_service.rb +2388 -0
  391. data/lib/stripe/services/payment_attempt_record_service.rb +52 -0
  392. data/{rbi/stripe/services/quote_line_item_service.rbi → lib/stripe/services/payment_intent_amount_details_line_item_service.rb} +20 -16
  393. data/lib/stripe/services/payment_intent_service.rb +7630 -2215
  394. data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
  395. data/lib/stripe/services/payment_method_service.rb +120 -1
  396. data/lib/stripe/services/payment_record_service.rb +562 -0
  397. data/lib/stripe/services/price_service.rb +19 -0
  398. data/lib/stripe/services/privacy/redaction_job_service.rb +240 -0
  399. data/{rbi/stripe/services/tax/calculation_line_item_service.rbi → lib/stripe/services/privacy/redaction_job_validation_error_service.rb} +21 -17
  400. data/lib/stripe/services/privacy_service.rb +13 -0
  401. data/lib/stripe/services/promotion_code_service.rb +8 -0
  402. data/{rbi/stripe/services/credit_note_line_item_service.rbi → lib/stripe/services/quote_line_service.rb} +20 -16
  403. data/{rbi/stripe/services/payment_link_line_item_service.rbi → lib/stripe/services/quote_preview_invoice_service.rb} +20 -16
  404. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +35 -0
  405. data/lib/stripe/services/quote_service.rb +1723 -8
  406. data/lib/stripe/services/setup_intent_service.rb +691 -9
  407. data/lib/stripe/services/subscription_item_service.rb +75 -3
  408. data/lib/stripe/services/subscription_schedule_service.rb +911 -10
  409. data/lib/stripe/services/subscription_service.rb +336 -9
  410. data/lib/stripe/services/tax/association_service.rb +31 -0
  411. data/lib/stripe/services/tax/form_service.rb +100 -0
  412. data/lib/stripe/services/tax_id_service.rb +8 -2
  413. data/lib/stripe/services/tax_service.rb +3 -1
  414. data/lib/stripe/services/terminal/configuration_service.rb +26 -0
  415. data/lib/stripe/services/terminal/onboarding_link_service.rb +56 -0
  416. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  417. data/lib/stripe/services/terminal_service.rb +3 -1
  418. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +97 -0
  419. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +25 -1
  420. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +25 -1
  421. data/lib/stripe/services/transfer_service.rb +4 -0
  422. data/lib/stripe/services/treasury/financial_account_features_service.rb +4 -1
  423. data/lib/stripe/services/treasury/financial_account_service.rb +16 -2
  424. data/lib/stripe/services/treasury/outbound_transfer_service.rb +24 -0
  425. data/lib/stripe/services/v1_services.rb +11 -1
  426. data/lib/stripe/services/v2/billing/bill_setting_service.rb +214 -0
  427. data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +45 -0
  428. data/lib/stripe/services/v2/billing/cadence_service.rb +428 -0
  429. data/lib/stripe/services/v2/billing/collection_setting_service.rb +518 -0
  430. data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +45 -0
  431. data/lib/stripe/services/v2/billing/custom_pricing_unit_service.rb +108 -0
  432. data/lib/stripe/services/v2/billing/intent_service.rb +465 -0
  433. data/lib/stripe/services/v2/billing/intents/action_service.rb +45 -0
  434. data/lib/stripe/services/v2/billing/license_fee_service.rb +250 -0
  435. data/lib/stripe/services/v2/billing/license_fee_subscription_service.rb +23 -0
  436. data/lib/stripe/services/v2/billing/license_fees/version_service.rb +45 -0
  437. data/lib/stripe/services/v2/billing/licensed_item_service.rb +149 -0
  438. data/lib/stripe/services/v2/billing/metered_item_service.rb +176 -0
  439. data/lib/stripe/services/v2/billing/pricing_plan_service.rb +142 -0
  440. data/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb +76 -0
  441. data/lib/stripe/services/v2/billing/pricing_plans/component_service.rb +162 -0
  442. data/lib/stripe/services/v2/billing/pricing_plans/version_service.rb +45 -0
  443. data/lib/stripe/services/v2/billing/profile_service.rb +144 -0
  444. data/lib/stripe/services/v2/billing/rate_card_service.rb +151 -0
  445. data/lib/stripe/services/v2/billing/rate_card_subscription_service.rb +144 -0
  446. data/lib/stripe/services/v2/billing/rate_cards/rate_service.rb +161 -0
  447. data/lib/stripe/services/v2/billing/rate_cards/version_service.rb +45 -0
  448. data/lib/stripe/services/v2/billing/service_action_service.rb +259 -0
  449. data/lib/stripe/services/v2/billing_service.rb +18 -1
  450. data/lib/stripe/services/v2/core/account_link_service.rb +114 -0
  451. data/lib/stripe/services/v2/core/account_service.rb +4536 -0
  452. data/lib/stripe/services/v2/core/accounts/person_service.rb +1045 -0
  453. data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +50 -0
  454. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +130 -0
  455. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +107 -0
  456. data/lib/stripe/services/v2/core/vault_service.rb +18 -0
  457. data/lib/stripe/services/v2/core_service.rb +5 -1
  458. data/lib/stripe/services/v2/money_management/adjustment_service.rb +74 -0
  459. data/lib/stripe/services/v2/money_management/financial_account_service.rb +119 -0
  460. data/lib/stripe/services/v2/money_management/financial_address_service.rb +82 -0
  461. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +125 -0
  462. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +95 -0
  463. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +199 -0
  464. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +235 -0
  465. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +172 -0
  466. data/lib/stripe/services/v2/money_management/payout_method_service.rb +90 -0
  467. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
  468. data/lib/stripe/services/v2/money_management/received_credit_service.rb +70 -0
  469. data/lib/stripe/services/v2/money_management/received_debit_service.rb +43 -0
  470. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +69 -0
  471. data/lib/stripe/services/v2/money_management/transaction_service.rb +73 -0
  472. data/lib/stripe/services/v2/money_management_service.rb +31 -0
  473. data/lib/stripe/services/v2/payment_service.rb +15 -0
  474. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +152 -0
  475. data/lib/stripe/services/v2/reporting/report_run_service.rb +88 -0
  476. data/lib/stripe/services/v2/reporting/report_service.rb +25 -0
  477. data/lib/stripe/services/v2/reporting_service.rb +16 -0
  478. data/lib/stripe/services/v2/tax/automatic_rule_service.rb +99 -0
  479. data/lib/stripe/services/v2/tax_service.rb +15 -0
  480. data/lib/stripe/services/v2/test_helper_service.rb +15 -0
  481. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +53 -0
  482. data/lib/stripe/services/v2_services.rb +6 -1
  483. data/lib/stripe/services.rb +84 -0
  484. data/lib/stripe/stripe_configuration.rb +3 -1
  485. data/lib/stripe/stripe_object.rb +26 -2
  486. data/lib/stripe/util.rb +16 -6
  487. data/lib/stripe/version.rb +1 -1
  488. data/lib/stripe.rb +53 -0
  489. data/rbi/stripe.rbi +280174 -0
  490. data/stripe.gemspec +4 -1
  491. metadata +283 -324
  492. data/rbi/stripe/resources/account.rbi +0 -4991
  493. data/rbi/stripe/resources/account_link.rbi +0 -76
  494. data/rbi/stripe/resources/account_session.rbi +0 -1173
  495. data/rbi/stripe/resources/apple_pay_domain.rbi +0 -88
  496. data/rbi/stripe/resources/application.rbi +0 -20
  497. data/rbi/stripe/resources/application_fee.rbi +0 -118
  498. data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
  499. data/rbi/stripe/resources/apps/secret.rbi +0 -195
  500. data/rbi/stripe/resources/balance.rbi +0 -230
  501. data/rbi/stripe/resources/balance_transaction.rbi +0 -147
  502. data/rbi/stripe/resources/bank_account.rbi +0 -127
  503. data/rbi/stripe/resources/billing/alert.rbi +0 -201
  504. data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
  505. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -63
  506. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -147
  507. data/rbi/stripe/resources/billing/credit_grant.rbi +0 -291
  508. data/rbi/stripe/resources/billing/meter.rbi +0 -226
  509. data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
  510. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
  511. data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -35
  512. data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -712
  513. data/rbi/stripe/resources/billing_portal/session.rbi +0 -345
  514. data/rbi/stripe/resources/capability.rbi +0 -125
  515. data/rbi/stripe/resources/card.rbi +0 -125
  516. data/rbi/stripe/resources/cash_balance.rbi +0 -32
  517. data/rbi/stripe/resources/charge.rbi +0 -2136
  518. data/rbi/stripe/resources/checkout/session.rbi +0 -4105
  519. data/rbi/stripe/resources/climate/order.rbi +0 -245
  520. data/rbi/stripe/resources/climate/product.rbi +0 -75
  521. data/rbi/stripe/resources/climate/supplier.rbi +0 -72
  522. data/rbi/stripe/resources/confirmation_token.rbi +0 -1818
  523. data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
  524. data/rbi/stripe/resources/country_spec.rbi +0 -85
  525. data/rbi/stripe/resources/coupon.rbi +0 -250
  526. data/rbi/stripe/resources/credit_note.rbi +0 -752
  527. data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
  528. data/rbi/stripe/resources/customer.rbi +0 -993
  529. data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -56
  530. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
  531. data/rbi/stripe/resources/customer_session.rbi +0 -200
  532. data/rbi/stripe/resources/discount.rbi +0 -53
  533. data/rbi/stripe/resources/dispute.rbi +0 -761
  534. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -58
  535. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
  536. data/rbi/stripe/resources/entitlements/feature.rbi +0 -117
  537. data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
  538. data/rbi/stripe/resources/event.rbi +0 -137
  539. data/rbi/stripe/resources/exchange_rate.rbi +0 -66
  540. data/rbi/stripe/resources/file.rbi +0 -143
  541. data/rbi/stripe/resources/file_link.rbi +0 -141
  542. data/rbi/stripe/resources/financial_connections/account.rbi +0 -339
  543. data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
  544. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
  545. data/rbi/stripe/resources/financial_connections/session.rbi +0 -123
  546. data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -124
  547. data/rbi/stripe/resources/forwarding/request.rbi +0 -216
  548. data/rbi/stripe/resources/funding_instructions.rbi +0 -437
  549. data/rbi/stripe/resources/identity/verification_report.rbi +0 -360
  550. data/rbi/stripe/resources/identity/verification_session.rbi +0 -564
  551. data/rbi/stripe/resources/invoice.rbi +0 -3894
  552. data/rbi/stripe/resources/invoice_item.rbi +0 -470
  553. data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
  554. data/rbi/stripe/resources/invoice_payment.rbi +0 -121
  555. data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
  556. data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
  557. data/rbi/stripe/resources/issuing/card.rbi +0 -749
  558. data/rbi/stripe/resources/issuing/cardholder.rbi +0 -744
  559. data/rbi/stripe/resources/issuing/dispute.rbi +0 -913
  560. data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -338
  561. data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -79
  562. data/rbi/stripe/resources/issuing/token.rbi +0 -226
  563. data/rbi/stripe/resources/issuing/transaction.rbi +0 -1061
  564. data/rbi/stripe/resources/line_item.rbi +0 -72
  565. data/rbi/stripe/resources/login_link.rbi +0 -19
  566. data/rbi/stripe/resources/mandate.rbi +0 -191
  567. data/rbi/stripe/resources/payment_intent.rbi +0 -10011
  568. data/rbi/stripe/resources/payment_link.rbi +0 -1891
  569. data/rbi/stripe/resources/payment_method.rbi +0 -1770
  570. data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3550
  571. data/rbi/stripe/resources/payment_method_domain.rbi +0 -228
  572. data/rbi/stripe/resources/payout.rbi +0 -307
  573. data/rbi/stripe/resources/person.rbi +0 -401
  574. data/rbi/stripe/resources/plan.rbi +0 -371
  575. data/rbi/stripe/resources/price.rbi +0 -694
  576. data/rbi/stripe/resources/product.rbi +0 -553
  577. data/rbi/stripe/resources/product_feature.rbi +0 -26
  578. data/rbi/stripe/resources/promotion_code.rbi +0 -264
  579. data/rbi/stripe/resources/quote.rbi +0 -1137
  580. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
  581. data/rbi/stripe/resources/radar/value_list.rbi +0 -168
  582. data/rbi/stripe/resources/radar/value_list_item.rbi +0 -129
  583. data/rbi/stripe/resources/refund.rbi +0 -523
  584. data/rbi/stripe/resources/reporting/report_run.rbi +0 -191
  585. data/rbi/stripe/resources/reporting/report_type.rbi +0 -57
  586. data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
  587. data/rbi/stripe/resources/reversal.rbi +0 -51
  588. data/rbi/stripe/resources/review.rbi +0 -154
  589. data/rbi/stripe/resources/setup_attempt.rbi +0 -477
  590. data/rbi/stripe/resources/setup_intent.rbi +0 -3974
  591. data/rbi/stripe/resources/shipping_rate.rbi +0 -305
  592. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -75
  593. data/rbi/stripe/resources/source.rbi +0 -1496
  594. data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
  595. data/rbi/stripe/resources/source_transaction.rbi +0 -127
  596. data/rbi/stripe/resources/subscription.rbi +0 -2154
  597. data/rbi/stripe/resources/subscription_item.rbi +0 -404
  598. data/rbi/stripe/resources/subscription_schedule.rbi +0 -1795
  599. data/rbi/stripe/resources/tax/calculation.rbi +0 -478
  600. data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -91
  601. data/rbi/stripe/resources/tax/registration.rbi +0 -3216
  602. data/rbi/stripe/resources/tax/settings.rbi +0 -141
  603. data/rbi/stripe/resources/tax/transaction.rbi +0 -351
  604. data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
  605. data/rbi/stripe/resources/tax_code.rbi +0 -44
  606. data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
  607. data/rbi/stripe/resources/tax_id.rbi +0 -165
  608. data/rbi/stripe/resources/tax_rate.rbi +0 -239
  609. data/rbi/stripe/resources/terminal/configuration.rbi +0 -1647
  610. data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
  611. data/rbi/stripe/resources/terminal/location.rbi +0 -222
  612. data/rbi/stripe/resources/terminal/reader.rbi +0 -1016
  613. data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -132
  614. data/rbi/stripe/resources/token.rbi +0 -1281
  615. data/rbi/stripe/resources/topup.rbi +0 -222
  616. data/rbi/stripe/resources/transfer.rbi +0 -199
  617. data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -119
  618. data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -131
  619. data/rbi/stripe/resources/treasury/financial_account.rbi +0 -869
  620. data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
  621. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
  622. data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
  623. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
  624. data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
  625. data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
  626. data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
  627. data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
  628. data/rbi/stripe/resources/v2/amount.rbi +0 -14
  629. data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
  630. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
  631. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
  632. data/rbi/stripe/resources/v2/event.rbi +0 -48
  633. data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
  634. data/rbi/stripe/resources/webhook_endpoint.rbi +0 -168
  635. data/rbi/stripe/services/account_capability_service.rbi +0 -51
  636. data/rbi/stripe/services/account_link_service.rbi +0 -60
  637. data/rbi/stripe/services/account_login_link_service.rbi +0 -22
  638. data/rbi/stripe/services/account_person_service.rbi +0 -1007
  639. data/rbi/stripe/services/account_service.rbi +0 -4281
  640. data/rbi/stripe/services/account_session_service.rbi +0 -748
  641. data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -76
  642. data/rbi/stripe/services/application_fee_refund_service.rbi +0 -93
  643. data/rbi/stripe/services/application_fee_service.rbi +0 -78
  644. data/rbi/stripe/services/apps/secret_service.rbi +0 -151
  645. data/rbi/stripe/services/apps_service.rbi +0 -9
  646. data/rbi/stripe/services/balance_service.rbi +0 -21
  647. data/rbi/stripe/services/balance_transaction_service.rbi +0 -93
  648. data/rbi/stripe/services/billing/alert_service.rbi +0 -152
  649. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -68
  650. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
  651. data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -211
  652. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -42
  653. data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
  654. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
  655. data/rbi/stripe/services/billing/meter_service.rbi +0 -163
  656. data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -561
  657. data/rbi/stripe/services/billing_portal/session_service.rbi +0 -204
  658. data/rbi/stripe/services/billing_portal_service.rbi +0 -10
  659. data/rbi/stripe/services/billing_service.rbi +0 -15
  660. data/rbi/stripe/services/charge_service.rbi +0 -448
  661. data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
  662. data/rbi/stripe/services/checkout/session_service.rbi +0 -2697
  663. data/rbi/stripe/services/checkout_service.rbi +0 -9
  664. data/rbi/stripe/services/climate/order_service.rbi +0 -142
  665. data/rbi/stripe/services/climate/product_service.rbi +0 -46
  666. data/rbi/stripe/services/climate_service.rbi +0 -11
  667. data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
  668. data/rbi/stripe/services/country_spec_service.rbi +0 -44
  669. data/rbi/stripe/services/coupon_service.rbi +0 -194
  670. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
  671. data/rbi/stripe/services/credit_note_service.rbi +0 -415
  672. data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
  673. data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
  674. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
  675. data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
  676. data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
  677. data/rbi/stripe/services/customer_payment_source_service.rbi +0 -232
  678. data/rbi/stripe/services/customer_service.rbi +0 -635
  679. data/rbi/stripe/services/customer_session_service.rbi +0 -116
  680. data/rbi/stripe/services/customer_tax_id_service.rbi +0 -70
  681. data/rbi/stripe/services/dispute_service.rbi +0 -424
  682. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
  683. data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
  684. data/rbi/stripe/services/entitlements_service.rbi +0 -10
  685. data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
  686. data/rbi/stripe/services/event_service.rbi +0 -83
  687. data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
  688. data/rbi/stripe/services/file_link_service.rbi +0 -124
  689. data/rbi/stripe/services/file_service.rbi +0 -116
  690. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
  691. data/rbi/stripe/services/financial_connections/account_service.rbi +0 -133
  692. data/rbi/stripe/services/financial_connections/session_service.rbi +0 -88
  693. data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -92
  694. data/rbi/stripe/services/financial_connections_service.rbi +0 -11
  695. data/rbi/stripe/services/forwarding/request_service.rbi +0 -134
  696. data/rbi/stripe/services/forwarding_service.rbi +0 -9
  697. data/rbi/stripe/services/identity/verification_report_service.rbi +0 -87
  698. data/rbi/stripe/services/identity/verification_session_service.rbi +0 -339
  699. data/rbi/stripe/services/identity_service.rbi +0 -10
  700. data/rbi/stripe/services/invoice_item_service.rbi +0 -366
  701. data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
  702. data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
  703. data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
  704. data/rbi/stripe/services/invoice_service.rbi +0 -3073
  705. data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
  706. data/rbi/stripe/services/issuing/card_service.rbi +0 -503
  707. data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -587
  708. data/rbi/stripe/services/issuing/dispute_service.rbi +0 -707
  709. data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -243
  710. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
  711. data/rbi/stripe/services/issuing/token_service.rbi +0 -99
  712. data/rbi/stripe/services/issuing/transaction_service.rbi +0 -105
  713. data/rbi/stripe/services/issuing_service.rbi +0 -16
  714. data/rbi/stripe/services/mandate_service.rbi +0 -20
  715. data/rbi/stripe/services/payment_intent_service.rbi +0 -8010
  716. data/rbi/stripe/services/payment_link_service.rbi +0 -1441
  717. data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2487
  718. data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
  719. data/rbi/stripe/services/payment_method_service.rbi +0 -781
  720. data/rbi/stripe/services/payout_service.rbi +0 -209
  721. data/rbi/stripe/services/plan_service.rbi +0 -282
  722. data/rbi/stripe/services/price_service.rbi +0 -546
  723. data/rbi/stripe/services/product_feature_service.rbi +0 -67
  724. data/rbi/stripe/services/product_service.rbi +0 -477
  725. data/rbi/stripe/services/promotion_code_service.rbi +0 -214
  726. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
  727. data/rbi/stripe/services/quote_service.rbi +0 -695
  728. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
  729. data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -109
  730. data/rbi/stripe/services/radar/value_list_service.rbi +0 -141
  731. data/rbi/stripe/services/radar_service.rbi +0 -11
  732. data/rbi/stripe/services/refund_service.rbi +0 -185
  733. data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
  734. data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
  735. data/rbi/stripe/services/reporting_service.rbi +0 -10
  736. data/rbi/stripe/services/review_service.rbi +0 -84
  737. data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
  738. data/rbi/stripe/services/setup_intent_service.rbi +0 -3709
  739. data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
  740. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
  741. data/rbi/stripe/services/sigma_service.rbi +0 -9
  742. data/rbi/stripe/services/source_service.rbi +0 -663
  743. data/rbi/stripe/services/subscription_item_service.rbi +0 -350
  744. data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1425
  745. data/rbi/stripe/services/subscription_service.rbi +0 -1768
  746. data/rbi/stripe/services/tax/calculation_service.rbi +0 -234
  747. data/rbi/stripe/services/tax/registration_service.rbi +0 -2278
  748. data/rbi/stripe/services/tax/settings_service.rbi +0 -93
  749. data/rbi/stripe/services/tax/transaction_service.rbi +0 -146
  750. data/rbi/stripe/services/tax_code_service.rbi +0 -44
  751. data/rbi/stripe/services/tax_id_service.rbi +0 -110
  752. data/rbi/stripe/services/tax_rate_service.rbi +0 -185
  753. data/rbi/stripe/services/tax_service.rbi +0 -12
  754. data/rbi/stripe/services/terminal/configuration_service.rbi +0 -1328
  755. data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
  756. data/rbi/stripe/services/terminal/location_service.rbi +0 -182
  757. data/rbi/stripe/services/terminal/reader_service.rbi +0 -540
  758. data/rbi/stripe/services/terminal_service.rbi +0 -12
  759. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
  760. data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
  761. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
  762. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
  763. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
  764. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
  765. data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
  766. data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
  767. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -117
  768. data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
  769. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -90
  770. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
  771. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -125
  772. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -125
  773. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -87
  774. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -87
  775. data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
  776. data/rbi/stripe/services/test_helpers_service.rbi +0 -15
  777. data/rbi/stripe/services/token_service.rbi +0 -1255
  778. data/rbi/stripe/services/topup_service.rbi +0 -176
  779. data/rbi/stripe/services/transfer_reversal_service.rbi +0 -101
  780. data/rbi/stripe/services/transfer_service.rbi +0 -152
  781. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
  782. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
  783. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -198
  784. data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -566
  785. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
  786. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
  787. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
  788. data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
  789. data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
  790. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
  791. data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
  792. data/rbi/stripe/services/treasury_service.rbi +0 -18
  793. data/rbi/stripe/services/v1_services.rbi +0 -77
  794. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
  795. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
  796. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -18
  797. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
  798. data/rbi/stripe/services/v2/billing_service.rbi +0 -14
  799. data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -192
  800. data/rbi/stripe/services/v2/core/event_service.rbi +0 -36
  801. data/rbi/stripe/services/v2/core_service.rbi +0 -12
  802. data/rbi/stripe/services/v2_services.rbi +0 -10
  803. data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -129
@@ -83,6 +83,8 @@ module Stripe
83
83
  attr_accessor :created
84
84
  # Only return subscription schedules for the given customer.
85
85
  attr_accessor :customer
86
+ # Only return subscription schedules for the given account.
87
+ attr_accessor :customer_account
86
88
  # 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.
87
89
  attr_accessor :ending_before
88
90
  # Specifies which fields in the response should be expanded.
@@ -101,6 +103,7 @@ module Stripe
101
103
  completed_at: nil,
102
104
  created: nil,
103
105
  customer: nil,
106
+ customer_account: nil,
104
107
  ending_before: nil,
105
108
  expand: nil,
106
109
  limit: nil,
@@ -112,6 +115,7 @@ module Stripe
112
115
  @completed_at = completed_at
113
116
  @created = created
114
117
  @customer = customer
118
+ @customer_account = customer_account
115
119
  @ending_before = ending_before
116
120
  @expand = expand
117
121
  @limit = limit
@@ -253,16 +257,44 @@ module Stripe
253
257
  class Phase < Stripe::RequestParams
254
258
  class AddInvoiceItem < Stripe::RequestParams
255
259
  class Discount < Stripe::RequestParams
260
+ class DiscountEnd < Stripe::RequestParams
261
+ class Duration < Stripe::RequestParams
262
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
263
+ attr_accessor :interval
264
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
265
+ attr_accessor :interval_count
266
+
267
+ def initialize(interval: nil, interval_count: nil)
268
+ @interval = interval
269
+ @interval_count = interval_count
270
+ end
271
+ end
272
+ # Time span for the redeemed discount.
273
+ attr_accessor :duration
274
+ # A precise Unix timestamp for the discount to end. Must be in the future.
275
+ attr_accessor :timestamp
276
+ # The type of calculation made to determine when the discount ends.
277
+ attr_accessor :type
278
+
279
+ def initialize(duration: nil, timestamp: nil, type: nil)
280
+ @duration = duration
281
+ @timestamp = timestamp
282
+ @type = type
283
+ end
284
+ end
256
285
  # ID of the coupon to create a new discount for.
257
286
  attr_accessor :coupon
258
287
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
259
288
  attr_accessor :discount
289
+ # Details to determine how long the discount should be applied for.
290
+ attr_accessor :discount_end
260
291
  # ID of the promotion code to create a new discount for.
261
292
  attr_accessor :promotion_code
262
293
 
263
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
294
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
264
295
  @coupon = coupon
265
296
  @discount = discount
297
+ @discount_end = discount_end
266
298
  @promotion_code = promotion_code
267
299
  end
268
300
  end
@@ -398,16 +430,44 @@ module Stripe
398
430
  end
399
431
 
400
432
  class Discount < Stripe::RequestParams
433
+ class DiscountEnd < Stripe::RequestParams
434
+ class Duration < Stripe::RequestParams
435
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
436
+ attr_accessor :interval
437
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
438
+ attr_accessor :interval_count
439
+
440
+ def initialize(interval: nil, interval_count: nil)
441
+ @interval = interval
442
+ @interval_count = interval_count
443
+ end
444
+ end
445
+ # Time span for the redeemed discount.
446
+ attr_accessor :duration
447
+ # A precise Unix timestamp for the discount to end. Must be in the future.
448
+ attr_accessor :timestamp
449
+ # The type of calculation made to determine when the discount ends.
450
+ attr_accessor :type
451
+
452
+ def initialize(duration: nil, timestamp: nil, type: nil)
453
+ @duration = duration
454
+ @timestamp = timestamp
455
+ @type = type
456
+ end
457
+ end
401
458
  # ID of the coupon to create a new discount for.
402
459
  attr_accessor :coupon
403
460
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
404
461
  attr_accessor :discount
462
+ # Details to determine how long the discount should be applied for.
463
+ attr_accessor :discount_end
405
464
  # ID of the promotion code to create a new discount for.
406
465
  attr_accessor :promotion_code
407
466
 
408
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
467
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
409
468
  @coupon = coupon
410
469
  @discount = discount
470
+ @discount_end = discount_end
411
471
  @promotion_code = promotion_code
412
472
  end
413
473
  end
@@ -461,16 +521,44 @@ module Stripe
461
521
  end
462
522
 
463
523
  class Discount < Stripe::RequestParams
524
+ class DiscountEnd < Stripe::RequestParams
525
+ class Duration < Stripe::RequestParams
526
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
527
+ attr_accessor :interval
528
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
529
+ attr_accessor :interval_count
530
+
531
+ def initialize(interval: nil, interval_count: nil)
532
+ @interval = interval
533
+ @interval_count = interval_count
534
+ end
535
+ end
536
+ # Time span for the redeemed discount.
537
+ attr_accessor :duration
538
+ # A precise Unix timestamp for the discount to end. Must be in the future.
539
+ attr_accessor :timestamp
540
+ # The type of calculation made to determine when the discount ends.
541
+ attr_accessor :type
542
+
543
+ def initialize(duration: nil, timestamp: nil, type: nil)
544
+ @duration = duration
545
+ @timestamp = timestamp
546
+ @type = type
547
+ end
548
+ end
464
549
  # ID of the coupon to create a new discount for.
465
550
  attr_accessor :coupon
466
551
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
467
552
  attr_accessor :discount
553
+ # Details to determine how long the discount should be applied for.
554
+ attr_accessor :discount_end
468
555
  # ID of the promotion code to create a new discount for.
469
556
  attr_accessor :promotion_code
470
557
 
471
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
558
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
472
559
  @coupon = coupon
473
560
  @discount = discount
561
+ @discount_end = discount_end
474
562
  @promotion_code = promotion_code
475
563
  end
476
564
  end
@@ -516,6 +604,18 @@ module Stripe
516
604
  @unit_amount_decimal = unit_amount_decimal
517
605
  end
518
606
  end
607
+
608
+ class Trial < Stripe::RequestParams
609
+ # 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.
610
+ attr_accessor :converts_to
611
+ # Determines the type of trial for this item.
612
+ attr_accessor :type
613
+
614
+ def initialize(converts_to: nil, type: nil)
615
+ @converts_to = converts_to
616
+ @type = type
617
+ end
618
+ end
519
619
  # 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.
520
620
  attr_accessor :billing_thresholds
521
621
  # The coupons to redeem into discounts for the subscription item.
@@ -532,6 +632,8 @@ module Stripe
532
632
  attr_accessor :quantity
533
633
  # 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.
534
634
  attr_accessor :tax_rates
635
+ # Options that configure the trial on the subscription item.
636
+ attr_accessor :trial
535
637
 
536
638
  def initialize(
537
639
  billing_thresholds: nil,
@@ -541,7 +643,8 @@ module Stripe
541
643
  price: nil,
542
644
  price_data: nil,
543
645
  quantity: nil,
544
- tax_rates: nil
646
+ tax_rates: nil,
647
+ trial: nil
545
648
  )
546
649
  @billing_thresholds = billing_thresholds
547
650
  @discounts = discounts
@@ -551,6 +654,16 @@ module Stripe
551
654
  @price_data = price_data
552
655
  @quantity = quantity
553
656
  @tax_rates = tax_rates
657
+ @trial = trial
658
+ end
659
+ end
660
+
661
+ class PauseCollection < Stripe::RequestParams
662
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
663
+ attr_accessor :behavior
664
+
665
+ def initialize(behavior: nil)
666
+ @behavior = behavior
554
667
  end
555
668
  end
556
669
 
@@ -565,6 +678,23 @@ module Stripe
565
678
  @destination = destination
566
679
  end
567
680
  end
681
+
682
+ class TrialSettings < Stripe::RequestParams
683
+ class EndBehavior < Stripe::RequestParams
684
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
685
+ attr_accessor :prorate_up_front
686
+
687
+ def initialize(prorate_up_front: nil)
688
+ @prorate_up_front = prorate_up_front
689
+ end
690
+ end
691
+ # Defines how the subscription should behave when a trial ends.
692
+ attr_accessor :end_behavior
693
+
694
+ def initialize(end_behavior: nil)
695
+ @end_behavior = end_behavior
696
+ end
697
+ end
568
698
  # 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.
569
699
  attr_accessor :add_invoice_items
570
700
  # 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).
@@ -601,14 +731,20 @@ module Stripe
601
731
  attr_accessor :metadata
602
732
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
603
733
  attr_accessor :on_behalf_of
734
+ # 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).
735
+ attr_accessor :pause_collection
604
736
  # Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
605
737
  attr_accessor :proration_behavior
606
738
  # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
607
739
  attr_accessor :transfer_data
608
740
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
609
741
  attr_accessor :trial
742
+ # Specify trial behavior when crossing phase boundaries
743
+ attr_accessor :trial_continuation
610
744
  # 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`
611
745
  attr_accessor :trial_end
746
+ # Settings related to subscription trials.
747
+ attr_accessor :trial_settings
612
748
 
613
749
  def initialize(
614
750
  add_invoice_items: nil,
@@ -629,10 +765,13 @@ module Stripe
629
765
  iterations: nil,
630
766
  metadata: nil,
631
767
  on_behalf_of: nil,
768
+ pause_collection: nil,
632
769
  proration_behavior: nil,
633
770
  transfer_data: nil,
634
771
  trial: nil,
635
- trial_end: nil
772
+ trial_continuation: nil,
773
+ trial_end: nil,
774
+ trial_settings: nil
636
775
  )
637
776
  @add_invoice_items = add_invoice_items
638
777
  @application_fee_percent = application_fee_percent
@@ -652,16 +791,35 @@ module Stripe
652
791
  @iterations = iterations
653
792
  @metadata = metadata
654
793
  @on_behalf_of = on_behalf_of
794
+ @pause_collection = pause_collection
655
795
  @proration_behavior = proration_behavior
656
796
  @transfer_data = transfer_data
657
797
  @trial = trial
798
+ @trial_continuation = trial_continuation
658
799
  @trial_end = trial_end
800
+ @trial_settings = trial_settings
659
801
  end
660
802
  end
803
+
804
+ class Prebilling < Stripe::RequestParams
805
+ # This is used to determine the number of billing cycles to prebill.
806
+ attr_accessor :iterations
807
+ # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
808
+ attr_accessor :update_behavior
809
+
810
+ def initialize(iterations: nil, update_behavior: nil)
811
+ @iterations = iterations
812
+ @update_behavior = update_behavior
813
+ end
814
+ end
815
+ # 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.
816
+ attr_accessor :billing_behavior
661
817
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
662
818
  attr_accessor :billing_mode
663
819
  # The identifier of the customer to create the subscription schedule for.
664
820
  attr_accessor :customer
821
+ # The identifier of the account to create the subscription schedule for.
822
+ attr_accessor :customer_account
665
823
  # Object representing the subscription schedule's default settings.
666
824
  attr_accessor :default_settings
667
825
  # 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.
@@ -674,28 +832,36 @@ module Stripe
674
832
  attr_accessor :metadata
675
833
  # 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.
676
834
  attr_accessor :phases
835
+ # If specified, the invoicing for the given billing cycle iterations will be processed now.
836
+ attr_accessor :prebilling
677
837
  # 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.
678
838
  attr_accessor :start_date
679
839
 
680
840
  def initialize(
841
+ billing_behavior: nil,
681
842
  billing_mode: nil,
682
843
  customer: nil,
844
+ customer_account: nil,
683
845
  default_settings: nil,
684
846
  end_behavior: nil,
685
847
  expand: nil,
686
848
  from_subscription: nil,
687
849
  metadata: nil,
688
850
  phases: nil,
851
+ prebilling: nil,
689
852
  start_date: nil
690
853
  )
854
+ @billing_behavior = billing_behavior
691
855
  @billing_mode = billing_mode
692
856
  @customer = customer
857
+ @customer_account = customer_account
693
858
  @default_settings = default_settings
694
859
  @end_behavior = end_behavior
695
860
  @expand = expand
696
861
  @from_subscription = from_subscription
697
862
  @metadata = metadata
698
863
  @phases = phases
864
+ @prebilling = prebilling
699
865
  @start_date = start_date
700
866
  end
701
867
  end
@@ -832,16 +998,44 @@ module Stripe
832
998
  class Phase < Stripe::RequestParams
833
999
  class AddInvoiceItem < Stripe::RequestParams
834
1000
  class Discount < Stripe::RequestParams
1001
+ class DiscountEnd < Stripe::RequestParams
1002
+ class Duration < Stripe::RequestParams
1003
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1004
+ attr_accessor :interval
1005
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1006
+ attr_accessor :interval_count
1007
+
1008
+ def initialize(interval: nil, interval_count: nil)
1009
+ @interval = interval
1010
+ @interval_count = interval_count
1011
+ end
1012
+ end
1013
+ # Time span for the redeemed discount.
1014
+ attr_accessor :duration
1015
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1016
+ attr_accessor :timestamp
1017
+ # The type of calculation made to determine when the discount ends.
1018
+ attr_accessor :type
1019
+
1020
+ def initialize(duration: nil, timestamp: nil, type: nil)
1021
+ @duration = duration
1022
+ @timestamp = timestamp
1023
+ @type = type
1024
+ end
1025
+ end
835
1026
  # ID of the coupon to create a new discount for.
836
1027
  attr_accessor :coupon
837
1028
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
838
1029
  attr_accessor :discount
1030
+ # Details to determine how long the discount should be applied for.
1031
+ attr_accessor :discount_end
839
1032
  # ID of the promotion code to create a new discount for.
840
1033
  attr_accessor :promotion_code
841
1034
 
842
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1035
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
843
1036
  @coupon = coupon
844
1037
  @discount = discount
1038
+ @discount_end = discount_end
845
1039
  @promotion_code = promotion_code
846
1040
  end
847
1041
  end
@@ -977,16 +1171,44 @@ module Stripe
977
1171
  end
978
1172
 
979
1173
  class Discount < Stripe::RequestParams
1174
+ class DiscountEnd < Stripe::RequestParams
1175
+ class Duration < Stripe::RequestParams
1176
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1177
+ attr_accessor :interval
1178
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1179
+ attr_accessor :interval_count
1180
+
1181
+ def initialize(interval: nil, interval_count: nil)
1182
+ @interval = interval
1183
+ @interval_count = interval_count
1184
+ end
1185
+ end
1186
+ # Time span for the redeemed discount.
1187
+ attr_accessor :duration
1188
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1189
+ attr_accessor :timestamp
1190
+ # The type of calculation made to determine when the discount ends.
1191
+ attr_accessor :type
1192
+
1193
+ def initialize(duration: nil, timestamp: nil, type: nil)
1194
+ @duration = duration
1195
+ @timestamp = timestamp
1196
+ @type = type
1197
+ end
1198
+ end
980
1199
  # ID of the coupon to create a new discount for.
981
1200
  attr_accessor :coupon
982
1201
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
983
1202
  attr_accessor :discount
1203
+ # Details to determine how long the discount should be applied for.
1204
+ attr_accessor :discount_end
984
1205
  # ID of the promotion code to create a new discount for.
985
1206
  attr_accessor :promotion_code
986
1207
 
987
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1208
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
988
1209
  @coupon = coupon
989
1210
  @discount = discount
1211
+ @discount_end = discount_end
990
1212
  @promotion_code = promotion_code
991
1213
  end
992
1214
  end
@@ -1040,16 +1262,44 @@ module Stripe
1040
1262
  end
1041
1263
 
1042
1264
  class Discount < Stripe::RequestParams
1265
+ class DiscountEnd < Stripe::RequestParams
1266
+ class Duration < Stripe::RequestParams
1267
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1268
+ attr_accessor :interval
1269
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1270
+ attr_accessor :interval_count
1271
+
1272
+ def initialize(interval: nil, interval_count: nil)
1273
+ @interval = interval
1274
+ @interval_count = interval_count
1275
+ end
1276
+ end
1277
+ # Time span for the redeemed discount.
1278
+ attr_accessor :duration
1279
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1280
+ attr_accessor :timestamp
1281
+ # The type of calculation made to determine when the discount ends.
1282
+ attr_accessor :type
1283
+
1284
+ def initialize(duration: nil, timestamp: nil, type: nil)
1285
+ @duration = duration
1286
+ @timestamp = timestamp
1287
+ @type = type
1288
+ end
1289
+ end
1043
1290
  # ID of the coupon to create a new discount for.
1044
1291
  attr_accessor :coupon
1045
1292
  # ID of an existing discount on the object (or one of its ancestors) to reuse.
1046
1293
  attr_accessor :discount
1294
+ # Details to determine how long the discount should be applied for.
1295
+ attr_accessor :discount_end
1047
1296
  # ID of the promotion code to create a new discount for.
1048
1297
  attr_accessor :promotion_code
1049
1298
 
1050
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1299
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1051
1300
  @coupon = coupon
1052
1301
  @discount = discount
1302
+ @discount_end = discount_end
1053
1303
  @promotion_code = promotion_code
1054
1304
  end
1055
1305
  end
@@ -1095,6 +1345,18 @@ module Stripe
1095
1345
  @unit_amount_decimal = unit_amount_decimal
1096
1346
  end
1097
1347
  end
1348
+
1349
+ class Trial < Stripe::RequestParams
1350
+ # 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.
1351
+ attr_accessor :converts_to
1352
+ # Determines the type of trial for this item.
1353
+ attr_accessor :type
1354
+
1355
+ def initialize(converts_to: nil, type: nil)
1356
+ @converts_to = converts_to
1357
+ @type = type
1358
+ end
1359
+ end
1098
1360
  # 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.
1099
1361
  attr_accessor :billing_thresholds
1100
1362
  # The coupons to redeem into discounts for the subscription item.
@@ -1111,6 +1373,8 @@ module Stripe
1111
1373
  attr_accessor :quantity
1112
1374
  # 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.
1113
1375
  attr_accessor :tax_rates
1376
+ # Options that configure the trial on the subscription item.
1377
+ attr_accessor :trial
1114
1378
 
1115
1379
  def initialize(
1116
1380
  billing_thresholds: nil,
@@ -1120,7 +1384,8 @@ module Stripe
1120
1384
  price: nil,
1121
1385
  price_data: nil,
1122
1386
  quantity: nil,
1123
- tax_rates: nil
1387
+ tax_rates: nil,
1388
+ trial: nil
1124
1389
  )
1125
1390
  @billing_thresholds = billing_thresholds
1126
1391
  @discounts = discounts
@@ -1130,6 +1395,16 @@ module Stripe
1130
1395
  @price_data = price_data
1131
1396
  @quantity = quantity
1132
1397
  @tax_rates = tax_rates
1398
+ @trial = trial
1399
+ end
1400
+ end
1401
+
1402
+ class PauseCollection < Stripe::RequestParams
1403
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1404
+ attr_accessor :behavior
1405
+
1406
+ def initialize(behavior: nil)
1407
+ @behavior = behavior
1133
1408
  end
1134
1409
  end
1135
1410
 
@@ -1144,6 +1419,23 @@ module Stripe
1144
1419
  @destination = destination
1145
1420
  end
1146
1421
  end
1422
+
1423
+ class TrialSettings < Stripe::RequestParams
1424
+ class EndBehavior < Stripe::RequestParams
1425
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1426
+ attr_accessor :prorate_up_front
1427
+
1428
+ def initialize(prorate_up_front: nil)
1429
+ @prorate_up_front = prorate_up_front
1430
+ end
1431
+ end
1432
+ # Defines how the subscription should behave when a trial ends.
1433
+ attr_accessor :end_behavior
1434
+
1435
+ def initialize(end_behavior: nil)
1436
+ @end_behavior = end_behavior
1437
+ end
1438
+ end
1147
1439
  # 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.
1148
1440
  attr_accessor :add_invoice_items
1149
1441
  # 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).
@@ -1180,6 +1472,8 @@ module Stripe
1180
1472
  attr_accessor :metadata
1181
1473
  # The account on behalf of which to charge, for each of the associated subscription's invoices.
1182
1474
  attr_accessor :on_behalf_of
1475
+ # 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).
1476
+ attr_accessor :pause_collection
1183
1477
  # Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
1184
1478
  attr_accessor :proration_behavior
1185
1479
  # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
@@ -1188,8 +1482,12 @@ module Stripe
1188
1482
  attr_accessor :transfer_data
1189
1483
  # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1190
1484
  attr_accessor :trial
1485
+ # Specify trial behavior when crossing phase boundaries
1486
+ attr_accessor :trial_continuation
1191
1487
  # 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`
1192
1488
  attr_accessor :trial_end
1489
+ # Settings related to subscription trials.
1490
+ attr_accessor :trial_settings
1193
1491
 
1194
1492
  def initialize(
1195
1493
  add_invoice_items: nil,
@@ -1210,11 +1508,14 @@ module Stripe
1210
1508
  iterations: nil,
1211
1509
  metadata: nil,
1212
1510
  on_behalf_of: nil,
1511
+ pause_collection: nil,
1213
1512
  proration_behavior: nil,
1214
1513
  start_date: nil,
1215
1514
  transfer_data: nil,
1216
1515
  trial: nil,
1217
- trial_end: nil
1516
+ trial_continuation: nil,
1517
+ trial_end: nil,
1518
+ trial_settings: nil
1218
1519
  )
1219
1520
  @add_invoice_items = add_invoice_items
1220
1521
  @application_fee_percent = application_fee_percent
@@ -1234,13 +1535,30 @@ module Stripe
1234
1535
  @iterations = iterations
1235
1536
  @metadata = metadata
1236
1537
  @on_behalf_of = on_behalf_of
1538
+ @pause_collection = pause_collection
1237
1539
  @proration_behavior = proration_behavior
1238
1540
  @start_date = start_date
1239
1541
  @transfer_data = transfer_data
1240
1542
  @trial = trial
1543
+ @trial_continuation = trial_continuation
1241
1544
  @trial_end = trial_end
1545
+ @trial_settings = trial_settings
1546
+ end
1547
+ end
1548
+
1549
+ class Prebilling < Stripe::RequestParams
1550
+ # This is used to determine the number of billing cycles to prebill.
1551
+ attr_accessor :iterations
1552
+ # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1553
+ attr_accessor :update_behavior
1554
+
1555
+ def initialize(iterations: nil, update_behavior: nil)
1556
+ @iterations = iterations
1557
+ @update_behavior = update_behavior
1242
1558
  end
1243
1559
  end
1560
+ # 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.
1561
+ attr_accessor :billing_behavior
1244
1562
  # Object representing the subscription schedule's default settings.
1245
1563
  attr_accessor :default_settings
1246
1564
  # 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.
@@ -1251,26 +1569,598 @@ module Stripe
1251
1569
  attr_accessor :metadata
1252
1570
  # 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.
1253
1571
  attr_accessor :phases
1572
+ # If specified, the invoicing for the given billing cycle iterations will be processed now.
1573
+ attr_accessor :prebilling
1254
1574
  # If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
1255
1575
  attr_accessor :proration_behavior
1256
1576
 
1257
1577
  def initialize(
1578
+ billing_behavior: nil,
1258
1579
  default_settings: nil,
1259
1580
  end_behavior: nil,
1260
1581
  expand: nil,
1261
1582
  metadata: nil,
1262
1583
  phases: nil,
1584
+ prebilling: nil,
1263
1585
  proration_behavior: nil
1264
1586
  )
1587
+ @billing_behavior = billing_behavior
1265
1588
  @default_settings = default_settings
1266
1589
  @end_behavior = end_behavior
1267
1590
  @expand = expand
1268
1591
  @metadata = metadata
1269
1592
  @phases = phases
1593
+ @prebilling = prebilling
1270
1594
  @proration_behavior = proration_behavior
1271
1595
  end
1272
1596
  end
1273
1597
 
1598
+ class AmendParams < Stripe::RequestParams
1599
+ class Amendment < Stripe::RequestParams
1600
+ class AmendmentEnd < Stripe::RequestParams
1601
+ class DiscountEnd < Stripe::RequestParams
1602
+ # The ID of a specific discount.
1603
+ attr_accessor :discount
1604
+
1605
+ def initialize(discount: nil)
1606
+ @discount = discount
1607
+ end
1608
+ end
1609
+
1610
+ class Duration < Stripe::RequestParams
1611
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1612
+ attr_accessor :interval
1613
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1614
+ attr_accessor :interval_count
1615
+
1616
+ def initialize(interval: nil, interval_count: nil)
1617
+ @interval = interval
1618
+ @interval_count = interval_count
1619
+ end
1620
+ end
1621
+ # Use the `end` time of a given discount.
1622
+ attr_accessor :discount_end
1623
+ # Time span for the amendment starting from the `amendment_start`.
1624
+ attr_accessor :duration
1625
+ # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
1626
+ attr_accessor :timestamp
1627
+ # Select one of three ways to pass the `amendment_end`.
1628
+ attr_accessor :type
1629
+
1630
+ def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
1631
+ @discount_end = discount_end
1632
+ @duration = duration
1633
+ @timestamp = timestamp
1634
+ @type = type
1635
+ end
1636
+ end
1637
+
1638
+ class AmendmentStart < Stripe::RequestParams
1639
+ class AmendmentEnd < Stripe::RequestParams
1640
+ # 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.
1641
+ attr_accessor :index
1642
+
1643
+ def initialize(index: nil)
1644
+ @index = index
1645
+ end
1646
+ end
1647
+
1648
+ class DiscountEnd < Stripe::RequestParams
1649
+ # The ID of a specific discount.
1650
+ attr_accessor :discount
1651
+
1652
+ def initialize(discount: nil)
1653
+ @discount = discount
1654
+ end
1655
+ end
1656
+ # Details of another amendment in the same array, immediately after which this amendment should begin.
1657
+ attr_accessor :amendment_end
1658
+ # Use the `end` time of a given discount.
1659
+ attr_accessor :discount_end
1660
+ # A precise Unix timestamp for the amendment to start.
1661
+ attr_accessor :timestamp
1662
+ # Select one of three ways to pass the `amendment_start`.
1663
+ attr_accessor :type
1664
+
1665
+ def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
1666
+ @amendment_end = amendment_end
1667
+ @discount_end = discount_end
1668
+ @timestamp = timestamp
1669
+ @type = type
1670
+ end
1671
+ end
1672
+
1673
+ class DiscountAction < Stripe::RequestParams
1674
+ class Add < Stripe::RequestParams
1675
+ class DiscountEnd < Stripe::RequestParams
1676
+ # The type of calculation made to determine when the discount ends.
1677
+ attr_accessor :type
1678
+
1679
+ def initialize(type: nil)
1680
+ @type = type
1681
+ end
1682
+ end
1683
+ # The coupon code to redeem.
1684
+ attr_accessor :coupon
1685
+ # An ID of an existing discount for a coupon that was already redeemed.
1686
+ attr_accessor :discount
1687
+ # Details to determine how long the discount should be applied for.
1688
+ attr_accessor :discount_end
1689
+ # 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.
1690
+ attr_accessor :index
1691
+ # The promotion code to redeem.
1692
+ attr_accessor :promotion_code
1693
+
1694
+ def initialize(
1695
+ coupon: nil,
1696
+ discount: nil,
1697
+ discount_end: nil,
1698
+ index: nil,
1699
+ promotion_code: nil
1700
+ )
1701
+ @coupon = coupon
1702
+ @discount = discount
1703
+ @discount_end = discount_end
1704
+ @index = index
1705
+ @promotion_code = promotion_code
1706
+ end
1707
+ end
1708
+
1709
+ class Remove < Stripe::RequestParams
1710
+ # The coupon code to remove from the `discounts` array.
1711
+ attr_accessor :coupon
1712
+ # The ID of a discount to remove from the `discounts` array.
1713
+ attr_accessor :discount
1714
+ # The ID of a promotion code to remove from the `discounts` array.
1715
+ attr_accessor :promotion_code
1716
+
1717
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1718
+ @coupon = coupon
1719
+ @discount = discount
1720
+ @promotion_code = promotion_code
1721
+ end
1722
+ end
1723
+
1724
+ class Set < Stripe::RequestParams
1725
+ # The coupon code to replace the `discounts` array with.
1726
+ attr_accessor :coupon
1727
+ # An ID of an existing discount to replace the `discounts` array with.
1728
+ attr_accessor :discount
1729
+ # An ID of an existing promotion code to replace the `discounts` array with.
1730
+ attr_accessor :promotion_code
1731
+
1732
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
1733
+ @coupon = coupon
1734
+ @discount = discount
1735
+ @promotion_code = promotion_code
1736
+ end
1737
+ end
1738
+ # Details of the discount to add.
1739
+ attr_accessor :add
1740
+ # Details of the discount to remove.
1741
+ attr_accessor :remove
1742
+ # Details of the discount to replace the existing discounts with.
1743
+ attr_accessor :set
1744
+ # Determines the type of discount action.
1745
+ attr_accessor :type
1746
+
1747
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
1748
+ @add = add
1749
+ @remove = remove
1750
+ @set = set
1751
+ @type = type
1752
+ end
1753
+ end
1754
+
1755
+ class ItemAction < Stripe::RequestParams
1756
+ class Add < Stripe::RequestParams
1757
+ class Discount < Stripe::RequestParams
1758
+ class DiscountEnd < Stripe::RequestParams
1759
+ class Duration < Stripe::RequestParams
1760
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1761
+ attr_accessor :interval
1762
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1763
+ attr_accessor :interval_count
1764
+
1765
+ def initialize(interval: nil, interval_count: nil)
1766
+ @interval = interval
1767
+ @interval_count = interval_count
1768
+ end
1769
+ end
1770
+ # Time span for the redeemed discount.
1771
+ attr_accessor :duration
1772
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1773
+ attr_accessor :timestamp
1774
+ # The type of calculation made to determine when the discount ends.
1775
+ attr_accessor :type
1776
+
1777
+ def initialize(duration: nil, timestamp: nil, type: nil)
1778
+ @duration = duration
1779
+ @timestamp = timestamp
1780
+ @type = type
1781
+ end
1782
+ end
1783
+ # ID of the coupon to create a new discount for.
1784
+ attr_accessor :coupon
1785
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1786
+ attr_accessor :discount
1787
+ # Details to determine how long the discount should be applied for.
1788
+ attr_accessor :discount_end
1789
+ # ID of the promotion code to create a new discount for.
1790
+ attr_accessor :promotion_code
1791
+
1792
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1793
+ @coupon = coupon
1794
+ @discount = discount
1795
+ @discount_end = discount_end
1796
+ @promotion_code = promotion_code
1797
+ end
1798
+ end
1799
+
1800
+ class Trial < Stripe::RequestParams
1801
+ # 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.
1802
+ attr_accessor :converts_to
1803
+ # Determines the type of trial for this item.
1804
+ attr_accessor :type
1805
+
1806
+ def initialize(converts_to: nil, type: nil)
1807
+ @converts_to = converts_to
1808
+ @type = type
1809
+ end
1810
+ end
1811
+ # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
1812
+ attr_accessor :discounts
1813
+ # 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`.
1814
+ attr_accessor :metadata
1815
+ # The ID of the price object.
1816
+ attr_accessor :price
1817
+ # Quantity for this item.
1818
+ attr_accessor :quantity
1819
+ # 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`.
1820
+ attr_accessor :tax_rates
1821
+ # Options that configure the trial on the subscription item.
1822
+ attr_accessor :trial
1823
+
1824
+ def initialize(
1825
+ discounts: nil,
1826
+ metadata: nil,
1827
+ price: nil,
1828
+ quantity: nil,
1829
+ tax_rates: nil,
1830
+ trial: nil
1831
+ )
1832
+ @discounts = discounts
1833
+ @metadata = metadata
1834
+ @price = price
1835
+ @quantity = quantity
1836
+ @tax_rates = tax_rates
1837
+ @trial = trial
1838
+ end
1839
+ end
1840
+
1841
+ class Remove < Stripe::RequestParams
1842
+ # ID of a price to remove.
1843
+ attr_accessor :price
1844
+
1845
+ def initialize(price: nil)
1846
+ @price = price
1847
+ end
1848
+ end
1849
+
1850
+ class Set < Stripe::RequestParams
1851
+ class Discount < Stripe::RequestParams
1852
+ class DiscountEnd < Stripe::RequestParams
1853
+ class Duration < Stripe::RequestParams
1854
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1855
+ attr_accessor :interval
1856
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1857
+ attr_accessor :interval_count
1858
+
1859
+ def initialize(interval: nil, interval_count: nil)
1860
+ @interval = interval
1861
+ @interval_count = interval_count
1862
+ end
1863
+ end
1864
+ # Time span for the redeemed discount.
1865
+ attr_accessor :duration
1866
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1867
+ attr_accessor :timestamp
1868
+ # The type of calculation made to determine when the discount ends.
1869
+ attr_accessor :type
1870
+
1871
+ def initialize(duration: nil, timestamp: nil, type: nil)
1872
+ @duration = duration
1873
+ @timestamp = timestamp
1874
+ @type = type
1875
+ end
1876
+ end
1877
+ # ID of the coupon to create a new discount for.
1878
+ attr_accessor :coupon
1879
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1880
+ attr_accessor :discount
1881
+ # Details to determine how long the discount should be applied for.
1882
+ attr_accessor :discount_end
1883
+ # ID of the promotion code to create a new discount for.
1884
+ attr_accessor :promotion_code
1885
+
1886
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1887
+ @coupon = coupon
1888
+ @discount = discount
1889
+ @discount_end = discount_end
1890
+ @promotion_code = promotion_code
1891
+ end
1892
+ end
1893
+
1894
+ class Trial < Stripe::RequestParams
1895
+ # 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.
1896
+ attr_accessor :converts_to
1897
+ # Determines the type of trial for this item.
1898
+ attr_accessor :type
1899
+
1900
+ def initialize(converts_to: nil, type: nil)
1901
+ @converts_to = converts_to
1902
+ @type = type
1903
+ end
1904
+ end
1905
+ # 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`.
1906
+ attr_accessor :discounts
1907
+ # 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`.
1908
+ attr_accessor :metadata
1909
+ # The ID of the price object.
1910
+ attr_accessor :price
1911
+ # 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`.
1912
+ attr_accessor :quantity
1913
+ # 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`.
1914
+ attr_accessor :tax_rates
1915
+ # 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`.
1916
+ attr_accessor :trial
1917
+
1918
+ def initialize(
1919
+ discounts: nil,
1920
+ metadata: nil,
1921
+ price: nil,
1922
+ quantity: nil,
1923
+ tax_rates: nil,
1924
+ trial: nil
1925
+ )
1926
+ @discounts = discounts
1927
+ @metadata = metadata
1928
+ @price = price
1929
+ @quantity = quantity
1930
+ @tax_rates = tax_rates
1931
+ @trial = trial
1932
+ end
1933
+ end
1934
+ # 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.
1935
+ attr_accessor :add
1936
+ # Details of the subscription item to remove.
1937
+ attr_accessor :remove
1938
+ # 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.
1939
+ attr_accessor :set
1940
+ # Determines the type of item action.
1941
+ attr_accessor :type
1942
+
1943
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
1944
+ @add = add
1945
+ @remove = remove
1946
+ @set = set
1947
+ @type = type
1948
+ end
1949
+ end
1950
+
1951
+ class MetadataAction < Stripe::RequestParams
1952
+ # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
1953
+ attr_accessor :add
1954
+ # Keys to remove from schedule phase metadata.
1955
+ attr_accessor :remove
1956
+ # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
1957
+ attr_accessor :set
1958
+ # Select one of three ways to update phase-level `metadata` on subscription schedules.
1959
+ attr_accessor :type
1960
+
1961
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
1962
+ @add = add
1963
+ @remove = remove
1964
+ @set = set
1965
+ @type = type
1966
+ end
1967
+ end
1968
+
1969
+ class SetPauseCollection < Stripe::RequestParams
1970
+ class Set < Stripe::RequestParams
1971
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1972
+ attr_accessor :behavior
1973
+
1974
+ def initialize(behavior: nil)
1975
+ @behavior = behavior
1976
+ end
1977
+ end
1978
+ # Details of the pause_collection behavior to apply to the amendment.
1979
+ attr_accessor :set
1980
+ # Determines the type of the pause_collection amendment.
1981
+ attr_accessor :type
1982
+
1983
+ def initialize(set: nil, type: nil)
1984
+ @set = set
1985
+ @type = type
1986
+ end
1987
+ end
1988
+
1989
+ class TrialSettings < Stripe::RequestParams
1990
+ class EndBehavior < Stripe::RequestParams
1991
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1992
+ attr_accessor :prorate_up_front
1993
+
1994
+ def initialize(prorate_up_front: nil)
1995
+ @prorate_up_front = prorate_up_front
1996
+ end
1997
+ end
1998
+ # Defines how the subscription should behave when a trial ends.
1999
+ attr_accessor :end_behavior
2000
+
2001
+ def initialize(end_behavior: nil)
2002
+ @end_behavior = end_behavior
2003
+ end
2004
+ end
2005
+ # 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.
2006
+ attr_accessor :amendment_end
2007
+ # Details to identify the earliest timestamp where the proposed change should take effect.
2008
+ attr_accessor :amendment_start
2009
+ # 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.
2010
+ attr_accessor :billing_cycle_anchor
2011
+ # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2012
+ attr_accessor :discount_actions
2013
+ # Changes to the subscription items during the amendment time span.
2014
+ attr_accessor :item_actions
2015
+ # Instructions for how to modify phase metadata
2016
+ attr_accessor :metadata_actions
2017
+ # 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`.
2018
+ attr_accessor :proration_behavior
2019
+ # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2020
+ attr_accessor :set_pause_collection
2021
+ # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2022
+ attr_accessor :set_schedule_end
2023
+ # Settings related to subscription trials.
2024
+ attr_accessor :trial_settings
2025
+
2026
+ def initialize(
2027
+ amendment_end: nil,
2028
+ amendment_start: nil,
2029
+ billing_cycle_anchor: nil,
2030
+ discount_actions: nil,
2031
+ item_actions: nil,
2032
+ metadata_actions: nil,
2033
+ proration_behavior: nil,
2034
+ set_pause_collection: nil,
2035
+ set_schedule_end: nil,
2036
+ trial_settings: nil
2037
+ )
2038
+ @amendment_end = amendment_end
2039
+ @amendment_start = amendment_start
2040
+ @billing_cycle_anchor = billing_cycle_anchor
2041
+ @discount_actions = discount_actions
2042
+ @item_actions = item_actions
2043
+ @metadata_actions = metadata_actions
2044
+ @proration_behavior = proration_behavior
2045
+ @set_pause_collection = set_pause_collection
2046
+ @set_schedule_end = set_schedule_end
2047
+ @trial_settings = trial_settings
2048
+ end
2049
+ end
2050
+
2051
+ class Prebilling < Stripe::RequestParams
2052
+ class BillFrom < Stripe::RequestParams
2053
+ class AmendmentStart < Stripe::RequestParams
2054
+ # 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.
2055
+ attr_accessor :index
2056
+
2057
+ def initialize(index: nil)
2058
+ @index = index
2059
+ end
2060
+ end
2061
+ # Start the prebilled period when a specified amendment begins.
2062
+ attr_accessor :amendment_start
2063
+ # Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2064
+ attr_accessor :timestamp
2065
+ # Select one of several ways to pass the `bill_from` value.
2066
+ attr_accessor :type
2067
+
2068
+ def initialize(amendment_start: nil, timestamp: nil, type: nil)
2069
+ @amendment_start = amendment_start
2070
+ @timestamp = timestamp
2071
+ @type = type
2072
+ end
2073
+ end
2074
+
2075
+ class BillUntil < Stripe::RequestParams
2076
+ class AmendmentEnd < Stripe::RequestParams
2077
+ # 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.
2078
+ attr_accessor :index
2079
+
2080
+ def initialize(index: nil)
2081
+ @index = index
2082
+ end
2083
+ end
2084
+
2085
+ class Duration < Stripe::RequestParams
2086
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2087
+ attr_accessor :interval
2088
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2089
+ attr_accessor :interval_count
2090
+
2091
+ def initialize(interval: nil, interval_count: nil)
2092
+ @interval = interval
2093
+ @interval_count = interval_count
2094
+ end
2095
+ end
2096
+ # End the prebilled period when a specified amendment ends.
2097
+ attr_accessor :amendment_end
2098
+ # Time span for prebilling, starting from `bill_from`.
2099
+ attr_accessor :duration
2100
+ # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2101
+ attr_accessor :timestamp
2102
+ # Select one of several ways to pass the `bill_until` value.
2103
+ attr_accessor :type
2104
+
2105
+ def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
2106
+ @amendment_end = amendment_end
2107
+ @duration = duration
2108
+ @timestamp = timestamp
2109
+ @type = type
2110
+ end
2111
+ end
2112
+ # The beginning of the prebilled time period. The default value is `now`.
2113
+ attr_accessor :bill_from
2114
+ # The end of the prebilled time period.
2115
+ attr_accessor :bill_until
2116
+ # When the prebilling invoice should be created. The default value is `now`.
2117
+ attr_accessor :invoice_at
2118
+ # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2119
+ attr_accessor :update_behavior
2120
+
2121
+ def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
2122
+ @bill_from = bill_from
2123
+ @bill_until = bill_until
2124
+ @invoice_at = invoice_at
2125
+ @update_behavior = update_behavior
2126
+ end
2127
+ end
2128
+
2129
+ class ScheduleSettings < Stripe::RequestParams
2130
+ # Behavior of the subscription schedule and underlying subscription when it ends.
2131
+ attr_accessor :end_behavior
2132
+
2133
+ def initialize(end_behavior: nil)
2134
+ @end_behavior = end_behavior
2135
+ end
2136
+ end
2137
+ # Changes to apply to the phases of the subscription schedule, in the order provided.
2138
+ attr_accessor :amendments
2139
+ # Specifies which fields in the response should be expanded.
2140
+ attr_accessor :expand
2141
+ # Provide any time periods to bill in advance.
2142
+ attr_accessor :prebilling
2143
+ # In cases where the amendment changes the currently active phase,
2144
+ # specifies if and how to prorate at the time of the request.
2145
+ attr_accessor :proration_behavior
2146
+ # Changes to apply to the subscription schedule.
2147
+ attr_accessor :schedule_settings
2148
+
2149
+ def initialize(
2150
+ amendments: nil,
2151
+ expand: nil,
2152
+ prebilling: nil,
2153
+ proration_behavior: nil,
2154
+ schedule_settings: nil
2155
+ )
2156
+ @amendments = amendments
2157
+ @expand = expand
2158
+ @prebilling = prebilling
2159
+ @proration_behavior = proration_behavior
2160
+ @schedule_settings = schedule_settings
2161
+ end
2162
+ end
2163
+
1274
2164
  class CancelParams < Stripe::RequestParams
1275
2165
  # Specifies which fields in the response should be expanded.
1276
2166
  attr_accessor :expand
@@ -1298,6 +2188,17 @@ module Stripe
1298
2188
  end
1299
2189
  end
1300
2190
 
2191
+ # Amends an existing subscription schedule.
2192
+ def amend(schedule, params = {}, opts = {})
2193
+ request(
2194
+ method: :post,
2195
+ path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
2196
+ params: params,
2197
+ opts: opts,
2198
+ base_address: :api
2199
+ )
2200
+ end
2201
+
1301
2202
  # 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.
1302
2203
  def cancel(schedule, params = {}, opts = {})
1303
2204
  request(