stripe 13.3.0 → 13.4.0.pre.beta.2

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