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