stripe 15.6.0.pre.beta.1 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1097) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_requestor.rb +5 -34
  3. data/lib/stripe/api_resource.rb +3 -0
  4. data/lib/stripe/api_version.rb +2 -1
  5. data/lib/stripe/errors.rb +0 -60
  6. data/lib/stripe/event_types.rb +20 -108
  7. data/lib/stripe/events/unknown_event_notification.rb +19 -0
  8. data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +115 -15
  9. data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +93 -6
  10. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +35 -12
  11. data/lib/stripe/object_types.rb +2 -54
  12. data/lib/stripe/params/account_capability_list_params.rb +13 -0
  13. data/lib/stripe/params/account_capability_retrieve_params.rb +13 -0
  14. data/lib/stripe/params/account_capability_update_params.rb +18 -0
  15. data/lib/stripe/params/account_create_params.rb +2083 -0
  16. data/lib/stripe/params/account_delete_params.rb +6 -0
  17. data/lib/stripe/params/account_external_account_create_params.rb +134 -0
  18. data/lib/stripe/params/account_external_account_delete_params.rb +6 -0
  19. data/lib/stripe/params/account_external_account_list_params.rb +25 -0
  20. data/lib/stripe/params/account_external_account_retrieve_params.rb +13 -0
  21. data/lib/stripe/params/account_external_account_update_params.rb +91 -0
  22. data/lib/stripe/params/account_link_create_params.rb +52 -0
  23. data/lib/stripe/params/account_list_params.rb +42 -0
  24. data/lib/stripe/params/account_login_link_create_params.rb +13 -0
  25. data/lib/stripe/params/account_person_create_params.rb +435 -0
  26. data/lib/stripe/params/account_person_delete_params.rb +6 -0
  27. data/lib/stripe/params/account_person_list_params.rb +61 -0
  28. data/lib/stripe/params/account_person_retrieve_params.rb +13 -0
  29. data/lib/stripe/params/account_person_update_params.rb +435 -0
  30. data/lib/stripe/params/account_persons_params.rb +61 -0
  31. data/lib/stripe/params/account_reject_params.rb +16 -0
  32. data/lib/stripe/params/account_retrieve_current_params.rb +13 -0
  33. data/lib/stripe/params/account_retrieve_params.rb +13 -0
  34. data/lib/stripe/params/account_session_create_params.rb +598 -0
  35. data/lib/stripe/params/account_update_params.rb +2030 -0
  36. data/lib/stripe/params/apple_pay_domain_create_params.rb +16 -0
  37. data/lib/stripe/params/apple_pay_domain_delete_params.rb +6 -0
  38. data/lib/stripe/params/apple_pay_domain_list_params.rb +31 -0
  39. data/lib/stripe/params/apple_pay_domain_retrieve_params.rb +13 -0
  40. data/lib/stripe/params/application_fee_list_params.rb +52 -0
  41. data/lib/stripe/params/application_fee_refund_create_params.rb +19 -0
  42. data/lib/stripe/params/application_fee_refund_list_params.rb +22 -0
  43. data/lib/stripe/params/application_fee_refund_retrieve_params.rb +13 -0
  44. data/lib/stripe/params/application_fee_refund_update_params.rb +16 -0
  45. data/lib/stripe/params/application_fee_retrieve_params.rb +13 -0
  46. data/lib/stripe/params/apps/secret_create_params.rb +38 -0
  47. data/lib/stripe/params/apps/secret_delete_where_params.rb +32 -0
  48. data/lib/stripe/params/apps/secret_find_params.rb +32 -0
  49. data/lib/stripe/{services/quote_line_service.rb → params/apps/secret_list_params.rb} +17 -14
  50. data/lib/stripe/params/balance_retrieve_params.rb +13 -0
  51. data/lib/stripe/params/balance_settings_retrieve_params.rb +13 -0
  52. data/lib/stripe/params/balance_settings_update_params.rb +67 -0
  53. data/lib/stripe/params/balance_transaction_list_params.rb +64 -0
  54. data/lib/stripe/params/balance_transaction_retrieve_params.rb +13 -0
  55. data/lib/stripe/params/billing/alert_activate_params.rb +15 -0
  56. data/lib/stripe/params/billing/alert_archive_params.rb +15 -0
  57. data/lib/stripe/params/billing/alert_create_params.rb +52 -0
  58. data/lib/stripe/params/billing/alert_deactivate_params.rb +15 -0
  59. data/lib/stripe/params/billing/alert_list_params.rb +37 -0
  60. data/lib/stripe/params/billing/alert_retrieve_params.rb +15 -0
  61. data/lib/stripe/params/billing/credit_balance_summary_retrieve_params.rb +54 -0
  62. data/lib/stripe/params/billing/credit_balance_transaction_list_params.rb +37 -0
  63. data/lib/stripe/params/billing/credit_balance_transaction_retrieve_params.rb +15 -0
  64. data/lib/stripe/params/billing/credit_grant_create_params.rb +103 -0
  65. data/lib/stripe/params/billing/credit_grant_expire_params.rb +15 -0
  66. data/lib/stripe/params/billing/credit_grant_list_params.rb +33 -0
  67. data/lib/stripe/params/billing/credit_grant_retrieve_params.rb +15 -0
  68. data/lib/stripe/params/billing/credit_grant_update_params.rb +21 -0
  69. data/lib/stripe/params/billing/credit_grant_void_grant_params.rb +15 -0
  70. data/lib/stripe/params/billing/meter_create_params.rb +70 -0
  71. data/lib/stripe/params/billing/meter_deactivate_params.rb +15 -0
  72. data/lib/stripe/params/billing/meter_event_adjustment_create_params.rb +32 -0
  73. data/lib/stripe/params/billing/meter_event_create_params.rb +27 -0
  74. data/lib/stripe/params/billing/meter_event_summary_list_params.rb +45 -0
  75. data/lib/stripe/params/billing/meter_list_params.rb +27 -0
  76. data/lib/stripe/params/billing/meter_reactivate_params.rb +15 -0
  77. data/lib/stripe/params/billing/meter_retrieve_params.rb +15 -0
  78. data/lib/stripe/params/billing/meter_update_params.rb +18 -0
  79. data/lib/stripe/params/billing_portal/configuration_create_params.rb +225 -0
  80. data/lib/stripe/params/billing_portal/configuration_list_params.rb +37 -0
  81. data/lib/stripe/params/billing_portal/configuration_retrieve_params.rb +15 -0
  82. data/lib/stripe/params/billing_portal/configuration_update_params.rb +231 -0
  83. data/lib/stripe/params/billing_portal/session_create_params.rb +179 -0
  84. data/lib/stripe/params/charge_capture_params.rb +57 -0
  85. data/lib/stripe/params/charge_create_params.rb +172 -0
  86. data/lib/stripe/params/charge_list_params.rb +60 -0
  87. data/lib/stripe/params/charge_retrieve_params.rb +13 -0
  88. data/lib/stripe/params/charge_search_params.rb +22 -0
  89. data/lib/stripe/params/charge_update_params.rb +102 -0
  90. data/lib/stripe/params/checkout/session_create_params.rb +2445 -0
  91. data/lib/stripe/params/checkout/session_expire_params.rb +15 -0
  92. data/lib/stripe/{services/quote_preview_subscription_schedule_service.rb → params/checkout/session_line_item_list_params.rb} +2 -13
  93. data/lib/stripe/{services/order_line_item_service.rb → params/checkout/session_list_line_items_params.rb} +2 -13
  94. data/lib/stripe/params/checkout/session_list_params.rb +83 -0
  95. data/lib/stripe/params/checkout/session_retrieve_params.rb +15 -0
  96. data/lib/stripe/params/checkout/session_update_params.rb +179 -0
  97. data/lib/stripe/params/climate/order_cancel_params.rb +15 -0
  98. data/lib/stripe/params/climate/order_create_params.rb +49 -0
  99. data/lib/stripe/params/climate/order_list_params.rb +24 -0
  100. data/lib/stripe/params/climate/order_retrieve_params.rb +15 -0
  101. data/lib/stripe/params/climate/order_update_params.rb +29 -0
  102. data/lib/stripe/params/climate/product_list_params.rb +24 -0
  103. data/lib/stripe/params/climate/product_retrieve_params.rb +15 -0
  104. data/lib/stripe/params/climate/supplier_list_params.rb +24 -0
  105. data/lib/stripe/params/climate/supplier_retrieve_params.rb +15 -0
  106. data/lib/stripe/params/confirmation_token_create_params.rb +650 -0
  107. data/lib/stripe/params/confirmation_token_retrieve_params.rb +13 -0
  108. data/lib/stripe/params/country_spec_list_params.rb +22 -0
  109. data/lib/stripe/params/country_spec_retrieve_params.rb +13 -0
  110. data/lib/stripe/params/coupon_create_params.rb +80 -0
  111. data/lib/stripe/params/coupon_delete_params.rb +6 -0
  112. data/lib/stripe/params/coupon_list_params.rb +42 -0
  113. data/lib/stripe/params/coupon_retrieve_params.rb +13 -0
  114. data/lib/stripe/params/coupon_update_params.rb +30 -0
  115. data/lib/stripe/params/credit_note_create_params.rb +144 -0
  116. data/lib/stripe/params/credit_note_line_item_list_params.rb +22 -0
  117. data/lib/stripe/params/credit_note_list_params.rb +56 -0
  118. data/lib/stripe/params/credit_note_list_preview_line_items_params.rb +156 -0
  119. data/lib/stripe/params/credit_note_preview_lines_list_params.rb +156 -0
  120. data/lib/stripe/params/credit_note_preview_params.rb +144 -0
  121. data/lib/stripe/params/credit_note_retrieve_params.rb +13 -0
  122. data/lib/stripe/params/credit_note_update_params.rb +19 -0
  123. data/lib/stripe/params/credit_note_void_credit_note_params.rb +13 -0
  124. data/lib/stripe/params/customer_balance_transaction_create_params.rb +25 -0
  125. data/lib/stripe/params/customer_balance_transaction_list_params.rb +22 -0
  126. data/lib/stripe/params/customer_balance_transaction_retrieve_params.rb +13 -0
  127. data/lib/stripe/params/customer_balance_transaction_update_params.rb +19 -0
  128. data/lib/stripe/params/customer_cash_balance_retrieve_params.rb +13 -0
  129. data/lib/stripe/params/customer_cash_balance_transaction_list_params.rb +22 -0
  130. data/lib/stripe/params/customer_cash_balance_transaction_retrieve_params.rb +13 -0
  131. data/lib/stripe/params/customer_cash_balance_update_params.rb +24 -0
  132. data/lib/stripe/params/customer_create_funding_instructions_params.rb +46 -0
  133. data/lib/stripe/params/customer_create_params.rb +259 -0
  134. data/lib/stripe/params/customer_delete_discount_params.rb +6 -0
  135. data/lib/stripe/params/customer_delete_params.rb +6 -0
  136. data/lib/stripe/params/customer_fund_cash_balance_params.rb +22 -0
  137. data/lib/stripe/params/customer_funding_instructions_create_params.rb +46 -0
  138. data/lib/stripe/params/customer_list_params.rb +56 -0
  139. data/lib/stripe/params/customer_list_payment_methods_params.rb +35 -0
  140. data/lib/stripe/params/customer_payment_method_list_params.rb +35 -0
  141. data/lib/stripe/params/customer_payment_method_retrieve_params.rb +13 -0
  142. data/lib/stripe/params/customer_payment_source_create_params.rb +22 -0
  143. data/lib/stripe/params/customer_payment_source_delete_params.rb +13 -0
  144. data/lib/stripe/params/customer_payment_source_list_params.rb +25 -0
  145. data/lib/stripe/params/customer_payment_source_retrieve_params.rb +13 -0
  146. data/lib/stripe/params/customer_payment_source_update_params.rb +114 -0
  147. data/lib/stripe/params/customer_payment_source_verify_params.rb +16 -0
  148. data/lib/stripe/params/customer_retrieve_params.rb +13 -0
  149. data/lib/stripe/params/customer_retrieve_payment_method_params.rb +13 -0
  150. data/lib/stripe/params/customer_search_params.rb +22 -0
  151. data/lib/stripe/params/customer_session_create_params.rb +100 -0
  152. data/lib/stripe/params/customer_tax_id_create_params.rb +19 -0
  153. data/lib/stripe/params/customer_tax_id_delete_params.rb +6 -0
  154. data/lib/stripe/params/customer_tax_id_list_params.rb +22 -0
  155. data/lib/stripe/params/customer_tax_id_retrieve_params.rb +13 -0
  156. data/lib/stripe/params/customer_update_params.rb +243 -0
  157. data/lib/stripe/params/dispute_close_params.rb +13 -0
  158. data/lib/stripe/params/dispute_list_params.rb +56 -0
  159. data/lib/stripe/params/dispute_retrieve_params.rb +13 -0
  160. data/lib/stripe/params/dispute_update_params.rb +308 -0
  161. data/lib/stripe/params/entitlements/active_entitlement_list_params.rb +33 -0
  162. data/lib/stripe/params/entitlements/active_entitlement_retrieve_params.rb +15 -0
  163. data/lib/stripe/params/entitlements/feature_create_params.rb +24 -0
  164. data/lib/stripe/params/entitlements/feature_list_params.rb +37 -0
  165. data/lib/stripe/params/entitlements/feature_retrieve_params.rb +15 -0
  166. data/lib/stripe/params/entitlements/feature_update_params.rb +24 -0
  167. data/lib/stripe/params/ephemeral_key_create_params.rb +31 -0
  168. data/lib/stripe/params/ephemeral_key_delete_params.rb +13 -0
  169. data/lib/stripe/params/event_list_params.rb +60 -0
  170. data/lib/stripe/params/event_retrieve_params.rb +13 -0
  171. data/lib/stripe/params/exchange_rate_list_params.rb +22 -0
  172. data/lib/stripe/params/exchange_rate_retrieve_params.rb +13 -0
  173. data/lib/stripe/params/file_create_params.rb +36 -0
  174. data/lib/stripe/params/file_link_create_params.rb +22 -0
  175. data/lib/stripe/params/file_link_list_params.rb +56 -0
  176. data/lib/stripe/params/file_link_retrieve_params.rb +13 -0
  177. data/lib/stripe/params/file_link_update_params.rb +19 -0
  178. data/lib/stripe/params/file_list_params.rb +52 -0
  179. data/lib/stripe/params/file_retrieve_params.rb +13 -0
  180. data/lib/stripe/params/financial_connections/account_disconnect_params.rb +15 -0
  181. data/lib/stripe/params/financial_connections/account_list_owners_params.rb +33 -0
  182. data/lib/stripe/params/financial_connections/account_list_params.rb +48 -0
  183. data/lib/stripe/params/financial_connections/account_owner_list_params.rb +33 -0
  184. data/lib/stripe/params/financial_connections/account_refresh_account_params.rb +18 -0
  185. data/lib/stripe/params/financial_connections/account_refresh_params.rb +18 -0
  186. data/lib/stripe/params/financial_connections/account_retrieve_params.rb +15 -0
  187. data/lib/stripe/params/financial_connections/account_subscribe_params.rb +18 -0
  188. data/lib/stripe/params/financial_connections/account_unsubscribe_params.rb +18 -0
  189. data/lib/stripe/params/financial_connections/session_create_params.rb +65 -0
  190. data/lib/stripe/params/financial_connections/session_retrieve_params.rb +15 -0
  191. data/lib/stripe/params/financial_connections/transaction_list_params.rb +67 -0
  192. data/lib/stripe/params/financial_connections/transaction_retrieve_params.rb +15 -0
  193. data/lib/stripe/params/forwarding/request_create_params.rb +59 -0
  194. data/lib/stripe/params/forwarding/request_list_params.rb +44 -0
  195. data/lib/stripe/params/forwarding/request_retrieve_params.rb +15 -0
  196. data/lib/stripe/params/identity/verification_report_list_params.rb +62 -0
  197. data/lib/stripe/params/identity/verification_report_retrieve_params.rb +15 -0
  198. data/lib/stripe/params/identity/verification_session_cancel_params.rb +15 -0
  199. data/lib/stripe/params/identity/verification_session_create_params.rb +107 -0
  200. data/lib/stripe/params/identity/verification_session_list_params.rb +62 -0
  201. data/lib/stripe/params/identity/verification_session_redact_params.rb +15 -0
  202. data/lib/stripe/params/identity/verification_session_retrieve_params.rb +15 -0
  203. data/lib/stripe/params/identity/verification_session_update_params.rb +69 -0
  204. data/lib/stripe/params/invoice_add_lines_params.rb +231 -0
  205. data/lib/stripe/params/invoice_attach_payment_params.rb +16 -0
  206. data/lib/stripe/params/invoice_create_params.rb +589 -0
  207. data/lib/stripe/params/invoice_create_preview_params.rb +993 -0
  208. data/lib/stripe/params/invoice_delete_params.rb +6 -0
  209. data/lib/stripe/params/invoice_finalize_invoice_params.rb +16 -0
  210. data/lib/stripe/params/invoice_item_create_params.rb +145 -0
  211. data/lib/stripe/params/invoice_item_delete_params.rb +6 -0
  212. data/lib/stripe/params/invoice_item_list_params.rb +60 -0
  213. data/lib/stripe/params/invoice_item_retrieve_params.rb +13 -0
  214. data/lib/stripe/params/invoice_item_update_params.rb +129 -0
  215. data/lib/stripe/params/invoice_line_item_list_params.rb +22 -0
  216. data/lib/stripe/params/invoice_line_item_update_params.rb +217 -0
  217. data/lib/stripe/params/invoice_list_params.rb +86 -0
  218. data/lib/stripe/params/invoice_mark_uncollectible_params.rb +13 -0
  219. data/lib/stripe/params/invoice_pay_params.rb +41 -0
  220. data/lib/stripe/params/invoice_payment_list_params.rb +50 -0
  221. data/lib/stripe/params/invoice_payment_retrieve_params.rb +13 -0
  222. data/lib/stripe/params/invoice_remove_lines_params.rb +30 -0
  223. data/lib/stripe/params/invoice_rendering_template_archive_params.rb +13 -0
  224. data/lib/stripe/params/invoice_rendering_template_list_params.rb +25 -0
  225. data/lib/stripe/params/invoice_rendering_template_retrieve_params.rb +16 -0
  226. data/lib/stripe/params/invoice_rendering_template_unarchive_params.rb +13 -0
  227. data/lib/stripe/params/invoice_retrieve_params.rb +13 -0
  228. data/lib/stripe/params/invoice_search_params.rb +22 -0
  229. data/lib/stripe/params/invoice_send_invoice_params.rb +13 -0
  230. data/lib/stripe/params/invoice_update_lines_params.rb +231 -0
  231. data/lib/stripe/params/invoice_update_params.rb +557 -0
  232. data/lib/stripe/params/invoice_void_invoice_params.rb +13 -0
  233. data/lib/stripe/params/issuing/authorization_approve_params.rb +21 -0
  234. data/lib/stripe/params/issuing/authorization_capture_params.rb +265 -0
  235. data/lib/stripe/params/issuing/authorization_create_params.rb +357 -0
  236. data/lib/stripe/params/issuing/authorization_decline_params.rb +18 -0
  237. data/lib/stripe/params/issuing/authorization_expire_params.rb +15 -0
  238. data/lib/stripe/params/issuing/authorization_finalize_amount_params.rb +143 -0
  239. data/lib/stripe/params/issuing/authorization_increment_params.rb +21 -0
  240. data/lib/stripe/params/issuing/authorization_list_params.rb +62 -0
  241. data/lib/stripe/params/issuing/authorization_respond_params.rb +18 -0
  242. data/lib/stripe/params/issuing/authorization_retrieve_params.rb +15 -0
  243. data/lib/stripe/params/issuing/authorization_reverse_params.rb +18 -0
  244. data/lib/stripe/params/issuing/authorization_update_params.rb +18 -0
  245. data/lib/stripe/params/issuing/card_create_params.rb +213 -0
  246. data/lib/stripe/params/issuing/card_deliver_card_params.rb +15 -0
  247. data/lib/stripe/params/issuing/card_fail_card_params.rb +15 -0
  248. data/lib/stripe/params/issuing/card_list_params.rb +78 -0
  249. data/lib/stripe/params/issuing/card_retrieve_params.rb +15 -0
  250. data/lib/stripe/params/issuing/card_return_card_params.rb +15 -0
  251. data/lib/stripe/params/issuing/card_ship_card_params.rb +15 -0
  252. data/lib/stripe/params/issuing/card_submit_card_params.rb +15 -0
  253. data/lib/stripe/params/issuing/card_update_params.rb +181 -0
  254. data/lib/stripe/params/issuing/cardholder_create_params.rb +238 -0
  255. data/lib/stripe/params/issuing/cardholder_list_params.rb +66 -0
  256. data/lib/stripe/params/issuing/cardholder_retrieve_params.rb +15 -0
  257. data/lib/stripe/params/issuing/cardholder_update_params.rb +230 -0
  258. data/lib/stripe/params/issuing/dispute_create_params.rb +297 -0
  259. data/lib/stripe/params/issuing/dispute_list_params.rb +58 -0
  260. data/lib/stripe/params/issuing/dispute_retrieve_params.rb +15 -0
  261. data/lib/stripe/params/issuing/dispute_submit_params.rb +18 -0
  262. data/lib/stripe/params/issuing/dispute_update_params.rb +275 -0
  263. data/lib/stripe/params/issuing/personalization_design_activate_params.rb +15 -0
  264. data/lib/stripe/params/issuing/personalization_design_create_params.rb +75 -0
  265. data/lib/stripe/params/issuing/personalization_design_deactivate_params.rb +15 -0
  266. data/lib/stripe/params/issuing/personalization_design_list_params.rb +52 -0
  267. data/lib/stripe/params/issuing/personalization_design_reject_params.rb +29 -0
  268. data/lib/stripe/params/issuing/personalization_design_retrieve_params.rb +15 -0
  269. data/lib/stripe/params/issuing/personalization_design_update_params.rb +75 -0
  270. data/lib/stripe/params/issuing/physical_bundle_list_params.rb +37 -0
  271. data/lib/stripe/params/issuing/physical_bundle_retrieve_params.rb +15 -0
  272. data/lib/stripe/params/issuing/token_list_params.rb +58 -0
  273. data/lib/stripe/params/issuing/token_retrieve_params.rb +15 -0
  274. data/lib/stripe/params/issuing/token_update_params.rb +18 -0
  275. data/lib/stripe/params/issuing/transaction_create_force_capture_params.rb +316 -0
  276. data/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb +316 -0
  277. data/lib/stripe/params/issuing/transaction_list_params.rb +62 -0
  278. data/lib/stripe/params/issuing/transaction_refund_params.rb +18 -0
  279. data/lib/stripe/params/issuing/transaction_retrieve_params.rb +15 -0
  280. data/lib/stripe/params/issuing/transaction_update_params.rb +18 -0
  281. data/lib/stripe/params/mandate_retrieve_params.rb +13 -0
  282. data/lib/stripe/params/payment_intent_apply_customer_balance_params.rb +23 -0
  283. data/lib/stripe/params/payment_intent_cancel_params.rb +16 -0
  284. data/lib/stripe/params/payment_intent_capture_params.rb +54 -0
  285. data/lib/stripe/params/payment_intent_confirm_params.rb +2379 -0
  286. data/lib/stripe/params/payment_intent_create_params.rb +2480 -0
  287. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +48 -0
  288. data/lib/stripe/params/payment_intent_list_params.rb +52 -0
  289. data/lib/stripe/params/payment_intent_retrieve_params.rb +16 -0
  290. data/lib/stripe/params/payment_intent_search_params.rb +22 -0
  291. data/lib/stripe/params/payment_intent_update_params.rb +2353 -0
  292. data/lib/stripe/params/payment_intent_verify_microdeposits_params.rb +19 -0
  293. data/lib/stripe/params/payment_link_create_params.rb +776 -0
  294. data/lib/stripe/params/payment_link_line_item_list_params.rb +22 -0
  295. data/lib/stripe/params/payment_link_list_line_items_params.rb +22 -0
  296. data/lib/stripe/params/payment_link_list_params.rb +25 -0
  297. data/lib/stripe/params/payment_link_retrieve_params.rb +13 -0
  298. data/lib/stripe/params/payment_link_update_params.rb +564 -0
  299. data/lib/stripe/params/payment_method_attach_params.rb +16 -0
  300. data/lib/stripe/params/payment_method_configuration_create_params.rb +1135 -0
  301. data/lib/stripe/params/payment_method_configuration_list_params.rb +31 -0
  302. data/lib/stripe/params/payment_method_configuration_retrieve_params.rb +13 -0
  303. data/lib/stripe/params/payment_method_configuration_update_params.rb +1135 -0
  304. data/lib/stripe/params/payment_method_create_params.rb +583 -0
  305. data/lib/stripe/params/payment_method_detach_params.rb +13 -0
  306. data/lib/stripe/params/payment_method_domain_create_params.rb +19 -0
  307. data/lib/stripe/params/payment_method_domain_list_params.rb +35 -0
  308. data/lib/stripe/params/payment_method_domain_retrieve_params.rb +13 -0
  309. data/lib/stripe/params/payment_method_domain_update_params.rb +16 -0
  310. data/lib/stripe/params/payment_method_domain_validate_params.rb +13 -0
  311. data/lib/stripe/params/payment_method_list_params.rb +35 -0
  312. data/lib/stripe/params/payment_method_retrieve_params.rb +13 -0
  313. data/lib/stripe/params/payment_method_update_params.rb +120 -0
  314. data/lib/stripe/params/payout_cancel_params.rb +13 -0
  315. data/lib/stripe/params/payout_create_params.rb +51 -0
  316. data/lib/stripe/params/payout_list_params.rb +78 -0
  317. data/lib/stripe/params/payout_retrieve_params.rb +13 -0
  318. data/lib/stripe/params/payout_reverse_params.rb +16 -0
  319. data/lib/stripe/params/payout_update_params.rb +16 -0
  320. data/lib/stripe/params/plan_create_params.rb +158 -0
  321. data/lib/stripe/params/plan_delete_params.rb +6 -0
  322. data/lib/stripe/params/plan_list_params.rb +56 -0
  323. data/lib/stripe/params/plan_retrieve_params.rb +13 -0
  324. data/lib/stripe/params/plan_update_params.rb +35 -0
  325. data/lib/stripe/params/price_create_params.rb +278 -0
  326. data/lib/stripe/params/price_list_params.rb +87 -0
  327. data/lib/stripe/params/price_retrieve_params.rb +13 -0
  328. data/lib/stripe/params/price_search_params.rb +22 -0
  329. data/lib/stripe/params/price_update_params.rb +113 -0
  330. data/lib/stripe/params/product_create_params.rb +243 -0
  331. data/lib/stripe/params/product_delete_params.rb +6 -0
  332. data/lib/stripe/params/product_feature_create_params.rb +16 -0
  333. data/lib/stripe/params/product_feature_delete_params.rb +6 -0
  334. data/lib/stripe/params/product_feature_list_params.rb +22 -0
  335. data/lib/stripe/params/product_feature_retrieve_params.rb +13 -0
  336. data/lib/stripe/params/product_list_params.rb +68 -0
  337. data/lib/stripe/params/product_retrieve_params.rb +13 -0
  338. data/lib/stripe/params/product_search_params.rb +22 -0
  339. data/lib/stripe/params/product_update_params.rb +96 -0
  340. data/lib/stripe/params/promotion_code_create_params.rb +91 -0
  341. data/lib/stripe/params/promotion_code_list_params.rb +64 -0
  342. data/lib/stripe/params/promotion_code_retrieve_params.rb +13 -0
  343. data/lib/stripe/params/promotion_code_update_params.rb +38 -0
  344. data/lib/stripe/params/quote_accept_params.rb +13 -0
  345. data/lib/stripe/params/quote_cancel_params.rb +13 -0
  346. data/lib/stripe/params/quote_computed_upfront_line_items_list_params.rb +22 -0
  347. data/lib/stripe/params/quote_create_params.rb +301 -0
  348. data/lib/stripe/params/quote_finalize_quote_params.rb +16 -0
  349. data/lib/stripe/params/quote_line_item_list_params.rb +22 -0
  350. data/lib/stripe/params/quote_list_computed_upfront_line_items_params.rb +22 -0
  351. data/lib/stripe/params/quote_list_line_items_params.rb +22 -0
  352. data/lib/stripe/params/quote_list_params.rb +39 -0
  353. data/lib/stripe/params/quote_pdf_params.rb +13 -0
  354. data/lib/stripe/params/quote_retrieve_params.rb +13 -0
  355. data/lib/stripe/params/quote_update_params.rb +263 -0
  356. data/lib/stripe/params/radar/early_fraud_warning_list_params.rb +58 -0
  357. data/lib/stripe/params/radar/early_fraud_warning_retrieve_params.rb +15 -0
  358. data/lib/stripe/params/radar/value_list_create_params.rb +27 -0
  359. data/lib/stripe/params/radar/value_list_delete_params.rb +8 -0
  360. data/lib/stripe/params/radar/value_list_item_create_params.rb +21 -0
  361. data/lib/stripe/params/radar/value_list_item_delete_params.rb +8 -0
  362. data/lib/stripe/params/radar/value_list_item_list_params.rb +58 -0
  363. data/lib/stripe/params/radar/value_list_item_retrieve_params.rb +15 -0
  364. data/lib/stripe/params/radar/value_list_list_params.rb +58 -0
  365. data/lib/stripe/params/radar/value_list_retrieve_params.rb +15 -0
  366. data/lib/stripe/params/radar/value_list_update_params.rb +24 -0
  367. data/lib/stripe/params/refund_cancel_params.rb +13 -0
  368. data/lib/stripe/params/refund_create_params.rb +59 -0
  369. data/lib/stripe/params/refund_expire_params.rb +13 -0
  370. data/lib/stripe/params/refund_list_params.rb +56 -0
  371. data/lib/stripe/params/refund_retrieve_params.rb +13 -0
  372. data/lib/stripe/params/refund_update_params.rb +16 -0
  373. data/lib/stripe/params/reporting/report_run_create_params.rb +59 -0
  374. data/lib/stripe/params/reporting/report_run_list_params.rb +44 -0
  375. data/lib/stripe/params/reporting/report_run_retrieve_params.rb +15 -0
  376. data/lib/stripe/params/reporting/report_type_list_params.rb +15 -0
  377. data/lib/stripe/params/reporting/report_type_retrieve_params.rb +15 -0
  378. data/lib/stripe/params/review_approve_params.rb +13 -0
  379. data/lib/stripe/params/review_list_params.rb +42 -0
  380. data/lib/stripe/params/review_retrieve_params.rb +13 -0
  381. data/lib/stripe/params/setup_attempt_list_params.rb +55 -0
  382. data/lib/stripe/params/setup_intent_cancel_params.rb +16 -0
  383. data/lib/stripe/params/setup_intent_confirm_params.rb +1050 -0
  384. data/lib/stripe/params/setup_intent_create_params.rb +1130 -0
  385. data/lib/stripe/params/setup_intent_list_params.rb +62 -0
  386. data/lib/stripe/params/setup_intent_retrieve_params.rb +16 -0
  387. data/lib/stripe/params/setup_intent_update_params.rb +1025 -0
  388. data/lib/stripe/params/setup_intent_verify_microdeposits_params.rb +19 -0
  389. data/lib/stripe/params/shipping_rate_create_params.rb +103 -0
  390. data/lib/stripe/params/shipping_rate_list_params.rb +56 -0
  391. data/lib/stripe/params/shipping_rate_retrieve_params.rb +13 -0
  392. data/lib/stripe/params/shipping_rate_update_params.rb +44 -0
  393. data/lib/stripe/params/sigma/scheduled_query_run_list_params.rb +24 -0
  394. data/lib/stripe/params/sigma/scheduled_query_run_retrieve_params.rb +15 -0
  395. data/lib/stripe/params/source_create_params.rb +317 -0
  396. data/lib/stripe/params/source_detach_params.rb +13 -0
  397. data/lib/stripe/params/source_retrieve_params.rb +16 -0
  398. data/lib/stripe/params/source_transaction_list_params.rb +22 -0
  399. data/lib/stripe/params/source_update_params.rb +259 -0
  400. data/lib/stripe/params/source_verify_params.rb +16 -0
  401. data/lib/stripe/params/subscription_cancel_params.rb +33 -0
  402. data/lib/stripe/params/subscription_create_params.rb +704 -0
  403. data/lib/stripe/params/subscription_delete_discount_params.rb +6 -0
  404. data/lib/stripe/params/subscription_item_create_params.rb +134 -0
  405. data/lib/stripe/params/subscription_item_delete_params.rb +19 -0
  406. data/lib/stripe/params/subscription_item_list_params.rb +31 -0
  407. data/lib/stripe/params/subscription_item_retrieve_params.rb +13 -0
  408. data/lib/stripe/params/subscription_item_update_params.rb +134 -0
  409. data/lib/stripe/params/subscription_list_params.rb +129 -0
  410. data/lib/stripe/params/subscription_migrate_params.rb +35 -0
  411. data/lib/stripe/params/subscription_resume_params.rb +27 -0
  412. data/lib/stripe/params/subscription_retrieve_params.rb +13 -0
  413. data/lib/stripe/params/subscription_schedule_cancel_params.rb +19 -0
  414. data/lib/stripe/params/subscription_schedule_create_params.rb +590 -0
  415. data/lib/stripe/params/subscription_schedule_list_params.rb +122 -0
  416. data/lib/stripe/params/subscription_schedule_release_params.rb +16 -0
  417. data/lib/stripe/params/subscription_schedule_retrieve_params.rb +13 -0
  418. data/lib/stripe/params/subscription_schedule_update_params.rb +562 -0
  419. data/lib/stripe/params/subscription_search_params.rb +22 -0
  420. data/lib/stripe/params/subscription_update_params.rb +683 -0
  421. data/lib/stripe/params/tax/calculation_create_params.rb +206 -0
  422. data/lib/stripe/params/tax/calculation_line_item_list_params.rb +24 -0
  423. data/lib/stripe/{services/quote_preview_invoice_service.rb → params/tax/calculation_list_line_items_params.rb} +2 -13
  424. data/lib/stripe/params/tax/calculation_retrieve_params.rb +15 -0
  425. data/lib/stripe/params/tax/registration_create_params.rb +2018 -0
  426. data/lib/stripe/params/tax/registration_list_params.rb +27 -0
  427. data/lib/stripe/params/tax/registration_retrieve_params.rb +15 -0
  428. data/lib/stripe/params/tax/registration_update_params.rb +21 -0
  429. data/lib/stripe/params/tax/settings_retrieve_params.rb +15 -0
  430. data/lib/stripe/params/tax/settings_update_params.rb +71 -0
  431. data/lib/stripe/params/tax/transaction_create_from_calculation_params.rb +27 -0
  432. data/lib/stripe/params/tax/transaction_create_reversal_params.rb +87 -0
  433. data/lib/stripe/params/tax/transaction_line_item_list_params.rb +24 -0
  434. data/lib/stripe/{services/payment_intent_amount_details_line_item_service.rb → params/tax/transaction_list_line_items_params.rb} +2 -13
  435. data/lib/stripe/params/tax/transaction_retrieve_params.rb +15 -0
  436. data/lib/stripe/params/tax_code_list_params.rb +22 -0
  437. data/lib/stripe/params/tax_code_retrieve_params.rb +13 -0
  438. data/lib/stripe/params/tax_id_create_params.rb +36 -0
  439. data/lib/stripe/params/tax_id_delete_params.rb +6 -0
  440. data/lib/stripe/params/tax_id_list_params.rb +39 -0
  441. data/lib/stripe/params/tax_id_retrieve_params.rb +13 -0
  442. data/lib/stripe/params/tax_rate_create_params.rb +55 -0
  443. data/lib/stripe/params/tax_rate_list_params.rb +56 -0
  444. data/lib/stripe/params/tax_rate_retrieve_params.rb +13 -0
  445. data/lib/stripe/params/tax_rate_update_params.rb +47 -0
  446. data/lib/stripe/params/terminal/configuration_create_params.rb +593 -0
  447. data/lib/stripe/params/terminal/configuration_delete_params.rb +8 -0
  448. data/lib/stripe/params/terminal/configuration_list_params.rb +33 -0
  449. data/lib/stripe/params/terminal/configuration_retrieve_params.rb +15 -0
  450. data/lib/stripe/params/terminal/configuration_update_params.rb +593 -0
  451. data/lib/stripe/params/terminal/connection_token_create_params.rb +18 -0
  452. data/lib/stripe/params/terminal/location_create_params.rb +153 -0
  453. data/lib/stripe/params/terminal/location_delete_params.rb +8 -0
  454. data/lib/stripe/params/terminal/location_list_params.rb +24 -0
  455. data/lib/stripe/params/terminal/location_retrieve_params.rb +15 -0
  456. data/lib/stripe/params/terminal/location_update_params.rb +153 -0
  457. data/lib/stripe/params/terminal/reader_cancel_action_params.rb +15 -0
  458. data/lib/stripe/params/terminal/reader_collect_inputs_params.rb +96 -0
  459. data/lib/stripe/params/terminal/reader_collect_payment_method_params.rb +51 -0
  460. data/lib/stripe/params/terminal/reader_confirm_payment_intent_params.rb +29 -0
  461. data/lib/stripe/params/terminal/reader_create_params.rb +27 -0
  462. data/lib/stripe/params/terminal/reader_delete_params.rb +8 -0
  463. data/lib/stripe/params/terminal/reader_list_params.rb +45 -0
  464. data/lib/stripe/params/terminal/reader_present_payment_method_params.rb +72 -0
  465. data/lib/stripe/params/terminal/reader_process_payment_intent_params.rb +55 -0
  466. data/lib/stripe/params/terminal/reader_process_setup_intent_params.rb +32 -0
  467. data/lib/stripe/params/terminal/reader_refund_payment_params.rb +53 -0
  468. data/lib/stripe/params/terminal/reader_retrieve_params.rb +15 -0
  469. data/lib/stripe/params/terminal/reader_set_reader_display_params.rb +52 -0
  470. data/lib/stripe/params/terminal/reader_succeed_input_collection_params.rb +18 -0
  471. data/lib/stripe/params/terminal/reader_timeout_input_collection_params.rb +15 -0
  472. data/lib/stripe/params/terminal/reader_update_params.rb +21 -0
  473. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +652 -0
  474. data/lib/stripe/params/test_helpers/customer_fund_cash_balance_params.rb +24 -0
  475. data/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb +267 -0
  476. data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +359 -0
  477. data/lib/stripe/params/test_helpers/issuing/authorization_expire_params.rb +17 -0
  478. data/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb +145 -0
  479. data/lib/stripe/params/test_helpers/issuing/authorization_increment_params.rb +23 -0
  480. data/lib/stripe/params/test_helpers/issuing/authorization_respond_params.rb +20 -0
  481. data/lib/stripe/params/test_helpers/issuing/authorization_reverse_params.rb +20 -0
  482. data/lib/stripe/params/test_helpers/issuing/card_deliver_card_params.rb +17 -0
  483. data/lib/stripe/params/test_helpers/issuing/card_fail_card_params.rb +17 -0
  484. data/lib/stripe/params/test_helpers/issuing/card_return_card_params.rb +17 -0
  485. data/lib/stripe/params/test_helpers/issuing/card_ship_card_params.rb +17 -0
  486. data/lib/stripe/params/test_helpers/issuing/card_submit_card_params.rb +17 -0
  487. data/lib/stripe/params/test_helpers/issuing/personalization_design_activate_params.rb +17 -0
  488. data/lib/stripe/params/test_helpers/issuing/personalization_design_deactivate_params.rb +17 -0
  489. data/lib/stripe/params/test_helpers/issuing/personalization_design_reject_params.rb +31 -0
  490. data/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb +318 -0
  491. data/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb +318 -0
  492. data/lib/stripe/params/test_helpers/issuing/transaction_refund_params.rb +20 -0
  493. data/lib/stripe/params/test_helpers/refund_expire_params.rb +15 -0
  494. data/lib/stripe/params/test_helpers/terminal/reader_present_payment_method_params.rb +74 -0
  495. data/lib/stripe/params/test_helpers/terminal/reader_succeed_input_collection_params.rb +20 -0
  496. data/lib/stripe/params/test_helpers/terminal/reader_timeout_input_collection_params.rb +17 -0
  497. data/lib/stripe/params/test_helpers/test_clock_advance_params.rb +18 -0
  498. data/lib/stripe/params/test_helpers/test_clock_create_params.rb +21 -0
  499. data/lib/stripe/params/test_helpers/test_clock_delete_params.rb +8 -0
  500. data/lib/stripe/params/test_helpers/test_clock_list_params.rb +24 -0
  501. data/lib/stripe/params/test_helpers/test_clock_retrieve_params.rb +15 -0
  502. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_fail_params.rb +28 -0
  503. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_return_inbound_transfer_params.rb +17 -0
  504. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_succeed_params.rb +17 -0
  505. data/lib/stripe/params/test_helpers/treasury/outbound_payment_fail_params.rb +17 -0
  506. data/lib/stripe/params/test_helpers/treasury/outbound_payment_post_params.rb +17 -0
  507. data/lib/stripe/params/test_helpers/treasury/outbound_payment_return_outbound_payment_params.rb +28 -0
  508. data/lib/stripe/params/test_helpers/treasury/outbound_payment_update_params.rb +57 -0
  509. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_fail_params.rb +17 -0
  510. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_post_params.rb +17 -0
  511. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_return_outbound_transfer_params.rb +28 -0
  512. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_update_params.rb +57 -0
  513. data/lib/stripe/params/test_helpers/treasury/received_credit_create_params.rb +68 -0
  514. data/lib/stripe/params/test_helpers/treasury/received_debit_create_params.rb +68 -0
  515. data/lib/stripe/params/token_create_params.rb +1191 -0
  516. data/lib/stripe/params/token_retrieve_params.rb +13 -0
  517. data/lib/stripe/params/topup_cancel_params.rb +13 -0
  518. data/lib/stripe/params/topup_create_params.rb +43 -0
  519. data/lib/stripe/params/topup_list_params.rb +74 -0
  520. data/lib/stripe/params/topup_retrieve_params.rb +13 -0
  521. data/lib/stripe/params/topup_update_params.rb +19 -0
  522. data/lib/stripe/params/transfer_create_params.rb +47 -0
  523. data/lib/stripe/params/transfer_list_params.rb +56 -0
  524. data/lib/stripe/params/transfer_retrieve_params.rb +13 -0
  525. data/lib/stripe/params/transfer_reversal_create_params.rb +31 -0
  526. data/lib/stripe/params/transfer_reversal_list_params.rb +22 -0
  527. data/lib/stripe/params/transfer_reversal_retrieve_params.rb +13 -0
  528. data/lib/stripe/params/transfer_reversal_update_params.rb +16 -0
  529. data/lib/stripe/params/transfer_update_params.rb +19 -0
  530. data/lib/stripe/params/treasury/credit_reversal_create_params.rb +21 -0
  531. data/lib/stripe/params/treasury/credit_reversal_list_params.rb +41 -0
  532. data/lib/stripe/params/treasury/credit_reversal_retrieve_params.rb +15 -0
  533. data/lib/stripe/params/treasury/debit_reversal_create_params.rb +21 -0
  534. data/lib/stripe/params/treasury/debit_reversal_list_params.rb +45 -0
  535. data/lib/stripe/params/treasury/debit_reversal_retrieve_params.rb +15 -0
  536. data/lib/stripe/params/treasury/financial_account_close_params.rb +32 -0
  537. data/lib/stripe/params/treasury/financial_account_create_params.rb +201 -0
  538. data/lib/stripe/params/treasury/financial_account_features_retrieve_params.rb +15 -0
  539. data/lib/stripe/params/treasury/financial_account_features_update_params.rb +163 -0
  540. data/lib/stripe/params/treasury/financial_account_list_params.rb +54 -0
  541. data/lib/stripe/params/treasury/financial_account_retrieve_features_params.rb +15 -0
  542. data/lib/stripe/params/treasury/financial_account_retrieve_params.rb +15 -0
  543. data/lib/stripe/params/treasury/financial_account_update_features_params.rb +163 -0
  544. data/lib/stripe/params/treasury/financial_account_update_params.rb +216 -0
  545. data/lib/stripe/params/treasury/inbound_transfer_cancel_params.rb +15 -0
  546. data/lib/stripe/params/treasury/inbound_transfer_create_params.rb +45 -0
  547. data/lib/stripe/params/treasury/inbound_transfer_fail_params.rb +26 -0
  548. data/lib/stripe/params/treasury/inbound_transfer_list_params.rb +37 -0
  549. data/lib/stripe/params/treasury/inbound_transfer_retrieve_params.rb +15 -0
  550. data/lib/stripe/params/treasury/inbound_transfer_return_inbound_transfer_params.rb +15 -0
  551. data/lib/stripe/params/treasury/inbound_transfer_succeed_params.rb +15 -0
  552. data/lib/stripe/params/treasury/outbound_payment_cancel_params.rb +15 -0
  553. data/lib/stripe/params/treasury/outbound_payment_create_params.rb +190 -0
  554. data/lib/stripe/params/treasury/outbound_payment_fail_params.rb +15 -0
  555. data/lib/stripe/params/treasury/outbound_payment_list_params.rb +62 -0
  556. data/lib/stripe/params/treasury/outbound_payment_post_params.rb +15 -0
  557. data/lib/stripe/params/treasury/outbound_payment_retrieve_params.rb +15 -0
  558. data/lib/stripe/params/treasury/outbound_payment_return_outbound_payment_params.rb +26 -0
  559. data/lib/stripe/params/treasury/outbound_payment_update_params.rb +55 -0
  560. data/lib/stripe/params/treasury/outbound_transfer_cancel_params.rb +15 -0
  561. data/lib/stripe/params/treasury/outbound_transfer_create_params.rb +81 -0
  562. data/lib/stripe/params/treasury/outbound_transfer_fail_params.rb +15 -0
  563. data/lib/stripe/params/treasury/outbound_transfer_list_params.rb +37 -0
  564. data/lib/stripe/params/treasury/outbound_transfer_post_params.rb +15 -0
  565. data/lib/stripe/params/treasury/outbound_transfer_retrieve_params.rb +15 -0
  566. data/lib/stripe/params/treasury/outbound_transfer_return_outbound_transfer_params.rb +26 -0
  567. data/lib/stripe/params/treasury/outbound_transfer_update_params.rb +55 -0
  568. data/lib/stripe/params/treasury/received_credit_create_params.rb +66 -0
  569. data/lib/stripe/params/treasury/received_credit_list_params.rb +49 -0
  570. data/lib/stripe/params/treasury/received_credit_retrieve_params.rb +15 -0
  571. data/lib/stripe/params/treasury/received_debit_create_params.rb +66 -0
  572. data/lib/stripe/params/treasury/received_debit_list_params.rb +37 -0
  573. data/lib/stripe/params/treasury/received_debit_retrieve_params.rb +15 -0
  574. data/lib/stripe/params/treasury/transaction_entry_list_params.rb +84 -0
  575. data/lib/stripe/params/treasury/transaction_entry_retrieve_params.rb +15 -0
  576. data/lib/stripe/params/treasury/transaction_list_params.rb +92 -0
  577. data/lib/stripe/params/treasury/transaction_retrieve_params.rb +15 -0
  578. data/lib/stripe/params/v2/billing/meter_event_adjustment_create_params.rb +31 -0
  579. data/lib/stripe/params/v2/billing/meter_event_create_params.rb +33 -0
  580. data/lib/stripe/params/v2/billing/meter_event_session_create_params.rb +10 -0
  581. data/lib/stripe/params/v2/billing/meter_event_stream_create_params.rb +41 -0
  582. data/lib/stripe/params/v2/core/event_destination_create_params.rb +79 -0
  583. data/lib/stripe/params/v2/core/event_destination_delete_params.rb +10 -0
  584. data/lib/stripe/params/v2/core/event_destination_disable_params.rb +10 -0
  585. data/lib/stripe/params/v2/core/event_destination_enable_params.rb +10 -0
  586. data/lib/stripe/params/v2/core/event_destination_list_params.rb +20 -0
  587. data/lib/stripe/params/v2/core/event_destination_ping_params.rb +10 -0
  588. data/lib/stripe/params/v2/core/event_destination_retrieve_params.rb +17 -0
  589. data/lib/stripe/params/v2/core/event_destination_update_params.rb +47 -0
  590. data/lib/stripe/params/v2/core/event_list_params.rb +22 -0
  591. data/lib/stripe/params/v2/core/event_retrieve_params.rb +10 -0
  592. data/lib/stripe/params/webhook_endpoint_create_params.rb +39 -0
  593. data/lib/stripe/params/webhook_endpoint_delete_params.rb +6 -0
  594. data/lib/stripe/params/webhook_endpoint_list_params.rb +22 -0
  595. data/lib/stripe/params/webhook_endpoint_retrieve_params.rb +13 -0
  596. data/lib/stripe/params/webhook_endpoint_update_params.rb +35 -0
  597. data/lib/stripe/params.rb +588 -0
  598. data/lib/stripe/request_options.rb +14 -5
  599. data/lib/stripe/resources/account.rb +437 -4906
  600. data/lib/stripe/resources/account_link.rb +8 -47
  601. data/lib/stripe/resources/account_session.rb +338 -910
  602. data/lib/stripe/resources/apple_pay_domain.rb +8 -40
  603. data/lib/stripe/resources/application.rb +8 -0
  604. data/lib/stripe/resources/application_fee.rb +12 -44
  605. data/lib/stripe/resources/application_fee_refund.rb +8 -0
  606. data/lib/stripe/resources/apps/secret.rb +12 -112
  607. data/lib/stripe/resources/balance.rb +159 -0
  608. data/lib/stripe/resources/balance_settings.rb +40 -60
  609. data/lib/stripe/resources/balance_transaction.rb +12 -56
  610. data/lib/stripe/resources/bank_account.rb +40 -0
  611. data/lib/stripe/resources/billing/alert.rb +20 -100
  612. data/lib/stripe/resources/billing/alert_triggered.rb +8 -0
  613. data/lib/stripe/resources/billing/credit_balance_summary.rb +48 -2
  614. data/lib/stripe/resources/billing/credit_balance_transaction.rb +73 -33
  615. data/lib/stripe/resources/billing/credit_grant.rb +42 -161
  616. data/lib/stripe/resources/billing/meter.rb +40 -116
  617. data/lib/stripe/resources/billing/meter_event.rb +8 -20
  618. data/lib/stripe/resources/billing/meter_event_adjustment.rb +12 -22
  619. data/lib/stripe/resources/billing/meter_event_summary.rb +8 -0
  620. data/lib/stripe/resources/billing_portal/configuration.rb +120 -473
  621. data/lib/stripe/resources/billing_portal/session.rb +98 -176
  622. data/lib/stripe/resources/capability.rb +56 -0
  623. data/lib/stripe/resources/card.rb +17 -3
  624. data/lib/stripe/resources/cash_balance.rb +16 -2
  625. data/lib/stripe/resources/charge.rb +949 -1945
  626. data/lib/stripe/resources/checkout/session.rb +1038 -2991
  627. data/lib/stripe/resources/climate/order.rb +28 -89
  628. data/lib/stripe/resources/climate/product.rb +13 -15
  629. data/lib/stripe/resources/climate/supplier.rb +13 -15
  630. data/lib/stripe/resources/confirmation_token.rb +883 -841
  631. data/lib/stripe/resources/connect_collection_transfer.rb +8 -0
  632. data/lib/stripe/resources/country_spec.rb +29 -15
  633. data/lib/stripe/resources/coupon.rb +19 -166
  634. data/lib/stripe/resources/credit_note.rb +66 -510
  635. data/lib/stripe/resources/credit_note_line_item.rb +43 -8
  636. data/lib/stripe/resources/customer.rb +81 -677
  637. data/lib/stripe/resources/customer_balance_transaction.rb +8 -2
  638. data/lib/stripe/resources/customer_cash_balance_transaction.rb +108 -2
  639. data/lib/stripe/resources/customer_session.rb +49 -98
  640. data/lib/stripe/resources/discount.rb +24 -6
  641. data/lib/stripe/resources/dispute.rb +159 -376
  642. data/lib/stripe/resources/entitlements/active_entitlement.rb +8 -26
  643. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +8 -0
  644. data/lib/stripe/resources/entitlements/feature.rb +8 -66
  645. data/lib/stripe/resources/ephemeral_key.rb +8 -8
  646. data/lib/stripe/resources/event.rb +16 -79
  647. data/lib/stripe/resources/exchange_rate.rb +18 -17
  648. data/lib/stripe/resources/file.rb +8 -79
  649. data/lib/stripe/resources/file_link.rb +8 -84
  650. data/lib/stripe/resources/financial_connections/account.rb +65 -130
  651. data/lib/stripe/resources/financial_connections/account_owner.rb +8 -0
  652. data/lib/stripe/resources/financial_connections/account_ownership.rb +8 -0
  653. data/lib/stripe/resources/financial_connections/session.rb +20 -115
  654. data/lib/stripe/resources/financial_connections/transaction.rb +12 -57
  655. data/lib/stripe/resources/forwarding/request.rb +48 -93
  656. data/lib/stripe/resources/funding_instructions.rb +217 -24
  657. data/lib/stripe/resources/identity/verification_report.rb +165 -56
  658. data/lib/stripe/resources/identity/verification_session.rb +124 -247
  659. data/lib/stripe/resources/invoice.rb +500 -4017
  660. data/lib/stripe/resources/invoice_item.rb +69 -385
  661. data/lib/stripe/resources/invoice_line_item.rb +124 -251
  662. data/lib/stripe/resources/invoice_payment.rb +20 -47
  663. data/lib/stripe/resources/invoice_rendering_template.rb +8 -38
  664. data/lib/stripe/resources/issuing/authorization.rb +173 -836
  665. data/lib/stripe/resources/issuing/card.rb +98 -499
  666. data/lib/stripe/resources/issuing/cardholder.rb +108 -515
  667. data/lib/stripe/resources/issuing/dispute.rb +93 -620
  668. data/lib/stripe/resources/issuing/personalization_design.rb +32 -221
  669. data/lib/stripe/resources/issuing/physical_bundle.rb +13 -28
  670. data/lib/stripe/resources/issuing/token.rb +57 -60
  671. data/lib/stripe/resources/issuing/transaction.rb +147 -702
  672. data/lib/stripe/resources/line_item.rb +22 -35
  673. data/lib/stripe/resources/login_link.rb +8 -0
  674. data/lib/stripe/resources/mandate.rb +219 -94
  675. data/lib/stripe/resources/payment_intent.rb +1241 -13361
  676. data/lib/stripe/resources/payment_link.rb +333 -1357
  677. data/lib/stripe/resources/payment_method.rb +796 -966
  678. data/lib/stripe/resources/payment_method_configuration.rb +862 -2528
  679. data/lib/stripe/resources/payment_method_domain.rb +107 -63
  680. data/lib/stripe/resources/payout.rb +12 -150
  681. data/lib/stripe/resources/person.rb +184 -4
  682. data/lib/stripe/resources/plan.rb +20 -235
  683. data/lib/stripe/resources/price.rb +65 -509
  684. data/lib/stripe/resources/product.rb +23 -411
  685. data/lib/stripe/resources/product_feature.rb +8 -0
  686. data/lib/stripe/resources/promotion_code.rb +40 -182
  687. data/lib/stripe/resources/quote.rb +280 -2743
  688. data/lib/stripe/resources/radar/early_fraud_warning.rb +8 -51
  689. data/lib/stripe/resources/radar/value_list.rb +8 -92
  690. data/lib/stripe/resources/radar/value_list_item.rb +8 -68
  691. data/lib/stripe/resources/refund.rb +365 -159
  692. data/lib/stripe/resources/reporting/report_run.rb +12 -93
  693. data/lib/stripe/resources/reporting/report_type.rb +8 -8
  694. data/lib/stripe/resources/reserve_transaction.rb +8 -0
  695. data/lib/stripe/resources/reversal.rb +8 -0
  696. data/lib/stripe/resources/review.rb +20 -43
  697. data/lib/stripe/resources/setup_attempt.rb +284 -87
  698. data/lib/stripe/resources/setup_intent.rb +358 -4143
  699. data/lib/stripe/resources/shipping_rate.rb +44 -187
  700. data/lib/stripe/resources/sigma/scheduled_query_run.rb +13 -15
  701. data/lib/stripe/resources/source.rb +267 -611
  702. data/lib/stripe/resources/source_mandate_notification.rb +32 -0
  703. data/lib/stripe/resources/source_transaction.rb +54 -0
  704. data/lib/stripe/resources/subscription.rb +266 -1931
  705. data/lib/stripe/resources/subscription_item.rb +12 -379
  706. data/lib/stripe/resources/subscription_schedule.rb +230 -2273
  707. data/lib/stripe/resources/tax/calculation.rb +111 -220
  708. data/lib/stripe/resources/tax/calculation_line_item.rb +32 -0
  709. data/lib/stripe/resources/tax/registration.rb +1274 -2096
  710. data/lib/stripe/resources/tax/settings.rb +61 -64
  711. data/lib/stripe/resources/tax/transaction.rb +95 -122
  712. data/lib/stripe/resources/tax/transaction_line_item.rb +16 -0
  713. data/lib/stripe/resources/tax_code.rb +8 -17
  714. data/lib/stripe/resources/tax_deducted_at_source.rb +8 -0
  715. data/lib/stripe/resources/tax_id.rb +20 -75
  716. data/lib/stripe/resources/tax_rate.rb +12 -142
  717. data/lib/stripe/resources/terminal/configuration.rb +301 -1205
  718. data/lib/stripe/resources/terminal/connection_token.rb +8 -11
  719. data/lib/stripe/resources/terminal/location.rb +72 -126
  720. data/lib/stripe/resources/terminal/reader.rb +237 -509
  721. data/lib/stripe/resources/test_helpers/test_clock.rb +20 -43
  722. data/lib/stripe/resources/token.rb +8 -1191
  723. data/lib/stripe/resources/topup.rb +8 -132
  724. data/lib/stripe/resources/transfer.rb +8 -115
  725. data/lib/stripe/resources/treasury/credit_reversal.rb +12 -46
  726. data/lib/stripe/resources/treasury/debit_reversal.rb +20 -50
  727. data/lib/stripe/resources/treasury/financial_account.rb +55 -658
  728. data/lib/stripe/resources/treasury/financial_account_features.rb +192 -2
  729. data/lib/stripe/resources/treasury/inbound_transfer.rb +67 -115
  730. data/lib/stripe/resources/treasury/outbound_payment.rb +104 -334
  731. data/lib/stripe/resources/treasury/outbound_transfer.rb +93 -235
  732. data/lib/stripe/resources/treasury/received_credit.rb +76 -136
  733. data/lib/stripe/resources/treasury/received_debit.rb +68 -126
  734. data/lib/stripe/resources/treasury/transaction.rb +32 -82
  735. data/lib/stripe/resources/treasury/transaction_entry.rb +20 -74
  736. data/lib/stripe/resources/v2/billing/meter_event.rb +8 -0
  737. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +16 -0
  738. data/lib/stripe/resources/v2/billing/meter_event_session.rb +8 -0
  739. data/lib/stripe/resources/v2/core/event.rb +67 -0
  740. data/lib/stripe/resources/v2/core/event_destination.rb +119 -0
  741. data/lib/stripe/resources/v2/core/event_notification.rb +62 -0
  742. data/lib/stripe/resources/v2/deleted_object.rb +21 -0
  743. data/lib/stripe/resources/webhook_endpoint.rb +8 -85
  744. data/lib/stripe/resources.rb +3 -110
  745. data/lib/stripe/services/account_capability_service.rb +0 -32
  746. data/lib/stripe/services/account_external_account_service.rb +0 -249
  747. data/lib/stripe/services/account_link_service.rb +0 -48
  748. data/lib/stripe/services/account_login_link_service.rb +0 -9
  749. data/lib/stripe/services/account_person_service.rb +0 -958
  750. data/lib/stripe/services/account_service.rb +0 -4710
  751. data/lib/stripe/services/account_session_service.rb +0 -862
  752. data/lib/stripe/services/apple_pay_domain_service.rb +0 -50
  753. data/lib/stripe/services/application_fee_refund_service.rb +0 -54
  754. data/lib/stripe/services/application_fee_service.rb +0 -57
  755. data/lib/stripe/services/apps/secret_service.rb +0 -116
  756. data/lib/stripe/services/balance_service.rb +0 -9
  757. data/lib/stripe/services/balance_settings_service.rb +0 -69
  758. data/lib/stripe/services/balance_transaction_service.rb +0 -69
  759. data/lib/stripe/services/billing/alert_service.rb +0 -113
  760. data/lib/stripe/services/billing/credit_balance_summary_service.rb +0 -51
  761. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -44
  762. data/lib/stripe/services/billing/credit_grant_service.rb +0 -174
  763. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +0 -26
  764. data/lib/stripe/services/billing/meter_event_service.rb +0 -21
  765. data/lib/stripe/services/billing/meter_event_summary_service.rb +0 -39
  766. data/lib/stripe/services/billing/meter_service.rb +0 -130
  767. data/lib/stripe/services/billing_portal/configuration_service.rb +0 -486
  768. data/lib/stripe/services/billing_portal/session_service.rb +0 -177
  769. data/lib/stripe/services/billing_service.rb +1 -2
  770. data/lib/stripe/services/charge_service.rb +0 -1820
  771. data/lib/stripe/services/checkout/session_line_item_service.rb +0 -18
  772. data/lib/stripe/services/checkout/session_service.rb +0 -2882
  773. data/lib/stripe/services/climate/order_service.rb +0 -102
  774. data/lib/stripe/services/climate/product_service.rb +0 -27
  775. data/lib/stripe/services/climate/supplier_service.rb +0 -27
  776. data/lib/stripe/services/confirmation_token_service.rb +0 -9
  777. data/lib/stripe/services/country_spec_service.rb +0 -27
  778. data/lib/stripe/services/coupon_service.rb +0 -167
  779. data/lib/stripe/services/credit_note_line_item_service.rb +0 -18
  780. data/lib/stripe/services/credit_note_preview_lines_service.rb +0 -152
  781. data/lib/stripe/services/credit_note_service.rb +0 -369
  782. data/lib/stripe/services/customer_balance_transaction_service.rb +0 -63
  783. data/lib/stripe/services/customer_cash_balance_service.rb +0 -29
  784. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +0 -27
  785. data/lib/stripe/services/customer_funding_instructions_service.rb +0 -42
  786. data/lib/stripe/services/customer_payment_method_service.rb +0 -40
  787. data/lib/stripe/services/customer_payment_source_service.rb +0 -179
  788. data/lib/stripe/services/customer_service.rb +0 -575
  789. data/lib/stripe/services/customer_session_service.rb +0 -99
  790. data/lib/stripe/services/customer_tax_id_service.rb +0 -44
  791. data/lib/stripe/services/dispute_service.rb +0 -374
  792. data/lib/stripe/services/entitlements/active_entitlement_service.rb +0 -36
  793. data/lib/stripe/services/entitlements/feature_service.rb +0 -76
  794. data/lib/stripe/services/ephemeral_key_service.rb +0 -36
  795. data/lib/stripe/services/event_service.rb +0 -65
  796. data/lib/stripe/services/exchange_rate_service.rb +4 -27
  797. data/lib/stripe/services/file_link_service.rb +0 -94
  798. data/lib/stripe/services/file_service.rb +0 -89
  799. data/lib/stripe/services/financial_connections/account_owner_service.rb +0 -27
  800. data/lib/stripe/services/financial_connections/account_service.rb +1 -102
  801. data/lib/stripe/services/financial_connections/session_service.rb +0 -100
  802. data/lib/stripe/services/financial_connections/transaction_service.rb +0 -70
  803. data/lib/stripe/services/financial_connections_service.rb +1 -2
  804. data/lib/stripe/services/forwarding/request_service.rb +0 -106
  805. data/lib/stripe/services/identity/verification_report_service.rb +0 -65
  806. data/lib/stripe/services/identity/verification_session_service.rb +0 -255
  807. data/lib/stripe/services/invoice_item_service.rb +0 -405
  808. data/lib/stripe/services/invoice_line_item_service.rb +0 -253
  809. data/lib/stripe/services/invoice_payment_service.rb +0 -58
  810. data/lib/stripe/services/invoice_rendering_template_service.rb +0 -51
  811. data/lib/stripe/services/invoice_service.rb +0 -3836
  812. data/lib/stripe/services/issuing/authorization_service.rb +0 -104
  813. data/lib/stripe/services/issuing/card_service.rb +0 -463
  814. data/lib/stripe/services/issuing/cardholder_service.rb +0 -526
  815. data/lib/stripe/services/issuing/dispute_service.rb +0 -633
  816. data/lib/stripe/services/issuing/personalization_design_service.rb +0 -193
  817. data/lib/stripe/services/issuing/physical_bundle_service.rb +0 -40
  818. data/lib/stripe/services/issuing/token_service.rb +0 -73
  819. data/lib/stripe/services/issuing/transaction_service.rb +0 -81
  820. data/lib/stripe/services/issuing_service.rb +1 -5
  821. data/lib/stripe/services/mandate_service.rb +0 -49
  822. data/lib/stripe/services/payment_intent_service.rb +0 -12747
  823. data/lib/stripe/services/payment_link_line_item_service.rb +0 -18
  824. data/lib/stripe/services/payment_link_service.rb +0 -1352
  825. data/lib/stripe/services/payment_method_configuration_service.rb +0 -2466
  826. data/lib/stripe/services/payment_method_domain_service.rb +0 -76
  827. data/lib/stripe/services/payment_method_service.rb +0 -881
  828. data/lib/stripe/services/payout_service.rb +0 -163
  829. data/lib/stripe/services/plan_service.rb +0 -248
  830. data/lib/stripe/services/price_service.rb +0 -512
  831. data/lib/stripe/services/product_feature_service.rb +0 -41
  832. data/lib/stripe/services/product_service.rb +0 -424
  833. data/lib/stripe/services/promotion_code_service.rb +1 -187
  834. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +0 -18
  835. data/lib/stripe/services/quote_line_item_service.rb +0 -18
  836. data/lib/stripe/services/quote_service.rb +1 -2344
  837. data/lib/stripe/services/radar/early_fraud_warning_service.rb +0 -61
  838. data/lib/stripe/services/radar/value_list_item_service.rb +0 -78
  839. data/lib/stripe/services/radar/value_list_service.rb +0 -102
  840. data/lib/stripe/services/refund_service.rb +0 -137
  841. data/lib/stripe/services/reporting/report_run_service.rb +0 -106
  842. data/lib/stripe/services/reporting/report_type_service.rb +0 -18
  843. data/lib/stripe/services/review_service.rb +0 -56
  844. data/lib/stripe/services/setup_attempt_service.rb +0 -51
  845. data/lib/stripe/services/setup_intent_service.rb +0 -3957
  846. data/lib/stripe/services/shipping_rate_service.rb +0 -200
  847. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +0 -27
  848. data/lib/stripe/services/source_service.rb +0 -601
  849. data/lib/stripe/services/source_transaction_service.rb +0 -18
  850. data/lib/stripe/services/subscription_item_service.rb +0 -383
  851. data/lib/stripe/services/subscription_schedule_service.rb +0 -2196
  852. data/lib/stripe/services/subscription_service.rb +0 -1894
  853. data/lib/stripe/services/tax/calculation_line_item_service.rb +0 -18
  854. data/lib/stripe/services/tax/calculation_service.rb +0 -209
  855. data/lib/stripe/services/tax/registration_service.rb +0 -2063
  856. data/lib/stripe/services/tax/settings_service.rb +0 -74
  857. data/lib/stripe/services/tax/transaction_line_item_service.rb +0 -18
  858. data/lib/stripe/services/tax/transaction_service.rb +0 -111
  859. data/lib/stripe/services/tax_code_service.rb +0 -27
  860. data/lib/stripe/services/tax_id_service.rb +0 -84
  861. data/lib/stripe/services/tax_rate_service.rb +0 -155
  862. data/lib/stripe/services/tax_service.rb +1 -3
  863. data/lib/stripe/services/terminal/configuration_service.rb +0 -1212
  864. data/lib/stripe/services/terminal/connection_token_service.rb +0 -12
  865. data/lib/stripe/services/terminal/location_service.rb +0 -143
  866. data/lib/stripe/services/terminal/reader_service.rb +0 -427
  867. data/lib/stripe/services/terminal_service.rb +1 -3
  868. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -738
  869. data/lib/stripe/services/test_helpers/customer_service.rb +0 -18
  870. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +0 -745
  871. data/lib/stripe/services/test_helpers/issuing/card_service.rb +0 -45
  872. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +0 -41
  873. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +0 -632
  874. data/lib/stripe/services/test_helpers/refund_service.rb +0 -9
  875. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -87
  876. data/lib/stripe/services/test_helpers/test_clock_service.rb +0 -56
  877. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +0 -38
  878. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +0 -87
  879. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +0 -87
  880. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +0 -84
  881. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +0 -84
  882. data/lib/stripe/services/token_service.rb +0 -1201
  883. data/lib/stripe/services/topup_service.rb +0 -142
  884. data/lib/stripe/services/transfer_reversal_service.rb +0 -66
  885. data/lib/stripe/services/transfer_service.rb +0 -123
  886. data/lib/stripe/services/treasury/credit_reversal_service.rb +0 -59
  887. data/lib/stripe/services/treasury/debit_reversal_service.rb +0 -63
  888. data/lib/stripe/services/treasury/financial_account_features_service.rb +0 -169
  889. data/lib/stripe/services/treasury/financial_account_service.rb +0 -502
  890. data/lib/stripe/services/treasury/inbound_transfer_service.rb +0 -88
  891. data/lib/stripe/services/treasury/outbound_payment_service.rb +0 -258
  892. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -148
  893. data/lib/stripe/services/treasury/received_credit_service.rb +0 -52
  894. data/lib/stripe/services/treasury/received_debit_service.rb +0 -40
  895. data/lib/stripe/services/treasury/transaction_entry_service.rb +0 -87
  896. data/lib/stripe/services/treasury/transaction_service.rb +0 -95
  897. data/lib/stripe/services/v1_services.rb +1 -10
  898. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +0 -23
  899. data/lib/stripe/services/v2/billing/meter_event_service.rb +0 -25
  900. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +0 -2
  901. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +0 -33
  902. data/lib/stripe/services/v2/core/event_destination_service.rb +0 -137
  903. data/lib/stripe/services/v2/core/event_service.rb +0 -16
  904. data/lib/stripe/services/v2/core_service.rb +1 -4
  905. data/lib/stripe/services/v2_services.rb +1 -4
  906. data/lib/stripe/services/webhook_endpoint_service.rb +0 -95
  907. data/lib/stripe/services.rb +0 -54
  908. data/lib/stripe/stripe_client.rb +8 -5
  909. data/lib/stripe/stripe_configuration.rb +2 -9
  910. data/lib/stripe/stripe_context.rb +68 -0
  911. data/lib/stripe/stripe_object.rb +34 -10
  912. data/lib/stripe/util.rb +25 -20
  913. data/lib/stripe/version.rb +1 -1
  914. data/lib/stripe.rb +3 -54
  915. data/rbi/stripe/resources/v2/core/event_notification.rbi +43 -0
  916. data/rbi/stripe/stripe_client.rbi +17 -0
  917. data/rbi/stripe.rbi +121931 -190301
  918. metadata +599 -189
  919. data/API_VERSION +0 -1
  920. data/CHANGELOG.md +0 -2780
  921. data/CODE_OF_CONDUCT.md +0 -77
  922. data/CONTRIBUTING.md +0 -25
  923. data/CONTRIBUTORS +0 -3
  924. data/Gemfile +0 -41
  925. data/History.txt +0 -1
  926. data/LICENSE +0 -21
  927. data/Makefile +0 -22
  928. data/OPENAPI_VERSION +0 -1
  929. data/README.md +0 -424
  930. data/Rakefile +0 -34
  931. data/VERSION +0 -1
  932. data/examples/README.md +0 -16
  933. data/examples/example_template.rb +0 -36
  934. data/examples/meter_event_stream.rb +0 -57
  935. data/examples/thinevent_webhook_handler.rb +0 -39
  936. data/justfile +0 -43
  937. data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
  938. data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
  939. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
  940. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
  941. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
  942. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
  943. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
  944. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
  945. data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +0 -23
  946. data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +0 -21
  947. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
  948. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
  949. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
  950. data/lib/stripe/events/v2_core_account_link_returned_event.rb +0 -13
  951. data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
  952. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
  953. data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
  954. data/lib/stripe/events/v2_core_account_updated_event.rb +0 -21
  955. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
  956. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
  957. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
  958. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
  959. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
  960. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
  961. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
  962. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
  963. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
  964. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
  965. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
  966. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
  967. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
  968. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
  969. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
  970. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
  971. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
  972. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
  973. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
  974. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
  975. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
  976. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
  977. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
  978. data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +0 -21
  979. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
  980. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
  981. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
  982. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
  983. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
  984. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
  985. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
  986. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
  987. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
  988. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
  989. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
  990. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +0 -21
  991. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +0 -22
  992. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +0 -21
  993. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +0 -21
  994. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +0 -21
  995. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +0 -21
  996. data/lib/stripe/resources/account_notice.rb +0 -123
  997. data/lib/stripe/resources/billing/meter_usage.rb +0 -23
  998. data/lib/stripe/resources/billing/meter_usage_row.rb +0 -28
  999. data/lib/stripe/resources/capital/financing_offer.rb +0 -179
  1000. data/lib/stripe/resources/capital/financing_summary.rb +0 -55
  1001. data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
  1002. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  1003. data/lib/stripe/resources/financial_connections/institution.rb +0 -92
  1004. data/lib/stripe/resources/fx_quote.rb +0 -186
  1005. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
  1006. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
  1007. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
  1008. data/lib/stripe/resources/issuing/settlement.rb +0 -53
  1009. data/lib/stripe/resources/margin.rb +0 -115
  1010. data/lib/stripe/resources/order.rb +0 -2958
  1011. data/lib/stripe/resources/payment_attempt_record.rb +0 -1181
  1012. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
  1013. data/lib/stripe/resources/payment_record.rb +0 -1727
  1014. data/lib/stripe/resources/privacy/redaction_job.rb +0 -298
  1015. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -33
  1016. data/lib/stripe/resources/quote_line.rb +0 -274
  1017. data/lib/stripe/resources/quote_preview_invoice.rb +0 -680
  1018. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -395
  1019. data/lib/stripe/resources/tax/association.rb +0 -66
  1020. data/lib/stripe/resources/tax/form.rb +0 -211
  1021. data/lib/stripe/resources/terminal/onboarding_link.rb +0 -84
  1022. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
  1023. data/lib/stripe/resources/v2/core/account.rb +0 -1938
  1024. data/lib/stripe/resources/v2/core/account_link.rb +0 -72
  1025. data/lib/stripe/resources/v2/core/person.rb +0 -276
  1026. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
  1027. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
  1028. data/lib/stripe/resources/v2/event.rb +0 -41
  1029. data/lib/stripe/resources/v2/event_destination.rb +0 -73
  1030. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
  1031. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
  1032. data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
  1033. data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -79
  1034. data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
  1035. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
  1036. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
  1037. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
  1038. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
  1039. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
  1040. data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -77
  1041. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
  1042. data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -122
  1043. data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
  1044. data/lib/stripe/resources/v2/money_management/transaction.rb +0 -80
  1045. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -70
  1046. data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -89
  1047. data/lib/stripe/services/account_notice_service.rb +0 -101
  1048. data/lib/stripe/services/billing/meter_usage_service.rb +0 -76
  1049. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  1050. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  1051. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  1052. data/lib/stripe/services/capital_service.rb +0 -15
  1053. data/lib/stripe/services/external_account_service.rb +0 -317
  1054. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -37
  1055. data/lib/stripe/services/financial_connections/institution_service.rb +0 -57
  1056. data/lib/stripe/services/fx_quote_service.rb +0 -123
  1057. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  1058. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  1059. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  1060. data/lib/stripe/services/margin_service.rb +0 -119
  1061. data/lib/stripe/services/order_service.rb +0 -2388
  1062. data/lib/stripe/services/payment_attempt_record_service.rb +0 -52
  1063. data/lib/stripe/services/payment_record_service.rb +0 -562
  1064. data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
  1065. data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +0 -37
  1066. data/lib/stripe/services/privacy_service.rb +0 -13
  1067. data/lib/stripe/services/tax/association_service.rb +0 -31
  1068. data/lib/stripe/services/tax/form_service.rb +0 -100
  1069. data/lib/stripe/services/terminal/onboarding_link_service.rb +0 -56
  1070. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  1071. data/lib/stripe/services/v2/core/account_link_service.rb +0 -114
  1072. data/lib/stripe/services/v2/core/account_service.rb +0 -4536
  1073. data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1045
  1074. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -130
  1075. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
  1076. data/lib/stripe/services/v2/core/vault_service.rb +0 -18
  1077. data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
  1078. data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -119
  1079. data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -82
  1080. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
  1081. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
  1082. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -199
  1083. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
  1084. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
  1085. data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -90
  1086. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
  1087. data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -70
  1088. data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
  1089. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
  1090. data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
  1091. data/lib/stripe/services/v2/money_management_service.rb +0 -31
  1092. data/lib/stripe/services/v2/payment_service.rb +0 -15
  1093. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -152
  1094. data/lib/stripe/services/v2/test_helper_service.rb +0 -15
  1095. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -53
  1096. data/lib/stripe/thin_event.rb +0 -37
  1097. data/stripe.gemspec +0 -47
@@ -3,1900 +3,6 @@
3
3
 
4
4
  module Stripe
5
5
  class SubscriptionService < StripeService
6
- class CancelParams < Stripe::RequestParams
7
- class CancellationDetails < Stripe::RequestParams
8
- # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
9
- attr_accessor :comment
10
- # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
11
- attr_accessor :feedback
12
-
13
- def initialize(comment: nil, feedback: nil)
14
- @comment = comment
15
- @feedback = feedback
16
- end
17
- end
18
- # Details about why this subscription was cancelled
19
- attr_accessor :cancellation_details
20
- # Specifies which fields in the response should be expanded.
21
- attr_accessor :expand
22
- # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`.
23
- attr_accessor :invoice_now
24
- # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`.
25
- attr_accessor :prorate
26
-
27
- def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil)
28
- @cancellation_details = cancellation_details
29
- @expand = expand
30
- @invoice_now = invoice_now
31
- @prorate = prorate
32
- end
33
- end
34
-
35
- class RetrieveParams < Stripe::RequestParams
36
- # Specifies which fields in the response should be expanded.
37
- attr_accessor :expand
38
-
39
- def initialize(expand: nil)
40
- @expand = expand
41
- end
42
- end
43
-
44
- class UpdateParams < Stripe::RequestParams
45
- class AddInvoiceItem < Stripe::RequestParams
46
- class Discount < Stripe::RequestParams
47
- class DiscountEnd < Stripe::RequestParams
48
- class Duration < Stripe::RequestParams
49
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
50
- attr_accessor :interval
51
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
52
- attr_accessor :interval_count
53
-
54
- def initialize(interval: nil, interval_count: nil)
55
- @interval = interval
56
- @interval_count = interval_count
57
- end
58
- end
59
- # Time span for the redeemed discount.
60
- attr_accessor :duration
61
- # A precise Unix timestamp for the discount to end. Must be in the future.
62
- attr_accessor :timestamp
63
- # The type of calculation made to determine when the discount ends.
64
- attr_accessor :type
65
-
66
- def initialize(duration: nil, timestamp: nil, type: nil)
67
- @duration = duration
68
- @timestamp = timestamp
69
- @type = type
70
- end
71
- end
72
- # ID of the coupon to create a new discount for.
73
- attr_accessor :coupon
74
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
75
- attr_accessor :discount
76
- # Details to determine how long the discount should be applied for.
77
- attr_accessor :discount_end
78
- # ID of the promotion code to create a new discount for.
79
- attr_accessor :promotion_code
80
-
81
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
82
- @coupon = coupon
83
- @discount = discount
84
- @discount_end = discount_end
85
- @promotion_code = promotion_code
86
- end
87
- end
88
-
89
- class Period < Stripe::RequestParams
90
- class End < Stripe::RequestParams
91
- # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
92
- attr_accessor :timestamp
93
- # Select how to calculate the end of the invoice item period.
94
- attr_accessor :type
95
-
96
- def initialize(timestamp: nil, type: nil)
97
- @timestamp = timestamp
98
- @type = type
99
- end
100
- end
101
-
102
- class Start < Stripe::RequestParams
103
- # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
104
- attr_accessor :timestamp
105
- # Select how to calculate the start of the invoice item period.
106
- attr_accessor :type
107
-
108
- def initialize(timestamp: nil, type: nil)
109
- @timestamp = timestamp
110
- @type = type
111
- end
112
- end
113
- # End of the invoice item period.
114
- attr_accessor :end
115
- # Start of the invoice item period.
116
- attr_accessor :start
117
-
118
- def initialize(end_: nil, start: nil)
119
- @end = end_
120
- @start = start
121
- end
122
- end
123
-
124
- class PriceData < Stripe::RequestParams
125
- # 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).
126
- attr_accessor :currency
127
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
128
- attr_accessor :product
129
- # 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.
130
- attr_accessor :tax_behavior
131
- # 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.
132
- attr_accessor :unit_amount
133
- # 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.
134
- attr_accessor :unit_amount_decimal
135
-
136
- def initialize(
137
- currency: nil,
138
- product: nil,
139
- tax_behavior: nil,
140
- unit_amount: nil,
141
- unit_amount_decimal: nil
142
- )
143
- @currency = currency
144
- @product = product
145
- @tax_behavior = tax_behavior
146
- @unit_amount = unit_amount
147
- @unit_amount_decimal = unit_amount_decimal
148
- end
149
- end
150
- # The coupons to redeem into discounts for the item.
151
- attr_accessor :discounts
152
- # 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`.
153
- attr_accessor :metadata
154
- # The period associated with this invoice item. Defaults to the current period of the subscription.
155
- attr_accessor :period
156
- # The ID of the price object. One of `price` or `price_data` is required.
157
- attr_accessor :price
158
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
159
- attr_accessor :price_data
160
- # Quantity for this item. Defaults to 1.
161
- attr_accessor :quantity
162
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
163
- attr_accessor :tax_rates
164
-
165
- def initialize(
166
- discounts: nil,
167
- metadata: nil,
168
- period: nil,
169
- price: nil,
170
- price_data: nil,
171
- quantity: nil,
172
- tax_rates: nil
173
- )
174
- @discounts = discounts
175
- @metadata = metadata
176
- @period = period
177
- @price = price
178
- @price_data = price_data
179
- @quantity = quantity
180
- @tax_rates = tax_rates
181
- end
182
- end
183
-
184
- class AutomaticTax < Stripe::RequestParams
185
- class Liability < Stripe::RequestParams
186
- # The connected account being referenced when `type` is `account`.
187
- attr_accessor :account
188
- # Type of the account referenced in the request.
189
- attr_accessor :type
190
-
191
- def initialize(account: nil, type: nil)
192
- @account = account
193
- @type = type
194
- end
195
- end
196
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
197
- attr_accessor :enabled
198
- # 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.
199
- attr_accessor :liability
200
-
201
- def initialize(enabled: nil, liability: nil)
202
- @enabled = enabled
203
- @liability = liability
204
- end
205
- end
206
-
207
- class BillingThresholds < Stripe::RequestParams
208
- # Monetary threshold that triggers the subscription to advance to a new billing period
209
- attr_accessor :amount_gte
210
- # 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.
211
- attr_accessor :reset_billing_cycle_anchor
212
-
213
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
214
- @amount_gte = amount_gte
215
- @reset_billing_cycle_anchor = reset_billing_cycle_anchor
216
- end
217
- end
218
-
219
- class CancellationDetails < Stripe::RequestParams
220
- # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
221
- attr_accessor :comment
222
- # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
223
- attr_accessor :feedback
224
-
225
- def initialize(comment: nil, feedback: nil)
226
- @comment = comment
227
- @feedback = feedback
228
- end
229
- end
230
-
231
- class Discount < Stripe::RequestParams
232
- class DiscountEnd < Stripe::RequestParams
233
- class Duration < Stripe::RequestParams
234
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
235
- attr_accessor :interval
236
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
237
- attr_accessor :interval_count
238
-
239
- def initialize(interval: nil, interval_count: nil)
240
- @interval = interval
241
- @interval_count = interval_count
242
- end
243
- end
244
- # Time span for the redeemed discount.
245
- attr_accessor :duration
246
- # A precise Unix timestamp for the discount to end. Must be in the future.
247
- attr_accessor :timestamp
248
- # The type of calculation made to determine when the discount ends.
249
- attr_accessor :type
250
-
251
- def initialize(duration: nil, timestamp: nil, type: nil)
252
- @duration = duration
253
- @timestamp = timestamp
254
- @type = type
255
- end
256
- end
257
- # ID of the coupon to create a new discount for.
258
- attr_accessor :coupon
259
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
260
- attr_accessor :discount
261
- # Details to determine how long the discount should be applied for.
262
- attr_accessor :discount_end
263
- # ID of the promotion code to create a new discount for.
264
- attr_accessor :promotion_code
265
-
266
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
267
- @coupon = coupon
268
- @discount = discount
269
- @discount_end = discount_end
270
- @promotion_code = promotion_code
271
- end
272
- end
273
-
274
- class InvoiceSettings < Stripe::RequestParams
275
- class Issuer < Stripe::RequestParams
276
- # The connected account being referenced when `type` is `account`.
277
- attr_accessor :account
278
- # Type of the account referenced in the request.
279
- attr_accessor :type
280
-
281
- def initialize(account: nil, type: nil)
282
- @account = account
283
- @type = type
284
- end
285
- end
286
- # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
287
- attr_accessor :account_tax_ids
288
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
289
- attr_accessor :issuer
290
-
291
- def initialize(account_tax_ids: nil, issuer: nil)
292
- @account_tax_ids = account_tax_ids
293
- @issuer = issuer
294
- end
295
- end
296
-
297
- class Item < Stripe::RequestParams
298
- class BillingThresholds < Stripe::RequestParams
299
- # 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))
300
- attr_accessor :usage_gte
301
-
302
- def initialize(usage_gte: nil)
303
- @usage_gte = usage_gte
304
- end
305
- end
306
-
307
- class Discount < Stripe::RequestParams
308
- class DiscountEnd < Stripe::RequestParams
309
- class Duration < Stripe::RequestParams
310
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
311
- attr_accessor :interval
312
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
313
- attr_accessor :interval_count
314
-
315
- def initialize(interval: nil, interval_count: nil)
316
- @interval = interval
317
- @interval_count = interval_count
318
- end
319
- end
320
- # Time span for the redeemed discount.
321
- attr_accessor :duration
322
- # A precise Unix timestamp for the discount to end. Must be in the future.
323
- attr_accessor :timestamp
324
- # The type of calculation made to determine when the discount ends.
325
- attr_accessor :type
326
-
327
- def initialize(duration: nil, timestamp: nil, type: nil)
328
- @duration = duration
329
- @timestamp = timestamp
330
- @type = type
331
- end
332
- end
333
- # ID of the coupon to create a new discount for.
334
- attr_accessor :coupon
335
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
336
- attr_accessor :discount
337
- # Details to determine how long the discount should be applied for.
338
- attr_accessor :discount_end
339
- # ID of the promotion code to create a new discount for.
340
- attr_accessor :promotion_code
341
-
342
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
343
- @coupon = coupon
344
- @discount = discount
345
- @discount_end = discount_end
346
- @promotion_code = promotion_code
347
- end
348
- end
349
-
350
- class PriceData < Stripe::RequestParams
351
- class Recurring < Stripe::RequestParams
352
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
353
- attr_accessor :interval
354
- # 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).
355
- attr_accessor :interval_count
356
-
357
- def initialize(interval: nil, interval_count: nil)
358
- @interval = interval
359
- @interval_count = interval_count
360
- end
361
- end
362
- # 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).
363
- attr_accessor :currency
364
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
365
- attr_accessor :product
366
- # The recurring components of a price such as `interval` and `interval_count`.
367
- attr_accessor :recurring
368
- # 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.
369
- attr_accessor :tax_behavior
370
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
371
- attr_accessor :unit_amount
372
- # 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.
373
- attr_accessor :unit_amount_decimal
374
-
375
- def initialize(
376
- currency: nil,
377
- product: nil,
378
- recurring: nil,
379
- tax_behavior: nil,
380
- unit_amount: nil,
381
- unit_amount_decimal: nil
382
- )
383
- @currency = currency
384
- @product = product
385
- @recurring = recurring
386
- @tax_behavior = tax_behavior
387
- @unit_amount = unit_amount
388
- @unit_amount_decimal = unit_amount_decimal
389
- end
390
- end
391
- # 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.
392
- attr_accessor :billing_thresholds
393
- # 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.
394
- attr_accessor :clear_usage
395
- # A flag that, if set to `true`, will delete the specified item.
396
- attr_accessor :deleted
397
- # The coupons to redeem into discounts for the subscription item.
398
- attr_accessor :discounts
399
- # Subscription item to update.
400
- attr_accessor :id
401
- # 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`.
402
- attr_accessor :metadata
403
- # Plan ID for this item, as a string.
404
- attr_accessor :plan
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
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
408
- attr_accessor :price_data
409
- # Quantity for this item.
410
- attr_accessor :quantity
411
- # 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.
412
- attr_accessor :tax_rates
413
-
414
- def initialize(
415
- billing_thresholds: nil,
416
- clear_usage: nil,
417
- deleted: nil,
418
- discounts: nil,
419
- id: nil,
420
- metadata: nil,
421
- plan: nil,
422
- price: nil,
423
- price_data: nil,
424
- quantity: nil,
425
- tax_rates: nil
426
- )
427
- @billing_thresholds = billing_thresholds
428
- @clear_usage = clear_usage
429
- @deleted = deleted
430
- @discounts = discounts
431
- @id = id
432
- @metadata = metadata
433
- @plan = plan
434
- @price = price
435
- @price_data = price_data
436
- @quantity = quantity
437
- @tax_rates = tax_rates
438
- end
439
- end
440
-
441
- class PauseCollection < Stripe::RequestParams
442
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
443
- attr_accessor :behavior
444
- # The time after which the subscription will resume collecting payments.
445
- attr_accessor :resumes_at
446
-
447
- def initialize(behavior: nil, resumes_at: nil)
448
- @behavior = behavior
449
- @resumes_at = resumes_at
450
- end
451
- end
452
-
453
- class PaymentSettings < Stripe::RequestParams
454
- class PaymentMethodOptions < Stripe::RequestParams
455
- class AcssDebit < Stripe::RequestParams
456
- class MandateOptions < Stripe::RequestParams
457
- # Transaction type of the mandate.
458
- attr_accessor :transaction_type
459
-
460
- def initialize(transaction_type: nil)
461
- @transaction_type = transaction_type
462
- end
463
- end
464
- # Additional fields for Mandate creation
465
- attr_accessor :mandate_options
466
- # Verification method for the intent
467
- attr_accessor :verification_method
468
-
469
- def initialize(mandate_options: nil, verification_method: nil)
470
- @mandate_options = mandate_options
471
- @verification_method = verification_method
472
- end
473
- end
474
-
475
- class Bancontact < Stripe::RequestParams
476
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
477
- attr_accessor :preferred_language
478
-
479
- def initialize(preferred_language: nil)
480
- @preferred_language = preferred_language
481
- end
482
- end
483
-
484
- class Card < Stripe::RequestParams
485
- class MandateOptions < Stripe::RequestParams
486
- # Amount to be charged for future payments.
487
- attr_accessor :amount
488
- # 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.
489
- attr_accessor :amount_type
490
- # A description of the mandate or subscription that is meant to be displayed to the customer.
491
- attr_accessor :description
492
-
493
- def initialize(amount: nil, amount_type: nil, description: nil)
494
- @amount = amount
495
- @amount_type = amount_type
496
- @description = description
497
- end
498
- end
499
- # Configuration options for setting up an eMandate for cards issued in India.
500
- attr_accessor :mandate_options
501
- # 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.
502
- attr_accessor :network
503
- # 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.
504
- attr_accessor :request_three_d_secure
505
-
506
- def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil)
507
- @mandate_options = mandate_options
508
- @network = network
509
- @request_three_d_secure = request_three_d_secure
510
- end
511
- end
512
-
513
- class CustomerBalance < Stripe::RequestParams
514
- class BankTransfer < Stripe::RequestParams
515
- class EuBankTransfer < Stripe::RequestParams
516
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
517
- attr_accessor :country
518
-
519
- def initialize(country: nil)
520
- @country = country
521
- end
522
- end
523
- # Configuration for eu_bank_transfer funding type.
524
- attr_accessor :eu_bank_transfer
525
- # 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`.
526
- attr_accessor :type
527
-
528
- def initialize(eu_bank_transfer: nil, type: nil)
529
- @eu_bank_transfer = eu_bank_transfer
530
- @type = type
531
- end
532
- end
533
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
534
- attr_accessor :bank_transfer
535
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
536
- attr_accessor :funding_type
537
-
538
- def initialize(bank_transfer: nil, funding_type: nil)
539
- @bank_transfer = bank_transfer
540
- @funding_type = funding_type
541
- end
542
- end
543
-
544
- class IdBankTransfer < Stripe::RequestParams; end
545
- class Konbini < Stripe::RequestParams; end
546
- class SepaDebit < Stripe::RequestParams; end
547
-
548
- class Upi < Stripe::RequestParams
549
- class MandateOptions < Stripe::RequestParams
550
- # Amount to be charged for future payments.
551
- attr_accessor :amount
552
- # 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.
553
- attr_accessor :amount_type
554
- # A description of the mandate or subscription that is meant to be displayed to the customer.
555
- attr_accessor :description
556
- # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
557
- attr_accessor :end_date
558
-
559
- def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
560
- @amount = amount
561
- @amount_type = amount_type
562
- @description = description
563
- @end_date = end_date
564
- end
565
- end
566
- # Configuration options for setting up an eMandate
567
- attr_accessor :mandate_options
568
-
569
- def initialize(mandate_options: nil)
570
- @mandate_options = mandate_options
571
- end
572
- end
573
-
574
- class UsBankAccount < Stripe::RequestParams
575
- class FinancialConnections < Stripe::RequestParams
576
- class Filters < Stripe::RequestParams
577
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
578
- attr_accessor :account_subcategories
579
- # ID of the institution to use to filter for selectable accounts.
580
- attr_accessor :institution
581
-
582
- def initialize(account_subcategories: nil, institution: nil)
583
- @account_subcategories = account_subcategories
584
- @institution = institution
585
- end
586
- end
587
- # Provide filters for the linked accounts that the customer can select for the payment method.
588
- attr_accessor :filters
589
- # 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`.
590
- attr_accessor :permissions
591
- # List of data features that you would like to retrieve upon account creation.
592
- attr_accessor :prefetch
593
-
594
- def initialize(filters: nil, permissions: nil, prefetch: nil)
595
- @filters = filters
596
- @permissions = permissions
597
- @prefetch = prefetch
598
- end
599
- end
600
- # Additional fields for Financial Connections Session creation
601
- attr_accessor :financial_connections
602
- # Verification method for the intent
603
- attr_accessor :verification_method
604
-
605
- def initialize(financial_connections: nil, verification_method: nil)
606
- @financial_connections = financial_connections
607
- @verification_method = verification_method
608
- end
609
- end
610
- # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
611
- attr_accessor :acss_debit
612
- # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
613
- attr_accessor :bancontact
614
- # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
615
- attr_accessor :card
616
- # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
617
- attr_accessor :customer_balance
618
- # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
619
- attr_accessor :id_bank_transfer
620
- # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
621
- attr_accessor :konbini
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
- # This sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
625
- attr_accessor :upi
626
- # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
627
- attr_accessor :us_bank_account
628
-
629
- def initialize(
630
- acss_debit: nil,
631
- bancontact: nil,
632
- card: nil,
633
- customer_balance: nil,
634
- id_bank_transfer: nil,
635
- konbini: nil,
636
- sepa_debit: nil,
637
- upi: nil,
638
- us_bank_account: nil
639
- )
640
- @acss_debit = acss_debit
641
- @bancontact = bancontact
642
- @card = card
643
- @customer_balance = customer_balance
644
- @id_bank_transfer = id_bank_transfer
645
- @konbini = konbini
646
- @sepa_debit = sepa_debit
647
- @upi = upi
648
- @us_bank_account = us_bank_account
649
- end
650
- end
651
- # Payment-method-specific configuration to provide to invoices created by the subscription.
652
- attr_accessor :payment_method_options
653
- # 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
654
- attr_accessor :payment_method_types
655
- # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
656
- attr_accessor :save_default_payment_method
657
-
658
- def initialize(
659
- payment_method_options: nil,
660
- payment_method_types: nil,
661
- save_default_payment_method: nil
662
- )
663
- @payment_method_options = payment_method_options
664
- @payment_method_types = payment_method_types
665
- @save_default_payment_method = save_default_payment_method
666
- end
667
- end
668
-
669
- class PendingInvoiceItemInterval < Stripe::RequestParams
670
- # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
671
- attr_accessor :interval
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
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
685
- attr_accessor :update_behavior
686
-
687
- def initialize(iterations: nil, update_behavior: nil)
688
- @iterations = iterations
689
- @update_behavior = update_behavior
690
- end
691
- end
692
-
693
- class TransferData < Stripe::RequestParams
694
- # 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.
695
- attr_accessor :amount_percent
696
- # ID of an existing, connected Stripe account.
697
- attr_accessor :destination
698
-
699
- def initialize(amount_percent: nil, destination: nil)
700
- @amount_percent = amount_percent
701
- @destination = destination
702
- end
703
- end
704
-
705
- class TrialSettings < Stripe::RequestParams
706
- class EndBehavior < Stripe::RequestParams
707
- # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
708
- attr_accessor :missing_payment_method
709
-
710
- def initialize(missing_payment_method: nil)
711
- @missing_payment_method = missing_payment_method
712
- end
713
- end
714
- # Defines how the subscription should behave when the user's free trial ends.
715
- attr_accessor :end_behavior
716
-
717
- def initialize(end_behavior: nil)
718
- @end_behavior = end_behavior
719
- end
720
- end
721
- # 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.
722
- attr_accessor :add_invoice_items
723
- # 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).
724
- attr_accessor :application_fee_percent
725
- # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
726
- attr_accessor :automatic_tax
727
- # 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).
728
- attr_accessor :billing_cycle_anchor
729
- # 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.
730
- attr_accessor :billing_thresholds
731
- # 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.
732
- attr_accessor :cancel_at
733
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
734
- attr_accessor :cancel_at_period_end
735
- # Details about why this subscription was cancelled
736
- attr_accessor :cancellation_details
737
- # 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`.
738
- attr_accessor :collection_method
739
- # 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`.
740
- attr_accessor :days_until_due
741
- # 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).
742
- attr_accessor :default_payment_method
743
- # 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).
744
- attr_accessor :default_source
745
- # 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.
746
- attr_accessor :default_tax_rates
747
- # 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.
748
- attr_accessor :description
749
- # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
750
- attr_accessor :discounts
751
- # Specifies which fields in the response should be expanded.
752
- attr_accessor :expand
753
- # All invoices will be billed using the specified settings.
754
- attr_accessor :invoice_settings
755
- # A list of up to 20 subscription items, each with an attached price.
756
- attr_accessor :items
757
- # 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`.
758
- attr_accessor :metadata
759
- # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
760
- attr_accessor :off_session
761
- # The account on behalf of which to charge, for each of the subscription's invoices.
762
- attr_accessor :on_behalf_of
763
- # 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).
764
- attr_accessor :pause_collection
765
- # 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.
766
- #
767
- # 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.
768
- #
769
- # 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).
770
- #
771
- # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more.
772
- attr_accessor :payment_behavior
773
- # Payment settings to pass to invoices created by the subscription.
774
- attr_accessor :payment_settings
775
- # 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.
776
- attr_accessor :pending_invoice_item_interval
777
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
778
- attr_accessor :prebilling
779
- # 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`.
780
- attr_accessor :proration_behavior
781
- # If set, prorations will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. `proration_date` can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.
782
- attr_accessor :proration_date
783
- # 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.
784
- attr_accessor :transfer_data
785
- # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, `trial_end` will override the default trial period of the plan the customer is being subscribed to. The `billing_cycle_anchor` will be updated to the `trial_end` value. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`.
786
- attr_accessor :trial_end
787
- # 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.
788
- attr_accessor :trial_from_plan
789
- # Settings related to subscription trials.
790
- attr_accessor :trial_settings
791
-
792
- def initialize(
793
- add_invoice_items: nil,
794
- application_fee_percent: nil,
795
- automatic_tax: nil,
796
- billing_cycle_anchor: nil,
797
- billing_thresholds: nil,
798
- cancel_at: nil,
799
- cancel_at_period_end: nil,
800
- cancellation_details: nil,
801
- collection_method: nil,
802
- days_until_due: nil,
803
- default_payment_method: nil,
804
- default_source: nil,
805
- default_tax_rates: nil,
806
- description: nil,
807
- discounts: nil,
808
- expand: nil,
809
- invoice_settings: nil,
810
- items: nil,
811
- metadata: nil,
812
- off_session: nil,
813
- on_behalf_of: nil,
814
- pause_collection: nil,
815
- payment_behavior: nil,
816
- payment_settings: nil,
817
- pending_invoice_item_interval: nil,
818
- prebilling: nil,
819
- proration_behavior: nil,
820
- proration_date: nil,
821
- transfer_data: nil,
822
- trial_end: nil,
823
- trial_from_plan: nil,
824
- trial_settings: nil
825
- )
826
- @add_invoice_items = add_invoice_items
827
- @application_fee_percent = application_fee_percent
828
- @automatic_tax = automatic_tax
829
- @billing_cycle_anchor = billing_cycle_anchor
830
- @billing_thresholds = billing_thresholds
831
- @cancel_at = cancel_at
832
- @cancel_at_period_end = cancel_at_period_end
833
- @cancellation_details = cancellation_details
834
- @collection_method = collection_method
835
- @days_until_due = days_until_due
836
- @default_payment_method = default_payment_method
837
- @default_source = default_source
838
- @default_tax_rates = default_tax_rates
839
- @description = description
840
- @discounts = discounts
841
- @expand = expand
842
- @invoice_settings = invoice_settings
843
- @items = items
844
- @metadata = metadata
845
- @off_session = off_session
846
- @on_behalf_of = on_behalf_of
847
- @pause_collection = pause_collection
848
- @payment_behavior = payment_behavior
849
- @payment_settings = payment_settings
850
- @pending_invoice_item_interval = pending_invoice_item_interval
851
- @prebilling = prebilling
852
- @proration_behavior = proration_behavior
853
- @proration_date = proration_date
854
- @transfer_data = transfer_data
855
- @trial_end = trial_end
856
- @trial_from_plan = trial_from_plan
857
- @trial_settings = trial_settings
858
- end
859
- end
860
-
861
- class DeleteDiscountParams < Stripe::RequestParams; end
862
-
863
- class ListParams < Stripe::RequestParams
864
- class AutomaticTax < Stripe::RequestParams
865
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
866
- attr_accessor :enabled
867
-
868
- def initialize(enabled: nil)
869
- @enabled = enabled
870
- end
871
- end
872
-
873
- class Created < Stripe::RequestParams
874
- # Minimum value to filter by (exclusive)
875
- attr_accessor :gt
876
- # Minimum value to filter by (inclusive)
877
- attr_accessor :gte
878
- # Maximum value to filter by (exclusive)
879
- attr_accessor :lt
880
- # Maximum value to filter by (inclusive)
881
- attr_accessor :lte
882
-
883
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
884
- @gt = gt
885
- @gte = gte
886
- @lt = lt
887
- @lte = lte
888
- end
889
- end
890
-
891
- class CurrentPeriodEnd < Stripe::RequestParams
892
- # Minimum value to filter by (exclusive)
893
- attr_accessor :gt
894
- # Minimum value to filter by (inclusive)
895
- attr_accessor :gte
896
- # Maximum value to filter by (exclusive)
897
- attr_accessor :lt
898
- # Maximum value to filter by (inclusive)
899
- attr_accessor :lte
900
-
901
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
902
- @gt = gt
903
- @gte = gte
904
- @lt = lt
905
- @lte = lte
906
- end
907
- end
908
-
909
- class CurrentPeriodStart < Stripe::RequestParams
910
- # Minimum value to filter by (exclusive)
911
- attr_accessor :gt
912
- # Minimum value to filter by (inclusive)
913
- attr_accessor :gte
914
- # Maximum value to filter by (exclusive)
915
- attr_accessor :lt
916
- # Maximum value to filter by (inclusive)
917
- attr_accessor :lte
918
-
919
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
920
- @gt = gt
921
- @gte = gte
922
- @lt = lt
923
- @lte = lte
924
- end
925
- end
926
- # Filter subscriptions by their automatic tax settings.
927
- attr_accessor :automatic_tax
928
- # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`.
929
- attr_accessor :collection_method
930
- # Only return subscriptions that were created during the given date interval.
931
- attr_accessor :created
932
- # Only return subscriptions whose minimum item current_period_end falls within the given date interval.
933
- attr_accessor :current_period_end
934
- # Only return subscriptions whose maximum item current_period_start falls within the given date interval.
935
- attr_accessor :current_period_start
936
- # The ID of the customer whose subscriptions will be retrieved.
937
- attr_accessor :customer
938
- # The ID of the account whose subscriptions will be retrieved.
939
- attr_accessor :customer_account
940
- # 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.
941
- attr_accessor :ending_before
942
- # Specifies which fields in the response should be expanded.
943
- attr_accessor :expand
944
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
945
- attr_accessor :limit
946
- # The ID of the plan whose subscriptions will be retrieved.
947
- attr_accessor :plan
948
- # Filter for subscriptions that contain this recurring price ID.
949
- attr_accessor :price
950
- # 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.
951
- attr_accessor :starting_after
952
- # 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.
953
- attr_accessor :status
954
- # 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.
955
- attr_accessor :test_clock
956
-
957
- def initialize(
958
- automatic_tax: nil,
959
- collection_method: nil,
960
- created: nil,
961
- current_period_end: nil,
962
- current_period_start: nil,
963
- customer: nil,
964
- customer_account: nil,
965
- ending_before: nil,
966
- expand: nil,
967
- limit: nil,
968
- plan: nil,
969
- price: nil,
970
- starting_after: nil,
971
- status: nil,
972
- test_clock: nil
973
- )
974
- @automatic_tax = automatic_tax
975
- @collection_method = collection_method
976
- @created = created
977
- @current_period_end = current_period_end
978
- @current_period_start = current_period_start
979
- @customer = customer
980
- @customer_account = customer_account
981
- @ending_before = ending_before
982
- @expand = expand
983
- @limit = limit
984
- @plan = plan
985
- @price = price
986
- @starting_after = starting_after
987
- @status = status
988
- @test_clock = test_clock
989
- end
990
- end
991
-
992
- class CreateParams < Stripe::RequestParams
993
- class AddInvoiceItem < Stripe::RequestParams
994
- class Discount < Stripe::RequestParams
995
- class DiscountEnd < Stripe::RequestParams
996
- class Duration < Stripe::RequestParams
997
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
998
- attr_accessor :interval
999
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1000
- attr_accessor :interval_count
1001
-
1002
- def initialize(interval: nil, interval_count: nil)
1003
- @interval = interval
1004
- @interval_count = interval_count
1005
- end
1006
- end
1007
- # Time span for the redeemed discount.
1008
- attr_accessor :duration
1009
- # A precise Unix timestamp for the discount to end. Must be in the future.
1010
- attr_accessor :timestamp
1011
- # The type of calculation made to determine when the discount ends.
1012
- attr_accessor :type
1013
-
1014
- def initialize(duration: nil, timestamp: nil, type: nil)
1015
- @duration = duration
1016
- @timestamp = timestamp
1017
- @type = type
1018
- end
1019
- end
1020
- # ID of the coupon to create a new discount for.
1021
- attr_accessor :coupon
1022
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1023
- attr_accessor :discount
1024
- # Details to determine how long the discount should be applied for.
1025
- attr_accessor :discount_end
1026
- # ID of the promotion code to create a new discount for.
1027
- attr_accessor :promotion_code
1028
-
1029
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1030
- @coupon = coupon
1031
- @discount = discount
1032
- @discount_end = discount_end
1033
- @promotion_code = promotion_code
1034
- end
1035
- end
1036
-
1037
- class Period < Stripe::RequestParams
1038
- class End < Stripe::RequestParams
1039
- # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
1040
- attr_accessor :timestamp
1041
- # Select how to calculate the end of the invoice item period.
1042
- attr_accessor :type
1043
-
1044
- def initialize(timestamp: nil, type: nil)
1045
- @timestamp = timestamp
1046
- @type = type
1047
- end
1048
- end
1049
-
1050
- class Start < Stripe::RequestParams
1051
- # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
1052
- attr_accessor :timestamp
1053
- # Select how to calculate the start of the invoice item period.
1054
- attr_accessor :type
1055
-
1056
- def initialize(timestamp: nil, type: nil)
1057
- @timestamp = timestamp
1058
- @type = type
1059
- end
1060
- end
1061
- # End of the invoice item period.
1062
- attr_accessor :end
1063
- # Start of the invoice item period.
1064
- attr_accessor :start
1065
-
1066
- def initialize(end_: nil, start: nil)
1067
- @end = end_
1068
- @start = start
1069
- end
1070
- end
1071
-
1072
- class PriceData < Stripe::RequestParams
1073
- # 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).
1074
- attr_accessor :currency
1075
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1076
- attr_accessor :product
1077
- # 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.
1078
- attr_accessor :tax_behavior
1079
- # 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.
1080
- attr_accessor :unit_amount
1081
- # 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.
1082
- attr_accessor :unit_amount_decimal
1083
-
1084
- def initialize(
1085
- currency: nil,
1086
- product: nil,
1087
- tax_behavior: nil,
1088
- unit_amount: nil,
1089
- unit_amount_decimal: nil
1090
- )
1091
- @currency = currency
1092
- @product = product
1093
- @tax_behavior = tax_behavior
1094
- @unit_amount = unit_amount
1095
- @unit_amount_decimal = unit_amount_decimal
1096
- end
1097
- end
1098
- # The coupons to redeem into discounts for the item.
1099
- attr_accessor :discounts
1100
- # 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`.
1101
- attr_accessor :metadata
1102
- # The period associated with this invoice item. Defaults to the current period of the subscription.
1103
- attr_accessor :period
1104
- # The ID of the price object. One of `price` or `price_data` is required.
1105
- attr_accessor :price
1106
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1107
- attr_accessor :price_data
1108
- # Quantity for this item. Defaults to 1.
1109
- attr_accessor :quantity
1110
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
1111
- attr_accessor :tax_rates
1112
-
1113
- def initialize(
1114
- discounts: nil,
1115
- metadata: nil,
1116
- period: nil,
1117
- price: nil,
1118
- price_data: nil,
1119
- quantity: nil,
1120
- tax_rates: nil
1121
- )
1122
- @discounts = discounts
1123
- @metadata = metadata
1124
- @period = period
1125
- @price = price
1126
- @price_data = price_data
1127
- @quantity = quantity
1128
- @tax_rates = tax_rates
1129
- end
1130
- end
1131
-
1132
- class AutomaticTax < Stripe::RequestParams
1133
- class Liability < Stripe::RequestParams
1134
- # The connected account being referenced when `type` is `account`.
1135
- attr_accessor :account
1136
- # Type of the account referenced in the request.
1137
- attr_accessor :type
1138
-
1139
- def initialize(account: nil, type: nil)
1140
- @account = account
1141
- @type = type
1142
- end
1143
- end
1144
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1145
- attr_accessor :enabled
1146
- # 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.
1147
- attr_accessor :liability
1148
-
1149
- def initialize(enabled: nil, liability: nil)
1150
- @enabled = enabled
1151
- @liability = liability
1152
- end
1153
- end
1154
-
1155
- class BillingCycleAnchorConfig < Stripe::RequestParams
1156
- # The day of the month the anchor should be. Ranges from 1 to 31.
1157
- attr_accessor :day_of_month
1158
- # The hour of the day the anchor should be. Ranges from 0 to 23.
1159
- attr_accessor :hour
1160
- # The minute of the hour the anchor should be. Ranges from 0 to 59.
1161
- attr_accessor :minute
1162
- # The month to start full cycle periods. Ranges from 1 to 12.
1163
- attr_accessor :month
1164
- # The second of the minute the anchor should be. Ranges from 0 to 59.
1165
- attr_accessor :second
1166
-
1167
- def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil)
1168
- @day_of_month = day_of_month
1169
- @hour = hour
1170
- @minute = minute
1171
- @month = month
1172
- @second = second
1173
- end
1174
- end
1175
-
1176
- class BillingMode < Stripe::RequestParams
1177
- # Controls the calculation and orchestration of prorations and invoices for subscriptions.
1178
- attr_accessor :type
1179
-
1180
- def initialize(type: nil)
1181
- @type = type
1182
- end
1183
- end
1184
-
1185
- class BillingThresholds < Stripe::RequestParams
1186
- # Monetary threshold that triggers the subscription to advance to a new billing period
1187
- attr_accessor :amount_gte
1188
- # 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.
1189
- attr_accessor :reset_billing_cycle_anchor
1190
-
1191
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
1192
- @amount_gte = amount_gte
1193
- @reset_billing_cycle_anchor = reset_billing_cycle_anchor
1194
- end
1195
- end
1196
-
1197
- class Discount < Stripe::RequestParams
1198
- class DiscountEnd < Stripe::RequestParams
1199
- class Duration < Stripe::RequestParams
1200
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1201
- attr_accessor :interval
1202
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1203
- attr_accessor :interval_count
1204
-
1205
- def initialize(interval: nil, interval_count: nil)
1206
- @interval = interval
1207
- @interval_count = interval_count
1208
- end
1209
- end
1210
- # Time span for the redeemed discount.
1211
- attr_accessor :duration
1212
- # A precise Unix timestamp for the discount to end. Must be in the future.
1213
- attr_accessor :timestamp
1214
- # The type of calculation made to determine when the discount ends.
1215
- attr_accessor :type
1216
-
1217
- def initialize(duration: nil, timestamp: nil, type: nil)
1218
- @duration = duration
1219
- @timestamp = timestamp
1220
- @type = type
1221
- end
1222
- end
1223
- # ID of the coupon to create a new discount for.
1224
- attr_accessor :coupon
1225
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1226
- attr_accessor :discount
1227
- # Details to determine how long the discount should be applied for.
1228
- attr_accessor :discount_end
1229
- # ID of the promotion code to create a new discount for.
1230
- attr_accessor :promotion_code
1231
-
1232
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1233
- @coupon = coupon
1234
- @discount = discount
1235
- @discount_end = discount_end
1236
- @promotion_code = promotion_code
1237
- end
1238
- end
1239
-
1240
- class InvoiceSettings < Stripe::RequestParams
1241
- class Issuer < Stripe::RequestParams
1242
- # The connected account being referenced when `type` is `account`.
1243
- attr_accessor :account
1244
- # Type of the account referenced in the request.
1245
- attr_accessor :type
1246
-
1247
- def initialize(account: nil, type: nil)
1248
- @account = account
1249
- @type = type
1250
- end
1251
- end
1252
- # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
1253
- attr_accessor :account_tax_ids
1254
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1255
- attr_accessor :issuer
1256
-
1257
- def initialize(account_tax_ids: nil, issuer: nil)
1258
- @account_tax_ids = account_tax_ids
1259
- @issuer = issuer
1260
- end
1261
- end
1262
-
1263
- class Item < Stripe::RequestParams
1264
- class BillingThresholds < Stripe::RequestParams
1265
- # 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))
1266
- attr_accessor :usage_gte
1267
-
1268
- def initialize(usage_gte: nil)
1269
- @usage_gte = usage_gte
1270
- end
1271
- end
1272
-
1273
- class Discount < Stripe::RequestParams
1274
- class DiscountEnd < Stripe::RequestParams
1275
- class Duration < Stripe::RequestParams
1276
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1277
- attr_accessor :interval
1278
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1279
- attr_accessor :interval_count
1280
-
1281
- def initialize(interval: nil, interval_count: nil)
1282
- @interval = interval
1283
- @interval_count = interval_count
1284
- end
1285
- end
1286
- # Time span for the redeemed discount.
1287
- attr_accessor :duration
1288
- # A precise Unix timestamp for the discount to end. Must be in the future.
1289
- attr_accessor :timestamp
1290
- # The type of calculation made to determine when the discount ends.
1291
- attr_accessor :type
1292
-
1293
- def initialize(duration: nil, timestamp: nil, type: nil)
1294
- @duration = duration
1295
- @timestamp = timestamp
1296
- @type = type
1297
- end
1298
- end
1299
- # ID of the coupon to create a new discount for.
1300
- attr_accessor :coupon
1301
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1302
- attr_accessor :discount
1303
- # Details to determine how long the discount should be applied for.
1304
- attr_accessor :discount_end
1305
- # ID of the promotion code to create a new discount for.
1306
- attr_accessor :promotion_code
1307
-
1308
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1309
- @coupon = coupon
1310
- @discount = discount
1311
- @discount_end = discount_end
1312
- @promotion_code = promotion_code
1313
- end
1314
- end
1315
-
1316
- class PriceData < Stripe::RequestParams
1317
- class Recurring < Stripe::RequestParams
1318
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1319
- attr_accessor :interval
1320
- # 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).
1321
- attr_accessor :interval_count
1322
-
1323
- def initialize(interval: nil, interval_count: nil)
1324
- @interval = interval
1325
- @interval_count = interval_count
1326
- end
1327
- end
1328
- # 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).
1329
- attr_accessor :currency
1330
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1331
- attr_accessor :product
1332
- # The recurring components of a price such as `interval` and `interval_count`.
1333
- attr_accessor :recurring
1334
- # 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.
1335
- attr_accessor :tax_behavior
1336
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1337
- attr_accessor :unit_amount
1338
- # 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.
1339
- attr_accessor :unit_amount_decimal
1340
-
1341
- def initialize(
1342
- currency: nil,
1343
- product: nil,
1344
- recurring: nil,
1345
- tax_behavior: nil,
1346
- unit_amount: nil,
1347
- unit_amount_decimal: nil
1348
- )
1349
- @currency = currency
1350
- @product = product
1351
- @recurring = recurring
1352
- @tax_behavior = tax_behavior
1353
- @unit_amount = unit_amount
1354
- @unit_amount_decimal = unit_amount_decimal
1355
- end
1356
- end
1357
-
1358
- class Trial < Stripe::RequestParams
1359
- # 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.
1360
- attr_accessor :converts_to
1361
- # Determines the type of trial for this item.
1362
- attr_accessor :type
1363
-
1364
- def initialize(converts_to: nil, type: nil)
1365
- @converts_to = converts_to
1366
- @type = type
1367
- end
1368
- end
1369
- # 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.
1370
- attr_accessor :billing_thresholds
1371
- # The coupons to redeem into discounts for the subscription item.
1372
- attr_accessor :discounts
1373
- # 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`.
1374
- attr_accessor :metadata
1375
- # Plan ID for this item, as a string.
1376
- attr_accessor :plan
1377
- # The ID of the price object.
1378
- attr_accessor :price
1379
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1380
- attr_accessor :price_data
1381
- # Quantity for this item.
1382
- attr_accessor :quantity
1383
- # 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.
1384
- attr_accessor :tax_rates
1385
- # Define options to configure the trial on the subscription item.
1386
- attr_accessor :trial
1387
-
1388
- def initialize(
1389
- billing_thresholds: nil,
1390
- discounts: nil,
1391
- metadata: nil,
1392
- plan: nil,
1393
- price: nil,
1394
- price_data: nil,
1395
- quantity: nil,
1396
- tax_rates: nil,
1397
- trial: nil
1398
- )
1399
- @billing_thresholds = billing_thresholds
1400
- @discounts = discounts
1401
- @metadata = metadata
1402
- @plan = plan
1403
- @price = price
1404
- @price_data = price_data
1405
- @quantity = quantity
1406
- @tax_rates = tax_rates
1407
- @trial = trial
1408
- end
1409
- end
1410
-
1411
- class PaymentSettings < Stripe::RequestParams
1412
- class PaymentMethodOptions < Stripe::RequestParams
1413
- class AcssDebit < Stripe::RequestParams
1414
- class MandateOptions < Stripe::RequestParams
1415
- # Transaction type of the mandate.
1416
- attr_accessor :transaction_type
1417
-
1418
- def initialize(transaction_type: nil)
1419
- @transaction_type = transaction_type
1420
- end
1421
- end
1422
- # Additional fields for Mandate creation
1423
- attr_accessor :mandate_options
1424
- # Verification method for the intent
1425
- attr_accessor :verification_method
1426
-
1427
- def initialize(mandate_options: nil, verification_method: nil)
1428
- @mandate_options = mandate_options
1429
- @verification_method = verification_method
1430
- end
1431
- end
1432
-
1433
- class Bancontact < Stripe::RequestParams
1434
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
1435
- attr_accessor :preferred_language
1436
-
1437
- def initialize(preferred_language: nil)
1438
- @preferred_language = preferred_language
1439
- end
1440
- end
1441
-
1442
- class Card < Stripe::RequestParams
1443
- class MandateOptions < Stripe::RequestParams
1444
- # Amount to be charged for future payments.
1445
- attr_accessor :amount
1446
- # 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.
1447
- attr_accessor :amount_type
1448
- # A description of the mandate or subscription that is meant to be displayed to the customer.
1449
- attr_accessor :description
1450
-
1451
- def initialize(amount: nil, amount_type: nil, description: nil)
1452
- @amount = amount
1453
- @amount_type = amount_type
1454
- @description = description
1455
- end
1456
- end
1457
- # Configuration options for setting up an eMandate for cards issued in India.
1458
- attr_accessor :mandate_options
1459
- # 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.
1460
- attr_accessor :network
1461
- # 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.
1462
- attr_accessor :request_three_d_secure
1463
-
1464
- def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil)
1465
- @mandate_options = mandate_options
1466
- @network = network
1467
- @request_three_d_secure = request_three_d_secure
1468
- end
1469
- end
1470
-
1471
- class CustomerBalance < Stripe::RequestParams
1472
- class BankTransfer < Stripe::RequestParams
1473
- class EuBankTransfer < Stripe::RequestParams
1474
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
1475
- attr_accessor :country
1476
-
1477
- def initialize(country: nil)
1478
- @country = country
1479
- end
1480
- end
1481
- # Configuration for eu_bank_transfer funding type.
1482
- attr_accessor :eu_bank_transfer
1483
- # 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`.
1484
- attr_accessor :type
1485
-
1486
- def initialize(eu_bank_transfer: nil, type: nil)
1487
- @eu_bank_transfer = eu_bank_transfer
1488
- @type = type
1489
- end
1490
- end
1491
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
1492
- attr_accessor :bank_transfer
1493
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
1494
- attr_accessor :funding_type
1495
-
1496
- def initialize(bank_transfer: nil, funding_type: nil)
1497
- @bank_transfer = bank_transfer
1498
- @funding_type = funding_type
1499
- end
1500
- end
1501
-
1502
- class IdBankTransfer < Stripe::RequestParams; end
1503
- class Konbini < Stripe::RequestParams; end
1504
- class SepaDebit < Stripe::RequestParams; end
1505
-
1506
- class Upi < Stripe::RequestParams
1507
- class MandateOptions < Stripe::RequestParams
1508
- # Amount to be charged for future payments.
1509
- attr_accessor :amount
1510
- # 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.
1511
- attr_accessor :amount_type
1512
- # A description of the mandate or subscription that is meant to be displayed to the customer.
1513
- attr_accessor :description
1514
- # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
1515
- attr_accessor :end_date
1516
-
1517
- def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
1518
- @amount = amount
1519
- @amount_type = amount_type
1520
- @description = description
1521
- @end_date = end_date
1522
- end
1523
- end
1524
- # Configuration options for setting up an eMandate
1525
- attr_accessor :mandate_options
1526
-
1527
- def initialize(mandate_options: nil)
1528
- @mandate_options = mandate_options
1529
- end
1530
- end
1531
-
1532
- class UsBankAccount < Stripe::RequestParams
1533
- class FinancialConnections < Stripe::RequestParams
1534
- class Filters < Stripe::RequestParams
1535
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1536
- attr_accessor :account_subcategories
1537
- # ID of the institution to use to filter for selectable accounts.
1538
- attr_accessor :institution
1539
-
1540
- def initialize(account_subcategories: nil, institution: nil)
1541
- @account_subcategories = account_subcategories
1542
- @institution = institution
1543
- end
1544
- end
1545
- # Provide filters for the linked accounts that the customer can select for the payment method.
1546
- attr_accessor :filters
1547
- # 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`.
1548
- attr_accessor :permissions
1549
- # List of data features that you would like to retrieve upon account creation.
1550
- attr_accessor :prefetch
1551
-
1552
- def initialize(filters: nil, permissions: nil, prefetch: nil)
1553
- @filters = filters
1554
- @permissions = permissions
1555
- @prefetch = prefetch
1556
- end
1557
- end
1558
- # Additional fields for Financial Connections Session creation
1559
- attr_accessor :financial_connections
1560
- # Verification method for the intent
1561
- attr_accessor :verification_method
1562
-
1563
- def initialize(financial_connections: nil, verification_method: nil)
1564
- @financial_connections = financial_connections
1565
- @verification_method = verification_method
1566
- end
1567
- end
1568
- # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
1569
- attr_accessor :acss_debit
1570
- # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
1571
- attr_accessor :bancontact
1572
- # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
1573
- attr_accessor :card
1574
- # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
1575
- attr_accessor :customer_balance
1576
- # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
1577
- attr_accessor :id_bank_transfer
1578
- # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
1579
- attr_accessor :konbini
1580
- # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
1581
- attr_accessor :sepa_debit
1582
- # This sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
1583
- attr_accessor :upi
1584
- # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
1585
- attr_accessor :us_bank_account
1586
-
1587
- def initialize(
1588
- acss_debit: nil,
1589
- bancontact: nil,
1590
- card: nil,
1591
- customer_balance: nil,
1592
- id_bank_transfer: nil,
1593
- konbini: nil,
1594
- sepa_debit: nil,
1595
- upi: nil,
1596
- us_bank_account: nil
1597
- )
1598
- @acss_debit = acss_debit
1599
- @bancontact = bancontact
1600
- @card = card
1601
- @customer_balance = customer_balance
1602
- @id_bank_transfer = id_bank_transfer
1603
- @konbini = konbini
1604
- @sepa_debit = sepa_debit
1605
- @upi = upi
1606
- @us_bank_account = us_bank_account
1607
- end
1608
- end
1609
- # Payment-method-specific configuration to provide to invoices created by the subscription.
1610
- attr_accessor :payment_method_options
1611
- # 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
1612
- attr_accessor :payment_method_types
1613
- # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
1614
- attr_accessor :save_default_payment_method
1615
-
1616
- def initialize(
1617
- payment_method_options: nil,
1618
- payment_method_types: nil,
1619
- save_default_payment_method: nil
1620
- )
1621
- @payment_method_options = payment_method_options
1622
- @payment_method_types = payment_method_types
1623
- @save_default_payment_method = save_default_payment_method
1624
- end
1625
- end
1626
-
1627
- class PendingInvoiceItemInterval < Stripe::RequestParams
1628
- # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
1629
- attr_accessor :interval
1630
- # 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).
1631
- attr_accessor :interval_count
1632
-
1633
- def initialize(interval: nil, interval_count: nil)
1634
- @interval = interval
1635
- @interval_count = interval_count
1636
- end
1637
- end
1638
-
1639
- class Prebilling < Stripe::RequestParams
1640
- # This is used to determine the number of billing cycles to prebill.
1641
- attr_accessor :iterations
1642
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1643
- attr_accessor :update_behavior
1644
-
1645
- def initialize(iterations: nil, update_behavior: nil)
1646
- @iterations = iterations
1647
- @update_behavior = update_behavior
1648
- end
1649
- end
1650
-
1651
- class TransferData < Stripe::RequestParams
1652
- # 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.
1653
- attr_accessor :amount_percent
1654
- # ID of an existing, connected Stripe account.
1655
- attr_accessor :destination
1656
-
1657
- def initialize(amount_percent: nil, destination: nil)
1658
- @amount_percent = amount_percent
1659
- @destination = destination
1660
- end
1661
- end
1662
-
1663
- class TrialSettings < Stripe::RequestParams
1664
- class EndBehavior < Stripe::RequestParams
1665
- # Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
1666
- attr_accessor :missing_payment_method
1667
-
1668
- def initialize(missing_payment_method: nil)
1669
- @missing_payment_method = missing_payment_method
1670
- end
1671
- end
1672
- # Defines how the subscription should behave when the user's free trial ends.
1673
- attr_accessor :end_behavior
1674
-
1675
- def initialize(end_behavior: nil)
1676
- @end_behavior = end_behavior
1677
- end
1678
- end
1679
- # 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.
1680
- attr_accessor :add_invoice_items
1681
- # 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).
1682
- attr_accessor :application_fee_percent
1683
- # Automatic tax settings for this subscription.
1684
- attr_accessor :automatic_tax
1685
- # A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
1686
- attr_accessor :backdate_start_date
1687
- # 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.
1688
- attr_accessor :billing_cycle_anchor
1689
- # 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.
1690
- attr_accessor :billing_cycle_anchor_config
1691
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1692
- attr_accessor :billing_mode
1693
- # 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.
1694
- attr_accessor :billing_thresholds
1695
- # 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.
1696
- attr_accessor :cancel_at
1697
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1698
- attr_accessor :cancel_at_period_end
1699
- # 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`.
1700
- attr_accessor :collection_method
1701
- # 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).
1702
- attr_accessor :currency
1703
- # The identifier of the customer to subscribe.
1704
- attr_accessor :customer
1705
- # The identifier of the account to subscribe.
1706
- attr_accessor :customer_account
1707
- # 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`.
1708
- attr_accessor :days_until_due
1709
- # 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).
1710
- attr_accessor :default_payment_method
1711
- # 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).
1712
- attr_accessor :default_source
1713
- # 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.
1714
- attr_accessor :default_tax_rates
1715
- # 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.
1716
- attr_accessor :description
1717
- # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
1718
- attr_accessor :discounts
1719
- # Specifies which fields in the response should be expanded.
1720
- attr_accessor :expand
1721
- # All invoices will be billed using the specified settings.
1722
- attr_accessor :invoice_settings
1723
- # A list of up to 20 subscription items, each with an attached price.
1724
- attr_accessor :items
1725
- # 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`.
1726
- attr_accessor :metadata
1727
- # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
1728
- attr_accessor :off_session
1729
- # The account on behalf of which to charge, for each of the subscription's invoices.
1730
- attr_accessor :on_behalf_of
1731
- # Only applies to subscriptions with `collection_method=charge_automatically`.
1732
- #
1733
- # 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.
1734
- #
1735
- # 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.
1736
- #
1737
- # 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.
1738
- #
1739
- # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
1740
- #
1741
- # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
1742
- attr_accessor :payment_behavior
1743
- # Payment settings to pass to invoices created by the subscription.
1744
- attr_accessor :payment_settings
1745
- # 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.
1746
- attr_accessor :pending_invoice_item_interval
1747
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
1748
- attr_accessor :prebilling
1749
- # 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`.
1750
- attr_accessor :proration_behavior
1751
- # 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.
1752
- attr_accessor :transfer_data
1753
- # 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.
1754
- attr_accessor :trial_end
1755
- # 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.
1756
- attr_accessor :trial_from_plan
1757
- # 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.
1758
- attr_accessor :trial_period_days
1759
- # Settings related to subscription trials.
1760
- attr_accessor :trial_settings
1761
-
1762
- def initialize(
1763
- add_invoice_items: nil,
1764
- application_fee_percent: nil,
1765
- automatic_tax: nil,
1766
- backdate_start_date: nil,
1767
- billing_cycle_anchor: nil,
1768
- billing_cycle_anchor_config: nil,
1769
- billing_mode: nil,
1770
- billing_thresholds: nil,
1771
- cancel_at: nil,
1772
- cancel_at_period_end: nil,
1773
- collection_method: nil,
1774
- currency: nil,
1775
- customer: nil,
1776
- customer_account: nil,
1777
- days_until_due: nil,
1778
- default_payment_method: nil,
1779
- default_source: nil,
1780
- default_tax_rates: nil,
1781
- description: nil,
1782
- discounts: nil,
1783
- expand: nil,
1784
- invoice_settings: nil,
1785
- items: nil,
1786
- metadata: nil,
1787
- off_session: nil,
1788
- on_behalf_of: nil,
1789
- payment_behavior: nil,
1790
- payment_settings: nil,
1791
- pending_invoice_item_interval: nil,
1792
- prebilling: nil,
1793
- proration_behavior: nil,
1794
- transfer_data: nil,
1795
- trial_end: nil,
1796
- trial_from_plan: nil,
1797
- trial_period_days: nil,
1798
- trial_settings: nil
1799
- )
1800
- @add_invoice_items = add_invoice_items
1801
- @application_fee_percent = application_fee_percent
1802
- @automatic_tax = automatic_tax
1803
- @backdate_start_date = backdate_start_date
1804
- @billing_cycle_anchor = billing_cycle_anchor
1805
- @billing_cycle_anchor_config = billing_cycle_anchor_config
1806
- @billing_mode = billing_mode
1807
- @billing_thresholds = billing_thresholds
1808
- @cancel_at = cancel_at
1809
- @cancel_at_period_end = cancel_at_period_end
1810
- @collection_method = collection_method
1811
- @currency = currency
1812
- @customer = customer
1813
- @customer_account = customer_account
1814
- @days_until_due = days_until_due
1815
- @default_payment_method = default_payment_method
1816
- @default_source = default_source
1817
- @default_tax_rates = default_tax_rates
1818
- @description = description
1819
- @discounts = discounts
1820
- @expand = expand
1821
- @invoice_settings = invoice_settings
1822
- @items = items
1823
- @metadata = metadata
1824
- @off_session = off_session
1825
- @on_behalf_of = on_behalf_of
1826
- @payment_behavior = payment_behavior
1827
- @payment_settings = payment_settings
1828
- @pending_invoice_item_interval = pending_invoice_item_interval
1829
- @prebilling = prebilling
1830
- @proration_behavior = proration_behavior
1831
- @transfer_data = transfer_data
1832
- @trial_end = trial_end
1833
- @trial_from_plan = trial_from_plan
1834
- @trial_period_days = trial_period_days
1835
- @trial_settings = trial_settings
1836
- end
1837
- end
1838
-
1839
- class SearchParams < Stripe::RequestParams
1840
- # Specifies which fields in the response should be expanded.
1841
- attr_accessor :expand
1842
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1843
- attr_accessor :limit
1844
- # 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.
1845
- attr_accessor :page
1846
- # 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).
1847
- attr_accessor :query
1848
-
1849
- def initialize(expand: nil, limit: nil, page: nil, query: nil)
1850
- @expand = expand
1851
- @limit = limit
1852
- @page = page
1853
- @query = query
1854
- end
1855
- end
1856
-
1857
- class MigrateParams < Stripe::RequestParams
1858
- class BillingMode < Stripe::RequestParams
1859
- # Attribute for param field type
1860
- attr_accessor :type
1861
-
1862
- def initialize(type: nil)
1863
- @type = type
1864
- end
1865
- end
1866
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1867
- attr_accessor :billing_mode
1868
- # Specifies which fields in the response should be expanded.
1869
- attr_accessor :expand
1870
-
1871
- def initialize(billing_mode: nil, expand: nil)
1872
- @billing_mode = billing_mode
1873
- @expand = expand
1874
- end
1875
- end
1876
-
1877
- class ResumeParams < Stripe::RequestParams
1878
- # 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).
1879
- attr_accessor :billing_cycle_anchor
1880
- # Specifies which fields in the response should be expanded.
1881
- attr_accessor :expand
1882
- # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor` being `unchanged`. When the `billing_cycle_anchor` is set to `now` (default value), no prorations are generated. If no value is passed, the default is `create_prorations`.
1883
- attr_accessor :proration_behavior
1884
- # If set, prorations will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
1885
- attr_accessor :proration_date
1886
-
1887
- def initialize(
1888
- billing_cycle_anchor: nil,
1889
- expand: nil,
1890
- proration_behavior: nil,
1891
- proration_date: nil
1892
- )
1893
- @billing_cycle_anchor = billing_cycle_anchor
1894
- @expand = expand
1895
- @proration_behavior = proration_behavior
1896
- @proration_date = proration_date
1897
- end
1898
- end
1899
-
1900
6
  # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata).
1901
7
  #
1902
8
  # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true.