stripe 13.3.0 → 13.4.0.pre.beta.1

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