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,2202 +3,6 @@
3
3
 
4
4
  module Stripe
5
5
  class SubscriptionScheduleService < StripeService
6
- class ListParams < Stripe::RequestParams
7
- class CanceledAt < Stripe::RequestParams
8
- # Minimum value to filter by (exclusive)
9
- attr_accessor :gt
10
- # Minimum value to filter by (inclusive)
11
- attr_accessor :gte
12
- # Maximum value to filter by (exclusive)
13
- attr_accessor :lt
14
- # Maximum value to filter by (inclusive)
15
- attr_accessor :lte
16
-
17
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
18
- @gt = gt
19
- @gte = gte
20
- @lt = lt
21
- @lte = lte
22
- end
23
- end
24
-
25
- class CompletedAt < Stripe::RequestParams
26
- # Minimum value to filter by (exclusive)
27
- attr_accessor :gt
28
- # Minimum value to filter by (inclusive)
29
- attr_accessor :gte
30
- # Maximum value to filter by (exclusive)
31
- attr_accessor :lt
32
- # Maximum value to filter by (inclusive)
33
- attr_accessor :lte
34
-
35
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
36
- @gt = gt
37
- @gte = gte
38
- @lt = lt
39
- @lte = lte
40
- end
41
- end
42
-
43
- class Created < Stripe::RequestParams
44
- # Minimum value to filter by (exclusive)
45
- attr_accessor :gt
46
- # Minimum value to filter by (inclusive)
47
- attr_accessor :gte
48
- # Maximum value to filter by (exclusive)
49
- attr_accessor :lt
50
- # Maximum value to filter by (inclusive)
51
- attr_accessor :lte
52
-
53
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
54
- @gt = gt
55
- @gte = gte
56
- @lt = lt
57
- @lte = lte
58
- end
59
- end
60
-
61
- class ReleasedAt < Stripe::RequestParams
62
- # Minimum value to filter by (exclusive)
63
- attr_accessor :gt
64
- # Minimum value to filter by (inclusive)
65
- attr_accessor :gte
66
- # Maximum value to filter by (exclusive)
67
- attr_accessor :lt
68
- # Maximum value to filter by (inclusive)
69
- attr_accessor :lte
70
-
71
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
72
- @gt = gt
73
- @gte = gte
74
- @lt = lt
75
- @lte = lte
76
- end
77
- end
78
- # Only return subscription schedules that were created canceled the given date interval.
79
- attr_accessor :canceled_at
80
- # Only return subscription schedules that completed during the given date interval.
81
- attr_accessor :completed_at
82
- # Only return subscription schedules that were created during the given date interval.
83
- attr_accessor :created
84
- # Only return subscription schedules for the given customer.
85
- attr_accessor :customer
86
- # Only return subscription schedules for the given account.
87
- attr_accessor :customer_account
88
- # 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.
89
- attr_accessor :ending_before
90
- # Specifies which fields in the response should be expanded.
91
- attr_accessor :expand
92
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
93
- attr_accessor :limit
94
- # Only return subscription schedules that were released during the given date interval.
95
- attr_accessor :released_at
96
- # Only return subscription schedules that have not started yet.
97
- attr_accessor :scheduled
98
- # 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.
99
- attr_accessor :starting_after
100
-
101
- def initialize(
102
- canceled_at: nil,
103
- completed_at: nil,
104
- created: nil,
105
- customer: nil,
106
- customer_account: nil,
107
- ending_before: nil,
108
- expand: nil,
109
- limit: nil,
110
- released_at: nil,
111
- scheduled: nil,
112
- starting_after: nil
113
- )
114
- @canceled_at = canceled_at
115
- @completed_at = completed_at
116
- @created = created
117
- @customer = customer
118
- @customer_account = customer_account
119
- @ending_before = ending_before
120
- @expand = expand
121
- @limit = limit
122
- @released_at = released_at
123
- @scheduled = scheduled
124
- @starting_after = starting_after
125
- end
126
- end
127
-
128
- class CreateParams < Stripe::RequestParams
129
- class BillingMode < Stripe::RequestParams
130
- # Controls the calculation and orchestration of prorations and invoices for subscriptions.
131
- attr_accessor :type
132
-
133
- def initialize(type: nil)
134
- @type = type
135
- end
136
- end
137
-
138
- class DefaultSettings < Stripe::RequestParams
139
- class AutomaticTax < Stripe::RequestParams
140
- class Liability < Stripe::RequestParams
141
- # The connected account being referenced when `type` is `account`.
142
- attr_accessor :account
143
- # Type of the account referenced in the request.
144
- attr_accessor :type
145
-
146
- def initialize(account: nil, type: nil)
147
- @account = account
148
- @type = type
149
- end
150
- end
151
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
152
- attr_accessor :enabled
153
- # 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.
154
- attr_accessor :liability
155
-
156
- def initialize(enabled: nil, liability: nil)
157
- @enabled = enabled
158
- @liability = liability
159
- end
160
- end
161
-
162
- class BillingThresholds < Stripe::RequestParams
163
- # Monetary threshold that triggers the subscription to advance to a new billing period
164
- attr_accessor :amount_gte
165
- # 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.
166
- attr_accessor :reset_billing_cycle_anchor
167
-
168
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
169
- @amount_gte = amount_gte
170
- @reset_billing_cycle_anchor = reset_billing_cycle_anchor
171
- end
172
- end
173
-
174
- class InvoiceSettings < Stripe::RequestParams
175
- class Issuer < Stripe::RequestParams
176
- # The connected account being referenced when `type` is `account`.
177
- attr_accessor :account
178
- # Type of the account referenced in the request.
179
- attr_accessor :type
180
-
181
- def initialize(account: nil, type: nil)
182
- @account = account
183
- @type = type
184
- end
185
- end
186
- # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
187
- attr_accessor :account_tax_ids
188
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
189
- attr_accessor :days_until_due
190
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
191
- attr_accessor :issuer
192
-
193
- def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
194
- @account_tax_ids = account_tax_ids
195
- @days_until_due = days_until_due
196
- @issuer = issuer
197
- end
198
- end
199
-
200
- class TransferData < Stripe::RequestParams
201
- # 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.
202
- attr_accessor :amount_percent
203
- # ID of an existing, connected Stripe account.
204
- attr_accessor :destination
205
-
206
- def initialize(amount_percent: nil, destination: nil)
207
- @amount_percent = amount_percent
208
- @destination = destination
209
- end
210
- end
211
- # 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).
212
- attr_accessor :application_fee_percent
213
- # Default settings for automatic tax computation.
214
- attr_accessor :automatic_tax
215
- # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
216
- attr_accessor :billing_cycle_anchor
217
- # 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.
218
- attr_accessor :billing_thresholds
219
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing 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` on creation.
220
- attr_accessor :collection_method
221
- # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
222
- attr_accessor :default_payment_method
223
- # Subscription 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.
224
- attr_accessor :description
225
- # All invoices will be billed using the specified settings.
226
- attr_accessor :invoice_settings
227
- # The account on behalf of which to charge, for each of the associated subscription's invoices.
228
- attr_accessor :on_behalf_of
229
- # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
230
- attr_accessor :transfer_data
231
-
232
- def initialize(
233
- application_fee_percent: nil,
234
- automatic_tax: nil,
235
- billing_cycle_anchor: nil,
236
- billing_thresholds: nil,
237
- collection_method: nil,
238
- default_payment_method: nil,
239
- description: nil,
240
- invoice_settings: nil,
241
- on_behalf_of: nil,
242
- transfer_data: nil
243
- )
244
- @application_fee_percent = application_fee_percent
245
- @automatic_tax = automatic_tax
246
- @billing_cycle_anchor = billing_cycle_anchor
247
- @billing_thresholds = billing_thresholds
248
- @collection_method = collection_method
249
- @default_payment_method = default_payment_method
250
- @description = description
251
- @invoice_settings = invoice_settings
252
- @on_behalf_of = on_behalf_of
253
- @transfer_data = transfer_data
254
- end
255
- end
256
-
257
- class Phase < Stripe::RequestParams
258
- class AddInvoiceItem < Stripe::RequestParams
259
- class Discount < Stripe::RequestParams
260
- class DiscountEnd < Stripe::RequestParams
261
- class Duration < Stripe::RequestParams
262
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
263
- attr_accessor :interval
264
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
265
- attr_accessor :interval_count
266
-
267
- def initialize(interval: nil, interval_count: nil)
268
- @interval = interval
269
- @interval_count = interval_count
270
- end
271
- end
272
- # Time span for the redeemed discount.
273
- attr_accessor :duration
274
- # A precise Unix timestamp for the discount to end. Must be in the future.
275
- attr_accessor :timestamp
276
- # The type of calculation made to determine when the discount ends.
277
- attr_accessor :type
278
-
279
- def initialize(duration: nil, timestamp: nil, type: nil)
280
- @duration = duration
281
- @timestamp = timestamp
282
- @type = type
283
- end
284
- end
285
- # ID of the coupon to create a new discount for.
286
- attr_accessor :coupon
287
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
288
- attr_accessor :discount
289
- # Details to determine how long the discount should be applied for.
290
- attr_accessor :discount_end
291
- # ID of the promotion code to create a new discount for.
292
- attr_accessor :promotion_code
293
-
294
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
295
- @coupon = coupon
296
- @discount = discount
297
- @discount_end = discount_end
298
- @promotion_code = promotion_code
299
- end
300
- end
301
-
302
- class Period < Stripe::RequestParams
303
- class End < Stripe::RequestParams
304
- # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
305
- attr_accessor :timestamp
306
- # Select how to calculate the end of the invoice item period.
307
- attr_accessor :type
308
-
309
- def initialize(timestamp: nil, type: nil)
310
- @timestamp = timestamp
311
- @type = type
312
- end
313
- end
314
-
315
- class Start < Stripe::RequestParams
316
- # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
317
- attr_accessor :timestamp
318
- # Select how to calculate the start of the invoice item period.
319
- attr_accessor :type
320
-
321
- def initialize(timestamp: nil, type: nil)
322
- @timestamp = timestamp
323
- @type = type
324
- end
325
- end
326
- # End of the invoice item period.
327
- attr_accessor :end
328
- # Start of the invoice item period.
329
- attr_accessor :start
330
-
331
- def initialize(end_: nil, start: nil)
332
- @end = end_
333
- @start = start
334
- end
335
- end
336
-
337
- class PriceData < Stripe::RequestParams
338
- # 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).
339
- attr_accessor :currency
340
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
341
- attr_accessor :product
342
- # 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.
343
- attr_accessor :tax_behavior
344
- # 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.
345
- attr_accessor :unit_amount
346
- # 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.
347
- attr_accessor :unit_amount_decimal
348
-
349
- def initialize(
350
- currency: nil,
351
- product: nil,
352
- tax_behavior: nil,
353
- unit_amount: nil,
354
- unit_amount_decimal: nil
355
- )
356
- @currency = currency
357
- @product = product
358
- @tax_behavior = tax_behavior
359
- @unit_amount = unit_amount
360
- @unit_amount_decimal = unit_amount_decimal
361
- end
362
- end
363
- # The coupons to redeem into discounts for the item.
364
- attr_accessor :discounts
365
- # 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`.
366
- attr_accessor :metadata
367
- # The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
368
- attr_accessor :period
369
- # The ID of the price object. One of `price` or `price_data` is required.
370
- attr_accessor :price
371
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
372
- attr_accessor :price_data
373
- # Quantity for this item. Defaults to 1.
374
- attr_accessor :quantity
375
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
376
- attr_accessor :tax_rates
377
-
378
- def initialize(
379
- discounts: nil,
380
- metadata: nil,
381
- period: nil,
382
- price: nil,
383
- price_data: nil,
384
- quantity: nil,
385
- tax_rates: nil
386
- )
387
- @discounts = discounts
388
- @metadata = metadata
389
- @period = period
390
- @price = price
391
- @price_data = price_data
392
- @quantity = quantity
393
- @tax_rates = tax_rates
394
- end
395
- end
396
-
397
- class AutomaticTax < Stripe::RequestParams
398
- class Liability < Stripe::RequestParams
399
- # The connected account being referenced when `type` is `account`.
400
- attr_accessor :account
401
- # Type of the account referenced in the request.
402
- attr_accessor :type
403
-
404
- def initialize(account: nil, type: nil)
405
- @account = account
406
- @type = type
407
- end
408
- end
409
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
410
- attr_accessor :enabled
411
- # 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.
412
- attr_accessor :liability
413
-
414
- def initialize(enabled: nil, liability: nil)
415
- @enabled = enabled
416
- @liability = liability
417
- end
418
- end
419
-
420
- class BillingThresholds < Stripe::RequestParams
421
- # Monetary threshold that triggers the subscription to advance to a new billing period
422
- attr_accessor :amount_gte
423
- # 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.
424
- attr_accessor :reset_billing_cycle_anchor
425
-
426
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
427
- @amount_gte = amount_gte
428
- @reset_billing_cycle_anchor = reset_billing_cycle_anchor
429
- end
430
- end
431
-
432
- class Discount < Stripe::RequestParams
433
- class DiscountEnd < Stripe::RequestParams
434
- class Duration < Stripe::RequestParams
435
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
436
- attr_accessor :interval
437
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
438
- attr_accessor :interval_count
439
-
440
- def initialize(interval: nil, interval_count: nil)
441
- @interval = interval
442
- @interval_count = interval_count
443
- end
444
- end
445
- # Time span for the redeemed discount.
446
- attr_accessor :duration
447
- # A precise Unix timestamp for the discount to end. Must be in the future.
448
- attr_accessor :timestamp
449
- # The type of calculation made to determine when the discount ends.
450
- attr_accessor :type
451
-
452
- def initialize(duration: nil, timestamp: nil, type: nil)
453
- @duration = duration
454
- @timestamp = timestamp
455
- @type = type
456
- end
457
- end
458
- # ID of the coupon to create a new discount for.
459
- attr_accessor :coupon
460
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
461
- attr_accessor :discount
462
- # Details to determine how long the discount should be applied for.
463
- attr_accessor :discount_end
464
- # ID of the promotion code to create a new discount for.
465
- attr_accessor :promotion_code
466
-
467
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
468
- @coupon = coupon
469
- @discount = discount
470
- @discount_end = discount_end
471
- @promotion_code = promotion_code
472
- end
473
- end
474
-
475
- class Duration < Stripe::RequestParams
476
- # Specifies phase duration. Either `day`, `week`, `month` or `year`.
477
- attr_accessor :interval
478
- # The multiplier applied to the interval.
479
- attr_accessor :interval_count
480
-
481
- def initialize(interval: nil, interval_count: nil)
482
- @interval = interval
483
- @interval_count = interval_count
484
- end
485
- end
486
-
487
- class InvoiceSettings < Stripe::RequestParams
488
- class Issuer < Stripe::RequestParams
489
- # The connected account being referenced when `type` is `account`.
490
- attr_accessor :account
491
- # Type of the account referenced in the request.
492
- attr_accessor :type
493
-
494
- def initialize(account: nil, type: nil)
495
- @account = account
496
- @type = type
497
- end
498
- end
499
- # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
500
- attr_accessor :account_tax_ids
501
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
502
- attr_accessor :days_until_due
503
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
504
- attr_accessor :issuer
505
-
506
- def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
507
- @account_tax_ids = account_tax_ids
508
- @days_until_due = days_until_due
509
- @issuer = issuer
510
- end
511
- end
512
-
513
- class Item < Stripe::RequestParams
514
- class BillingThresholds < Stripe::RequestParams
515
- # 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))
516
- attr_accessor :usage_gte
517
-
518
- def initialize(usage_gte: nil)
519
- @usage_gte = usage_gte
520
- end
521
- end
522
-
523
- class Discount < Stripe::RequestParams
524
- class DiscountEnd < Stripe::RequestParams
525
- class Duration < Stripe::RequestParams
526
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
527
- attr_accessor :interval
528
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
529
- attr_accessor :interval_count
530
-
531
- def initialize(interval: nil, interval_count: nil)
532
- @interval = interval
533
- @interval_count = interval_count
534
- end
535
- end
536
- # Time span for the redeemed discount.
537
- attr_accessor :duration
538
- # A precise Unix timestamp for the discount to end. Must be in the future.
539
- attr_accessor :timestamp
540
- # The type of calculation made to determine when the discount ends.
541
- attr_accessor :type
542
-
543
- def initialize(duration: nil, timestamp: nil, type: nil)
544
- @duration = duration
545
- @timestamp = timestamp
546
- @type = type
547
- end
548
- end
549
- # ID of the coupon to create a new discount for.
550
- attr_accessor :coupon
551
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
552
- attr_accessor :discount
553
- # Details to determine how long the discount should be applied for.
554
- attr_accessor :discount_end
555
- # ID of the promotion code to create a new discount for.
556
- attr_accessor :promotion_code
557
-
558
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
559
- @coupon = coupon
560
- @discount = discount
561
- @discount_end = discount_end
562
- @promotion_code = promotion_code
563
- end
564
- end
565
-
566
- class PriceData < Stripe::RequestParams
567
- class Recurring < Stripe::RequestParams
568
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
569
- attr_accessor :interval
570
- # 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).
571
- attr_accessor :interval_count
572
-
573
- def initialize(interval: nil, interval_count: nil)
574
- @interval = interval
575
- @interval_count = interval_count
576
- end
577
- end
578
- # 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).
579
- attr_accessor :currency
580
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
581
- attr_accessor :product
582
- # The recurring components of a price such as `interval` and `interval_count`.
583
- attr_accessor :recurring
584
- # 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.
585
- attr_accessor :tax_behavior
586
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
587
- attr_accessor :unit_amount
588
- # 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.
589
- attr_accessor :unit_amount_decimal
590
-
591
- def initialize(
592
- currency: nil,
593
- product: nil,
594
- recurring: nil,
595
- tax_behavior: nil,
596
- unit_amount: nil,
597
- unit_amount_decimal: nil
598
- )
599
- @currency = currency
600
- @product = product
601
- @recurring = recurring
602
- @tax_behavior = tax_behavior
603
- @unit_amount = unit_amount
604
- @unit_amount_decimal = unit_amount_decimal
605
- end
606
- end
607
-
608
- class Trial < Stripe::RequestParams
609
- # 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.
610
- attr_accessor :converts_to
611
- # Determines the type of trial for this item.
612
- attr_accessor :type
613
-
614
- def initialize(converts_to: nil, type: nil)
615
- @converts_to = converts_to
616
- @type = type
617
- end
618
- end
619
- # 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.
620
- attr_accessor :billing_thresholds
621
- # The coupons to redeem into discounts for the subscription item.
622
- attr_accessor :discounts
623
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
624
- attr_accessor :metadata
625
- # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
626
- attr_accessor :plan
627
- # The ID of the price object.
628
- attr_accessor :price
629
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
630
- attr_accessor :price_data
631
- # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
632
- attr_accessor :quantity
633
- # 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.
634
- attr_accessor :tax_rates
635
- # Options that configure the trial on the subscription item.
636
- attr_accessor :trial
637
-
638
- def initialize(
639
- billing_thresholds: nil,
640
- discounts: nil,
641
- metadata: nil,
642
- plan: nil,
643
- price: nil,
644
- price_data: nil,
645
- quantity: nil,
646
- tax_rates: nil,
647
- trial: nil
648
- )
649
- @billing_thresholds = billing_thresholds
650
- @discounts = discounts
651
- @metadata = metadata
652
- @plan = plan
653
- @price = price
654
- @price_data = price_data
655
- @quantity = quantity
656
- @tax_rates = tax_rates
657
- @trial = trial
658
- end
659
- end
660
-
661
- class PauseCollection < Stripe::RequestParams
662
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
663
- attr_accessor :behavior
664
-
665
- def initialize(behavior: nil)
666
- @behavior = behavior
667
- end
668
- end
669
-
670
- class TransferData < Stripe::RequestParams
671
- # 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.
672
- attr_accessor :amount_percent
673
- # ID of an existing, connected Stripe account.
674
- attr_accessor :destination
675
-
676
- def initialize(amount_percent: nil, destination: nil)
677
- @amount_percent = amount_percent
678
- @destination = destination
679
- end
680
- end
681
-
682
- class TrialSettings < Stripe::RequestParams
683
- class EndBehavior < Stripe::RequestParams
684
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
685
- attr_accessor :prorate_up_front
686
-
687
- def initialize(prorate_up_front: nil)
688
- @prorate_up_front = prorate_up_front
689
- end
690
- end
691
- # Defines how the subscription should behave when a trial ends.
692
- attr_accessor :end_behavior
693
-
694
- def initialize(end_behavior: nil)
695
- @end_behavior = end_behavior
696
- end
697
- end
698
- # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
699
- attr_accessor :add_invoice_items
700
- # 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).
701
- attr_accessor :application_fee_percent
702
- # Automatic tax settings for this phase.
703
- attr_accessor :automatic_tax
704
- # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
705
- attr_accessor :billing_cycle_anchor
706
- # 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.
707
- attr_accessor :billing_thresholds
708
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing 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` on creation.
709
- attr_accessor :collection_method
710
- # 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).
711
- attr_accessor :currency
712
- # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
713
- attr_accessor :default_payment_method
714
- # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
715
- attr_accessor :default_tax_rates
716
- # Subscription 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.
717
- attr_accessor :description
718
- # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
719
- attr_accessor :discounts
720
- # The number of intervals the phase should last. If set, `end_date` must not be set.
721
- attr_accessor :duration
722
- # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
723
- attr_accessor :end_date
724
- # All invoices will be billed using the specified settings.
725
- attr_accessor :invoice_settings
726
- # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
727
- attr_accessor :items
728
- # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
729
- attr_accessor :iterations
730
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
731
- attr_accessor :metadata
732
- # The account on behalf of which to charge, for each of the associated subscription's invoices.
733
- attr_accessor :on_behalf_of
734
- # 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).
735
- attr_accessor :pause_collection
736
- # Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
737
- attr_accessor :proration_behavior
738
- # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
739
- attr_accessor :transfer_data
740
- # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
741
- attr_accessor :trial
742
- # Specify trial behavior when crossing phase boundaries
743
- attr_accessor :trial_continuation
744
- # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
745
- attr_accessor :trial_end
746
- # Settings related to subscription trials.
747
- attr_accessor :trial_settings
748
-
749
- def initialize(
750
- add_invoice_items: nil,
751
- application_fee_percent: nil,
752
- automatic_tax: nil,
753
- billing_cycle_anchor: nil,
754
- billing_thresholds: nil,
755
- collection_method: nil,
756
- currency: nil,
757
- default_payment_method: nil,
758
- default_tax_rates: nil,
759
- description: nil,
760
- discounts: nil,
761
- duration: nil,
762
- end_date: nil,
763
- invoice_settings: nil,
764
- items: nil,
765
- iterations: nil,
766
- metadata: nil,
767
- on_behalf_of: nil,
768
- pause_collection: nil,
769
- proration_behavior: nil,
770
- transfer_data: nil,
771
- trial: nil,
772
- trial_continuation: nil,
773
- trial_end: nil,
774
- trial_settings: nil
775
- )
776
- @add_invoice_items = add_invoice_items
777
- @application_fee_percent = application_fee_percent
778
- @automatic_tax = automatic_tax
779
- @billing_cycle_anchor = billing_cycle_anchor
780
- @billing_thresholds = billing_thresholds
781
- @collection_method = collection_method
782
- @currency = currency
783
- @default_payment_method = default_payment_method
784
- @default_tax_rates = default_tax_rates
785
- @description = description
786
- @discounts = discounts
787
- @duration = duration
788
- @end_date = end_date
789
- @invoice_settings = invoice_settings
790
- @items = items
791
- @iterations = iterations
792
- @metadata = metadata
793
- @on_behalf_of = on_behalf_of
794
- @pause_collection = pause_collection
795
- @proration_behavior = proration_behavior
796
- @transfer_data = transfer_data
797
- @trial = trial
798
- @trial_continuation = trial_continuation
799
- @trial_end = trial_end
800
- @trial_settings = trial_settings
801
- end
802
- end
803
-
804
- class Prebilling < Stripe::RequestParams
805
- # This is used to determine the number of billing cycles to prebill.
806
- attr_accessor :iterations
807
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
808
- attr_accessor :update_behavior
809
-
810
- def initialize(iterations: nil, update_behavior: nil)
811
- @iterations = iterations
812
- @update_behavior = update_behavior
813
- end
814
- end
815
- # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
816
- attr_accessor :billing_behavior
817
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
818
- attr_accessor :billing_mode
819
- # The identifier of the customer to create the subscription schedule for.
820
- attr_accessor :customer
821
- # The identifier of the account to create the subscription schedule for.
822
- attr_accessor :customer_account
823
- # Object representing the subscription schedule's default settings.
824
- attr_accessor :default_settings
825
- # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
826
- attr_accessor :end_behavior
827
- # Specifies which fields in the response should be expanded.
828
- attr_accessor :expand
829
- # Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
830
- attr_accessor :from_subscription
831
- # 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`.
832
- attr_accessor :metadata
833
- # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
834
- attr_accessor :phases
835
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
836
- attr_accessor :prebilling
837
- # When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
838
- attr_accessor :start_date
839
-
840
- def initialize(
841
- billing_behavior: nil,
842
- billing_mode: nil,
843
- customer: nil,
844
- customer_account: nil,
845
- default_settings: nil,
846
- end_behavior: nil,
847
- expand: nil,
848
- from_subscription: nil,
849
- metadata: nil,
850
- phases: nil,
851
- prebilling: nil,
852
- start_date: nil
853
- )
854
- @billing_behavior = billing_behavior
855
- @billing_mode = billing_mode
856
- @customer = customer
857
- @customer_account = customer_account
858
- @default_settings = default_settings
859
- @end_behavior = end_behavior
860
- @expand = expand
861
- @from_subscription = from_subscription
862
- @metadata = metadata
863
- @phases = phases
864
- @prebilling = prebilling
865
- @start_date = start_date
866
- end
867
- end
868
-
869
- class RetrieveParams < Stripe::RequestParams
870
- # Specifies which fields in the response should be expanded.
871
- attr_accessor :expand
872
-
873
- def initialize(expand: nil)
874
- @expand = expand
875
- end
876
- end
877
-
878
- class UpdateParams < Stripe::RequestParams
879
- class DefaultSettings < Stripe::RequestParams
880
- class AutomaticTax < Stripe::RequestParams
881
- class Liability < Stripe::RequestParams
882
- # The connected account being referenced when `type` is `account`.
883
- attr_accessor :account
884
- # Type of the account referenced in the request.
885
- attr_accessor :type
886
-
887
- def initialize(account: nil, type: nil)
888
- @account = account
889
- @type = type
890
- end
891
- end
892
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
893
- attr_accessor :enabled
894
- # 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.
895
- attr_accessor :liability
896
-
897
- def initialize(enabled: nil, liability: nil)
898
- @enabled = enabled
899
- @liability = liability
900
- end
901
- end
902
-
903
- class BillingThresholds < Stripe::RequestParams
904
- # Monetary threshold that triggers the subscription to advance to a new billing period
905
- attr_accessor :amount_gte
906
- # 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.
907
- attr_accessor :reset_billing_cycle_anchor
908
-
909
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
910
- @amount_gte = amount_gte
911
- @reset_billing_cycle_anchor = reset_billing_cycle_anchor
912
- end
913
- end
914
-
915
- class InvoiceSettings < Stripe::RequestParams
916
- class Issuer < Stripe::RequestParams
917
- # The connected account being referenced when `type` is `account`.
918
- attr_accessor :account
919
- # Type of the account referenced in the request.
920
- attr_accessor :type
921
-
922
- def initialize(account: nil, type: nil)
923
- @account = account
924
- @type = type
925
- end
926
- end
927
- # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
928
- attr_accessor :account_tax_ids
929
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
930
- attr_accessor :days_until_due
931
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
932
- attr_accessor :issuer
933
-
934
- def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
935
- @account_tax_ids = account_tax_ids
936
- @days_until_due = days_until_due
937
- @issuer = issuer
938
- end
939
- end
940
-
941
- class TransferData < Stripe::RequestParams
942
- # 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.
943
- attr_accessor :amount_percent
944
- # ID of an existing, connected Stripe account.
945
- attr_accessor :destination
946
-
947
- def initialize(amount_percent: nil, destination: nil)
948
- @amount_percent = amount_percent
949
- @destination = destination
950
- end
951
- end
952
- # 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).
953
- attr_accessor :application_fee_percent
954
- # Default settings for automatic tax computation.
955
- attr_accessor :automatic_tax
956
- # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
957
- attr_accessor :billing_cycle_anchor
958
- # 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.
959
- attr_accessor :billing_thresholds
960
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing 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` on creation.
961
- attr_accessor :collection_method
962
- # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
963
- attr_accessor :default_payment_method
964
- # Subscription 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.
965
- attr_accessor :description
966
- # All invoices will be billed using the specified settings.
967
- attr_accessor :invoice_settings
968
- # The account on behalf of which to charge, for each of the associated subscription's invoices.
969
- attr_accessor :on_behalf_of
970
- # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
971
- attr_accessor :transfer_data
972
-
973
- def initialize(
974
- application_fee_percent: nil,
975
- automatic_tax: nil,
976
- billing_cycle_anchor: nil,
977
- billing_thresholds: nil,
978
- collection_method: nil,
979
- default_payment_method: nil,
980
- description: nil,
981
- invoice_settings: nil,
982
- on_behalf_of: nil,
983
- transfer_data: nil
984
- )
985
- @application_fee_percent = application_fee_percent
986
- @automatic_tax = automatic_tax
987
- @billing_cycle_anchor = billing_cycle_anchor
988
- @billing_thresholds = billing_thresholds
989
- @collection_method = collection_method
990
- @default_payment_method = default_payment_method
991
- @description = description
992
- @invoice_settings = invoice_settings
993
- @on_behalf_of = on_behalf_of
994
- @transfer_data = transfer_data
995
- end
996
- end
997
-
998
- class Phase < Stripe::RequestParams
999
- class AddInvoiceItem < Stripe::RequestParams
1000
- class Discount < Stripe::RequestParams
1001
- class DiscountEnd < Stripe::RequestParams
1002
- class Duration < Stripe::RequestParams
1003
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1004
- attr_accessor :interval
1005
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1006
- attr_accessor :interval_count
1007
-
1008
- def initialize(interval: nil, interval_count: nil)
1009
- @interval = interval
1010
- @interval_count = interval_count
1011
- end
1012
- end
1013
- # Time span for the redeemed discount.
1014
- attr_accessor :duration
1015
- # A precise Unix timestamp for the discount to end. Must be in the future.
1016
- attr_accessor :timestamp
1017
- # The type of calculation made to determine when the discount ends.
1018
- attr_accessor :type
1019
-
1020
- def initialize(duration: nil, timestamp: nil, type: nil)
1021
- @duration = duration
1022
- @timestamp = timestamp
1023
- @type = type
1024
- end
1025
- end
1026
- # ID of the coupon to create a new discount for.
1027
- attr_accessor :coupon
1028
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1029
- attr_accessor :discount
1030
- # Details to determine how long the discount should be applied for.
1031
- attr_accessor :discount_end
1032
- # ID of the promotion code to create a new discount for.
1033
- attr_accessor :promotion_code
1034
-
1035
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1036
- @coupon = coupon
1037
- @discount = discount
1038
- @discount_end = discount_end
1039
- @promotion_code = promotion_code
1040
- end
1041
- end
1042
-
1043
- class Period < Stripe::RequestParams
1044
- class End < Stripe::RequestParams
1045
- # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
1046
- attr_accessor :timestamp
1047
- # Select how to calculate the end of the invoice item period.
1048
- attr_accessor :type
1049
-
1050
- def initialize(timestamp: nil, type: nil)
1051
- @timestamp = timestamp
1052
- @type = type
1053
- end
1054
- end
1055
-
1056
- class Start < Stripe::RequestParams
1057
- # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
1058
- attr_accessor :timestamp
1059
- # Select how to calculate the start of the invoice item period.
1060
- attr_accessor :type
1061
-
1062
- def initialize(timestamp: nil, type: nil)
1063
- @timestamp = timestamp
1064
- @type = type
1065
- end
1066
- end
1067
- # End of the invoice item period.
1068
- attr_accessor :end
1069
- # Start of the invoice item period.
1070
- attr_accessor :start
1071
-
1072
- def initialize(end_: nil, start: nil)
1073
- @end = end_
1074
- @start = start
1075
- end
1076
- end
1077
-
1078
- class PriceData < Stripe::RequestParams
1079
- # 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).
1080
- attr_accessor :currency
1081
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1082
- attr_accessor :product
1083
- # 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.
1084
- attr_accessor :tax_behavior
1085
- # 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.
1086
- attr_accessor :unit_amount
1087
- # 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.
1088
- attr_accessor :unit_amount_decimal
1089
-
1090
- def initialize(
1091
- currency: nil,
1092
- product: nil,
1093
- tax_behavior: nil,
1094
- unit_amount: nil,
1095
- unit_amount_decimal: nil
1096
- )
1097
- @currency = currency
1098
- @product = product
1099
- @tax_behavior = tax_behavior
1100
- @unit_amount = unit_amount
1101
- @unit_amount_decimal = unit_amount_decimal
1102
- end
1103
- end
1104
- # The coupons to redeem into discounts for the item.
1105
- attr_accessor :discounts
1106
- # 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`.
1107
- attr_accessor :metadata
1108
- # The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
1109
- attr_accessor :period
1110
- # The ID of the price object. One of `price` or `price_data` is required.
1111
- attr_accessor :price
1112
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1113
- attr_accessor :price_data
1114
- # Quantity for this item. Defaults to 1.
1115
- attr_accessor :quantity
1116
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
1117
- attr_accessor :tax_rates
1118
-
1119
- def initialize(
1120
- discounts: nil,
1121
- metadata: nil,
1122
- period: nil,
1123
- price: nil,
1124
- price_data: nil,
1125
- quantity: nil,
1126
- tax_rates: nil
1127
- )
1128
- @discounts = discounts
1129
- @metadata = metadata
1130
- @period = period
1131
- @price = price
1132
- @price_data = price_data
1133
- @quantity = quantity
1134
- @tax_rates = tax_rates
1135
- end
1136
- end
1137
-
1138
- class AutomaticTax < Stripe::RequestParams
1139
- class Liability < Stripe::RequestParams
1140
- # The connected account being referenced when `type` is `account`.
1141
- attr_accessor :account
1142
- # Type of the account referenced in the request.
1143
- attr_accessor :type
1144
-
1145
- def initialize(account: nil, type: nil)
1146
- @account = account
1147
- @type = type
1148
- end
1149
- end
1150
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
1151
- attr_accessor :enabled
1152
- # 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.
1153
- attr_accessor :liability
1154
-
1155
- def initialize(enabled: nil, liability: nil)
1156
- @enabled = enabled
1157
- @liability = liability
1158
- end
1159
- end
1160
-
1161
- class BillingThresholds < Stripe::RequestParams
1162
- # Monetary threshold that triggers the subscription to advance to a new billing period
1163
- attr_accessor :amount_gte
1164
- # 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.
1165
- attr_accessor :reset_billing_cycle_anchor
1166
-
1167
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
1168
- @amount_gte = amount_gte
1169
- @reset_billing_cycle_anchor = reset_billing_cycle_anchor
1170
- end
1171
- end
1172
-
1173
- class Discount < Stripe::RequestParams
1174
- class DiscountEnd < Stripe::RequestParams
1175
- class Duration < Stripe::RequestParams
1176
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1177
- attr_accessor :interval
1178
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1179
- attr_accessor :interval_count
1180
-
1181
- def initialize(interval: nil, interval_count: nil)
1182
- @interval = interval
1183
- @interval_count = interval_count
1184
- end
1185
- end
1186
- # Time span for the redeemed discount.
1187
- attr_accessor :duration
1188
- # A precise Unix timestamp for the discount to end. Must be in the future.
1189
- attr_accessor :timestamp
1190
- # The type of calculation made to determine when the discount ends.
1191
- attr_accessor :type
1192
-
1193
- def initialize(duration: nil, timestamp: nil, type: nil)
1194
- @duration = duration
1195
- @timestamp = timestamp
1196
- @type = type
1197
- end
1198
- end
1199
- # ID of the coupon to create a new discount for.
1200
- attr_accessor :coupon
1201
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1202
- attr_accessor :discount
1203
- # Details to determine how long the discount should be applied for.
1204
- attr_accessor :discount_end
1205
- # ID of the promotion code to create a new discount for.
1206
- attr_accessor :promotion_code
1207
-
1208
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1209
- @coupon = coupon
1210
- @discount = discount
1211
- @discount_end = discount_end
1212
- @promotion_code = promotion_code
1213
- end
1214
- end
1215
-
1216
- class Duration < Stripe::RequestParams
1217
- # Specifies phase duration. Either `day`, `week`, `month` or `year`.
1218
- attr_accessor :interval
1219
- # The multiplier applied to the interval.
1220
- attr_accessor :interval_count
1221
-
1222
- def initialize(interval: nil, interval_count: nil)
1223
- @interval = interval
1224
- @interval_count = interval_count
1225
- end
1226
- end
1227
-
1228
- class InvoiceSettings < Stripe::RequestParams
1229
- class Issuer < Stripe::RequestParams
1230
- # The connected account being referenced when `type` is `account`.
1231
- attr_accessor :account
1232
- # Type of the account referenced in the request.
1233
- attr_accessor :type
1234
-
1235
- def initialize(account: nil, type: nil)
1236
- @account = account
1237
- @type = type
1238
- end
1239
- end
1240
- # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
1241
- attr_accessor :account_tax_ids
1242
- # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
1243
- attr_accessor :days_until_due
1244
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1245
- attr_accessor :issuer
1246
-
1247
- def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
1248
- @account_tax_ids = account_tax_ids
1249
- @days_until_due = days_until_due
1250
- @issuer = issuer
1251
- end
1252
- end
1253
-
1254
- class Item < Stripe::RequestParams
1255
- class BillingThresholds < Stripe::RequestParams
1256
- # 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))
1257
- attr_accessor :usage_gte
1258
-
1259
- def initialize(usage_gte: nil)
1260
- @usage_gte = usage_gte
1261
- end
1262
- end
1263
-
1264
- class Discount < Stripe::RequestParams
1265
- class DiscountEnd < Stripe::RequestParams
1266
- class Duration < Stripe::RequestParams
1267
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1268
- attr_accessor :interval
1269
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1270
- attr_accessor :interval_count
1271
-
1272
- def initialize(interval: nil, interval_count: nil)
1273
- @interval = interval
1274
- @interval_count = interval_count
1275
- end
1276
- end
1277
- # Time span for the redeemed discount.
1278
- attr_accessor :duration
1279
- # A precise Unix timestamp for the discount to end. Must be in the future.
1280
- attr_accessor :timestamp
1281
- # The type of calculation made to determine when the discount ends.
1282
- attr_accessor :type
1283
-
1284
- def initialize(duration: nil, timestamp: nil, type: nil)
1285
- @duration = duration
1286
- @timestamp = timestamp
1287
- @type = type
1288
- end
1289
- end
1290
- # ID of the coupon to create a new discount for.
1291
- attr_accessor :coupon
1292
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1293
- attr_accessor :discount
1294
- # Details to determine how long the discount should be applied for.
1295
- attr_accessor :discount_end
1296
- # ID of the promotion code to create a new discount for.
1297
- attr_accessor :promotion_code
1298
-
1299
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1300
- @coupon = coupon
1301
- @discount = discount
1302
- @discount_end = discount_end
1303
- @promotion_code = promotion_code
1304
- end
1305
- end
1306
-
1307
- class PriceData < Stripe::RequestParams
1308
- class Recurring < Stripe::RequestParams
1309
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1310
- attr_accessor :interval
1311
- # 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).
1312
- attr_accessor :interval_count
1313
-
1314
- def initialize(interval: nil, interval_count: nil)
1315
- @interval = interval
1316
- @interval_count = interval_count
1317
- end
1318
- end
1319
- # 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).
1320
- attr_accessor :currency
1321
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1322
- attr_accessor :product
1323
- # The recurring components of a price such as `interval` and `interval_count`.
1324
- attr_accessor :recurring
1325
- # 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.
1326
- attr_accessor :tax_behavior
1327
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1328
- attr_accessor :unit_amount
1329
- # 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.
1330
- attr_accessor :unit_amount_decimal
1331
-
1332
- def initialize(
1333
- currency: nil,
1334
- product: nil,
1335
- recurring: nil,
1336
- tax_behavior: nil,
1337
- unit_amount: nil,
1338
- unit_amount_decimal: nil
1339
- )
1340
- @currency = currency
1341
- @product = product
1342
- @recurring = recurring
1343
- @tax_behavior = tax_behavior
1344
- @unit_amount = unit_amount
1345
- @unit_amount_decimal = unit_amount_decimal
1346
- end
1347
- end
1348
-
1349
- class Trial < Stripe::RequestParams
1350
- # 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.
1351
- attr_accessor :converts_to
1352
- # Determines the type of trial for this item.
1353
- attr_accessor :type
1354
-
1355
- def initialize(converts_to: nil, type: nil)
1356
- @converts_to = converts_to
1357
- @type = type
1358
- end
1359
- end
1360
- # 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.
1361
- attr_accessor :billing_thresholds
1362
- # The coupons to redeem into discounts for the subscription item.
1363
- attr_accessor :discounts
1364
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
1365
- attr_accessor :metadata
1366
- # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
1367
- attr_accessor :plan
1368
- # The ID of the price object.
1369
- attr_accessor :price
1370
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
1371
- attr_accessor :price_data
1372
- # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
1373
- attr_accessor :quantity
1374
- # 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.
1375
- attr_accessor :tax_rates
1376
- # Options that configure the trial on the subscription item.
1377
- attr_accessor :trial
1378
-
1379
- def initialize(
1380
- billing_thresholds: nil,
1381
- discounts: nil,
1382
- metadata: nil,
1383
- plan: nil,
1384
- price: nil,
1385
- price_data: nil,
1386
- quantity: nil,
1387
- tax_rates: nil,
1388
- trial: nil
1389
- )
1390
- @billing_thresholds = billing_thresholds
1391
- @discounts = discounts
1392
- @metadata = metadata
1393
- @plan = plan
1394
- @price = price
1395
- @price_data = price_data
1396
- @quantity = quantity
1397
- @tax_rates = tax_rates
1398
- @trial = trial
1399
- end
1400
- end
1401
-
1402
- class PauseCollection < Stripe::RequestParams
1403
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1404
- attr_accessor :behavior
1405
-
1406
- def initialize(behavior: nil)
1407
- @behavior = behavior
1408
- end
1409
- end
1410
-
1411
- class TransferData < Stripe::RequestParams
1412
- # 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.
1413
- attr_accessor :amount_percent
1414
- # ID of an existing, connected Stripe account.
1415
- attr_accessor :destination
1416
-
1417
- def initialize(amount_percent: nil, destination: nil)
1418
- @amount_percent = amount_percent
1419
- @destination = destination
1420
- end
1421
- end
1422
-
1423
- class TrialSettings < Stripe::RequestParams
1424
- class EndBehavior < Stripe::RequestParams
1425
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1426
- attr_accessor :prorate_up_front
1427
-
1428
- def initialize(prorate_up_front: nil)
1429
- @prorate_up_front = prorate_up_front
1430
- end
1431
- end
1432
- # Defines how the subscription should behave when a trial ends.
1433
- attr_accessor :end_behavior
1434
-
1435
- def initialize(end_behavior: nil)
1436
- @end_behavior = end_behavior
1437
- end
1438
- end
1439
- # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
1440
- attr_accessor :add_invoice_items
1441
- # 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).
1442
- attr_accessor :application_fee_percent
1443
- # Automatic tax settings for this phase.
1444
- attr_accessor :automatic_tax
1445
- # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
1446
- attr_accessor :billing_cycle_anchor
1447
- # 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.
1448
- attr_accessor :billing_thresholds
1449
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing 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` on creation.
1450
- attr_accessor :collection_method
1451
- # 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).
1452
- attr_accessor :currency
1453
- # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
1454
- attr_accessor :default_payment_method
1455
- # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
1456
- attr_accessor :default_tax_rates
1457
- # Subscription 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.
1458
- attr_accessor :description
1459
- # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
1460
- attr_accessor :discounts
1461
- # The number of intervals the phase should last. If set, `end_date` must not be set.
1462
- attr_accessor :duration
1463
- # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
1464
- attr_accessor :end_date
1465
- # All invoices will be billed using the specified settings.
1466
- attr_accessor :invoice_settings
1467
- # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
1468
- attr_accessor :items
1469
- # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
1470
- attr_accessor :iterations
1471
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
1472
- attr_accessor :metadata
1473
- # The account on behalf of which to charge, for each of the associated subscription's invoices.
1474
- attr_accessor :on_behalf_of
1475
- # 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).
1476
- attr_accessor :pause_collection
1477
- # Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
1478
- attr_accessor :proration_behavior
1479
- # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
1480
- attr_accessor :start_date
1481
- # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1482
- attr_accessor :transfer_data
1483
- # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1484
- attr_accessor :trial
1485
- # Specify trial behavior when crossing phase boundaries
1486
- attr_accessor :trial_continuation
1487
- # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
1488
- attr_accessor :trial_end
1489
- # Settings related to subscription trials.
1490
- attr_accessor :trial_settings
1491
-
1492
- def initialize(
1493
- add_invoice_items: nil,
1494
- application_fee_percent: nil,
1495
- automatic_tax: nil,
1496
- billing_cycle_anchor: nil,
1497
- billing_thresholds: nil,
1498
- collection_method: nil,
1499
- currency: nil,
1500
- default_payment_method: nil,
1501
- default_tax_rates: nil,
1502
- description: nil,
1503
- discounts: nil,
1504
- duration: nil,
1505
- end_date: nil,
1506
- invoice_settings: nil,
1507
- items: nil,
1508
- iterations: nil,
1509
- metadata: nil,
1510
- on_behalf_of: nil,
1511
- pause_collection: nil,
1512
- proration_behavior: nil,
1513
- start_date: nil,
1514
- transfer_data: nil,
1515
- trial: nil,
1516
- trial_continuation: nil,
1517
- trial_end: nil,
1518
- trial_settings: nil
1519
- )
1520
- @add_invoice_items = add_invoice_items
1521
- @application_fee_percent = application_fee_percent
1522
- @automatic_tax = automatic_tax
1523
- @billing_cycle_anchor = billing_cycle_anchor
1524
- @billing_thresholds = billing_thresholds
1525
- @collection_method = collection_method
1526
- @currency = currency
1527
- @default_payment_method = default_payment_method
1528
- @default_tax_rates = default_tax_rates
1529
- @description = description
1530
- @discounts = discounts
1531
- @duration = duration
1532
- @end_date = end_date
1533
- @invoice_settings = invoice_settings
1534
- @items = items
1535
- @iterations = iterations
1536
- @metadata = metadata
1537
- @on_behalf_of = on_behalf_of
1538
- @pause_collection = pause_collection
1539
- @proration_behavior = proration_behavior
1540
- @start_date = start_date
1541
- @transfer_data = transfer_data
1542
- @trial = trial
1543
- @trial_continuation = trial_continuation
1544
- @trial_end = trial_end
1545
- @trial_settings = trial_settings
1546
- end
1547
- end
1548
-
1549
- class Prebilling < Stripe::RequestParams
1550
- # This is used to determine the number of billing cycles to prebill.
1551
- attr_accessor :iterations
1552
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
1553
- attr_accessor :update_behavior
1554
-
1555
- def initialize(iterations: nil, update_behavior: nil)
1556
- @iterations = iterations
1557
- @update_behavior = update_behavior
1558
- end
1559
- end
1560
- # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
1561
- attr_accessor :billing_behavior
1562
- # Object representing the subscription schedule's default settings.
1563
- attr_accessor :default_settings
1564
- # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
1565
- attr_accessor :end_behavior
1566
- # Specifies which fields in the response should be expanded.
1567
- attr_accessor :expand
1568
- # 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`.
1569
- attr_accessor :metadata
1570
- # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
1571
- attr_accessor :phases
1572
- # If specified, the invoicing for the given billing cycle iterations will be processed now.
1573
- attr_accessor :prebilling
1574
- # If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
1575
- attr_accessor :proration_behavior
1576
-
1577
- def initialize(
1578
- billing_behavior: nil,
1579
- default_settings: nil,
1580
- end_behavior: nil,
1581
- expand: nil,
1582
- metadata: nil,
1583
- phases: nil,
1584
- prebilling: nil,
1585
- proration_behavior: nil
1586
- )
1587
- @billing_behavior = billing_behavior
1588
- @default_settings = default_settings
1589
- @end_behavior = end_behavior
1590
- @expand = expand
1591
- @metadata = metadata
1592
- @phases = phases
1593
- @prebilling = prebilling
1594
- @proration_behavior = proration_behavior
1595
- end
1596
- end
1597
-
1598
- class AmendParams < Stripe::RequestParams
1599
- class Amendment < Stripe::RequestParams
1600
- class AmendmentEnd < Stripe::RequestParams
1601
- class DiscountEnd < Stripe::RequestParams
1602
- # The ID of a specific discount.
1603
- attr_accessor :discount
1604
-
1605
- def initialize(discount: nil)
1606
- @discount = discount
1607
- end
1608
- end
1609
-
1610
- class Duration < Stripe::RequestParams
1611
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1612
- attr_accessor :interval
1613
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1614
- attr_accessor :interval_count
1615
-
1616
- def initialize(interval: nil, interval_count: nil)
1617
- @interval = interval
1618
- @interval_count = interval_count
1619
- end
1620
- end
1621
- # Use the `end` time of a given discount.
1622
- attr_accessor :discount_end
1623
- # Time span for the amendment starting from the `amendment_start`.
1624
- attr_accessor :duration
1625
- # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
1626
- attr_accessor :timestamp
1627
- # Select one of three ways to pass the `amendment_end`.
1628
- attr_accessor :type
1629
-
1630
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
1631
- @discount_end = discount_end
1632
- @duration = duration
1633
- @timestamp = timestamp
1634
- @type = type
1635
- end
1636
- end
1637
-
1638
- class AmendmentStart < Stripe::RequestParams
1639
- class AmendmentEnd < Stripe::RequestParams
1640
- # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
1641
- attr_accessor :index
1642
-
1643
- def initialize(index: nil)
1644
- @index = index
1645
- end
1646
- end
1647
-
1648
- class DiscountEnd < Stripe::RequestParams
1649
- # The ID of a specific discount.
1650
- attr_accessor :discount
1651
-
1652
- def initialize(discount: nil)
1653
- @discount = discount
1654
- end
1655
- end
1656
- # Details of another amendment in the same array, immediately after which this amendment should begin.
1657
- attr_accessor :amendment_end
1658
- # Use the `end` time of a given discount.
1659
- attr_accessor :discount_end
1660
- # A precise Unix timestamp for the amendment to start.
1661
- attr_accessor :timestamp
1662
- # Select one of three ways to pass the `amendment_start`.
1663
- attr_accessor :type
1664
-
1665
- def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
1666
- @amendment_end = amendment_end
1667
- @discount_end = discount_end
1668
- @timestamp = timestamp
1669
- @type = type
1670
- end
1671
- end
1672
-
1673
- class DiscountAction < Stripe::RequestParams
1674
- class Add < Stripe::RequestParams
1675
- class DiscountEnd < Stripe::RequestParams
1676
- # The type of calculation made to determine when the discount ends.
1677
- attr_accessor :type
1678
-
1679
- def initialize(type: nil)
1680
- @type = type
1681
- end
1682
- end
1683
- # The coupon code to redeem.
1684
- attr_accessor :coupon
1685
- # An ID of an existing discount for a coupon that was already redeemed.
1686
- attr_accessor :discount
1687
- # Details to determine how long the discount should be applied for.
1688
- attr_accessor :discount_end
1689
- # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array.
1690
- attr_accessor :index
1691
- # The promotion code to redeem.
1692
- attr_accessor :promotion_code
1693
-
1694
- def initialize(
1695
- coupon: nil,
1696
- discount: nil,
1697
- discount_end: nil,
1698
- index: nil,
1699
- promotion_code: nil
1700
- )
1701
- @coupon = coupon
1702
- @discount = discount
1703
- @discount_end = discount_end
1704
- @index = index
1705
- @promotion_code = promotion_code
1706
- end
1707
- end
1708
-
1709
- class Remove < Stripe::RequestParams
1710
- # The coupon code to remove from the `discounts` array.
1711
- attr_accessor :coupon
1712
- # The ID of a discount to remove from the `discounts` array.
1713
- attr_accessor :discount
1714
- # The ID of a promotion code to remove from the `discounts` array.
1715
- attr_accessor :promotion_code
1716
-
1717
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1718
- @coupon = coupon
1719
- @discount = discount
1720
- @promotion_code = promotion_code
1721
- end
1722
- end
1723
-
1724
- class Set < Stripe::RequestParams
1725
- # The coupon code to replace the `discounts` array with.
1726
- attr_accessor :coupon
1727
- # An ID of an existing discount to replace the `discounts` array with.
1728
- attr_accessor :discount
1729
- # An ID of an existing promotion code to replace the `discounts` array with.
1730
- attr_accessor :promotion_code
1731
-
1732
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1733
- @coupon = coupon
1734
- @discount = discount
1735
- @promotion_code = promotion_code
1736
- end
1737
- end
1738
- # Details of the discount to add.
1739
- attr_accessor :add
1740
- # Details of the discount to remove.
1741
- attr_accessor :remove
1742
- # Details of the discount to replace the existing discounts with.
1743
- attr_accessor :set
1744
- # Determines the type of discount action.
1745
- attr_accessor :type
1746
-
1747
- def initialize(add: nil, remove: nil, set: nil, type: nil)
1748
- @add = add
1749
- @remove = remove
1750
- @set = set
1751
- @type = type
1752
- end
1753
- end
1754
-
1755
- class ItemAction < Stripe::RequestParams
1756
- class Add < Stripe::RequestParams
1757
- class Discount < Stripe::RequestParams
1758
- class DiscountEnd < Stripe::RequestParams
1759
- class Duration < Stripe::RequestParams
1760
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1761
- attr_accessor :interval
1762
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1763
- attr_accessor :interval_count
1764
-
1765
- def initialize(interval: nil, interval_count: nil)
1766
- @interval = interval
1767
- @interval_count = interval_count
1768
- end
1769
- end
1770
- # Time span for the redeemed discount.
1771
- attr_accessor :duration
1772
- # A precise Unix timestamp for the discount to end. Must be in the future.
1773
- attr_accessor :timestamp
1774
- # The type of calculation made to determine when the discount ends.
1775
- attr_accessor :type
1776
-
1777
- def initialize(duration: nil, timestamp: nil, type: nil)
1778
- @duration = duration
1779
- @timestamp = timestamp
1780
- @type = type
1781
- end
1782
- end
1783
- # ID of the coupon to create a new discount for.
1784
- attr_accessor :coupon
1785
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1786
- attr_accessor :discount
1787
- # Details to determine how long the discount should be applied for.
1788
- attr_accessor :discount_end
1789
- # ID of the promotion code to create a new discount for.
1790
- attr_accessor :promotion_code
1791
-
1792
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1793
- @coupon = coupon
1794
- @discount = discount
1795
- @discount_end = discount_end
1796
- @promotion_code = promotion_code
1797
- end
1798
- end
1799
-
1800
- class Trial < Stripe::RequestParams
1801
- # 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.
1802
- attr_accessor :converts_to
1803
- # Determines the type of trial for this item.
1804
- attr_accessor :type
1805
-
1806
- def initialize(converts_to: nil, type: nil)
1807
- @converts_to = converts_to
1808
- @type = type
1809
- end
1810
- end
1811
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
1812
- attr_accessor :discounts
1813
- # 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`.
1814
- attr_accessor :metadata
1815
- # The ID of the price object.
1816
- attr_accessor :price
1817
- # Quantity for this item.
1818
- attr_accessor :quantity
1819
- # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
1820
- attr_accessor :tax_rates
1821
- # Options that configure the trial on the subscription item.
1822
- attr_accessor :trial
1823
-
1824
- def initialize(
1825
- discounts: nil,
1826
- metadata: nil,
1827
- price: nil,
1828
- quantity: nil,
1829
- tax_rates: nil,
1830
- trial: nil
1831
- )
1832
- @discounts = discounts
1833
- @metadata = metadata
1834
- @price = price
1835
- @quantity = quantity
1836
- @tax_rates = tax_rates
1837
- @trial = trial
1838
- end
1839
- end
1840
-
1841
- class Remove < Stripe::RequestParams
1842
- # ID of a price to remove.
1843
- attr_accessor :price
1844
-
1845
- def initialize(price: nil)
1846
- @price = price
1847
- end
1848
- end
1849
-
1850
- class Set < Stripe::RequestParams
1851
- class Discount < Stripe::RequestParams
1852
- class DiscountEnd < Stripe::RequestParams
1853
- class Duration < Stripe::RequestParams
1854
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1855
- attr_accessor :interval
1856
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1857
- attr_accessor :interval_count
1858
-
1859
- def initialize(interval: nil, interval_count: nil)
1860
- @interval = interval
1861
- @interval_count = interval_count
1862
- end
1863
- end
1864
- # Time span for the redeemed discount.
1865
- attr_accessor :duration
1866
- # A precise Unix timestamp for the discount to end. Must be in the future.
1867
- attr_accessor :timestamp
1868
- # The type of calculation made to determine when the discount ends.
1869
- attr_accessor :type
1870
-
1871
- def initialize(duration: nil, timestamp: nil, type: nil)
1872
- @duration = duration
1873
- @timestamp = timestamp
1874
- @type = type
1875
- end
1876
- end
1877
- # ID of the coupon to create a new discount for.
1878
- attr_accessor :coupon
1879
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1880
- attr_accessor :discount
1881
- # Details to determine how long the discount should be applied for.
1882
- attr_accessor :discount_end
1883
- # ID of the promotion code to create a new discount for.
1884
- attr_accessor :promotion_code
1885
-
1886
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1887
- @coupon = coupon
1888
- @discount = discount
1889
- @discount_end = discount_end
1890
- @promotion_code = promotion_code
1891
- end
1892
- end
1893
-
1894
- class Trial < Stripe::RequestParams
1895
- # 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.
1896
- attr_accessor :converts_to
1897
- # Determines the type of trial for this item.
1898
- attr_accessor :type
1899
-
1900
- def initialize(converts_to: nil, type: nil)
1901
- @converts_to = converts_to
1902
- @type = type
1903
- end
1904
- end
1905
- # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
1906
- attr_accessor :discounts
1907
- # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
1908
- attr_accessor :metadata
1909
- # The ID of the price object.
1910
- attr_accessor :price
1911
- # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
1912
- attr_accessor :quantity
1913
- # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
1914
- attr_accessor :tax_rates
1915
- # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
1916
- attr_accessor :trial
1917
-
1918
- def initialize(
1919
- discounts: nil,
1920
- metadata: nil,
1921
- price: nil,
1922
- quantity: nil,
1923
- tax_rates: nil,
1924
- trial: nil
1925
- )
1926
- @discounts = discounts
1927
- @metadata = metadata
1928
- @price = price
1929
- @quantity = quantity
1930
- @tax_rates = tax_rates
1931
- @trial = trial
1932
- end
1933
- end
1934
- # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
1935
- attr_accessor :add
1936
- # Details of the subscription item to remove.
1937
- attr_accessor :remove
1938
- # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
1939
- attr_accessor :set
1940
- # Determines the type of item action.
1941
- attr_accessor :type
1942
-
1943
- def initialize(add: nil, remove: nil, set: nil, type: nil)
1944
- @add = add
1945
- @remove = remove
1946
- @set = set
1947
- @type = type
1948
- end
1949
- end
1950
-
1951
- class MetadataAction < Stripe::RequestParams
1952
- # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
1953
- attr_accessor :add
1954
- # Keys to remove from schedule phase metadata.
1955
- attr_accessor :remove
1956
- # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
1957
- attr_accessor :set
1958
- # Select one of three ways to update phase-level `metadata` on subscription schedules.
1959
- attr_accessor :type
1960
-
1961
- def initialize(add: nil, remove: nil, set: nil, type: nil)
1962
- @add = add
1963
- @remove = remove
1964
- @set = set
1965
- @type = type
1966
- end
1967
- end
1968
-
1969
- class SetPauseCollection < Stripe::RequestParams
1970
- class Set < Stripe::RequestParams
1971
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1972
- attr_accessor :behavior
1973
-
1974
- def initialize(behavior: nil)
1975
- @behavior = behavior
1976
- end
1977
- end
1978
- # Details of the pause_collection behavior to apply to the amendment.
1979
- attr_accessor :set
1980
- # Determines the type of the pause_collection amendment.
1981
- attr_accessor :type
1982
-
1983
- def initialize(set: nil, type: nil)
1984
- @set = set
1985
- @type = type
1986
- end
1987
- end
1988
-
1989
- class TrialSettings < Stripe::RequestParams
1990
- class EndBehavior < Stripe::RequestParams
1991
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1992
- attr_accessor :prorate_up_front
1993
-
1994
- def initialize(prorate_up_front: nil)
1995
- @prorate_up_front = prorate_up_front
1996
- end
1997
- end
1998
- # Defines how the subscription should behave when a trial ends.
1999
- attr_accessor :end_behavior
2000
-
2001
- def initialize(end_behavior: nil)
2002
- @end_behavior = end_behavior
2003
- end
2004
- end
2005
- # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
2006
- attr_accessor :amendment_end
2007
- # Details to identify the earliest timestamp where the proposed change should take effect.
2008
- attr_accessor :amendment_start
2009
- # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
2010
- attr_accessor :billing_cycle_anchor
2011
- # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
2012
- attr_accessor :discount_actions
2013
- # Changes to the subscription items during the amendment time span.
2014
- attr_accessor :item_actions
2015
- # Instructions for how to modify phase metadata
2016
- attr_accessor :metadata_actions
2017
- # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
2018
- attr_accessor :proration_behavior
2019
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2020
- attr_accessor :set_pause_collection
2021
- # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
2022
- attr_accessor :set_schedule_end
2023
- # Settings related to subscription trials.
2024
- attr_accessor :trial_settings
2025
-
2026
- def initialize(
2027
- amendment_end: nil,
2028
- amendment_start: nil,
2029
- billing_cycle_anchor: nil,
2030
- discount_actions: nil,
2031
- item_actions: nil,
2032
- metadata_actions: nil,
2033
- proration_behavior: nil,
2034
- set_pause_collection: nil,
2035
- set_schedule_end: nil,
2036
- trial_settings: nil
2037
- )
2038
- @amendment_end = amendment_end
2039
- @amendment_start = amendment_start
2040
- @billing_cycle_anchor = billing_cycle_anchor
2041
- @discount_actions = discount_actions
2042
- @item_actions = item_actions
2043
- @metadata_actions = metadata_actions
2044
- @proration_behavior = proration_behavior
2045
- @set_pause_collection = set_pause_collection
2046
- @set_schedule_end = set_schedule_end
2047
- @trial_settings = trial_settings
2048
- end
2049
- end
2050
-
2051
- class Prebilling < Stripe::RequestParams
2052
- class BillFrom < Stripe::RequestParams
2053
- class AmendmentStart < Stripe::RequestParams
2054
- # The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments.
2055
- attr_accessor :index
2056
-
2057
- def initialize(index: nil)
2058
- @index = index
2059
- end
2060
- end
2061
- # Start the prebilled period when a specified amendment begins.
2062
- attr_accessor :amendment_start
2063
- # Start the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2064
- attr_accessor :timestamp
2065
- # Select one of several ways to pass the `bill_from` value.
2066
- attr_accessor :type
2067
-
2068
- def initialize(amendment_start: nil, timestamp: nil, type: nil)
2069
- @amendment_start = amendment_start
2070
- @timestamp = timestamp
2071
- @type = type
2072
- end
2073
- end
2074
-
2075
- class BillUntil < Stripe::RequestParams
2076
- class AmendmentEnd < Stripe::RequestParams
2077
- # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
2078
- attr_accessor :index
2079
-
2080
- def initialize(index: nil)
2081
- @index = index
2082
- end
2083
- end
2084
-
2085
- class Duration < Stripe::RequestParams
2086
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2087
- attr_accessor :interval
2088
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2089
- attr_accessor :interval_count
2090
-
2091
- def initialize(interval: nil, interval_count: nil)
2092
- @interval = interval
2093
- @interval_count = interval_count
2094
- end
2095
- end
2096
- # End the prebilled period when a specified amendment ends.
2097
- attr_accessor :amendment_end
2098
- # Time span for prebilling, starting from `bill_from`.
2099
- attr_accessor :duration
2100
- # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
2101
- attr_accessor :timestamp
2102
- # Select one of several ways to pass the `bill_until` value.
2103
- attr_accessor :type
2104
-
2105
- def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
2106
- @amendment_end = amendment_end
2107
- @duration = duration
2108
- @timestamp = timestamp
2109
- @type = type
2110
- end
2111
- end
2112
- # The beginning of the prebilled time period. The default value is `now`.
2113
- attr_accessor :bill_from
2114
- # The end of the prebilled time period.
2115
- attr_accessor :bill_until
2116
- # When the prebilling invoice should be created. The default value is `now`.
2117
- attr_accessor :invoice_at
2118
- # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`.
2119
- attr_accessor :update_behavior
2120
-
2121
- def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil)
2122
- @bill_from = bill_from
2123
- @bill_until = bill_until
2124
- @invoice_at = invoice_at
2125
- @update_behavior = update_behavior
2126
- end
2127
- end
2128
-
2129
- class ScheduleSettings < Stripe::RequestParams
2130
- # Behavior of the subscription schedule and underlying subscription when it ends.
2131
- attr_accessor :end_behavior
2132
-
2133
- def initialize(end_behavior: nil)
2134
- @end_behavior = end_behavior
2135
- end
2136
- end
2137
- # Changes to apply to the phases of the subscription schedule, in the order provided.
2138
- attr_accessor :amendments
2139
- # Specifies which fields in the response should be expanded.
2140
- attr_accessor :expand
2141
- # Provide any time periods to bill in advance.
2142
- attr_accessor :prebilling
2143
- # In cases where the amendment changes the currently active phase,
2144
- # specifies if and how to prorate at the time of the request.
2145
- attr_accessor :proration_behavior
2146
- # Changes to apply to the subscription schedule.
2147
- attr_accessor :schedule_settings
2148
-
2149
- def initialize(
2150
- amendments: nil,
2151
- expand: nil,
2152
- prebilling: nil,
2153
- proration_behavior: nil,
2154
- schedule_settings: nil
2155
- )
2156
- @amendments = amendments
2157
- @expand = expand
2158
- @prebilling = prebilling
2159
- @proration_behavior = proration_behavior
2160
- @schedule_settings = schedule_settings
2161
- end
2162
- end
2163
-
2164
- class CancelParams < Stripe::RequestParams
2165
- # Specifies which fields in the response should be expanded.
2166
- attr_accessor :expand
2167
- # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`.
2168
- attr_accessor :invoice_now
2169
- # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`.
2170
- attr_accessor :prorate
2171
-
2172
- def initialize(expand: nil, invoice_now: nil, prorate: nil)
2173
- @expand = expand
2174
- @invoice_now = invoice_now
2175
- @prorate = prorate
2176
- end
2177
- end
2178
-
2179
- class ReleaseParams < Stripe::RequestParams
2180
- # Specifies which fields in the response should be expanded.
2181
- attr_accessor :expand
2182
- # Keep any cancellation on the subscription that the schedule has set
2183
- attr_accessor :preserve_cancel_date
2184
-
2185
- def initialize(expand: nil, preserve_cancel_date: nil)
2186
- @expand = expand
2187
- @preserve_cancel_date = preserve_cancel_date
2188
- end
2189
- end
2190
-
2191
- # Amends an existing subscription schedule.
2192
- def amend(schedule, params = {}, opts = {})
2193
- request(
2194
- method: :post,
2195
- path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
2196
- params: params,
2197
- opts: opts,
2198
- base_address: :api
2199
- )
2200
- end
2201
-
2202
6
  # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
2203
7
  def cancel(schedule, params = {}, opts = {})
2204
8
  request(