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
@@ -1,2154 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- # typed: true
5
- module Stripe
6
- # Subscriptions allow you to charge a customer on a recurring basis.
7
- #
8
- # Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating)
9
- class Subscription < APIResource
10
- class AutomaticTax < Stripe::StripeObject
11
- class Liability < Stripe::StripeObject
12
- # The connected account being referenced when `type` is `account`.
13
- sig { returns(T.any(String, Stripe::Account)) }
14
- attr_reader :account
15
- # Type of the account referenced.
16
- sig { returns(String) }
17
- attr_reader :type
18
- end
19
- # If Stripe disabled automatic tax, this enum describes why.
20
- sig { returns(T.nilable(String)) }
21
- attr_reader :disabled_reason
22
- # Whether Stripe automatically computes tax on this subscription.
23
- sig { returns(T::Boolean) }
24
- attr_reader :enabled
25
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
26
- sig { returns(T.nilable(Liability)) }
27
- attr_reader :liability
28
- end
29
- class BillingCycleAnchorConfig < Stripe::StripeObject
30
- # The day of the month of the billing_cycle_anchor.
31
- sig { returns(Integer) }
32
- attr_reader :day_of_month
33
- # The hour of the day of the billing_cycle_anchor.
34
- sig { returns(T.nilable(Integer)) }
35
- attr_reader :hour
36
- # The minute of the hour of the billing_cycle_anchor.
37
- sig { returns(T.nilable(Integer)) }
38
- attr_reader :minute
39
- # The month to start full cycle billing periods.
40
- sig { returns(T.nilable(Integer)) }
41
- attr_reader :month
42
- # The second of the minute of the billing_cycle_anchor.
43
- sig { returns(T.nilable(Integer)) }
44
- attr_reader :second
45
- end
46
- class BillingMode < Stripe::StripeObject
47
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
48
- sig { returns(String) }
49
- attr_reader :type
50
- # Details on when the current billing_mode was adopted.
51
- sig { returns(Integer) }
52
- attr_reader :updated_at
53
- end
54
- class BillingThresholds < Stripe::StripeObject
55
- # Monetary threshold that triggers the subscription to create an invoice
56
- sig { returns(T.nilable(Integer)) }
57
- attr_reader :amount_gte
58
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
59
- sig { returns(T.nilable(T::Boolean)) }
60
- attr_reader :reset_billing_cycle_anchor
61
- end
62
- class CancellationDetails < Stripe::StripeObject
63
- # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
64
- sig { returns(T.nilable(String)) }
65
- attr_reader :comment
66
- # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
67
- sig { returns(T.nilable(String)) }
68
- attr_reader :feedback
69
- # Why this subscription was canceled.
70
- sig { returns(T.nilable(String)) }
71
- attr_reader :reason
72
- end
73
- class InvoiceSettings < Stripe::StripeObject
74
- class Issuer < Stripe::StripeObject
75
- # The connected account being referenced when `type` is `account`.
76
- sig { returns(T.any(String, Stripe::Account)) }
77
- attr_reader :account
78
- # Type of the account referenced.
79
- sig { returns(String) }
80
- attr_reader :type
81
- end
82
- # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
83
- sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
84
- attr_reader :account_tax_ids
85
- # Attribute for field issuer
86
- sig { returns(Issuer) }
87
- attr_reader :issuer
88
- end
89
- class PauseCollection < Stripe::StripeObject
90
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
91
- sig { returns(String) }
92
- attr_reader :behavior
93
- # The time after which the subscription will resume collecting payments.
94
- sig { returns(T.nilable(Integer)) }
95
- attr_reader :resumes_at
96
- end
97
- class PaymentSettings < Stripe::StripeObject
98
- class PaymentMethodOptions < Stripe::StripeObject
99
- class AcssDebit < Stripe::StripeObject
100
- class MandateOptions < Stripe::StripeObject
101
- # Transaction type of the mandate.
102
- sig { returns(T.nilable(String)) }
103
- attr_reader :transaction_type
104
- end
105
- # Attribute for field mandate_options
106
- sig { returns(MandateOptions) }
107
- attr_reader :mandate_options
108
- # Bank account verification method.
109
- sig { returns(String) }
110
- attr_reader :verification_method
111
- end
112
- class Bancontact < Stripe::StripeObject
113
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
114
- sig { returns(String) }
115
- attr_reader :preferred_language
116
- end
117
- class Card < Stripe::StripeObject
118
- class MandateOptions < Stripe::StripeObject
119
- # Amount to be charged for future payments.
120
- sig { returns(T.nilable(Integer)) }
121
- attr_reader :amount
122
- # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
123
- sig { returns(T.nilable(String)) }
124
- attr_reader :amount_type
125
- # A description of the mandate or subscription that is meant to be displayed to the customer.
126
- sig { returns(T.nilable(String)) }
127
- attr_reader :description
128
- end
129
- # Attribute for field mandate_options
130
- sig { returns(MandateOptions) }
131
- attr_reader :mandate_options
132
- # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
133
- sig { returns(T.nilable(String)) }
134
- attr_reader :network
135
- # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
136
- sig { returns(T.nilable(String)) }
137
- attr_reader :request_three_d_secure
138
- end
139
- class CustomerBalance < Stripe::StripeObject
140
- class BankTransfer < Stripe::StripeObject
141
- class EuBankTransfer < Stripe::StripeObject
142
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
143
- sig { returns(String) }
144
- attr_reader :country
145
- end
146
- # Attribute for field eu_bank_transfer
147
- sig { returns(EuBankTransfer) }
148
- attr_reader :eu_bank_transfer
149
- # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
150
- sig { returns(T.nilable(String)) }
151
- attr_reader :type
152
- end
153
- # Attribute for field bank_transfer
154
- sig { returns(BankTransfer) }
155
- attr_reader :bank_transfer
156
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
157
- sig { returns(T.nilable(String)) }
158
- attr_reader :funding_type
159
- end
160
- class Konbini < Stripe::StripeObject; end
161
- class SepaDebit < Stripe::StripeObject; end
162
- class UsBankAccount < Stripe::StripeObject
163
- class FinancialConnections < Stripe::StripeObject
164
- class Filters < Stripe::StripeObject
165
- # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
166
- sig { returns(T::Array[String]) }
167
- attr_reader :account_subcategories
168
- end
169
- # Attribute for field filters
170
- sig { returns(Filters) }
171
- attr_reader :filters
172
- # The list of permissions to request. The `payment_method` permission must be included.
173
- sig { returns(T::Array[String]) }
174
- attr_reader :permissions
175
- # Data features requested to be retrieved upon account creation.
176
- sig { returns(T.nilable(T::Array[String])) }
177
- attr_reader :prefetch
178
- end
179
- # Attribute for field financial_connections
180
- sig { returns(FinancialConnections) }
181
- attr_reader :financial_connections
182
- # Bank account verification method.
183
- sig { returns(String) }
184
- attr_reader :verification_method
185
- end
186
- # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.
187
- sig { returns(T.nilable(AcssDebit)) }
188
- attr_reader :acss_debit
189
- # This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.
190
- sig { returns(T.nilable(Bancontact)) }
191
- attr_reader :bancontact
192
- # This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.
193
- sig { returns(T.nilable(Card)) }
194
- attr_reader :card
195
- # This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.
196
- sig { returns(T.nilable(CustomerBalance)) }
197
- attr_reader :customer_balance
198
- # This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.
199
- sig { returns(T.nilable(Konbini)) }
200
- attr_reader :konbini
201
- # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription.
202
- sig { returns(T.nilable(SepaDebit)) }
203
- attr_reader :sepa_debit
204
- # This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.
205
- sig { returns(T.nilable(UsBankAccount)) }
206
- attr_reader :us_bank_account
207
- end
208
- # Payment-method-specific configuration to provide to invoices created by the subscription.
209
- sig { returns(T.nilable(PaymentMethodOptions)) }
210
- attr_reader :payment_method_options
211
- # The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
212
- sig { returns(T.nilable(T::Array[String])) }
213
- attr_reader :payment_method_types
214
- # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`.
215
- sig { returns(T.nilable(String)) }
216
- attr_reader :save_default_payment_method
217
- end
218
- class PendingInvoiceItemInterval < Stripe::StripeObject
219
- # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
220
- sig { returns(String) }
221
- attr_reader :interval
222
- # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
223
- sig { returns(Integer) }
224
- attr_reader :interval_count
225
- end
226
- class PendingUpdate < Stripe::StripeObject
227
- # If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.
228
- sig { returns(T.nilable(Integer)) }
229
- attr_reader :billing_cycle_anchor
230
- # The point after which the changes reflected by this update will be discarded and no longer applied.
231
- sig { returns(Integer) }
232
- attr_reader :expires_at
233
- # List of subscription items, each with an attached plan, that will be set if the update is applied.
234
- sig { returns(T.nilable(T::Array[Stripe::SubscriptionItem])) }
235
- attr_reader :subscription_items
236
- # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied.
237
- sig { returns(T.nilable(Integer)) }
238
- attr_reader :trial_end
239
- # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
240
- sig { returns(T.nilable(T::Boolean)) }
241
- attr_reader :trial_from_plan
242
- end
243
- class TransferData < Stripe::StripeObject
244
- # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
245
- sig { returns(T.nilable(Float)) }
246
- attr_reader :amount_percent
247
- # The account where funds from the payment will be transferred to upon payment success.
248
- sig { returns(T.any(String, Stripe::Account)) }
249
- attr_reader :destination
250
- end
251
- class TrialSettings < Stripe::StripeObject
252
- class EndBehavior < Stripe::StripeObject
253
- # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
254
- sig { returns(String) }
255
- attr_reader :missing_payment_method
256
- end
257
- # Defines how a subscription behaves when a free trial ends.
258
- sig { returns(EndBehavior) }
259
- attr_reader :end_behavior
260
- end
261
- # ID of the Connect Application that created the subscription.
262
- sig { returns(T.nilable(T.any(String, Stripe::Application))) }
263
- attr_reader :application
264
- # 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.
265
- sig { returns(T.nilable(Float)) }
266
- attr_reader :application_fee_percent
267
- # Attribute for field automatic_tax
268
- sig { returns(AutomaticTax) }
269
- attr_reader :automatic_tax
270
- # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.
271
- sig { returns(Integer) }
272
- attr_reader :billing_cycle_anchor
273
- # The fixed values used to calculate the `billing_cycle_anchor`.
274
- sig { returns(T.nilable(BillingCycleAnchorConfig)) }
275
- attr_reader :billing_cycle_anchor_config
276
- # The billing mode of the subscription.
277
- sig { returns(BillingMode) }
278
- attr_reader :billing_mode
279
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
280
- sig { returns(T.nilable(BillingThresholds)) }
281
- attr_reader :billing_thresholds
282
- # A date in the future at which the subscription will automatically get canceled
283
- sig { returns(T.nilable(Integer)) }
284
- attr_reader :cancel_at
285
- # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.
286
- sig { returns(T::Boolean) }
287
- attr_reader :cancel_at_period_end
288
- # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
289
- sig { returns(T.nilable(Integer)) }
290
- attr_reader :canceled_at
291
- # Details about why this subscription was cancelled
292
- sig { returns(T.nilable(CancellationDetails)) }
293
- attr_reader :cancellation_details
294
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
295
- sig { returns(String) }
296
- attr_reader :collection_method
297
- # Time at which the object was created. Measured in seconds since the Unix epoch.
298
- sig { returns(Integer) }
299
- attr_reader :created
300
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
301
- sig { returns(String) }
302
- attr_reader :currency
303
- # ID of the customer who owns the subscription.
304
- sig { returns(T.any(String, Stripe::Customer)) }
305
- attr_reader :customer
306
- # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.
307
- sig { returns(T.nilable(Integer)) }
308
- attr_reader :days_until_due
309
- # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
310
- sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
311
- attr_reader :default_payment_method
312
- # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
313
- sig {
314
- returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))))
315
- }
316
- attr_reader :default_source
317
- # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
318
- sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
319
- attr_reader :default_tax_rates
320
- # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
321
- sig { returns(T.nilable(String)) }
322
- attr_reader :description
323
- # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
324
- sig { returns(T::Array[T.any(String, Stripe::Discount)]) }
325
- attr_reader :discounts
326
- # If the subscription has ended, the date the subscription ended.
327
- sig { returns(T.nilable(Integer)) }
328
- attr_reader :ended_at
329
- # Unique identifier for the object.
330
- sig { returns(String) }
331
- attr_reader :id
332
- # Attribute for field invoice_settings
333
- sig { returns(InvoiceSettings) }
334
- attr_reader :invoice_settings
335
- # List of subscription items, each with an attached price.
336
- sig { returns(Stripe::ListObject) }
337
- attr_reader :items
338
- # The most recent invoice this subscription has generated.
339
- sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
340
- attr_reader :latest_invoice
341
- # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
342
- sig { returns(T::Boolean) }
343
- attr_reader :livemode
344
- # 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.
345
- sig { returns(T::Hash[String, String]) }
346
- attr_reader :metadata
347
- # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.
348
- sig { returns(T.nilable(Integer)) }
349
- attr_reader :next_pending_invoice_item_invoice
350
- # String representing the object's type. Objects of the same type share the same value.
351
- sig { returns(String) }
352
- attr_reader :object
353
- # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the [Connect documentation](https://stripe.com/docs/connect/subscriptions#on-behalf-of) for details.
354
- sig { returns(T.nilable(T.any(String, Stripe::Account))) }
355
- attr_reader :on_behalf_of
356
- # 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).
357
- sig { returns(T.nilable(PauseCollection)) }
358
- attr_reader :pause_collection
359
- # Payment settings passed on to invoices created by the subscription.
360
- sig { returns(T.nilable(PaymentSettings)) }
361
- attr_reader :payment_settings
362
- # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
363
- sig { returns(T.nilable(PendingInvoiceItemInterval)) }
364
- attr_reader :pending_invoice_item_interval
365
- # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).
366
- sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) }
367
- attr_reader :pending_setup_intent
368
- # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.
369
- sig { returns(T.nilable(PendingUpdate)) }
370
- attr_reader :pending_update
371
- # The schedule attached to the subscription
372
- sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) }
373
- attr_reader :schedule
374
- # Date when the subscription was first created. The date might differ from the `created` date due to backdating.
375
- sig { returns(Integer) }
376
- attr_reader :start_date
377
- # Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`.
378
- #
379
- # For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated.
380
- #
381
- # A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.
382
- #
383
- # A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged.
384
- #
385
- # If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings).
386
- #
387
- # If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
388
- sig { returns(String) }
389
- attr_reader :status
390
- # ID of the test clock this subscription belongs to.
391
- sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
392
- attr_reader :test_clock
393
- # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
394
- sig { returns(T.nilable(TransferData)) }
395
- attr_reader :transfer_data
396
- # If the subscription has a trial, the end of that trial.
397
- sig { returns(T.nilable(Integer)) }
398
- attr_reader :trial_end
399
- # Settings related to subscription trials.
400
- sig { returns(T.nilable(TrialSettings)) }
401
- attr_reader :trial_settings
402
- # If the subscription has a trial, the beginning of that trial.
403
- sig { returns(T.nilable(Integer)) }
404
- attr_reader :trial_start
405
- class CancelParams < Stripe::RequestParams
406
- class CancellationDetails < Stripe::RequestParams
407
- # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
408
- sig { returns(T.nilable(String)) }
409
- attr_accessor :comment
410
- # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
411
- sig { returns(T.nilable(T.any(String, String))) }
412
- attr_accessor :feedback
413
- sig { params(comment: T.nilable(String), feedback: T.nilable(T.any(String, String))).void }
414
- def initialize(comment: nil, feedback: nil); end
415
- end
416
- # Details about why this subscription was cancelled
417
- sig { returns(T.nilable(::Stripe::Subscription::CancelParams::CancellationDetails)) }
418
- attr_accessor :cancellation_details
419
- # Specifies which fields in the response should be expanded.
420
- sig { returns(T.nilable(T::Array[String])) }
421
- attr_accessor :expand
422
- # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.
423
- sig { returns(T.nilable(T::Boolean)) }
424
- attr_accessor :invoice_now
425
- # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`.
426
- sig { returns(T.nilable(T::Boolean)) }
427
- attr_accessor :prorate
428
- sig {
429
- params(cancellation_details: T.nilable(::Stripe::Subscription::CancelParams::CancellationDetails), expand: T.nilable(T::Array[String]), invoice_now: T.nilable(T::Boolean), prorate: T.nilable(T::Boolean)).void
430
- }
431
- def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil); end
432
- end
433
- class UpdateParams < Stripe::RequestParams
434
- class AddInvoiceItem < Stripe::RequestParams
435
- class Discount < Stripe::RequestParams
436
- # ID of the coupon to create a new discount for.
437
- sig { returns(T.nilable(String)) }
438
- attr_accessor :coupon
439
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
440
- sig { returns(T.nilable(String)) }
441
- attr_accessor :discount
442
- # ID of the promotion code to create a new discount for.
443
- sig { returns(T.nilable(String)) }
444
- attr_accessor :promotion_code
445
- sig {
446
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
447
- }
448
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
449
- end
450
- class Period < Stripe::RequestParams
451
- class End < Stripe::RequestParams
452
- # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
453
- sig { returns(T.nilable(Integer)) }
454
- attr_accessor :timestamp
455
- # Select how to calculate the end of the invoice item period.
456
- sig { returns(String) }
457
- attr_accessor :type
458
- sig { params(timestamp: T.nilable(Integer), type: String).void }
459
- def initialize(timestamp: nil, type: nil); end
460
- end
461
- class Start < Stripe::RequestParams
462
- # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
463
- sig { returns(T.nilable(Integer)) }
464
- attr_accessor :timestamp
465
- # Select how to calculate the start of the invoice item period.
466
- sig { returns(String) }
467
- attr_accessor :type
468
- sig { params(timestamp: T.nilable(Integer), type: String).void }
469
- def initialize(timestamp: nil, type: nil); end
470
- end
471
- # End of the invoice item period.
472
- sig { returns(::Stripe::Subscription::UpdateParams::AddInvoiceItem::Period::End) }
473
- attr_accessor :end
474
- # Start of the invoice item period.
475
- sig { returns(::Stripe::Subscription::UpdateParams::AddInvoiceItem::Period::Start) }
476
- attr_accessor :start
477
- sig {
478
- params(end_: ::Stripe::Subscription::UpdateParams::AddInvoiceItem::Period::End, start: ::Stripe::Subscription::UpdateParams::AddInvoiceItem::Period::Start).void
479
- }
480
- def initialize(end_: nil, start: nil); end
481
- end
482
- class PriceData < Stripe::RequestParams
483
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
484
- sig { returns(String) }
485
- attr_accessor :currency
486
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
487
- sig { returns(String) }
488
- attr_accessor :product
489
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
490
- sig { returns(T.nilable(String)) }
491
- attr_accessor :tax_behavior
492
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
493
- sig { returns(T.nilable(Integer)) }
494
- attr_accessor :unit_amount
495
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
496
- sig { returns(T.nilable(String)) }
497
- attr_accessor :unit_amount_decimal
498
- sig {
499
- params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
500
- }
501
- def initialize(
502
- currency: nil,
503
- product: nil,
504
- tax_behavior: nil,
505
- unit_amount: nil,
506
- unit_amount_decimal: nil
507
- ); end
508
- end
509
- # The coupons to redeem into discounts for the item.
510
- sig {
511
- returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount]))
512
- }
513
- attr_accessor :discounts
514
- # 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`.
515
- sig { returns(T.nilable(T::Hash[String, String])) }
516
- attr_accessor :metadata
517
- # The period associated with this invoice item. Defaults to the current period of the subscription.
518
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::AddInvoiceItem::Period)) }
519
- attr_accessor :period
520
- # The ID of the price object. One of `price` or `price_data` is required.
521
- sig { returns(T.nilable(String)) }
522
- attr_accessor :price
523
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
524
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::AddInvoiceItem::PriceData)) }
525
- attr_accessor :price_data
526
- # Quantity for this item. Defaults to 1.
527
- sig { returns(T.nilable(Integer)) }
528
- attr_accessor :quantity
529
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
530
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
531
- attr_accessor :tax_rates
532
- sig {
533
- params(discounts: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount]), metadata: T.nilable(T::Hash[String, String]), period: T.nilable(::Stripe::Subscription::UpdateParams::AddInvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::UpdateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
534
- }
535
- def initialize(
536
- discounts: nil,
537
- metadata: nil,
538
- period: nil,
539
- price: nil,
540
- price_data: nil,
541
- quantity: nil,
542
- tax_rates: nil
543
- ); end
544
- end
545
- class AutomaticTax < Stripe::RequestParams
546
- class Liability < Stripe::RequestParams
547
- # The connected account being referenced when `type` is `account`.
548
- sig { returns(T.nilable(String)) }
549
- attr_accessor :account
550
- # Type of the account referenced in the request.
551
- sig { returns(String) }
552
- attr_accessor :type
553
- sig { params(account: T.nilable(String), type: String).void }
554
- def initialize(account: nil, type: nil); end
555
- end
556
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
557
- sig { returns(T::Boolean) }
558
- attr_accessor :enabled
559
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
560
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax::Liability)) }
561
- attr_accessor :liability
562
- sig {
563
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax::Liability)).void
564
- }
565
- def initialize(enabled: nil, liability: nil); end
566
- end
567
- class BillingThresholds < Stripe::RequestParams
568
- # Monetary threshold that triggers the subscription to advance to a new billing period
569
- sig { returns(T.nilable(Integer)) }
570
- attr_accessor :amount_gte
571
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
572
- sig { returns(T.nilable(T::Boolean)) }
573
- attr_accessor :reset_billing_cycle_anchor
574
- sig {
575
- params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
576
- }
577
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
578
- end
579
- class CancellationDetails < Stripe::RequestParams
580
- # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
581
- sig { returns(T.nilable(String)) }
582
- attr_accessor :comment
583
- # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
584
- sig { returns(T.nilable(T.any(String, String))) }
585
- attr_accessor :feedback
586
- sig { params(comment: T.nilable(String), feedback: T.nilable(T.any(String, String))).void }
587
- def initialize(comment: nil, feedback: nil); end
588
- end
589
- class Discount < Stripe::RequestParams
590
- # ID of the coupon to create a new discount for.
591
- sig { returns(T.nilable(String)) }
592
- attr_accessor :coupon
593
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
594
- sig { returns(T.nilable(String)) }
595
- attr_accessor :discount
596
- # ID of the promotion code to create a new discount for.
597
- sig { returns(T.nilable(String)) }
598
- attr_accessor :promotion_code
599
- sig {
600
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
601
- }
602
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
603
- end
604
- class InvoiceSettings < Stripe::RequestParams
605
- class Issuer < Stripe::RequestParams
606
- # The connected account being referenced when `type` is `account`.
607
- sig { returns(T.nilable(String)) }
608
- attr_accessor :account
609
- # Type of the account referenced in the request.
610
- sig { returns(String) }
611
- attr_accessor :type
612
- sig { params(account: T.nilable(String), type: String).void }
613
- def initialize(account: nil, type: nil); end
614
- end
615
- # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
616
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
617
- attr_accessor :account_tax_ids
618
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
619
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer)) }
620
- attr_accessor :issuer
621
- sig {
622
- params(account_tax_ids: T.nilable(T.any(String, T::Array[String])), issuer: T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer)).void
623
- }
624
- def initialize(account_tax_ids: nil, issuer: nil); end
625
- end
626
- class Item < Stripe::RequestParams
627
- class BillingThresholds < Stripe::RequestParams
628
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
629
- sig { returns(Integer) }
630
- attr_accessor :usage_gte
631
- sig { params(usage_gte: Integer).void }
632
- def initialize(usage_gte: nil); end
633
- end
634
- class Discount < Stripe::RequestParams
635
- # ID of the coupon to create a new discount for.
636
- sig { returns(T.nilable(String)) }
637
- attr_accessor :coupon
638
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
639
- sig { returns(T.nilable(String)) }
640
- attr_accessor :discount
641
- # ID of the promotion code to create a new discount for.
642
- sig { returns(T.nilable(String)) }
643
- attr_accessor :promotion_code
644
- sig {
645
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
646
- }
647
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
648
- end
649
- class PriceData < Stripe::RequestParams
650
- class Recurring < Stripe::RequestParams
651
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
652
- sig { returns(String) }
653
- attr_accessor :interval
654
- # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
655
- sig { returns(T.nilable(Integer)) }
656
- attr_accessor :interval_count
657
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
658
- def initialize(interval: nil, interval_count: nil); end
659
- end
660
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
661
- sig { returns(String) }
662
- attr_accessor :currency
663
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
664
- sig { returns(String) }
665
- attr_accessor :product
666
- # The recurring components of a price such as `interval` and `interval_count`.
667
- sig { returns(::Stripe::Subscription::UpdateParams::Item::PriceData::Recurring) }
668
- attr_accessor :recurring
669
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
670
- sig { returns(T.nilable(String)) }
671
- attr_accessor :tax_behavior
672
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
673
- sig { returns(T.nilable(Integer)) }
674
- attr_accessor :unit_amount
675
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
676
- sig { returns(T.nilable(String)) }
677
- attr_accessor :unit_amount_decimal
678
- sig {
679
- params(currency: String, product: String, recurring: ::Stripe::Subscription::UpdateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
680
- }
681
- def initialize(
682
- currency: nil,
683
- product: nil,
684
- recurring: nil,
685
- tax_behavior: nil,
686
- unit_amount: nil,
687
- unit_amount_decimal: nil
688
- ); end
689
- end
690
- # 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.
691
- sig {
692
- returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::Item::BillingThresholds)))
693
- }
694
- attr_accessor :billing_thresholds
695
- # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
696
- sig { returns(T.nilable(T::Boolean)) }
697
- attr_accessor :clear_usage
698
- # A flag that, if set to `true`, will delete the specified item.
699
- sig { returns(T.nilable(T::Boolean)) }
700
- attr_accessor :deleted
701
- # The coupons to redeem into discounts for the subscription item.
702
- sig {
703
- returns(T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Item::Discount])))
704
- }
705
- attr_accessor :discounts
706
- # Subscription item to update.
707
- sig { returns(T.nilable(String)) }
708
- attr_accessor :id
709
- # 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`.
710
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
711
- attr_accessor :metadata
712
- # Plan ID for this item, as a string.
713
- sig { returns(T.nilable(String)) }
714
- attr_accessor :plan
715
- # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
716
- sig { returns(T.nilable(String)) }
717
- attr_accessor :price
718
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
719
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::Item::PriceData)) }
720
- attr_accessor :price_data
721
- # Quantity for this item.
722
- sig { returns(T.nilable(Integer)) }
723
- attr_accessor :quantity
724
- # 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.
725
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
726
- attr_accessor :tax_rates
727
- sig {
728
- params(billing_thresholds: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::Item::BillingThresholds)), clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Item::Discount])), id: T.nilable(String), metadata: T.nilable(T.any(String, T::Hash[String, String])), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::UpdateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
729
- }
730
- def initialize(
731
- billing_thresholds: nil,
732
- clear_usage: nil,
733
- deleted: nil,
734
- discounts: nil,
735
- id: nil,
736
- metadata: nil,
737
- plan: nil,
738
- price: nil,
739
- price_data: nil,
740
- quantity: nil,
741
- tax_rates: nil
742
- ); end
743
- end
744
- class PauseCollection < Stripe::RequestParams
745
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
746
- sig { returns(String) }
747
- attr_accessor :behavior
748
- # The time after which the subscription will resume collecting payments.
749
- sig { returns(T.nilable(Integer)) }
750
- attr_accessor :resumes_at
751
- sig { params(behavior: String, resumes_at: T.nilable(Integer)).void }
752
- def initialize(behavior: nil, resumes_at: nil); end
753
- end
754
- class PaymentSettings < Stripe::RequestParams
755
- class PaymentMethodOptions < Stripe::RequestParams
756
- class AcssDebit < Stripe::RequestParams
757
- class MandateOptions < Stripe::RequestParams
758
- # Transaction type of the mandate.
759
- sig { returns(T.nilable(String)) }
760
- attr_accessor :transaction_type
761
- sig { params(transaction_type: T.nilable(String)).void }
762
- def initialize(transaction_type: nil); end
763
- end
764
- # Additional fields for Mandate creation
765
- sig {
766
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
767
- }
768
- attr_accessor :mandate_options
769
- # Verification method for the intent
770
- sig { returns(T.nilable(String)) }
771
- attr_accessor :verification_method
772
- sig {
773
- params(mandate_options: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
774
- }
775
- def initialize(mandate_options: nil, verification_method: nil); end
776
- end
777
- class Bancontact < Stripe::RequestParams
778
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
779
- sig { returns(T.nilable(String)) }
780
- attr_accessor :preferred_language
781
- sig { params(preferred_language: T.nilable(String)).void }
782
- def initialize(preferred_language: nil); end
783
- end
784
- class Card < Stripe::RequestParams
785
- class MandateOptions < Stripe::RequestParams
786
- # Amount to be charged for future payments.
787
- sig { returns(T.nilable(Integer)) }
788
- attr_accessor :amount
789
- # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
790
- sig { returns(T.nilable(String)) }
791
- attr_accessor :amount_type
792
- # A description of the mandate or subscription that is meant to be displayed to the customer.
793
- sig { returns(T.nilable(String)) }
794
- attr_accessor :description
795
- sig {
796
- params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
797
- }
798
- def initialize(amount: nil, amount_type: nil, description: nil); end
799
- end
800
- # Configuration options for setting up an eMandate for cards issued in India.
801
- sig {
802
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
803
- }
804
- attr_accessor :mandate_options
805
- # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
806
- sig { returns(T.nilable(String)) }
807
- attr_accessor :network
808
- # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
809
- sig { returns(T.nilable(String)) }
810
- attr_accessor :request_three_d_secure
811
- sig {
812
- params(mandate_options: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
813
- }
814
- def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
815
- end
816
- class CustomerBalance < Stripe::RequestParams
817
- class BankTransfer < Stripe::RequestParams
818
- class EuBankTransfer < Stripe::RequestParams
819
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
820
- sig { returns(String) }
821
- attr_accessor :country
822
- sig { params(country: String).void }
823
- def initialize(country: nil); end
824
- end
825
- # Configuration for eu_bank_transfer funding type.
826
- sig {
827
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
828
- }
829
- attr_accessor :eu_bank_transfer
830
- # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
831
- sig { returns(T.nilable(String)) }
832
- attr_accessor :type
833
- sig {
834
- params(eu_bank_transfer: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
835
- }
836
- def initialize(eu_bank_transfer: nil, type: nil); end
837
- end
838
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
839
- sig {
840
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
841
- }
842
- attr_accessor :bank_transfer
843
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
844
- sig { returns(T.nilable(String)) }
845
- attr_accessor :funding_type
846
- sig {
847
- params(bank_transfer: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
848
- }
849
- def initialize(bank_transfer: nil, funding_type: nil); end
850
- end
851
- class Konbini < Stripe::RequestParams; end
852
- class SepaDebit < Stripe::RequestParams; end
853
- class UsBankAccount < Stripe::RequestParams
854
- class FinancialConnections < Stripe::RequestParams
855
- class Filters < Stripe::RequestParams
856
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
857
- sig { returns(T.nilable(T::Array[String])) }
858
- attr_accessor :account_subcategories
859
- sig { params(account_subcategories: T.nilable(T::Array[String])).void }
860
- def initialize(account_subcategories: nil); end
861
- end
862
- # Provide filters for the linked accounts that the customer can select for the payment method.
863
- sig {
864
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
865
- }
866
- attr_accessor :filters
867
- # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
868
- sig { returns(T.nilable(T::Array[String])) }
869
- attr_accessor :permissions
870
- # List of data features that you would like to retrieve upon account creation.
871
- sig { returns(T.nilable(T::Array[String])) }
872
- attr_accessor :prefetch
873
- sig {
874
- params(filters: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
875
- }
876
- def initialize(filters: nil, permissions: nil, prefetch: nil); end
877
- end
878
- # Additional fields for Financial Connections Session creation
879
- sig {
880
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
881
- }
882
- attr_accessor :financial_connections
883
- # Verification method for the intent
884
- sig { returns(T.nilable(String)) }
885
- attr_accessor :verification_method
886
- sig {
887
- params(financial_connections: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
888
- }
889
- def initialize(financial_connections: nil, verification_method: nil); end
890
- end
891
- # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
892
- sig {
893
- returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)))
894
- }
895
- attr_accessor :acss_debit
896
- # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
897
- sig {
898
- returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact)))
899
- }
900
- attr_accessor :bancontact
901
- # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
902
- sig {
903
- returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card)))
904
- }
905
- attr_accessor :card
906
- # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
907
- sig {
908
- returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)))
909
- }
910
- attr_accessor :customer_balance
911
- # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
912
- sig {
913
- returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini)))
914
- }
915
- attr_accessor :konbini
916
- # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
917
- sig {
918
- returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)))
919
- }
920
- attr_accessor :sepa_debit
921
- # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
922
- sig {
923
- returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))
924
- }
925
- attr_accessor :us_bank_account
926
- sig {
927
- params(acss_debit: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)), bancontact: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact)), card: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card)), customer_balance: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)), konbini: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini)), sepa_debit: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)), us_bank_account: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))).void
928
- }
929
- def initialize(
930
- acss_debit: nil,
931
- bancontact: nil,
932
- card: nil,
933
- customer_balance: nil,
934
- konbini: nil,
935
- sepa_debit: nil,
936
- us_bank_account: nil
937
- ); end
938
- end
939
- # Payment-method-specific configuration to provide to invoices created by the subscription.
940
- sig {
941
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions))
942
- }
943
- attr_accessor :payment_method_options
944
- # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
945
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
946
- attr_accessor :payment_method_types
947
- # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
948
- sig { returns(T.nilable(String)) }
949
- attr_accessor :save_default_payment_method
950
- sig {
951
- params(payment_method_options: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.any(String, T::Array[String])), save_default_payment_method: T.nilable(String)).void
952
- }
953
- def initialize(
954
- payment_method_options: nil,
955
- payment_method_types: nil,
956
- save_default_payment_method: nil
957
- ); end
958
- end
959
- class PendingInvoiceItemInterval < Stripe::RequestParams
960
- # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
961
- sig { returns(String) }
962
- attr_accessor :interval
963
- # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
964
- sig { returns(T.nilable(Integer)) }
965
- attr_accessor :interval_count
966
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
967
- def initialize(interval: nil, interval_count: nil); end
968
- end
969
- class TransferData < Stripe::RequestParams
970
- # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
971
- sig { returns(T.nilable(Float)) }
972
- attr_accessor :amount_percent
973
- # ID of an existing, connected Stripe account.
974
- sig { returns(String) }
975
- attr_accessor :destination
976
- sig { params(amount_percent: T.nilable(Float), destination: String).void }
977
- def initialize(amount_percent: nil, destination: nil); end
978
- end
979
- class TrialSettings < Stripe::RequestParams
980
- class EndBehavior < Stripe::RequestParams
981
- # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
982
- sig { returns(String) }
983
- attr_accessor :missing_payment_method
984
- sig { params(missing_payment_method: String).void }
985
- def initialize(missing_payment_method: nil); end
986
- end
987
- # Defines how the subscription should behave when the user's free trial ends.
988
- sig { returns(::Stripe::Subscription::UpdateParams::TrialSettings::EndBehavior) }
989
- attr_accessor :end_behavior
990
- sig {
991
- params(end_behavior: ::Stripe::Subscription::UpdateParams::TrialSettings::EndBehavior).void
992
- }
993
- def initialize(end_behavior: nil); end
994
- end
995
- # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
996
- sig { returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem])) }
997
- attr_accessor :add_invoice_items
998
- # 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).
999
- sig { returns(T.nilable(T.any(String, Float))) }
1000
- attr_accessor :application_fee_percent
1001
- # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
1002
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax)) }
1003
- attr_accessor :automatic_tax
1004
- # Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
1005
- sig { returns(T.nilable(String)) }
1006
- attr_accessor :billing_cycle_anchor
1007
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
1008
- sig {
1009
- returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::BillingThresholds)))
1010
- }
1011
- attr_accessor :billing_thresholds
1012
- # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
1013
- sig { returns(T.nilable(T.any(String, T.any(Integer, String)))) }
1014
- attr_accessor :cancel_at
1015
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1016
- sig { returns(T.nilable(T::Boolean)) }
1017
- attr_accessor :cancel_at_period_end
1018
- # Details about why this subscription was cancelled
1019
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::CancellationDetails)) }
1020
- attr_accessor :cancellation_details
1021
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
1022
- sig { returns(T.nilable(String)) }
1023
- attr_accessor :collection_method
1024
- # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
1025
- sig { returns(T.nilable(Integer)) }
1026
- attr_accessor :days_until_due
1027
- # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
1028
- sig { returns(T.nilable(String)) }
1029
- attr_accessor :default_payment_method
1030
- # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
1031
- sig { returns(T.nilable(String)) }
1032
- attr_accessor :default_source
1033
- # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates.
1034
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1035
- attr_accessor :default_tax_rates
1036
- # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1037
- sig { returns(T.nilable(String)) }
1038
- attr_accessor :description
1039
- # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
1040
- sig {
1041
- returns(T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Discount])))
1042
- }
1043
- attr_accessor :discounts
1044
- # Specifies which fields in the response should be expanded.
1045
- sig { returns(T.nilable(T::Array[String])) }
1046
- attr_accessor :expand
1047
- # All invoices will be billed using the specified settings.
1048
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings)) }
1049
- attr_accessor :invoice_settings
1050
- # A list of up to 20 subscription items, each with an attached price.
1051
- sig { returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Item])) }
1052
- attr_accessor :items
1053
- # 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`.
1054
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
1055
- attr_accessor :metadata
1056
- # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
1057
- sig { returns(T.nilable(T::Boolean)) }
1058
- attr_accessor :off_session
1059
- # The account on behalf of which to charge, for each of the subscription's invoices.
1060
- sig { returns(T.nilable(String)) }
1061
- attr_accessor :on_behalf_of
1062
- # 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).
1063
- sig {
1064
- returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PauseCollection)))
1065
- }
1066
- attr_accessor :pause_collection
1067
- # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
1068
- #
1069
- # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
1070
- #
1071
- # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
1072
- #
1073
- # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more.
1074
- sig { returns(T.nilable(String)) }
1075
- attr_accessor :payment_behavior
1076
- # Payment settings to pass to invoices created by the subscription.
1077
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings)) }
1078
- attr_accessor :payment_settings
1079
- # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
1080
- sig {
1081
- returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PendingInvoiceItemInterval)))
1082
- }
1083
- attr_accessor :pending_invoice_item_interval
1084
- # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
1085
- sig { returns(T.nilable(String)) }
1086
- attr_accessor :proration_behavior
1087
- # If set, prorations will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. `proration_date` can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.
1088
- sig { returns(T.nilable(Integer)) }
1089
- attr_accessor :proration_date
1090
- # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value.
1091
- sig { returns(T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::TransferData))) }
1092
- attr_accessor :transfer_data
1093
- # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, `trial_end` will override the default trial period of the plan the customer is being subscribed to. The `billing_cycle_anchor` will be updated to the `trial_end` value. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`.
1094
- sig { returns(T.nilable(T.any(String, Integer))) }
1095
- attr_accessor :trial_end
1096
- # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
1097
- sig { returns(T.nilable(T::Boolean)) }
1098
- attr_accessor :trial_from_plan
1099
- # Settings related to subscription trials.
1100
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::TrialSettings)) }
1101
- attr_accessor :trial_settings
1102
- sig {
1103
- params(add_invoice_items: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.any(String, Float)), automatic_tax: T.nilable(::Stripe::Subscription::UpdateParams::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::BillingThresholds)), cancel_at: T.nilable(T.any(String, T.any(Integer, String))), cancel_at_period_end: T.nilable(T::Boolean), cancellation_details: T.nilable(::Stripe::Subscription::UpdateParams::CancellationDetails), collection_method: T.nilable(String), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.any(String, T::Array[String])), description: T.nilable(String), discounts: T.nilable(T.any(String, T::Array[::Stripe::Subscription::UpdateParams::Discount])), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::Subscription::UpdateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Item]), metadata: T.nilable(T.any(String, T::Hash[String, String])), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(String), pause_collection: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PauseCollection)), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::PendingInvoiceItemInterval)), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), transfer_data: T.nilable(T.any(String, ::Stripe::Subscription::UpdateParams::TransferData)), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_settings: T.nilable(::Stripe::Subscription::UpdateParams::TrialSettings)).void
1104
- }
1105
- def initialize(
1106
- add_invoice_items: nil,
1107
- application_fee_percent: nil,
1108
- automatic_tax: nil,
1109
- billing_cycle_anchor: nil,
1110
- billing_thresholds: nil,
1111
- cancel_at: nil,
1112
- cancel_at_period_end: nil,
1113
- cancellation_details: nil,
1114
- collection_method: nil,
1115
- days_until_due: nil,
1116
- default_payment_method: nil,
1117
- default_source: nil,
1118
- default_tax_rates: nil,
1119
- description: nil,
1120
- discounts: nil,
1121
- expand: nil,
1122
- invoice_settings: nil,
1123
- items: nil,
1124
- metadata: nil,
1125
- off_session: nil,
1126
- on_behalf_of: nil,
1127
- pause_collection: nil,
1128
- payment_behavior: nil,
1129
- payment_settings: nil,
1130
- pending_invoice_item_interval: nil,
1131
- proration_behavior: nil,
1132
- proration_date: nil,
1133
- transfer_data: nil,
1134
- trial_end: nil,
1135
- trial_from_plan: nil,
1136
- trial_settings: nil
1137
- ); end
1138
- end
1139
- class DeleteDiscountParams < Stripe::RequestParams; end
1140
- class ListParams < Stripe::RequestParams
1141
- class AutomaticTax < Stripe::RequestParams
1142
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1143
- sig { returns(T::Boolean) }
1144
- attr_accessor :enabled
1145
- sig { params(enabled: T::Boolean).void }
1146
- def initialize(enabled: nil); end
1147
- end
1148
- class Created < Stripe::RequestParams
1149
- # Minimum value to filter by (exclusive)
1150
- sig { returns(T.nilable(Integer)) }
1151
- attr_accessor :gt
1152
- # Minimum value to filter by (inclusive)
1153
- sig { returns(T.nilable(Integer)) }
1154
- attr_accessor :gte
1155
- # Maximum value to filter by (exclusive)
1156
- sig { returns(T.nilable(Integer)) }
1157
- attr_accessor :lt
1158
- # Maximum value to filter by (inclusive)
1159
- sig { returns(T.nilable(Integer)) }
1160
- attr_accessor :lte
1161
- sig {
1162
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
1163
- }
1164
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
1165
- end
1166
- class CurrentPeriodEnd < Stripe::RequestParams
1167
- # Minimum value to filter by (exclusive)
1168
- sig { returns(T.nilable(Integer)) }
1169
- attr_accessor :gt
1170
- # Minimum value to filter by (inclusive)
1171
- sig { returns(T.nilable(Integer)) }
1172
- attr_accessor :gte
1173
- # Maximum value to filter by (exclusive)
1174
- sig { returns(T.nilable(Integer)) }
1175
- attr_accessor :lt
1176
- # Maximum value to filter by (inclusive)
1177
- sig { returns(T.nilable(Integer)) }
1178
- attr_accessor :lte
1179
- sig {
1180
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
1181
- }
1182
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
1183
- end
1184
- class CurrentPeriodStart < Stripe::RequestParams
1185
- # Minimum value to filter by (exclusive)
1186
- sig { returns(T.nilable(Integer)) }
1187
- attr_accessor :gt
1188
- # Minimum value to filter by (inclusive)
1189
- sig { returns(T.nilable(Integer)) }
1190
- attr_accessor :gte
1191
- # Maximum value to filter by (exclusive)
1192
- sig { returns(T.nilable(Integer)) }
1193
- attr_accessor :lt
1194
- # Maximum value to filter by (inclusive)
1195
- sig { returns(T.nilable(Integer)) }
1196
- attr_accessor :lte
1197
- sig {
1198
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
1199
- }
1200
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
1201
- end
1202
- # Filter subscriptions by their automatic tax settings.
1203
- sig { returns(T.nilable(::Stripe::Subscription::ListParams::AutomaticTax)) }
1204
- attr_accessor :automatic_tax
1205
- # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.
1206
- sig { returns(T.nilable(String)) }
1207
- attr_accessor :collection_method
1208
- # Only return subscriptions that were created during the given date interval.
1209
- sig { returns(T.nilable(T.any(::Stripe::Subscription::ListParams::Created, Integer))) }
1210
- attr_accessor :created
1211
- # Only return subscriptions whose minimum item current_period_end falls within the given date interval.
1212
- sig {
1213
- returns(T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodEnd, Integer)))
1214
- }
1215
- attr_accessor :current_period_end
1216
- # Only return subscriptions whose maximum item current_period_start falls within the given date interval.
1217
- sig {
1218
- returns(T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodStart, Integer)))
1219
- }
1220
- attr_accessor :current_period_start
1221
- # The ID of the customer whose subscriptions will be retrieved.
1222
- sig { returns(T.nilable(String)) }
1223
- attr_accessor :customer
1224
- # 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.
1225
- sig { returns(T.nilable(String)) }
1226
- attr_accessor :ending_before
1227
- # Specifies which fields in the response should be expanded.
1228
- sig { returns(T.nilable(T::Array[String])) }
1229
- attr_accessor :expand
1230
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1231
- sig { returns(T.nilable(Integer)) }
1232
- attr_accessor :limit
1233
- # The ID of the plan whose subscriptions will be retrieved.
1234
- sig { returns(T.nilable(String)) }
1235
- attr_accessor :plan
1236
- # Filter for subscriptions that contain this recurring price ID.
1237
- sig { returns(T.nilable(String)) }
1238
- attr_accessor :price
1239
- # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
1240
- sig { returns(T.nilable(String)) }
1241
- attr_accessor :starting_after
1242
- # The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.
1243
- sig { returns(T.nilable(String)) }
1244
- attr_accessor :status
1245
- # Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.
1246
- sig { returns(T.nilable(String)) }
1247
- attr_accessor :test_clock
1248
- sig {
1249
- params(automatic_tax: T.nilable(::Stripe::Subscription::ListParams::AutomaticTax), collection_method: T.nilable(String), created: T.nilable(T.any(::Stripe::Subscription::ListParams::Created, Integer)), current_period_end: T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodEnd, Integer)), current_period_start: T.nilable(T.any(::Stripe::Subscription::ListParams::CurrentPeriodStart, Integer)), customer: T.nilable(String), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), plan: T.nilable(String), price: T.nilable(String), starting_after: T.nilable(String), status: T.nilable(String), test_clock: T.nilable(String)).void
1250
- }
1251
- def initialize(
1252
- automatic_tax: nil,
1253
- collection_method: nil,
1254
- created: nil,
1255
- current_period_end: nil,
1256
- current_period_start: nil,
1257
- customer: nil,
1258
- ending_before: nil,
1259
- expand: nil,
1260
- limit: nil,
1261
- plan: nil,
1262
- price: nil,
1263
- starting_after: nil,
1264
- status: nil,
1265
- test_clock: nil
1266
- ); end
1267
- end
1268
- class CreateParams < Stripe::RequestParams
1269
- class AddInvoiceItem < Stripe::RequestParams
1270
- class Discount < Stripe::RequestParams
1271
- # ID of the coupon to create a new discount for.
1272
- sig { returns(T.nilable(String)) }
1273
- attr_accessor :coupon
1274
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1275
- sig { returns(T.nilable(String)) }
1276
- attr_accessor :discount
1277
- # ID of the promotion code to create a new discount for.
1278
- sig { returns(T.nilable(String)) }
1279
- attr_accessor :promotion_code
1280
- sig {
1281
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1282
- }
1283
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1284
- end
1285
- class Period < Stripe::RequestParams
1286
- class End < Stripe::RequestParams
1287
- # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
1288
- sig { returns(T.nilable(Integer)) }
1289
- attr_accessor :timestamp
1290
- # Select how to calculate the end of the invoice item period.
1291
- sig { returns(String) }
1292
- attr_accessor :type
1293
- sig { params(timestamp: T.nilable(Integer), type: String).void }
1294
- def initialize(timestamp: nil, type: nil); end
1295
- end
1296
- class Start < Stripe::RequestParams
1297
- # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
1298
- sig { returns(T.nilable(Integer)) }
1299
- attr_accessor :timestamp
1300
- # Select how to calculate the start of the invoice item period.
1301
- sig { returns(String) }
1302
- attr_accessor :type
1303
- sig { params(timestamp: T.nilable(Integer), type: String).void }
1304
- def initialize(timestamp: nil, type: nil); end
1305
- end
1306
- # End of the invoice item period.
1307
- sig { returns(::Stripe::Subscription::CreateParams::AddInvoiceItem::Period::End) }
1308
- attr_accessor :end
1309
- # Start of the invoice item period.
1310
- sig { returns(::Stripe::Subscription::CreateParams::AddInvoiceItem::Period::Start) }
1311
- attr_accessor :start
1312
- sig {
1313
- params(end_: ::Stripe::Subscription::CreateParams::AddInvoiceItem::Period::End, start: ::Stripe::Subscription::CreateParams::AddInvoiceItem::Period::Start).void
1314
- }
1315
- def initialize(end_: nil, start: nil); end
1316
- end
1317
- class PriceData < Stripe::RequestParams
1318
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1319
- sig { returns(String) }
1320
- attr_accessor :currency
1321
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1322
- sig { returns(String) }
1323
- attr_accessor :product
1324
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
1325
- sig { returns(T.nilable(String)) }
1326
- attr_accessor :tax_behavior
1327
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
1328
- sig { returns(T.nilable(Integer)) }
1329
- attr_accessor :unit_amount
1330
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1331
- sig { returns(T.nilable(String)) }
1332
- attr_accessor :unit_amount_decimal
1333
- sig {
1334
- params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
1335
- }
1336
- def initialize(
1337
- currency: nil,
1338
- product: nil,
1339
- tax_behavior: nil,
1340
- unit_amount: nil,
1341
- unit_amount_decimal: nil
1342
- ); end
1343
- end
1344
- # The coupons to redeem into discounts for the item.
1345
- sig {
1346
- returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount]))
1347
- }
1348
- attr_accessor :discounts
1349
- # 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`.
1350
- sig { returns(T.nilable(T::Hash[String, String])) }
1351
- attr_accessor :metadata
1352
- # The period associated with this invoice item. Defaults to the current period of the subscription.
1353
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AddInvoiceItem::Period)) }
1354
- attr_accessor :period
1355
- # The ID of the price object. One of `price` or `price_data` is required.
1356
- sig { returns(T.nilable(String)) }
1357
- attr_accessor :price
1358
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1359
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AddInvoiceItem::PriceData)) }
1360
- attr_accessor :price_data
1361
- # Quantity for this item. Defaults to 1.
1362
- sig { returns(T.nilable(Integer)) }
1363
- attr_accessor :quantity
1364
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
1365
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1366
- attr_accessor :tax_rates
1367
- sig {
1368
- params(discounts: T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount]), metadata: T.nilable(T::Hash[String, String]), period: T.nilable(::Stripe::Subscription::CreateParams::AddInvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::CreateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
1369
- }
1370
- def initialize(
1371
- discounts: nil,
1372
- metadata: nil,
1373
- period: nil,
1374
- price: nil,
1375
- price_data: nil,
1376
- quantity: nil,
1377
- tax_rates: nil
1378
- ); end
1379
- end
1380
- class AutomaticTax < Stripe::RequestParams
1381
- class Liability < Stripe::RequestParams
1382
- # The connected account being referenced when `type` is `account`.
1383
- sig { returns(T.nilable(String)) }
1384
- attr_accessor :account
1385
- # Type of the account referenced in the request.
1386
- sig { returns(String) }
1387
- attr_accessor :type
1388
- sig { params(account: T.nilable(String), type: String).void }
1389
- def initialize(account: nil, type: nil); end
1390
- end
1391
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1392
- sig { returns(T::Boolean) }
1393
- attr_accessor :enabled
1394
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
1395
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax::Liability)) }
1396
- attr_accessor :liability
1397
- sig {
1398
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax::Liability)).void
1399
- }
1400
- def initialize(enabled: nil, liability: nil); end
1401
- end
1402
- class BillingCycleAnchorConfig < Stripe::RequestParams
1403
- # The day of the month the anchor should be. Ranges from 1 to 31.
1404
- sig { returns(Integer) }
1405
- attr_accessor :day_of_month
1406
- # The hour of the day the anchor should be. Ranges from 0 to 23.
1407
- sig { returns(T.nilable(Integer)) }
1408
- attr_accessor :hour
1409
- # The minute of the hour the anchor should be. Ranges from 0 to 59.
1410
- sig { returns(T.nilable(Integer)) }
1411
- attr_accessor :minute
1412
- # The month to start full cycle periods. Ranges from 1 to 12.
1413
- sig { returns(T.nilable(Integer)) }
1414
- attr_accessor :month
1415
- # The second of the minute the anchor should be. Ranges from 0 to 59.
1416
- sig { returns(T.nilable(Integer)) }
1417
- attr_accessor :second
1418
- sig {
1419
- params(day_of_month: Integer, hour: T.nilable(Integer), minute: T.nilable(Integer), month: T.nilable(Integer), second: T.nilable(Integer)).void
1420
- }
1421
- def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end
1422
- end
1423
- class BillingMode < Stripe::RequestParams
1424
- # Controls the calculation and orchestration of prorations and invoices for subscriptions.
1425
- sig { returns(String) }
1426
- attr_accessor :type
1427
- sig { params(type: String).void }
1428
- def initialize(type: nil); end
1429
- end
1430
- class BillingThresholds < Stripe::RequestParams
1431
- # Monetary threshold that triggers the subscription to advance to a new billing period
1432
- sig { returns(T.nilable(Integer)) }
1433
- attr_accessor :amount_gte
1434
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
1435
- sig { returns(T.nilable(T::Boolean)) }
1436
- attr_accessor :reset_billing_cycle_anchor
1437
- sig {
1438
- params(amount_gte: T.nilable(Integer), reset_billing_cycle_anchor: T.nilable(T::Boolean)).void
1439
- }
1440
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1441
- end
1442
- class Discount < Stripe::RequestParams
1443
- # ID of the coupon to create a new discount for.
1444
- sig { returns(T.nilable(String)) }
1445
- attr_accessor :coupon
1446
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1447
- sig { returns(T.nilable(String)) }
1448
- attr_accessor :discount
1449
- # ID of the promotion code to create a new discount for.
1450
- sig { returns(T.nilable(String)) }
1451
- attr_accessor :promotion_code
1452
- sig {
1453
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1454
- }
1455
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1456
- end
1457
- class InvoiceSettings < Stripe::RequestParams
1458
- class Issuer < Stripe::RequestParams
1459
- # The connected account being referenced when `type` is `account`.
1460
- sig { returns(T.nilable(String)) }
1461
- attr_accessor :account
1462
- # Type of the account referenced in the request.
1463
- sig { returns(String) }
1464
- attr_accessor :type
1465
- sig { params(account: T.nilable(String), type: String).void }
1466
- def initialize(account: nil, type: nil); end
1467
- end
1468
- # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
1469
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1470
- attr_accessor :account_tax_ids
1471
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1472
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer)) }
1473
- attr_accessor :issuer
1474
- sig {
1475
- params(account_tax_ids: T.nilable(T.any(String, T::Array[String])), issuer: T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer)).void
1476
- }
1477
- def initialize(account_tax_ids: nil, issuer: nil); end
1478
- end
1479
- class Item < Stripe::RequestParams
1480
- class BillingThresholds < Stripe::RequestParams
1481
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
1482
- sig { returns(Integer) }
1483
- attr_accessor :usage_gte
1484
- sig { params(usage_gte: Integer).void }
1485
- def initialize(usage_gte: nil); end
1486
- end
1487
- class Discount < Stripe::RequestParams
1488
- # ID of the coupon to create a new discount for.
1489
- sig { returns(T.nilable(String)) }
1490
- attr_accessor :coupon
1491
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1492
- sig { returns(T.nilable(String)) }
1493
- attr_accessor :discount
1494
- # ID of the promotion code to create a new discount for.
1495
- sig { returns(T.nilable(String)) }
1496
- attr_accessor :promotion_code
1497
- sig {
1498
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
1499
- }
1500
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
1501
- end
1502
- class PriceData < Stripe::RequestParams
1503
- class Recurring < Stripe::RequestParams
1504
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1505
- sig { returns(String) }
1506
- attr_accessor :interval
1507
- # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
1508
- sig { returns(T.nilable(Integer)) }
1509
- attr_accessor :interval_count
1510
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
1511
- def initialize(interval: nil, interval_count: nil); end
1512
- end
1513
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1514
- sig { returns(String) }
1515
- attr_accessor :currency
1516
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1517
- sig { returns(String) }
1518
- attr_accessor :product
1519
- # The recurring components of a price such as `interval` and `interval_count`.
1520
- sig { returns(::Stripe::Subscription::CreateParams::Item::PriceData::Recurring) }
1521
- attr_accessor :recurring
1522
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
1523
- sig { returns(T.nilable(String)) }
1524
- attr_accessor :tax_behavior
1525
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1526
- sig { returns(T.nilable(Integer)) }
1527
- attr_accessor :unit_amount
1528
- # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
1529
- sig { returns(T.nilable(String)) }
1530
- attr_accessor :unit_amount_decimal
1531
- sig {
1532
- params(currency: String, product: String, recurring: ::Stripe::Subscription::CreateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
1533
- }
1534
- def initialize(
1535
- currency: nil,
1536
- product: nil,
1537
- recurring: nil,
1538
- tax_behavior: nil,
1539
- unit_amount: nil,
1540
- unit_amount_decimal: nil
1541
- ); end
1542
- end
1543
- # 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.
1544
- sig {
1545
- returns(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::Item::BillingThresholds)))
1546
- }
1547
- attr_accessor :billing_thresholds
1548
- # The coupons to redeem into discounts for the subscription item.
1549
- sig {
1550
- returns(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Item::Discount])))
1551
- }
1552
- attr_accessor :discounts
1553
- # 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`.
1554
- sig { returns(T.nilable(T::Hash[String, String])) }
1555
- attr_accessor :metadata
1556
- # Plan ID for this item, as a string.
1557
- sig { returns(T.nilable(String)) }
1558
- attr_accessor :plan
1559
- # The ID of the price object.
1560
- sig { returns(T.nilable(String)) }
1561
- attr_accessor :price
1562
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1563
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::Item::PriceData)) }
1564
- attr_accessor :price_data
1565
- # Quantity for this item.
1566
- sig { returns(T.nilable(Integer)) }
1567
- attr_accessor :quantity
1568
- # 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.
1569
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1570
- attr_accessor :tax_rates
1571
- sig {
1572
- params(billing_thresholds: T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::Item::BillingThresholds)), discounts: T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Item::Discount])), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::Subscription::CreateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.any(String, T::Array[String]))).void
1573
- }
1574
- def initialize(
1575
- billing_thresholds: nil,
1576
- discounts: nil,
1577
- metadata: nil,
1578
- plan: nil,
1579
- price: nil,
1580
- price_data: nil,
1581
- quantity: nil,
1582
- tax_rates: nil
1583
- ); end
1584
- end
1585
- class PaymentSettings < Stripe::RequestParams
1586
- class PaymentMethodOptions < Stripe::RequestParams
1587
- class AcssDebit < Stripe::RequestParams
1588
- class MandateOptions < Stripe::RequestParams
1589
- # Transaction type of the mandate.
1590
- sig { returns(T.nilable(String)) }
1591
- attr_accessor :transaction_type
1592
- sig { params(transaction_type: T.nilable(String)).void }
1593
- def initialize(transaction_type: nil); end
1594
- end
1595
- # Additional fields for Mandate creation
1596
- sig {
1597
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
1598
- }
1599
- attr_accessor :mandate_options
1600
- # Verification method for the intent
1601
- sig { returns(T.nilable(String)) }
1602
- attr_accessor :verification_method
1603
- sig {
1604
- params(mandate_options: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
1605
- }
1606
- def initialize(mandate_options: nil, verification_method: nil); end
1607
- end
1608
- class Bancontact < Stripe::RequestParams
1609
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
1610
- sig { returns(T.nilable(String)) }
1611
- attr_accessor :preferred_language
1612
- sig { params(preferred_language: T.nilable(String)).void }
1613
- def initialize(preferred_language: nil); end
1614
- end
1615
- class Card < Stripe::RequestParams
1616
- class MandateOptions < Stripe::RequestParams
1617
- # Amount to be charged for future payments.
1618
- sig { returns(T.nilable(Integer)) }
1619
- attr_accessor :amount
1620
- # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
1621
- sig { returns(T.nilable(String)) }
1622
- attr_accessor :amount_type
1623
- # A description of the mandate or subscription that is meant to be displayed to the customer.
1624
- sig { returns(T.nilable(String)) }
1625
- attr_accessor :description
1626
- sig {
1627
- params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
1628
- }
1629
- def initialize(amount: nil, amount_type: nil, description: nil); end
1630
- end
1631
- # Configuration options for setting up an eMandate for cards issued in India.
1632
- sig {
1633
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
1634
- }
1635
- attr_accessor :mandate_options
1636
- # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
1637
- sig { returns(T.nilable(String)) }
1638
- attr_accessor :network
1639
- # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
1640
- sig { returns(T.nilable(String)) }
1641
- attr_accessor :request_three_d_secure
1642
- sig {
1643
- params(mandate_options: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
1644
- }
1645
- def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
1646
- end
1647
- class CustomerBalance < Stripe::RequestParams
1648
- class BankTransfer < Stripe::RequestParams
1649
- class EuBankTransfer < Stripe::RequestParams
1650
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
1651
- sig { returns(String) }
1652
- attr_accessor :country
1653
- sig { params(country: String).void }
1654
- def initialize(country: nil); end
1655
- end
1656
- # Configuration for eu_bank_transfer funding type.
1657
- sig {
1658
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
1659
- }
1660
- attr_accessor :eu_bank_transfer
1661
- # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
1662
- sig { returns(T.nilable(String)) }
1663
- attr_accessor :type
1664
- sig {
1665
- params(eu_bank_transfer: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
1666
- }
1667
- def initialize(eu_bank_transfer: nil, type: nil); end
1668
- end
1669
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
1670
- sig {
1671
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
1672
- }
1673
- attr_accessor :bank_transfer
1674
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
1675
- sig { returns(T.nilable(String)) }
1676
- attr_accessor :funding_type
1677
- sig {
1678
- params(bank_transfer: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
1679
- }
1680
- def initialize(bank_transfer: nil, funding_type: nil); end
1681
- end
1682
- class Konbini < Stripe::RequestParams; end
1683
- class SepaDebit < Stripe::RequestParams; end
1684
- class UsBankAccount < Stripe::RequestParams
1685
- class FinancialConnections < Stripe::RequestParams
1686
- class Filters < Stripe::RequestParams
1687
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1688
- sig { returns(T.nilable(T::Array[String])) }
1689
- attr_accessor :account_subcategories
1690
- sig { params(account_subcategories: T.nilable(T::Array[String])).void }
1691
- def initialize(account_subcategories: nil); end
1692
- end
1693
- # Provide filters for the linked accounts that the customer can select for the payment method.
1694
- sig {
1695
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
1696
- }
1697
- attr_accessor :filters
1698
- # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
1699
- sig { returns(T.nilable(T::Array[String])) }
1700
- attr_accessor :permissions
1701
- # List of data features that you would like to retrieve upon account creation.
1702
- sig { returns(T.nilable(T::Array[String])) }
1703
- attr_accessor :prefetch
1704
- sig {
1705
- params(filters: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
1706
- }
1707
- def initialize(filters: nil, permissions: nil, prefetch: nil); end
1708
- end
1709
- # Additional fields for Financial Connections Session creation
1710
- sig {
1711
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
1712
- }
1713
- attr_accessor :financial_connections
1714
- # Verification method for the intent
1715
- sig { returns(T.nilable(String)) }
1716
- attr_accessor :verification_method
1717
- sig {
1718
- params(financial_connections: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
1719
- }
1720
- def initialize(financial_connections: nil, verification_method: nil); end
1721
- end
1722
- # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
1723
- sig {
1724
- returns(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)))
1725
- }
1726
- attr_accessor :acss_debit
1727
- # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
1728
- sig {
1729
- returns(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact)))
1730
- }
1731
- attr_accessor :bancontact
1732
- # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
1733
- sig {
1734
- returns(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card)))
1735
- }
1736
- attr_accessor :card
1737
- # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
1738
- sig {
1739
- returns(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)))
1740
- }
1741
- attr_accessor :customer_balance
1742
- # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
1743
- sig {
1744
- returns(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini)))
1745
- }
1746
- attr_accessor :konbini
1747
- # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
1748
- sig {
1749
- returns(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)))
1750
- }
1751
- attr_accessor :sepa_debit
1752
- # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
1753
- sig {
1754
- returns(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))
1755
- }
1756
- attr_accessor :us_bank_account
1757
- sig {
1758
- params(acss_debit: T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)), bancontact: T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact)), card: T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card)), customer_balance: T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)), konbini: T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini)), sepa_debit: T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)), us_bank_account: T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))).void
1759
- }
1760
- def initialize(
1761
- acss_debit: nil,
1762
- bancontact: nil,
1763
- card: nil,
1764
- customer_balance: nil,
1765
- konbini: nil,
1766
- sepa_debit: nil,
1767
- us_bank_account: nil
1768
- ); end
1769
- end
1770
- # Payment-method-specific configuration to provide to invoices created by the subscription.
1771
- sig {
1772
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions))
1773
- }
1774
- attr_accessor :payment_method_options
1775
- # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
1776
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1777
- attr_accessor :payment_method_types
1778
- # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
1779
- sig { returns(T.nilable(String)) }
1780
- attr_accessor :save_default_payment_method
1781
- sig {
1782
- params(payment_method_options: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.any(String, T::Array[String])), save_default_payment_method: T.nilable(String)).void
1783
- }
1784
- def initialize(
1785
- payment_method_options: nil,
1786
- payment_method_types: nil,
1787
- save_default_payment_method: nil
1788
- ); end
1789
- end
1790
- class PendingInvoiceItemInterval < Stripe::RequestParams
1791
- # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
1792
- sig { returns(String) }
1793
- attr_accessor :interval
1794
- # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
1795
- sig { returns(T.nilable(Integer)) }
1796
- attr_accessor :interval_count
1797
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
1798
- def initialize(interval: nil, interval_count: nil); end
1799
- end
1800
- class TransferData < Stripe::RequestParams
1801
- # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
1802
- sig { returns(T.nilable(Float)) }
1803
- attr_accessor :amount_percent
1804
- # ID of an existing, connected Stripe account.
1805
- sig { returns(String) }
1806
- attr_accessor :destination
1807
- sig { params(amount_percent: T.nilable(Float), destination: String).void }
1808
- def initialize(amount_percent: nil, destination: nil); end
1809
- end
1810
- class TrialSettings < Stripe::RequestParams
1811
- class EndBehavior < Stripe::RequestParams
1812
- # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
1813
- sig { returns(String) }
1814
- attr_accessor :missing_payment_method
1815
- sig { params(missing_payment_method: String).void }
1816
- def initialize(missing_payment_method: nil); end
1817
- end
1818
- # Defines how the subscription should behave when the user's free trial ends.
1819
- sig { returns(::Stripe::Subscription::CreateParams::TrialSettings::EndBehavior) }
1820
- attr_accessor :end_behavior
1821
- sig {
1822
- params(end_behavior: ::Stripe::Subscription::CreateParams::TrialSettings::EndBehavior).void
1823
- }
1824
- def initialize(end_behavior: nil); end
1825
- end
1826
- # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
1827
- sig { returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem])) }
1828
- attr_accessor :add_invoice_items
1829
- # 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).
1830
- sig { returns(T.nilable(T.any(String, Float))) }
1831
- attr_accessor :application_fee_percent
1832
- # Automatic tax settings for this subscription.
1833
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax)) }
1834
- attr_accessor :automatic_tax
1835
- # A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
1836
- sig { returns(T.nilable(Integer)) }
1837
- attr_accessor :backdate_start_date
1838
- # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals.
1839
- sig { returns(T.nilable(Integer)) }
1840
- attr_accessor :billing_cycle_anchor
1841
- # Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC.
1842
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig)) }
1843
- attr_accessor :billing_cycle_anchor_config
1844
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1845
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingMode)) }
1846
- attr_accessor :billing_mode
1847
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
1848
- sig {
1849
- returns(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::BillingThresholds)))
1850
- }
1851
- attr_accessor :billing_thresholds
1852
- # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
1853
- sig { returns(T.nilable(T.any(Integer, String))) }
1854
- attr_accessor :cancel_at
1855
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1856
- sig { returns(T.nilable(T::Boolean)) }
1857
- attr_accessor :cancel_at_period_end
1858
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
1859
- sig { returns(T.nilable(String)) }
1860
- attr_accessor :collection_method
1861
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
1862
- sig { returns(T.nilable(String)) }
1863
- attr_accessor :currency
1864
- # The identifier of the customer to subscribe.
1865
- sig { returns(String) }
1866
- attr_accessor :customer
1867
- # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
1868
- sig { returns(T.nilable(Integer)) }
1869
- attr_accessor :days_until_due
1870
- # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
1871
- sig { returns(T.nilable(String)) }
1872
- attr_accessor :default_payment_method
1873
- # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
1874
- sig { returns(T.nilable(String)) }
1875
- attr_accessor :default_source
1876
- # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription.
1877
- sig { returns(T.nilable(T.any(String, T::Array[String]))) }
1878
- attr_accessor :default_tax_rates
1879
- # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1880
- sig { returns(T.nilable(String)) }
1881
- attr_accessor :description
1882
- # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
1883
- sig {
1884
- returns(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Discount])))
1885
- }
1886
- attr_accessor :discounts
1887
- # Specifies which fields in the response should be expanded.
1888
- sig { returns(T.nilable(T::Array[String])) }
1889
- attr_accessor :expand
1890
- # All invoices will be billed using the specified settings.
1891
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings)) }
1892
- attr_accessor :invoice_settings
1893
- # A list of up to 20 subscription items, each with an attached price.
1894
- sig { returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item])) }
1895
- attr_accessor :items
1896
- # 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`.
1897
- sig { returns(T.nilable(T.any(String, T::Hash[String, String]))) }
1898
- attr_accessor :metadata
1899
- # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
1900
- sig { returns(T.nilable(T::Boolean)) }
1901
- attr_accessor :off_session
1902
- # The account on behalf of which to charge, for each of the subscription's invoices.
1903
- sig { returns(T.nilable(String)) }
1904
- attr_accessor :on_behalf_of
1905
- # Only applies to subscriptions with `collection_method=charge_automatically`.
1906
- #
1907
- # Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
1908
- #
1909
- # Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state.
1910
- #
1911
- # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
1912
- #
1913
- # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
1914
- #
1915
- # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
1916
- sig { returns(T.nilable(String)) }
1917
- attr_accessor :payment_behavior
1918
- # Payment settings to pass to invoices created by the subscription.
1919
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings)) }
1920
- attr_accessor :payment_settings
1921
- # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval.
1922
- sig {
1923
- returns(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval)))
1924
- }
1925
- attr_accessor :pending_invoice_item_interval
1926
- # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`.
1927
- sig { returns(T.nilable(String)) }
1928
- attr_accessor :proration_behavior
1929
- # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
1930
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::TransferData)) }
1931
- attr_accessor :transfer_data
1932
- # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
1933
- sig { returns(T.nilable(T.any(String, Integer))) }
1934
- attr_accessor :trial_end
1935
- # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
1936
- sig { returns(T.nilable(T::Boolean)) }
1937
- attr_accessor :trial_from_plan
1938
- # Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
1939
- sig { returns(T.nilable(Integer)) }
1940
- attr_accessor :trial_period_days
1941
- # Settings related to subscription trials.
1942
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)) }
1943
- attr_accessor :trial_settings
1944
- sig {
1945
- params(add_invoice_items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.any(String, Float)), automatic_tax: T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig), billing_mode: T.nilable(::Stripe::Subscription::CreateParams::BillingMode), billing_thresholds: T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::BillingThresholds)), cancel_at: T.nilable(T.any(Integer, String)), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: String, days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.any(String, T::Array[String])), description: T.nilable(String), discounts: T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Discount])), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item]), metadata: T.nilable(T.any(String, T::Hash[String, String])), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(String), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval)), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Subscription::CreateParams::TransferData), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)).void
1946
- }
1947
- def initialize(
1948
- add_invoice_items: nil,
1949
- application_fee_percent: nil,
1950
- automatic_tax: nil,
1951
- backdate_start_date: nil,
1952
- billing_cycle_anchor: nil,
1953
- billing_cycle_anchor_config: nil,
1954
- billing_mode: nil,
1955
- billing_thresholds: nil,
1956
- cancel_at: nil,
1957
- cancel_at_period_end: nil,
1958
- collection_method: nil,
1959
- currency: nil,
1960
- customer: nil,
1961
- days_until_due: nil,
1962
- default_payment_method: nil,
1963
- default_source: nil,
1964
- default_tax_rates: nil,
1965
- description: nil,
1966
- discounts: nil,
1967
- expand: nil,
1968
- invoice_settings: nil,
1969
- items: nil,
1970
- metadata: nil,
1971
- off_session: nil,
1972
- on_behalf_of: nil,
1973
- payment_behavior: nil,
1974
- payment_settings: nil,
1975
- pending_invoice_item_interval: nil,
1976
- proration_behavior: nil,
1977
- transfer_data: nil,
1978
- trial_end: nil,
1979
- trial_from_plan: nil,
1980
- trial_period_days: nil,
1981
- trial_settings: nil
1982
- ); end
1983
- end
1984
- class SearchParams < Stripe::RequestParams
1985
- # Specifies which fields in the response should be expanded.
1986
- sig { returns(T.nilable(T::Array[String])) }
1987
- attr_accessor :expand
1988
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1989
- sig { returns(T.nilable(Integer)) }
1990
- attr_accessor :limit
1991
- # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
1992
- sig { returns(T.nilable(String)) }
1993
- attr_accessor :page
1994
- # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions).
1995
- sig { returns(String) }
1996
- attr_accessor :query
1997
- sig {
1998
- params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
1999
- }
2000
- def initialize(expand: nil, limit: nil, page: nil, query: nil); end
2001
- end
2002
- class MigrateParams < Stripe::RequestParams
2003
- class BillingMode < Stripe::RequestParams
2004
- # Attribute for param field type
2005
- sig { returns(String) }
2006
- attr_accessor :type
2007
- sig { params(type: String).void }
2008
- def initialize(type: nil); end
2009
- end
2010
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2011
- sig { returns(::Stripe::Subscription::MigrateParams::BillingMode) }
2012
- attr_accessor :billing_mode
2013
- # Specifies which fields in the response should be expanded.
2014
- sig { returns(T.nilable(T::Array[String])) }
2015
- attr_accessor :expand
2016
- sig {
2017
- params(billing_mode: ::Stripe::Subscription::MigrateParams::BillingMode, expand: T.nilable(T::Array[String])).void
2018
- }
2019
- def initialize(billing_mode: nil, expand: nil); end
2020
- end
2021
- class ResumeParams < Stripe::RequestParams
2022
- # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
2023
- sig { returns(T.nilable(String)) }
2024
- attr_accessor :billing_cycle_anchor
2025
- # Specifies which fields in the response should be expanded.
2026
- sig { returns(T.nilable(T::Array[String])) }
2027
- attr_accessor :expand
2028
- # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor` being `unchanged`. When the `billing_cycle_anchor` is set to `now` (default value), no prorations are generated. If no value is passed, the default is `create_prorations`.
2029
- sig { returns(T.nilable(String)) }
2030
- attr_accessor :proration_behavior
2031
- # If set, prorations will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
2032
- sig { returns(T.nilable(Integer)) }
2033
- attr_accessor :proration_date
2034
- sig {
2035
- params(billing_cycle_anchor: T.nilable(String), expand: T.nilable(T::Array[String]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer)).void
2036
- }
2037
- def initialize(
2038
- billing_cycle_anchor: nil,
2039
- expand: nil,
2040
- proration_behavior: nil,
2041
- proration_date: nil
2042
- ); end
2043
- end
2044
- # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata).
2045
- #
2046
- # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true.
2047
- #
2048
- # By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
2049
- sig {
2050
- params(params: T.any(::Stripe::Subscription::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2051
- }
2052
- def cancel(params = {}, opts = {}); end
2053
-
2054
- # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata).
2055
- #
2056
- # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true.
2057
- #
2058
- # By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
2059
- sig {
2060
- params(subscription_exposed_id: String, params: T.any(::Stripe::Subscription::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2061
- }
2062
- def self.cancel(subscription_exposed_id, params = {}, opts = {}); end
2063
-
2064
- # Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.
2065
- #
2066
- # When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request.
2067
- # The payment_behavior parameter determines the exact behavior of the initial payment.
2068
- #
2069
- # To start subscriptions where the first invoice always begins in a draft status, use [subscription schedules](https://docs.stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead.
2070
- # Schedules provide the flexibility to model more complex billing configurations that change over time.
2071
- sig {
2072
- params(params: T.any(::Stripe::Subscription::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2073
- }
2074
- def self.create(params = {}, opts = {}); end
2075
-
2076
- # Removes the currently applied discount on a subscription.
2077
- sig {
2078
- params(params: T.any(::Stripe::Subscription::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount)
2079
- }
2080
- def delete_discount(params = {}, opts = {}); end
2081
-
2082
- # Removes the currently applied discount on a subscription.
2083
- sig {
2084
- params(subscription_exposed_id: String, params: T.any(::Stripe::Subscription::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount)
2085
- }
2086
- def self.delete_discount(subscription_exposed_id, params = {}, opts = {}); end
2087
-
2088
- # By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.
2089
- sig {
2090
- params(params: T.any(::Stripe::Subscription::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
2091
- }
2092
- def self.list(params = {}, opts = {}); end
2093
-
2094
- # Upgrade the billing_mode of an existing subscription.
2095
- sig {
2096
- params(params: T.any(::Stripe::Subscription::MigrateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2097
- }
2098
- def migrate(params = {}, opts = {}); end
2099
-
2100
- # Upgrade the billing_mode of an existing subscription.
2101
- sig {
2102
- params(subscription: String, params: T.any(::Stripe::Subscription::MigrateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2103
- }
2104
- def self.migrate(subscription, params = {}, opts = {}); end
2105
-
2106
- # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
2107
- sig {
2108
- params(params: T.any(::Stripe::Subscription::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2109
- }
2110
- def resume(params = {}, opts = {}); end
2111
-
2112
- # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
2113
- sig {
2114
- params(subscription: String, params: T.any(::Stripe::Subscription::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2115
- }
2116
- def self.resume(subscription, params = {}, opts = {}); end
2117
-
2118
- sig {
2119
- params(params: T.any(::Stripe::Subscription::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
2120
- }
2121
- def self.search(params = {}, opts = {}); end
2122
-
2123
- sig {
2124
- params(params: T.any(::Stripe::Subscription::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject)
2125
- }
2126
- def self.search_auto_paging_each(params = {}, opts = {}, &blk); end
2127
-
2128
- # Updates an existing subscription to match the specified parameters.
2129
- # When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
2130
- # To preview how the proration is calculated, use the [create preview](https://docs.stripe.com/docs/api/invoices/create_preview) endpoint.
2131
- #
2132
- # By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.
2133
- #
2134
- # Switching prices does not normally change the billing date or generate an immediate charge unless:
2135
- #
2136
- #
2137
- # The billing interval is changed (for example, from monthly to yearly).
2138
- # The subscription moves from free to paid.
2139
- # A trial starts or ends.
2140
- #
2141
- #
2142
- # In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://docs.stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment).
2143
- #
2144
- # If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://docs.stripe.com/docs/api/invoices/create).
2145
- #
2146
- # If you don't want to prorate, set the proration_behavior option to none. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (for example, from monthly to yearly), we don't generate any credits for the old subscription's unused time. We still reset the billing date and bill immediately for the new subscription.
2147
- #
2148
- # Updating the quantity on a subscription many times in an hour may result in [rate limiting. If you need to bill for a frequently changing quantity, consider integrating <a href="/docs/billing/subscriptions/usage-based">usage-based billing](https://docs.stripe.com/docs/rate-limits) instead.
2149
- sig {
2150
- params(subscription_exposed_id: String, params: T.any(::Stripe::Subscription::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2151
- }
2152
- def self.update(subscription_exposed_id, params = {}, opts = {}); end
2153
- end
2154
- end