stripe 13.4.0.pre.beta.4 → 13.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (744) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +653 -1422
  3. data/CONTRIBUTING.md +25 -0
  4. data/OPENAPI_VERSION +1 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_operations/request.rb +0 -1
  7. data/lib/stripe/api_requestor.rb +0 -1
  8. data/lib/stripe/object_types.rb +0 -32
  9. data/lib/stripe/resources/account.rb +0 -5163
  10. data/lib/stripe/resources/account_link.rb +0 -54
  11. data/lib/stripe/resources/account_session.rb +0 -967
  12. data/lib/stripe/resources/apple_pay_domain.rb +0 -63
  13. data/lib/stripe/resources/application_fee.rb +0 -96
  14. data/lib/stripe/resources/application_fee_refund.rb +0 -17
  15. data/lib/stripe/resources/apps/secret.rb +0 -141
  16. data/lib/stripe/resources/balance.rb +0 -131
  17. data/lib/stripe/resources/balance_transaction.rb +0 -112
  18. data/lib/stripe/resources/bank_account.rb +2 -84
  19. data/lib/stripe/resources/billing/alert.rb +0 -144
  20. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -77
  21. data/lib/stripe/resources/billing/credit_balance_transaction.rb +0 -116
  22. data/lib/stripe/resources/billing/credit_grant.rb +0 -203
  23. data/lib/stripe/resources/billing/meter.rb +0 -178
  24. data/lib/stripe/resources/billing/meter_event.rb +0 -35
  25. data/lib/stripe/resources/billing/meter_event_adjustment.rb +0 -43
  26. data/lib/stripe/resources/billing/meter_event_summary.rb +0 -15
  27. data/lib/stripe/resources/billing_portal/configuration.rb +0 -562
  28. data/lib/stripe/resources/billing_portal/session.rb +0 -271
  29. data/lib/stripe/resources/capability.rb +0 -84
  30. data/lib/stripe/resources/card.rb +0 -79
  31. data/lib/stripe/resources/cash_balance.rb +0 -17
  32. data/lib/stripe/resources/charge.rb +0 -3030
  33. data/lib/stripe/resources/checkout/session.rb +0 -3670
  34. data/lib/stripe/resources/climate/order.rb +0 -176
  35. data/lib/stripe/resources/climate/product.rb +0 -56
  36. data/lib/stripe/resources/climate/supplier.rb +0 -54
  37. data/lib/stripe/resources/confirmation_token.rb +0 -1530
  38. data/lib/stripe/resources/country_spec.rb +0 -63
  39. data/lib/stripe/resources/coupon.rb +0 -198
  40. data/lib/stripe/resources/credit_note.rb +0 -660
  41. data/lib/stripe/resources/credit_note_line_item.rb +0 -65
  42. data/lib/stripe/resources/customer.rb +0 -840
  43. data/lib/stripe/resources/customer_balance_transaction.rb +0 -27
  44. data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -109
  45. data/lib/stripe/resources/customer_session.rb +0 -159
  46. data/lib/stripe/resources/discount.rb +0 -29
  47. data/lib/stripe/resources/dispute.rb +0 -619
  48. data/lib/stripe/resources/entitlements/active_entitlement.rb +0 -46
  49. data/lib/stripe/resources/entitlements/feature.rb +0 -90
  50. data/lib/stripe/resources/ephemeral_key.rb +0 -21
  51. data/lib/stripe/resources/event.rb +0 -130
  52. data/lib/stripe/resources/exchange_rate.rb +0 -33
  53. data/lib/stripe/resources/file.rb +0 -111
  54. data/lib/stripe/resources/file_link.rb +0 -112
  55. data/lib/stripe/resources/financial_connections/account.rb +0 -260
  56. data/lib/stripe/resources/financial_connections/account_owner.rb +0 -17
  57. data/lib/stripe/resources/financial_connections/account_ownership.rb +0 -9
  58. data/lib/stripe/resources/financial_connections/session.rb +0 -159
  59. data/lib/stripe/resources/financial_connections/transaction.rb +0 -101
  60. data/lib/stripe/resources/forwarding/request.rb +0 -165
  61. data/lib/stripe/resources/funding_instructions.rb +0 -308
  62. data/lib/stripe/resources/identity/verification_report.rb +0 -266
  63. data/lib/stripe/resources/identity/verification_session.rb +0 -361
  64. data/lib/stripe/resources/invoice.rb +0 -8078
  65. data/lib/stripe/resources/invoice_item.rb +0 -445
  66. data/lib/stripe/resources/invoice_line_item.rb +0 -333
  67. data/lib/stripe/resources/invoice_rendering_template.rb +0 -67
  68. data/lib/stripe/resources/issuing/authorization.rb +0 -1113
  69. data/lib/stripe/resources/issuing/card.rb +0 -666
  70. data/lib/stripe/resources/issuing/cardholder.rb +0 -658
  71. data/lib/stripe/resources/issuing/dispute.rb +0 -790
  72. data/lib/stripe/resources/issuing/personalization_design.rb +0 -285
  73. data/lib/stripe/resources/issuing/physical_bundle.rb +0 -63
  74. data/lib/stripe/resources/issuing/token.rb +0 -175
  75. data/lib/stripe/resources/issuing/transaction.rb +0 -927
  76. data/lib/stripe/resources/line_item.rb +0 -75
  77. data/lib/stripe/resources/login_link.rb +0 -7
  78. data/lib/stripe/resources/mandate.rb +0 -169
  79. data/lib/stripe/resources/payment_intent.rb +0 -12910
  80. data/lib/stripe/resources/payment_link.rb +0 -1563
  81. data/lib/stripe/resources/payment_method.rb +0 -1655
  82. data/lib/stripe/resources/payment_method_configuration.rb +0 -2903
  83. data/lib/stripe/resources/payment_method_domain.rb +0 -153
  84. data/lib/stripe/resources/payout.rb +0 -218
  85. data/lib/stripe/resources/person.rb +0 -263
  86. data/lib/stripe/resources/plan.rb +0 -317
  87. data/lib/stripe/resources/price.rb +0 -649
  88. data/lib/stripe/resources/product.rb +0 -536
  89. data/lib/stripe/resources/product_feature.rb +0 -12
  90. data/lib/stripe/resources/promotion_code.rb +0 -221
  91. data/lib/stripe/resources/quote.rb +0 -2946
  92. data/lib/stripe/resources/radar/early_fraud_warning.rb +0 -77
  93. data/lib/stripe/resources/radar/value_list.rb +0 -125
  94. data/lib/stripe/resources/radar/value_list_item.rb +0 -95
  95. data/lib/stripe/resources/refund.rb +0 -397
  96. data/lib/stripe/resources/reporting/report_run.rb +0 -150
  97. data/lib/stripe/resources/reporting/report_type.rb +0 -36
  98. data/lib/stripe/resources/reversal.rb +0 -21
  99. data/lib/stripe/resources/review.rb +0 -108
  100. data/lib/stripe/resources/setup_attempt.rb +0 -373
  101. data/lib/stripe/resources/setup_intent.rb +0 -3855
  102. data/lib/stripe/resources/shipping_rate.rb +0 -259
  103. data/lib/stripe/resources/sigma/scheduled_query_run.rb +0 -54
  104. data/lib/stripe/resources/source.rb +0 -1239
  105. data/lib/stripe/resources/source_transaction.rb +0 -85
  106. data/lib/stripe/resources/subscription.rb +0 -2057
  107. data/lib/stripe/resources/subscription_item.rb +0 -433
  108. data/lib/stripe/resources/subscription_schedule.rb +0 -2402
  109. data/lib/stripe/resources/tax/calculation.rb +0 -387
  110. data/lib/stripe/resources/tax/calculation_line_item.rb +0 -56
  111. data/lib/stripe/resources/tax/registration.rb +0 -2382
  112. data/lib/stripe/resources/tax/settings.rb +0 -126
  113. data/lib/stripe/resources/tax/transaction.rb +0 -267
  114. data/lib/stripe/resources/tax/transaction_line_item.rb +0 -31
  115. data/lib/stripe/resources/tax_code.rb +0 -35
  116. data/lib/stripe/resources/tax_id.rb +0 -121
  117. data/lib/stripe/resources/tax_rate.rb +0 -200
  118. data/lib/stripe/resources/terminal/configuration.rb +0 -1060
  119. data/lib/stripe/resources/terminal/connection_token.rb +0 -18
  120. data/lib/stripe/resources/terminal/location.rb +0 -175
  121. data/lib/stripe/resources/terminal/reader.rb +0 -774
  122. data/lib/stripe/resources/test_helpers/test_clock.rb +0 -86
  123. data/lib/stripe/resources/token.rb +0 -1168
  124. data/lib/stripe/resources/topup.rb +0 -174
  125. data/lib/stripe/resources/transfer.rb +0 -153
  126. data/lib/stripe/resources/treasury/credit_reversal.rb +0 -92
  127. data/lib/stripe/resources/treasury/debit_reversal.rb +0 -103
  128. data/lib/stripe/resources/treasury/financial_account.rb +0 -752
  129. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -191
  130. data/lib/stripe/resources/treasury/inbound_transfer.rb +0 -235
  131. data/lib/stripe/resources/treasury/outbound_payment.rb +0 -495
  132. data/lib/stripe/resources/treasury/outbound_transfer.rb +0 -387
  133. data/lib/stripe/resources/treasury/received_credit.rb +0 -283
  134. data/lib/stripe/resources/treasury/received_debit.rb +0 -244
  135. data/lib/stripe/resources/treasury/transaction.rb +0 -176
  136. data/lib/stripe/resources/treasury/transaction_entry.rb +0 -157
  137. data/lib/stripe/resources/usage_record.rb +0 -13
  138. data/lib/stripe/resources/usage_record_summary.rb +0 -21
  139. data/lib/stripe/resources/v2/billing/meter_event.rb +0 -18
  140. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +0 -21
  141. data/lib/stripe/resources/v2/billing/meter_event_session.rb +0 -14
  142. data/lib/stripe/resources/v2/event.rb +0 -27
  143. data/lib/stripe/resources/v2/event_destination.rb +0 -59
  144. data/lib/stripe/resources/webhook_endpoint.rb +0 -122
  145. data/lib/stripe/resources.rb +0 -31
  146. data/lib/stripe/services/account_capability_service.rb +0 -32
  147. data/lib/stripe/services/account_external_account_service.rb +0 -250
  148. data/lib/stripe/services/account_link_service.rb +0 -46
  149. data/lib/stripe/services/account_login_link_service.rb +0 -9
  150. data/lib/stripe/services/account_person_service.rb +0 -875
  151. data/lib/stripe/services/account_service.rb +0 -4441
  152. data/lib/stripe/services/account_session_service.rb +0 -682
  153. data/lib/stripe/services/apple_pay_domain_service.rb +0 -51
  154. data/lib/stripe/services/application_fee_refund_service.rb +0 -54
  155. data/lib/stripe/services/application_fee_service.rb +0 -57
  156. data/lib/stripe/services/apps/secret_service.rb +0 -116
  157. data/lib/stripe/services/balance_service.rb +0 -9
  158. data/lib/stripe/services/balance_transaction_service.rb +0 -69
  159. data/lib/stripe/services/billing/alert_service.rb +0 -113
  160. data/lib/stripe/services/billing/credit_balance_summary_service.rb +0 -37
  161. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -40
  162. data/lib/stripe/services/billing/credit_grant_service.rb +0 -151
  163. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +0 -26
  164. data/lib/stripe/services/billing/meter_event_service.rb +0 -21
  165. data/lib/stripe/services/billing/meter_event_summary_service.rb +0 -39
  166. data/lib/stripe/services/billing/meter_service.rb +0 -130
  167. data/lib/stripe/services/billing_portal/configuration_service.rb +0 -444
  168. data/lib/stripe/services/billing_portal/session_service.rb +0 -173
  169. data/lib/stripe/services/charge_service.rb +0 -1736
  170. data/lib/stripe/services/checkout/session_line_item_service.rb +0 -18
  171. data/lib/stripe/services/checkout/session_service.rb +0 -2472
  172. data/lib/stripe/services/climate/order_service.rb +0 -102
  173. data/lib/stripe/services/climate/product_service.rb +0 -27
  174. data/lib/stripe/services/climate/supplier_service.rb +0 -27
  175. data/lib/stripe/services/confirmation_token_service.rb +0 -9
  176. data/lib/stripe/services/country_spec_service.rb +0 -27
  177. data/lib/stripe/services/coupon_service.rb +0 -152
  178. data/lib/stripe/services/credit_note_line_item_service.rb +0 -18
  179. data/lib/stripe/services/credit_note_preview_lines_service.rb +0 -156
  180. data/lib/stripe/services/credit_note_service.rb +0 -373
  181. data/lib/stripe/services/customer_balance_transaction_service.rb +0 -63
  182. data/lib/stripe/services/customer_cash_balance_service.rb +0 -29
  183. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +0 -27
  184. data/lib/stripe/services/customer_funding_instructions_service.rb +0 -42
  185. data/lib/stripe/services/customer_payment_method_service.rb +0 -40
  186. data/lib/stripe/services/customer_payment_source_service.rb +0 -179
  187. data/lib/stripe/services/customer_service.rb +0 -593
  188. data/lib/stripe/services/customer_session_service.rb +0 -96
  189. data/lib/stripe/services/customer_tax_id_service.rb +0 -45
  190. data/lib/stripe/services/dispute_service.rb +0 -374
  191. data/lib/stripe/services/entitlements/active_entitlement_service.rb +0 -36
  192. data/lib/stripe/services/entitlements/feature_service.rb +0 -76
  193. data/lib/stripe/services/ephemeral_key_service.rb +0 -36
  194. data/lib/stripe/services/event_service.rb +0 -65
  195. data/lib/stripe/services/exchange_rate_service.rb +0 -27
  196. data/lib/stripe/services/file_link_service.rb +0 -94
  197. data/lib/stripe/services/file_service.rb +0 -89
  198. data/lib/stripe/services/financial_connections/account_owner_service.rb +0 -27
  199. data/lib/stripe/services/financial_connections/account_service.rb +1 -99
  200. data/lib/stripe/services/financial_connections/session_service.rb +0 -97
  201. data/lib/stripe/services/financial_connections/transaction_service.rb +0 -70
  202. data/lib/stripe/services/financial_connections_service.rb +1 -2
  203. data/lib/stripe/services/forwarding/request_service.rb +0 -106
  204. data/lib/stripe/services/identity/verification_report_service.rb +0 -65
  205. data/lib/stripe/services/identity/verification_session_service.rb +0 -231
  206. data/lib/stripe/services/invoice_item_service.rb +0 -388
  207. data/lib/stripe/services/invoice_line_item_service.rb +0 -237
  208. data/lib/stripe/services/invoice_rendering_template_service.rb +0 -51
  209. data/lib/stripe/services/invoice_service.rb +1 -5567
  210. data/lib/stripe/services/invoice_upcoming_lines_service.rb +0 -1864
  211. data/lib/stripe/services/issuing/authorization_service.rb +0 -104
  212. data/lib/stripe/services/issuing/card_service.rb +0 -455
  213. data/lib/stripe/services/issuing/cardholder_service.rb +0 -526
  214. data/lib/stripe/services/issuing/dispute_service.rb +0 -633
  215. data/lib/stripe/services/issuing/personalization_design_service.rb +0 -193
  216. data/lib/stripe/services/issuing/physical_bundle_service.rb +0 -40
  217. data/lib/stripe/services/issuing/token_service.rb +0 -73
  218. data/lib/stripe/services/issuing/transaction_service.rb +0 -81
  219. data/lib/stripe/services/issuing_service.rb +1 -5
  220. data/lib/stripe/services/mandate_service.rb +0 -9
  221. data/lib/stripe/services/payment_intent_service.rb +0 -10936
  222. data/lib/stripe/services/payment_link_line_item_service.rb +0 -18
  223. data/lib/stripe/services/payment_link_service.rb +0 -1223
  224. data/lib/stripe/services/payment_method_configuration_service.rb +0 -2088
  225. data/lib/stripe/services/payment_method_domain_service.rb +0 -76
  226. data/lib/stripe/services/payment_method_service.rb +0 -878
  227. data/lib/stripe/services/payout_service.rb +0 -159
  228. data/lib/stripe/services/plan_service.rb +0 -253
  229. data/lib/stripe/services/price_service.rb +0 -516
  230. data/lib/stripe/services/product_feature_service.rb +0 -42
  231. data/lib/stripe/services/product_service.rb +0 -459
  232. data/lib/stripe/services/promotion_code_service.rb +0 -178
  233. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +0 -18
  234. data/lib/stripe/services/quote_line_item_service.rb +0 -18
  235. data/lib/stripe/services/quote_service.rb +1 -2319
  236. data/lib/stripe/services/radar/early_fraud_warning_service.rb +0 -61
  237. data/lib/stripe/services/radar/value_list_item_service.rb +0 -79
  238. data/lib/stripe/services/radar/value_list_service.rb +0 -103
  239. data/lib/stripe/services/refund_service.rb +0 -137
  240. data/lib/stripe/services/reporting/report_run_service.rb +0 -106
  241. data/lib/stripe/services/reporting/report_type_service.rb +0 -18
  242. data/lib/stripe/services/review_service.rb +0 -56
  243. data/lib/stripe/services/setup_attempt_service.rb +0 -51
  244. data/lib/stripe/services/setup_intent_service.rb +0 -3497
  245. data/lib/stripe/services/shipping_rate_service.rb +0 -200
  246. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +0 -27
  247. data/lib/stripe/services/source_service.rb +0 -601
  248. data/lib/stripe/services/source_transaction_service.rb +0 -18
  249. data/lib/stripe/services/subscription_item_service.rb +0 -383
  250. data/lib/stripe/services/subscription_item_usage_record_service.rb +0 -18
  251. data/lib/stripe/services/subscription_item_usage_record_summary_service.rb +0 -18
  252. data/lib/stripe/services/subscription_schedule_service.rb +0 -2053
  253. data/lib/stripe/services/subscription_service.rb +0 -1722
  254. data/lib/stripe/services/tax/calculation_line_item_service.rb +0 -18
  255. data/lib/stripe/services/tax/calculation_service.rb +0 -205
  256. data/lib/stripe/services/tax/registration_service.rb +0 -1564
  257. data/lib/stripe/services/tax/settings_service.rb +0 -74
  258. data/lib/stripe/services/tax/transaction_line_item_service.rb +0 -18
  259. data/lib/stripe/services/tax/transaction_service.rb +0 -111
  260. data/lib/stripe/services/tax_code_service.rb +0 -27
  261. data/lib/stripe/services/tax_id_service.rb +0 -79
  262. data/lib/stripe/services/tax_rate_service.rb +0 -155
  263. data/lib/stripe/services/tax_service.rb +1 -3
  264. data/lib/stripe/services/terminal/configuration_service.rb +0 -831
  265. data/lib/stripe/services/terminal/connection_token_service.rb +0 -12
  266. data/lib/stripe/services/terminal/location_service.rb +0 -144
  267. data/lib/stripe/services/terminal/reader_service.rb +0 -443
  268. data/lib/stripe/services/terminal_service.rb +1 -2
  269. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -680
  270. data/lib/stripe/services/test_helpers/customer_service.rb +0 -18
  271. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +0 -745
  272. data/lib/stripe/services/test_helpers/issuing/card_service.rb +0 -45
  273. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +0 -41
  274. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +0 -632
  275. data/lib/stripe/services/test_helpers/refund_service.rb +0 -9
  276. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -44
  277. data/lib/stripe/services/test_helpers/test_clock_service.rb +0 -57
  278. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +0 -38
  279. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +0 -87
  280. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +0 -87
  281. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +0 -84
  282. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +0 -84
  283. data/lib/stripe/services/token_service.rb +0 -1140
  284. data/lib/stripe/services/topup_service.rb +0 -142
  285. data/lib/stripe/services/transfer_reversal_service.rb +0 -66
  286. data/lib/stripe/services/transfer_service.rb +0 -119
  287. data/lib/stripe/services/treasury/credit_reversal_service.rb +0 -59
  288. data/lib/stripe/services/treasury/debit_reversal_service.rb +0 -63
  289. data/lib/stripe/services/treasury/financial_account_features_service.rb +0 -169
  290. data/lib/stripe/services/treasury/financial_account_service.rb +0 -498
  291. data/lib/stripe/services/treasury/inbound_transfer_service.rb +0 -88
  292. data/lib/stripe/services/treasury/outbound_payment_service.rb +0 -258
  293. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -148
  294. data/lib/stripe/services/treasury/received_credit_service.rb +0 -52
  295. data/lib/stripe/services/treasury/received_debit_service.rb +0 -40
  296. data/lib/stripe/services/treasury/transaction_entry_service.rb +0 -87
  297. data/lib/stripe/services/treasury/transaction_service.rb +0 -95
  298. data/lib/stripe/services/v1_services.rb +1 -8
  299. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +0 -23
  300. data/lib/stripe/services/v2/billing/meter_event_service.rb +0 -25
  301. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +0 -3
  302. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +0 -33
  303. data/lib/stripe/services/v2/core/event_destination_service.rb +0 -146
  304. data/lib/stripe/services/v2/core/event_service.rb +0 -18
  305. data/lib/stripe/services/webhook_endpoint_service.rb +0 -96
  306. data/lib/stripe/services.rb +0 -25
  307. data/lib/stripe/stripe_client.rb +1 -1
  308. data/lib/stripe/stripe_configuration.rb +1 -3
  309. data/lib/stripe/stripe_object.rb +0 -5
  310. data/lib/stripe/util.rb +1 -7
  311. data/lib/stripe/version.rb +1 -1
  312. data/lib/stripe.rb +0 -46
  313. metadata +5 -435
  314. data/lib/stripe/request_params.rb +0 -24
  315. data/lib/stripe/request_signing_authenticator.rb +0 -79
  316. data/lib/stripe/resources/account_notice.rb +0 -132
  317. data/lib/stripe/resources/application.rb +0 -20
  318. data/lib/stripe/resources/billing/alert_triggered.rb +0 -26
  319. data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
  320. data/lib/stripe/resources/capital/financing_offer.rb +0 -188
  321. data/lib/stripe/resources/capital/financing_summary.rb +0 -64
  322. data/lib/stripe/resources/capital/financing_transaction.rb +0 -123
  323. data/lib/stripe/resources/connect_collection_transfer.rb +0 -24
  324. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +0 -23
  325. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  326. data/lib/stripe/resources/financial_connections/institution.rb +0 -99
  327. data/lib/stripe/resources/gift_cards/card.rb +0 -217
  328. data/lib/stripe/resources/gift_cards/transaction.rb +0 -281
  329. data/lib/stripe/resources/invoice_payment.rb +0 -56
  330. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -611
  331. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -84
  332. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -95
  333. data/lib/stripe/resources/issuing/settlement.rb +0 -49
  334. data/lib/stripe/resources/margin.rb +0 -124
  335. data/lib/stripe/resources/order.rb +0 -2850
  336. data/lib/stripe/resources/payment_attempt_record.rb +0 -184
  337. data/lib/stripe/resources/payment_record.rb +0 -715
  338. data/lib/stripe/resources/quote_line.rb +0 -274
  339. data/lib/stripe/resources/quote_preview_invoice.rb +0 -652
  340. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -362
  341. data/lib/stripe/resources/reserve_transaction.rb +0 -22
  342. data/lib/stripe/resources/source_mandate_notification.rb +0 -66
  343. data/lib/stripe/resources/tax/association.rb +0 -89
  344. data/lib/stripe/resources/tax/form.rb +0 -220
  345. data/lib/stripe/resources/tax_deducted_at_source.rb +0 -22
  346. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -40
  347. data/lib/stripe/resources/v2/amount.rb +0 -9
  348. data/lib/stripe/services/account_notice_service.rb +0 -101
  349. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  350. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  351. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  352. data/lib/stripe/services/capital_service.rb +0 -15
  353. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -37
  354. data/lib/stripe/services/financial_connections/institution_service.rb +0 -57
  355. data/lib/stripe/services/gift_cards/card_service.rb +0 -170
  356. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
  357. data/lib/stripe/services/gift_cards_service.rb +0 -14
  358. data/lib/stripe/services/invoice_payment_service.rb +0 -55
  359. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  360. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  361. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  362. data/lib/stripe/services/margin_service.rb +0 -119
  363. data/lib/stripe/services/order_line_item_service.rb +0 -35
  364. data/lib/stripe/services/order_service.rb +0 -2254
  365. data/lib/stripe/services/payment_attempt_record_service.rb +0 -49
  366. data/lib/stripe/services/payment_record_service.rb +0 -542
  367. data/lib/stripe/services/quote_line_service.rb +0 -35
  368. data/lib/stripe/services/quote_preview_invoice_service.rb +0 -35
  369. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -35
  370. data/lib/stripe/services/tax/association_service.rb +0 -31
  371. data/lib/stripe/services/tax/form_service.rb +0 -100
  372. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  373. data/rbi/stripe/resources/account.rbi +0 -5185
  374. data/rbi/stripe/resources/account_link.rbi +0 -74
  375. data/rbi/stripe/resources/account_notice.rbi +0 -139
  376. data/rbi/stripe/resources/account_session.rbi +0 -1122
  377. data/rbi/stripe/resources/apple_pay_domain.rbi +0 -97
  378. data/rbi/stripe/resources/application.rbi +0 -20
  379. data/rbi/stripe/resources/application_fee.rbi +0 -123
  380. data/rbi/stripe/resources/application_fee_refund.rbi +0 -37
  381. data/rbi/stripe/resources/apps/secret.rbi +0 -195
  382. data/rbi/stripe/resources/balance.rbi +0 -187
  383. data/rbi/stripe/resources/balance_transaction.rbi +0 -149
  384. data/rbi/stripe/resources/bank_account.rbi +0 -127
  385. data/rbi/stripe/resources/billing/alert.rbi +0 -206
  386. data/rbi/stripe/resources/billing/alert_triggered.rbi +0 -28
  387. data/rbi/stripe/resources/billing/credit_balance_summary.rbi +0 -102
  388. data/rbi/stripe/resources/billing/credit_balance_transaction.rbi +0 -154
  389. data/rbi/stripe/resources/billing/credit_grant.rbi +0 -269
  390. data/rbi/stripe/resources/billing/meter.rbi +0 -233
  391. data/rbi/stripe/resources/billing/meter_error_report.rbi +0 -71
  392. data/rbi/stripe/resources/billing/meter_event.rbi +0 -64
  393. data/rbi/stripe/resources/billing/meter_event_adjustment.rbi +0 -64
  394. data/rbi/stripe/resources/billing/meter_event_summary.rbi +0 -33
  395. data/rbi/stripe/resources/billing_portal/configuration.rbi +0 -640
  396. data/rbi/stripe/resources/billing_portal/session.rbi +0 -341
  397. data/rbi/stripe/resources/capability.rbi +0 -125
  398. data/rbi/stripe/resources/capital/financing_offer.rbi +0 -190
  399. data/rbi/stripe/resources/capital/financing_summary.rbi +0 -74
  400. data/rbi/stripe/resources/capital/financing_transaction.rbi +0 -130
  401. data/rbi/stripe/resources/card.rbi +0 -128
  402. data/rbi/stripe/resources/cash_balance.rbi +0 -32
  403. data/rbi/stripe/resources/charge.rbi +0 -3488
  404. data/rbi/stripe/resources/checkout/session.rbi +0 -4015
  405. data/rbi/stripe/resources/climate/order.rbi +0 -250
  406. data/rbi/stripe/resources/climate/product.rbi +0 -82
  407. data/rbi/stripe/resources/climate/supplier.rbi +0 -79
  408. data/rbi/stripe/resources/confirmation_token.rbi +0 -1787
  409. data/rbi/stripe/resources/connect_collection_transfer.rbi +0 -26
  410. data/rbi/stripe/resources/country_spec.rbi +0 -92
  411. data/rbi/stripe/resources/coupon.rbi +0 -257
  412. data/rbi/stripe/resources/credit_note.rbi +0 -759
  413. data/rbi/stripe/resources/credit_note_line_item.rbi +0 -99
  414. data/rbi/stripe/resources/customer.rbi +0 -1001
  415. data/rbi/stripe/resources/customer_balance_transaction.rbi +0 -53
  416. data/rbi/stripe/resources/customer_cash_balance_transaction.rbi +0 -151
  417. data/rbi/stripe/resources/customer_session.rbi +0 -196
  418. data/rbi/stripe/resources/discount.rbi +0 -53
  419. data/rbi/stripe/resources/dispute.rbi +0 -764
  420. data/rbi/stripe/resources/entitlements/active_entitlement.rbi +0 -65
  421. data/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +0 -23
  422. data/rbi/stripe/resources/entitlements/feature.rbi +0 -124
  423. data/rbi/stripe/resources/ephemeral_key.rbi +0 -44
  424. data/rbi/stripe/resources/event.rbi +0 -190
  425. data/rbi/stripe/resources/exchange_rate.rbi +0 -73
  426. data/rbi/stripe/resources/file.rbi +0 -148
  427. data/rbi/stripe/resources/file_link.rbi +0 -146
  428. data/rbi/stripe/resources/financial_connections/account.rbi +0 -358
  429. data/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +0 -27
  430. data/rbi/stripe/resources/financial_connections/account_owner.rbi +0 -35
  431. data/rbi/stripe/resources/financial_connections/account_ownership.rbi +0 -23
  432. data/rbi/stripe/resources/financial_connections/institution.rbi +0 -99
  433. data/rbi/stripe/resources/financial_connections/session.rbi +0 -186
  434. data/rbi/stripe/resources/financial_connections/transaction.rbi +0 -127
  435. data/rbi/stripe/resources/forwarding/request.rbi +0 -219
  436. data/rbi/stripe/resources/funding_instructions.rbi +0 -437
  437. data/rbi/stripe/resources/gift_cards/card.rbi +0 -206
  438. data/rbi/stripe/resources/gift_cards/transaction.rbi +0 -257
  439. data/rbi/stripe/resources/identity/verification_report.rbi +0 -354
  440. data/rbi/stripe/resources/identity/verification_session.rbi +0 -518
  441. data/rbi/stripe/resources/invoice.rbi +0 -8928
  442. data/rbi/stripe/resources/invoice_item.rbi +0 -514
  443. data/rbi/stripe/resources/invoice_line_item.rbi +0 -400
  444. data/rbi/stripe/resources/invoice_payment.rbi +0 -70
  445. data/rbi/stripe/resources/invoice_rendering_template.rbi +0 -114
  446. data/rbi/stripe/resources/issuing/authorization.rbi +0 -1266
  447. data/rbi/stripe/resources/issuing/card.rbi +0 -738
  448. data/rbi/stripe/resources/issuing/cardholder.rbi +0 -732
  449. data/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +0 -622
  450. data/rbi/stripe/resources/issuing/dispute.rbi +0 -900
  451. data/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +0 -83
  452. data/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +0 -90
  453. data/rbi/stripe/resources/issuing/personalization_design.rbi +0 -333
  454. data/rbi/stripe/resources/issuing/physical_bundle.rbi +0 -86
  455. data/rbi/stripe/resources/issuing/settlement.rbi +0 -62
  456. data/rbi/stripe/resources/issuing/token.rbi +0 -231
  457. data/rbi/stripe/resources/issuing/transaction.rbi +0 -1057
  458. data/rbi/stripe/resources/line_item.rbi +0 -108
  459. data/rbi/stripe/resources/login_link.rbi +0 -18
  460. data/rbi/stripe/resources/mandate.rbi +0 -219
  461. data/rbi/stripe/resources/margin.rbi +0 -127
  462. data/rbi/stripe/resources/order.rbi +0 -3016
  463. data/rbi/stripe/resources/payment_attempt_record.rbi +0 -215
  464. data/rbi/stripe/resources/payment_intent.rbi +0 -13895
  465. data/rbi/stripe/resources/payment_link.rbi +0 -1666
  466. data/rbi/stripe/resources/payment_method.rbi +0 -1926
  467. data/rbi/stripe/resources/payment_method_configuration.rbi +0 -3237
  468. data/rbi/stripe/resources/payment_method_domain.rbi +0 -217
  469. data/rbi/stripe/resources/payment_record.rbi +0 -722
  470. data/rbi/stripe/resources/payout.rbi +0 -299
  471. data/rbi/stripe/resources/person.rbi +0 -371
  472. data/rbi/stripe/resources/plan.rbi +0 -385
  473. data/rbi/stripe/resources/price.rbi +0 -731
  474. data/rbi/stripe/resources/product.rbi +0 -615
  475. data/rbi/stripe/resources/product_feature.rbi +0 -26
  476. data/rbi/stripe/resources/promotion_code.rbi +0 -266
  477. data/rbi/stripe/resources/quote.rbi +0 -3186
  478. data/rbi/stripe/resources/quote_line.rbi +0 -350
  479. data/rbi/stripe/resources/quote_preview_invoice.rbi +0 -850
  480. data/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +0 -474
  481. data/rbi/stripe/resources/radar/early_fraud_warning.rbi +0 -101
  482. data/rbi/stripe/resources/radar/value_list.rbi +0 -175
  483. data/rbi/stripe/resources/radar/value_list_item.rbi +0 -134
  484. data/rbi/stripe/resources/refund.rbi +0 -515
  485. data/rbi/stripe/resources/reporting/report_run.rbi +0 -194
  486. data/rbi/stripe/resources/reporting/report_type.rbi +0 -64
  487. data/rbi/stripe/resources/reserve_transaction.rbi +0 -23
  488. data/rbi/stripe/resources/reversal.rbi +0 -51
  489. data/rbi/stripe/resources/review.rbi +0 -159
  490. data/rbi/stripe/resources/setup_attempt.rbi +0 -484
  491. data/rbi/stripe/resources/setup_intent.rbi +0 -4062
  492. data/rbi/stripe/resources/shipping_rate.rbi +0 -310
  493. data/rbi/stripe/resources/sigma/scheduled_query_run.rbi +0 -82
  494. data/rbi/stripe/resources/source.rbi +0 -1543
  495. data/rbi/stripe/resources/source_mandate_notification.rbi +0 -77
  496. data/rbi/stripe/resources/source_transaction.rbi +0 -127
  497. data/rbi/stripe/resources/subscription.rbi +0 -2308
  498. data/rbi/stripe/resources/subscription_item.rbi +0 -478
  499. data/rbi/stripe/resources/subscription_schedule.rbi +0 -2653
  500. data/rbi/stripe/resources/tax/association.rbi +0 -94
  501. data/rbi/stripe/resources/tax/calculation.rbi +0 -479
  502. data/rbi/stripe/resources/tax/calculation_line_item.rbi +0 -88
  503. data/rbi/stripe/resources/tax/form.rbi +0 -224
  504. data/rbi/stripe/resources/tax/registration.rbi +0 -2438
  505. data/rbi/stripe/resources/tax/settings.rbi +0 -148
  506. data/rbi/stripe/resources/tax/transaction.rbi +0 -356
  507. data/rbi/stripe/resources/tax/transaction_line_item.rbi +0 -54
  508. data/rbi/stripe/resources/tax_code.rbi +0 -51
  509. data/rbi/stripe/resources/tax_deducted_at_source.rbi +0 -23
  510. data/rbi/stripe/resources/tax_id.rbi +0 -174
  511. data/rbi/stripe/resources/tax_rate.rbi +0 -244
  512. data/rbi/stripe/resources/terminal/configuration.rbi +0 -1143
  513. data/rbi/stripe/resources/terminal/connection_token.rbi +0 -37
  514. data/rbi/stripe/resources/terminal/location.rbi +0 -231
  515. data/rbi/stripe/resources/terminal/reader.rbi +0 -940
  516. data/rbi/stripe/resources/terminal/reader_collected_data.rbi +0 -41
  517. data/rbi/stripe/resources/test_helpers/test_clock.rbi +0 -139
  518. data/rbi/stripe/resources/token.rbi +0 -1192
  519. data/rbi/stripe/resources/topup.rbi +0 -225
  520. data/rbi/stripe/resources/transfer.rbi +0 -204
  521. data/rbi/stripe/resources/treasury/credit_reversal.rbi +0 -126
  522. data/rbi/stripe/resources/treasury/debit_reversal.rbi +0 -138
  523. data/rbi/stripe/resources/treasury/financial_account.rbi +0 -870
  524. data/rbi/stripe/resources/treasury/financial_account_features.rbi +0 -263
  525. data/rbi/stripe/resources/treasury/inbound_transfer.rbi +0 -302
  526. data/rbi/stripe/resources/treasury/outbound_payment.rbi +0 -589
  527. data/rbi/stripe/resources/treasury/outbound_transfer.rbi +0 -473
  528. data/rbi/stripe/resources/treasury/received_credit.rbi +0 -348
  529. data/rbi/stripe/resources/treasury/received_debit.rbi +0 -305
  530. data/rbi/stripe/resources/treasury/transaction.rbi +0 -216
  531. data/rbi/stripe/resources/treasury/transaction_entry.rbi +0 -193
  532. data/rbi/stripe/resources/usage_record.rbi +0 -32
  533. data/rbi/stripe/resources/usage_record_summary.rbi +0 -38
  534. data/rbi/stripe/resources/v2/amount.rbi +0 -14
  535. data/rbi/stripe/resources/v2/billing/meter_event.rbi +0 -37
  536. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +0 -41
  537. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +0 -31
  538. data/rbi/stripe/resources/v2/event.rbi +0 -47
  539. data/rbi/stripe/resources/v2/event_destination.rbi +0 -90
  540. data/rbi/stripe/resources/webhook_endpoint.rbi +0 -177
  541. data/rbi/stripe/services/account_capability_service.rbi +0 -51
  542. data/rbi/stripe/services/account_external_account_service.rbi +0 -306
  543. data/rbi/stripe/services/account_link_service.rbi +0 -58
  544. data/rbi/stripe/services/account_login_link_service.rbi +0 -22
  545. data/rbi/stripe/services/account_notice_service.rbi +0 -90
  546. data/rbi/stripe/services/account_person_service.rbi +0 -903
  547. data/rbi/stripe/services/account_service.rbi +0 -4267
  548. data/rbi/stripe/services/account_session_service.rbi +0 -780
  549. data/rbi/stripe/services/apple_pay_domain_service.rbi +0 -78
  550. data/rbi/stripe/services/application_fee_refund_service.rbi +0 -91
  551. data/rbi/stripe/services/application_fee_service.rbi +0 -74
  552. data/rbi/stripe/services/apps/secret_service.rbi +0 -151
  553. data/rbi/stripe/services/apps_service.rbi +0 -9
  554. data/rbi/stripe/services/balance_service.rbi +0 -21
  555. data/rbi/stripe/services/balance_transaction_service.rbi +0 -89
  556. data/rbi/stripe/services/billing/alert_service.rbi +0 -152
  557. data/rbi/stripe/services/billing/credit_balance_summary_service.rbi +0 -54
  558. data/rbi/stripe/services/billing/credit_balance_transaction_service.rbi +0 -59
  559. data/rbi/stripe/services/billing/credit_grant_service.rbi +0 -191
  560. data/rbi/stripe/services/billing/meter_event_adjustment_service.rbi +0 -40
  561. data/rbi/stripe/services/billing/meter_event_service.rbi +0 -42
  562. data/rbi/stripe/services/billing/meter_event_summary_service.rbi +0 -54
  563. data/rbi/stripe/services/billing/meter_service.rbi +0 -163
  564. data/rbi/stripe/services/billing_portal/configuration_service.rbi +0 -497
  565. data/rbi/stripe/services/billing_portal/session_service.rbi +0 -202
  566. data/rbi/stripe/services/billing_portal_service.rbi +0 -10
  567. data/rbi/stripe/services/billing_service.rbi +0 -15
  568. data/rbi/stripe/services/capital/financing_offer_service.rbi +0 -95
  569. data/rbi/stripe/services/capital/financing_summary_service.rbi +0 -22
  570. data/rbi/stripe/services/capital/financing_transaction_service.rbi +0 -68
  571. data/rbi/stripe/services/capital_service.rbi +0 -11
  572. data/rbi/stripe/services/charge_service.rbi +0 -1816
  573. data/rbi/stripe/services/checkout/session_line_item_service.rbi +0 -33
  574. data/rbi/stripe/services/checkout/session_service.rbi +0 -2591
  575. data/rbi/stripe/services/checkout_service.rbi +0 -9
  576. data/rbi/stripe/services/climate/order_service.rbi +0 -140
  577. data/rbi/stripe/services/climate/product_service.rbi +0 -46
  578. data/rbi/stripe/services/climate/supplier_service.rbi +0 -46
  579. data/rbi/stripe/services/climate_service.rbi +0 -11
  580. data/rbi/stripe/services/confirmation_token_service.rbi +0 -20
  581. data/rbi/stripe/services/country_spec_service.rbi +0 -44
  582. data/rbi/stripe/services/coupon_service.rbi +0 -190
  583. data/rbi/stripe/services/credit_note_line_item_service.rbi +0 -31
  584. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +0 -167
  585. data/rbi/stripe/services/credit_note_service.rbi +0 -420
  586. data/rbi/stripe/services/customer_balance_transaction_service.rbi +0 -92
  587. data/rbi/stripe/services/customer_cash_balance_service.rbi +0 -45
  588. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +0 -44
  589. data/rbi/stripe/services/customer_funding_instructions_service.rbi +0 -59
  590. data/rbi/stripe/services/customer_payment_method_service.rbi +0 -57
  591. data/rbi/stripe/services/customer_payment_source_service.rbi +0 -228
  592. data/rbi/stripe/services/customer_service.rbi +0 -647
  593. data/rbi/stripe/services/customer_session_service.rbi +0 -110
  594. data/rbi/stripe/services/customer_tax_id_service.rbi +0 -72
  595. data/rbi/stripe/services/dispute_service.rbi +0 -422
  596. data/rbi/stripe/services/entitlements/active_entitlement_service.rbi +0 -55
  597. data/rbi/stripe/services/entitlements/feature_service.rbi +0 -107
  598. data/rbi/stripe/services/entitlements_service.rbi +0 -10
  599. data/rbi/stripe/services/ephemeral_key_service.rbi +0 -53
  600. data/rbi/stripe/services/event_service.rbi +0 -81
  601. data/rbi/stripe/services/exchange_rate_service.rbi +0 -44
  602. data/rbi/stripe/services/file_link_service.rbi +0 -122
  603. data/rbi/stripe/services/file_service.rbi +0 -114
  604. data/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi +0 -33
  605. data/rbi/stripe/services/financial_connections/account_owner_service.rbi +0 -42
  606. data/rbi/stripe/services/financial_connections/account_service.rbi +0 -132
  607. data/rbi/stripe/services/financial_connections/institution_service.rbi +0 -46
  608. data/rbi/stripe/services/financial_connections/session_service.rbi +0 -111
  609. data/rbi/stripe/services/financial_connections/transaction_service.rbi +0 -90
  610. data/rbi/stripe/services/financial_connections_service.rbi +0 -12
  611. data/rbi/stripe/services/forwarding/request_service.rbi +0 -132
  612. data/rbi/stripe/services/forwarding_service.rbi +0 -9
  613. data/rbi/stripe/services/gift_cards/card_service.rbi +0 -142
  614. data/rbi/stripe/services/gift_cards/transaction_service.rbi +0 -174
  615. data/rbi/stripe/services/gift_cards_service.rbi +0 -10
  616. data/rbi/stripe/services/identity/verification_report_service.rbi +0 -85
  617. data/rbi/stripe/services/identity/verification_session_service.rbi +0 -317
  618. data/rbi/stripe/services/identity_service.rbi +0 -10
  619. data/rbi/stripe/services/invoice_item_service.rbi +0 -424
  620. data/rbi/stripe/services/invoice_line_item_service.rbi +0 -270
  621. data/rbi/stripe/services/invoice_payment_service.rbi +0 -44
  622. data/rbi/stripe/services/invoice_rendering_template_service.rbi +0 -82
  623. data/rbi/stripe/services/invoice_service.rbi +0 -6040
  624. data/rbi/stripe/services/invoice_upcoming_lines_service.rbi +0 -2023
  625. data/rbi/stripe/services/issuing/authorization_service.rbi +0 -140
  626. data/rbi/stripe/services/issuing/card_service.rbi +0 -479
  627. data/rbi/stripe/services/issuing/cardholder_service.rbi +0 -568
  628. data/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi +0 -498
  629. data/rbi/stripe/services/issuing/dispute_service.rbi +0 -701
  630. data/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi +0 -55
  631. data/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi +0 -73
  632. data/rbi/stripe/services/issuing/personalization_design_service.rbi +0 -233
  633. data/rbi/stripe/services/issuing/physical_bundle_service.rbi +0 -59
  634. data/rbi/stripe/services/issuing/token_service.rbi +0 -95
  635. data/rbi/stripe/services/issuing/transaction_service.rbi +0 -103
  636. data/rbi/stripe/services/issuing_service.rbi +0 -19
  637. data/rbi/stripe/services/mandate_service.rbi +0 -20
  638. data/rbi/stripe/services/margin_service.rbi +0 -104
  639. data/rbi/stripe/services/order_line_item_service.rbi +0 -31
  640. data/rbi/stripe/services/order_service.rbi +0 -2306
  641. data/rbi/stripe/services/payment_attempt_record_service.rbi +0 -36
  642. data/rbi/stripe/services/payment_intent_service.rbi +0 -11477
  643. data/rbi/stripe/services/payment_link_line_item_service.rbi +0 -31
  644. data/rbi/stripe/services/payment_link_service.rbi +0 -1250
  645. data/rbi/stripe/services/payment_method_configuration_service.rbi +0 -2215
  646. data/rbi/stripe/services/payment_method_domain_service.rbi +0 -110
  647. data/rbi/stripe/services/payment_method_service.rbi +0 -897
  648. data/rbi/stripe/services/payment_record_service.rbi +0 -521
  649. data/rbi/stripe/services/payout_service.rbi +0 -197
  650. data/rbi/stripe/services/plan_service.rbi +0 -286
  651. data/rbi/stripe/services/price_service.rbi +0 -551
  652. data/rbi/stripe/services/product_feature_service.rbi +0 -69
  653. data/rbi/stripe/services/product_service.rbi +0 -503
  654. data/rbi/stripe/services/promotion_code_service.rbi +0 -210
  655. data/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi +0 -31
  656. data/rbi/stripe/services/quote_line_item_service.rbi +0 -31
  657. data/rbi/stripe/services/quote_line_service.rbi +0 -31
  658. data/rbi/stripe/services/quote_preview_invoice_service.rbi +0 -31
  659. data/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi +0 -31
  660. data/rbi/stripe/services/quote_service.rbi +0 -2390
  661. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +0 -83
  662. data/rbi/stripe/services/radar/value_list_item_service.rbi +0 -107
  663. data/rbi/stripe/services/radar/value_list_service.rbi +0 -139
  664. data/rbi/stripe/services/radar_service.rbi +0 -11
  665. data/rbi/stripe/services/refund_service.rbi +0 -181
  666. data/rbi/stripe/services/reporting/report_run_service.rbi +0 -131
  667. data/rbi/stripe/services/reporting/report_type_service.rbi +0 -35
  668. data/rbi/stripe/services/reporting_service.rbi +0 -10
  669. data/rbi/stripe/services/review_service.rbi +0 -82
  670. data/rbi/stripe/services/setup_attempt_service.rbi +0 -63
  671. data/rbi/stripe/services/setup_intent_service.rbi +0 -3630
  672. data/rbi/stripe/services/shipping_rate_service.rbi +0 -235
  673. data/rbi/stripe/services/sigma/scheduled_query_run_service.rbi +0 -46
  674. data/rbi/stripe/services/sigma_service.rbi +0 -9
  675. data/rbi/stripe/services/source_service.rbi +0 -647
  676. data/rbi/stripe/services/source_transaction_service.rbi +0 -31
  677. data/rbi/stripe/services/subscription_item_service.rbi +0 -422
  678. data/rbi/stripe/services/subscription_item_usage_record_service.rbi +0 -37
  679. data/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi +0 -33
  680. data/rbi/stripe/services/subscription_schedule_service.rbi +0 -2208
  681. data/rbi/stripe/services/subscription_service.rbi +0 -1870
  682. data/rbi/stripe/services/tax/association_service.rbi +0 -25
  683. data/rbi/stripe/services/tax/calculation_line_item_service.rbi +0 -33
  684. data/rbi/stripe/services/tax/calculation_service.rbi +0 -228
  685. data/rbi/stripe/services/tax/form_service.rbi +0 -85
  686. data/rbi/stripe/services/tax/registration_service.rbi +0 -1517
  687. data/rbi/stripe/services/tax/settings_service.rbi +0 -93
  688. data/rbi/stripe/services/tax/transaction_line_item_service.rbi +0 -33
  689. data/rbi/stripe/services/tax/transaction_service.rbi +0 -142
  690. data/rbi/stripe/services/tax_code_service.rbi +0 -44
  691. data/rbi/stripe/services/tax_id_service.rbi +0 -112
  692. data/rbi/stripe/services/tax_rate_service.rbi +0 -183
  693. data/rbi/stripe/services/tax_service.rbi +0 -14
  694. data/rbi/stripe/services/terminal/configuration_service.rbi +0 -860
  695. data/rbi/stripe/services/terminal/connection_token_service.rbi +0 -25
  696. data/rbi/stripe/services/terminal/location_service.rbi +0 -184
  697. data/rbi/stripe/services/terminal/reader_collected_data_service.rbi +0 -22
  698. data/rbi/stripe/services/terminal/reader_service.rbi +0 -513
  699. data/rbi/stripe/services/terminal_service.rbi +0 -13
  700. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +0 -787
  701. data/rbi/stripe/services/test_helpers/customer_service.rbi +0 -33
  702. data/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi +0 -836
  703. data/rbi/stripe/services/test_helpers/issuing/card_service.rbi +0 -76
  704. data/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi +0 -67
  705. data/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi +0 -705
  706. data/rbi/stripe/services/test_helpers/issuing_service.rbi +0 -14
  707. data/rbi/stripe/services/test_helpers/refund_service.rbi +0 -22
  708. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +0 -62
  709. data/rbi/stripe/services/test_helpers/terminal_service.rbi +0 -11
  710. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +0 -90
  711. data/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi +0 -64
  712. data/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi +0 -123
  713. data/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi +0 -123
  714. data/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi +0 -114
  715. data/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi +0 -114
  716. data/rbi/stripe/services/test_helpers/treasury_service.rbi +0 -15
  717. data/rbi/stripe/services/test_helpers_service.rbi +0 -15
  718. data/rbi/stripe/services/token_service.rbi +0 -1155
  719. data/rbi/stripe/services/topup_service.rbi +0 -172
  720. data/rbi/stripe/services/transfer_reversal_service.rbi +0 -99
  721. data/rbi/stripe/services/transfer_service.rbi +0 -150
  722. data/rbi/stripe/services/treasury/credit_reversal_service.rbi +0 -84
  723. data/rbi/stripe/services/treasury/debit_reversal_service.rbi +0 -88
  724. data/rbi/stripe/services/treasury/financial_account_features_service.rbi +0 -201
  725. data/rbi/stripe/services/treasury/financial_account_service.rbi +0 -566
  726. data/rbi/stripe/services/treasury/inbound_transfer_service.rbi +0 -117
  727. data/rbi/stripe/services/treasury/outbound_payment_service.rbi +0 -300
  728. data/rbi/stripe/services/treasury/outbound_transfer_service.rbi +0 -182
  729. data/rbi/stripe/services/treasury/received_credit_service.rbi +0 -70
  730. data/rbi/stripe/services/treasury/received_debit_service.rbi +0 -59
  731. data/rbi/stripe/services/treasury/transaction_entry_service.rbi +0 -107
  732. data/rbi/stripe/services/treasury/transaction_service.rbi +0 -114
  733. data/rbi/stripe/services/treasury_service.rbi +0 -18
  734. data/rbi/stripe/services/v1_services.rbi +0 -83
  735. data/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi +0 -39
  736. data/rbi/stripe/services/v2/billing/meter_event_service.rbi +0 -42
  737. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +0 -20
  738. data/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi +0 -55
  739. data/rbi/stripe/services/v2/billing_service.rbi +0 -14
  740. data/rbi/stripe/services/v2/core/event_destination_service.rbi +0 -203
  741. data/rbi/stripe/services/v2/core/event_service.rbi +0 -39
  742. data/rbi/stripe/services/v2/core_service.rbi +0 -12
  743. data/rbi/stripe/services/v2_services.rbi +0 -10
  744. data/rbi/stripe/services/webhook_endpoint_service.rbi +0 -131
@@ -1,2308 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- # typed: true
5
- module Stripe
6
- # Subscriptions allow you to charge a customer on a recurring basis.
7
- #
8
- # Related guide: [Creating subscriptions](https://stripe.com/docs/billing/subscriptions/creating)
9
- class Subscription < APIResource
10
- class AutomaticTax < Stripe::StripeObject
11
- class Liability < Stripe::StripeObject
12
- # The connected account being referenced when `type` is `account`.
13
- sig { returns(T.any(String, Stripe::Account)) }
14
- attr_reader :account
15
- # Type of the account referenced.
16
- sig { returns(String) }
17
- attr_reader :type
18
- end
19
- # If Stripe disabled automatic tax, this enum describes why.
20
- sig { returns(T.nilable(String)) }
21
- attr_reader :disabled_reason
22
- # Whether Stripe automatically computes tax on this subscription.
23
- sig { returns(T::Boolean) }
24
- attr_reader :enabled
25
- # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
26
- sig { returns(T.nilable(Liability)) }
27
- attr_reader :liability
28
- end
29
- class BillingCycleAnchorConfig < Stripe::StripeObject
30
- # The day of the month of the billing_cycle_anchor.
31
- sig { returns(Integer) }
32
- attr_reader :day_of_month
33
- # The hour of the day of the billing_cycle_anchor.
34
- sig { returns(T.nilable(Integer)) }
35
- attr_reader :hour
36
- # The minute of the hour of the billing_cycle_anchor.
37
- sig { returns(T.nilable(Integer)) }
38
- attr_reader :minute
39
- # The month to start full cycle billing periods.
40
- sig { returns(T.nilable(Integer)) }
41
- attr_reader :month
42
- # The second of the minute of the billing_cycle_anchor.
43
- sig { returns(T.nilable(Integer)) }
44
- attr_reader :second
45
- end
46
- class BillingThresholds < Stripe::StripeObject
47
- # Monetary threshold that triggers the subscription to create an invoice
48
- sig { returns(T.nilable(Integer)) }
49
- attr_reader :amount_gte
50
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
51
- sig { returns(T.nilable(T::Boolean)) }
52
- attr_reader :reset_billing_cycle_anchor
53
- end
54
- class CancellationDetails < Stripe::StripeObject
55
- # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
56
- sig { returns(T.nilable(String)) }
57
- attr_reader :comment
58
- # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
59
- sig { returns(T.nilable(String)) }
60
- attr_reader :feedback
61
- # Why this subscription was canceled.
62
- sig { returns(T.nilable(String)) }
63
- attr_reader :reason
64
- end
65
- class InvoiceSettings < Stripe::StripeObject
66
- class Issuer < Stripe::StripeObject
67
- # The connected account being referenced when `type` is `account`.
68
- sig { returns(T.any(String, Stripe::Account)) }
69
- attr_reader :account
70
- # Type of the account referenced.
71
- sig { returns(String) }
72
- attr_reader :type
73
- end
74
- # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
75
- sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) }
76
- attr_reader :account_tax_ids
77
- # Attribute for field issuer
78
- sig { returns(Issuer) }
79
- attr_reader :issuer
80
- end
81
- class LastPriceMigrationError < Stripe::StripeObject
82
- class FailedTransition < Stripe::StripeObject
83
- # The original price to be migrated.
84
- sig { returns(String) }
85
- attr_reader :source_price
86
- # The intended resulting price of the migration.
87
- sig { returns(String) }
88
- attr_reader :target_price
89
- end
90
- # The time at which the price migration encountered an error.
91
- sig { returns(Integer) }
92
- attr_reader :errored_at
93
- # The involved price pairs in each failed transition.
94
- sig { returns(T::Array[FailedTransition]) }
95
- attr_reader :failed_transitions
96
- # The type of error encountered by the price migration.
97
- sig { returns(String) }
98
- attr_reader :type
99
- end
100
- class PauseCollection < Stripe::StripeObject
101
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
102
- sig { returns(String) }
103
- attr_reader :behavior
104
- # The time after which the subscription will resume collecting payments.
105
- sig { returns(T.nilable(Integer)) }
106
- attr_reader :resumes_at
107
- end
108
- class PaymentSettings < Stripe::StripeObject
109
- class PaymentMethodOptions < Stripe::StripeObject
110
- class AcssDebit < Stripe::StripeObject
111
- class MandateOptions < Stripe::StripeObject
112
- # Transaction type of the mandate.
113
- sig { returns(T.nilable(String)) }
114
- attr_reader :transaction_type
115
- end
116
- # Attribute for field mandate_options
117
- sig { returns(MandateOptions) }
118
- attr_reader :mandate_options
119
- # Bank account verification method.
120
- sig { returns(String) }
121
- attr_reader :verification_method
122
- end
123
- class Bancontact < Stripe::StripeObject
124
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
125
- sig { returns(String) }
126
- attr_reader :preferred_language
127
- end
128
- class Card < Stripe::StripeObject
129
- class MandateOptions < Stripe::StripeObject
130
- # Amount to be charged for future payments.
131
- sig { returns(T.nilable(Integer)) }
132
- attr_reader :amount
133
- # 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.
134
- sig { returns(T.nilable(String)) }
135
- attr_reader :amount_type
136
- # A description of the mandate or subscription that is meant to be displayed to the customer.
137
- sig { returns(T.nilable(String)) }
138
- attr_reader :description
139
- end
140
- # Attribute for field mandate_options
141
- sig { returns(MandateOptions) }
142
- attr_reader :mandate_options
143
- # 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.
144
- sig { returns(T.nilable(String)) }
145
- attr_reader :network
146
- # 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.
147
- sig { returns(T.nilable(String)) }
148
- attr_reader :request_three_d_secure
149
- end
150
- class CustomerBalance < Stripe::StripeObject
151
- class BankTransfer < Stripe::StripeObject
152
- class EuBankTransfer < Stripe::StripeObject
153
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
154
- sig { returns(String) }
155
- attr_reader :country
156
- end
157
- # Attribute for field eu_bank_transfer
158
- sig { returns(EuBankTransfer) }
159
- attr_reader :eu_bank_transfer
160
- # 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`.
161
- sig { returns(T.nilable(String)) }
162
- attr_reader :type
163
- end
164
- # Attribute for field bank_transfer
165
- sig { returns(BankTransfer) }
166
- attr_reader :bank_transfer
167
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
168
- sig { returns(T.nilable(String)) }
169
- attr_reader :funding_type
170
- end
171
- class IdBankTransfer < Stripe::StripeObject; end
172
- class Konbini < Stripe::StripeObject; end
173
- class SepaDebit < Stripe::StripeObject; end
174
- class UsBankAccount < Stripe::StripeObject
175
- class FinancialConnections < Stripe::StripeObject
176
- class Filters < Stripe::StripeObject
177
- # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
178
- sig { returns(T::Array[String]) }
179
- attr_reader :account_subcategories
180
- # The institution to use to filter for possible accounts to link.
181
- sig { returns(String) }
182
- attr_reader :institution
183
- end
184
- # Attribute for field filters
185
- sig { returns(Filters) }
186
- attr_reader :filters
187
- # The list of permissions to request. The `payment_method` permission must be included.
188
- sig { returns(T::Array[String]) }
189
- attr_reader :permissions
190
- # Data features requested to be retrieved upon account creation.
191
- sig { returns(T.nilable(T::Array[String])) }
192
- attr_reader :prefetch
193
- end
194
- # Attribute for field financial_connections
195
- sig { returns(FinancialConnections) }
196
- attr_reader :financial_connections
197
- # Bank account verification method.
198
- sig { returns(String) }
199
- attr_reader :verification_method
200
- end
201
- # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription.
202
- sig { returns(T.nilable(AcssDebit)) }
203
- attr_reader :acss_debit
204
- # This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription.
205
- sig { returns(T.nilable(Bancontact)) }
206
- attr_reader :bancontact
207
- # This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription.
208
- sig { returns(T.nilable(Card)) }
209
- attr_reader :card
210
- # This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription.
211
- sig { returns(T.nilable(CustomerBalance)) }
212
- attr_reader :customer_balance
213
- # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to invoices created by the subscription.
214
- sig { returns(T.nilable(IdBankTransfer)) }
215
- attr_reader :id_bank_transfer
216
- # This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription.
217
- sig { returns(T.nilable(Konbini)) }
218
- attr_reader :konbini
219
- # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription.
220
- sig { returns(T.nilable(SepaDebit)) }
221
- attr_reader :sepa_debit
222
- # This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription.
223
- sig { returns(T.nilable(UsBankAccount)) }
224
- attr_reader :us_bank_account
225
- end
226
- # Payment-method-specific configuration to provide to invoices created by the subscription.
227
- sig { returns(T.nilable(PaymentMethodOptions)) }
228
- attr_reader :payment_method_options
229
- # The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
230
- sig { returns(T.nilable(T::Array[String])) }
231
- attr_reader :payment_method_types
232
- # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`.
233
- sig { returns(T.nilable(String)) }
234
- attr_reader :save_default_payment_method
235
- end
236
- class PendingInvoiceItemInterval < Stripe::StripeObject
237
- # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
238
- sig { returns(String) }
239
- attr_reader :interval
240
- # 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).
241
- sig { returns(Integer) }
242
- attr_reader :interval_count
243
- end
244
- class PendingUpdate < Stripe::StripeObject
245
- # If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format.
246
- sig { returns(T.nilable(Integer)) }
247
- attr_reader :billing_cycle_anchor
248
- # The point after which the changes reflected by this update will be discarded and no longer applied.
249
- sig { returns(Integer) }
250
- attr_reader :expires_at
251
- # The number of iterations of prebilling to apply.
252
- sig { returns(T.nilable(Integer)) }
253
- attr_reader :prebilling_iterations
254
- # List of subscription items, each with an attached plan, that will be set if the update is applied.
255
- sig { returns(T.nilable(T::Array[Stripe::SubscriptionItem])) }
256
- attr_reader :subscription_items
257
- # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied.
258
- sig { returns(T.nilable(Integer)) }
259
- attr_reader :trial_end
260
- # 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.
261
- sig { returns(T.nilable(T::Boolean)) }
262
- attr_reader :trial_from_plan
263
- end
264
- class Prebilling < Stripe::StripeObject
265
- # ID of the prebilling invoice.
266
- sig { returns(T.any(String, Stripe::Invoice)) }
267
- attr_reader :invoice
268
- # The end of the last period for which the invoice pre-bills.
269
- sig { returns(Integer) }
270
- attr_reader :period_end
271
- # The start of the first period for which the invoice pre-bills.
272
- sig { returns(Integer) }
273
- attr_reader :period_start
274
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period.
275
- sig { returns(String) }
276
- attr_reader :update_behavior
277
- end
278
- class TransferData < Stripe::StripeObject
279
- # 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.
280
- sig { returns(T.nilable(Float)) }
281
- attr_reader :amount_percent
282
- # The account where funds from the payment will be transferred to upon payment success.
283
- sig { returns(T.any(String, Stripe::Account)) }
284
- attr_reader :destination
285
- end
286
- class TrialSettings < Stripe::StripeObject
287
- class EndBehavior < Stripe::StripeObject
288
- # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
289
- sig { returns(String) }
290
- attr_reader :missing_payment_method
291
- end
292
- # Defines how a subscription behaves when a free trial ends.
293
- sig { returns(EndBehavior) }
294
- attr_reader :end_behavior
295
- end
296
- # ID of the Connect Application that created the subscription.
297
- sig { returns(T.nilable(T.any(String, Stripe::Application))) }
298
- attr_reader :application
299
- # 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.
300
- sig { returns(T.nilable(Float)) }
301
- attr_reader :application_fee_percent
302
- # Attribute for field automatic_tax
303
- sig { returns(AutomaticTax) }
304
- attr_reader :automatic_tax
305
- # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format.
306
- sig { returns(Integer) }
307
- attr_reader :billing_cycle_anchor
308
- # The fixed values used to calculate the `billing_cycle_anchor`.
309
- sig { returns(T.nilable(BillingCycleAnchorConfig)) }
310
- attr_reader :billing_cycle_anchor_config
311
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
312
- sig { returns(T.nilable(BillingThresholds)) }
313
- attr_reader :billing_thresholds
314
- # A date in the future at which the subscription will automatically get canceled
315
- sig { returns(T.nilable(Integer)) }
316
- attr_reader :cancel_at
317
- # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.
318
- sig { returns(T::Boolean) }
319
- attr_reader :cancel_at_period_end
320
- # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
321
- sig { returns(T.nilable(Integer)) }
322
- attr_reader :canceled_at
323
- # Details about why this subscription was cancelled
324
- sig { returns(T.nilable(CancellationDetails)) }
325
- attr_reader :cancellation_details
326
- # 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`.
327
- sig { returns(String) }
328
- attr_reader :collection_method
329
- # Time at which the object was created. Measured in seconds since the Unix epoch.
330
- sig { returns(Integer) }
331
- attr_reader :created
332
- # 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).
333
- sig { returns(String) }
334
- attr_reader :currency
335
- # End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
336
- sig { returns(Integer) }
337
- attr_reader :current_period_end
338
- # Start of the current period that the subscription has been invoiced for.
339
- sig { returns(Integer) }
340
- attr_reader :current_period_start
341
- # ID of the customer who owns the subscription.
342
- sig { returns(T.any(String, Stripe::Customer)) }
343
- attr_reader :customer
344
- # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`.
345
- sig { returns(T.nilable(Integer)) }
346
- attr_reader :days_until_due
347
- # 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).
348
- sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) }
349
- attr_reader :default_payment_method
350
- # 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).
351
- sig {
352
- returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))))
353
- }
354
- attr_reader :default_source
355
- # 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.
356
- sig { returns(T.nilable(T::Array[Stripe::TaxRate])) }
357
- attr_reader :default_tax_rates
358
- # 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.
359
- sig { returns(T.nilable(String)) }
360
- attr_reader :description
361
- # Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
362
- sig { returns(T.nilable(Stripe::Discount)) }
363
- attr_reader :discount
364
- # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
365
- sig { returns(T::Array[T.any(String, Stripe::Discount)]) }
366
- attr_reader :discounts
367
- # If the subscription has ended, the date the subscription ended.
368
- sig { returns(T.nilable(Integer)) }
369
- attr_reader :ended_at
370
- # Unique identifier for the object.
371
- sig { returns(String) }
372
- attr_reader :id
373
- # Attribute for field invoice_settings
374
- sig { returns(InvoiceSettings) }
375
- attr_reader :invoice_settings
376
- # List of subscription items, each with an attached price.
377
- sig { returns(Stripe::ListObject) }
378
- attr_reader :items
379
- # Details of the most recent price migration that failed for the subscription.
380
- sig { returns(T.nilable(LastPriceMigrationError)) }
381
- attr_reader :last_price_migration_error
382
- # The most recent invoice this subscription has generated.
383
- sig { returns(T.nilable(T.any(String, Stripe::Invoice))) }
384
- attr_reader :latest_invoice
385
- # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
386
- sig { returns(T::Boolean) }
387
- attr_reader :livemode
388
- # 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.
389
- sig { returns(T::Hash[String, String]) }
390
- attr_reader :metadata
391
- # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`.
392
- sig { returns(T.nilable(Integer)) }
393
- attr_reader :next_pending_invoice_item_invoice
394
- # String representing the object's type. Objects of the same type share the same value.
395
- sig { returns(String) }
396
- attr_reader :object
397
- # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details.
398
- sig { returns(T.nilable(T.any(String, Stripe::Account))) }
399
- attr_reader :on_behalf_of
400
- # 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).
401
- sig { returns(T.nilable(PauseCollection)) }
402
- attr_reader :pause_collection
403
- # Payment settings passed on to invoices created by the subscription.
404
- sig { returns(T.nilable(PaymentSettings)) }
405
- attr_reader :payment_settings
406
- # 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.
407
- sig { returns(T.nilable(PendingInvoiceItemInterval)) }
408
- attr_reader :pending_invoice_item_interval
409
- # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2).
410
- sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) }
411
- attr_reader :pending_setup_intent
412
- # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid.
413
- sig { returns(T.nilable(PendingUpdate)) }
414
- attr_reader :pending_update
415
- # Time period and invoice for a Subscription billed in advance.
416
- sig { returns(T.nilable(Prebilling)) }
417
- attr_reader :prebilling
418
- # The schedule attached to the subscription
419
- sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) }
420
- attr_reader :schedule
421
- # Date when the subscription was first created. The date might differ from the `created` date due to backdating.
422
- sig { returns(Integer) }
423
- attr_reader :start_date
424
- # Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`.
425
- #
426
- # For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated.
427
- #
428
- # A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over.
429
- #
430
- # A subscription can only enter a `paused` status [when a trial ends without a payment method](https://stripe.com/docs/billing/subscriptions/trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged.
431
- #
432
- # If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings).
433
- #
434
- # If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices.
435
- sig { returns(String) }
436
- attr_reader :status
437
- # ID of the test clock this subscription belongs to.
438
- sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) }
439
- attr_reader :test_clock
440
- # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
441
- sig { returns(T.nilable(TransferData)) }
442
- attr_reader :transfer_data
443
- # If the subscription has a trial, the end of that trial.
444
- sig { returns(T.nilable(Integer)) }
445
- attr_reader :trial_end
446
- # Settings related to subscription trials.
447
- sig { returns(T.nilable(TrialSettings)) }
448
- attr_reader :trial_settings
449
- # If the subscription has a trial, the beginning of that trial.
450
- sig { returns(T.nilable(Integer)) }
451
- attr_reader :trial_start
452
- class CancelParams < Stripe::RequestParams
453
- class CancellationDetails < Stripe::RequestParams
454
- # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
455
- sig { returns(T.nilable(String)) }
456
- attr_accessor :comment
457
- # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
458
- sig { returns(T.nilable(String)) }
459
- attr_accessor :feedback
460
- sig { params(comment: T.nilable(String), feedback: T.nilable(String)).void }
461
- def initialize(comment: nil, feedback: nil); end
462
- end
463
- # Details about why this subscription was cancelled
464
- sig { returns(::Stripe::Subscription::CancelParams::CancellationDetails) }
465
- attr_accessor :cancellation_details
466
- # Specifies which fields in the response should be expanded.
467
- sig { returns(T::Array[String]) }
468
- attr_accessor :expand
469
- # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.
470
- sig { returns(T::Boolean) }
471
- attr_accessor :invoice_now
472
- # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`.
473
- sig { returns(T::Boolean) }
474
- attr_accessor :prorate
475
- sig {
476
- params(cancellation_details: ::Stripe::Subscription::CancelParams::CancellationDetails, expand: T::Array[String], invoice_now: T::Boolean, prorate: T::Boolean).void
477
- }
478
- def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil); end
479
- end
480
- class RetrieveParams < Stripe::RequestParams
481
- # Specifies which fields in the response should be expanded.
482
- sig { returns(T::Array[String]) }
483
- attr_accessor :expand
484
- sig { params(expand: T::Array[String]).void }
485
- def initialize(expand: nil); end
486
- end
487
- class UpdateParams < Stripe::RequestParams
488
- class AddInvoiceItem < Stripe::RequestParams
489
- class Discount < Stripe::RequestParams
490
- class DiscountEnd < Stripe::RequestParams
491
- class Duration < Stripe::RequestParams
492
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
493
- sig { returns(String) }
494
- attr_accessor :interval
495
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
496
- sig { returns(Integer) }
497
- attr_accessor :interval_count
498
- sig { params(interval: String, interval_count: Integer).void }
499
- def initialize(interval: nil, interval_count: nil); end
500
- end
501
- # Time span for the redeemed discount.
502
- sig {
503
- returns(::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount::DiscountEnd::Duration)
504
- }
505
- attr_accessor :duration
506
- # A precise Unix timestamp for the discount to end. Must be in the future.
507
- sig { returns(Integer) }
508
- attr_accessor :timestamp
509
- # The type of calculation made to determine when the discount ends.
510
- sig { returns(String) }
511
- attr_accessor :type
512
- sig {
513
- params(duration: ::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
514
- }
515
- def initialize(duration: nil, timestamp: nil, type: nil); end
516
- end
517
- # ID of the coupon to create a new discount for.
518
- sig { returns(String) }
519
- attr_accessor :coupon
520
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
521
- sig { returns(String) }
522
- attr_accessor :discount
523
- # Details to determine how long the discount should be applied for.
524
- sig {
525
- returns(::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount::DiscountEnd)
526
- }
527
- attr_accessor :discount_end
528
- # ID of the promotion code to create a new discount for.
529
- sig { returns(String) }
530
- attr_accessor :promotion_code
531
- sig {
532
- params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void
533
- }
534
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
535
- end
536
- class PriceData < Stripe::RequestParams
537
- # 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).
538
- sig { returns(String) }
539
- attr_accessor :currency
540
- # The ID of the product that this price will belong to.
541
- sig { returns(String) }
542
- attr_accessor :product
543
- # 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.
544
- sig { returns(String) }
545
- attr_accessor :tax_behavior
546
- # 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.
547
- sig { returns(Integer) }
548
- attr_accessor :unit_amount
549
- # 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.
550
- sig { returns(String) }
551
- attr_accessor :unit_amount_decimal
552
- sig {
553
- params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
554
- }
555
- def initialize(
556
- currency: nil,
557
- product: nil,
558
- tax_behavior: nil,
559
- unit_amount: nil,
560
- unit_amount_decimal: nil
561
- ); end
562
- end
563
- # The coupons to redeem into discounts for the item.
564
- sig { returns(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount]) }
565
- attr_accessor :discounts
566
- # The ID of the price object. One of `price` or `price_data` is required.
567
- sig { returns(String) }
568
- attr_accessor :price
569
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
570
- sig { returns(::Stripe::Subscription::UpdateParams::AddInvoiceItem::PriceData) }
571
- attr_accessor :price_data
572
- # Quantity for this item. Defaults to 1.
573
- sig { returns(Integer) }
574
- attr_accessor :quantity
575
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
576
- sig { returns(T.nilable(T::Array[String])) }
577
- attr_accessor :tax_rates
578
- sig {
579
- params(discounts: T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::Subscription::UpdateParams::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
580
- }
581
- def initialize(
582
- discounts: nil,
583
- price: nil,
584
- price_data: nil,
585
- quantity: nil,
586
- tax_rates: nil
587
- ); end
588
- end
589
- class AutomaticTax < Stripe::RequestParams
590
- class Liability < Stripe::RequestParams
591
- # The connected account being referenced when `type` is `account`.
592
- sig { returns(String) }
593
- attr_accessor :account
594
- # Type of the account referenced in the request.
595
- sig { returns(String) }
596
- attr_accessor :type
597
- sig { params(account: String, type: String).void }
598
- def initialize(account: nil, type: nil); end
599
- end
600
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
601
- sig { returns(T::Boolean) }
602
- attr_accessor :enabled
603
- # 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.
604
- sig { returns(::Stripe::Subscription::UpdateParams::AutomaticTax::Liability) }
605
- attr_accessor :liability
606
- sig {
607
- params(enabled: T::Boolean, liability: ::Stripe::Subscription::UpdateParams::AutomaticTax::Liability).void
608
- }
609
- def initialize(enabled: nil, liability: nil); end
610
- end
611
- class BillingThresholds < Stripe::RequestParams
612
- # Monetary threshold that triggers the subscription to advance to a new billing period
613
- sig { returns(Integer) }
614
- attr_accessor :amount_gte
615
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
616
- sig { returns(T::Boolean) }
617
- attr_accessor :reset_billing_cycle_anchor
618
- sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
619
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
620
- end
621
- class CancellationDetails < Stripe::RequestParams
622
- # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
623
- sig { returns(T.nilable(String)) }
624
- attr_accessor :comment
625
- # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
626
- sig { returns(T.nilable(String)) }
627
- attr_accessor :feedback
628
- sig { params(comment: T.nilable(String), feedback: T.nilable(String)).void }
629
- def initialize(comment: nil, feedback: nil); end
630
- end
631
- class Discount < Stripe::RequestParams
632
- class DiscountEnd < Stripe::RequestParams
633
- class Duration < Stripe::RequestParams
634
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
635
- sig { returns(String) }
636
- attr_accessor :interval
637
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
638
- sig { returns(Integer) }
639
- attr_accessor :interval_count
640
- sig { params(interval: String, interval_count: Integer).void }
641
- def initialize(interval: nil, interval_count: nil); end
642
- end
643
- # Time span for the redeemed discount.
644
- sig { returns(::Stripe::Subscription::UpdateParams::Discount::DiscountEnd::Duration) }
645
- attr_accessor :duration
646
- # A precise Unix timestamp for the discount to end. Must be in the future.
647
- sig { returns(Integer) }
648
- attr_accessor :timestamp
649
- # The type of calculation made to determine when the discount ends.
650
- sig { returns(String) }
651
- attr_accessor :type
652
- sig {
653
- params(duration: ::Stripe::Subscription::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
654
- }
655
- def initialize(duration: nil, timestamp: nil, type: nil); end
656
- end
657
- # ID of the coupon to create a new discount for.
658
- sig { returns(String) }
659
- attr_accessor :coupon
660
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
661
- sig { returns(String) }
662
- attr_accessor :discount
663
- # Details to determine how long the discount should be applied for.
664
- sig { returns(::Stripe::Subscription::UpdateParams::Discount::DiscountEnd) }
665
- attr_accessor :discount_end
666
- # ID of the promotion code to create a new discount for.
667
- sig { returns(String) }
668
- attr_accessor :promotion_code
669
- sig {
670
- params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::UpdateParams::Discount::DiscountEnd, promotion_code: String).void
671
- }
672
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
673
- end
674
- class InvoiceSettings < Stripe::RequestParams
675
- class Issuer < Stripe::RequestParams
676
- # The connected account being referenced when `type` is `account`.
677
- sig { returns(String) }
678
- attr_accessor :account
679
- # Type of the account referenced in the request.
680
- sig { returns(String) }
681
- attr_accessor :type
682
- sig { params(account: String, type: String).void }
683
- def initialize(account: nil, type: nil); end
684
- end
685
- # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
686
- sig { returns(T.nilable(T::Array[String])) }
687
- attr_accessor :account_tax_ids
688
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
689
- sig { returns(::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer) }
690
- attr_accessor :issuer
691
- sig {
692
- params(account_tax_ids: T.nilable(T::Array[String]), issuer: ::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer).void
693
- }
694
- def initialize(account_tax_ids: nil, issuer: nil); end
695
- end
696
- class Item < Stripe::RequestParams
697
- class BillingThresholds < Stripe::RequestParams
698
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
699
- sig { returns(Integer) }
700
- attr_accessor :usage_gte
701
- sig { params(usage_gte: Integer).void }
702
- def initialize(usage_gte: nil); end
703
- end
704
- class Discount < Stripe::RequestParams
705
- class DiscountEnd < Stripe::RequestParams
706
- class Duration < Stripe::RequestParams
707
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
708
- sig { returns(String) }
709
- attr_accessor :interval
710
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
711
- sig { returns(Integer) }
712
- attr_accessor :interval_count
713
- sig { params(interval: String, interval_count: Integer).void }
714
- def initialize(interval: nil, interval_count: nil); end
715
- end
716
- # Time span for the redeemed discount.
717
- sig {
718
- returns(::Stripe::Subscription::UpdateParams::Item::Discount::DiscountEnd::Duration)
719
- }
720
- attr_accessor :duration
721
- # A precise Unix timestamp for the discount to end. Must be in the future.
722
- sig { returns(Integer) }
723
- attr_accessor :timestamp
724
- # The type of calculation made to determine when the discount ends.
725
- sig { returns(String) }
726
- attr_accessor :type
727
- sig {
728
- params(duration: ::Stripe::Subscription::UpdateParams::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
729
- }
730
- def initialize(duration: nil, timestamp: nil, type: nil); end
731
- end
732
- # ID of the coupon to create a new discount for.
733
- sig { returns(String) }
734
- attr_accessor :coupon
735
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
736
- sig { returns(String) }
737
- attr_accessor :discount
738
- # Details to determine how long the discount should be applied for.
739
- sig { returns(::Stripe::Subscription::UpdateParams::Item::Discount::DiscountEnd) }
740
- attr_accessor :discount_end
741
- # ID of the promotion code to create a new discount for.
742
- sig { returns(String) }
743
- attr_accessor :promotion_code
744
- sig {
745
- params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::UpdateParams::Item::Discount::DiscountEnd, promotion_code: String).void
746
- }
747
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
748
- end
749
- class PriceData < Stripe::RequestParams
750
- class Recurring < Stripe::RequestParams
751
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
752
- sig { returns(String) }
753
- attr_accessor :interval
754
- # 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).
755
- sig { returns(Integer) }
756
- attr_accessor :interval_count
757
- sig { params(interval: String, interval_count: Integer).void }
758
- def initialize(interval: nil, interval_count: nil); end
759
- end
760
- # 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).
761
- sig { returns(String) }
762
- attr_accessor :currency
763
- # The ID of the product that this price will belong to.
764
- sig { returns(String) }
765
- attr_accessor :product
766
- # The recurring components of a price such as `interval` and `interval_count`.
767
- sig { returns(::Stripe::Subscription::UpdateParams::Item::PriceData::Recurring) }
768
- attr_accessor :recurring
769
- # 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.
770
- sig { returns(String) }
771
- attr_accessor :tax_behavior
772
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
773
- sig { returns(Integer) }
774
- attr_accessor :unit_amount
775
- # 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.
776
- sig { returns(String) }
777
- attr_accessor :unit_amount_decimal
778
- sig {
779
- params(currency: String, product: String, recurring: ::Stripe::Subscription::UpdateParams::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
780
- }
781
- def initialize(
782
- currency: nil,
783
- product: nil,
784
- recurring: nil,
785
- tax_behavior: nil,
786
- unit_amount: nil,
787
- unit_amount_decimal: nil
788
- ); end
789
- end
790
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
791
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::Item::BillingThresholds)) }
792
- attr_accessor :billing_thresholds
793
- # 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.
794
- sig { returns(T::Boolean) }
795
- attr_accessor :clear_usage
796
- # A flag that, if set to `true`, will delete the specified item.
797
- sig { returns(T::Boolean) }
798
- attr_accessor :deleted
799
- # The coupons to redeem into discounts for the subscription item.
800
- sig { returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Item::Discount])) }
801
- attr_accessor :discounts
802
- # Subscription item to update.
803
- sig { returns(String) }
804
- attr_accessor :id
805
- # 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`.
806
- sig { returns(T.nilable(T::Hash[String, String])) }
807
- attr_accessor :metadata
808
- # Plan ID for this item, as a string.
809
- sig { returns(String) }
810
- attr_accessor :plan
811
- # 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.
812
- sig { returns(String) }
813
- attr_accessor :price
814
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
815
- sig { returns(::Stripe::Subscription::UpdateParams::Item::PriceData) }
816
- attr_accessor :price_data
817
- # Quantity for this item.
818
- sig { returns(Integer) }
819
- attr_accessor :quantity
820
- # 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.
821
- sig { returns(T.nilable(T::Array[String])) }
822
- attr_accessor :tax_rates
823
- sig {
824
- params(billing_thresholds: T.nilable(::Stripe::Subscription::UpdateParams::Item::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Item::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::Subscription::UpdateParams::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
825
- }
826
- def initialize(
827
- billing_thresholds: nil,
828
- clear_usage: nil,
829
- deleted: nil,
830
- discounts: nil,
831
- id: nil,
832
- metadata: nil,
833
- plan: nil,
834
- price: nil,
835
- price_data: nil,
836
- quantity: nil,
837
- tax_rates: nil
838
- ); end
839
- end
840
- class PauseCollection < Stripe::RequestParams
841
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
842
- sig { returns(String) }
843
- attr_accessor :behavior
844
- # The time after which the subscription will resume collecting payments.
845
- sig { returns(Integer) }
846
- attr_accessor :resumes_at
847
- sig { params(behavior: String, resumes_at: Integer).void }
848
- def initialize(behavior: nil, resumes_at: nil); end
849
- end
850
- class PaymentSettings < Stripe::RequestParams
851
- class PaymentMethodOptions < Stripe::RequestParams
852
- class AcssDebit < Stripe::RequestParams
853
- class MandateOptions < Stripe::RequestParams
854
- # Transaction type of the mandate.
855
- sig { returns(String) }
856
- attr_accessor :transaction_type
857
- sig { params(transaction_type: String).void }
858
- def initialize(transaction_type: nil); end
859
- end
860
- # Additional fields for Mandate creation
861
- sig {
862
- returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions)
863
- }
864
- attr_accessor :mandate_options
865
- # Verification method for the intent
866
- sig { returns(String) }
867
- attr_accessor :verification_method
868
- sig {
869
- params(mandate_options: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void
870
- }
871
- def initialize(mandate_options: nil, verification_method: nil); end
872
- end
873
- class Bancontact < Stripe::RequestParams
874
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
875
- sig { returns(String) }
876
- attr_accessor :preferred_language
877
- sig { params(preferred_language: String).void }
878
- def initialize(preferred_language: nil); end
879
- end
880
- class Card < Stripe::RequestParams
881
- class MandateOptions < Stripe::RequestParams
882
- # Amount to be charged for future payments.
883
- sig { returns(Integer) }
884
- attr_accessor :amount
885
- # 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.
886
- sig { returns(String) }
887
- attr_accessor :amount_type
888
- # A description of the mandate or subscription that is meant to be displayed to the customer.
889
- sig { returns(String) }
890
- attr_accessor :description
891
- sig { params(amount: Integer, amount_type: String, description: String).void }
892
- def initialize(amount: nil, amount_type: nil, description: nil); end
893
- end
894
- # Configuration options for setting up an eMandate for cards issued in India.
895
- sig {
896
- returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions)
897
- }
898
- attr_accessor :mandate_options
899
- # 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.
900
- sig { returns(String) }
901
- attr_accessor :network
902
- # 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.
903
- sig { returns(String) }
904
- attr_accessor :request_three_d_secure
905
- sig {
906
- params(mandate_options: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions, network: String, request_three_d_secure: String).void
907
- }
908
- def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
909
- end
910
- class CustomerBalance < Stripe::RequestParams
911
- class BankTransfer < Stripe::RequestParams
912
- class EuBankTransfer < Stripe::RequestParams
913
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
914
- sig { returns(String) }
915
- attr_accessor :country
916
- sig { params(country: String).void }
917
- def initialize(country: nil); end
918
- end
919
- # Configuration for eu_bank_transfer funding type.
920
- sig {
921
- returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer)
922
- }
923
- attr_accessor :eu_bank_transfer
924
- # 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`.
925
- sig { returns(String) }
926
- attr_accessor :type
927
- sig {
928
- params(eu_bank_transfer: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void
929
- }
930
- def initialize(eu_bank_transfer: nil, type: nil); end
931
- end
932
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
933
- sig {
934
- returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer)
935
- }
936
- attr_accessor :bank_transfer
937
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
938
- sig { returns(String) }
939
- attr_accessor :funding_type
940
- sig {
941
- params(bank_transfer: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void
942
- }
943
- def initialize(bank_transfer: nil, funding_type: nil); end
944
- end
945
- class IdBankTransfer < Stripe::RequestParams
946
-
947
- end
948
- class Konbini < Stripe::RequestParams
949
-
950
- end
951
- class SepaDebit < Stripe::RequestParams
952
-
953
- end
954
- class UsBankAccount < Stripe::RequestParams
955
- class FinancialConnections < Stripe::RequestParams
956
- class Filters < Stripe::RequestParams
957
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
958
- sig { returns(T::Array[String]) }
959
- attr_accessor :account_subcategories
960
- # ID of the institution to use to filter for selectable accounts.
961
- sig { returns(String) }
962
- attr_accessor :institution
963
- sig { params(account_subcategories: T::Array[String], institution: String).void }
964
- def initialize(account_subcategories: nil, institution: nil); end
965
- end
966
- # Provide filters for the linked accounts that the customer can select for the payment method.
967
- sig {
968
- returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters)
969
- }
970
- attr_accessor :filters
971
- # 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`.
972
- sig { returns(T::Array[String]) }
973
- attr_accessor :permissions
974
- # List of data features that you would like to retrieve upon account creation.
975
- sig { returns(T::Array[String]) }
976
- attr_accessor :prefetch
977
- sig {
978
- params(filters: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void
979
- }
980
- def initialize(filters: nil, permissions: nil, prefetch: nil); end
981
- end
982
- # Additional fields for Financial Connections Session creation
983
- sig {
984
- returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections)
985
- }
986
- attr_accessor :financial_connections
987
- # Verification method for the intent
988
- sig { returns(String) }
989
- attr_accessor :verification_method
990
- sig {
991
- params(financial_connections: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void
992
- }
993
- def initialize(financial_connections: nil, verification_method: nil); end
994
- end
995
- # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
996
- sig {
997
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))
998
- }
999
- attr_accessor :acss_debit
1000
- # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
1001
- sig {
1002
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact))
1003
- }
1004
- attr_accessor :bancontact
1005
- # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
1006
- sig {
1007
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card))
1008
- }
1009
- attr_accessor :card
1010
- # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
1011
- sig {
1012
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))
1013
- }
1014
- attr_accessor :customer_balance
1015
- # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
1016
- sig {
1017
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer))
1018
- }
1019
- attr_accessor :id_bank_transfer
1020
- # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
1021
- sig {
1022
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini))
1023
- }
1024
- attr_accessor :konbini
1025
- # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
1026
- sig {
1027
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))
1028
- }
1029
- attr_accessor :sepa_debit
1030
- # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
1031
- sig {
1032
- returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))
1033
- }
1034
- attr_accessor :us_bank_account
1035
- sig {
1036
- params(acss_debit: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance), id_bank_transfer: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer), konbini: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini), sepa_debit: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)).void
1037
- }
1038
- def initialize(
1039
- acss_debit: nil,
1040
- bancontact: nil,
1041
- card: nil,
1042
- customer_balance: nil,
1043
- id_bank_transfer: nil,
1044
- konbini: nil,
1045
- sepa_debit: nil,
1046
- us_bank_account: nil
1047
- ); end
1048
- end
1049
- # Payment-method-specific configuration to provide to invoices created by the subscription.
1050
- sig { returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions) }
1051
- attr_accessor :payment_method_options
1052
- # 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
1053
- sig { returns(T.nilable(T::Array[String])) }
1054
- attr_accessor :payment_method_types
1055
- # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
1056
- sig { returns(String) }
1057
- attr_accessor :save_default_payment_method
1058
- sig {
1059
- params(payment_method_options: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String]), save_default_payment_method: String).void
1060
- }
1061
- def initialize(
1062
- payment_method_options: nil,
1063
- payment_method_types: nil,
1064
- save_default_payment_method: nil
1065
- ); end
1066
- end
1067
- class PendingInvoiceItemInterval < Stripe::RequestParams
1068
- # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
1069
- sig { returns(String) }
1070
- attr_accessor :interval
1071
- # 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).
1072
- sig { returns(Integer) }
1073
- attr_accessor :interval_count
1074
- sig { params(interval: String, interval_count: Integer).void }
1075
- def initialize(interval: nil, interval_count: nil); end
1076
- end
1077
- class Prebilling < Stripe::RequestParams
1078
- # This is used to determine the number of billing cycles to prebill.
1079
- sig { returns(Integer) }
1080
- attr_accessor :iterations
1081
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1082
- sig { returns(String) }
1083
- attr_accessor :update_behavior
1084
- sig { params(iterations: Integer, update_behavior: String).void }
1085
- def initialize(iterations: nil, update_behavior: nil); end
1086
- end
1087
- class TransferData < Stripe::RequestParams
1088
- # 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.
1089
- sig { returns(Float) }
1090
- attr_accessor :amount_percent
1091
- # ID of an existing, connected Stripe account.
1092
- sig { returns(String) }
1093
- attr_accessor :destination
1094
- sig { params(amount_percent: Float, destination: String).void }
1095
- def initialize(amount_percent: nil, destination: nil); end
1096
- end
1097
- class TrialSettings < Stripe::RequestParams
1098
- class EndBehavior < Stripe::RequestParams
1099
- # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
1100
- sig { returns(String) }
1101
- attr_accessor :missing_payment_method
1102
- sig { params(missing_payment_method: String).void }
1103
- def initialize(missing_payment_method: nil); end
1104
- end
1105
- # Defines how the subscription should behave when the user's free trial ends.
1106
- sig { returns(::Stripe::Subscription::UpdateParams::TrialSettings::EndBehavior) }
1107
- attr_accessor :end_behavior
1108
- sig {
1109
- params(end_behavior: ::Stripe::Subscription::UpdateParams::TrialSettings::EndBehavior).void
1110
- }
1111
- def initialize(end_behavior: nil); end
1112
- end
1113
- # 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.
1114
- sig { returns(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem]) }
1115
- attr_accessor :add_invoice_items
1116
- # 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).
1117
- sig { returns(T.nilable(Float)) }
1118
- attr_accessor :application_fee_percent
1119
- # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
1120
- sig { returns(::Stripe::Subscription::UpdateParams::AutomaticTax) }
1121
- attr_accessor :automatic_tax
1122
- # 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).
1123
- sig { returns(String) }
1124
- attr_accessor :billing_cycle_anchor
1125
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
1126
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::BillingThresholds)) }
1127
- attr_accessor :billing_thresholds
1128
- # 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.
1129
- sig { returns(T.nilable(Integer)) }
1130
- attr_accessor :cancel_at
1131
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1132
- sig { returns(T::Boolean) }
1133
- attr_accessor :cancel_at_period_end
1134
- # Details about why this subscription was cancelled
1135
- sig { returns(::Stripe::Subscription::UpdateParams::CancellationDetails) }
1136
- attr_accessor :cancellation_details
1137
- # 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`.
1138
- sig { returns(String) }
1139
- attr_accessor :collection_method
1140
- # The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
1141
- sig { returns(String) }
1142
- attr_accessor :coupon
1143
- # 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`.
1144
- sig { returns(Integer) }
1145
- attr_accessor :days_until_due
1146
- # 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).
1147
- sig { returns(String) }
1148
- attr_accessor :default_payment_method
1149
- # 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).
1150
- sig { returns(T.nilable(String)) }
1151
- attr_accessor :default_source
1152
- # 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.
1153
- sig { returns(T.nilable(T::Array[String])) }
1154
- attr_accessor :default_tax_rates
1155
- # 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.
1156
- sig { returns(T.nilable(String)) }
1157
- attr_accessor :description
1158
- # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
1159
- sig { returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Discount])) }
1160
- attr_accessor :discounts
1161
- # Specifies which fields in the response should be expanded.
1162
- sig { returns(T::Array[String]) }
1163
- attr_accessor :expand
1164
- # All invoices will be billed using the specified settings.
1165
- sig { returns(::Stripe::Subscription::UpdateParams::InvoiceSettings) }
1166
- attr_accessor :invoice_settings
1167
- # A list of up to 20 subscription items, each with an attached price.
1168
- sig { returns(T::Array[::Stripe::Subscription::UpdateParams::Item]) }
1169
- attr_accessor :items
1170
- # 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`.
1171
- sig { returns(T.nilable(T::Hash[String, String])) }
1172
- attr_accessor :metadata
1173
- # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
1174
- sig { returns(T::Boolean) }
1175
- attr_accessor :off_session
1176
- # The account on behalf of which to charge, for each of the subscription's invoices.
1177
- sig { returns(T.nilable(String)) }
1178
- attr_accessor :on_behalf_of
1179
- # 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).
1180
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::PauseCollection)) }
1181
- attr_accessor :pause_collection
1182
- # 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.
1183
- #
1184
- # 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.
1185
- #
1186
- # 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).
1187
- #
1188
- # 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.
1189
- sig { returns(String) }
1190
- attr_accessor :payment_behavior
1191
- # Payment settings to pass to invoices created by the subscription.
1192
- sig { returns(::Stripe::Subscription::UpdateParams::PaymentSettings) }
1193
- attr_accessor :payment_settings
1194
- # 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.
1195
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::PendingInvoiceItemInterval)) }
1196
- attr_accessor :pending_invoice_item_interval
1197
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
1198
- sig { returns(::Stripe::Subscription::UpdateParams::Prebilling) }
1199
- attr_accessor :prebilling
1200
- # The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
1201
- sig { returns(String) }
1202
- attr_accessor :promotion_code
1203
- # 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`.
1204
- sig { returns(String) }
1205
- attr_accessor :proration_behavior
1206
- # 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.
1207
- sig { returns(Integer) }
1208
- attr_accessor :proration_date
1209
- # 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.
1210
- sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::TransferData)) }
1211
- attr_accessor :transfer_data
1212
- # 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`.
1213
- sig { returns(T.any(String, Integer)) }
1214
- attr_accessor :trial_end
1215
- # 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.
1216
- sig { returns(T::Boolean) }
1217
- attr_accessor :trial_from_plan
1218
- # Settings related to subscription trials.
1219
- sig { returns(::Stripe::Subscription::UpdateParams::TrialSettings) }
1220
- attr_accessor :trial_settings
1221
- sig {
1222
- params(add_invoice_items: T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem], application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::Subscription::UpdateParams::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::Subscription::UpdateParams::BillingThresholds), cancel_at: T.nilable(Integer), cancel_at_period_end: T::Boolean, cancellation_details: ::Stripe::Subscription::UpdateParams::CancellationDetails, collection_method: String, coupon: String, days_until_due: Integer, default_payment_method: String, default_source: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Discount]), expand: T::Array[String], invoice_settings: ::Stripe::Subscription::UpdateParams::InvoiceSettings, items: T::Array[::Stripe::Subscription::UpdateParams::Item], metadata: T.nilable(T::Hash[String, String]), off_session: T::Boolean, on_behalf_of: T.nilable(String), pause_collection: T.nilable(::Stripe::Subscription::UpdateParams::PauseCollection), payment_behavior: String, payment_settings: ::Stripe::Subscription::UpdateParams::PaymentSettings, pending_invoice_item_interval: T.nilable(::Stripe::Subscription::UpdateParams::PendingInvoiceItemInterval), prebilling: ::Stripe::Subscription::UpdateParams::Prebilling, promotion_code: String, proration_behavior: String, proration_date: Integer, transfer_data: T.nilable(::Stripe::Subscription::UpdateParams::TransferData), trial_end: T.any(String, Integer), trial_from_plan: T::Boolean, trial_settings: ::Stripe::Subscription::UpdateParams::TrialSettings).void
1223
- }
1224
- def initialize(
1225
- add_invoice_items: nil,
1226
- application_fee_percent: nil,
1227
- automatic_tax: nil,
1228
- billing_cycle_anchor: nil,
1229
- billing_thresholds: nil,
1230
- cancel_at: nil,
1231
- cancel_at_period_end: nil,
1232
- cancellation_details: nil,
1233
- collection_method: nil,
1234
- coupon: nil,
1235
- days_until_due: nil,
1236
- default_payment_method: nil,
1237
- default_source: nil,
1238
- default_tax_rates: nil,
1239
- description: nil,
1240
- discounts: nil,
1241
- expand: nil,
1242
- invoice_settings: nil,
1243
- items: nil,
1244
- metadata: nil,
1245
- off_session: nil,
1246
- on_behalf_of: nil,
1247
- pause_collection: nil,
1248
- payment_behavior: nil,
1249
- payment_settings: nil,
1250
- pending_invoice_item_interval: nil,
1251
- prebilling: nil,
1252
- promotion_code: nil,
1253
- proration_behavior: nil,
1254
- proration_date: nil,
1255
- transfer_data: nil,
1256
- trial_end: nil,
1257
- trial_from_plan: nil,
1258
- trial_settings: nil
1259
- ); end
1260
- end
1261
- class DeleteDiscountParams < Stripe::RequestParams
1262
-
1263
- end
1264
- class ListParams < Stripe::RequestParams
1265
- class AutomaticTax < Stripe::RequestParams
1266
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1267
- sig { returns(T::Boolean) }
1268
- attr_accessor :enabled
1269
- sig { params(enabled: T::Boolean).void }
1270
- def initialize(enabled: nil); end
1271
- end
1272
- class Created < Stripe::RequestParams
1273
- # Minimum value to filter by (exclusive)
1274
- sig { returns(Integer) }
1275
- attr_accessor :gt
1276
- # Minimum value to filter by (inclusive)
1277
- sig { returns(Integer) }
1278
- attr_accessor :gte
1279
- # Maximum value to filter by (exclusive)
1280
- sig { returns(Integer) }
1281
- attr_accessor :lt
1282
- # Maximum value to filter by (inclusive)
1283
- sig { returns(Integer) }
1284
- attr_accessor :lte
1285
- sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void }
1286
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
1287
- end
1288
- class CurrentPeriodEnd < Stripe::RequestParams
1289
- # Minimum value to filter by (exclusive)
1290
- sig { returns(Integer) }
1291
- attr_accessor :gt
1292
- # Minimum value to filter by (inclusive)
1293
- sig { returns(Integer) }
1294
- attr_accessor :gte
1295
- # Maximum value to filter by (exclusive)
1296
- sig { returns(Integer) }
1297
- attr_accessor :lt
1298
- # Maximum value to filter by (inclusive)
1299
- sig { returns(Integer) }
1300
- attr_accessor :lte
1301
- sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void }
1302
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
1303
- end
1304
- class CurrentPeriodStart < Stripe::RequestParams
1305
- # Minimum value to filter by (exclusive)
1306
- sig { returns(Integer) }
1307
- attr_accessor :gt
1308
- # Minimum value to filter by (inclusive)
1309
- sig { returns(Integer) }
1310
- attr_accessor :gte
1311
- # Maximum value to filter by (exclusive)
1312
- sig { returns(Integer) }
1313
- attr_accessor :lt
1314
- # Maximum value to filter by (inclusive)
1315
- sig { returns(Integer) }
1316
- attr_accessor :lte
1317
- sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void }
1318
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end
1319
- end
1320
- # Filter subscriptions by their automatic tax settings.
1321
- sig { returns(::Stripe::Subscription::ListParams::AutomaticTax) }
1322
- attr_accessor :automatic_tax
1323
- # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.
1324
- sig { returns(String) }
1325
- attr_accessor :collection_method
1326
- # Only return subscriptions that were created during the given date interval.
1327
- sig { returns(T.any(::Stripe::Subscription::ListParams::Created, Integer)) }
1328
- attr_accessor :created
1329
- # Only return subscriptions whose current_period_end falls within the given date interval.
1330
- sig { returns(T.any(::Stripe::Subscription::ListParams::CurrentPeriodEnd, Integer)) }
1331
- attr_accessor :current_period_end
1332
- # Only return subscriptions whose current_period_start falls within the given date interval.
1333
- sig { returns(T.any(::Stripe::Subscription::ListParams::CurrentPeriodStart, Integer)) }
1334
- attr_accessor :current_period_start
1335
- # The ID of the customer whose subscriptions will be retrieved.
1336
- sig { returns(String) }
1337
- attr_accessor :customer
1338
- # 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.
1339
- sig { returns(String) }
1340
- attr_accessor :ending_before
1341
- # Specifies which fields in the response should be expanded.
1342
- sig { returns(T::Array[String]) }
1343
- attr_accessor :expand
1344
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1345
- sig { returns(Integer) }
1346
- attr_accessor :limit
1347
- # The ID of the plan whose subscriptions will be retrieved.
1348
- sig { returns(String) }
1349
- attr_accessor :plan
1350
- # Filter for subscriptions that contain this recurring price ID.
1351
- sig { returns(String) }
1352
- attr_accessor :price
1353
- # 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.
1354
- sig { returns(String) }
1355
- attr_accessor :starting_after
1356
- # 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.
1357
- sig { returns(String) }
1358
- attr_accessor :status
1359
- # 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.
1360
- sig { returns(String) }
1361
- attr_accessor :test_clock
1362
- sig {
1363
- params(automatic_tax: ::Stripe::Subscription::ListParams::AutomaticTax, collection_method: String, created: T.any(::Stripe::Subscription::ListParams::Created, Integer), current_period_end: T.any(::Stripe::Subscription::ListParams::CurrentPeriodEnd, Integer), current_period_start: T.any(::Stripe::Subscription::ListParams::CurrentPeriodStart, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, plan: String, price: String, starting_after: String, status: String, test_clock: String).void
1364
- }
1365
- def initialize(
1366
- automatic_tax: nil,
1367
- collection_method: nil,
1368
- created: nil,
1369
- current_period_end: nil,
1370
- current_period_start: nil,
1371
- customer: nil,
1372
- ending_before: nil,
1373
- expand: nil,
1374
- limit: nil,
1375
- plan: nil,
1376
- price: nil,
1377
- starting_after: nil,
1378
- status: nil,
1379
- test_clock: nil
1380
- ); end
1381
- end
1382
- class CreateParams < Stripe::RequestParams
1383
- class AddInvoiceItem < Stripe::RequestParams
1384
- class Discount < Stripe::RequestParams
1385
- class DiscountEnd < Stripe::RequestParams
1386
- class Duration < Stripe::RequestParams
1387
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1388
- sig { returns(String) }
1389
- attr_accessor :interval
1390
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1391
- sig { returns(Integer) }
1392
- attr_accessor :interval_count
1393
- sig { params(interval: String, interval_count: Integer).void }
1394
- def initialize(interval: nil, interval_count: nil); end
1395
- end
1396
- # Time span for the redeemed discount.
1397
- sig {
1398
- returns(::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount::DiscountEnd::Duration)
1399
- }
1400
- attr_accessor :duration
1401
- # A precise Unix timestamp for the discount to end. Must be in the future.
1402
- sig { returns(Integer) }
1403
- attr_accessor :timestamp
1404
- # The type of calculation made to determine when the discount ends.
1405
- sig { returns(String) }
1406
- attr_accessor :type
1407
- sig {
1408
- params(duration: ::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1409
- }
1410
- def initialize(duration: nil, timestamp: nil, type: nil); end
1411
- end
1412
- # ID of the coupon to create a new discount for.
1413
- sig { returns(String) }
1414
- attr_accessor :coupon
1415
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1416
- sig { returns(String) }
1417
- attr_accessor :discount
1418
- # Details to determine how long the discount should be applied for.
1419
- sig {
1420
- returns(::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount::DiscountEnd)
1421
- }
1422
- attr_accessor :discount_end
1423
- # ID of the promotion code to create a new discount for.
1424
- sig { returns(String) }
1425
- attr_accessor :promotion_code
1426
- sig {
1427
- params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void
1428
- }
1429
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1430
- end
1431
- class PriceData < Stripe::RequestParams
1432
- # 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).
1433
- sig { returns(String) }
1434
- attr_accessor :currency
1435
- # The ID of the product that this price will belong to.
1436
- sig { returns(String) }
1437
- attr_accessor :product
1438
- # 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.
1439
- sig { returns(String) }
1440
- attr_accessor :tax_behavior
1441
- # 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.
1442
- sig { returns(Integer) }
1443
- attr_accessor :unit_amount
1444
- # 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.
1445
- sig { returns(String) }
1446
- attr_accessor :unit_amount_decimal
1447
- sig {
1448
- params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
1449
- }
1450
- def initialize(
1451
- currency: nil,
1452
- product: nil,
1453
- tax_behavior: nil,
1454
- unit_amount: nil,
1455
- unit_amount_decimal: nil
1456
- ); end
1457
- end
1458
- # The coupons to redeem into discounts for the item.
1459
- sig { returns(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount]) }
1460
- attr_accessor :discounts
1461
- # The ID of the price object. One of `price` or `price_data` is required.
1462
- sig { returns(String) }
1463
- attr_accessor :price
1464
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1465
- sig { returns(::Stripe::Subscription::CreateParams::AddInvoiceItem::PriceData) }
1466
- attr_accessor :price_data
1467
- # Quantity for this item. Defaults to 1.
1468
- sig { returns(Integer) }
1469
- attr_accessor :quantity
1470
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
1471
- sig { returns(T.nilable(T::Array[String])) }
1472
- attr_accessor :tax_rates
1473
- sig {
1474
- params(discounts: T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::Subscription::CreateParams::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void
1475
- }
1476
- def initialize(
1477
- discounts: nil,
1478
- price: nil,
1479
- price_data: nil,
1480
- quantity: nil,
1481
- tax_rates: nil
1482
- ); end
1483
- end
1484
- class AutomaticTax < Stripe::RequestParams
1485
- class Liability < Stripe::RequestParams
1486
- # The connected account being referenced when `type` is `account`.
1487
- sig { returns(String) }
1488
- attr_accessor :account
1489
- # Type of the account referenced in the request.
1490
- sig { returns(String) }
1491
- attr_accessor :type
1492
- sig { params(account: String, type: String).void }
1493
- def initialize(account: nil, type: nil); end
1494
- end
1495
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1496
- sig { returns(T::Boolean) }
1497
- attr_accessor :enabled
1498
- # 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.
1499
- sig { returns(::Stripe::Subscription::CreateParams::AutomaticTax::Liability) }
1500
- attr_accessor :liability
1501
- sig {
1502
- params(enabled: T::Boolean, liability: ::Stripe::Subscription::CreateParams::AutomaticTax::Liability).void
1503
- }
1504
- def initialize(enabled: nil, liability: nil); end
1505
- end
1506
- class BillingCycleAnchorConfig < Stripe::RequestParams
1507
- # The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31.
1508
- sig { returns(Integer) }
1509
- attr_accessor :day_of_month
1510
- # The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23.
1511
- sig { returns(Integer) }
1512
- attr_accessor :hour
1513
- # The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59.
1514
- sig { returns(Integer) }
1515
- attr_accessor :minute
1516
- # The month to start full cycle billing periods. Ranges from 1 to 12.
1517
- sig { returns(Integer) }
1518
- attr_accessor :month
1519
- # The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59.
1520
- sig { returns(Integer) }
1521
- attr_accessor :second
1522
- sig {
1523
- params(day_of_month: Integer, hour: Integer, minute: Integer, month: Integer, second: Integer).void
1524
- }
1525
- def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end
1526
- end
1527
- class BillingThresholds < Stripe::RequestParams
1528
- # Monetary threshold that triggers the subscription to advance to a new billing period
1529
- sig { returns(Integer) }
1530
- attr_accessor :amount_gte
1531
- # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
1532
- sig { returns(T::Boolean) }
1533
- attr_accessor :reset_billing_cycle_anchor
1534
- sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void }
1535
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end
1536
- end
1537
- class Discount < Stripe::RequestParams
1538
- class DiscountEnd < Stripe::RequestParams
1539
- class Duration < Stripe::RequestParams
1540
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1541
- sig { returns(String) }
1542
- attr_accessor :interval
1543
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1544
- sig { returns(Integer) }
1545
- attr_accessor :interval_count
1546
- sig { params(interval: String, interval_count: Integer).void }
1547
- def initialize(interval: nil, interval_count: nil); end
1548
- end
1549
- # Time span for the redeemed discount.
1550
- sig { returns(::Stripe::Subscription::CreateParams::Discount::DiscountEnd::Duration) }
1551
- attr_accessor :duration
1552
- # A precise Unix timestamp for the discount to end. Must be in the future.
1553
- sig { returns(Integer) }
1554
- attr_accessor :timestamp
1555
- # The type of calculation made to determine when the discount ends.
1556
- sig { returns(String) }
1557
- attr_accessor :type
1558
- sig {
1559
- params(duration: ::Stripe::Subscription::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1560
- }
1561
- def initialize(duration: nil, timestamp: nil, type: nil); end
1562
- end
1563
- # ID of the coupon to create a new discount for.
1564
- sig { returns(String) }
1565
- attr_accessor :coupon
1566
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1567
- sig { returns(String) }
1568
- attr_accessor :discount
1569
- # Details to determine how long the discount should be applied for.
1570
- sig { returns(::Stripe::Subscription::CreateParams::Discount::DiscountEnd) }
1571
- attr_accessor :discount_end
1572
- # ID of the promotion code to create a new discount for.
1573
- sig { returns(String) }
1574
- attr_accessor :promotion_code
1575
- sig {
1576
- params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::CreateParams::Discount::DiscountEnd, promotion_code: String).void
1577
- }
1578
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1579
- end
1580
- class InvoiceSettings < Stripe::RequestParams
1581
- class Issuer < Stripe::RequestParams
1582
- # The connected account being referenced when `type` is `account`.
1583
- sig { returns(String) }
1584
- attr_accessor :account
1585
- # Type of the account referenced in the request.
1586
- sig { returns(String) }
1587
- attr_accessor :type
1588
- sig { params(account: String, type: String).void }
1589
- def initialize(account: nil, type: nil); end
1590
- end
1591
- # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
1592
- sig { returns(T.nilable(T::Array[String])) }
1593
- attr_accessor :account_tax_ids
1594
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1595
- sig { returns(::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer) }
1596
- attr_accessor :issuer
1597
- sig {
1598
- params(account_tax_ids: T.nilable(T::Array[String]), issuer: ::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer).void
1599
- }
1600
- def initialize(account_tax_ids: nil, issuer: nil); end
1601
- end
1602
- class Item < Stripe::RequestParams
1603
- class BillingThresholds < Stripe::RequestParams
1604
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
1605
- sig { returns(Integer) }
1606
- attr_accessor :usage_gte
1607
- sig { params(usage_gte: Integer).void }
1608
- def initialize(usage_gte: nil); end
1609
- end
1610
- class Discount < Stripe::RequestParams
1611
- class DiscountEnd < Stripe::RequestParams
1612
- class Duration < Stripe::RequestParams
1613
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1614
- sig { returns(String) }
1615
- attr_accessor :interval
1616
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1617
- sig { returns(Integer) }
1618
- attr_accessor :interval_count
1619
- sig { params(interval: String, interval_count: Integer).void }
1620
- def initialize(interval: nil, interval_count: nil); end
1621
- end
1622
- # Time span for the redeemed discount.
1623
- sig {
1624
- returns(::Stripe::Subscription::CreateParams::Item::Discount::DiscountEnd::Duration)
1625
- }
1626
- attr_accessor :duration
1627
- # A precise Unix timestamp for the discount to end. Must be in the future.
1628
- sig { returns(Integer) }
1629
- attr_accessor :timestamp
1630
- # The type of calculation made to determine when the discount ends.
1631
- sig { returns(String) }
1632
- attr_accessor :type
1633
- sig {
1634
- params(duration: ::Stripe::Subscription::CreateParams::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void
1635
- }
1636
- def initialize(duration: nil, timestamp: nil, type: nil); end
1637
- end
1638
- # ID of the coupon to create a new discount for.
1639
- sig { returns(String) }
1640
- attr_accessor :coupon
1641
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1642
- sig { returns(String) }
1643
- attr_accessor :discount
1644
- # Details to determine how long the discount should be applied for.
1645
- sig { returns(::Stripe::Subscription::CreateParams::Item::Discount::DiscountEnd) }
1646
- attr_accessor :discount_end
1647
- # ID of the promotion code to create a new discount for.
1648
- sig { returns(String) }
1649
- attr_accessor :promotion_code
1650
- sig {
1651
- params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::CreateParams::Item::Discount::DiscountEnd, promotion_code: String).void
1652
- }
1653
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end
1654
- end
1655
- class PriceData < Stripe::RequestParams
1656
- class Recurring < Stripe::RequestParams
1657
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1658
- sig { returns(String) }
1659
- attr_accessor :interval
1660
- # 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).
1661
- sig { returns(Integer) }
1662
- attr_accessor :interval_count
1663
- sig { params(interval: String, interval_count: Integer).void }
1664
- def initialize(interval: nil, interval_count: nil); end
1665
- end
1666
- # 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).
1667
- sig { returns(String) }
1668
- attr_accessor :currency
1669
- # The ID of the product that this price will belong to.
1670
- sig { returns(String) }
1671
- attr_accessor :product
1672
- # The recurring components of a price such as `interval` and `interval_count`.
1673
- sig { returns(::Stripe::Subscription::CreateParams::Item::PriceData::Recurring) }
1674
- attr_accessor :recurring
1675
- # 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.
1676
- sig { returns(String) }
1677
- attr_accessor :tax_behavior
1678
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1679
- sig { returns(Integer) }
1680
- attr_accessor :unit_amount
1681
- # 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.
1682
- sig { returns(String) }
1683
- attr_accessor :unit_amount_decimal
1684
- sig {
1685
- params(currency: String, product: String, recurring: ::Stripe::Subscription::CreateParams::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void
1686
- }
1687
- def initialize(
1688
- currency: nil,
1689
- product: nil,
1690
- recurring: nil,
1691
- tax_behavior: nil,
1692
- unit_amount: nil,
1693
- unit_amount_decimal: nil
1694
- ); end
1695
- end
1696
- class Trial < Stripe::RequestParams
1697
- # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
1698
- sig { returns(T::Array[String]) }
1699
- attr_accessor :converts_to
1700
- # Determines the type of trial for this item.
1701
- sig { returns(String) }
1702
- attr_accessor :type
1703
- sig { params(converts_to: T::Array[String], type: String).void }
1704
- def initialize(converts_to: nil, type: nil); end
1705
- end
1706
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
1707
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::Item::BillingThresholds)) }
1708
- attr_accessor :billing_thresholds
1709
- # The coupons to redeem into discounts for the subscription item.
1710
- sig { returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item::Discount])) }
1711
- attr_accessor :discounts
1712
- # 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`.
1713
- sig { returns(T::Hash[String, String]) }
1714
- attr_accessor :metadata
1715
- # Plan ID for this item, as a string.
1716
- sig { returns(String) }
1717
- attr_accessor :plan
1718
- # The ID of the price object.
1719
- sig { returns(String) }
1720
- attr_accessor :price
1721
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1722
- sig { returns(::Stripe::Subscription::CreateParams::Item::PriceData) }
1723
- attr_accessor :price_data
1724
- # Quantity for this item.
1725
- sig { returns(Integer) }
1726
- attr_accessor :quantity
1727
- # 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.
1728
- sig { returns(T.nilable(T::Array[String])) }
1729
- attr_accessor :tax_rates
1730
- # Define options to configure the trial on the subscription item.
1731
- sig { returns(::Stripe::Subscription::CreateParams::Item::Trial) }
1732
- attr_accessor :trial
1733
- sig {
1734
- params(billing_thresholds: T.nilable(::Stripe::Subscription::CreateParams::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::Subscription::CreateParams::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::Subscription::CreateParams::Item::Trial).void
1735
- }
1736
- def initialize(
1737
- billing_thresholds: nil,
1738
- discounts: nil,
1739
- metadata: nil,
1740
- plan: nil,
1741
- price: nil,
1742
- price_data: nil,
1743
- quantity: nil,
1744
- tax_rates: nil,
1745
- trial: nil
1746
- ); end
1747
- end
1748
- class PaymentSettings < Stripe::RequestParams
1749
- class PaymentMethodOptions < Stripe::RequestParams
1750
- class AcssDebit < Stripe::RequestParams
1751
- class MandateOptions < Stripe::RequestParams
1752
- # Transaction type of the mandate.
1753
- sig { returns(String) }
1754
- attr_accessor :transaction_type
1755
- sig { params(transaction_type: String).void }
1756
- def initialize(transaction_type: nil); end
1757
- end
1758
- # Additional fields for Mandate creation
1759
- sig {
1760
- returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions)
1761
- }
1762
- attr_accessor :mandate_options
1763
- # Verification method for the intent
1764
- sig { returns(String) }
1765
- attr_accessor :verification_method
1766
- sig {
1767
- params(mandate_options: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void
1768
- }
1769
- def initialize(mandate_options: nil, verification_method: nil); end
1770
- end
1771
- class Bancontact < Stripe::RequestParams
1772
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
1773
- sig { returns(String) }
1774
- attr_accessor :preferred_language
1775
- sig { params(preferred_language: String).void }
1776
- def initialize(preferred_language: nil); end
1777
- end
1778
- class Card < Stripe::RequestParams
1779
- class MandateOptions < Stripe::RequestParams
1780
- # Amount to be charged for future payments.
1781
- sig { returns(Integer) }
1782
- attr_accessor :amount
1783
- # 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.
1784
- sig { returns(String) }
1785
- attr_accessor :amount_type
1786
- # A description of the mandate or subscription that is meant to be displayed to the customer.
1787
- sig { returns(String) }
1788
- attr_accessor :description
1789
- sig { params(amount: Integer, amount_type: String, description: String).void }
1790
- def initialize(amount: nil, amount_type: nil, description: nil); end
1791
- end
1792
- # Configuration options for setting up an eMandate for cards issued in India.
1793
- sig {
1794
- returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions)
1795
- }
1796
- attr_accessor :mandate_options
1797
- # 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.
1798
- sig { returns(String) }
1799
- attr_accessor :network
1800
- # 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.
1801
- sig { returns(String) }
1802
- attr_accessor :request_three_d_secure
1803
- sig {
1804
- params(mandate_options: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions, network: String, request_three_d_secure: String).void
1805
- }
1806
- def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end
1807
- end
1808
- class CustomerBalance < Stripe::RequestParams
1809
- class BankTransfer < Stripe::RequestParams
1810
- class EuBankTransfer < Stripe::RequestParams
1811
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
1812
- sig { returns(String) }
1813
- attr_accessor :country
1814
- sig { params(country: String).void }
1815
- def initialize(country: nil); end
1816
- end
1817
- # Configuration for eu_bank_transfer funding type.
1818
- sig {
1819
- returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer)
1820
- }
1821
- attr_accessor :eu_bank_transfer
1822
- # 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`.
1823
- sig { returns(String) }
1824
- attr_accessor :type
1825
- sig {
1826
- params(eu_bank_transfer: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void
1827
- }
1828
- def initialize(eu_bank_transfer: nil, type: nil); end
1829
- end
1830
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
1831
- sig {
1832
- returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer)
1833
- }
1834
- attr_accessor :bank_transfer
1835
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
1836
- sig { returns(String) }
1837
- attr_accessor :funding_type
1838
- sig {
1839
- params(bank_transfer: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void
1840
- }
1841
- def initialize(bank_transfer: nil, funding_type: nil); end
1842
- end
1843
- class IdBankTransfer < Stripe::RequestParams
1844
-
1845
- end
1846
- class Konbini < Stripe::RequestParams
1847
-
1848
- end
1849
- class SepaDebit < Stripe::RequestParams
1850
-
1851
- end
1852
- class UsBankAccount < Stripe::RequestParams
1853
- class FinancialConnections < Stripe::RequestParams
1854
- class Filters < Stripe::RequestParams
1855
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1856
- sig { returns(T::Array[String]) }
1857
- attr_accessor :account_subcategories
1858
- # ID of the institution to use to filter for selectable accounts.
1859
- sig { returns(String) }
1860
- attr_accessor :institution
1861
- sig { params(account_subcategories: T::Array[String], institution: String).void }
1862
- def initialize(account_subcategories: nil, institution: nil); end
1863
- end
1864
- # Provide filters for the linked accounts that the customer can select for the payment method.
1865
- sig {
1866
- returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters)
1867
- }
1868
- attr_accessor :filters
1869
- # 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`.
1870
- sig { returns(T::Array[String]) }
1871
- attr_accessor :permissions
1872
- # List of data features that you would like to retrieve upon account creation.
1873
- sig { returns(T::Array[String]) }
1874
- attr_accessor :prefetch
1875
- sig {
1876
- params(filters: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void
1877
- }
1878
- def initialize(filters: nil, permissions: nil, prefetch: nil); end
1879
- end
1880
- # Additional fields for Financial Connections Session creation
1881
- sig {
1882
- returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections)
1883
- }
1884
- attr_accessor :financial_connections
1885
- # Verification method for the intent
1886
- sig { returns(String) }
1887
- attr_accessor :verification_method
1888
- sig {
1889
- params(financial_connections: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void
1890
- }
1891
- def initialize(financial_connections: nil, verification_method: nil); end
1892
- end
1893
- # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
1894
- sig {
1895
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit))
1896
- }
1897
- attr_accessor :acss_debit
1898
- # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
1899
- sig {
1900
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact))
1901
- }
1902
- attr_accessor :bancontact
1903
- # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
1904
- sig {
1905
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card))
1906
- }
1907
- attr_accessor :card
1908
- # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
1909
- sig {
1910
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance))
1911
- }
1912
- attr_accessor :customer_balance
1913
- # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
1914
- sig {
1915
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer))
1916
- }
1917
- attr_accessor :id_bank_transfer
1918
- # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
1919
- sig {
1920
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini))
1921
- }
1922
- attr_accessor :konbini
1923
- # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
1924
- sig {
1925
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit))
1926
- }
1927
- attr_accessor :sepa_debit
1928
- # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
1929
- sig {
1930
- returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount))
1931
- }
1932
- attr_accessor :us_bank_account
1933
- sig {
1934
- params(acss_debit: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance), id_bank_transfer: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer), konbini: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini), sepa_debit: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)).void
1935
- }
1936
- def initialize(
1937
- acss_debit: nil,
1938
- bancontact: nil,
1939
- card: nil,
1940
- customer_balance: nil,
1941
- id_bank_transfer: nil,
1942
- konbini: nil,
1943
- sepa_debit: nil,
1944
- us_bank_account: nil
1945
- ); end
1946
- end
1947
- # Payment-method-specific configuration to provide to invoices created by the subscription.
1948
- sig { returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions) }
1949
- attr_accessor :payment_method_options
1950
- # 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
1951
- sig { returns(T.nilable(T::Array[String])) }
1952
- attr_accessor :payment_method_types
1953
- # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
1954
- sig { returns(String) }
1955
- attr_accessor :save_default_payment_method
1956
- sig {
1957
- params(payment_method_options: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String]), save_default_payment_method: String).void
1958
- }
1959
- def initialize(
1960
- payment_method_options: nil,
1961
- payment_method_types: nil,
1962
- save_default_payment_method: nil
1963
- ); end
1964
- end
1965
- class PendingInvoiceItemInterval < Stripe::RequestParams
1966
- # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
1967
- sig { returns(String) }
1968
- attr_accessor :interval
1969
- # 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).
1970
- sig { returns(Integer) }
1971
- attr_accessor :interval_count
1972
- sig { params(interval: String, interval_count: Integer).void }
1973
- def initialize(interval: nil, interval_count: nil); end
1974
- end
1975
- class Prebilling < Stripe::RequestParams
1976
- # This is used to determine the number of billing cycles to prebill.
1977
- sig { returns(Integer) }
1978
- attr_accessor :iterations
1979
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1980
- sig { returns(String) }
1981
- attr_accessor :update_behavior
1982
- sig { params(iterations: Integer, update_behavior: String).void }
1983
- def initialize(iterations: nil, update_behavior: nil); end
1984
- end
1985
- class TransferData < Stripe::RequestParams
1986
- # 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.
1987
- sig { returns(Float) }
1988
- attr_accessor :amount_percent
1989
- # ID of an existing, connected Stripe account.
1990
- sig { returns(String) }
1991
- attr_accessor :destination
1992
- sig { params(amount_percent: Float, destination: String).void }
1993
- def initialize(amount_percent: nil, destination: nil); end
1994
- end
1995
- class TrialSettings < Stripe::RequestParams
1996
- class EndBehavior < Stripe::RequestParams
1997
- # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
1998
- sig { returns(String) }
1999
- attr_accessor :missing_payment_method
2000
- sig { params(missing_payment_method: String).void }
2001
- def initialize(missing_payment_method: nil); end
2002
- end
2003
- # Defines how the subscription should behave when the user's free trial ends.
2004
- sig { returns(::Stripe::Subscription::CreateParams::TrialSettings::EndBehavior) }
2005
- attr_accessor :end_behavior
2006
- sig {
2007
- params(end_behavior: ::Stripe::Subscription::CreateParams::TrialSettings::EndBehavior).void
2008
- }
2009
- def initialize(end_behavior: nil); end
2010
- end
2011
- # 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.
2012
- sig { returns(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem]) }
2013
- attr_accessor :add_invoice_items
2014
- # 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).
2015
- sig { returns(T.nilable(Float)) }
2016
- attr_accessor :application_fee_percent
2017
- # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
2018
- sig { returns(::Stripe::Subscription::CreateParams::AutomaticTax) }
2019
- attr_accessor :automatic_tax
2020
- # 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.
2021
- sig { returns(Integer) }
2022
- attr_accessor :backdate_start_date
2023
- # 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.
2024
- sig { returns(Integer) }
2025
- attr_accessor :billing_cycle_anchor
2026
- # 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.
2027
- sig { returns(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig) }
2028
- attr_accessor :billing_cycle_anchor_config
2029
- # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
2030
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingThresholds)) }
2031
- attr_accessor :billing_thresholds
2032
- # 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.
2033
- sig { returns(Integer) }
2034
- attr_accessor :cancel_at
2035
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
2036
- sig { returns(T::Boolean) }
2037
- attr_accessor :cancel_at_period_end
2038
- # 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`.
2039
- sig { returns(String) }
2040
- attr_accessor :collection_method
2041
- # The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
2042
- sig { returns(String) }
2043
- attr_accessor :coupon
2044
- # 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).
2045
- sig { returns(String) }
2046
- attr_accessor :currency
2047
- # The identifier of the customer to subscribe.
2048
- sig { returns(String) }
2049
- attr_accessor :customer
2050
- # 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`.
2051
- sig { returns(Integer) }
2052
- attr_accessor :days_until_due
2053
- # 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).
2054
- sig { returns(String) }
2055
- attr_accessor :default_payment_method
2056
- # 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).
2057
- sig { returns(String) }
2058
- attr_accessor :default_source
2059
- # 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.
2060
- sig { returns(T.nilable(T::Array[String])) }
2061
- attr_accessor :default_tax_rates
2062
- # 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.
2063
- sig { returns(String) }
2064
- attr_accessor :description
2065
- # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
2066
- sig { returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::Discount])) }
2067
- attr_accessor :discounts
2068
- # Specifies which fields in the response should be expanded.
2069
- sig { returns(T::Array[String]) }
2070
- attr_accessor :expand
2071
- # All invoices will be billed using the specified settings.
2072
- sig { returns(::Stripe::Subscription::CreateParams::InvoiceSettings) }
2073
- attr_accessor :invoice_settings
2074
- # A list of up to 20 subscription items, each with an attached price.
2075
- sig { returns(T::Array[::Stripe::Subscription::CreateParams::Item]) }
2076
- attr_accessor :items
2077
- # 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`.
2078
- sig { returns(T.nilable(T::Hash[String, String])) }
2079
- attr_accessor :metadata
2080
- # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
2081
- sig { returns(T::Boolean) }
2082
- attr_accessor :off_session
2083
- # The account on behalf of which to charge, for each of the subscription's invoices.
2084
- sig { returns(T.nilable(String)) }
2085
- attr_accessor :on_behalf_of
2086
- # Only applies to subscriptions with `collection_method=charge_automatically`.
2087
- #
2088
- # 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.
2089
- #
2090
- # 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.
2091
- #
2092
- # 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.
2093
- #
2094
- # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
2095
- #
2096
- # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
2097
- sig { returns(String) }
2098
- attr_accessor :payment_behavior
2099
- # Payment settings to pass to invoices created by the subscription.
2100
- sig { returns(::Stripe::Subscription::CreateParams::PaymentSettings) }
2101
- attr_accessor :payment_settings
2102
- # 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.
2103
- sig { returns(T.nilable(::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval)) }
2104
- attr_accessor :pending_invoice_item_interval
2105
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
2106
- sig { returns(::Stripe::Subscription::CreateParams::Prebilling) }
2107
- attr_accessor :prebilling
2108
- # The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
2109
- sig { returns(String) }
2110
- attr_accessor :promotion_code
2111
- # 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`.
2112
- sig { returns(String) }
2113
- attr_accessor :proration_behavior
2114
- # 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.
2115
- sig { returns(::Stripe::Subscription::CreateParams::TransferData) }
2116
- attr_accessor :transfer_data
2117
- # 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.
2118
- sig { returns(T.any(String, Integer)) }
2119
- attr_accessor :trial_end
2120
- # 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.
2121
- sig { returns(T::Boolean) }
2122
- attr_accessor :trial_from_plan
2123
- # 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.
2124
- sig { returns(Integer) }
2125
- attr_accessor :trial_period_days
2126
- # Settings related to subscription trials.
2127
- sig { returns(::Stripe::Subscription::CreateParams::TrialSettings) }
2128
- attr_accessor :trial_settings
2129
- sig {
2130
- params(add_invoice_items: T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem], application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::Subscription::CreateParams::AutomaticTax, backdate_start_date: Integer, billing_cycle_anchor: Integer, billing_cycle_anchor_config: ::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig, billing_thresholds: T.nilable(::Stripe::Subscription::CreateParams::BillingThresholds), cancel_at: Integer, cancel_at_period_end: T::Boolean, collection_method: String, coupon: String, currency: String, customer: String, days_until_due: Integer, default_payment_method: String, default_source: String, default_tax_rates: T.nilable(T::Array[String]), description: String, discounts: T.nilable(T::Array[::Stripe::Subscription::CreateParams::Discount]), expand: T::Array[String], invoice_settings: ::Stripe::Subscription::CreateParams::InvoiceSettings, items: T::Array[::Stripe::Subscription::CreateParams::Item], metadata: T.nilable(T::Hash[String, String]), off_session: T::Boolean, on_behalf_of: T.nilable(String), payment_behavior: String, payment_settings: ::Stripe::Subscription::CreateParams::PaymentSettings, pending_invoice_item_interval: T.nilable(::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval), prebilling: ::Stripe::Subscription::CreateParams::Prebilling, promotion_code: String, proration_behavior: String, transfer_data: ::Stripe::Subscription::CreateParams::TransferData, trial_end: T.any(String, Integer), trial_from_plan: T::Boolean, trial_period_days: Integer, trial_settings: ::Stripe::Subscription::CreateParams::TrialSettings).void
2131
- }
2132
- def initialize(
2133
- add_invoice_items: nil,
2134
- application_fee_percent: nil,
2135
- automatic_tax: nil,
2136
- backdate_start_date: nil,
2137
- billing_cycle_anchor: nil,
2138
- billing_cycle_anchor_config: nil,
2139
- billing_thresholds: nil,
2140
- cancel_at: nil,
2141
- cancel_at_period_end: nil,
2142
- collection_method: nil,
2143
- coupon: nil,
2144
- currency: nil,
2145
- customer: nil,
2146
- days_until_due: nil,
2147
- default_payment_method: nil,
2148
- default_source: nil,
2149
- default_tax_rates: nil,
2150
- description: nil,
2151
- discounts: nil,
2152
- expand: nil,
2153
- invoice_settings: nil,
2154
- items: nil,
2155
- metadata: nil,
2156
- off_session: nil,
2157
- on_behalf_of: nil,
2158
- payment_behavior: nil,
2159
- payment_settings: nil,
2160
- pending_invoice_item_interval: nil,
2161
- prebilling: nil,
2162
- promotion_code: nil,
2163
- proration_behavior: nil,
2164
- transfer_data: nil,
2165
- trial_end: nil,
2166
- trial_from_plan: nil,
2167
- trial_period_days: nil,
2168
- trial_settings: nil
2169
- ); end
2170
- end
2171
- class SearchParams < Stripe::RequestParams
2172
- # Specifies which fields in the response should be expanded.
2173
- sig { returns(T::Array[String]) }
2174
- attr_accessor :expand
2175
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2176
- sig { returns(Integer) }
2177
- attr_accessor :limit
2178
- # 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.
2179
- sig { returns(String) }
2180
- attr_accessor :page
2181
- # 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).
2182
- sig { returns(String) }
2183
- attr_accessor :query
2184
- sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void }
2185
- def initialize(expand: nil, limit: nil, page: nil, query: nil); end
2186
- end
2187
- class ResumeParams < Stripe::RequestParams
2188
- # 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).
2189
- sig { returns(String) }
2190
- attr_accessor :billing_cycle_anchor
2191
- # Specifies which fields in the response should be expanded.
2192
- sig { returns(T::Array[String]) }
2193
- attr_accessor :expand
2194
- # 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`.
2195
- sig { returns(String) }
2196
- attr_accessor :proration_behavior
2197
- # 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.
2198
- sig { returns(Integer) }
2199
- attr_accessor :proration_date
2200
- sig {
2201
- params(billing_cycle_anchor: String, expand: T::Array[String], proration_behavior: String, proration_date: Integer).void
2202
- }
2203
- def initialize(
2204
- billing_cycle_anchor: nil,
2205
- expand: nil,
2206
- proration_behavior: nil,
2207
- proration_date: nil
2208
- ); end
2209
- end
2210
- # 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).
2211
- #
2212
- # 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.
2213
- #
2214
- # 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.
2215
- sig {
2216
- params(params: T.any(::Stripe::Subscription::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2217
- }
2218
- def cancel(params = {}, opts = {}); end
2219
-
2220
- # 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).
2221
- #
2222
- # 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.
2223
- #
2224
- # 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.
2225
- sig {
2226
- params(subscription_exposed_id: String, params: T.any(::Stripe::Subscription::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2227
- }
2228
- def self.cancel(subscription_exposed_id, params = {}, opts = {}); end
2229
-
2230
- # Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.
2231
- #
2232
- # When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request.
2233
- # The payment_behavior parameter determines the exact behavior of the initial payment.
2234
- #
2235
- # 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.
2236
- # Schedules provide the flexibility to model more complex billing configurations that change over time.
2237
- sig {
2238
- params(params: T.any(::Stripe::Subscription::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2239
- }
2240
- def self.create(params = {}, opts = {}); end
2241
-
2242
- # Removes the currently applied discount on a subscription.
2243
- sig {
2244
- params(params: T.any(::Stripe::Subscription::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount)
2245
- }
2246
- def delete_discount(params = {}, opts = {}); end
2247
-
2248
- # Removes the currently applied discount on a subscription.
2249
- sig {
2250
- params(subscription_exposed_id: String, params: T.any(::Stripe::Subscription::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount)
2251
- }
2252
- def self.delete_discount(subscription_exposed_id, params = {}, opts = {}); end
2253
-
2254
- # By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.
2255
- sig {
2256
- params(params: T.any(::Stripe::Subscription::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject)
2257
- }
2258
- def self.list(params = {}, opts = {}); end
2259
-
2260
- # 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.
2261
- sig {
2262
- params(params: T.any(::Stripe::Subscription::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2263
- }
2264
- def resume(params = {}, opts = {}); end
2265
-
2266
- # 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.
2267
- sig {
2268
- params(subscription: String, params: T.any(::Stripe::Subscription::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2269
- }
2270
- def self.resume(subscription, params = {}, opts = {}); end
2271
-
2272
- sig {
2273
- params(params: T.any(::Stripe::Subscription::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject)
2274
- }
2275
- def self.search(params = {}, opts = {}); end
2276
-
2277
- sig {
2278
- params(params: T.any(::Stripe::Subscription::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject)
2279
- }
2280
- def self.search_auto_paging_each(params = {}, opts = {}, &blk); end
2281
-
2282
- # Updates an existing subscription to match the specified parameters.
2283
- # When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
2284
- # To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
2285
- #
2286
- # 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.
2287
- #
2288
- # Switching prices does not normally change the billing date or generate an immediate charge unless:
2289
- #
2290
- #
2291
- # The billing interval is changed (for example, from monthly to yearly).
2292
- # The subscription moves from free to paid.
2293
- # A trial starts or ends.
2294
- #
2295
- #
2296
- # 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).
2297
- #
2298
- # 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).
2299
- #
2300
- # 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.
2301
- #
2302
- # 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.
2303
- sig {
2304
- params(id: String, params: T.any(::Stripe::Subscription::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2305
- }
2306
- def self.update(id, params = {}, opts = {}); end
2307
- end
2308
- end