stripe 15.0.0 → 15.1.0.pre.beta.1

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 (576) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1537 -676
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/api_requestor.rb +28 -0
  6. data/lib/stripe/api_version.rb +1 -1
  7. data/lib/stripe/errors.rb +54 -0
  8. data/lib/stripe/event_types.rb +75 -0
  9. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +23 -0
  10. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +21 -0
  11. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +23 -0
  12. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +21 -0
  13. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +23 -0
  14. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +21 -0
  15. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +21 -0
  16. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +21 -0
  17. data/lib/stripe/events/v2_core_account_link_completed_event.rb +13 -0
  18. data/lib/stripe/events/v2_core_account_person_created_event.rb +23 -0
  19. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +23 -0
  20. data/lib/stripe/events/v2_core_account_person_updated_event.rb +23 -0
  21. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +21 -0
  22. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +21 -0
  23. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +21 -0
  24. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +23 -0
  25. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +21 -0
  26. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +21 -0
  27. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +21 -0
  28. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +21 -0
  29. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +21 -0
  30. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +21 -0
  31. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +21 -0
  32. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +21 -0
  33. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +21 -0
  34. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +21 -0
  35. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +21 -0
  36. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +21 -0
  37. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +21 -0
  38. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +21 -0
  39. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +21 -0
  40. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +23 -0
  41. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +21 -0
  42. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +21 -0
  43. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +21 -0
  44. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +21 -0
  45. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +21 -0
  46. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +21 -0
  47. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +21 -0
  48. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +21 -0
  49. data/lib/stripe/object_types.rb +51 -0
  50. data/lib/stripe/request_signing_authenticator.rb +79 -0
  51. data/lib/stripe/resources/account.rb +663 -1
  52. data/lib/stripe/resources/account_notice.rb +123 -0
  53. data/lib/stripe/resources/account_session.rb +299 -1
  54. data/lib/stripe/resources/balance_settings.rb +101 -0
  55. data/lib/stripe/resources/billing/credit_balance_summary.rb +2 -0
  56. data/lib/stripe/resources/billing/credit_balance_transaction.rb +4 -0
  57. data/lib/stripe/resources/billing/credit_grant.rb +10 -0
  58. data/lib/stripe/resources/billing/meter_error_report.rb +59 -0
  59. data/lib/stripe/resources/billing_portal/session.rb +6 -0
  60. data/lib/stripe/resources/capital/financing_offer.rb +179 -0
  61. data/lib/stripe/resources/capital/financing_summary.rb +55 -0
  62. data/lib/stripe/resources/capital/financing_transaction.rb +114 -0
  63. data/lib/stripe/resources/card.rb +2 -0
  64. data/lib/stripe/resources/cash_balance.rb +2 -0
  65. data/lib/stripe/resources/charge.rb +1454 -0
  66. data/lib/stripe/resources/checkout/session.rb +295 -7
  67. data/lib/stripe/resources/confirmation_token.rb +237 -3
  68. data/lib/stripe/resources/coupon.rb +1 -1
  69. data/lib/stripe/resources/credit_note.rb +10 -0
  70. data/lib/stripe/resources/credit_note_line_item.rb +9 -0
  71. data/lib/stripe/resources/customer.rb +2 -0
  72. data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
  73. data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
  74. data/lib/stripe/resources/customer_session.rb +6 -1
  75. data/lib/stripe/resources/discount.rb +2 -0
  76. data/lib/stripe/resources/event.rb +33 -0
  77. data/lib/stripe/resources/financial_connections/account.rb +20 -1
  78. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +27 -0
  79. data/lib/stripe/resources/financial_connections/institution.rb +90 -0
  80. data/lib/stripe/resources/financial_connections/session.rb +62 -2
  81. data/lib/stripe/resources/gift_cards/card.rb +208 -0
  82. data/lib/stripe/resources/gift_cards/transaction.rb +272 -0
  83. data/lib/stripe/resources/identity/verification_session.rb +10 -0
  84. data/lib/stripe/resources/invoice.rb +1176 -16
  85. data/lib/stripe/resources/invoice_item.rb +78 -2
  86. data/lib/stripe/resources/invoice_line_item.rb +55 -1
  87. data/lib/stripe/resources/invoice_payment.rb +2 -53
  88. data/lib/stripe/resources/issuing/cardholder.rb +2 -1
  89. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +602 -0
  90. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +82 -0
  91. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +86 -0
  92. data/lib/stripe/resources/issuing/settlement.rb +53 -0
  93. data/lib/stripe/resources/issuing/transaction.rb +6 -0
  94. data/lib/stripe/resources/line_item.rb +37 -0
  95. data/lib/stripe/resources/login_link.rb +2 -1
  96. data/lib/stripe/resources/mandate.rb +24 -0
  97. data/lib/stripe/resources/margin.rb +115 -0
  98. data/lib/stripe/resources/order.rb +2859 -0
  99. data/lib/stripe/resources/payment_attempt_record.rb +1078 -0
  100. data/lib/stripe/resources/payment_intent.rb +5242 -440
  101. data/lib/stripe/resources/payment_method.rb +199 -4
  102. data/lib/stripe/resources/payment_method_configuration.rb +295 -0
  103. data/lib/stripe/resources/payment_method_domain.rb +13 -0
  104. data/lib/stripe/resources/payment_record.rb +1607 -0
  105. data/lib/stripe/resources/payout.rb +6 -0
  106. data/lib/stripe/resources/price.rb +30 -0
  107. data/lib/stripe/resources/privacy/redaction_job.rb +251 -0
  108. data/lib/stripe/resources/privacy/redaction_job_root_objects.rb +35 -0
  109. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +54 -0
  110. data/lib/stripe/resources/product.rb +59 -0
  111. data/lib/stripe/resources/promotion_code.rb +10 -0
  112. data/lib/stripe/resources/quote.rb +2042 -6
  113. data/lib/stripe/resources/quote_line.rb +274 -0
  114. data/lib/stripe/resources/quote_preview_invoice.rb +663 -0
  115. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +337 -0
  116. data/lib/stripe/resources/refund.rb +9 -0
  117. data/lib/stripe/resources/setup_attempt.rb +21 -0
  118. data/lib/stripe/resources/setup_intent.rb +605 -18
  119. data/lib/stripe/resources/source.rb +30 -1
  120. data/lib/stripe/resources/subscription.rb +292 -9
  121. data/lib/stripe/resources/subscription_item.rb +84 -3
  122. data/lib/stripe/resources/subscription_schedule.rb +1007 -10
  123. data/lib/stripe/resources/tax/association.rb +89 -0
  124. data/lib/stripe/resources/tax/form.rb +211 -0
  125. data/lib/stripe/resources/tax/registration.rb +20 -0
  126. data/lib/stripe/resources/tax_id.rb +12 -2
  127. data/lib/stripe/resources/terminal/reader.rb +406 -0
  128. data/lib/stripe/resources/terminal/reader_collected_data.rb +31 -0
  129. data/lib/stripe/resources/treasury/financial_account.rb +22 -3
  130. data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
  131. data/lib/stripe/resources/treasury/outbound_transfer.rb +37 -0
  132. data/lib/stripe/resources/treasury/received_credit.rb +38 -1
  133. data/lib/stripe/resources/treasury/received_debit.rb +40 -1
  134. data/lib/stripe/resources/v2/core/account.rb +1715 -0
  135. data/lib/stripe/resources/v2/core/account_link.rb +54 -0
  136. data/lib/stripe/resources/v2/core/person.rb +272 -0
  137. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +72 -0
  138. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +37 -0
  139. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +18 -0
  140. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +20 -0
  141. data/lib/stripe/resources/v2/money_management/adjustment.rb +49 -0
  142. data/lib/stripe/resources/v2/money_management/financial_account.rb +56 -0
  143. data/lib/stripe/resources/v2/money_management/financial_address.rb +66 -0
  144. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +92 -0
  145. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +127 -0
  146. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +74 -0
  147. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +43 -0
  148. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +115 -0
  149. data/lib/stripe/resources/v2/money_management/payout_method.rb +73 -0
  150. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +47 -0
  151. data/lib/stripe/resources/v2/money_management/received_credit.rb +134 -0
  152. data/lib/stripe/resources/v2/money_management/received_debit.rb +106 -0
  153. data/lib/stripe/resources/v2/money_management/transaction.rb +76 -0
  154. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +66 -0
  155. data/lib/stripe/resources.rb +88 -0
  156. data/lib/stripe/services/account_notice_service.rb +101 -0
  157. data/lib/stripe/services/account_service.rb +570 -1
  158. data/lib/stripe/services/account_session_service.rb +269 -1
  159. data/lib/stripe/services/balance_settings_service.rb +96 -0
  160. data/lib/stripe/services/billing/credit_balance_summary_service.rb +4 -1
  161. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +4 -0
  162. data/lib/stripe/services/billing/credit_grant_service.rb +8 -0
  163. data/lib/stripe/services/billing_portal/session_service.rb +4 -0
  164. data/lib/stripe/services/capital/financing_offer_service.rb +112 -0
  165. data/lib/stripe/services/capital/financing_summary_service.rb +28 -0
  166. data/lib/stripe/services/capital/financing_transaction_service.rb +79 -0
  167. data/lib/stripe/services/capital_service.rb +15 -0
  168. data/lib/stripe/services/charge_service.rb +1334 -0
  169. data/lib/stripe/services/checkout/session_service.rb +195 -4
  170. data/lib/stripe/services/credit_note_service.rb +4 -0
  171. data/lib/stripe/services/customer_session_service.rb +4 -1
  172. data/{rbi/stripe/services/account_external_account_service.rbi → lib/stripe/services/external_account_service.rb} +135 -123
  173. data/{rbi/stripe/services/tax/transaction_line_item_service.rbi → lib/stripe/services/financial_connections/account_inferred_balance_service.rb} +21 -17
  174. data/lib/stripe/services/financial_connections/account_service.rb +7 -2
  175. data/{rbi/stripe/services/climate/supplier_service.rbi → lib/stripe/services/financial_connections/institution_service.rb} +36 -25
  176. data/lib/stripe/services/financial_connections/session_service.rb +34 -2
  177. data/lib/stripe/services/financial_connections_service.rb +2 -1
  178. data/lib/stripe/services/gift_cards/card_service.rb +170 -0
  179. data/lib/stripe/services/gift_cards/transaction_service.rb +209 -0
  180. data/lib/stripe/services/gift_cards_service.rb +14 -0
  181. data/lib/stripe/services/identity/verification_session_service.rb +8 -0
  182. data/lib/stripe/services/invoice_item_service.rb +74 -2
  183. data/lib/stripe/services/invoice_line_item_service.rb +33 -1
  184. data/lib/stripe/services/invoice_payment_service.rb +5 -33
  185. data/lib/stripe/services/invoice_service.rb +1088 -17
  186. data/lib/stripe/services/issuing/cardholder_service.rb +2 -1
  187. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +504 -0
  188. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +66 -0
  189. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +83 -0
  190. data/lib/stripe/services/issuing/transaction_service.rb +4 -0
  191. data/lib/stripe/services/issuing_service.rb +5 -1
  192. data/lib/stripe/services/margin_service.rb +119 -0
  193. data/{rbi/stripe/services/source_transaction_service.rbi → lib/stripe/services/order_line_item_service.rb} +20 -16
  194. data/lib/stripe/services/order_service.rb +2268 -0
  195. data/lib/stripe/services/payment_attempt_record_service.rb +49 -0
  196. data/lib/stripe/services/payment_intent_service.rb +4634 -261
  197. data/lib/stripe/services/payment_method_configuration_service.rb +210 -0
  198. data/lib/stripe/services/payment_method_service.rb +129 -4
  199. data/lib/stripe/services/payment_record_service.rb +542 -0
  200. data/lib/stripe/services/payout_service.rb +4 -0
  201. data/lib/stripe/services/price_service.rb +19 -0
  202. data/lib/stripe/services/privacy/redaction_job_service.rb +231 -0
  203. data/{rbi/stripe/services/climate/product_service.rbi → lib/stripe/services/privacy/redaction_job_validation_error_service.rb} +36 -25
  204. data/lib/stripe/services/privacy_service.rb +13 -0
  205. data/lib/stripe/services/product_service.rb +38 -0
  206. data/lib/stripe/services/promotion_code_service.rb +8 -0
  207. data/{rbi/stripe/services/quote_line_item_service.rbi → lib/stripe/services/quote_line_service.rb} +20 -16
  208. data/{rbi/stripe/services/credit_note_line_item_service.rbi → lib/stripe/services/quote_preview_invoice_service.rb} +20 -16
  209. data/{rbi/stripe/services/payment_link_line_item_service.rbi → lib/stripe/services/quote_preview_subscription_schedule_service.rb} +20 -16
  210. data/lib/stripe/services/quote_service.rb +1726 -7
  211. data/lib/stripe/services/setup_intent_service.rb +565 -18
  212. data/lib/stripe/services/subscription_item_service.rb +75 -3
  213. data/lib/stripe/services/subscription_schedule_service.rb +911 -10
  214. data/lib/stripe/services/subscription_service.rb +253 -9
  215. data/lib/stripe/services/tax/association_service.rb +31 -0
  216. data/lib/stripe/services/tax/form_service.rb +100 -0
  217. data/lib/stripe/services/tax/registration_service.rb +13 -0
  218. data/lib/stripe/services/tax_id_service.rb +8 -2
  219. data/lib/stripe/services/tax_service.rb +3 -1
  220. data/lib/stripe/services/terminal/reader_collected_data_service.rb +28 -0
  221. data/lib/stripe/services/terminal/reader_service.rb +180 -0
  222. data/lib/stripe/services/terminal_service.rb +2 -1
  223. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +151 -3
  224. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
  225. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +25 -1
  226. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +25 -1
  227. data/lib/stripe/services/treasury/financial_account_features_service.rb +4 -1
  228. data/lib/stripe/services/treasury/financial_account_service.rb +16 -2
  229. data/lib/stripe/services/treasury/outbound_transfer_service.rb +24 -0
  230. data/lib/stripe/services/v1_services.rb +11 -2
  231. data/lib/stripe/services/v2/core/account_link_service.rb +76 -0
  232. data/lib/stripe/services/v2/core/account_service.rb +4130 -0
  233. data/lib/stripe/services/v2/core/accounts/person_service.rb +1040 -0
  234. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +135 -0
  235. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +109 -0
  236. data/lib/stripe/services/v2/core/vault_service.rb +18 -0
  237. data/lib/stripe/services/v2/core_service.rb +4 -1
  238. data/lib/stripe/services/v2/money_management/adjustment_service.rb +75 -0
  239. data/lib/stripe/services/v2/money_management/financial_account_service.rb +44 -0
  240. data/lib/stripe/services/v2/money_management/financial_address_service.rb +81 -0
  241. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +126 -0
  242. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +80 -0
  243. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +202 -0
  244. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +237 -0
  245. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +174 -0
  246. data/lib/stripe/services/v2/money_management/payout_method_service.rb +95 -0
  247. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +32 -0
  248. data/lib/stripe/services/v2/money_management/received_credit_service.rb +71 -0
  249. data/lib/stripe/services/v2/money_management/received_debit_service.rb +44 -0
  250. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +70 -0
  251. data/lib/stripe/services/v2/money_management/transaction_service.rb +74 -0
  252. data/lib/stripe/services/v2/money_management_service.rb +31 -0
  253. data/lib/stripe/services/v2/test_helper_service.rb +15 -0
  254. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +50 -0
  255. data/lib/stripe/services/v2_services.rb +4 -2
  256. data/lib/stripe/services.rb +52 -0
  257. data/lib/stripe/stripe_configuration.rb +3 -1
  258. data/lib/stripe/stripe_object.rb +1 -1
  259. data/lib/stripe/util.rb +7 -1
  260. data/lib/stripe/version.rb +1 -1
  261. data/lib/stripe.rb +55 -0
  262. data/rbi/stripe.rbi +190156 -0
  263. data/stripe.gemspec +4 -1
  264. metadata +146 -324
  265. data/rbi/stripe/resources/account.rbi +0 -4840
  266. data/rbi/stripe/resources/account_link.rbi +0 -74
  267. data/rbi/stripe/resources/account_session.rbi +0 -894
  268. data/rbi/stripe/resources/apple_pay_domain.rbi +0 -90
  269. data/rbi/stripe/resources/application.rbi +0 -20
  270. data/rbi/stripe/resources/application_fee.rbi +0 -118
  271. data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
  272. data/rbi/stripe/resources/apps/secret.rbi +0 -195
  273. data/rbi/stripe/resources/balance.rbi +0 -180
  274. data/rbi/stripe/resources/balance_transaction.rbi +0 -144
  275. data/rbi/stripe/resources/bank_account.rbi +0 -127
  276. data/rbi/stripe/resources/billing/alert.rbi +0 -201
  277. data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
  278. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -63
  279. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -147
  280. data/rbi/stripe/resources/billing/credit_grant.rbi +0 -291
  281. data/rbi/stripe/resources/billing/meter.rbi +0 -226
  282. data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
  283. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
  284. data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -35
  285. data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -645
  286. data/rbi/stripe/resources/billing_portal/session.rbi +0 -345
  287. data/rbi/stripe/resources/capability.rbi +0 -125
  288. data/rbi/stripe/resources/card.rbi +0 -125
  289. data/rbi/stripe/resources/cash_balance.rbi +0 -32
  290. data/rbi/stripe/resources/charge.rbi +0 -2054
  291. data/rbi/stripe/resources/checkout/session.rbi +0 -3951
  292. data/rbi/stripe/resources/climate/order.rbi +0 -245
  293. data/rbi/stripe/resources/climate/product.rbi +0 -75
  294. data/rbi/stripe/resources/climate/supplier.rbi +0 -72
  295. data/rbi/stripe/resources/confirmation_token.rbi +0 -1793
  296. data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
  297. data/rbi/stripe/resources/country_spec.rbi +0 -85
  298. data/rbi/stripe/resources/coupon.rbi +0 -252
  299. data/rbi/stripe/resources/credit_note.rbi +0 -747
  300. data/rbi/stripe/resources/credit_note_line_item.rbi +0 -101
  301. data/rbi/stripe/resources/customer.rbi +0 -1009
  302. data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -56
  303. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
  304. data/rbi/stripe/resources/customer_session.rbi +0 -200
  305. data/rbi/stripe/resources/discount.rbi +0 -53
  306. data/rbi/stripe/resources/dispute.rbi +0 -761
  307. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -58
  308. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
  309. data/rbi/stripe/resources/entitlements/feature.rbi +0 -117
  310. data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
  311. data/rbi/stripe/resources/event.rbi +0 -146
  312. data/rbi/stripe/resources/exchange_rate.rbi +0 -66
  313. data/rbi/stripe/resources/file.rbi +0 -143
  314. data/rbi/stripe/resources/file_link.rbi +0 -141
  315. data/rbi/stripe/resources/financial_connections/account.rbi +0 -339
  316. data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
  317. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
  318. data/rbi/stripe/resources/financial_connections/session.rbi +0 -123
  319. data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -124
  320. data/rbi/stripe/resources/forwarding/request.rbi +0 -216
  321. data/rbi/stripe/resources/funding_instructions.rbi +0 -437
  322. data/rbi/stripe/resources/identity/verification_report.rbi +0 -351
  323. data/rbi/stripe/resources/identity/verification_session.rbi +0 -517
  324. data/rbi/stripe/resources/invoice.rbi +0 -3733
  325. data/rbi/stripe/resources/invoice_item.rbi +0 -475
  326. data/rbi/stripe/resources/invoice_line_item.rbi +0 -432
  327. data/rbi/stripe/resources/invoice_payment.rbi +0 -114
  328. data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -104
  329. data/rbi/stripe/resources/issuing/authorization.rbi +0 -1283
  330. data/rbi/stripe/resources/issuing/card.rbi +0 -741
  331. data/rbi/stripe/resources/issuing/cardholder.rbi +0 -744
  332. data/rbi/stripe/resources/issuing/dispute.rbi +0 -913
  333. data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -338
  334. data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -79
  335. data/rbi/stripe/resources/issuing/token.rbi +0 -226
  336. data/rbi/stripe/resources/issuing/transaction.rbi +0 -1061
  337. data/rbi/stripe/resources/line_item.rbi +0 -72
  338. data/rbi/stripe/resources/login_link.rbi +0 -18
  339. data/rbi/stripe/resources/mandate.rbi +0 -187
  340. data/rbi/stripe/resources/payment_intent.rbi +0 -9731
  341. data/rbi/stripe/resources/payment_link.rbi +0 -1801
  342. data/rbi/stripe/resources/payment_method.rbi +0 -1822
  343. data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3154
  344. data/rbi/stripe/resources/payment_method_domain.rbi +0 -212
  345. data/rbi/stripe/resources/payout.rbi +0 -300
  346. data/rbi/stripe/resources/person.rbi +0 -371
  347. data/rbi/stripe/resources/plan.rbi +0 -373
  348. data/rbi/stripe/resources/price.rbi +0 -694
  349. data/rbi/stripe/resources/product.rbi +0 -557
  350. data/rbi/stripe/resources/product_feature.rbi +0 -26
  351. data/rbi/stripe/resources/promotion_code.rbi +0 -261
  352. data/rbi/stripe/resources/quote.rbi +0 -1123
  353. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -98
  354. data/rbi/stripe/resources/radar/value_list.rbi +0 -170
  355. data/rbi/stripe/resources/radar/value_list_item.rbi +0 -131
  356. data/rbi/stripe/resources/refund.rbi +0 -516
  357. data/rbi/stripe/resources/reporting/report_run.rbi +0 -191
  358. data/rbi/stripe/resources/reporting/report_type.rbi +0 -57
  359. data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
  360. data/rbi/stripe/resources/reversal.rbi +0 -51
  361. data/rbi/stripe/resources/review.rbi +0 -154
  362. data/rbi/stripe/resources/setup_attempt.rbi +0 -477
  363. data/rbi/stripe/resources/setup_intent.rbi +0 -3860
  364. data/rbi/stripe/resources/shipping_rate.rbi +0 -305
  365. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -75
  366. data/rbi/stripe/resources/source.rbi +0 -1496
  367. data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
  368. data/rbi/stripe/resources/source_transaction.rbi +0 -127
  369. data/rbi/stripe/resources/subscription.rbi +0 -1964
  370. data/rbi/stripe/resources/subscription_item.rbi +0 -370
  371. data/rbi/stripe/resources/subscription_schedule.rbi +0 -1495
  372. data/rbi/stripe/resources/tax/calculation.rbi +0 -474
  373. data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -88
  374. data/rbi/stripe/resources/tax/registration.rbi +0 -2485
  375. data/rbi/stripe/resources/tax/settings.rbi +0 -141
  376. data/rbi/stripe/resources/tax/transaction.rbi +0 -351
  377. data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
  378. data/rbi/stripe/resources/tax_code.rbi +0 -44
  379. data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
  380. data/rbi/stripe/resources/tax_id.rbi +0 -167
  381. data/rbi/stripe/resources/tax_rate.rbi +0 -239
  382. data/rbi/stripe/resources/terminal/configuration.rbi +0 -1388
  383. data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
  384. data/rbi/stripe/resources/terminal/location.rbi +0 -224
  385. data/rbi/stripe/resources/terminal/reader.rbi +0 -587
  386. data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -134
  387. data/rbi/stripe/resources/token.rbi +0 -1217
  388. data/rbi/stripe/resources/topup.rbi +0 -222
  389. data/rbi/stripe/resources/transfer.rbi +0 -199
  390. data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -119
  391. data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -131
  392. data/rbi/stripe/resources/treasury/financial_account.rbi +0 -865
  393. data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -260
  394. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -295
  395. data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -592
  396. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -431
  397. data/rbi/stripe/resources/treasury/received_credit.rbi +0 -302
  398. data/rbi/stripe/resources/treasury/received_debit.rbi +0 -256
  399. data/rbi/stripe/resources/treasury/transaction.rbi +0 -215
  400. data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -192
  401. data/rbi/stripe/resources/v2/amount.rbi +0 -14
  402. data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
  403. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
  404. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
  405. data/rbi/stripe/resources/v2/event.rbi +0 -48
  406. data/rbi/stripe/resources/v2/event_destination.rbi +0 -91
  407. data/rbi/stripe/resources/webhook_endpoint.rbi +0 -170
  408. data/rbi/stripe/services/account_capability_service.rbi +0 -51
  409. data/rbi/stripe/services/account_link_service.rbi +0 -58
  410. data/rbi/stripe/services/account_login_link_service.rbi +0 -22
  411. data/rbi/stripe/services/account_person_service.rbi +0 -923
  412. data/rbi/stripe/services/account_service.rbi +0 -4143
  413. data/rbi/stripe/services/account_session_service.rbi +0 -572
  414. data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -78
  415. data/rbi/stripe/services/application_fee_refund_service.rbi +0 -93
  416. data/rbi/stripe/services/application_fee_service.rbi +0 -78
  417. data/rbi/stripe/services/apps/secret_service.rbi +0 -151
  418. data/rbi/stripe/services/apps_service.rbi +0 -9
  419. data/rbi/stripe/services/balance_service.rbi +0 -21
  420. data/rbi/stripe/services/balance_transaction_service.rbi +0 -93
  421. data/rbi/stripe/services/billing/alert_service.rbi +0 -152
  422. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -68
  423. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
  424. data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -211
  425. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -42
  426. data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
  427. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
  428. data/rbi/stripe/services/billing/meter_service.rbi +0 -163
  429. data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -511
  430. data/rbi/stripe/services/billing_portal/session_service.rbi +0 -204
  431. data/rbi/stripe/services/billing_portal_service.rbi +0 -10
  432. data/rbi/stripe/services/billing_service.rbi +0 -15
  433. data/rbi/stripe/services/charge_service.rbi +0 -448
  434. data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
  435. data/rbi/stripe/services/checkout/session_service.rbi +0 -2585
  436. data/rbi/stripe/services/checkout_service.rbi +0 -9
  437. data/rbi/stripe/services/climate/order_service.rbi +0 -142
  438. data/rbi/stripe/services/climate_service.rbi +0 -11
  439. data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
  440. data/rbi/stripe/services/country_spec_service.rbi +0 -44
  441. data/rbi/stripe/services/coupon_service.rbi +0 -196
  442. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
  443. data/rbi/stripe/services/credit_note_service.rbi +0 -416
  444. data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
  445. data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
  446. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
  447. data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
  448. data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
  449. data/rbi/stripe/services/customer_payment_source_service.rbi +0 -232
  450. data/rbi/stripe/services/customer_service.rbi +0 -651
  451. data/rbi/stripe/services/customer_session_service.rbi +0 -116
  452. data/rbi/stripe/services/customer_tax_id_service.rbi +0 -72
  453. data/rbi/stripe/services/dispute_service.rbi +0 -424
  454. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
  455. data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
  456. data/rbi/stripe/services/entitlements_service.rbi +0 -10
  457. data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
  458. data/rbi/stripe/services/event_service.rbi +0 -83
  459. data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
  460. data/rbi/stripe/services/file_link_service.rbi +0 -124
  461. data/rbi/stripe/services/file_service.rbi +0 -116
  462. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
  463. data/rbi/stripe/services/financial_connections/account_service.rbi +0 -133
  464. data/rbi/stripe/services/financial_connections/session_service.rbi +0 -88
  465. data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -92
  466. data/rbi/stripe/services/financial_connections_service.rbi +0 -11
  467. data/rbi/stripe/services/forwarding/request_service.rbi +0 -134
  468. data/rbi/stripe/services/forwarding_service.rbi +0 -9
  469. data/rbi/stripe/services/identity/verification_report_service.rbi +0 -87
  470. data/rbi/stripe/services/identity/verification_session_service.rbi +0 -323
  471. data/rbi/stripe/services/identity_service.rbi +0 -10
  472. data/rbi/stripe/services/invoice_item_service.rbi +0 -368
  473. data/rbi/stripe/services/invoice_line_item_service.rbi +0 -259
  474. data/rbi/stripe/services/invoice_payment_service.rbi +0 -71
  475. data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
  476. data/rbi/stripe/services/invoice_service.rbi +0 -2920
  477. data/rbi/stripe/services/issuing/authorization_service.rbi +0 -146
  478. data/rbi/stripe/services/issuing/card_service.rbi +0 -495
  479. data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -587
  480. data/rbi/stripe/services/issuing/dispute_service.rbi +0 -707
  481. data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -243
  482. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
  483. data/rbi/stripe/services/issuing/token_service.rbi +0 -99
  484. data/rbi/stripe/services/issuing/transaction_service.rbi +0 -105
  485. data/rbi/stripe/services/issuing_service.rbi +0 -16
  486. data/rbi/stripe/services/mandate_service.rbi +0 -20
  487. data/rbi/stripe/services/payment_intent_service.rbi +0 -7759
  488. data/rbi/stripe/services/payment_link_service.rbi +0 -1352
  489. data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2211
  490. data/rbi/stripe/services/payment_method_domain_service.rbi +0 -112
  491. data/rbi/stripe/services/payment_method_service.rbi +0 -840
  492. data/rbi/stripe/services/payout_service.rbi +0 -205
  493. data/rbi/stripe/services/plan_service.rbi +0 -284
  494. data/rbi/stripe/services/price_service.rbi +0 -546
  495. data/rbi/stripe/services/product_feature_service.rbi +0 -69
  496. data/rbi/stripe/services/product_service.rbi +0 -479
  497. data/rbi/stripe/services/promotion_code_service.rbi +0 -214
  498. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
  499. data/rbi/stripe/services/quote_service.rbi +0 -686
  500. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -85
  501. data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -111
  502. data/rbi/stripe/services/radar/value_list_service.rbi +0 -143
  503. data/rbi/stripe/services/radar_service.rbi +0 -11
  504. data/rbi/stripe/services/refund_service.rbi +0 -185
  505. data/rbi/stripe/services/reporting/report_run_service.rbi +0 -135
  506. data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
  507. data/rbi/stripe/services/reporting_service.rbi +0 -10
  508. data/rbi/stripe/services/review_service.rbi +0 -84
  509. data/rbi/stripe/services/setup_attempt_service.rbi +0 -65
  510. data/rbi/stripe/services/setup_intent_service.rbi +0 -3596
  511. data/rbi/stripe/services/shipping_rate_service.rbi +0 -241
  512. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
  513. data/rbi/stripe/services/sigma_service.rbi +0 -9
  514. data/rbi/stripe/services/source_service.rbi +0 -663
  515. data/rbi/stripe/services/subscription_item_service.rbi +0 -324
  516. data/rbi/stripe/services/subscription_schedule_service.rbi +0 -1192
  517. data/rbi/stripe/services/subscription_service.rbi +0 -1596
  518. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +0 -33
  519. data/rbi/stripe/services/tax/calculation_service.rbi +0 -230
  520. data/rbi/stripe/services/tax/registration_service.rbi +0 -1689
  521. data/rbi/stripe/services/tax/settings_service.rbi +0 -93
  522. data/rbi/stripe/services/tax/transaction_service.rbi +0 -146
  523. data/rbi/stripe/services/tax_code_service.rbi +0 -44
  524. data/rbi/stripe/services/tax_id_service.rbi +0 -112
  525. data/rbi/stripe/services/tax_rate_service.rbi +0 -185
  526. data/rbi/stripe/services/tax_service.rbi +0 -12
  527. data/rbi/stripe/services/terminal/configuration_service.rbi +0 -1120
  528. data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
  529. data/rbi/stripe/services/terminal/location_service.rbi +0 -184
  530. data/rbi/stripe/services/terminal/reader_service.rbi +0 -344
  531. data/rbi/stripe/services/terminal_service.rbi +0 -12
  532. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -746
  533. data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
  534. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -848
  535. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
  536. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -69
  537. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -711
  538. data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
  539. data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
  540. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -62
  541. data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
  542. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -92
  543. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
  544. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -125
  545. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -125
  546. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -87
  547. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -87
  548. data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
  549. data/rbi/stripe/services/test_helpers_service.rbi +0 -15
  550. data/rbi/stripe/services/token_service.rbi +0 -1189
  551. data/rbi/stripe/services/topup_service.rbi +0 -176
  552. data/rbi/stripe/services/transfer_reversal_service.rbi +0 -101
  553. data/rbi/stripe/services/transfer_service.rbi +0 -152
  554. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
  555. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
  556. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -198
  557. data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -562
  558. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
  559. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -304
  560. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -157
  561. data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -72
  562. data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
  563. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -111
  564. data/rbi/stripe/services/treasury/transaction_service.rbi +0 -122
  565. data/rbi/stripe/services/treasury_service.rbi +0 -18
  566. data/rbi/stripe/services/v1_services.rbi +0 -77
  567. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
  568. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
  569. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -20
  570. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
  571. data/rbi/stripe/services/v2/billing_service.rbi +0 -14
  572. data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -200
  573. data/rbi/stripe/services/v2/core/event_service.rbi +0 -38
  574. data/rbi/stripe/services/v2/core_service.rbi +0 -12
  575. data/rbi/stripe/services/v2_services.rbi +0 -10
  576. data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -131
@@ -1,1596 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- # typed: true
5
- module Stripe
6
- class SubscriptionService < StripeService
7
- class CancelParams < Stripe::RequestParams
8
- class CancellationDetails < Stripe::RequestParams
9
- # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
10
- sig { returns(T.nilable(T.nilable(String))) }
11
- attr_accessor :comment
12
- # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
13
- sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
14
- attr_accessor :feedback
15
- sig {
16
- params(comment: T.nilable(T.nilable(String)), feedback: T.nilable(T.nilable(T.any(String, String)))).void
17
- }
18
- def initialize(comment: nil, feedback: nil); end
19
- end
20
- # Details about why this subscription was cancelled
21
- sig { returns(T.nilable(::Stripe::SubscriptionService::CancelParams::CancellationDetails)) }
22
- attr_accessor :cancellation_details
23
- # Specifies which fields in the response should be expanded.
24
- sig { returns(T.nilable(T::Array[String])) }
25
- attr_accessor :expand
26
- # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.
27
- sig { returns(T.nilable(T::Boolean)) }
28
- attr_accessor :invoice_now
29
- # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`.
30
- sig { returns(T.nilable(T::Boolean)) }
31
- attr_accessor :prorate
32
- sig {
33
- params(cancellation_details: T.nilable(::Stripe::SubscriptionService::CancelParams::CancellationDetails), expand: T.nilable(T::Array[String]), invoice_now: T.nilable(T::Boolean), prorate: T.nilable(T::Boolean)).void
34
- }
35
- def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil); end
36
- end
37
- class RetrieveParams < Stripe::RequestParams
38
- # Specifies which fields in the response should be expanded.
39
- sig { returns(T.nilable(T::Array[String])) }
40
- attr_accessor :expand
41
- sig { params(expand: T.nilable(T::Array[String])).void }
42
- def initialize(expand: nil); end
43
- end
44
- class UpdateParams < Stripe::RequestParams
45
- class AddInvoiceItem < Stripe::RequestParams
46
- class Discount < Stripe::RequestParams
47
- # ID of the coupon to create a new discount for.
48
- sig { returns(T.nilable(String)) }
49
- attr_accessor :coupon
50
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
51
- sig { returns(T.nilable(String)) }
52
- attr_accessor :discount
53
- # ID of the promotion code to create a new discount for.
54
- sig { returns(T.nilable(String)) }
55
- attr_accessor :promotion_code
56
- sig {
57
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
58
- }
59
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
60
- end
61
- class PriceData < Stripe::RequestParams
62
- # 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).
63
- sig { returns(String) }
64
- attr_accessor :currency
65
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
66
- sig { returns(String) }
67
- attr_accessor :product
68
- # 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.
69
- sig { returns(T.nilable(String)) }
70
- attr_accessor :tax_behavior
71
- # 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.
72
- sig { returns(T.nilable(Integer)) }
73
- attr_accessor :unit_amount
74
- # 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.
75
- sig { returns(T.nilable(String)) }
76
- attr_accessor :unit_amount_decimal
77
- sig {
78
- params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
79
- }
80
- def initialize(
81
- currency: nil,
82
- product: nil,
83
- tax_behavior: nil,
84
- unit_amount: nil,
85
- unit_amount_decimal: nil
86
- ); end
87
- end
88
- # The coupons to redeem into discounts for the item.
89
- sig {
90
- returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount]))
91
- }
92
- attr_accessor :discounts
93
- # The ID of the price object. One of `price` or `price_data` is required.
94
- sig { returns(T.nilable(String)) }
95
- attr_accessor :price
96
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
97
- sig {
98
- returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::PriceData))
99
- }
100
- attr_accessor :price_data
101
- # Quantity for this item. Defaults to 1.
102
- sig { returns(T.nilable(Integer)) }
103
- attr_accessor :quantity
104
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
105
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
106
- attr_accessor :tax_rates
107
- sig {
108
- params(discounts: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
109
- }
110
- def initialize(
111
- discounts: nil,
112
- price: nil,
113
- price_data: nil,
114
- quantity: nil,
115
- tax_rates: nil
116
- ); end
117
- end
118
- class AutomaticTax < Stripe::RequestParams
119
- class Liability < Stripe::RequestParams
120
- # The connected account being referenced when `type` is `account`.
121
- sig { returns(T.nilable(String)) }
122
- attr_accessor :account
123
- # Type of the account referenced in the request.
124
- sig { returns(String) }
125
- attr_accessor :type
126
- sig { params(account: T.nilable(String), type: String).void }
127
- def initialize(account: nil, type: nil); end
128
- end
129
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
130
- sig { returns(T::Boolean) }
131
- attr_accessor :enabled
132
- # 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.
133
- sig {
134
- returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax::Liability))
135
- }
136
- attr_accessor :liability
137
- sig {
138
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax::Liability)).void
139
- }
140
- def initialize(enabled: nil, liability: nil); end
141
- end
142
- class CancellationDetails < Stripe::RequestParams
143
- # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
144
- sig { returns(T.nilable(T.nilable(String))) }
145
- attr_accessor :comment
146
- # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
147
- sig { returns(T.nilable(T.nilable(T.any(String, String)))) }
148
- attr_accessor :feedback
149
- sig {
150
- params(comment: T.nilable(T.nilable(String)), feedback: T.nilable(T.nilable(T.any(String, String)))).void
151
- }
152
- def initialize(comment: nil, feedback: nil); end
153
- end
154
- class Discount < Stripe::RequestParams
155
- # ID of the coupon to create a new discount for.
156
- sig { returns(T.nilable(String)) }
157
- attr_accessor :coupon
158
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
159
- sig { returns(T.nilable(String)) }
160
- attr_accessor :discount
161
- # ID of the promotion code to create a new discount for.
162
- sig { returns(T.nilable(String)) }
163
- attr_accessor :promotion_code
164
- sig {
165
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
166
- }
167
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
168
- end
169
- class InvoiceSettings < Stripe::RequestParams
170
- class Issuer < Stripe::RequestParams
171
- # The connected account being referenced when `type` is `account`.
172
- sig { returns(T.nilable(String)) }
173
- attr_accessor :account
174
- # Type of the account referenced in the request.
175
- sig { returns(String) }
176
- attr_accessor :type
177
- sig { params(account: T.nilable(String), type: String).void }
178
- def initialize(account: nil, type: nil); end
179
- end
180
- # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
181
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
182
- attr_accessor :account_tax_ids
183
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
184
- sig {
185
- returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings::Issuer))
186
- }
187
- attr_accessor :issuer
188
- sig {
189
- params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), issuer: T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings::Issuer)).void
190
- }
191
- def initialize(account_tax_ids: nil, issuer: nil); end
192
- end
193
- class Item < Stripe::RequestParams
194
- class Discount < Stripe::RequestParams
195
- # ID of the coupon to create a new discount for.
196
- sig { returns(T.nilable(String)) }
197
- attr_accessor :coupon
198
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
199
- sig { returns(T.nilable(String)) }
200
- attr_accessor :discount
201
- # ID of the promotion code to create a new discount for.
202
- sig { returns(T.nilable(String)) }
203
- attr_accessor :promotion_code
204
- sig {
205
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
206
- }
207
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
208
- end
209
- class PriceData < Stripe::RequestParams
210
- class Recurring < Stripe::RequestParams
211
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
212
- sig { returns(String) }
213
- attr_accessor :interval
214
- # 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).
215
- sig { returns(T.nilable(Integer)) }
216
- attr_accessor :interval_count
217
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
218
- def initialize(interval: nil, interval_count: nil); end
219
- end
220
- # 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).
221
- sig { returns(String) }
222
- attr_accessor :currency
223
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
224
- sig { returns(String) }
225
- attr_accessor :product
226
- # The recurring components of a price such as `interval` and `interval_count`.
227
- sig { returns(::Stripe::SubscriptionService::UpdateParams::Item::PriceData::Recurring) }
228
- attr_accessor :recurring
229
- # 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.
230
- sig { returns(T.nilable(String)) }
231
- attr_accessor :tax_behavior
232
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
233
- sig { returns(T.nilable(Integer)) }
234
- attr_accessor :unit_amount
235
- # 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.
236
- sig { returns(T.nilable(String)) }
237
- attr_accessor :unit_amount_decimal
238
- sig {
239
- params(currency: String, product: String, recurring: ::Stripe::SubscriptionService::UpdateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
240
- }
241
- def initialize(
242
- currency: nil,
243
- product: nil,
244
- recurring: nil,
245
- tax_behavior: nil,
246
- unit_amount: nil,
247
- unit_amount_decimal: nil
248
- ); end
249
- end
250
- # 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.
251
- sig { returns(T.nilable(T::Boolean)) }
252
- attr_accessor :clear_usage
253
- # A flag that, if set to `true`, will delete the specified item.
254
- sig { returns(T.nilable(T::Boolean)) }
255
- attr_accessor :deleted
256
- # The coupons to redeem into discounts for the subscription item.
257
- sig {
258
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Item::Discount]))))
259
- }
260
- attr_accessor :discounts
261
- # Subscription item to update.
262
- sig { returns(T.nilable(String)) }
263
- attr_accessor :id
264
- # 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`.
265
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
266
- attr_accessor :metadata
267
- # Plan ID for this item, as a string.
268
- sig { returns(T.nilable(String)) }
269
- attr_accessor :plan
270
- # 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.
271
- sig { returns(T.nilable(String)) }
272
- attr_accessor :price
273
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
274
- sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::Item::PriceData)) }
275
- attr_accessor :price_data
276
- # Quantity for this item.
277
- sig { returns(T.nilable(Integer)) }
278
- attr_accessor :quantity
279
- # 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.
280
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
281
- attr_accessor :tax_rates
282
- sig {
283
- params(clear_usage: T.nilable(T::Boolean), deleted: T.nilable(T::Boolean), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Item::Discount]))), id: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionService::UpdateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
284
- }
285
- def initialize(
286
- clear_usage: nil,
287
- deleted: nil,
288
- discounts: nil,
289
- id: nil,
290
- metadata: nil,
291
- plan: nil,
292
- price: nil,
293
- price_data: nil,
294
- quantity: nil,
295
- tax_rates: nil
296
- ); end
297
- end
298
- class PauseCollection < Stripe::RequestParams
299
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
300
- sig { returns(String) }
301
- attr_accessor :behavior
302
- # The time after which the subscription will resume collecting payments.
303
- sig { returns(T.nilable(Integer)) }
304
- attr_accessor :resumes_at
305
- sig { params(behavior: String, resumes_at: T.nilable(Integer)).void }
306
- def initialize(behavior: nil, resumes_at: nil); end
307
- end
308
- class PaymentSettings < Stripe::RequestParams
309
- class PaymentMethodOptions < Stripe::RequestParams
310
- class AcssDebit < Stripe::RequestParams
311
- class MandateOptions < Stripe::RequestParams
312
- # Transaction type of the mandate.
313
- sig { returns(T.nilable(String)) }
314
- attr_accessor :transaction_type
315
- sig { params(transaction_type: T.nilable(String)).void }
316
- def initialize(transaction_type: nil); end
317
- end
318
- # Additional fields for Mandate creation
319
- sig {
320
- returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
321
- }
322
- attr_accessor :mandate_options
323
- # Verification method for the intent
324
- sig { returns(T.nilable(String)) }
325
- attr_accessor :verification_method
326
- sig {
327
- params(mandate_options: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
328
- }
329
- def initialize(mandate_options: nil, verification_method: nil); end
330
- end
331
- class Bancontact < Stripe::RequestParams
332
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
333
- sig { returns(T.nilable(String)) }
334
- attr_accessor :preferred_language
335
- sig { params(preferred_language: T.nilable(String)).void }
336
- def initialize(preferred_language: nil); end
337
- end
338
- class Card < Stripe::RequestParams
339
- class MandateOptions < Stripe::RequestParams
340
- # Amount to be charged for future payments.
341
- sig { returns(T.nilable(Integer)) }
342
- attr_accessor :amount
343
- # 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.
344
- sig { returns(T.nilable(String)) }
345
- attr_accessor :amount_type
346
- # A description of the mandate or subscription that is meant to be displayed to the customer.
347
- sig { returns(T.nilable(String)) }
348
- attr_accessor :description
349
- sig {
350
- params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
351
- }
352
- def initialize(amount: nil, amount_type: nil, description: nil); end
353
- end
354
- # Configuration options for setting up an eMandate for cards issued in India.
355
- sig {
356
- returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
357
- }
358
- attr_accessor :mandate_options
359
- # 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.
360
- sig { returns(T.nilable(String)) }
361
- attr_accessor :network
362
- # 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.
363
- sig { returns(T.nilable(String)) }
364
- attr_accessor :request_three_d_secure
365
- sig {
366
- params(mandate_options: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
367
- }
368
- def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
369
- end
370
- class CustomerBalance < Stripe::RequestParams
371
- class BankTransfer < Stripe::RequestParams
372
- class EuBankTransfer < Stripe::RequestParams
373
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
374
- sig { returns(String) }
375
- attr_accessor :country
376
- sig { params(country: String).void }
377
- def initialize(country: nil); end
378
- end
379
- # Configuration for eu_bank_transfer funding type.
380
- sig {
381
- returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
382
- }
383
- attr_accessor :eu_bank_transfer
384
- # 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`.
385
- sig { returns(T.nilable(String)) }
386
- attr_accessor :type
387
- sig {
388
- params(eu_bank_transfer: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
389
- }
390
- def initialize(eu_bank_transfer: nil, type: nil); end
391
- end
392
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
393
- sig {
394
- returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
395
- }
396
- attr_accessor :bank_transfer
397
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
398
- sig { returns(T.nilable(String)) }
399
- attr_accessor :funding_type
400
- sig {
401
- params(bank_transfer: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
402
- }
403
- def initialize(bank_transfer: nil, funding_type: nil); end
404
- end
405
- class Konbini < Stripe::RequestParams
406
-
407
- end
408
- class SepaDebit < Stripe::RequestParams
409
-
410
- end
411
- class UsBankAccount < Stripe::RequestParams
412
- class FinancialConnections < Stripe::RequestParams
413
- class Filters < Stripe::RequestParams
414
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
415
- sig { returns(T.nilable(T::Array[String])) }
416
- attr_accessor :account_subcategories
417
- sig { params(account_subcategories: T.nilable(T::Array[String])).void }
418
- def initialize(account_subcategories: nil); end
419
- end
420
- # Provide filters for the linked accounts that the customer can select for the payment method.
421
- sig {
422
- returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
423
- }
424
- attr_accessor :filters
425
- # 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`.
426
- sig { returns(T.nilable(T::Array[String])) }
427
- attr_accessor :permissions
428
- # List of data features that you would like to retrieve upon account creation.
429
- sig { returns(T.nilable(T::Array[String])) }
430
- attr_accessor :prefetch
431
- sig {
432
- params(filters: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
433
- }
434
- def initialize(filters: nil, permissions: nil, prefetch: nil); end
435
- end
436
- # Additional fields for Financial Connections Session creation
437
- sig {
438
- returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
439
- }
440
- attr_accessor :financial_connections
441
- # Verification method for the intent
442
- sig { returns(T.nilable(String)) }
443
- attr_accessor :verification_method
444
- sig {
445
- params(financial_connections: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
446
- }
447
- def initialize(financial_connections: nil, verification_method: nil); end
448
- end
449
- # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
450
- sig {
451
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
452
- }
453
- attr_accessor :acss_debit
454
- # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
455
- sig {
456
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
457
- }
458
- attr_accessor :bancontact
459
- # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
460
- sig {
461
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))))
462
- }
463
- attr_accessor :card
464
- # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
465
- sig {
466
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
467
- }
468
- attr_accessor :customer_balance
469
- # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
470
- sig {
471
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
472
- }
473
- attr_accessor :konbini
474
- # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
475
- sig {
476
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
477
- }
478
- attr_accessor :sepa_debit
479
- # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
480
- sig {
481
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
482
- }
483
- attr_accessor :us_bank_account
484
- sig {
485
- params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
486
- }
487
- def initialize(
488
- acss_debit: nil,
489
- bancontact: nil,
490
- card: nil,
491
- customer_balance: nil,
492
- konbini: nil,
493
- sepa_debit: nil,
494
- us_bank_account: nil
495
- ); end
496
- end
497
- # Payment-method-specific configuration to provide to invoices created by the subscription.
498
- sig {
499
- returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions))
500
- }
501
- attr_accessor :payment_method_options
502
- # 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
503
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
504
- attr_accessor :payment_method_types
505
- # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
506
- sig { returns(T.nilable(String)) }
507
- attr_accessor :save_default_payment_method
508
- sig {
509
- params(payment_method_options: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String]))), save_default_payment_method: T.nilable(String)).void
510
- }
511
- def initialize(
512
- payment_method_options: nil,
513
- payment_method_types: nil,
514
- save_default_payment_method: nil
515
- ); end
516
- end
517
- class PendingInvoiceItemInterval < Stripe::RequestParams
518
- # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
519
- sig { returns(String) }
520
- attr_accessor :interval
521
- # 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).
522
- sig { returns(T.nilable(Integer)) }
523
- attr_accessor :interval_count
524
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
525
- def initialize(interval: nil, interval_count: nil); end
526
- end
527
- class TransferData < Stripe::RequestParams
528
- # 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.
529
- sig { returns(T.nilable(Float)) }
530
- attr_accessor :amount_percent
531
- # ID of an existing, connected Stripe account.
532
- sig { returns(String) }
533
- attr_accessor :destination
534
- sig { params(amount_percent: T.nilable(Float), destination: String).void }
535
- def initialize(amount_percent: nil, destination: nil); end
536
- end
537
- class TrialSettings < Stripe::RequestParams
538
- class EndBehavior < Stripe::RequestParams
539
- # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
540
- sig { returns(String) }
541
- attr_accessor :missing_payment_method
542
- sig { params(missing_payment_method: String).void }
543
- def initialize(missing_payment_method: nil); end
544
- end
545
- # Defines how the subscription should behave when the user's free trial ends.
546
- sig { returns(::Stripe::SubscriptionService::UpdateParams::TrialSettings::EndBehavior) }
547
- attr_accessor :end_behavior
548
- sig {
549
- params(end_behavior: ::Stripe::SubscriptionService::UpdateParams::TrialSettings::EndBehavior).void
550
- }
551
- def initialize(end_behavior: nil); end
552
- end
553
- # 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.
554
- sig {
555
- returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem]))
556
- }
557
- attr_accessor :add_invoice_items
558
- # 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).
559
- sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
560
- attr_accessor :application_fee_percent
561
- # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
562
- sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax)) }
563
- attr_accessor :automatic_tax
564
- # 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).
565
- sig { returns(T.nilable(String)) }
566
- attr_accessor :billing_cycle_anchor
567
- # 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.
568
- sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
569
- attr_accessor :cancel_at
570
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
571
- sig { returns(T.nilable(T::Boolean)) }
572
- attr_accessor :cancel_at_period_end
573
- # Details about why this subscription was cancelled
574
- sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::CancellationDetails)) }
575
- attr_accessor :cancellation_details
576
- # 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`.
577
- sig { returns(T.nilable(String)) }
578
- attr_accessor :collection_method
579
- # 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`.
580
- sig { returns(T.nilable(Integer)) }
581
- attr_accessor :days_until_due
582
- # 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).
583
- sig { returns(T.nilable(String)) }
584
- attr_accessor :default_payment_method
585
- # 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).
586
- sig { returns(T.nilable(T.nilable(String))) }
587
- attr_accessor :default_source
588
- # 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.
589
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
590
- attr_accessor :default_tax_rates
591
- # 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.
592
- sig { returns(T.nilable(T.nilable(String))) }
593
- attr_accessor :description
594
- # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
595
- sig {
596
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Discount]))))
597
- }
598
- attr_accessor :discounts
599
- # Specifies which fields in the response should be expanded.
600
- sig { returns(T.nilable(T::Array[String])) }
601
- attr_accessor :expand
602
- # All invoices will be billed using the specified settings.
603
- sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings)) }
604
- attr_accessor :invoice_settings
605
- # A list of up to 20 subscription items, each with an attached price.
606
- sig { returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::Item])) }
607
- attr_accessor :items
608
- # 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`.
609
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
610
- attr_accessor :metadata
611
- # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
612
- sig { returns(T.nilable(T::Boolean)) }
613
- attr_accessor :off_session
614
- # The account on behalf of which to charge, for each of the subscription's invoices.
615
- sig { returns(T.nilable(T.nilable(String))) }
616
- attr_accessor :on_behalf_of
617
- # 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).
618
- sig {
619
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PauseCollection))))
620
- }
621
- attr_accessor :pause_collection
622
- # 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.
623
- #
624
- # 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.
625
- #
626
- # 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).
627
- #
628
- # 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://stripe.com/docs/upgrades#2019-03-14) to learn more.
629
- sig { returns(T.nilable(String)) }
630
- attr_accessor :payment_behavior
631
- # Payment settings to pass to invoices created by the subscription.
632
- sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings)) }
633
- attr_accessor :payment_settings
634
- # 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.
635
- sig {
636
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PendingInvoiceItemInterval))))
637
- }
638
- attr_accessor :pending_invoice_item_interval
639
- # 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`.
640
- sig { returns(T.nilable(String)) }
641
- attr_accessor :proration_behavior
642
- # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It 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.
643
- sig { returns(T.nilable(Integer)) }
644
- attr_accessor :proration_date
645
- # 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.
646
- sig {
647
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::TransferData))))
648
- }
649
- attr_accessor :transfer_data
650
- # 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 special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`.
651
- sig { returns(T.nilable(T.any(String, Integer))) }
652
- attr_accessor :trial_end
653
- # 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.
654
- sig { returns(T.nilable(T::Boolean)) }
655
- attr_accessor :trial_from_plan
656
- # Settings related to subscription trials.
657
- sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::TrialSettings)) }
658
- attr_accessor :trial_settings
659
- sig {
660
- params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax), billing_cycle_anchor: T.nilable(String), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancellation_details: T.nilable(::Stripe::SubscriptionService::UpdateParams::CancellationDetails), collection_method: T.nilable(String), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(T.nilable(String)), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), pause_collection: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PauseCollection))), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::TransferData))), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::TrialSettings)).void
661
- }
662
- def initialize(
663
- add_invoice_items: nil,
664
- application_fee_percent: nil,
665
- automatic_tax: nil,
666
- billing_cycle_anchor: nil,
667
- cancel_at: nil,
668
- cancel_at_period_end: nil,
669
- cancellation_details: nil,
670
- collection_method: nil,
671
- days_until_due: nil,
672
- default_payment_method: nil,
673
- default_source: nil,
674
- default_tax_rates: nil,
675
- description: nil,
676
- discounts: nil,
677
- expand: nil,
678
- invoice_settings: nil,
679
- items: nil,
680
- metadata: nil,
681
- off_session: nil,
682
- on_behalf_of: nil,
683
- pause_collection: nil,
684
- payment_behavior: nil,
685
- payment_settings: nil,
686
- pending_invoice_item_interval: nil,
687
- proration_behavior: nil,
688
- proration_date: nil,
689
- transfer_data: nil,
690
- trial_end: nil,
691
- trial_from_plan: nil,
692
- trial_settings: nil
693
- ); end
694
- end
695
- class DeleteDiscountParams < Stripe::RequestParams
696
-
697
- end
698
- class ListParams < Stripe::RequestParams
699
- class AutomaticTax < Stripe::RequestParams
700
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
701
- sig { returns(T::Boolean) }
702
- attr_accessor :enabled
703
- sig { params(enabled: T::Boolean).void }
704
- def initialize(enabled: nil); end
705
- end
706
- class Created < Stripe::RequestParams
707
- # Minimum value to filter by (exclusive)
708
- sig { returns(T.nilable(Integer)) }
709
- attr_accessor :gt
710
- # Minimum value to filter by (inclusive)
711
- sig { returns(T.nilable(Integer)) }
712
- attr_accessor :gte
713
- # Maximum value to filter by (exclusive)
714
- sig { returns(T.nilable(Integer)) }
715
- attr_accessor :lt
716
- # Maximum value to filter by (inclusive)
717
- sig { returns(T.nilable(Integer)) }
718
- attr_accessor :lte
719
- sig {
720
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
721
- }
722
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
723
- end
724
- class CurrentPeriodEnd < Stripe::RequestParams
725
- # Minimum value to filter by (exclusive)
726
- sig { returns(T.nilable(Integer)) }
727
- attr_accessor :gt
728
- # Minimum value to filter by (inclusive)
729
- sig { returns(T.nilable(Integer)) }
730
- attr_accessor :gte
731
- # Maximum value to filter by (exclusive)
732
- sig { returns(T.nilable(Integer)) }
733
- attr_accessor :lt
734
- # Maximum value to filter by (inclusive)
735
- sig { returns(T.nilable(Integer)) }
736
- attr_accessor :lte
737
- sig {
738
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
739
- }
740
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
741
- end
742
- class CurrentPeriodStart < Stripe::RequestParams
743
- # Minimum value to filter by (exclusive)
744
- sig { returns(T.nilable(Integer)) }
745
- attr_accessor :gt
746
- # Minimum value to filter by (inclusive)
747
- sig { returns(T.nilable(Integer)) }
748
- attr_accessor :gte
749
- # Maximum value to filter by (exclusive)
750
- sig { returns(T.nilable(Integer)) }
751
- attr_accessor :lt
752
- # Maximum value to filter by (inclusive)
753
- sig { returns(T.nilable(Integer)) }
754
- attr_accessor :lte
755
- sig {
756
- params(gt: T.nilable(Integer), gte: T.nilable(Integer), lt: T.nilable(Integer), lte: T.nilable(Integer)).void
757
- }
758
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
759
- end
760
- # Filter subscriptions by their automatic tax settings.
761
- sig { returns(T.nilable(::Stripe::SubscriptionService::ListParams::AutomaticTax)) }
762
- attr_accessor :automatic_tax
763
- # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.
764
- sig { returns(T.nilable(String)) }
765
- attr_accessor :collection_method
766
- # Only return subscriptions that were created during the given date interval.
767
- sig { returns(T.nilable(T.any(::Stripe::SubscriptionService::ListParams::Created, Integer))) }
768
- attr_accessor :created
769
- # Only return subscriptions whose current_period_end falls within the given date interval.
770
- sig {
771
- returns(T.nilable(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodEnd, Integer)))
772
- }
773
- attr_accessor :current_period_end
774
- # Only return subscriptions whose current_period_start falls within the given date interval.
775
- sig {
776
- returns(T.nilable(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodStart, Integer)))
777
- }
778
- attr_accessor :current_period_start
779
- # The ID of the customer whose subscriptions will be retrieved.
780
- sig { returns(T.nilable(String)) }
781
- attr_accessor :customer
782
- # 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.
783
- sig { returns(T.nilable(String)) }
784
- attr_accessor :ending_before
785
- # Specifies which fields in the response should be expanded.
786
- sig { returns(T.nilable(T::Array[String])) }
787
- attr_accessor :expand
788
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
789
- sig { returns(T.nilable(Integer)) }
790
- attr_accessor :limit
791
- # The ID of the plan whose subscriptions will be retrieved.
792
- sig { returns(T.nilable(String)) }
793
- attr_accessor :plan
794
- # Filter for subscriptions that contain this recurring price ID.
795
- sig { returns(T.nilable(String)) }
796
- attr_accessor :price
797
- # 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.
798
- sig { returns(T.nilable(String)) }
799
- attr_accessor :starting_after
800
- # 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.
801
- sig { returns(T.nilable(String)) }
802
- attr_accessor :status
803
- # 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.
804
- sig { returns(T.nilable(String)) }
805
- attr_accessor :test_clock
806
- sig {
807
- params(automatic_tax: T.nilable(::Stripe::SubscriptionService::ListParams::AutomaticTax), collection_method: T.nilable(String), created: T.nilable(T.any(::Stripe::SubscriptionService::ListParams::Created, Integer)), current_period_end: T.nilable(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodEnd, Integer)), current_period_start: T.nilable(T.any(::Stripe::SubscriptionService::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
808
- }
809
- def initialize(
810
- automatic_tax: nil,
811
- collection_method: nil,
812
- created: nil,
813
- current_period_end: nil,
814
- current_period_start: nil,
815
- customer: nil,
816
- ending_before: nil,
817
- expand: nil,
818
- limit: nil,
819
- plan: nil,
820
- price: nil,
821
- starting_after: nil,
822
- status: nil,
823
- test_clock: nil
824
- ); end
825
- end
826
- class CreateParams < Stripe::RequestParams
827
- class AddInvoiceItem < Stripe::RequestParams
828
- class Discount < Stripe::RequestParams
829
- # ID of the coupon to create a new discount for.
830
- sig { returns(T.nilable(String)) }
831
- attr_accessor :coupon
832
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
833
- sig { returns(T.nilable(String)) }
834
- attr_accessor :discount
835
- # ID of the promotion code to create a new discount for.
836
- sig { returns(T.nilable(String)) }
837
- attr_accessor :promotion_code
838
- sig {
839
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
840
- }
841
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
842
- end
843
- class PriceData < Stripe::RequestParams
844
- # 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).
845
- sig { returns(String) }
846
- attr_accessor :currency
847
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
848
- sig { returns(String) }
849
- attr_accessor :product
850
- # 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.
851
- sig { returns(T.nilable(String)) }
852
- attr_accessor :tax_behavior
853
- # 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.
854
- sig { returns(T.nilable(Integer)) }
855
- attr_accessor :unit_amount
856
- # 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.
857
- sig { returns(T.nilable(String)) }
858
- attr_accessor :unit_amount_decimal
859
- sig {
860
- params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
861
- }
862
- def initialize(
863
- currency: nil,
864
- product: nil,
865
- tax_behavior: nil,
866
- unit_amount: nil,
867
- unit_amount_decimal: nil
868
- ); end
869
- end
870
- # The coupons to redeem into discounts for the item.
871
- sig {
872
- returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount]))
873
- }
874
- attr_accessor :discounts
875
- # The ID of the price object. One of `price` or `price_data` is required.
876
- sig { returns(T.nilable(String)) }
877
- attr_accessor :price
878
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
879
- sig {
880
- returns(T.nilable(::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::PriceData))
881
- }
882
- attr_accessor :price_data
883
- # Quantity for this item. Defaults to 1.
884
- sig { returns(T.nilable(Integer)) }
885
- attr_accessor :quantity
886
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
887
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
888
- attr_accessor :tax_rates
889
- sig {
890
- params(discounts: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount]), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
891
- }
892
- def initialize(
893
- discounts: nil,
894
- price: nil,
895
- price_data: nil,
896
- quantity: nil,
897
- tax_rates: nil
898
- ); end
899
- end
900
- class AutomaticTax < Stripe::RequestParams
901
- class Liability < Stripe::RequestParams
902
- # The connected account being referenced when `type` is `account`.
903
- sig { returns(T.nilable(String)) }
904
- attr_accessor :account
905
- # Type of the account referenced in the request.
906
- sig { returns(String) }
907
- attr_accessor :type
908
- sig { params(account: T.nilable(String), type: String).void }
909
- def initialize(account: nil, type: nil); end
910
- end
911
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
912
- sig { returns(T::Boolean) }
913
- attr_accessor :enabled
914
- # 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.
915
- sig {
916
- returns(T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax::Liability))
917
- }
918
- attr_accessor :liability
919
- sig {
920
- params(enabled: T::Boolean, liability: T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax::Liability)).void
921
- }
922
- def initialize(enabled: nil, liability: nil); end
923
- end
924
- class BillingCycleAnchorConfig < Stripe::RequestParams
925
- # The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31.
926
- sig { returns(Integer) }
927
- attr_accessor :day_of_month
928
- # The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23.
929
- sig { returns(T.nilable(Integer)) }
930
- attr_accessor :hour
931
- # The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59.
932
- sig { returns(T.nilable(Integer)) }
933
- attr_accessor :minute
934
- # The month to start full cycle billing periods. Ranges from 1 to 12.
935
- sig { returns(T.nilable(Integer)) }
936
- attr_accessor :month
937
- # The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59.
938
- sig { returns(T.nilable(Integer)) }
939
- attr_accessor :second
940
- sig {
941
- params(day_of_month: Integer, hour: T.nilable(Integer), minute: T.nilable(Integer), month: T.nilable(Integer), second: T.nilable(Integer)).void
942
- }
943
- def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end
944
- end
945
- class Discount < Stripe::RequestParams
946
- # ID of the coupon to create a new discount for.
947
- sig { returns(T.nilable(String)) }
948
- attr_accessor :coupon
949
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
950
- sig { returns(T.nilable(String)) }
951
- attr_accessor :discount
952
- # ID of the promotion code to create a new discount for.
953
- sig { returns(T.nilable(String)) }
954
- attr_accessor :promotion_code
955
- sig {
956
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
957
- }
958
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
959
- end
960
- class InvoiceSettings < Stripe::RequestParams
961
- class Issuer < Stripe::RequestParams
962
- # The connected account being referenced when `type` is `account`.
963
- sig { returns(T.nilable(String)) }
964
- attr_accessor :account
965
- # Type of the account referenced in the request.
966
- sig { returns(String) }
967
- attr_accessor :type
968
- sig { params(account: T.nilable(String), type: String).void }
969
- def initialize(account: nil, type: nil); end
970
- end
971
- # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
972
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
973
- attr_accessor :account_tax_ids
974
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
975
- sig {
976
- returns(T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings::Issuer))
977
- }
978
- attr_accessor :issuer
979
- sig {
980
- params(account_tax_ids: T.nilable(T.nilable(T.any(String, T::Array[String]))), issuer: T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings::Issuer)).void
981
- }
982
- def initialize(account_tax_ids: nil, issuer: nil); end
983
- end
984
- class Item < Stripe::RequestParams
985
- class Discount < Stripe::RequestParams
986
- # ID of the coupon to create a new discount for.
987
- sig { returns(T.nilable(String)) }
988
- attr_accessor :coupon
989
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
990
- sig { returns(T.nilable(String)) }
991
- attr_accessor :discount
992
- # ID of the promotion code to create a new discount for.
993
- sig { returns(T.nilable(String)) }
994
- attr_accessor :promotion_code
995
- sig {
996
- params(coupon: T.nilable(String), discount: T.nilable(String), promotion_code: T.nilable(String)).void
997
- }
998
- def initialize(coupon: nil, discount: nil, promotion_code: nil); end
999
- end
1000
- class PriceData < Stripe::RequestParams
1001
- class Recurring < Stripe::RequestParams
1002
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1003
- sig { returns(String) }
1004
- attr_accessor :interval
1005
- # 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).
1006
- sig { returns(T.nilable(Integer)) }
1007
- attr_accessor :interval_count
1008
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
1009
- def initialize(interval: nil, interval_count: nil); end
1010
- end
1011
- # 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).
1012
- sig { returns(String) }
1013
- attr_accessor :currency
1014
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1015
- sig { returns(String) }
1016
- attr_accessor :product
1017
- # The recurring components of a price such as `interval` and `interval_count`.
1018
- sig { returns(::Stripe::SubscriptionService::CreateParams::Item::PriceData::Recurring) }
1019
- attr_accessor :recurring
1020
- # 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.
1021
- sig { returns(T.nilable(String)) }
1022
- attr_accessor :tax_behavior
1023
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1024
- sig { returns(T.nilable(Integer)) }
1025
- attr_accessor :unit_amount
1026
- # 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.
1027
- sig { returns(T.nilable(String)) }
1028
- attr_accessor :unit_amount_decimal
1029
- sig {
1030
- params(currency: String, product: String, recurring: ::Stripe::SubscriptionService::CreateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void
1031
- }
1032
- def initialize(
1033
- currency: nil,
1034
- product: nil,
1035
- recurring: nil,
1036
- tax_behavior: nil,
1037
- unit_amount: nil,
1038
- unit_amount_decimal: nil
1039
- ); end
1040
- end
1041
- # The coupons to redeem into discounts for the subscription item.
1042
- sig {
1043
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Item::Discount]))))
1044
- }
1045
- attr_accessor :discounts
1046
- # 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`.
1047
- sig { returns(T.nilable(T::Hash[String, String])) }
1048
- attr_accessor :metadata
1049
- # Plan ID for this item, as a string.
1050
- sig { returns(T.nilable(String)) }
1051
- attr_accessor :plan
1052
- # The ID of the price object.
1053
- sig { returns(T.nilable(String)) }
1054
- attr_accessor :price
1055
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1056
- sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::Item::PriceData)) }
1057
- attr_accessor :price_data
1058
- # Quantity for this item.
1059
- sig { returns(T.nilable(Integer)) }
1060
- attr_accessor :quantity
1061
- # 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.
1062
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1063
- attr_accessor :tax_rates
1064
- sig {
1065
- params(discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Item::Discount]))), metadata: T.nilable(T::Hash[String, String]), plan: T.nilable(String), price: T.nilable(String), price_data: T.nilable(::Stripe::SubscriptionService::CreateParams::Item::PriceData), quantity: T.nilable(Integer), tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String])))).void
1066
- }
1067
- def initialize(
1068
- discounts: nil,
1069
- metadata: nil,
1070
- plan: nil,
1071
- price: nil,
1072
- price_data: nil,
1073
- quantity: nil,
1074
- tax_rates: nil
1075
- ); end
1076
- end
1077
- class PaymentSettings < Stripe::RequestParams
1078
- class PaymentMethodOptions < Stripe::RequestParams
1079
- class AcssDebit < Stripe::RequestParams
1080
- class MandateOptions < Stripe::RequestParams
1081
- # Transaction type of the mandate.
1082
- sig { returns(T.nilable(String)) }
1083
- attr_accessor :transaction_type
1084
- sig { params(transaction_type: T.nilable(String)).void }
1085
- def initialize(transaction_type: nil); end
1086
- end
1087
- # Additional fields for Mandate creation
1088
- sig {
1089
- returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions))
1090
- }
1091
- attr_accessor :mandate_options
1092
- # Verification method for the intent
1093
- sig { returns(T.nilable(String)) }
1094
- attr_accessor :verification_method
1095
- sig {
1096
- params(mandate_options: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions), verification_method: T.nilable(String)).void
1097
- }
1098
- def initialize(mandate_options: nil, verification_method: nil); end
1099
- end
1100
- class Bancontact < Stripe::RequestParams
1101
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
1102
- sig { returns(T.nilable(String)) }
1103
- attr_accessor :preferred_language
1104
- sig { params(preferred_language: T.nilable(String)).void }
1105
- def initialize(preferred_language: nil); end
1106
- end
1107
- class Card < Stripe::RequestParams
1108
- class MandateOptions < Stripe::RequestParams
1109
- # Amount to be charged for future payments.
1110
- sig { returns(T.nilable(Integer)) }
1111
- attr_accessor :amount
1112
- # 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.
1113
- sig { returns(T.nilable(String)) }
1114
- attr_accessor :amount_type
1115
- # A description of the mandate or subscription that is meant to be displayed to the customer.
1116
- sig { returns(T.nilable(String)) }
1117
- attr_accessor :description
1118
- sig {
1119
- params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void
1120
- }
1121
- def initialize(amount: nil, amount_type: nil, description: nil); end
1122
- end
1123
- # Configuration options for setting up an eMandate for cards issued in India.
1124
- sig {
1125
- returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions))
1126
- }
1127
- attr_accessor :mandate_options
1128
- # 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.
1129
- sig { returns(T.nilable(String)) }
1130
- attr_accessor :network
1131
- # 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.
1132
- sig { returns(T.nilable(String)) }
1133
- attr_accessor :request_three_d_secure
1134
- sig {
1135
- params(mandate_options: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void
1136
- }
1137
- def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
1138
- end
1139
- class CustomerBalance < Stripe::RequestParams
1140
- class BankTransfer < Stripe::RequestParams
1141
- class EuBankTransfer < Stripe::RequestParams
1142
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
1143
- sig { returns(String) }
1144
- attr_accessor :country
1145
- sig { params(country: String).void }
1146
- def initialize(country: nil); end
1147
- end
1148
- # Configuration for eu_bank_transfer funding type.
1149
- sig {
1150
- returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer))
1151
- }
1152
- attr_accessor :eu_bank_transfer
1153
- # 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`.
1154
- sig { returns(T.nilable(String)) }
1155
- attr_accessor :type
1156
- sig {
1157
- params(eu_bank_transfer: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer), type: T.nilable(String)).void
1158
- }
1159
- def initialize(eu_bank_transfer: nil, type: nil); end
1160
- end
1161
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
1162
- sig {
1163
- returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer))
1164
- }
1165
- attr_accessor :bank_transfer
1166
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
1167
- sig { returns(T.nilable(String)) }
1168
- attr_accessor :funding_type
1169
- sig {
1170
- params(bank_transfer: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer), funding_type: T.nilable(String)).void
1171
- }
1172
- def initialize(bank_transfer: nil, funding_type: nil); end
1173
- end
1174
- class Konbini < Stripe::RequestParams
1175
-
1176
- end
1177
- class SepaDebit < Stripe::RequestParams
1178
-
1179
- end
1180
- class UsBankAccount < Stripe::RequestParams
1181
- class FinancialConnections < Stripe::RequestParams
1182
- class Filters < Stripe::RequestParams
1183
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1184
- sig { returns(T.nilable(T::Array[String])) }
1185
- attr_accessor :account_subcategories
1186
- sig { params(account_subcategories: T.nilable(T::Array[String])).void }
1187
- def initialize(account_subcategories: nil); end
1188
- end
1189
- # Provide filters for the linked accounts that the customer can select for the payment method.
1190
- sig {
1191
- returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters))
1192
- }
1193
- attr_accessor :filters
1194
- # 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`.
1195
- sig { returns(T.nilable(T::Array[String])) }
1196
- attr_accessor :permissions
1197
- # List of data features that you would like to retrieve upon account creation.
1198
- sig { returns(T.nilable(T::Array[String])) }
1199
- attr_accessor :prefetch
1200
- sig {
1201
- params(filters: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters), permissions: T.nilable(T::Array[String]), prefetch: T.nilable(T::Array[String])).void
1202
- }
1203
- def initialize(filters: nil, permissions: nil, prefetch: nil); end
1204
- end
1205
- # Additional fields for Financial Connections Session creation
1206
- sig {
1207
- returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections))
1208
- }
1209
- attr_accessor :financial_connections
1210
- # Verification method for the intent
1211
- sig { returns(T.nilable(String)) }
1212
- attr_accessor :verification_method
1213
- sig {
1214
- params(financial_connections: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections), verification_method: T.nilable(String)).void
1215
- }
1216
- def initialize(financial_connections: nil, verification_method: nil); end
1217
- end
1218
- # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
1219
- sig {
1220
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))))
1221
- }
1222
- attr_accessor :acss_debit
1223
- # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
1224
- sig {
1225
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))))
1226
- }
1227
- attr_accessor :bancontact
1228
- # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
1229
- sig {
1230
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card))))
1231
- }
1232
- attr_accessor :card
1233
- # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
1234
- sig {
1235
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))))
1236
- }
1237
- attr_accessor :customer_balance
1238
- # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
1239
- sig {
1240
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))))
1241
- }
1242
- attr_accessor :konbini
1243
- # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
1244
- sig {
1245
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))))
1246
- }
1247
- attr_accessor :sepa_debit
1248
- # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
1249
- sig {
1250
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))))
1251
- }
1252
- attr_accessor :us_bank_account
1253
- sig {
1254
- params(acss_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))), bancontact: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))), card: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card))), customer_balance: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))), konbini: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))), sepa_debit: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))), us_bank_account: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)))).void
1255
- }
1256
- def initialize(
1257
- acss_debit: nil,
1258
- bancontact: nil,
1259
- card: nil,
1260
- customer_balance: nil,
1261
- konbini: nil,
1262
- sepa_debit: nil,
1263
- us_bank_account: nil
1264
- ); end
1265
- end
1266
- # Payment-method-specific configuration to provide to invoices created by the subscription.
1267
- sig {
1268
- returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions))
1269
- }
1270
- attr_accessor :payment_method_options
1271
- # 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
1272
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1273
- attr_accessor :payment_method_types
1274
- # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
1275
- sig { returns(T.nilable(String)) }
1276
- attr_accessor :save_default_payment_method
1277
- sig {
1278
- params(payment_method_options: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions), payment_method_types: T.nilable(T.nilable(T.any(String, T::Array[String]))), save_default_payment_method: T.nilable(String)).void
1279
- }
1280
- def initialize(
1281
- payment_method_options: nil,
1282
- payment_method_types: nil,
1283
- save_default_payment_method: nil
1284
- ); end
1285
- end
1286
- class PendingInvoiceItemInterval < Stripe::RequestParams
1287
- # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
1288
- sig { returns(String) }
1289
- attr_accessor :interval
1290
- # 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).
1291
- sig { returns(T.nilable(Integer)) }
1292
- attr_accessor :interval_count
1293
- sig { params(interval: String, interval_count: T.nilable(Integer)).void }
1294
- def initialize(interval: nil, interval_count: nil); end
1295
- end
1296
- class TransferData < Stripe::RequestParams
1297
- # 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.
1298
- sig { returns(T.nilable(Float)) }
1299
- attr_accessor :amount_percent
1300
- # ID of an existing, connected Stripe account.
1301
- sig { returns(String) }
1302
- attr_accessor :destination
1303
- sig { params(amount_percent: T.nilable(Float), destination: String).void }
1304
- def initialize(amount_percent: nil, destination: nil); end
1305
- end
1306
- class TrialSettings < Stripe::RequestParams
1307
- class EndBehavior < Stripe::RequestParams
1308
- # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
1309
- sig { returns(String) }
1310
- attr_accessor :missing_payment_method
1311
- sig { params(missing_payment_method: String).void }
1312
- def initialize(missing_payment_method: nil); end
1313
- end
1314
- # Defines how the subscription should behave when the user's free trial ends.
1315
- sig { returns(::Stripe::SubscriptionService::CreateParams::TrialSettings::EndBehavior) }
1316
- attr_accessor :end_behavior
1317
- sig {
1318
- params(end_behavior: ::Stripe::SubscriptionService::CreateParams::TrialSettings::EndBehavior).void
1319
- }
1320
- def initialize(end_behavior: nil); end
1321
- end
1322
- # 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.
1323
- sig {
1324
- returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem]))
1325
- }
1326
- attr_accessor :add_invoice_items
1327
- # 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).
1328
- sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
1329
- attr_accessor :application_fee_percent
1330
- # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
1331
- sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax)) }
1332
- attr_accessor :automatic_tax
1333
- # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
1334
- sig { returns(T.nilable(Integer)) }
1335
- attr_accessor :backdate_start_date
1336
- # 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.
1337
- sig { returns(T.nilable(Integer)) }
1338
- attr_accessor :billing_cycle_anchor
1339
- # 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.
1340
- sig {
1341
- returns(T.nilable(::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig))
1342
- }
1343
- attr_accessor :billing_cycle_anchor_config
1344
- # 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.
1345
- sig { returns(T.nilable(Integer)) }
1346
- attr_accessor :cancel_at
1347
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1348
- sig { returns(T.nilable(T::Boolean)) }
1349
- attr_accessor :cancel_at_period_end
1350
- # 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`.
1351
- sig { returns(T.nilable(String)) }
1352
- attr_accessor :collection_method
1353
- # 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).
1354
- sig { returns(T.nilable(String)) }
1355
- attr_accessor :currency
1356
- # The identifier of the customer to subscribe.
1357
- sig { returns(String) }
1358
- attr_accessor :customer
1359
- # 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`.
1360
- sig { returns(T.nilable(Integer)) }
1361
- attr_accessor :days_until_due
1362
- # 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).
1363
- sig { returns(T.nilable(String)) }
1364
- attr_accessor :default_payment_method
1365
- # 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).
1366
- sig { returns(T.nilable(String)) }
1367
- attr_accessor :default_source
1368
- # 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.
1369
- sig { returns(T.nilable(T.nilable(T.any(String, T::Array[String])))) }
1370
- attr_accessor :default_tax_rates
1371
- # 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.
1372
- sig { returns(T.nilable(String)) }
1373
- attr_accessor :description
1374
- # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
1375
- sig {
1376
- returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Discount]))))
1377
- }
1378
- attr_accessor :discounts
1379
- # Specifies which fields in the response should be expanded.
1380
- sig { returns(T.nilable(T::Array[String])) }
1381
- attr_accessor :expand
1382
- # All invoices will be billed using the specified settings.
1383
- sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings)) }
1384
- attr_accessor :invoice_settings
1385
- # A list of up to 20 subscription items, each with an attached price.
1386
- sig { returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Item])) }
1387
- attr_accessor :items
1388
- # 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`.
1389
- sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
1390
- attr_accessor :metadata
1391
- # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
1392
- sig { returns(T.nilable(T::Boolean)) }
1393
- attr_accessor :off_session
1394
- # The account on behalf of which to charge, for each of the subscription's invoices.
1395
- sig { returns(T.nilable(T.nilable(String))) }
1396
- attr_accessor :on_behalf_of
1397
- # Only applies to subscriptions with `collection_method=charge_automatically`.
1398
- #
1399
- # 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.
1400
- #
1401
- # 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.
1402
- #
1403
- # 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.
1404
- #
1405
- # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
1406
- #
1407
- # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
1408
- sig { returns(T.nilable(String)) }
1409
- attr_accessor :payment_behavior
1410
- # Payment settings to pass to invoices created by the subscription.
1411
- sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings)) }
1412
- attr_accessor :payment_settings
1413
- # 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.
1414
- sig {
1415
- returns(T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval))))
1416
- }
1417
- attr_accessor :pending_invoice_item_interval
1418
- # 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`.
1419
- sig { returns(T.nilable(String)) }
1420
- attr_accessor :proration_behavior
1421
- # 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.
1422
- sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::TransferData)) }
1423
- attr_accessor :transfer_data
1424
- # 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.
1425
- sig { returns(T.nilable(T.any(String, Integer))) }
1426
- attr_accessor :trial_end
1427
- # 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.
1428
- sig { returns(T.nilable(T::Boolean)) }
1429
- attr_accessor :trial_from_plan
1430
- # 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.
1431
- sig { returns(T.nilable(Integer)) }
1432
- attr_accessor :trial_period_days
1433
- # Settings related to subscription trials.
1434
- sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::TrialSettings)) }
1435
- attr_accessor :trial_settings
1436
- sig {
1437
- params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig), cancel_at: T.nilable(Integer), 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.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionService::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::SubscriptionService::CreateParams::TrialSettings)).void
1438
- }
1439
- def initialize(
1440
- add_invoice_items: nil,
1441
- application_fee_percent: nil,
1442
- automatic_tax: nil,
1443
- backdate_start_date: nil,
1444
- billing_cycle_anchor: nil,
1445
- billing_cycle_anchor_config: nil,
1446
- cancel_at: nil,
1447
- cancel_at_period_end: nil,
1448
- collection_method: nil,
1449
- currency: nil,
1450
- customer: nil,
1451
- days_until_due: nil,
1452
- default_payment_method: nil,
1453
- default_source: nil,
1454
- default_tax_rates: nil,
1455
- description: nil,
1456
- discounts: nil,
1457
- expand: nil,
1458
- invoice_settings: nil,
1459
- items: nil,
1460
- metadata: nil,
1461
- off_session: nil,
1462
- on_behalf_of: nil,
1463
- payment_behavior: nil,
1464
- payment_settings: nil,
1465
- pending_invoice_item_interval: nil,
1466
- proration_behavior: nil,
1467
- transfer_data: nil,
1468
- trial_end: nil,
1469
- trial_from_plan: nil,
1470
- trial_period_days: nil,
1471
- trial_settings: nil
1472
- ); end
1473
- end
1474
- class SearchParams < Stripe::RequestParams
1475
- # Specifies which fields in the response should be expanded.
1476
- sig { returns(T.nilable(T::Array[String])) }
1477
- attr_accessor :expand
1478
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1479
- sig { returns(T.nilable(Integer)) }
1480
- attr_accessor :limit
1481
- # 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.
1482
- sig { returns(T.nilable(String)) }
1483
- attr_accessor :page
1484
- # 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).
1485
- sig { returns(String) }
1486
- attr_accessor :query
1487
- sig {
1488
- params(expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), page: T.nilable(String), query: String).void
1489
- }
1490
- def initialize(expand: nil, limit: nil, page: nil, query: nil); end
1491
- end
1492
- class ResumeParams < Stripe::RequestParams
1493
- # 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).
1494
- sig { returns(T.nilable(String)) }
1495
- attr_accessor :billing_cycle_anchor
1496
- # Specifies which fields in the response should be expanded.
1497
- sig { returns(T.nilable(T::Array[String])) }
1498
- attr_accessor :expand
1499
- # 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`.
1500
- sig { returns(T.nilable(String)) }
1501
- attr_accessor :proration_behavior
1502
- # If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint.
1503
- sig { returns(T.nilable(Integer)) }
1504
- attr_accessor :proration_date
1505
- sig {
1506
- params(billing_cycle_anchor: T.nilable(String), expand: T.nilable(T::Array[String]), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer)).void
1507
- }
1508
- def initialize(
1509
- billing_cycle_anchor: nil,
1510
- expand: nil,
1511
- proration_behavior: nil,
1512
- proration_date: nil
1513
- ); end
1514
- end
1515
- # 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://stripe.com/metadata).
1516
- #
1517
- # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/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.
1518
- #
1519
- # 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.
1520
- sig {
1521
- params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
1522
- }
1523
- def cancel(subscription_exposed_id, params = {}, opts = {}); end
1524
-
1525
- # Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.
1526
- #
1527
- # When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request.
1528
- # The payment_behavior parameter determines the exact behavior of the initial payment.
1529
- #
1530
- # To start subscriptions where the first invoice always begins in a draft status, use [subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead.
1531
- # Schedules provide the flexibility to model more complex billing configurations that change over time.
1532
- sig {
1533
- params(params: T.any(::Stripe::SubscriptionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
1534
- }
1535
- def create(params = {}, opts = {}); end
1536
-
1537
- # Removes the currently applied discount on a subscription.
1538
- sig {
1539
- params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount)
1540
- }
1541
- def delete_discount(subscription_exposed_id, params = {}, opts = {}); end
1542
-
1543
- # By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.
1544
- sig {
1545
- params(params: T.any(::Stripe::SubscriptionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
1546
- }
1547
- def list(params = {}, opts = {}); end
1548
-
1549
- # 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.
1550
- sig {
1551
- params(subscription: String, params: T.any(::Stripe::SubscriptionService::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
1552
- }
1553
- def resume(subscription, params = {}, opts = {}); end
1554
-
1555
- # Retrieves the subscription with the given ID.
1556
- sig {
1557
- params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
1558
- }
1559
- def retrieve(subscription_exposed_id, params = {}, opts = {}); end
1560
-
1561
- # Search for subscriptions you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
1562
- # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
1563
- # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
1564
- # to an hour behind during outages. Search functionality is not available to merchants in India.
1565
- sig {
1566
- params(params: T.any(::Stripe::SubscriptionService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
1567
- }
1568
- def search(params = {}, opts = {}); end
1569
-
1570
- # Updates an existing subscription to match the specified parameters.
1571
- # When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
1572
- # To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
1573
- #
1574
- # 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.
1575
- #
1576
- # Switching prices does not normally change the billing date or generate an immediate charge unless:
1577
- #
1578
- #
1579
- # The billing interval is changed (for example, from monthly to yearly).
1580
- # The subscription moves from free to paid.
1581
- # A trial starts or ends.
1582
- #
1583
- #
1584
- # 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://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment).
1585
- #
1586
- # 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://stripe.com/docs/api/invoices/create).
1587
- #
1588
- # 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.
1589
- #
1590
- # 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://stripe.com/docs/rate-limits) instead.
1591
- sig {
1592
- params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
1593
- }
1594
- def update(subscription_exposed_id, params = {}, opts = {}); end
1595
- end
1596
- end