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
@@ -7,7 +7,6 @@ module Stripe
7
7
  class Quote < APIResource
8
8
  extend Stripe::APIOperations::Create
9
9
  extend Stripe::APIOperations::List
10
- extend Stripe::APIOperations::NestedResource
11
10
  include Stripe::APIOperations::Save
12
11
 
13
12
  OBJECT_NAME = "quote"
@@ -15,15 +14,20 @@ module Stripe
15
14
  "quote"
16
15
  end
17
16
 
18
- nested_resource_class_methods :preview_invoice, operations: %i[list]
19
- nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
20
-
21
17
  class AutomaticTax < Stripe::StripeObject
22
18
  class Liability < Stripe::StripeObject
23
19
  # The connected account being referenced when `type` is `account`.
24
20
  attr_reader :account
25
21
  # Type of the account referenced.
26
22
  attr_reader :type
23
+
24
+ def self.inner_class_types
25
+ @inner_class_types = {}
26
+ end
27
+
28
+ def self.field_remappings
29
+ @field_remappings = {}
30
+ end
27
31
  end
28
32
  # Automatically calculate taxes
29
33
  attr_reader :enabled
@@ -33,24 +37,17 @@ module Stripe
33
37
  attr_reader :provider
34
38
  # The status of the most recent automated tax calculation for this quote.
35
39
  attr_reader :status
36
- end
37
40
 
38
- class Computed < Stripe::StripeObject
39
- class LastReestimationDetails < Stripe::StripeObject
40
- class Failed < Stripe::StripeObject
41
- # The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field.
42
- attr_reader :failure_code
43
- # Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID".
44
- attr_reader :message
45
- # The reason the reestimation failed.
46
- attr_reader :reason
47
- end
48
- # When `status` is `failed`, provides details about the quote reestimation failure.
49
- attr_reader :failed
50
- # Latest status of the reestimation.
51
- attr_reader :status
41
+ def self.inner_class_types
42
+ @inner_class_types = { liability: Liability }
52
43
  end
53
44
 
45
+ def self.field_remappings
46
+ @field_remappings = {}
47
+ end
48
+ end
49
+
50
+ class Computed < Stripe::StripeObject
54
51
  class Recurring < Stripe::StripeObject
55
52
  class TotalDetails < Stripe::StripeObject
56
53
  class Breakdown < Stripe::StripeObject
@@ -62,6 +59,14 @@ module Stripe
62
59
  #
63
60
  # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
64
61
  attr_reader :discount
62
+
63
+ def self.inner_class_types
64
+ @inner_class_types = {}
65
+ end
66
+
67
+ def self.field_remappings
68
+ @field_remappings = {}
69
+ end
65
70
  end
66
71
 
67
72
  class Tax < Stripe::StripeObject
@@ -75,11 +80,27 @@ module Stripe
75
80
  attr_reader :taxability_reason
76
81
  # The amount on which tax is calculated, in cents (or local equivalent).
77
82
  attr_reader :taxable_amount
83
+
84
+ def self.inner_class_types
85
+ @inner_class_types = {}
86
+ end
87
+
88
+ def self.field_remappings
89
+ @field_remappings = {}
90
+ end
78
91
  end
79
92
  # The aggregated discounts.
80
93
  attr_reader :discounts
81
94
  # The aggregated tax amounts by rate.
82
95
  attr_reader :taxes
96
+
97
+ def self.inner_class_types
98
+ @inner_class_types = { discounts: Discount, taxes: Tax }
99
+ end
100
+
101
+ def self.field_remappings
102
+ @field_remappings = {}
103
+ end
83
104
  end
84
105
  # This is the sum of all the discounts.
85
106
  attr_reader :amount_discount
@@ -89,6 +110,14 @@ module Stripe
89
110
  attr_reader :amount_tax
90
111
  # Attribute for field breakdown
91
112
  attr_reader :breakdown
113
+
114
+ def self.inner_class_types
115
+ @inner_class_types = { breakdown: Breakdown }
116
+ end
117
+
118
+ def self.field_remappings
119
+ @field_remappings = {}
120
+ end
92
121
  end
93
122
  # Total before any discounts or taxes are applied.
94
123
  attr_reader :amount_subtotal
@@ -100,6 +129,14 @@ module Stripe
100
129
  attr_reader :interval_count
101
130
  # Attribute for field total_details
102
131
  attr_reader :total_details
132
+
133
+ def self.inner_class_types
134
+ @inner_class_types = { total_details: TotalDetails }
135
+ end
136
+
137
+ def self.field_remappings
138
+ @field_remappings = {}
139
+ end
103
140
  end
104
141
 
105
142
  class Upfront < Stripe::StripeObject
@@ -113,6 +150,14 @@ module Stripe
113
150
  #
114
151
  # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
115
152
  attr_reader :discount
153
+
154
+ def self.inner_class_types
155
+ @inner_class_types = {}
156
+ end
157
+
158
+ def self.field_remappings
159
+ @field_remappings = {}
160
+ end
116
161
  end
117
162
 
118
163
  class Tax < Stripe::StripeObject
@@ -126,2686 +171,271 @@ module Stripe
126
171
  attr_reader :taxability_reason
127
172
  # The amount on which tax is calculated, in cents (or local equivalent).
128
173
  attr_reader :taxable_amount
129
- end
130
- # The aggregated discounts.
131
- attr_reader :discounts
132
- # The aggregated tax amounts by rate.
133
- attr_reader :taxes
134
- end
135
- # This is the sum of all the discounts.
136
- attr_reader :amount_discount
137
- # This is the sum of all the shipping amounts.
138
- attr_reader :amount_shipping
139
- # This is the sum of all the tax amounts.
140
- attr_reader :amount_tax
141
- # Attribute for field breakdown
142
- attr_reader :breakdown
143
- end
144
- # Total before any discounts or taxes are applied.
145
- attr_reader :amount_subtotal
146
- # Total after discounts and taxes are applied.
147
- attr_reader :amount_total
148
- # The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.
149
- attr_reader :line_items
150
- # Attribute for field total_details
151
- attr_reader :total_details
152
- end
153
- # Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation.
154
- attr_reader :last_reestimation_details
155
- # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
156
- attr_reader :recurring
157
- # The time at which the quote's estimated schedules and upcoming invoices were generated.
158
- attr_reader :updated_at
159
- # Attribute for field upfront
160
- attr_reader :upfront
161
- end
162
-
163
- class FromQuote < Stripe::StripeObject
164
- # Whether this quote is a revision of a different quote.
165
- attr_reader :is_revision
166
- # The quote that was cloned.
167
- attr_reader :quote
168
- end
169
-
170
- class InvoiceSettings < Stripe::StripeObject
171
- class Issuer < Stripe::StripeObject
172
- # The connected account being referenced when `type` is `account`.
173
- attr_reader :account
174
- # Type of the account referenced.
175
- attr_reader :type
176
- end
177
- # Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
178
- attr_reader :days_until_due
179
- # Attribute for field issuer
180
- attr_reader :issuer
181
- end
182
-
183
- class StatusDetails < Stripe::StripeObject
184
- class Canceled < Stripe::StripeObject
185
- # The reason this quote was marked as canceled.
186
- attr_reader :reason
187
- # Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch.
188
- attr_reader :transitioned_at
189
- end
190
-
191
- class Stale < Stripe::StripeObject
192
- class LastReason < Stripe::StripeObject
193
- class LinesInvalid < Stripe::StripeObject
194
- # The timestamp at which the lines were marked as invalid.
195
- attr_reader :invalid_at
196
- # The list of lines that became invalid at the given timestamp.
197
- attr_reader :lines
198
- end
199
-
200
- class SubscriptionChanged < Stripe::StripeObject
201
- # The subscription's state before the quote was marked as stale.
202
- attr_reader :previous_subscription
203
- end
204
-
205
- class SubscriptionScheduleChanged < Stripe::StripeObject
206
- # The subscription schedule's state before the quote was marked as stale.
207
- attr_reader :previous_subscription_schedule
208
- end
209
- # The ID of the line that is invalid if the stale reason type is `line_invalid`.
210
- attr_reader :line_invalid
211
- # The IDs of the lines that are invalid if the stale reason type is `lines_invalid`.
212
- attr_reader :lines_invalid
213
- # The user supplied mark stale reason.
214
- attr_reader :marked_stale
215
- # The ID of the subscription that was canceled.
216
- attr_reader :subscription_canceled
217
- # Attribute for field subscription_changed
218
- attr_reader :subscription_changed
219
- # The ID of the subscription that was expired.
220
- attr_reader :subscription_expired
221
- # The ID of the subscription schedule that was canceled.
222
- attr_reader :subscription_schedule_canceled
223
- # Attribute for field subscription_schedule_changed
224
- attr_reader :subscription_schedule_changed
225
- # The ID of the subscription schedule that was released.
226
- attr_reader :subscription_schedule_released
227
- # The reason the quote was marked as stale.
228
- attr_reader :type
229
- end
230
- # Time at which the quote expires. Measured in seconds since the Unix epoch.
231
- attr_reader :expires_at
232
- # The most recent reason this quote was marked as stale.
233
- attr_reader :last_reason
234
- # Time at which the stale reason was updated. Measured in seconds since the Unix epoch.
235
- attr_reader :last_updated_at
236
- # Time at which the quote was marked as stale. Measured in seconds since the Unix epoch.
237
- attr_reader :transitioned_at
238
- end
239
- # Attribute for field canceled
240
- attr_reader :canceled
241
- # Attribute for field stale
242
- attr_reader :stale
243
- end
244
-
245
- class StatusTransitions < Stripe::StripeObject
246
- # The time that the quote was accepted. Measured in seconds since Unix epoch.
247
- attr_reader :accepted_at
248
- # The time that the quote was canceled. Measured in seconds since Unix epoch.
249
- attr_reader :canceled_at
250
- # The time that the quote was finalized. Measured in seconds since Unix epoch.
251
- attr_reader :finalized_at
252
- end
253
-
254
- class SubscriptionData < Stripe::StripeObject
255
- class BillOnAcceptance < Stripe::StripeObject
256
- class BillFrom < Stripe::StripeObject
257
- class LineStartsAt < Stripe::StripeObject
258
- # Unique identifier for the object.
259
- attr_reader :id
260
- end
261
- # The materialized time.
262
- attr_reader :computed
263
- # The timestamp the given line starts at.
264
- attr_reader :line_starts_at
265
- # A precise Unix timestamp.
266
- attr_reader :timestamp
267
- # The type of method to specify the `bill_from` time.
268
- attr_reader :type
269
- end
270
-
271
- class BillUntil < Stripe::StripeObject
272
- class Duration < Stripe::StripeObject
273
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
274
- attr_reader :interval
275
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
276
- attr_reader :interval_count
277
- end
278
-
279
- class LineEndsAt < Stripe::StripeObject
280
- # Unique identifier for the object.
281
- attr_reader :id
282
- end
283
- # The materialized time.
284
- attr_reader :computed
285
- # Time span for the quote line starting from the `starts_at` date.
286
- attr_reader :duration
287
- # The timestamp the given line ends at.
288
- attr_reader :line_ends_at
289
- # A precise Unix timestamp.
290
- attr_reader :timestamp
291
- # The type of method to specify the `bill_until` time.
292
- attr_reader :type
293
- end
294
- # The start of the period to bill from when the Quote is accepted.
295
- attr_reader :bill_from
296
- # The end of the period to bill until when the Quote is accepted.
297
- attr_reader :bill_until
298
- end
299
174
 
300
- class BillingMode < Stripe::StripeObject
301
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
302
- attr_reader :type
303
- end
304
-
305
- class Prebilling < Stripe::StripeObject
306
- # Attribute for field iterations
307
- attr_reader :iterations
308
- end
309
- # Describes the period to bill for upon accepting the quote.
310
- attr_reader :bill_on_acceptance
311
- # 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.
312
- attr_reader :billing_behavior
313
- # Whether the subscription will always start a new billing period when the quote is accepted.
314
- attr_reader :billing_cycle_anchor
315
- # The billing mode of the quote.
316
- attr_reader :billing_mode
317
- # 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.
318
- attr_reader :description
319
- # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
320
- attr_reader :effective_date
321
- # Behavior of the subscription schedule and underlying subscription when it ends.
322
- attr_reader :end_behavior
323
- # The id of the subscription that will be updated when the quote is accepted.
324
- attr_reader :from_subscription
325
- # 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.
326
- attr_reader :metadata
327
- # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
328
- attr_reader :prebilling
329
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
330
- attr_reader :proration_behavior
331
- # Integer representing the number of trial period days before the customer is charged for the first time.
332
- attr_reader :trial_period_days
333
- end
334
-
335
- class SubscriptionDataOverride < Stripe::StripeObject
336
- class AppliesTo < Stripe::StripeObject
337
- # 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.
338
- attr_reader :new_reference
339
- # The ID of the schedule the line applies to.
340
- attr_reader :subscription_schedule
341
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
342
- attr_reader :type
343
- end
344
-
345
- class BillOnAcceptance < Stripe::StripeObject
346
- class BillFrom < Stripe::StripeObject
347
- class LineStartsAt < Stripe::StripeObject
348
- # Unique identifier for the object.
349
- attr_reader :id
350
- end
351
- # The materialized time.
352
- attr_reader :computed
353
- # The timestamp the given line starts at.
354
- attr_reader :line_starts_at
355
- # A precise Unix timestamp.
356
- attr_reader :timestamp
357
- # The type of method to specify the `bill_from` time.
358
- attr_reader :type
359
- end
360
-
361
- class BillUntil < Stripe::StripeObject
362
- class Duration < Stripe::StripeObject
363
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
364
- attr_reader :interval
365
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
366
- attr_reader :interval_count
367
- end
368
-
369
- class LineEndsAt < Stripe::StripeObject
370
- # Unique identifier for the object.
371
- attr_reader :id
372
- end
373
- # The materialized time.
374
- attr_reader :computed
375
- # Time span for the quote line starting from the `starts_at` date.
376
- attr_reader :duration
377
- # The timestamp the given line ends at.
378
- attr_reader :line_ends_at
379
- # A precise Unix timestamp.
380
- attr_reader :timestamp
381
- # The type of method to specify the `bill_until` time.
382
- attr_reader :type
383
- end
384
- # The start of the period to bill from when the Quote is accepted.
385
- attr_reader :bill_from
386
- # The end of the period to bill until when the Quote is accepted.
387
- attr_reader :bill_until
388
- end
389
- # Attribute for field applies_to
390
- attr_reader :applies_to
391
- # Describes the period to bill for upon accepting the quote.
392
- attr_reader :bill_on_acceptance
393
- # 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.
394
- attr_reader :billing_behavior
395
- # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
396
- attr_reader :customer
397
- # 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.
398
- attr_reader :description
399
- # Behavior of the subscription schedule and underlying subscription when it ends.
400
- attr_reader :end_behavior
401
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted.
402
- attr_reader :proration_behavior
403
- end
404
-
405
- class SubscriptionSchedule < Stripe::StripeObject
406
- class AppliesTo < Stripe::StripeObject
407
- # 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.
408
- attr_reader :new_reference
409
- # The ID of the schedule the line applies to.
410
- attr_reader :subscription_schedule
411
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
412
- attr_reader :type
413
- end
414
- # Attribute for field applies_to
415
- attr_reader :applies_to
416
- # The subscription schedule that was created or updated from this quote.
417
- attr_reader :subscription_schedule
418
- end
419
-
420
- class TotalDetails < Stripe::StripeObject
421
- class Breakdown < Stripe::StripeObject
422
- class Discount < Stripe::StripeObject
423
- # The amount discounted.
424
- attr_reader :amount
425
- # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
426
- # It contains information about when the discount began, when it will end, and what it is applied to.
427
- #
428
- # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
429
- attr_reader :discount
430
- end
431
-
432
- class Tax < Stripe::StripeObject
433
- # Amount of tax applied for this rate.
434
- attr_reader :amount
435
- # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
436
- #
437
- # Related guide: [Tax rates](/billing/taxes/tax-rates)
438
- attr_reader :rate
439
- # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
440
- attr_reader :taxability_reason
441
- # The amount on which tax is calculated, in cents (or local equivalent).
442
- attr_reader :taxable_amount
443
- end
444
- # The aggregated discounts.
445
- attr_reader :discounts
446
- # The aggregated tax amounts by rate.
447
- attr_reader :taxes
448
- end
449
- # This is the sum of all the discounts.
450
- attr_reader :amount_discount
451
- # This is the sum of all the shipping amounts.
452
- attr_reader :amount_shipping
453
- # This is the sum of all the tax amounts.
454
- attr_reader :amount_tax
455
- # Attribute for field breakdown
456
- attr_reader :breakdown
457
- end
458
-
459
- class TransferData < Stripe::StripeObject
460
- # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.
461
- attr_reader :amount
462
- # 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 will be transferred to the destination.
463
- attr_reader :amount_percent
464
- # The account where funds from the payment will be transferred to upon payment success.
465
- attr_reader :destination
466
- end
467
-
468
- class ListParams < Stripe::RequestParams
469
- # The ID of the customer whose quotes will be retrieved.
470
- attr_accessor :customer
471
- # The ID of the account whose quotes will be retrieved.
472
- attr_accessor :customer_account
473
- # 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.
474
- attr_accessor :ending_before
475
- # Specifies which fields in the response should be expanded.
476
- attr_accessor :expand
477
- # The subscription which the quote updates.
478
- attr_accessor :from_subscription
479
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
480
- attr_accessor :limit
481
- # 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.
482
- attr_accessor :starting_after
483
- # The status of the quote.
484
- attr_accessor :status
485
- # 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.
486
- attr_accessor :test_clock
487
-
488
- def initialize(
489
- customer: nil,
490
- customer_account: nil,
491
- ending_before: nil,
492
- expand: nil,
493
- from_subscription: nil,
494
- limit: nil,
495
- starting_after: nil,
496
- status: nil,
497
- test_clock: nil
498
- )
499
- @customer = customer
500
- @customer_account = customer_account
501
- @ending_before = ending_before
502
- @expand = expand
503
- @from_subscription = from_subscription
504
- @limit = limit
505
- @starting_after = starting_after
506
- @status = status
507
- @test_clock = test_clock
508
- end
509
- end
510
-
511
- class CreateParams < Stripe::RequestParams
512
- class AutomaticTax < Stripe::RequestParams
513
- class Liability < Stripe::RequestParams
514
- # The connected account being referenced when `type` is `account`.
515
- attr_accessor :account
516
- # Type of the account referenced in the request.
517
- attr_accessor :type
518
-
519
- def initialize(account: nil, type: nil)
520
- @account = account
521
- @type = type
522
- end
523
- end
524
- # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
525
- attr_accessor :enabled
526
- # 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.
527
- attr_accessor :liability
528
-
529
- def initialize(enabled: nil, liability: nil)
530
- @enabled = enabled
531
- @liability = liability
532
- end
533
- end
534
-
535
- class Discount < Stripe::RequestParams
536
- class DiscountEnd < Stripe::RequestParams
537
- class Duration < Stripe::RequestParams
538
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
539
- attr_accessor :interval
540
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
541
- attr_accessor :interval_count
542
-
543
- def initialize(interval: nil, interval_count: nil)
544
- @interval = interval
545
- @interval_count = interval_count
546
- end
547
- end
548
- # Time span for the redeemed discount.
549
- attr_accessor :duration
550
- # A precise Unix timestamp for the discount to end. Must be in the future.
551
- attr_accessor :timestamp
552
- # The type of calculation made to determine when the discount ends.
553
- attr_accessor :type
554
-
555
- def initialize(duration: nil, timestamp: nil, type: nil)
556
- @duration = duration
557
- @timestamp = timestamp
558
- @type = type
559
- end
560
- end
561
- # ID of the coupon to create a new discount for.
562
- attr_accessor :coupon
563
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
564
- attr_accessor :discount
565
- # Details to determine how long the discount should be applied for.
566
- attr_accessor :discount_end
567
- # ID of the promotion code to create a new discount for.
568
- attr_accessor :promotion_code
569
-
570
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
571
- @coupon = coupon
572
- @discount = discount
573
- @discount_end = discount_end
574
- @promotion_code = promotion_code
575
- end
576
- end
577
-
578
- class FromQuote < Stripe::RequestParams
579
- # Whether this quote is a revision of the previous quote.
580
- attr_accessor :is_revision
581
- # The `id` of the quote that will be cloned.
582
- attr_accessor :quote
583
-
584
- def initialize(is_revision: nil, quote: nil)
585
- @is_revision = is_revision
586
- @quote = quote
587
- end
588
- end
589
-
590
- class InvoiceSettings < Stripe::RequestParams
591
- class Issuer < Stripe::RequestParams
592
- # The connected account being referenced when `type` is `account`.
593
- attr_accessor :account
594
- # Type of the account referenced in the request.
595
- attr_accessor :type
596
-
597
- def initialize(account: nil, type: nil)
598
- @account = account
599
- @type = type
600
- end
601
- end
602
- # 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`.
603
- attr_accessor :days_until_due
604
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
605
- attr_accessor :issuer
606
-
607
- def initialize(days_until_due: nil, issuer: nil)
608
- @days_until_due = days_until_due
609
- @issuer = issuer
610
- end
611
- end
612
-
613
- class Line < Stripe::RequestParams
614
- class Action < Stripe::RequestParams
615
- class AddDiscount < Stripe::RequestParams
616
- class DiscountEnd < Stripe::RequestParams
617
- # The type of calculation made to determine when the discount ends.
618
- attr_accessor :type
619
-
620
- def initialize(type: nil)
621
- @type = type
175
+ def self.inner_class_types
176
+ @inner_class_types = {}
622
177
  end
623
- end
624
- # The coupon code to redeem.
625
- attr_accessor :coupon
626
- # An ID of an existing discount for a coupon that was already redeemed.
627
- attr_accessor :discount
628
- # Details to determine how long the discount should be applied for.
629
- attr_accessor :discount_end
630
- # 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.
631
- attr_accessor :index
632
- # The promotion code to redeem.
633
- attr_accessor :promotion_code
634
-
635
- def initialize(
636
- coupon: nil,
637
- discount: nil,
638
- discount_end: nil,
639
- index: nil,
640
- promotion_code: nil
641
- )
642
- @coupon = coupon
643
- @discount = discount
644
- @discount_end = discount_end
645
- @index = index
646
- @promotion_code = promotion_code
647
- end
648
- end
649
-
650
- class AddItem < Stripe::RequestParams
651
- class Discount < Stripe::RequestParams
652
- class DiscountEnd < Stripe::RequestParams
653
- class Duration < Stripe::RequestParams
654
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
655
- attr_accessor :interval
656
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
657
- attr_accessor :interval_count
658
-
659
- def initialize(interval: nil, interval_count: nil)
660
- @interval = interval
661
- @interval_count = interval_count
662
- end
663
- end
664
- # Time span for the redeemed discount.
665
- attr_accessor :duration
666
- # A precise Unix timestamp for the discount to end. Must be in the future.
667
- attr_accessor :timestamp
668
- # The type of calculation made to determine when the discount ends.
669
- attr_accessor :type
670
-
671
- def initialize(duration: nil, timestamp: nil, type: nil)
672
- @duration = duration
673
- @timestamp = timestamp
674
- @type = type
675
- end
676
- end
677
- # ID of the coupon to create a new discount for.
678
- attr_accessor :coupon
679
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
680
- attr_accessor :discount
681
- # Details to determine how long the discount should be applied for.
682
- attr_accessor :discount_end
683
- # ID of the promotion code to create a new discount for.
684
- attr_accessor :promotion_code
685
-
686
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
687
- @coupon = coupon
688
- @discount = discount
689
- @discount_end = discount_end
690
- @promotion_code = promotion_code
691
- end
692
- end
693
-
694
- class Trial < Stripe::RequestParams
695
- # 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.
696
- attr_accessor :converts_to
697
- # Determines the type of trial for this item.
698
- attr_accessor :type
699
-
700
- def initialize(converts_to: nil, type: nil)
701
- @converts_to = converts_to
702
- @type = type
703
- end
704
- end
705
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
706
- attr_accessor :discounts
707
- # 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`.
708
- attr_accessor :metadata
709
- # The ID of the price object.
710
- attr_accessor :price
711
- # Quantity for this item.
712
- attr_accessor :quantity
713
- # 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`.
714
- attr_accessor :tax_rates
715
- # Options that configure the trial on the subscription item.
716
- attr_accessor :trial
717
-
718
- def initialize(
719
- discounts: nil,
720
- metadata: nil,
721
- price: nil,
722
- quantity: nil,
723
- tax_rates: nil,
724
- trial: nil
725
- )
726
- @discounts = discounts
727
- @metadata = metadata
728
- @price = price
729
- @quantity = quantity
730
- @tax_rates = tax_rates
731
- @trial = trial
732
- end
733
- end
734
-
735
- class RemoveDiscount < Stripe::RequestParams
736
- # The coupon code to remove from the `discounts` array.
737
- attr_accessor :coupon
738
- # The ID of a discount to remove from the `discounts` array.
739
- attr_accessor :discount
740
- # The ID of a promotion code to remove from the `discounts` array.
741
- attr_accessor :promotion_code
742
-
743
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
744
- @coupon = coupon
745
- @discount = discount
746
- @promotion_code = promotion_code
747
- end
748
- end
749
-
750
- class RemoveItem < Stripe::RequestParams
751
- # ID of a price to remove.
752
- attr_accessor :price
753
-
754
- def initialize(price: nil)
755
- @price = price
756
- end
757
- end
758
-
759
- class SetDiscount < Stripe::RequestParams
760
- # The coupon code to replace the `discounts` array with.
761
- attr_accessor :coupon
762
- # An ID of an existing discount to replace the `discounts` array with.
763
- attr_accessor :discount
764
- # An ID of an existing promotion code to replace the `discounts` array with.
765
- attr_accessor :promotion_code
766
-
767
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
768
- @coupon = coupon
769
- @discount = discount
770
- @promotion_code = promotion_code
771
- end
772
- end
773
-
774
- class SetItem < Stripe::RequestParams
775
- class Discount < Stripe::RequestParams
776
- class DiscountEnd < Stripe::RequestParams
777
- class Duration < Stripe::RequestParams
778
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
779
- attr_accessor :interval
780
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
781
- attr_accessor :interval_count
782
-
783
- def initialize(interval: nil, interval_count: nil)
784
- @interval = interval
785
- @interval_count = interval_count
786
- end
787
- end
788
- # Time span for the redeemed discount.
789
- attr_accessor :duration
790
- # A precise Unix timestamp for the discount to end. Must be in the future.
791
- attr_accessor :timestamp
792
- # The type of calculation made to determine when the discount ends.
793
- attr_accessor :type
794
-
795
- def initialize(duration: nil, timestamp: nil, type: nil)
796
- @duration = duration
797
- @timestamp = timestamp
798
- @type = type
799
- end
800
- end
801
- # ID of the coupon to create a new discount for.
802
- attr_accessor :coupon
803
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
804
- attr_accessor :discount
805
- # Details to determine how long the discount should be applied for.
806
- attr_accessor :discount_end
807
- # ID of the promotion code to create a new discount for.
808
- attr_accessor :promotion_code
809
-
810
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
811
- @coupon = coupon
812
- @discount = discount
813
- @discount_end = discount_end
814
- @promotion_code = promotion_code
815
- end
816
- end
817
-
818
- class Trial < Stripe::RequestParams
819
- # 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.
820
- attr_accessor :converts_to
821
- # Determines the type of trial for this item.
822
- attr_accessor :type
823
-
824
- def initialize(converts_to: nil, type: nil)
825
- @converts_to = converts_to
826
- @type = type
827
- end
828
- end
829
- # 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`.
830
- attr_accessor :discounts
831
- # 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`.
832
- attr_accessor :metadata
833
- # The ID of the price object.
834
- attr_accessor :price
835
- # 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`.
836
- attr_accessor :quantity
837
- # 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`.
838
- attr_accessor :tax_rates
839
- # 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`.
840
- attr_accessor :trial
841
-
842
- def initialize(
843
- discounts: nil,
844
- metadata: nil,
845
- price: nil,
846
- quantity: nil,
847
- tax_rates: nil,
848
- trial: nil
849
- )
850
- @discounts = discounts
851
- @metadata = metadata
852
- @price = price
853
- @quantity = quantity
854
- @tax_rates = tax_rates
855
- @trial = trial
856
- end
857
- end
858
- # Details for the `add_discount` type.
859
- attr_accessor :add_discount
860
- # Details for the `add_item` type.
861
- attr_accessor :add_item
862
- # Details for the `add_metadata` type: specify a hash of key-value pairs.
863
- attr_accessor :add_metadata
864
- # Details for the `remove_discount` type.
865
- attr_accessor :remove_discount
866
- # Details for the `remove_item` type.
867
- attr_accessor :remove_item
868
- # Details for the `remove_metadata` type: specify an array of metadata keys.
869
- attr_accessor :remove_metadata
870
- # Details for the `set_discounts` type.
871
- attr_accessor :set_discounts
872
- # Details for the `set_items` type.
873
- attr_accessor :set_items
874
- # Details for the `set_metadata` type: specify an array of key-value pairs.
875
- attr_accessor :set_metadata
876
- # The type of action the quote line performs.
877
- attr_accessor :type
878
-
879
- def initialize(
880
- add_discount: nil,
881
- add_item: nil,
882
- add_metadata: nil,
883
- remove_discount: nil,
884
- remove_item: nil,
885
- remove_metadata: nil,
886
- set_discounts: nil,
887
- set_items: nil,
888
- set_metadata: nil,
889
- type: nil
890
- )
891
- @add_discount = add_discount
892
- @add_item = add_item
893
- @add_metadata = add_metadata
894
- @remove_discount = remove_discount
895
- @remove_item = remove_item
896
- @remove_metadata = remove_metadata
897
- @set_discounts = set_discounts
898
- @set_items = set_items
899
- @set_metadata = set_metadata
900
- @type = type
901
- end
902
- end
903
-
904
- class AppliesTo < Stripe::RequestParams
905
- # 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.
906
- attr_accessor :new_reference
907
- # The ID of the schedule the line applies to.
908
- attr_accessor :subscription_schedule
909
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
910
- attr_accessor :type
911
-
912
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
913
- @new_reference = new_reference
914
- @subscription_schedule = subscription_schedule
915
- @type = type
916
- end
917
- end
918
-
919
- class CancelSubscriptionSchedule < Stripe::RequestParams
920
- # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
921
- attr_accessor :cancel_at
922
- # 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`.
923
- attr_accessor :invoice_now
924
- # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
925
- attr_accessor :prorate
926
-
927
- def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
928
- @cancel_at = cancel_at
929
- @invoice_now = invoice_now
930
- @prorate = prorate
931
- end
932
- end
933
-
934
- class EndsAt < Stripe::RequestParams
935
- class DiscountEnd < Stripe::RequestParams
936
- # The ID of a specific discount.
937
- attr_accessor :discount
938
-
939
- def initialize(discount: nil)
940
- @discount = discount
941
- end
942
- end
943
-
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
- # Use the `end` time of a given discount.
956
- attr_accessor :discount_end
957
- # Time span for the quote line starting from the `starts_at` date.
958
- attr_accessor :duration
959
- # A precise Unix timestamp.
960
- attr_accessor :timestamp
961
- # Select a way to pass in `ends_at`.
962
- attr_accessor :type
963
-
964
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
965
- @discount_end = discount_end
966
- @duration = duration
967
- @timestamp = timestamp
968
- @type = type
969
- end
970
- end
971
-
972
- class SetPauseCollection < Stripe::RequestParams
973
- class Set < Stripe::RequestParams
974
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
975
- attr_accessor :behavior
976
-
977
- def initialize(behavior: nil)
978
- @behavior = behavior
979
- end
980
- end
981
- # Details of the pause_collection behavior to apply to the amendment.
982
- attr_accessor :set
983
- # Determines the type of the pause_collection amendment.
984
- attr_accessor :type
985
-
986
- def initialize(set: nil, type: nil)
987
- @set = set
988
- @type = type
989
- end
990
- end
991
-
992
- class StartsAt < Stripe::RequestParams
993
- class DiscountEnd < Stripe::RequestParams
994
- # The ID of a specific discount.
995
- attr_accessor :discount
996
-
997
- def initialize(discount: nil)
998
- @discount = discount
999
- end
1000
- end
1001
-
1002
- class LineEndsAt < Stripe::RequestParams
1003
- # 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.
1004
- attr_accessor :index
1005
-
1006
- def initialize(index: nil)
1007
- @index = index
1008
- end
1009
- end
1010
- # Use the `end` time of a given discount.
1011
- attr_accessor :discount_end
1012
- # The timestamp the given line ends at.
1013
- attr_accessor :line_ends_at
1014
- # A precise Unix timestamp.
1015
- attr_accessor :timestamp
1016
- # Select a way to pass in `starts_at`.
1017
- attr_accessor :type
1018
-
1019
- def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
1020
- @discount_end = discount_end
1021
- @line_ends_at = line_ends_at
1022
- @timestamp = timestamp
1023
- @type = type
1024
- end
1025
- end
1026
-
1027
- class TrialSettings < Stripe::RequestParams
1028
- class EndBehavior < Stripe::RequestParams
1029
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1030
- attr_accessor :prorate_up_front
1031
-
1032
- def initialize(prorate_up_front: nil)
1033
- @prorate_up_front = prorate_up_front
1034
- end
1035
- end
1036
- # Defines how the subscription should behave when a trial ends.
1037
- attr_accessor :end_behavior
1038
-
1039
- def initialize(end_behavior: nil)
1040
- @end_behavior = end_behavior
1041
- end
1042
- end
1043
- # An array of operations the quote line performs.
1044
- attr_accessor :actions
1045
- # Details to identify the subscription schedule the quote line applies to.
1046
- attr_accessor :applies_to
1047
- # 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.
1048
- attr_accessor :billing_cycle_anchor
1049
- # 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.
1050
- attr_accessor :cancel_subscription_schedule
1051
- # 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.
1052
- attr_accessor :ends_at
1053
- # 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.
1054
- attr_accessor :proration_behavior
1055
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
1056
- attr_accessor :set_pause_collection
1057
- # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
1058
- attr_accessor :set_schedule_end
1059
- # Details to identify the earliest timestamp where the proposed change should take effect.
1060
- attr_accessor :starts_at
1061
- # Settings related to subscription trials.
1062
- attr_accessor :trial_settings
1063
-
1064
- def initialize(
1065
- actions: nil,
1066
- applies_to: nil,
1067
- billing_cycle_anchor: nil,
1068
- cancel_subscription_schedule: nil,
1069
- ends_at: nil,
1070
- proration_behavior: nil,
1071
- set_pause_collection: nil,
1072
- set_schedule_end: nil,
1073
- starts_at: nil,
1074
- trial_settings: nil
1075
- )
1076
- @actions = actions
1077
- @applies_to = applies_to
1078
- @billing_cycle_anchor = billing_cycle_anchor
1079
- @cancel_subscription_schedule = cancel_subscription_schedule
1080
- @ends_at = ends_at
1081
- @proration_behavior = proration_behavior
1082
- @set_pause_collection = set_pause_collection
1083
- @set_schedule_end = set_schedule_end
1084
- @starts_at = starts_at
1085
- @trial_settings = trial_settings
1086
- end
1087
- end
1088
-
1089
- class LineItem < Stripe::RequestParams
1090
- class Discount < Stripe::RequestParams
1091
- class DiscountEnd < Stripe::RequestParams
1092
- class Duration < Stripe::RequestParams
1093
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1094
- attr_accessor :interval
1095
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1096
- attr_accessor :interval_count
1097
-
1098
- def initialize(interval: nil, interval_count: nil)
1099
- @interval = interval
1100
- @interval_count = interval_count
1101
- end
1102
- end
1103
- # Time span for the redeemed discount.
1104
- attr_accessor :duration
1105
- # A precise Unix timestamp for the discount to end. Must be in the future.
1106
- attr_accessor :timestamp
1107
- # The type of calculation made to determine when the discount ends.
1108
- attr_accessor :type
1109
-
1110
- def initialize(duration: nil, timestamp: nil, type: nil)
1111
- @duration = duration
1112
- @timestamp = timestamp
1113
- @type = type
1114
- end
1115
- end
1116
- # ID of the coupon to create a new discount for.
1117
- attr_accessor :coupon
1118
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1119
- attr_accessor :discount
1120
- # Details to determine how long the discount should be applied for.
1121
- attr_accessor :discount_end
1122
- # ID of the promotion code to create a new discount for.
1123
- attr_accessor :promotion_code
1124
-
1125
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1126
- @coupon = coupon
1127
- @discount = discount
1128
- @discount_end = discount_end
1129
- @promotion_code = promotion_code
1130
- end
1131
- end
1132
-
1133
- class PriceData < Stripe::RequestParams
1134
- class Recurring < Stripe::RequestParams
1135
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1136
- attr_accessor :interval
1137
- # 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).
1138
- attr_accessor :interval_count
1139
-
1140
- def initialize(interval: nil, interval_count: nil)
1141
- @interval = interval
1142
- @interval_count = interval_count
1143
- end
1144
- end
1145
- # 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).
1146
- attr_accessor :currency
1147
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1148
- attr_accessor :product
1149
- # The recurring components of a price such as `interval` and `interval_count`.
1150
- attr_accessor :recurring
1151
- # 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.
1152
- attr_accessor :tax_behavior
1153
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1154
- attr_accessor :unit_amount
1155
- # 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.
1156
- attr_accessor :unit_amount_decimal
1157
-
1158
- def initialize(
1159
- currency: nil,
1160
- product: nil,
1161
- recurring: nil,
1162
- tax_behavior: nil,
1163
- unit_amount: nil,
1164
- unit_amount_decimal: nil
1165
- )
1166
- @currency = currency
1167
- @product = product
1168
- @recurring = recurring
1169
- @tax_behavior = tax_behavior
1170
- @unit_amount = unit_amount
1171
- @unit_amount_decimal = unit_amount_decimal
1172
- end
1173
- end
1174
- # The discounts applied to this line item.
1175
- attr_accessor :discounts
1176
- # The ID of the price object. One of `price` or `price_data` is required.
1177
- attr_accessor :price
1178
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
1179
- attr_accessor :price_data
1180
- # The quantity of the line item.
1181
- attr_accessor :quantity
1182
- # 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.
1183
- attr_accessor :tax_rates
1184
-
1185
- def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil)
1186
- @discounts = discounts
1187
- @price = price
1188
- @price_data = price_data
1189
- @quantity = quantity
1190
- @tax_rates = tax_rates
1191
- end
1192
- end
1193
-
1194
- class SubscriptionData < Stripe::RequestParams
1195
- class BillOnAcceptance < Stripe::RequestParams
1196
- class BillFrom < Stripe::RequestParams
1197
- class LineStartsAt < Stripe::RequestParams
1198
- # The ID of a quote line.
1199
- attr_accessor :id
1200
- # 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.
1201
- attr_accessor :index
1202
-
1203
- def initialize(id: nil, index: nil)
1204
- @id = id
1205
- @index = index
1206
- end
1207
- end
1208
- # Details of a Quote line to start the bill period from.
1209
- attr_accessor :line_starts_at
1210
- # A precise Unix timestamp.
1211
- attr_accessor :timestamp
1212
- # The type of method to specify the `bill_from` time.
1213
- attr_accessor :type
1214
-
1215
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
1216
- @line_starts_at = line_starts_at
1217
- @timestamp = timestamp
1218
- @type = type
1219
- end
1220
- end
1221
-
1222
- class BillUntil < Stripe::RequestParams
1223
- class Duration < Stripe::RequestParams
1224
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1225
- attr_accessor :interval
1226
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1227
- attr_accessor :interval_count
1228
-
1229
- def initialize(interval: nil, interval_count: nil)
1230
- @interval = interval
1231
- @interval_count = interval_count
1232
- end
1233
- end
1234
-
1235
- class LineEndsAt < Stripe::RequestParams
1236
- # The ID of a quote line.
1237
- attr_accessor :id
1238
- # 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.
1239
- attr_accessor :index
1240
-
1241
- def initialize(id: nil, index: nil)
1242
- @id = id
1243
- @index = index
1244
- end
1245
- end
1246
- # Details of the duration over which to bill.
1247
- attr_accessor :duration
1248
- # Details of a Quote line item from which to bill until.
1249
- attr_accessor :line_ends_at
1250
- # A precise Unix timestamp.
1251
- attr_accessor :timestamp
1252
- # The type of method to specify the `bill_until` time.
1253
- attr_accessor :type
1254
-
1255
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
1256
- @duration = duration
1257
- @line_ends_at = line_ends_at
1258
- @timestamp = timestamp
1259
- @type = type
1260
- end
1261
- end
1262
- # The start of the period to bill from when the Quote is accepted.
1263
- attr_accessor :bill_from
1264
- # The end of the period to bill until when the Quote is accepted.
1265
- attr_accessor :bill_until
1266
-
1267
- def initialize(bill_from: nil, bill_until: nil)
1268
- @bill_from = bill_from
1269
- @bill_until = bill_until
1270
- end
1271
- end
1272
-
1273
- class BillingMode < Stripe::RequestParams
1274
- # Controls the calculation and orchestration of prorations and invoices for subscriptions.
1275
- attr_accessor :type
1276
-
1277
- def initialize(type: nil)
1278
- @type = type
1279
- end
1280
- end
1281
-
1282
- class Prebilling < Stripe::RequestParams
1283
- # This is used to determine the number of billing cycles to prebill.
1284
- attr_accessor :iterations
1285
-
1286
- def initialize(iterations: nil)
1287
- @iterations = iterations
1288
- end
1289
- end
1290
- # Describes the period to bill for upon accepting the quote.
1291
- attr_accessor :bill_on_acceptance
1292
- # 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.
1293
- attr_accessor :billing_behavior
1294
- # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
1295
- attr_accessor :billing_cycle_anchor
1296
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1297
- attr_accessor :billing_mode
1298
- # 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.
1299
- attr_accessor :description
1300
- # 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.
1301
- attr_accessor :effective_date
1302
- # Behavior of the subscription schedule and underlying subscription when it ends.
1303
- attr_accessor :end_behavior
1304
- # 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.
1305
- attr_accessor :from_subscription
1306
- # 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.
1307
- attr_accessor :metadata
1308
- # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
1309
- attr_accessor :prebilling
1310
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1311
- #
1312
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1313
- #
1314
- # 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`.
1315
- #
1316
- # Prorations can be disabled by passing `none`.
1317
- attr_accessor :proration_behavior
1318
- # Integer representing the number of trial period days before the customer is charged for the first time.
1319
- attr_accessor :trial_period_days
1320
-
1321
- def initialize(
1322
- bill_on_acceptance: nil,
1323
- billing_behavior: nil,
1324
- billing_cycle_anchor: nil,
1325
- billing_mode: nil,
1326
- description: nil,
1327
- effective_date: nil,
1328
- end_behavior: nil,
1329
- from_subscription: nil,
1330
- metadata: nil,
1331
- prebilling: nil,
1332
- proration_behavior: nil,
1333
- trial_period_days: nil
1334
- )
1335
- @bill_on_acceptance = bill_on_acceptance
1336
- @billing_behavior = billing_behavior
1337
- @billing_cycle_anchor = billing_cycle_anchor
1338
- @billing_mode = billing_mode
1339
- @description = description
1340
- @effective_date = effective_date
1341
- @end_behavior = end_behavior
1342
- @from_subscription = from_subscription
1343
- @metadata = metadata
1344
- @prebilling = prebilling
1345
- @proration_behavior = proration_behavior
1346
- @trial_period_days = trial_period_days
1347
- end
1348
- end
1349
-
1350
- class SubscriptionDataOverride < Stripe::RequestParams
1351
- class AppliesTo < Stripe::RequestParams
1352
- # 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.
1353
- attr_accessor :new_reference
1354
- # The ID of the schedule the line applies to.
1355
- attr_accessor :subscription_schedule
1356
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
1357
- attr_accessor :type
1358
-
1359
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
1360
- @new_reference = new_reference
1361
- @subscription_schedule = subscription_schedule
1362
- @type = type
1363
- end
1364
- end
1365
-
1366
- class BillOnAcceptance < Stripe::RequestParams
1367
- class BillFrom < Stripe::RequestParams
1368
- class LineStartsAt < Stripe::RequestParams
1369
- # The ID of a quote line.
1370
- attr_accessor :id
1371
- # 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.
1372
- attr_accessor :index
1373
-
1374
- def initialize(id: nil, index: nil)
1375
- @id = id
1376
- @index = index
1377
- end
1378
- end
1379
- # Details of a Quote line to start the bill period from.
1380
- attr_accessor :line_starts_at
1381
- # A precise Unix timestamp.
1382
- attr_accessor :timestamp
1383
- # The type of method to specify the `bill_from` time.
1384
- attr_accessor :type
1385
-
1386
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
1387
- @line_starts_at = line_starts_at
1388
- @timestamp = timestamp
1389
- @type = type
1390
- end
1391
- end
1392
-
1393
- class BillUntil < Stripe::RequestParams
1394
- class Duration < Stripe::RequestParams
1395
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1396
- attr_accessor :interval
1397
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1398
- attr_accessor :interval_count
1399
-
1400
- def initialize(interval: nil, interval_count: nil)
1401
- @interval = interval
1402
- @interval_count = interval_count
1403
- end
1404
- end
1405
-
1406
- class LineEndsAt < Stripe::RequestParams
1407
- # The ID of a quote line.
1408
- attr_accessor :id
1409
- # 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.
1410
- attr_accessor :index
1411
-
1412
- def initialize(id: nil, index: nil)
1413
- @id = id
1414
- @index = index
1415
- end
1416
- end
1417
- # Details of the duration over which to bill.
1418
- attr_accessor :duration
1419
- # Details of a Quote line item from which to bill until.
1420
- attr_accessor :line_ends_at
1421
- # A precise Unix timestamp.
1422
- attr_accessor :timestamp
1423
- # The type of method to specify the `bill_until` time.
1424
- attr_accessor :type
1425
-
1426
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
1427
- @duration = duration
1428
- @line_ends_at = line_ends_at
1429
- @timestamp = timestamp
1430
- @type = type
1431
- end
1432
- end
1433
- # The start of the period to bill from when the Quote is accepted.
1434
- attr_accessor :bill_from
1435
- # The end of the period to bill until when the Quote is accepted.
1436
- attr_accessor :bill_until
1437
-
1438
- def initialize(bill_from: nil, bill_until: nil)
1439
- @bill_from = bill_from
1440
- @bill_until = bill_until
1441
- end
1442
- end
1443
- # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
1444
- attr_accessor :applies_to
1445
- # Describes the period to bill for upon accepting the quote.
1446
- attr_accessor :bill_on_acceptance
1447
- # 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.
1448
- attr_accessor :billing_behavior
1449
- # The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`.
1450
- attr_accessor :customer
1451
- # 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.
1452
- attr_accessor :description
1453
- # Behavior of the subscription schedule and underlying subscription when it ends.
1454
- attr_accessor :end_behavior
1455
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
1456
- #
1457
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
1458
- #
1459
- # 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`.
1460
- #
1461
- # Prorations can be disabled by passing `none`.
1462
- attr_accessor :proration_behavior
1463
-
1464
- def initialize(
1465
- applies_to: nil,
1466
- bill_on_acceptance: nil,
1467
- billing_behavior: nil,
1468
- customer: nil,
1469
- description: nil,
1470
- end_behavior: nil,
1471
- proration_behavior: nil
1472
- )
1473
- @applies_to = applies_to
1474
- @bill_on_acceptance = bill_on_acceptance
1475
- @billing_behavior = billing_behavior
1476
- @customer = customer
1477
- @description = description
1478
- @end_behavior = end_behavior
1479
- @proration_behavior = proration_behavior
1480
- end
1481
- end
1482
-
1483
- class TransferData < Stripe::RequestParams
1484
- # 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.
1485
- attr_accessor :amount
1486
- # 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.
1487
- attr_accessor :amount_percent
1488
- # ID of an existing, connected Stripe account.
1489
- attr_accessor :destination
1490
-
1491
- def initialize(amount: nil, amount_percent: nil, destination: nil)
1492
- @amount = amount
1493
- @amount_percent = amount_percent
1494
- @destination = destination
1495
- end
1496
- end
1497
- # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
1498
- attr_accessor :allow_backdated_lines
1499
- # 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.
1500
- attr_accessor :application_fee_amount
1501
- # 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.
1502
- attr_accessor :application_fee_percent
1503
- # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
1504
- attr_accessor :automatic_tax
1505
- # 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`.
1506
- attr_accessor :collection_method
1507
- # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
1508
- attr_accessor :customer
1509
- # The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
1510
- attr_accessor :customer_account
1511
- # The tax rates that will apply to any line item that does not have `tax_rates` set.
1512
- attr_accessor :default_tax_rates
1513
- # 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.
1514
- attr_accessor :description
1515
- # The discounts applied to the quote.
1516
- attr_accessor :discounts
1517
- # Specifies which fields in the response should be expanded.
1518
- attr_accessor :expand
1519
- # 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.
1520
- attr_accessor :expires_at
1521
- # 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.
1522
- attr_accessor :footer
1523
- # 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`.
1524
- attr_accessor :from_quote
1525
- # 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.
1526
- attr_accessor :header
1527
- # All invoices will be billed using the specified settings.
1528
- attr_accessor :invoice_settings
1529
- # 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.
1530
- attr_accessor :line_items
1531
- # 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.
1532
- attr_accessor :lines
1533
- # 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`.
1534
- attr_accessor :metadata
1535
- # The account on behalf of which to charge.
1536
- attr_accessor :on_behalf_of
1537
- # 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.
1538
- attr_accessor :subscription_data
1539
- # List representing overrides for `subscription_data` configurations for specific subscription schedules.
1540
- attr_accessor :subscription_data_overrides
1541
- # ID of the test clock to attach to the quote.
1542
- attr_accessor :test_clock
1543
- # The data with which to automatically create a Transfer for each of the invoices.
1544
- attr_accessor :transfer_data
1545
-
1546
- def initialize(
1547
- allow_backdated_lines: nil,
1548
- application_fee_amount: nil,
1549
- application_fee_percent: nil,
1550
- automatic_tax: nil,
1551
- collection_method: nil,
1552
- customer: nil,
1553
- customer_account: nil,
1554
- default_tax_rates: nil,
1555
- description: nil,
1556
- discounts: nil,
1557
- expand: nil,
1558
- expires_at: nil,
1559
- footer: nil,
1560
- from_quote: nil,
1561
- header: nil,
1562
- invoice_settings: nil,
1563
- line_items: nil,
1564
- lines: nil,
1565
- metadata: nil,
1566
- on_behalf_of: nil,
1567
- subscription_data: nil,
1568
- subscription_data_overrides: nil,
1569
- test_clock: nil,
1570
- transfer_data: nil
1571
- )
1572
- @allow_backdated_lines = allow_backdated_lines
1573
- @application_fee_amount = application_fee_amount
1574
- @application_fee_percent = application_fee_percent
1575
- @automatic_tax = automatic_tax
1576
- @collection_method = collection_method
1577
- @customer = customer
1578
- @customer_account = customer_account
1579
- @default_tax_rates = default_tax_rates
1580
- @description = description
1581
- @discounts = discounts
1582
- @expand = expand
1583
- @expires_at = expires_at
1584
- @footer = footer
1585
- @from_quote = from_quote
1586
- @header = header
1587
- @invoice_settings = invoice_settings
1588
- @line_items = line_items
1589
- @lines = lines
1590
- @metadata = metadata
1591
- @on_behalf_of = on_behalf_of
1592
- @subscription_data = subscription_data
1593
- @subscription_data_overrides = subscription_data_overrides
1594
- @test_clock = test_clock
1595
- @transfer_data = transfer_data
1596
- end
1597
- end
1598
-
1599
- class UpdateParams < Stripe::RequestParams
1600
- class AutomaticTax < Stripe::RequestParams
1601
- class Liability < Stripe::RequestParams
1602
- # The connected account being referenced when `type` is `account`.
1603
- attr_accessor :account
1604
- # Type of the account referenced in the request.
1605
- attr_accessor :type
1606
-
1607
- def initialize(account: nil, type: nil)
1608
- @account = account
1609
- @type = type
1610
- end
1611
- end
1612
- # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself.
1613
- attr_accessor :enabled
1614
- # 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.
1615
- attr_accessor :liability
1616
-
1617
- def initialize(enabled: nil, liability: nil)
1618
- @enabled = enabled
1619
- @liability = liability
1620
- end
1621
- end
1622
-
1623
- class Discount < Stripe::RequestParams
1624
- class DiscountEnd < Stripe::RequestParams
1625
- class Duration < Stripe::RequestParams
1626
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1627
- attr_accessor :interval
1628
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1629
- attr_accessor :interval_count
1630
-
1631
- def initialize(interval: nil, interval_count: nil)
1632
- @interval = interval
1633
- @interval_count = interval_count
1634
- end
1635
- end
1636
- # Time span for the redeemed discount.
1637
- attr_accessor :duration
1638
- # A precise Unix timestamp for the discount to end. Must be in the future.
1639
- attr_accessor :timestamp
1640
- # The type of calculation made to determine when the discount ends.
1641
- attr_accessor :type
1642
-
1643
- def initialize(duration: nil, timestamp: nil, type: nil)
1644
- @duration = duration
1645
- @timestamp = timestamp
1646
- @type = type
1647
- end
1648
- end
1649
- # ID of the coupon to create a new discount for.
1650
- attr_accessor :coupon
1651
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1652
- attr_accessor :discount
1653
- # Details to determine how long the discount should be applied for.
1654
- attr_accessor :discount_end
1655
- # ID of the promotion code to create a new discount for.
1656
- attr_accessor :promotion_code
1657
-
1658
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1659
- @coupon = coupon
1660
- @discount = discount
1661
- @discount_end = discount_end
1662
- @promotion_code = promotion_code
1663
- end
1664
- end
1665
-
1666
- class InvoiceSettings < Stripe::RequestParams
1667
- class Issuer < Stripe::RequestParams
1668
- # The connected account being referenced when `type` is `account`.
1669
- attr_accessor :account
1670
- # Type of the account referenced in the request.
1671
- attr_accessor :type
1672
-
1673
- def initialize(account: nil, type: nil)
1674
- @account = account
1675
- @type = type
1676
- end
1677
- end
1678
- # 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`.
1679
- attr_accessor :days_until_due
1680
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1681
- attr_accessor :issuer
1682
-
1683
- def initialize(days_until_due: nil, issuer: nil)
1684
- @days_until_due = days_until_due
1685
- @issuer = issuer
1686
- end
1687
- end
1688
-
1689
- class Line < Stripe::RequestParams
1690
- class Action < Stripe::RequestParams
1691
- class AddDiscount < Stripe::RequestParams
1692
- class DiscountEnd < Stripe::RequestParams
1693
- # The type of calculation made to determine when the discount ends.
1694
- attr_accessor :type
1695
-
1696
- def initialize(type: nil)
1697
- @type = type
1698
- end
1699
- end
1700
- # The coupon code to redeem.
1701
- attr_accessor :coupon
1702
- # An ID of an existing discount for a coupon that was already redeemed.
1703
- attr_accessor :discount
1704
- # Details to determine how long the discount should be applied for.
1705
- attr_accessor :discount_end
1706
- # 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.
1707
- attr_accessor :index
1708
- # The promotion code to redeem.
1709
- attr_accessor :promotion_code
1710
-
1711
- def initialize(
1712
- coupon: nil,
1713
- discount: nil,
1714
- discount_end: nil,
1715
- index: nil,
1716
- promotion_code: nil
1717
- )
1718
- @coupon = coupon
1719
- @discount = discount
1720
- @discount_end = discount_end
1721
- @index = index
1722
- @promotion_code = promotion_code
1723
- end
1724
- end
1725
-
1726
- class AddItem < Stripe::RequestParams
1727
- class Discount < Stripe::RequestParams
1728
- class DiscountEnd < Stripe::RequestParams
1729
- class Duration < Stripe::RequestParams
1730
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1731
- attr_accessor :interval
1732
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1733
- attr_accessor :interval_count
1734
-
1735
- def initialize(interval: nil, interval_count: nil)
1736
- @interval = interval
1737
- @interval_count = interval_count
1738
- end
1739
- end
1740
- # Time span for the redeemed discount.
1741
- attr_accessor :duration
1742
- # A precise Unix timestamp for the discount to end. Must be in the future.
1743
- attr_accessor :timestamp
1744
- # The type of calculation made to determine when the discount ends.
1745
- attr_accessor :type
1746
-
1747
- def initialize(duration: nil, timestamp: nil, type: nil)
1748
- @duration = duration
1749
- @timestamp = timestamp
1750
- @type = type
1751
- end
1752
- end
1753
- # ID of the coupon to create a new discount for.
1754
- attr_accessor :coupon
1755
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1756
- attr_accessor :discount
1757
- # Details to determine how long the discount should be applied for.
1758
- attr_accessor :discount_end
1759
- # ID of the promotion code to create a new discount for.
1760
- attr_accessor :promotion_code
1761
-
1762
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1763
- @coupon = coupon
1764
- @discount = discount
1765
- @discount_end = discount_end
1766
- @promotion_code = promotion_code
1767
- end
1768
- end
1769
-
1770
- class Trial < Stripe::RequestParams
1771
- # 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.
1772
- attr_accessor :converts_to
1773
- # Determines the type of trial for this item.
1774
- attr_accessor :type
1775
-
1776
- def initialize(converts_to: nil, type: nil)
1777
- @converts_to = converts_to
1778
- @type = type
1779
- end
1780
- end
1781
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
1782
- attr_accessor :discounts
1783
- # 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`.
1784
- attr_accessor :metadata
1785
- # The ID of the price object.
1786
- attr_accessor :price
1787
- # Quantity for this item.
1788
- attr_accessor :quantity
1789
- # 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`.
1790
- attr_accessor :tax_rates
1791
- # Options that configure the trial on the subscription item.
1792
- attr_accessor :trial
1793
-
1794
- def initialize(
1795
- discounts: nil,
1796
- metadata: nil,
1797
- price: nil,
1798
- quantity: nil,
1799
- tax_rates: nil,
1800
- trial: nil
1801
- )
1802
- @discounts = discounts
1803
- @metadata = metadata
1804
- @price = price
1805
- @quantity = quantity
1806
- @tax_rates = tax_rates
1807
- @trial = trial
1808
- end
1809
- end
1810
-
1811
- class RemoveDiscount < Stripe::RequestParams
1812
- # The coupon code to remove from the `discounts` array.
1813
- attr_accessor :coupon
1814
- # The ID of a discount to remove from the `discounts` array.
1815
- attr_accessor :discount
1816
- # The ID of a promotion code to remove from the `discounts` array.
1817
- attr_accessor :promotion_code
1818
-
1819
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1820
- @coupon = coupon
1821
- @discount = discount
1822
- @promotion_code = promotion_code
1823
- end
1824
- end
1825
-
1826
- class RemoveItem < Stripe::RequestParams
1827
- # ID of a price to remove.
1828
- attr_accessor :price
1829
-
1830
- def initialize(price: nil)
1831
- @price = price
1832
- end
1833
- end
1834
-
1835
- class SetDiscount < Stripe::RequestParams
1836
- # The coupon code to replace the `discounts` array with.
1837
- attr_accessor :coupon
1838
- # An ID of an existing discount to replace the `discounts` array with.
1839
- attr_accessor :discount
1840
- # An ID of an existing promotion code to replace the `discounts` array with.
1841
- attr_accessor :promotion_code
1842
-
1843
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
1844
- @coupon = coupon
1845
- @discount = discount
1846
- @promotion_code = promotion_code
1847
- end
1848
- end
1849
-
1850
- class SetItem < Stripe::RequestParams
1851
- class Discount < Stripe::RequestParams
1852
- class DiscountEnd < Stripe::RequestParams
1853
- class Duration < Stripe::RequestParams
1854
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1855
- attr_accessor :interval
1856
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1857
- attr_accessor :interval_count
1858
-
1859
- def initialize(interval: nil, interval_count: nil)
1860
- @interval = interval
1861
- @interval_count = interval_count
1862
- end
1863
- end
1864
- # Time span for the redeemed discount.
1865
- attr_accessor :duration
1866
- # A precise Unix timestamp for the discount to end. Must be in the future.
1867
- attr_accessor :timestamp
1868
- # The type of calculation made to determine when the discount ends.
1869
- attr_accessor :type
1870
-
1871
- def initialize(duration: nil, timestamp: nil, type: nil)
1872
- @duration = duration
1873
- @timestamp = timestamp
1874
- @type = type
1875
- end
1876
- end
1877
- # ID of the coupon to create a new discount for.
1878
- attr_accessor :coupon
1879
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1880
- attr_accessor :discount
1881
- # Details to determine how long the discount should be applied for.
1882
- attr_accessor :discount_end
1883
- # ID of the promotion code to create a new discount for.
1884
- attr_accessor :promotion_code
1885
-
1886
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1887
- @coupon = coupon
1888
- @discount = discount
1889
- @discount_end = discount_end
1890
- @promotion_code = promotion_code
1891
- end
1892
- end
1893
-
1894
- class Trial < Stripe::RequestParams
1895
- # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID.
1896
- attr_accessor :converts_to
1897
- # Determines the type of trial for this item.
1898
- attr_accessor :type
1899
-
1900
- def initialize(converts_to: nil, type: nil)
1901
- @converts_to = converts_to
1902
- @type = type
1903
- end
1904
- end
1905
- # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`.
1906
- attr_accessor :discounts
1907
- # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`.
1908
- attr_accessor :metadata
1909
- # The ID of the price object.
1910
- attr_accessor :price
1911
- # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`.
1912
- attr_accessor :quantity
1913
- # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`.
1914
- attr_accessor :tax_rates
1915
- # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`.
1916
- attr_accessor :trial
1917
-
1918
- def initialize(
1919
- discounts: nil,
1920
- metadata: nil,
1921
- price: nil,
1922
- quantity: nil,
1923
- tax_rates: nil,
1924
- trial: nil
1925
- )
1926
- @discounts = discounts
1927
- @metadata = metadata
1928
- @price = price
1929
- @quantity = quantity
1930
- @tax_rates = tax_rates
1931
- @trial = trial
1932
- end
1933
- end
1934
- # Details for the `add_discount` type.
1935
- attr_accessor :add_discount
1936
- # Details for the `add_item` type.
1937
- attr_accessor :add_item
1938
- # Details for the `add_metadata` type: specify a hash of key-value pairs.
1939
- attr_accessor :add_metadata
1940
- # Details for the `remove_discount` type.
1941
- attr_accessor :remove_discount
1942
- # Details for the `remove_item` type.
1943
- attr_accessor :remove_item
1944
- # Details for the `remove_metadata` type: specify an array of metadata keys.
1945
- attr_accessor :remove_metadata
1946
- # Details for the `set_discounts` type.
1947
- attr_accessor :set_discounts
1948
- # Details for the `set_items` type.
1949
- attr_accessor :set_items
1950
- # Details for the `set_metadata` type: specify an array of key-value pairs.
1951
- attr_accessor :set_metadata
1952
- # The type of action the quote line performs.
1953
- attr_accessor :type
1954
-
1955
- def initialize(
1956
- add_discount: nil,
1957
- add_item: nil,
1958
- add_metadata: nil,
1959
- remove_discount: nil,
1960
- remove_item: nil,
1961
- remove_metadata: nil,
1962
- set_discounts: nil,
1963
- set_items: nil,
1964
- set_metadata: nil,
1965
- type: nil
1966
- )
1967
- @add_discount = add_discount
1968
- @add_item = add_item
1969
- @add_metadata = add_metadata
1970
- @remove_discount = remove_discount
1971
- @remove_item = remove_item
1972
- @remove_metadata = remove_metadata
1973
- @set_discounts = set_discounts
1974
- @set_items = set_items
1975
- @set_metadata = set_metadata
1976
- @type = type
1977
- end
1978
- end
1979
-
1980
- class AppliesTo < Stripe::RequestParams
1981
- # 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.
1982
- attr_accessor :new_reference
1983
- # The ID of the schedule the line applies to.
1984
- attr_accessor :subscription_schedule
1985
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
1986
- attr_accessor :type
1987
-
1988
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
1989
- @new_reference = new_reference
1990
- @subscription_schedule = subscription_schedule
1991
- @type = type
1992
- end
1993
- end
1994
-
1995
- class CancelSubscriptionSchedule < Stripe::RequestParams
1996
- # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
1997
- attr_accessor :cancel_at
1998
- # 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`.
1999
- attr_accessor :invoice_now
2000
- # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
2001
- attr_accessor :prorate
2002
-
2003
- def initialize(cancel_at: nil, invoice_now: nil, prorate: nil)
2004
- @cancel_at = cancel_at
2005
- @invoice_now = invoice_now
2006
- @prorate = prorate
2007
- end
2008
- end
2009
-
2010
- class EndsAt < Stripe::RequestParams
2011
- class DiscountEnd < Stripe::RequestParams
2012
- # The ID of a specific discount.
2013
- attr_accessor :discount
2014
-
2015
- def initialize(discount: nil)
2016
- @discount = discount
2017
- end
2018
- end
2019
-
2020
- class Duration < Stripe::RequestParams
2021
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2022
- attr_accessor :interval
2023
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2024
- attr_accessor :interval_count
2025
-
2026
- def initialize(interval: nil, interval_count: nil)
2027
- @interval = interval
2028
- @interval_count = interval_count
2029
- end
2030
- end
2031
- # Use the `end` time of a given discount.
2032
- attr_accessor :discount_end
2033
- # Time span for the quote line starting from the `starts_at` date.
2034
- attr_accessor :duration
2035
- # A precise Unix timestamp.
2036
- attr_accessor :timestamp
2037
- # Select a way to pass in `ends_at`.
2038
- attr_accessor :type
2039
-
2040
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
2041
- @discount_end = discount_end
2042
- @duration = duration
2043
- @timestamp = timestamp
2044
- @type = type
2045
- end
2046
- end
2047
-
2048
- class SetPauseCollection < Stripe::RequestParams
2049
- class Set < Stripe::RequestParams
2050
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
2051
- attr_accessor :behavior
2052
-
2053
- def initialize(behavior: nil)
2054
- @behavior = behavior
2055
- end
2056
- end
2057
- # Details of the pause_collection behavior to apply to the amendment.
2058
- attr_accessor :set
2059
- # Determines the type of the pause_collection amendment.
2060
- attr_accessor :type
2061
-
2062
- def initialize(set: nil, type: nil)
2063
- @set = set
2064
- @type = type
2065
- end
2066
- end
2067
-
2068
- class StartsAt < Stripe::RequestParams
2069
- class DiscountEnd < Stripe::RequestParams
2070
- # The ID of a specific discount.
2071
- attr_accessor :discount
2072
-
2073
- def initialize(discount: nil)
2074
- @discount = discount
2075
- end
2076
- end
2077
-
2078
- class LineEndsAt < Stripe::RequestParams
2079
- # The ID of a quote line.
2080
- attr_accessor :id
2081
- # 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.
2082
- attr_accessor :index
2083
178
 
2084
- def initialize(id: nil, index: nil)
2085
- @id = id
2086
- @index = index
179
+ def self.field_remappings
180
+ @field_remappings = {}
181
+ end
2087
182
  end
2088
- end
2089
- # Use the `end` time of a given discount.
2090
- attr_accessor :discount_end
2091
- # The timestamp the given line ends at.
2092
- attr_accessor :line_ends_at
2093
- # A precise Unix timestamp.
2094
- attr_accessor :timestamp
2095
- # Select a way to pass in `starts_at`.
2096
- attr_accessor :type
2097
-
2098
- def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil)
2099
- @discount_end = discount_end
2100
- @line_ends_at = line_ends_at
2101
- @timestamp = timestamp
2102
- @type = type
2103
- end
2104
- end
183
+ # The aggregated discounts.
184
+ attr_reader :discounts
185
+ # The aggregated tax amounts by rate.
186
+ attr_reader :taxes
2105
187
 
2106
- class TrialSettings < Stripe::RequestParams
2107
- class EndBehavior < Stripe::RequestParams
2108
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
2109
- attr_accessor :prorate_up_front
188
+ def self.inner_class_types
189
+ @inner_class_types = { discounts: Discount, taxes: Tax }
190
+ end
2110
191
 
2111
- def initialize(prorate_up_front: nil)
2112
- @prorate_up_front = prorate_up_front
192
+ def self.field_remappings
193
+ @field_remappings = {}
2113
194
  end
2114
195
  end
2115
- # Defines how the subscription should behave when a trial ends.
2116
- attr_accessor :end_behavior
196
+ # This is the sum of all the discounts.
197
+ attr_reader :amount_discount
198
+ # This is the sum of all the shipping amounts.
199
+ attr_reader :amount_shipping
200
+ # This is the sum of all the tax amounts.
201
+ attr_reader :amount_tax
202
+ # Attribute for field breakdown
203
+ attr_reader :breakdown
2117
204
 
2118
- def initialize(end_behavior: nil)
2119
- @end_behavior = end_behavior
205
+ def self.inner_class_types
206
+ @inner_class_types = { breakdown: Breakdown }
2120
207
  end
2121
- end
2122
- # An array of operations the quote line performs.
2123
- attr_accessor :actions
2124
- # Details to identify the subscription schedule the quote line applies to.
2125
- attr_accessor :applies_to
2126
- # 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.
2127
- attr_accessor :billing_cycle_anchor
2128
- # 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.
2129
- attr_accessor :cancel_subscription_schedule
2130
- # 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.
2131
- attr_accessor :ends_at
2132
- # The ID of an existing line on the quote.
2133
- attr_accessor :id
2134
- # 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.
2135
- attr_accessor :proration_behavior
2136
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
2137
- attr_accessor :set_pause_collection
2138
- # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date.
2139
- attr_accessor :set_schedule_end
2140
- # Details to identify the earliest timestamp where the proposed change should take effect.
2141
- attr_accessor :starts_at
2142
- # Settings related to subscription trials.
2143
- attr_accessor :trial_settings
2144
-
2145
- def initialize(
2146
- actions: nil,
2147
- applies_to: nil,
2148
- billing_cycle_anchor: nil,
2149
- cancel_subscription_schedule: nil,
2150
- ends_at: nil,
2151
- id: nil,
2152
- proration_behavior: nil,
2153
- set_pause_collection: nil,
2154
- set_schedule_end: nil,
2155
- starts_at: nil,
2156
- trial_settings: nil
2157
- )
2158
- @actions = actions
2159
- @applies_to = applies_to
2160
- @billing_cycle_anchor = billing_cycle_anchor
2161
- @cancel_subscription_schedule = cancel_subscription_schedule
2162
- @ends_at = ends_at
2163
- @id = id
2164
- @proration_behavior = proration_behavior
2165
- @set_pause_collection = set_pause_collection
2166
- @set_schedule_end = set_schedule_end
2167
- @starts_at = starts_at
2168
- @trial_settings = trial_settings
2169
- end
2170
- end
2171
208
 
2172
- class LineItem < Stripe::RequestParams
2173
- class Discount < Stripe::RequestParams
2174
- class DiscountEnd < Stripe::RequestParams
2175
- class Duration < Stripe::RequestParams
2176
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2177
- attr_accessor :interval
2178
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2179
- attr_accessor :interval_count
2180
-
2181
- def initialize(interval: nil, interval_count: nil)
2182
- @interval = interval
2183
- @interval_count = interval_count
2184
- end
2185
- end
2186
- # Time span for the redeemed discount.
2187
- attr_accessor :duration
2188
- # A precise Unix timestamp for the discount to end. Must be in the future.
2189
- attr_accessor :timestamp
2190
- # The type of calculation made to determine when the discount ends.
2191
- attr_accessor :type
2192
-
2193
- def initialize(duration: nil, timestamp: nil, type: nil)
2194
- @duration = duration
2195
- @timestamp = timestamp
2196
- @type = type
2197
- end
2198
- end
2199
- # ID of the coupon to create a new discount for.
2200
- attr_accessor :coupon
2201
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2202
- attr_accessor :discount
2203
- # Details to determine how long the discount should be applied for.
2204
- attr_accessor :discount_end
2205
- # ID of the promotion code to create a new discount for.
2206
- attr_accessor :promotion_code
2207
-
2208
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2209
- @coupon = coupon
2210
- @discount = discount
2211
- @discount_end = discount_end
2212
- @promotion_code = promotion_code
209
+ def self.field_remappings
210
+ @field_remappings = {}
2213
211
  end
2214
212
  end
213
+ # Total before any discounts or taxes are applied.
214
+ attr_reader :amount_subtotal
215
+ # Total after discounts and taxes are applied.
216
+ attr_reader :amount_total
217
+ # The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice.
218
+ attr_reader :line_items
219
+ # Attribute for field total_details
220
+ attr_reader :total_details
2215
221
 
2216
- class PriceData < Stripe::RequestParams
2217
- class Recurring < Stripe::RequestParams
2218
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
2219
- attr_accessor :interval
2220
- # 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).
2221
- attr_accessor :interval_count
2222
-
2223
- def initialize(interval: nil, interval_count: nil)
2224
- @interval = interval
2225
- @interval_count = interval_count
2226
- end
2227
- end
2228
- # 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).
2229
- attr_accessor :currency
2230
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
2231
- attr_accessor :product
2232
- # The recurring components of a price such as `interval` and `interval_count`.
2233
- attr_accessor :recurring
2234
- # 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.
2235
- attr_accessor :tax_behavior
2236
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
2237
- attr_accessor :unit_amount
2238
- # 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.
2239
- attr_accessor :unit_amount_decimal
2240
-
2241
- def initialize(
2242
- currency: nil,
2243
- product: nil,
2244
- recurring: nil,
2245
- tax_behavior: nil,
2246
- unit_amount: nil,
2247
- unit_amount_decimal: nil
2248
- )
2249
- @currency = currency
2250
- @product = product
2251
- @recurring = recurring
2252
- @tax_behavior = tax_behavior
2253
- @unit_amount = unit_amount
2254
- @unit_amount_decimal = unit_amount_decimal
2255
- end
222
+ def self.inner_class_types
223
+ @inner_class_types = { total_details: TotalDetails }
2256
224
  end
2257
- # The discounts applied to this line item.
2258
- attr_accessor :discounts
2259
- # The ID of an existing line item on the quote.
2260
- attr_accessor :id
2261
- # The ID of the price object. One of `price` or `price_data` is required.
2262
- attr_accessor :price
2263
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
2264
- attr_accessor :price_data
2265
- # The quantity of the line item.
2266
- attr_accessor :quantity
2267
- # 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.
2268
- attr_accessor :tax_rates
2269
-
2270
- def initialize(
2271
- discounts: nil,
2272
- id: nil,
2273
- price: nil,
2274
- price_data: nil,
2275
- quantity: nil,
2276
- tax_rates: nil
2277
- )
2278
- @discounts = discounts
2279
- @id = id
2280
- @price = price
2281
- @price_data = price_data
2282
- @quantity = quantity
2283
- @tax_rates = tax_rates
225
+
226
+ def self.field_remappings
227
+ @field_remappings = {}
2284
228
  end
2285
229
  end
230
+ # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices.
231
+ attr_reader :recurring
232
+ # Attribute for field upfront
233
+ attr_reader :upfront
2286
234
 
2287
- class SubscriptionData < Stripe::RequestParams
2288
- class BillOnAcceptance < Stripe::RequestParams
2289
- class BillFrom < Stripe::RequestParams
2290
- class LineStartsAt < Stripe::RequestParams
2291
- # The ID of a quote line.
2292
- attr_accessor :id
2293
- # 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.
2294
- attr_accessor :index
2295
-
2296
- def initialize(id: nil, index: nil)
2297
- @id = id
2298
- @index = index
2299
- end
2300
- end
2301
- # Details of a Quote line to start the bill period from.
2302
- attr_accessor :line_starts_at
2303
- # A precise Unix timestamp.
2304
- attr_accessor :timestamp
2305
- # The type of method to specify the `bill_from` time.
2306
- attr_accessor :type
2307
-
2308
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
2309
- @line_starts_at = line_starts_at
2310
- @timestamp = timestamp
2311
- @type = type
2312
- end
2313
- end
235
+ def self.inner_class_types
236
+ @inner_class_types = { recurring: Recurring, upfront: Upfront }
237
+ end
2314
238
 
2315
- class BillUntil < Stripe::RequestParams
2316
- class Duration < Stripe::RequestParams
2317
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2318
- attr_accessor :interval
2319
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2320
- attr_accessor :interval_count
239
+ def self.field_remappings
240
+ @field_remappings = {}
241
+ end
242
+ end
2321
243
 
2322
- def initialize(interval: nil, interval_count: nil)
2323
- @interval = interval
2324
- @interval_count = interval_count
2325
- end
2326
- end
244
+ class FromQuote < Stripe::StripeObject
245
+ # Whether this quote is a revision of a different quote.
246
+ attr_reader :is_revision
247
+ # The quote that was cloned.
248
+ attr_reader :quote
2327
249
 
2328
- class LineEndsAt < Stripe::RequestParams
2329
- # The ID of a quote line.
2330
- attr_accessor :id
2331
- # 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.
2332
- attr_accessor :index
250
+ def self.inner_class_types
251
+ @inner_class_types = {}
252
+ end
2333
253
 
2334
- def initialize(id: nil, index: nil)
2335
- @id = id
2336
- @index = index
2337
- end
2338
- end
2339
- # Details of the duration over which to bill.
2340
- attr_accessor :duration
2341
- # Details of a Quote line item from which to bill until.
2342
- attr_accessor :line_ends_at
2343
- # A precise Unix timestamp.
2344
- attr_accessor :timestamp
2345
- # The type of method to specify the `bill_until` time.
2346
- attr_accessor :type
2347
-
2348
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
2349
- @duration = duration
2350
- @line_ends_at = line_ends_at
2351
- @timestamp = timestamp
2352
- @type = type
2353
- end
2354
- end
2355
- # The start of the period to bill from when the Quote is accepted.
2356
- attr_accessor :bill_from
2357
- # The end of the period to bill until when the Quote is accepted.
2358
- attr_accessor :bill_until
2359
-
2360
- def initialize(bill_from: nil, bill_until: nil)
2361
- @bill_from = bill_from
2362
- @bill_until = bill_until
2363
- end
2364
- end
254
+ def self.field_remappings
255
+ @field_remappings = {}
256
+ end
257
+ end
2365
258
 
2366
- class Prebilling < Stripe::RequestParams
2367
- # This is used to determine the number of billing cycles to prebill.
2368
- attr_accessor :iterations
259
+ class InvoiceSettings < Stripe::StripeObject
260
+ class Issuer < Stripe::StripeObject
261
+ # The connected account being referenced when `type` is `account`.
262
+ attr_reader :account
263
+ # Type of the account referenced.
264
+ attr_reader :type
2369
265
 
2370
- def initialize(iterations: nil)
2371
- @iterations = iterations
2372
- end
266
+ def self.inner_class_types
267
+ @inner_class_types = {}
2373
268
  end
2374
- # Describes the period to bill for upon accepting the quote.
2375
- attr_accessor :bill_on_acceptance
2376
- # 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.
2377
- attr_accessor :billing_behavior
2378
- # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
2379
- attr_accessor :billing_cycle_anchor
2380
- # 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.
2381
- attr_accessor :description
2382
- # 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.
2383
- attr_accessor :effective_date
2384
- # Behavior of the subscription schedule and underlying subscription when it ends.
2385
- attr_accessor :end_behavior
2386
- # 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.
2387
- attr_accessor :metadata
2388
- # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`.
2389
- attr_accessor :prebilling
2390
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2391
- #
2392
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2393
- #
2394
- # 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`.
2395
- #
2396
- # Prorations can be disabled by passing `none`.
2397
- attr_accessor :proration_behavior
2398
- # Integer representing the number of trial period days before the customer is charged for the first time.
2399
- attr_accessor :trial_period_days
2400
-
2401
- def initialize(
2402
- bill_on_acceptance: nil,
2403
- billing_behavior: nil,
2404
- billing_cycle_anchor: nil,
2405
- description: nil,
2406
- effective_date: nil,
2407
- end_behavior: nil,
2408
- metadata: nil,
2409
- prebilling: nil,
2410
- proration_behavior: nil,
2411
- trial_period_days: nil
2412
- )
2413
- @bill_on_acceptance = bill_on_acceptance
2414
- @billing_behavior = billing_behavior
2415
- @billing_cycle_anchor = billing_cycle_anchor
2416
- @description = description
2417
- @effective_date = effective_date
2418
- @end_behavior = end_behavior
2419
- @metadata = metadata
2420
- @prebilling = prebilling
2421
- @proration_behavior = proration_behavior
2422
- @trial_period_days = trial_period_days
269
+
270
+ def self.field_remappings
271
+ @field_remappings = {}
2423
272
  end
2424
273
  end
274
+ # Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`.
275
+ attr_reader :days_until_due
276
+ # Attribute for field issuer
277
+ attr_reader :issuer
2425
278
 
2426
- class SubscriptionDataOverride < Stripe::RequestParams
2427
- class AppliesTo < Stripe::RequestParams
2428
- # 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.
2429
- attr_accessor :new_reference
2430
- # The ID of the schedule the line applies to.
2431
- attr_accessor :subscription_schedule
2432
- # Describes whether the quote line is affecting a new schedule or an existing schedule.
2433
- attr_accessor :type
2434
-
2435
- def initialize(new_reference: nil, subscription_schedule: nil, type: nil)
2436
- @new_reference = new_reference
2437
- @subscription_schedule = subscription_schedule
2438
- @type = type
2439
- end
2440
- end
279
+ def self.inner_class_types
280
+ @inner_class_types = { issuer: Issuer }
281
+ end
2441
282
 
2442
- class BillOnAcceptance < Stripe::RequestParams
2443
- class BillFrom < Stripe::RequestParams
2444
- class LineStartsAt < Stripe::RequestParams
2445
- # The ID of a quote line.
2446
- attr_accessor :id
2447
- # 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.
2448
- attr_accessor :index
2449
-
2450
- def initialize(id: nil, index: nil)
2451
- @id = id
2452
- @index = index
2453
- end
2454
- end
2455
- # Details of a Quote line to start the bill period from.
2456
- attr_accessor :line_starts_at
2457
- # A precise Unix timestamp.
2458
- attr_accessor :timestamp
2459
- # The type of method to specify the `bill_from` time.
2460
- attr_accessor :type
2461
-
2462
- def initialize(line_starts_at: nil, timestamp: nil, type: nil)
2463
- @line_starts_at = line_starts_at
2464
- @timestamp = timestamp
2465
- @type = type
2466
- end
2467
- end
283
+ def self.field_remappings
284
+ @field_remappings = {}
285
+ end
286
+ end
287
+
288
+ class StatusTransitions < Stripe::StripeObject
289
+ # The time that the quote was accepted. Measured in seconds since Unix epoch.
290
+ attr_reader :accepted_at
291
+ # The time that the quote was canceled. Measured in seconds since Unix epoch.
292
+ attr_reader :canceled_at
293
+ # The time that the quote was finalized. Measured in seconds since Unix epoch.
294
+ attr_reader :finalized_at
2468
295
 
2469
- class BillUntil < Stripe::RequestParams
2470
- class Duration < Stripe::RequestParams
2471
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2472
- attr_accessor :interval
2473
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2474
- attr_accessor :interval_count
296
+ def self.inner_class_types
297
+ @inner_class_types = {}
298
+ end
2475
299
 
2476
- def initialize(interval: nil, interval_count: nil)
2477
- @interval = interval
2478
- @interval_count = interval_count
2479
- end
2480
- end
300
+ def self.field_remappings
301
+ @field_remappings = {}
302
+ end
303
+ end
2481
304
 
2482
- class LineEndsAt < Stripe::RequestParams
2483
- # The ID of a quote line.
2484
- attr_accessor :id
2485
- # 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.
2486
- attr_accessor :index
305
+ class SubscriptionData < Stripe::StripeObject
306
+ class BillingMode < Stripe::StripeObject
307
+ class Flexible < Stripe::StripeObject
308
+ # Controls how invoices and invoice items display proration amounts and discount amounts.
309
+ attr_reader :proration_discounts
2487
310
 
2488
- def initialize(id: nil, index: nil)
2489
- @id = id
2490
- @index = index
2491
- end
2492
- end
2493
- # Details of the duration over which to bill.
2494
- attr_accessor :duration
2495
- # Details of a Quote line item from which to bill until.
2496
- attr_accessor :line_ends_at
2497
- # A precise Unix timestamp.
2498
- attr_accessor :timestamp
2499
- # The type of method to specify the `bill_until` time.
2500
- attr_accessor :type
2501
-
2502
- def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil)
2503
- @duration = duration
2504
- @line_ends_at = line_ends_at
2505
- @timestamp = timestamp
2506
- @type = type
2507
- end
311
+ def self.inner_class_types
312
+ @inner_class_types = {}
2508
313
  end
2509
- # The start of the period to bill from when the Quote is accepted.
2510
- attr_accessor :bill_from
2511
- # The end of the period to bill until when the Quote is accepted.
2512
- attr_accessor :bill_until
2513
-
2514
- def initialize(bill_from: nil, bill_until: nil)
2515
- @bill_from = bill_from
2516
- @bill_until = bill_until
314
+
315
+ def self.field_remappings
316
+ @field_remappings = {}
2517
317
  end
2518
318
  end
2519
- # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.
2520
- attr_accessor :applies_to
2521
- # Describes the period to bill for upon accepting the quote.
2522
- attr_accessor :bill_on_acceptance
2523
- # 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.
2524
- attr_accessor :billing_behavior
2525
- # The customer the Subscription Data override applies to.
2526
- attr_accessor :customer
2527
- # 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.
2528
- attr_accessor :description
2529
- # Behavior of the subscription schedule and underlying subscription when it ends.
2530
- attr_accessor :end_behavior
2531
- # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`.
2532
- #
2533
- # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`.
2534
- #
2535
- # 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`.
2536
- #
2537
- # Prorations can be disabled by passing `none`.
2538
- attr_accessor :proration_behavior
2539
-
2540
- def initialize(
2541
- applies_to: nil,
2542
- bill_on_acceptance: nil,
2543
- billing_behavior: nil,
2544
- customer: nil,
2545
- description: nil,
2546
- end_behavior: nil,
2547
- proration_behavior: nil
2548
- )
2549
- @applies_to = applies_to
2550
- @bill_on_acceptance = bill_on_acceptance
2551
- @billing_behavior = billing_behavior
2552
- @customer = customer
2553
- @description = description
2554
- @end_behavior = end_behavior
2555
- @proration_behavior = proration_behavior
2556
- end
2557
- end
319
+ # Attribute for field flexible
320
+ attr_reader :flexible
321
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
322
+ attr_reader :type
2558
323
 
2559
- class TransferData < Stripe::RequestParams
2560
- # 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.
2561
- attr_accessor :amount
2562
- # 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.
2563
- attr_accessor :amount_percent
2564
- # ID of an existing, connected Stripe account.
2565
- attr_accessor :destination
2566
-
2567
- def initialize(amount: nil, amount_percent: nil, destination: nil)
2568
- @amount = amount
2569
- @amount_percent = amount_percent
2570
- @destination = destination
324
+ def self.inner_class_types
325
+ @inner_class_types = { flexible: Flexible }
2571
326
  end
2572
- end
2573
- # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
2574
- attr_accessor :allow_backdated_lines
2575
- # 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.
2576
- attr_accessor :application_fee_amount
2577
- # 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.
2578
- attr_accessor :application_fee_percent
2579
- # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions.
2580
- attr_accessor :automatic_tax
2581
- # 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`.
2582
- attr_accessor :collection_method
2583
- # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
2584
- attr_accessor :customer
2585
- # The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
2586
- attr_accessor :customer_account
2587
- # The tax rates that will apply to any line item that does not have `tax_rates` set.
2588
- attr_accessor :default_tax_rates
2589
- # A description that will be displayed on the quote PDF.
2590
- attr_accessor :description
2591
- # The discounts applied to the quote.
2592
- attr_accessor :discounts
2593
- # Specifies which fields in the response should be expanded.
2594
- attr_accessor :expand
2595
- # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
2596
- attr_accessor :expires_at
2597
- # A footer that will be displayed on the quote PDF.
2598
- attr_accessor :footer
2599
- # A header that will be displayed on the quote PDF.
2600
- attr_accessor :header
2601
- # All invoices will be billed using the specified settings.
2602
- attr_accessor :invoice_settings
2603
- # 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.
2604
- attr_accessor :line_items
2605
- # 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.
2606
- attr_accessor :lines
2607
- # 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`.
2608
- attr_accessor :metadata
2609
- # The account on behalf of which to charge.
2610
- attr_accessor :on_behalf_of
2611
- # 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.
2612
- attr_accessor :subscription_data
2613
- # List representing overrides for `subscription_data` configurations for specific subscription schedules.
2614
- attr_accessor :subscription_data_overrides
2615
- # The data with which to automatically create a Transfer for each of the invoices.
2616
- attr_accessor :transfer_data
2617
-
2618
- def initialize(
2619
- allow_backdated_lines: nil,
2620
- application_fee_amount: nil,
2621
- application_fee_percent: nil,
2622
- automatic_tax: nil,
2623
- collection_method: nil,
2624
- customer: nil,
2625
- customer_account: nil,
2626
- default_tax_rates: nil,
2627
- description: nil,
2628
- discounts: nil,
2629
- expand: nil,
2630
- expires_at: nil,
2631
- footer: nil,
2632
- header: nil,
2633
- invoice_settings: nil,
2634
- line_items: nil,
2635
- lines: nil,
2636
- metadata: nil,
2637
- on_behalf_of: nil,
2638
- subscription_data: nil,
2639
- subscription_data_overrides: nil,
2640
- transfer_data: nil
2641
- )
2642
- @allow_backdated_lines = allow_backdated_lines
2643
- @application_fee_amount = application_fee_amount
2644
- @application_fee_percent = application_fee_percent
2645
- @automatic_tax = automatic_tax
2646
- @collection_method = collection_method
2647
- @customer = customer
2648
- @customer_account = customer_account
2649
- @default_tax_rates = default_tax_rates
2650
- @description = description
2651
- @discounts = discounts
2652
- @expand = expand
2653
- @expires_at = expires_at
2654
- @footer = footer
2655
- @header = header
2656
- @invoice_settings = invoice_settings
2657
- @line_items = line_items
2658
- @lines = lines
2659
- @metadata = metadata
2660
- @on_behalf_of = on_behalf_of
2661
- @subscription_data = subscription_data
2662
- @subscription_data_overrides = subscription_data_overrides
2663
- @transfer_data = transfer_data
2664
- end
2665
- end
2666
327
 
2667
- class ListComputedUpfrontLineItemsParams < Stripe::RequestParams
2668
- # 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.
2669
- attr_accessor :ending_before
2670
- # Specifies which fields in the response should be expanded.
2671
- attr_accessor :expand
2672
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2673
- attr_accessor :limit
2674
- # 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.
2675
- attr_accessor :starting_after
2676
-
2677
- def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
2678
- @ending_before = ending_before
2679
- @expand = expand
2680
- @limit = limit
2681
- @starting_after = starting_after
328
+ def self.field_remappings
329
+ @field_remappings = {}
330
+ end
2682
331
  end
2683
- end
332
+ # The billing mode of the quote.
333
+ attr_reader :billing_mode
334
+ # 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.
335
+ attr_reader :description
336
+ # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
337
+ attr_reader :effective_date
338
+ # 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.
339
+ attr_reader :metadata
340
+ # Integer representing the number of trial period days before the customer is charged for the first time.
341
+ attr_reader :trial_period_days
2684
342
 
2685
- class ListLineItemsParams < Stripe::RequestParams
2686
- # 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.
2687
- attr_accessor :ending_before
2688
- # Specifies which fields in the response should be expanded.
2689
- attr_accessor :expand
2690
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2691
- attr_accessor :limit
2692
- # 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.
2693
- attr_accessor :starting_after
2694
-
2695
- def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
2696
- @ending_before = ending_before
2697
- @expand = expand
2698
- @limit = limit
2699
- @starting_after = starting_after
343
+ def self.inner_class_types
344
+ @inner_class_types = { billing_mode: BillingMode }
2700
345
  end
2701
- end
2702
346
 
2703
- class ListLinesParams < Stripe::RequestParams
2704
- # 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.
2705
- attr_accessor :ending_before
2706
- # Specifies which fields in the response should be expanded.
2707
- attr_accessor :expand
2708
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2709
- attr_accessor :limit
2710
- # 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.
2711
- attr_accessor :starting_after
2712
-
2713
- def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
2714
- @ending_before = ending_before
2715
- @expand = expand
2716
- @limit = limit
2717
- @starting_after = starting_after
347
+ def self.field_remappings
348
+ @field_remappings = {}
2718
349
  end
2719
350
  end
2720
351
 
2721
- class AcceptParams < Stripe::RequestParams
2722
- # Specifies which fields in the response should be expanded.
2723
- attr_accessor :expand
352
+ class TotalDetails < Stripe::StripeObject
353
+ class Breakdown < Stripe::StripeObject
354
+ class Discount < Stripe::StripeObject
355
+ # The amount discounted.
356
+ attr_reader :amount
357
+ # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
358
+ # It contains information about when the discount began, when it will end, and what it is applied to.
359
+ #
360
+ # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
361
+ attr_reader :discount
2724
362
 
2725
- def initialize(expand: nil)
2726
- @expand = expand
2727
- end
2728
- end
363
+ def self.inner_class_types
364
+ @inner_class_types = {}
365
+ end
2729
366
 
2730
- class CancelParams < Stripe::RequestParams
2731
- # Specifies which fields in the response should be expanded.
2732
- attr_accessor :expand
367
+ def self.field_remappings
368
+ @field_remappings = {}
369
+ end
370
+ end
2733
371
 
2734
- def initialize(expand: nil)
2735
- @expand = expand
2736
- end
2737
- end
372
+ class Tax < Stripe::StripeObject
373
+ # Amount of tax applied for this rate.
374
+ attr_reader :amount
375
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
376
+ #
377
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
378
+ attr_reader :rate
379
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
380
+ attr_reader :taxability_reason
381
+ # The amount on which tax is calculated, in cents (or local equivalent).
382
+ attr_reader :taxable_amount
2738
383
 
2739
- class FinalizeQuoteParams < Stripe::RequestParams
2740
- # Specifies which fields in the response should be expanded.
2741
- attr_accessor :expand
2742
- # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch.
2743
- attr_accessor :expires_at
384
+ def self.inner_class_types
385
+ @inner_class_types = {}
386
+ end
2744
387
 
2745
- def initialize(expand: nil, expires_at: nil)
2746
- @expand = expand
2747
- @expires_at = expires_at
2748
- end
2749
- end
388
+ def self.field_remappings
389
+ @field_remappings = {}
390
+ end
391
+ end
392
+ # The aggregated discounts.
393
+ attr_reader :discounts
394
+ # The aggregated tax amounts by rate.
395
+ attr_reader :taxes
2750
396
 
2751
- class MarkDraftParams < Stripe::RequestParams
2752
- # Specifies which fields in the response should be expanded.
2753
- attr_accessor :expand
397
+ def self.inner_class_types
398
+ @inner_class_types = { discounts: Discount, taxes: Tax }
399
+ end
2754
400
 
2755
- def initialize(expand: nil)
2756
- @expand = expand
401
+ def self.field_remappings
402
+ @field_remappings = {}
403
+ end
2757
404
  end
2758
- end
2759
-
2760
- class MarkStaleParams < Stripe::RequestParams
2761
- # Specifies which fields in the response should be expanded.
2762
- attr_accessor :expand
2763
- # Reason the Quote is being marked stale.
2764
- attr_accessor :reason
405
+ # This is the sum of all the discounts.
406
+ attr_reader :amount_discount
407
+ # This is the sum of all the shipping amounts.
408
+ attr_reader :amount_shipping
409
+ # This is the sum of all the tax amounts.
410
+ attr_reader :amount_tax
411
+ # Attribute for field breakdown
412
+ attr_reader :breakdown
2765
413
 
2766
- def initialize(expand: nil, reason: nil)
2767
- @expand = expand
2768
- @reason = reason
414
+ def self.inner_class_types
415
+ @inner_class_types = { breakdown: Breakdown }
2769
416
  end
2770
- end
2771
-
2772
- class ReestimateParams < Stripe::RequestParams
2773
- # Specifies which fields in the response should be expanded.
2774
- attr_accessor :expand
2775
417
 
2776
- def initialize(expand: nil)
2777
- @expand = expand
418
+ def self.field_remappings
419
+ @field_remappings = {}
2778
420
  end
2779
421
  end
2780
422
 
2781
- class PdfParams < Stripe::RequestParams
2782
- # Specifies which fields in the response should be expanded.
2783
- attr_accessor :expand
423
+ class TransferData < Stripe::StripeObject
424
+ # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination.
425
+ attr_reader :amount
426
+ # 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 will be transferred to the destination.
427
+ attr_reader :amount_percent
428
+ # The account where funds from the payment will be transferred to upon payment success.
429
+ attr_reader :destination
2784
430
 
2785
- def initialize(expand: nil)
2786
- @expand = expand
431
+ def self.inner_class_types
432
+ @inner_class_types = {}
2787
433
  end
2788
- end
2789
434
 
2790
- class ListPreviewInvoiceLinesParams < Stripe::RequestParams
2791
- # 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.
2792
- attr_accessor :ending_before
2793
- # Specifies which fields in the response should be expanded.
2794
- attr_accessor :expand
2795
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
2796
- attr_accessor :limit
2797
- # 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.
2798
- attr_accessor :starting_after
2799
-
2800
- def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
2801
- @ending_before = ending_before
2802
- @expand = expand
2803
- @limit = limit
2804
- @starting_after = starting_after
435
+ def self.field_remappings
436
+ @field_remappings = {}
2805
437
  end
2806
438
  end
2807
- # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now.
2808
- attr_reader :allow_backdated_lines
2809
439
  # Total before any discounts or taxes are applied.
2810
440
  attr_reader :amount_subtotal
2811
441
  # Total after discounts and taxes are applied.
@@ -2828,8 +458,6 @@ module Stripe
2828
458
  attr_reader :currency
2829
459
  # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.
2830
460
  attr_reader :customer
2831
- # The account which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed.
2832
- attr_reader :customer_account
2833
461
  # The tax rates applied to this quote.
2834
462
  attr_reader :default_tax_rates
2835
463
  # A description that will be displayed on the quote PDF.
@@ -2852,8 +480,6 @@ module Stripe
2852
480
  attr_reader :invoice_settings
2853
481
  # A list of items the customer is being quoted for.
2854
482
  attr_reader :line_items
2855
- # 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.
2856
- attr_reader :lines
2857
483
  # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
2858
484
  attr_reader :livemode
2859
485
  # 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.
@@ -2866,20 +492,14 @@ module Stripe
2866
492
  attr_reader :on_behalf_of
2867
493
  # The status of the quote.
2868
494
  attr_reader :status
2869
- # Details on when and why a quote has been marked as stale or canceled.
2870
- attr_reader :status_details
2871
495
  # Attribute for field status_transitions
2872
496
  attr_reader :status_transitions
2873
497
  # The subscription that was created or updated from this quote.
2874
498
  attr_reader :subscription
2875
499
  # Attribute for field subscription_data
2876
500
  attr_reader :subscription_data
2877
- # List representing overrides for `subscription_data` configurations for specific subscription schedules.
2878
- attr_reader :subscription_data_overrides
2879
501
  # The subscription schedule that was created or updated from this quote.
2880
502
  attr_reader :subscription_schedule
2881
- # The subscription schedules that were created or updated from this quote.
2882
- attr_reader :subscription_schedules
2883
503
  # ID of the test clock this quote belongs to.
2884
504
  attr_reader :test_clock
2885
505
  # Attribute for field total_details
@@ -2997,86 +617,6 @@ module Stripe
2997
617
  )
2998
618
  end
2999
619
 
3000
- # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
3001
- def list_lines(params = {}, opts = {})
3002
- request_stripe_object(
3003
- method: :get,
3004
- path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(self["id"]) }),
3005
- params: params,
3006
- opts: opts
3007
- )
3008
- end
3009
-
3010
- # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
3011
- def self.list_lines(quote, params = {}, opts = {})
3012
- request_stripe_object(
3013
- method: :get,
3014
- path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
3015
- params: params,
3016
- opts: opts
3017
- )
3018
- end
3019
-
3020
- # Preview the invoice line items that would be generated by accepting the quote.
3021
- def list_preview_invoice_lines(preview_invoice, params = {}, opts = {})
3022
- request_stripe_object(
3023
- method: :get,
3024
- path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(self["id"]), preview_invoice: CGI.escape(preview_invoice) }),
3025
- params: params,
3026
- opts: opts
3027
- )
3028
- end
3029
-
3030
- # Preview the invoice line items that would be generated by accepting the quote.
3031
- def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
3032
- request_stripe_object(
3033
- method: :get,
3034
- path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
3035
- params: params,
3036
- opts: opts
3037
- )
3038
- end
3039
-
3040
- # Converts a stale quote to draft.
3041
- def mark_draft(params = {}, opts = {})
3042
- request_stripe_object(
3043
- method: :post,
3044
- path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(self["id"]) }),
3045
- params: params,
3046
- opts: opts
3047
- )
3048
- end
3049
-
3050
- # Converts a stale quote to draft.
3051
- def self.mark_draft(quote, params = {}, opts = {})
3052
- request_stripe_object(
3053
- method: :post,
3054
- path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
3055
- params: params,
3056
- opts: opts
3057
- )
3058
- end
3059
-
3060
- # Converts a draft or open quote to stale.
3061
- def mark_stale(params = {}, opts = {})
3062
- request_stripe_object(
3063
- method: :post,
3064
- path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(self["id"]) }),
3065
- params: params,
3066
- opts: opts
3067
- )
3068
- end
3069
-
3070
- # Converts a draft or open quote to stale.
3071
- def self.mark_stale(quote, params = {}, opts = {})
3072
- request_stripe_object(
3073
- method: :post,
3074
- path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
3075
- params: params,
3076
- opts: opts
3077
- )
3078
- end
3079
-
3080
620
  # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf)
3081
621
  def pdf(params = {}, opts = {}, &read_body_chunk_block)
3082
622
  opts = { api_base: APIRequestor.active_requestor.config.uploads_base }.merge(opts)
@@ -3103,34 +643,31 @@ module Stripe
3103
643
  )
3104
644
  end
3105
645
 
3106
- # Recompute the upcoming invoice estimate for the quote.
3107
- def reestimate(params = {}, opts = {})
646
+ # A quote models prices and services for a customer.
647
+ def self.update(quote, params = {}, opts = {})
3108
648
  request_stripe_object(
3109
649
  method: :post,
3110
- path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(self["id"]) }),
650
+ path: format("/v1/quotes/%<quote>s", { quote: CGI.escape(quote) }),
3111
651
  params: params,
3112
652
  opts: opts
3113
653
  )
3114
654
  end
3115
655
 
3116
- # Recompute the upcoming invoice estimate for the quote.
3117
- def self.reestimate(quote, params = {}, opts = {})
3118
- request_stripe_object(
3119
- method: :post,
3120
- path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
3121
- params: params,
3122
- opts: opts
3123
- )
656
+ def self.inner_class_types
657
+ @inner_class_types = {
658
+ automatic_tax: AutomaticTax,
659
+ computed: Computed,
660
+ from_quote: FromQuote,
661
+ invoice_settings: InvoiceSettings,
662
+ status_transitions: StatusTransitions,
663
+ subscription_data: SubscriptionData,
664
+ total_details: TotalDetails,
665
+ transfer_data: TransferData,
666
+ }
3124
667
  end
3125
668
 
3126
- # A quote models prices and services for a customer.
3127
- def self.update(quote, params = {}, opts = {})
3128
- request_stripe_object(
3129
- method: :post,
3130
- path: format("/v1/quotes/%<quote>s", { quote: CGI.escape(quote) }),
3131
- params: params,
3132
- opts: opts
3133
- )
669
+ def self.field_remappings
670
+ @field_remappings = {}
3134
671
  end
3135
672
  end
3136
673
  end