stripe 5.55.0 → 18.2.0.pre.beta.1

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 (1336) hide show
  1. checksums.yaml +4 -4
  2. data/{bin → exe}/stripe-console +1 -1
  3. data/lib/data/ca-certificates.crt +1805 -2337
  4. data/lib/stripe/api_operations/create.rb +6 -2
  5. data/lib/stripe/api_operations/delete.rb +12 -7
  6. data/lib/stripe/api_operations/list.rb +6 -9
  7. data/lib/stripe/api_operations/nested_resource.rb +59 -31
  8. data/lib/stripe/api_operations/request.rb +30 -65
  9. data/lib/stripe/api_operations/save.rb +20 -10
  10. data/lib/stripe/api_operations/search.rb +11 -9
  11. data/lib/stripe/api_operations/singleton_save.rb +90 -0
  12. data/lib/stripe/api_requestor.rb +1173 -0
  13. data/lib/stripe/api_resource.rb +51 -18
  14. data/lib/stripe/api_resource_test_helpers.rb +9 -3
  15. data/lib/stripe/{resources/usage_record.rb → api_version.rb} +2 -2
  16. data/lib/stripe/connection_manager.rb +6 -10
  17. data/lib/stripe/errors.rb +74 -20
  18. data/lib/stripe/event_types.rb +242 -0
  19. data/lib/stripe/events/unknown_event_notification.rb +19 -0
  20. data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +123 -0
  21. data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +100 -0
  22. data/lib/stripe/events/v2_core_account_closed_event.rb +44 -0
  23. data/lib/stripe/events/v2_core_account_created_event.rb +44 -0
  24. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +63 -0
  25. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +44 -0
  26. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +63 -0
  27. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +44 -0
  28. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +63 -0
  29. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +44 -0
  30. data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +63 -0
  31. data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +44 -0
  32. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +44 -0
  33. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +44 -0
  34. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +44 -0
  35. data/lib/stripe/events/v2_core_account_link_returned_event.rb +42 -0
  36. data/lib/stripe/events/v2_core_account_person_created_event.rb +61 -0
  37. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +61 -0
  38. data/lib/stripe/events/v2_core_account_person_updated_event.rb +61 -0
  39. data/lib/stripe/events/v2_core_account_updated_event.rb +44 -0
  40. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +44 -0
  41. data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +78 -0
  42. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +44 -0
  43. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +44 -0
  44. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +44 -0
  45. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +44 -0
  46. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +44 -0
  47. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +61 -0
  48. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +44 -0
  49. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +44 -0
  50. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +44 -0
  51. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +44 -0
  52. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +44 -0
  53. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +44 -0
  54. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +44 -0
  55. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +44 -0
  56. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +44 -0
  57. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +44 -0
  58. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +44 -0
  59. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +44 -0
  60. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +44 -0
  61. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +44 -0
  62. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +44 -0
  63. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +44 -0
  64. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +44 -0
  65. data/lib/stripe/events/v2_money_management_payout_method_created_event.rb +44 -0
  66. data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +44 -0
  67. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +61 -0
  68. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +44 -0
  69. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +44 -0
  70. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +44 -0
  71. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +44 -0
  72. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +44 -0
  73. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +44 -0
  74. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +44 -0
  75. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +44 -0
  76. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +61 -0
  77. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +44 -0
  78. data/lib/stripe/instrumentation.rb +37 -15
  79. data/lib/stripe/list_object.rb +5 -3
  80. data/lib/stripe/multipart_encoder.rb +7 -7
  81. data/lib/stripe/oauth.rb +14 -21
  82. data/lib/stripe/object_types.rb +220 -103
  83. data/lib/stripe/params/account_capability_list_params.rb +13 -0
  84. data/lib/stripe/params/account_capability_retrieve_params.rb +13 -0
  85. data/lib/stripe/params/account_capability_update_params.rb +18 -0
  86. data/lib/stripe/params/account_create_params.rb +2440 -0
  87. data/lib/stripe/params/account_delete_params.rb +6 -0
  88. data/lib/stripe/params/account_external_account_create_params.rb +134 -0
  89. data/lib/stripe/params/account_external_account_delete_params.rb +6 -0
  90. data/lib/stripe/params/account_external_account_list_params.rb +25 -0
  91. data/lib/stripe/params/account_external_account_retrieve_params.rb +13 -0
  92. data/lib/stripe/params/account_external_account_update_params.rb +91 -0
  93. data/lib/stripe/params/account_link_create_params.rb +52 -0
  94. data/lib/stripe/params/account_list_params.rb +42 -0
  95. data/lib/stripe/params/account_login_link_create_params.rb +13 -0
  96. data/lib/stripe/params/account_notice_list_params.rb +25 -0
  97. data/lib/stripe/params/account_notice_retrieve_params.rb +13 -0
  98. data/lib/stripe/params/account_notice_update_params.rb +36 -0
  99. data/lib/stripe/params/account_person_create_params.rb +435 -0
  100. data/lib/stripe/params/account_person_delete_params.rb +6 -0
  101. data/lib/stripe/params/account_person_list_params.rb +61 -0
  102. data/lib/stripe/params/account_person_retrieve_params.rb +13 -0
  103. data/lib/stripe/params/account_person_update_params.rb +435 -0
  104. data/lib/stripe/params/account_persons_params.rb +61 -0
  105. data/lib/stripe/params/account_reject_params.rb +16 -0
  106. data/lib/stripe/params/account_retrieve_current_params.rb +13 -0
  107. data/lib/stripe/params/account_retrieve_params.rb +13 -0
  108. data/lib/stripe/params/account_session_create_params.rb +823 -0
  109. data/lib/stripe/params/account_update_params.rb +2350 -0
  110. data/lib/stripe/params/apple_pay_domain_create_params.rb +16 -0
  111. data/lib/stripe/params/apple_pay_domain_delete_params.rb +6 -0
  112. data/lib/stripe/params/apple_pay_domain_list_params.rb +31 -0
  113. data/lib/stripe/params/apple_pay_domain_retrieve_params.rb +13 -0
  114. data/lib/stripe/params/application_fee_list_params.rb +52 -0
  115. data/lib/stripe/params/application_fee_refund_create_params.rb +19 -0
  116. data/lib/stripe/params/application_fee_refund_list_params.rb +22 -0
  117. data/lib/stripe/params/application_fee_refund_retrieve_params.rb +13 -0
  118. data/lib/stripe/params/application_fee_refund_update_params.rb +16 -0
  119. data/lib/stripe/params/application_fee_retrieve_params.rb +13 -0
  120. data/lib/stripe/params/apps/secret_create_params.rb +38 -0
  121. data/lib/stripe/params/apps/secret_delete_where_params.rb +32 -0
  122. data/lib/stripe/params/apps/secret_find_params.rb +32 -0
  123. data/lib/stripe/params/apps/secret_list_params.rb +38 -0
  124. data/lib/stripe/params/balance_retrieve_params.rb +13 -0
  125. data/lib/stripe/params/balance_settings_retrieve_params.rb +13 -0
  126. data/lib/stripe/params/balance_settings_update_params.rb +67 -0
  127. data/lib/stripe/params/balance_transaction_list_params.rb +64 -0
  128. data/lib/stripe/params/balance_transaction_retrieve_params.rb +13 -0
  129. data/lib/stripe/params/billing/alert_activate_params.rb +15 -0
  130. data/lib/stripe/params/billing/alert_archive_params.rb +15 -0
  131. data/lib/stripe/params/billing/alert_create_params.rb +52 -0
  132. data/lib/stripe/params/billing/alert_deactivate_params.rb +15 -0
  133. data/lib/stripe/params/billing/alert_list_params.rb +37 -0
  134. data/lib/stripe/params/billing/alert_retrieve_params.rb +15 -0
  135. data/lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb +65 -0
  136. data/lib/stripe/params/billing/credit_balance_summary_retrieve_params.rb +57 -0
  137. data/lib/stripe/params/billing/credit_balance_transaction_list_params.rb +41 -0
  138. data/lib/stripe/params/billing/credit_balance_transaction_retrieve_params.rb +15 -0
  139. data/lib/stripe/params/billing/credit_grant_create_params.rb +107 -0
  140. data/lib/stripe/params/billing/credit_grant_expire_params.rb +15 -0
  141. data/lib/stripe/params/billing/credit_grant_list_params.rb +37 -0
  142. data/lib/stripe/params/billing/credit_grant_retrieve_params.rb +15 -0
  143. data/lib/stripe/params/billing/credit_grant_update_params.rb +21 -0
  144. data/lib/stripe/params/billing/credit_grant_void_grant_params.rb +15 -0
  145. data/lib/stripe/params/billing/meter_create_params.rb +70 -0
  146. data/lib/stripe/params/billing/meter_deactivate_params.rb +15 -0
  147. data/lib/stripe/params/billing/meter_event_adjustment_create_params.rb +32 -0
  148. data/lib/stripe/params/billing/meter_event_create_params.rb +27 -0
  149. data/lib/stripe/params/billing/meter_event_summary_list_params.rb +45 -0
  150. data/lib/stripe/params/billing/meter_list_params.rb +27 -0
  151. data/lib/stripe/params/billing/meter_reactivate_params.rb +15 -0
  152. data/lib/stripe/params/billing/meter_retrieve_params.rb +15 -0
  153. data/lib/stripe/params/billing/meter_update_params.rb +18 -0
  154. data/lib/stripe/params/billing_portal/configuration_create_params.rb +232 -0
  155. data/lib/stripe/params/billing_portal/configuration_list_params.rb +37 -0
  156. data/lib/stripe/params/billing_portal/configuration_retrieve_params.rb +15 -0
  157. data/lib/stripe/params/billing_portal/configuration_update_params.rb +238 -0
  158. data/lib/stripe/params/billing_portal/session_create_params.rb +183 -0
  159. data/lib/stripe/params/capital/financing_offer_list_params.rb +58 -0
  160. data/lib/stripe/params/capital/financing_offer_mark_delivered_params.rb +15 -0
  161. data/lib/stripe/params/capital/financing_offer_retrieve_params.rb +15 -0
  162. data/lib/stripe/params/capital/financing_summary_retrieve_params.rb +15 -0
  163. data/lib/stripe/params/capital/financing_transaction_list_params.rb +45 -0
  164. data/lib/stripe/params/capital/financing_transaction_retrieve_params.rb +15 -0
  165. data/lib/stripe/params/charge_capture_params.rb +1705 -0
  166. data/lib/stripe/params/charge_create_params.rb +172 -0
  167. data/lib/stripe/params/charge_list_params.rb +60 -0
  168. data/lib/stripe/params/charge_retrieve_params.rb +13 -0
  169. data/lib/stripe/params/charge_search_params.rb +22 -0
  170. data/lib/stripe/params/charge_update_params.rb +1750 -0
  171. data/lib/stripe/params/checkout/session_create_params.rb +2654 -0
  172. data/lib/stripe/params/checkout/session_expire_params.rb +15 -0
  173. data/lib/stripe/params/checkout/session_line_item_list_params.rb +24 -0
  174. data/lib/stripe/params/checkout/session_list_line_items_params.rb +24 -0
  175. data/lib/stripe/params/checkout/session_list_params.rb +87 -0
  176. data/lib/stripe/params/checkout/session_retrieve_params.rb +15 -0
  177. data/lib/stripe/params/checkout/session_update_params.rb +466 -0
  178. data/lib/stripe/params/climate/order_cancel_params.rb +15 -0
  179. data/lib/stripe/params/climate/order_create_params.rb +49 -0
  180. data/lib/stripe/params/climate/order_list_params.rb +24 -0
  181. data/lib/stripe/params/climate/order_retrieve_params.rb +15 -0
  182. data/lib/stripe/params/climate/order_update_params.rb +29 -0
  183. data/lib/stripe/params/climate/product_list_params.rb +24 -0
  184. data/lib/stripe/params/climate/product_retrieve_params.rb +15 -0
  185. data/lib/stripe/params/climate/supplier_list_params.rb +24 -0
  186. data/lib/stripe/params/climate/supplier_retrieve_params.rb +15 -0
  187. data/lib/stripe/params/confirmation_token_create_params.rb +747 -0
  188. data/lib/stripe/params/confirmation_token_retrieve_params.rb +13 -0
  189. data/lib/stripe/params/country_spec_list_params.rb +22 -0
  190. data/lib/stripe/params/country_spec_retrieve_params.rb +13 -0
  191. data/lib/stripe/params/coupon_create_params.rb +96 -0
  192. data/lib/stripe/params/coupon_delete_params.rb +6 -0
  193. data/lib/stripe/params/coupon_list_params.rb +42 -0
  194. data/lib/stripe/params/coupon_retrieve_params.rb +13 -0
  195. data/lib/stripe/params/coupon_update_params.rb +30 -0
  196. data/lib/stripe/params/credit_note_create_params.rb +161 -0
  197. data/lib/stripe/params/credit_note_line_item_list_params.rb +22 -0
  198. data/lib/stripe/params/credit_note_list_params.rb +60 -0
  199. data/lib/stripe/params/credit_note_list_preview_line_items_params.rb +173 -0
  200. data/lib/stripe/params/credit_note_preview_lines_list_params.rb +173 -0
  201. data/lib/stripe/params/credit_note_preview_params.rb +161 -0
  202. data/lib/stripe/params/credit_note_retrieve_params.rb +13 -0
  203. data/lib/stripe/params/credit_note_update_params.rb +19 -0
  204. data/lib/stripe/params/credit_note_void_credit_note_params.rb +13 -0
  205. data/lib/stripe/params/customer_balance_transaction_create_params.rb +25 -0
  206. data/lib/stripe/params/customer_balance_transaction_list_params.rb +52 -0
  207. data/lib/stripe/params/customer_balance_transaction_retrieve_params.rb +13 -0
  208. data/lib/stripe/params/customer_balance_transaction_update_params.rb +19 -0
  209. data/lib/stripe/params/customer_cash_balance_retrieve_params.rb +13 -0
  210. data/lib/stripe/params/customer_cash_balance_transaction_list_params.rb +22 -0
  211. data/lib/stripe/params/customer_cash_balance_transaction_retrieve_params.rb +13 -0
  212. data/lib/stripe/params/customer_cash_balance_update_params.rb +24 -0
  213. data/lib/stripe/params/customer_create_funding_instructions_params.rb +46 -0
  214. data/lib/stripe/params/customer_create_params.rb +259 -0
  215. data/lib/stripe/params/customer_delete_discount_params.rb +6 -0
  216. data/lib/stripe/params/customer_delete_params.rb +6 -0
  217. data/lib/stripe/params/customer_fund_cash_balance_params.rb +22 -0
  218. data/lib/stripe/params/customer_funding_instructions_create_params.rb +46 -0
  219. data/lib/stripe/params/customer_list_params.rb +56 -0
  220. data/lib/stripe/params/customer_list_payment_methods_params.rb +35 -0
  221. data/lib/stripe/params/customer_payment_method_list_params.rb +35 -0
  222. data/lib/stripe/params/customer_payment_method_retrieve_params.rb +13 -0
  223. data/lib/stripe/params/customer_payment_source_create_params.rb +22 -0
  224. data/lib/stripe/params/customer_payment_source_delete_params.rb +13 -0
  225. data/lib/stripe/params/customer_payment_source_list_params.rb +25 -0
  226. data/lib/stripe/params/customer_payment_source_retrieve_params.rb +13 -0
  227. data/lib/stripe/params/customer_payment_source_update_params.rb +114 -0
  228. data/lib/stripe/params/customer_payment_source_verify_params.rb +16 -0
  229. data/lib/stripe/params/customer_retrieve_params.rb +13 -0
  230. data/lib/stripe/params/customer_retrieve_payment_method_params.rb +13 -0
  231. data/lib/stripe/params/customer_search_params.rb +22 -0
  232. data/lib/stripe/params/customer_session_create_params.rb +219 -0
  233. data/lib/stripe/params/customer_tax_id_create_params.rb +19 -0
  234. data/lib/stripe/params/customer_tax_id_delete_params.rb +6 -0
  235. data/lib/stripe/params/customer_tax_id_list_params.rb +22 -0
  236. data/lib/stripe/params/customer_tax_id_retrieve_params.rb +13 -0
  237. data/lib/stripe/params/customer_update_params.rb +243 -0
  238. data/lib/stripe/params/dispute_close_params.rb +13 -0
  239. data/lib/stripe/params/dispute_list_params.rb +56 -0
  240. data/lib/stripe/params/dispute_retrieve_params.rb +13 -0
  241. data/lib/stripe/params/dispute_update_params.rb +317 -0
  242. data/lib/stripe/params/entitlements/active_entitlement_list_params.rb +33 -0
  243. data/lib/stripe/params/entitlements/active_entitlement_retrieve_params.rb +15 -0
  244. data/lib/stripe/params/entitlements/feature_create_params.rb +24 -0
  245. data/lib/stripe/params/entitlements/feature_list_params.rb +37 -0
  246. data/lib/stripe/params/entitlements/feature_retrieve_params.rb +15 -0
  247. data/lib/stripe/params/entitlements/feature_update_params.rb +24 -0
  248. data/lib/stripe/params/ephemeral_key_create_params.rb +31 -0
  249. data/lib/stripe/params/ephemeral_key_delete_params.rb +13 -0
  250. data/lib/stripe/params/event_list_params.rb +60 -0
  251. data/lib/stripe/params/event_retrieve_params.rb +13 -0
  252. data/lib/stripe/params/exchange_rate_list_params.rb +22 -0
  253. data/lib/stripe/params/exchange_rate_retrieve_params.rb +13 -0
  254. data/lib/stripe/params/external_account_create_params.rb +134 -0
  255. data/lib/stripe/params/external_account_delete_params.rb +6 -0
  256. data/lib/stripe/params/external_account_list_params.rb +25 -0
  257. data/lib/stripe/params/external_account_retrieve_params.rb +13 -0
  258. data/lib/stripe/params/external_account_update_params.rb +91 -0
  259. data/lib/stripe/params/file_create_params.rb +36 -0
  260. data/lib/stripe/params/file_link_create_params.rb +22 -0
  261. data/lib/stripe/params/file_link_list_params.rb +56 -0
  262. data/lib/stripe/params/file_link_retrieve_params.rb +13 -0
  263. data/lib/stripe/params/file_link_update_params.rb +19 -0
  264. data/lib/stripe/params/file_list_params.rb +52 -0
  265. data/lib/stripe/params/file_retrieve_params.rb +13 -0
  266. data/lib/stripe/params/financial_connections/account_disconnect_params.rb +15 -0
  267. data/lib/stripe/params/financial_connections/account_inferred_balance_list_params.rb +24 -0
  268. data/lib/stripe/params/financial_connections/account_list_owners_params.rb +33 -0
  269. data/lib/stripe/params/financial_connections/account_list_params.rb +51 -0
  270. data/lib/stripe/params/financial_connections/account_owner_list_params.rb +33 -0
  271. data/lib/stripe/params/financial_connections/account_refresh_account_params.rb +18 -0
  272. data/lib/stripe/params/financial_connections/account_refresh_params.rb +18 -0
  273. data/lib/stripe/params/financial_connections/account_retrieve_params.rb +15 -0
  274. data/lib/stripe/params/financial_connections/account_subscribe_params.rb +18 -0
  275. data/lib/stripe/params/financial_connections/account_unsubscribe_params.rb +18 -0
  276. data/lib/stripe/params/financial_connections/institution_list_params.rb +24 -0
  277. data/lib/stripe/params/financial_connections/institution_retrieve_params.rb +15 -0
  278. data/lib/stripe/params/financial_connections/session_create_params.rb +97 -0
  279. data/lib/stripe/params/financial_connections/session_retrieve_params.rb +15 -0
  280. data/lib/stripe/params/financial_connections/transaction_list_params.rb +67 -0
  281. data/lib/stripe/params/financial_connections/transaction_retrieve_params.rb +15 -0
  282. data/lib/stripe/params/forwarding/request_create_params.rb +59 -0
  283. data/lib/stripe/params/forwarding/request_list_params.rb +44 -0
  284. data/lib/stripe/params/forwarding/request_retrieve_params.rb +15 -0
  285. data/lib/stripe/params/fx_quote_create_params.rb +73 -0
  286. data/lib/stripe/params/fx_quote_list_params.rb +22 -0
  287. data/lib/stripe/params/fx_quote_retrieve_params.rb +13 -0
  288. data/lib/stripe/params/identity/verification_report_list_params.rb +62 -0
  289. data/lib/stripe/params/identity/verification_report_retrieve_params.rb +15 -0
  290. data/lib/stripe/params/identity/verification_session_cancel_params.rb +15 -0
  291. data/lib/stripe/params/identity/verification_session_create_params.rb +111 -0
  292. data/lib/stripe/params/identity/verification_session_list_params.rb +66 -0
  293. data/lib/stripe/params/identity/verification_session_redact_params.rb +15 -0
  294. data/lib/stripe/params/identity/verification_session_retrieve_params.rb +15 -0
  295. data/lib/stripe/params/identity/verification_session_update_params.rb +69 -0
  296. data/lib/stripe/params/invoice_add_lines_params.rb +263 -0
  297. data/lib/stripe/params/invoice_attach_payment_params.rb +61 -0
  298. data/lib/stripe/params/invoice_create_params.rb +723 -0
  299. data/lib/stripe/params/invoice_create_preview_params.rb +1810 -0
  300. data/lib/stripe/params/invoice_delete_params.rb +6 -0
  301. data/lib/stripe/params/invoice_finalize_invoice_params.rb +16 -0
  302. data/lib/stripe/params/invoice_item_create_params.rb +181 -0
  303. data/lib/stripe/params/invoice_item_delete_params.rb +6 -0
  304. data/lib/stripe/params/invoice_item_list_params.rb +64 -0
  305. data/lib/stripe/params/invoice_item_retrieve_params.rb +13 -0
  306. data/lib/stripe/params/invoice_item_update_params.rb +161 -0
  307. data/lib/stripe/params/invoice_line_item_list_params.rb +22 -0
  308. data/lib/stripe/params/invoice_line_item_update_params.rb +249 -0
  309. data/lib/stripe/params/invoice_list_params.rb +90 -0
  310. data/lib/stripe/params/invoice_mark_uncollectible_params.rb +13 -0
  311. data/lib/stripe/params/invoice_pay_params.rb +41 -0
  312. data/lib/stripe/params/invoice_payment_list_params.rb +75 -0
  313. data/lib/stripe/params/invoice_payment_retrieve_params.rb +13 -0
  314. data/lib/stripe/params/invoice_remove_lines_params.rb +30 -0
  315. data/lib/stripe/params/invoice_rendering_template_archive_params.rb +13 -0
  316. data/lib/stripe/params/invoice_rendering_template_list_params.rb +25 -0
  317. data/lib/stripe/params/invoice_rendering_template_retrieve_params.rb +16 -0
  318. data/lib/stripe/params/invoice_rendering_template_unarchive_params.rb +13 -0
  319. data/lib/stripe/params/invoice_retrieve_params.rb +13 -0
  320. data/lib/stripe/params/invoice_search_params.rb +22 -0
  321. data/lib/stripe/params/invoice_send_invoice_params.rb +13 -0
  322. data/lib/stripe/params/invoice_update_lines_params.rb +263 -0
  323. data/lib/stripe/params/invoice_update_params.rb +687 -0
  324. data/lib/stripe/params/invoice_void_invoice_params.rb +13 -0
  325. data/lib/stripe/params/issuing/authorization_approve_params.rb +21 -0
  326. data/lib/stripe/params/issuing/authorization_capture_params.rb +265 -0
  327. data/lib/stripe/params/issuing/authorization_create_params.rb +372 -0
  328. data/lib/stripe/params/issuing/authorization_decline_params.rb +18 -0
  329. data/lib/stripe/params/issuing/authorization_expire_params.rb +15 -0
  330. data/lib/stripe/params/issuing/authorization_finalize_amount_params.rb +143 -0
  331. data/lib/stripe/params/issuing/authorization_increment_params.rb +21 -0
  332. data/lib/stripe/params/issuing/authorization_list_params.rb +62 -0
  333. data/lib/stripe/params/issuing/authorization_respond_params.rb +18 -0
  334. data/lib/stripe/params/issuing/authorization_retrieve_params.rb +15 -0
  335. data/lib/stripe/params/issuing/authorization_reverse_params.rb +18 -0
  336. data/lib/stripe/params/issuing/authorization_update_params.rb +18 -0
  337. data/lib/stripe/params/issuing/card_create_params.rb +213 -0
  338. data/lib/stripe/params/issuing/card_deliver_card_params.rb +15 -0
  339. data/lib/stripe/params/issuing/card_fail_card_params.rb +15 -0
  340. data/lib/stripe/params/issuing/card_list_params.rb +78 -0
  341. data/lib/stripe/params/issuing/card_retrieve_params.rb +15 -0
  342. data/lib/stripe/params/issuing/card_return_card_params.rb +15 -0
  343. data/lib/stripe/params/issuing/card_ship_card_params.rb +15 -0
  344. data/lib/stripe/params/issuing/card_submit_card_params.rb +15 -0
  345. data/lib/stripe/params/issuing/card_update_params.rb +181 -0
  346. data/lib/stripe/params/issuing/cardholder_create_params.rb +239 -0
  347. data/lib/stripe/params/issuing/cardholder_list_params.rb +66 -0
  348. data/lib/stripe/params/issuing/cardholder_retrieve_params.rb +15 -0
  349. data/lib/stripe/params/issuing/cardholder_update_params.rb +230 -0
  350. data/lib/stripe/params/issuing/credit_underwriting_record_correct_params.rb +163 -0
  351. data/lib/stripe/params/issuing/credit_underwriting_record_create_from_application_params.rb +50 -0
  352. data/lib/stripe/params/issuing/credit_underwriting_record_create_from_proactive_review_params.rb +128 -0
  353. data/lib/stripe/params/issuing/credit_underwriting_record_list_params.rb +24 -0
  354. data/lib/stripe/params/issuing/credit_underwriting_record_report_decision_params.rb +86 -0
  355. data/lib/stripe/params/issuing/credit_underwriting_record_retrieve_params.rb +15 -0
  356. data/lib/stripe/params/issuing/dispute_create_params.rb +297 -0
  357. data/lib/stripe/params/issuing/dispute_list_params.rb +58 -0
  358. data/lib/stripe/params/issuing/dispute_retrieve_params.rb +15 -0
  359. data/lib/stripe/params/issuing/dispute_settlement_detail_list_params.rb +33 -0
  360. data/lib/stripe/params/issuing/dispute_settlement_detail_retrieve_params.rb +15 -0
  361. data/lib/stripe/params/issuing/dispute_submit_params.rb +18 -0
  362. data/lib/stripe/params/issuing/dispute_update_params.rb +275 -0
  363. data/lib/stripe/params/issuing/fraud_liability_debit_list_params.rb +44 -0
  364. data/lib/stripe/params/issuing/fraud_liability_debit_retrieve_params.rb +15 -0
  365. data/lib/stripe/params/issuing/personalization_design_activate_params.rb +15 -0
  366. data/lib/stripe/params/issuing/personalization_design_create_params.rb +75 -0
  367. data/lib/stripe/params/issuing/personalization_design_deactivate_params.rb +15 -0
  368. data/lib/stripe/params/issuing/personalization_design_list_params.rb +52 -0
  369. data/lib/stripe/params/issuing/personalization_design_reject_params.rb +29 -0
  370. data/lib/stripe/params/issuing/personalization_design_retrieve_params.rb +15 -0
  371. data/lib/stripe/params/issuing/personalization_design_update_params.rb +75 -0
  372. data/lib/stripe/params/issuing/physical_bundle_list_params.rb +37 -0
  373. data/lib/stripe/params/issuing/physical_bundle_retrieve_params.rb +15 -0
  374. data/lib/stripe/params/issuing/token_list_params.rb +58 -0
  375. data/lib/stripe/params/issuing/token_retrieve_params.rb +15 -0
  376. data/lib/stripe/params/issuing/token_update_params.rb +18 -0
  377. data/lib/stripe/params/issuing/transaction_create_force_capture_params.rb +316 -0
  378. data/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb +316 -0
  379. data/lib/stripe/params/issuing/transaction_list_params.rb +66 -0
  380. data/lib/stripe/params/issuing/transaction_refund_params.rb +18 -0
  381. data/lib/stripe/params/issuing/transaction_retrieve_params.rb +15 -0
  382. data/lib/stripe/params/issuing/transaction_update_params.rb +18 -0
  383. data/lib/stripe/params/mandate_list_params.rb +39 -0
  384. data/lib/stripe/params/mandate_retrieve_params.rb +13 -0
  385. data/lib/stripe/params/margin_create_params.rb +25 -0
  386. data/lib/stripe/params/margin_list_params.rb +25 -0
  387. data/lib/stripe/params/margin_retrieve_params.rb +13 -0
  388. data/lib/stripe/params/margin_update_params.rb +22 -0
  389. data/lib/stripe/params/order_cancel_params.rb +13 -0
  390. data/lib/stripe/params/order_create_params.rb +2061 -0
  391. data/lib/stripe/params/order_line_item_list_params.rb +22 -0
  392. data/lib/stripe/params/order_list_line_items_params.rb +22 -0
  393. data/lib/stripe/params/order_list_params.rb +25 -0
  394. data/lib/stripe/params/order_reopen_params.rb +13 -0
  395. data/lib/stripe/params/order_retrieve_params.rb +13 -0
  396. data/lib/stripe/params/order_submit_params.rb +16 -0
  397. data/lib/stripe/params/order_update_params.rb +2065 -0
  398. data/lib/stripe/params/payment_attempt_record_list_params.rb +22 -0
  399. data/lib/stripe/params/payment_attempt_record_retrieve_params.rb +13 -0
  400. data/lib/stripe/params/payment_intent_amount_details_line_item_list_params.rb +22 -0
  401. data/lib/stripe/params/payment_intent_apply_customer_balance_params.rb +23 -0
  402. data/lib/stripe/params/payment_intent_cancel_params.rb +16 -0
  403. data/lib/stripe/params/payment_intent_capture_params.rb +1906 -0
  404. data/lib/stripe/params/payment_intent_confirm_params.rb +5647 -0
  405. data/lib/stripe/params/payment_intent_create_params.rb +5756 -0
  406. data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +73 -0
  407. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +295 -0
  408. data/lib/stripe/params/payment_intent_list_params.rb +56 -0
  409. data/lib/stripe/params/payment_intent_retrieve_params.rb +16 -0
  410. data/lib/stripe/params/payment_intent_search_params.rb +22 -0
  411. data/lib/stripe/params/payment_intent_trigger_action_params.rb +27 -0
  412. data/lib/stripe/params/payment_intent_update_params.rb +5660 -0
  413. data/lib/stripe/params/payment_intent_verify_microdeposits_params.rb +19 -0
  414. data/lib/stripe/params/payment_link_create_params.rb +815 -0
  415. data/lib/stripe/params/payment_link_line_item_list_params.rb +22 -0
  416. data/lib/stripe/params/payment_link_list_line_items_params.rb +22 -0
  417. data/lib/stripe/params/payment_link_list_params.rb +25 -0
  418. data/lib/stripe/params/payment_link_retrieve_params.rb +13 -0
  419. data/lib/stripe/params/payment_link_update_params.rb +603 -0
  420. data/lib/stripe/params/payment_method_attach_params.rb +19 -0
  421. data/lib/stripe/params/payment_method_configuration_create_params.rb +1303 -0
  422. data/lib/stripe/params/payment_method_configuration_list_params.rb +31 -0
  423. data/lib/stripe/params/payment_method_configuration_retrieve_params.rb +13 -0
  424. data/lib/stripe/params/payment_method_configuration_update_params.rb +1303 -0
  425. data/lib/stripe/params/payment_method_create_params.rb +694 -0
  426. data/lib/stripe/params/payment_method_detach_params.rb +13 -0
  427. data/lib/stripe/params/payment_method_domain_create_params.rb +19 -0
  428. data/lib/stripe/params/payment_method_domain_list_params.rb +35 -0
  429. data/lib/stripe/params/payment_method_domain_retrieve_params.rb +13 -0
  430. data/lib/stripe/params/payment_method_domain_update_params.rb +16 -0
  431. data/lib/stripe/params/payment_method_domain_validate_params.rb +13 -0
  432. data/lib/stripe/params/payment_method_list_params.rb +43 -0
  433. data/lib/stripe/params/payment_method_retrieve_params.rb +13 -0
  434. data/lib/stripe/params/payment_method_update_params.rb +139 -0
  435. data/lib/stripe/params/payment_record_report_payment_attempt_canceled_params.rb +19 -0
  436. data/lib/stripe/params/payment_record_report_payment_attempt_failed_params.rb +19 -0
  437. data/lib/stripe/params/payment_record_report_payment_attempt_guaranteed_params.rb +19 -0
  438. data/lib/stripe/params/payment_record_report_payment_attempt_informational_params.rb +93 -0
  439. data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +186 -0
  440. data/lib/stripe/params/payment_record_report_payment_params.rb +252 -0
  441. data/lib/stripe/params/payment_record_report_refund_params.rb +79 -0
  442. data/lib/stripe/params/payment_record_retrieve_params.rb +13 -0
  443. data/lib/stripe/params/payout_cancel_params.rb +13 -0
  444. data/lib/stripe/params/payout_create_params.rb +51 -0
  445. data/lib/stripe/params/payout_list_params.rb +78 -0
  446. data/lib/stripe/params/payout_retrieve_params.rb +13 -0
  447. data/lib/stripe/params/payout_reverse_params.rb +16 -0
  448. data/lib/stripe/params/payout_update_params.rb +16 -0
  449. data/lib/stripe/params/plan_create_params.rb +158 -0
  450. data/lib/stripe/params/plan_delete_params.rb +6 -0
  451. data/lib/stripe/params/plan_list_params.rb +56 -0
  452. data/lib/stripe/params/plan_retrieve_params.rb +13 -0
  453. data/lib/stripe/params/plan_update_params.rb +35 -0
  454. data/lib/stripe/params/price_create_params.rb +278 -0
  455. data/lib/stripe/params/price_list_params.rb +87 -0
  456. data/lib/stripe/params/price_retrieve_params.rb +13 -0
  457. data/lib/stripe/params/price_search_params.rb +22 -0
  458. data/lib/stripe/params/price_update_params.rb +132 -0
  459. data/lib/stripe/params/privacy/redaction_job_cancel_params.rb +15 -0
  460. data/lib/stripe/params/privacy/redaction_job_create_params.rb +67 -0
  461. data/lib/stripe/params/privacy/redaction_job_list_params.rb +27 -0
  462. data/lib/stripe/params/privacy/redaction_job_retrieve_params.rb +15 -0
  463. data/lib/stripe/params/privacy/redaction_job_run_params.rb +15 -0
  464. data/lib/stripe/params/privacy/redaction_job_update_params.rb +18 -0
  465. data/lib/stripe/params/privacy/redaction_job_validate_params.rb +15 -0
  466. data/lib/stripe/params/privacy/redaction_job_validation_error_list_params.rb +24 -0
  467. data/lib/stripe/params/product_create_params.rb +243 -0
  468. data/lib/stripe/params/product_delete_params.rb +6 -0
  469. data/lib/stripe/params/product_feature_create_params.rb +16 -0
  470. data/lib/stripe/params/product_feature_delete_params.rb +6 -0
  471. data/lib/stripe/params/product_feature_list_params.rb +22 -0
  472. data/lib/stripe/params/product_feature_retrieve_params.rb +13 -0
  473. data/lib/stripe/params/product_list_params.rb +68 -0
  474. data/lib/stripe/params/product_retrieve_params.rb +13 -0
  475. data/lib/stripe/params/product_search_params.rb +22 -0
  476. data/lib/stripe/params/product_update_params.rb +96 -0
  477. data/lib/stripe/params/promotion_code_create_params.rb +95 -0
  478. data/lib/stripe/params/promotion_code_list_params.rb +68 -0
  479. data/lib/stripe/params/promotion_code_retrieve_params.rb +13 -0
  480. data/lib/stripe/params/promotion_code_update_params.rb +38 -0
  481. data/lib/stripe/params/quote_accept_params.rb +13 -0
  482. data/lib/stripe/params/quote_cancel_params.rb +13 -0
  483. data/lib/stripe/params/quote_computed_upfront_line_items_list_params.rb +22 -0
  484. data/lib/stripe/params/quote_create_params.rb +1103 -0
  485. data/lib/stripe/params/quote_finalize_quote_params.rb +16 -0
  486. data/lib/stripe/params/quote_line_item_list_params.rb +22 -0
  487. data/lib/stripe/params/quote_line_list_params.rb +22 -0
  488. data/lib/stripe/params/quote_list_computed_upfront_line_items_params.rb +22 -0
  489. data/lib/stripe/params/quote_list_line_items_params.rb +22 -0
  490. data/lib/stripe/params/quote_list_lines_params.rb +22 -0
  491. data/lib/stripe/params/quote_list_params.rb +47 -0
  492. data/lib/stripe/params/quote_list_preview_invoice_lines_params.rb +22 -0
  493. data/lib/stripe/params/quote_mark_draft_params.rb +13 -0
  494. data/lib/stripe/params/quote_mark_stale_params.rb +16 -0
  495. data/lib/stripe/params/quote_pdf_params.rb +13 -0
  496. data/lib/stripe/params/quote_preview_invoice_list_params.rb +22 -0
  497. data/lib/stripe/params/quote_preview_subscription_schedule_list_params.rb +22 -0
  498. data/lib/stripe/params/quote_reestimate_params.rb +13 -0
  499. data/lib/stripe/params/quote_retrieve_params.rb +13 -0
  500. data/lib/stripe/params/quote_update_params.rb +1072 -0
  501. data/lib/stripe/params/radar/early_fraud_warning_list_params.rb +58 -0
  502. data/lib/stripe/params/radar/early_fraud_warning_retrieve_params.rb +15 -0
  503. data/lib/stripe/params/radar/value_list_create_params.rb +27 -0
  504. data/lib/stripe/{resources/usage_record_summary.rb → params/radar/value_list_delete_params.rb} +2 -2
  505. data/lib/stripe/params/radar/value_list_item_create_params.rb +21 -0
  506. data/lib/stripe/params/radar/value_list_item_delete_params.rb +8 -0
  507. data/lib/stripe/params/radar/value_list_item_list_params.rb +58 -0
  508. data/lib/stripe/params/radar/value_list_item_retrieve_params.rb +15 -0
  509. data/lib/stripe/params/radar/value_list_list_params.rb +58 -0
  510. data/lib/stripe/params/radar/value_list_retrieve_params.rb +15 -0
  511. data/lib/stripe/params/radar/value_list_update_params.rb +24 -0
  512. data/lib/stripe/params/refund_cancel_params.rb +13 -0
  513. data/lib/stripe/params/refund_create_params.rb +59 -0
  514. data/lib/stripe/params/refund_expire_params.rb +13 -0
  515. data/lib/stripe/params/refund_list_params.rb +56 -0
  516. data/lib/stripe/params/refund_retrieve_params.rb +13 -0
  517. data/lib/stripe/params/refund_update_params.rb +16 -0
  518. data/lib/stripe/params/reporting/report_run_create_params.rb +59 -0
  519. data/lib/stripe/params/reporting/report_run_list_params.rb +44 -0
  520. data/lib/stripe/params/reporting/report_run_retrieve_params.rb +15 -0
  521. data/lib/stripe/params/reporting/report_type_list_params.rb +15 -0
  522. data/lib/stripe/params/reporting/report_type_retrieve_params.rb +15 -0
  523. data/lib/stripe/params/reserve/hold_list_params.rb +53 -0
  524. data/lib/stripe/params/reserve/hold_retrieve_params.rb +15 -0
  525. data/lib/stripe/params/reserve/plan_retrieve_params.rb +15 -0
  526. data/lib/stripe/params/reserve/release_list_params.rb +41 -0
  527. data/lib/stripe/params/reserve/release_retrieve_params.rb +15 -0
  528. data/lib/stripe/params/review_approve_params.rb +13 -0
  529. data/lib/stripe/params/review_list_params.rb +42 -0
  530. data/lib/stripe/params/review_retrieve_params.rb +13 -0
  531. data/lib/stripe/params/setup_attempt_list_params.rb +55 -0
  532. data/lib/stripe/params/setup_intent_cancel_params.rb +16 -0
  533. data/lib/stripe/params/setup_intent_confirm_params.rb +1272 -0
  534. data/lib/stripe/params/setup_intent_create_params.rb +1362 -0
  535. data/lib/stripe/params/setup_intent_list_params.rb +66 -0
  536. data/lib/stripe/params/setup_intent_retrieve_params.rb +16 -0
  537. data/lib/stripe/params/setup_intent_update_params.rb +1257 -0
  538. data/lib/stripe/params/setup_intent_verify_microdeposits_params.rb +19 -0
  539. data/lib/stripe/params/shipping_rate_create_params.rb +103 -0
  540. data/lib/stripe/params/shipping_rate_list_params.rb +56 -0
  541. data/lib/stripe/params/shipping_rate_retrieve_params.rb +13 -0
  542. data/lib/stripe/params/shipping_rate_update_params.rb +44 -0
  543. data/lib/stripe/params/sigma/scheduled_query_run_list_params.rb +24 -0
  544. data/lib/stripe/params/sigma/scheduled_query_run_retrieve_params.rb +15 -0
  545. data/lib/stripe/params/source_create_params.rb +317 -0
  546. data/lib/stripe/params/source_detach_params.rb +13 -0
  547. data/lib/stripe/params/source_retrieve_params.rb +16 -0
  548. data/lib/stripe/params/source_transaction_list_params.rb +22 -0
  549. data/lib/stripe/params/source_update_params.rb +259 -0
  550. data/lib/stripe/params/source_verify_params.rb +16 -0
  551. data/lib/stripe/params/subscription_attach_cadence_params.rb +16 -0
  552. data/lib/stripe/params/subscription_cancel_params.rb +33 -0
  553. data/lib/stripe/params/subscription_create_params.rb +982 -0
  554. data/lib/stripe/params/subscription_delete_discount_params.rb +6 -0
  555. data/lib/stripe/params/subscription_item_create_params.rb +178 -0
  556. data/lib/stripe/params/subscription_item_delete_params.rb +19 -0
  557. data/lib/stripe/params/subscription_item_list_params.rb +31 -0
  558. data/lib/stripe/params/subscription_item_retrieve_params.rb +13 -0
  559. data/lib/stripe/params/subscription_item_update_params.rb +162 -0
  560. data/lib/stripe/params/subscription_list_params.rb +133 -0
  561. data/lib/stripe/params/subscription_migrate_params.rb +35 -0
  562. data/lib/stripe/params/subscription_resume_params.rb +27 -0
  563. data/lib/stripe/params/subscription_retrieve_params.rb +13 -0
  564. data/lib/stripe/params/subscription_schedule_amend_params.rb +570 -0
  565. data/lib/stripe/params/subscription_schedule_cancel_params.rb +19 -0
  566. data/lib/stripe/params/subscription_schedule_create_params.rb +752 -0
  567. data/lib/stripe/params/subscription_schedule_list_params.rb +126 -0
  568. data/lib/stripe/params/subscription_schedule_release_params.rb +16 -0
  569. data/lib/stripe/params/subscription_schedule_retrieve_params.rb +13 -0
  570. data/lib/stripe/params/subscription_schedule_update_params.rb +720 -0
  571. data/lib/stripe/params/subscription_search_params.rb +22 -0
  572. data/lib/stripe/params/subscription_update_params.rb +941 -0
  573. data/lib/stripe/params/tax/association_find_params.rb +18 -0
  574. data/lib/stripe/params/tax/calculation_create_params.rb +206 -0
  575. data/lib/stripe/params/tax/calculation_line_item_list_params.rb +24 -0
  576. data/lib/stripe/params/tax/calculation_list_line_items_params.rb +24 -0
  577. data/lib/stripe/params/tax/calculation_retrieve_params.rb +15 -0
  578. data/lib/stripe/params/tax/form_list_params.rb +51 -0
  579. data/lib/stripe/params/tax/form_pdf_params.rb +15 -0
  580. data/lib/stripe/params/tax/form_retrieve_params.rb +15 -0
  581. data/lib/stripe/params/tax/registration_create_params.rb +2031 -0
  582. data/lib/stripe/params/tax/registration_list_params.rb +27 -0
  583. data/lib/stripe/params/tax/registration_retrieve_params.rb +15 -0
  584. data/lib/stripe/params/tax/registration_update_params.rb +21 -0
  585. data/lib/stripe/params/tax/settings_retrieve_params.rb +15 -0
  586. data/lib/stripe/params/tax/settings_update_params.rb +71 -0
  587. data/lib/stripe/params/tax/transaction_create_from_calculation_params.rb +27 -0
  588. data/lib/stripe/params/tax/transaction_create_reversal_params.rb +87 -0
  589. data/lib/stripe/params/tax/transaction_line_item_list_params.rb +24 -0
  590. data/lib/stripe/params/tax/transaction_list_line_items_params.rb +24 -0
  591. data/lib/stripe/params/tax/transaction_retrieve_params.rb +15 -0
  592. data/lib/stripe/params/tax_code_list_params.rb +22 -0
  593. data/lib/stripe/params/tax_code_retrieve_params.rb +13 -0
  594. data/lib/stripe/params/tax_id_create_params.rb +39 -0
  595. data/lib/stripe/params/tax_id_delete_params.rb +6 -0
  596. data/lib/stripe/params/tax_id_list_params.rb +42 -0
  597. data/lib/stripe/params/tax_id_retrieve_params.rb +13 -0
  598. data/lib/stripe/params/tax_rate_create_params.rb +55 -0
  599. data/lib/stripe/params/tax_rate_list_params.rb +56 -0
  600. data/lib/stripe/params/tax_rate_retrieve_params.rb +13 -0
  601. data/lib/stripe/params/tax_rate_update_params.rb +47 -0
  602. data/lib/stripe/params/terminal/configuration_create_params.rb +625 -0
  603. data/lib/stripe/params/terminal/configuration_delete_params.rb +8 -0
  604. data/lib/stripe/params/terminal/configuration_list_params.rb +33 -0
  605. data/lib/stripe/params/terminal/configuration_retrieve_params.rb +15 -0
  606. data/lib/stripe/params/terminal/configuration_update_params.rb +625 -0
  607. data/lib/stripe/params/terminal/connection_token_create_params.rb +18 -0
  608. data/lib/stripe/params/terminal/location_create_params.rb +153 -0
  609. data/lib/stripe/params/terminal/location_delete_params.rb +8 -0
  610. data/lib/stripe/params/terminal/location_list_params.rb +24 -0
  611. data/lib/stripe/params/terminal/location_retrieve_params.rb +15 -0
  612. data/lib/stripe/params/terminal/location_update_params.rb +153 -0
  613. data/lib/stripe/params/terminal/onboarding_link_create_params.rb +43 -0
  614. data/lib/stripe/params/terminal/reader_cancel_action_params.rb +15 -0
  615. data/lib/stripe/params/terminal/reader_collect_inputs_params.rb +96 -0
  616. data/lib/stripe/params/terminal/reader_collect_payment_method_params.rb +51 -0
  617. data/lib/stripe/params/terminal/reader_collected_data_retrieve_params.rb +15 -0
  618. data/lib/stripe/params/terminal/reader_confirm_payment_intent_params.rb +29 -0
  619. data/lib/stripe/params/terminal/reader_create_params.rb +27 -0
  620. data/lib/stripe/params/terminal/reader_delete_params.rb +8 -0
  621. data/lib/stripe/params/terminal/reader_list_params.rb +45 -0
  622. data/lib/stripe/params/terminal/reader_present_payment_method_params.rb +72 -0
  623. data/lib/stripe/params/terminal/reader_process_payment_intent_params.rb +55 -0
  624. data/lib/stripe/params/terminal/reader_process_setup_intent_params.rb +32 -0
  625. data/lib/stripe/params/terminal/reader_refund_payment_params.rb +53 -0
  626. data/lib/stripe/params/terminal/reader_retrieve_params.rb +15 -0
  627. data/lib/stripe/params/terminal/reader_set_reader_display_params.rb +52 -0
  628. data/lib/stripe/params/terminal/reader_succeed_input_collection_params.rb +18 -0
  629. data/lib/stripe/params/terminal/reader_timeout_input_collection_params.rb +15 -0
  630. data/lib/stripe/params/terminal/reader_update_params.rb +21 -0
  631. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +749 -0
  632. data/lib/stripe/params/test_helpers/customer_fund_cash_balance_params.rb +24 -0
  633. data/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb +267 -0
  634. data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +374 -0
  635. data/lib/stripe/params/test_helpers/issuing/authorization_expire_params.rb +17 -0
  636. data/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb +145 -0
  637. data/lib/stripe/params/test_helpers/issuing/authorization_increment_params.rb +23 -0
  638. data/lib/stripe/params/test_helpers/issuing/authorization_respond_params.rb +20 -0
  639. data/lib/stripe/params/test_helpers/issuing/authorization_reverse_params.rb +20 -0
  640. data/lib/stripe/params/test_helpers/issuing/card_deliver_card_params.rb +17 -0
  641. data/lib/stripe/params/test_helpers/issuing/card_fail_card_params.rb +17 -0
  642. data/lib/stripe/params/test_helpers/issuing/card_return_card_params.rb +17 -0
  643. data/lib/stripe/params/test_helpers/issuing/card_ship_card_params.rb +17 -0
  644. data/lib/stripe/params/test_helpers/issuing/card_submit_card_params.rb +17 -0
  645. data/lib/stripe/params/test_helpers/issuing/personalization_design_activate_params.rb +17 -0
  646. data/lib/stripe/params/test_helpers/issuing/personalization_design_deactivate_params.rb +17 -0
  647. data/lib/stripe/params/test_helpers/issuing/personalization_design_reject_params.rb +31 -0
  648. data/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb +318 -0
  649. data/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb +318 -0
  650. data/lib/stripe/params/test_helpers/issuing/transaction_refund_params.rb +20 -0
  651. data/lib/stripe/params/test_helpers/refund_expire_params.rb +15 -0
  652. data/lib/stripe/params/test_helpers/terminal/reader_present_payment_method_params.rb +74 -0
  653. data/lib/stripe/params/test_helpers/terminal/reader_succeed_input_collection_params.rb +20 -0
  654. data/lib/stripe/params/test_helpers/terminal/reader_timeout_input_collection_params.rb +17 -0
  655. data/lib/stripe/params/test_helpers/test_clock_advance_params.rb +18 -0
  656. data/lib/stripe/params/test_helpers/test_clock_create_params.rb +21 -0
  657. data/lib/stripe/params/test_helpers/test_clock_delete_params.rb +8 -0
  658. data/lib/stripe/params/test_helpers/test_clock_list_params.rb +24 -0
  659. data/lib/stripe/params/test_helpers/test_clock_retrieve_params.rb +15 -0
  660. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_fail_params.rb +28 -0
  661. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_return_inbound_transfer_params.rb +17 -0
  662. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_succeed_params.rb +17 -0
  663. data/lib/stripe/params/test_helpers/treasury/outbound_payment_fail_params.rb +17 -0
  664. data/lib/stripe/params/test_helpers/treasury/outbound_payment_post_params.rb +17 -0
  665. data/lib/stripe/params/test_helpers/treasury/outbound_payment_return_outbound_payment_params.rb +28 -0
  666. data/lib/stripe/params/test_helpers/treasury/outbound_payment_update_params.rb +57 -0
  667. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_fail_params.rb +17 -0
  668. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_post_params.rb +17 -0
  669. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_return_outbound_transfer_params.rb +28 -0
  670. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_update_params.rb +57 -0
  671. data/lib/stripe/params/test_helpers/treasury/received_credit_create_params.rb +92 -0
  672. data/lib/stripe/params/test_helpers/treasury/received_debit_create_params.rb +92 -0
  673. data/lib/stripe/params/token_create_params.rb +1210 -0
  674. data/lib/stripe/params/token_retrieve_params.rb +13 -0
  675. data/lib/stripe/params/topup_cancel_params.rb +13 -0
  676. data/lib/stripe/params/topup_create_params.rb +43 -0
  677. data/lib/stripe/params/topup_list_params.rb +74 -0
  678. data/lib/stripe/params/topup_retrieve_params.rb +13 -0
  679. data/lib/stripe/params/topup_update_params.rb +19 -0
  680. data/lib/stripe/params/transfer_create_params.rb +51 -0
  681. data/lib/stripe/params/transfer_list_params.rb +56 -0
  682. data/lib/stripe/params/transfer_retrieve_params.rb +13 -0
  683. data/lib/stripe/params/transfer_reversal_create_params.rb +31 -0
  684. data/lib/stripe/params/transfer_reversal_list_params.rb +22 -0
  685. data/lib/stripe/params/transfer_reversal_retrieve_params.rb +13 -0
  686. data/lib/stripe/params/transfer_reversal_update_params.rb +16 -0
  687. data/lib/stripe/params/transfer_update_params.rb +19 -0
  688. data/lib/stripe/params/treasury/credit_reversal_create_params.rb +21 -0
  689. data/lib/stripe/params/treasury/credit_reversal_list_params.rb +41 -0
  690. data/lib/stripe/params/treasury/credit_reversal_retrieve_params.rb +15 -0
  691. data/lib/stripe/params/treasury/debit_reversal_create_params.rb +21 -0
  692. data/lib/stripe/params/treasury/debit_reversal_list_params.rb +45 -0
  693. data/lib/stripe/params/treasury/debit_reversal_retrieve_params.rb +15 -0
  694. data/lib/stripe/params/treasury/financial_account_close_params.rb +32 -0
  695. data/lib/stripe/params/treasury/financial_account_create_params.rb +208 -0
  696. data/lib/stripe/params/treasury/financial_account_features_retrieve_params.rb +15 -0
  697. data/lib/stripe/params/treasury/financial_account_features_update_params.rb +166 -0
  698. data/lib/stripe/params/treasury/financial_account_list_params.rb +54 -0
  699. data/lib/stripe/params/treasury/financial_account_retrieve_features_params.rb +15 -0
  700. data/lib/stripe/params/treasury/financial_account_retrieve_params.rb +15 -0
  701. data/lib/stripe/params/treasury/financial_account_update_features_params.rb +166 -0
  702. data/lib/stripe/params/treasury/financial_account_update_params.rb +223 -0
  703. data/lib/stripe/params/treasury/inbound_transfer_cancel_params.rb +15 -0
  704. data/lib/stripe/params/treasury/inbound_transfer_create_params.rb +45 -0
  705. data/lib/stripe/params/treasury/inbound_transfer_fail_params.rb +26 -0
  706. data/lib/stripe/params/treasury/inbound_transfer_list_params.rb +37 -0
  707. data/lib/stripe/params/treasury/inbound_transfer_retrieve_params.rb +15 -0
  708. data/lib/stripe/params/treasury/inbound_transfer_return_inbound_transfer_params.rb +15 -0
  709. data/lib/stripe/params/treasury/inbound_transfer_succeed_params.rb +15 -0
  710. data/lib/stripe/params/treasury/outbound_payment_cancel_params.rb +15 -0
  711. data/lib/stripe/params/treasury/outbound_payment_create_params.rb +190 -0
  712. data/lib/stripe/params/treasury/outbound_payment_fail_params.rb +15 -0
  713. data/lib/stripe/params/treasury/outbound_payment_list_params.rb +62 -0
  714. data/lib/stripe/params/treasury/outbound_payment_post_params.rb +15 -0
  715. data/lib/stripe/params/treasury/outbound_payment_retrieve_params.rb +15 -0
  716. data/lib/stripe/params/treasury/outbound_payment_return_outbound_payment_params.rb +26 -0
  717. data/lib/stripe/params/treasury/outbound_payment_update_params.rb +55 -0
  718. data/lib/stripe/params/treasury/outbound_transfer_cancel_params.rb +15 -0
  719. data/lib/stripe/params/treasury/outbound_transfer_create_params.rb +105 -0
  720. data/lib/stripe/params/treasury/outbound_transfer_fail_params.rb +15 -0
  721. data/lib/stripe/params/treasury/outbound_transfer_list_params.rb +37 -0
  722. data/lib/stripe/params/treasury/outbound_transfer_post_params.rb +15 -0
  723. data/lib/stripe/params/treasury/outbound_transfer_retrieve_params.rb +15 -0
  724. data/lib/stripe/params/treasury/outbound_transfer_return_outbound_transfer_params.rb +26 -0
  725. data/lib/stripe/params/treasury/outbound_transfer_update_params.rb +55 -0
  726. data/lib/stripe/params/treasury/received_credit_create_params.rb +90 -0
  727. data/lib/stripe/params/treasury/received_credit_list_params.rb +49 -0
  728. data/lib/stripe/params/treasury/received_credit_retrieve_params.rb +15 -0
  729. data/lib/stripe/params/treasury/received_debit_create_params.rb +90 -0
  730. data/lib/stripe/params/treasury/received_debit_list_params.rb +37 -0
  731. data/lib/stripe/params/treasury/received_debit_retrieve_params.rb +15 -0
  732. data/lib/stripe/params/treasury/transaction_entry_list_params.rb +84 -0
  733. data/lib/stripe/params/treasury/transaction_entry_retrieve_params.rb +15 -0
  734. data/lib/stripe/params/treasury/transaction_list_params.rb +92 -0
  735. data/lib/stripe/params/treasury/transaction_retrieve_params.rb +15 -0
  736. data/lib/stripe/params/v2/billing/bill_setting_create_params.rb +74 -0
  737. data/lib/stripe/params/v2/billing/bill_setting_list_params.rb +21 -0
  738. data/lib/stripe/params/v2/billing/bill_setting_retrieve_params.rb +10 -0
  739. data/lib/stripe/params/v2/billing/bill_setting_update_params.rb +80 -0
  740. data/lib/stripe/params/v2/billing/bill_settings/version_list_params.rb +19 -0
  741. data/lib/stripe/params/v2/billing/bill_settings/version_retrieve_params.rb +12 -0
  742. data/lib/stripe/{resources/issuing/card_details.rb → params/v2/billing/cadence_cancel_params.rb} +3 -3
  743. data/lib/stripe/params/v2/billing/cadence_create_params.rb +253 -0
  744. data/lib/stripe/params/v2/billing/cadence_list_params.rb +43 -0
  745. data/lib/stripe/params/v2/billing/cadence_retrieve_params.rb +17 -0
  746. data/lib/stripe/params/v2/billing/cadence_update_params.rb +75 -0
  747. data/lib/stripe/params/v2/billing/collection_setting_create_params.rb +223 -0
  748. data/lib/stripe/params/v2/billing/collection_setting_list_params.rb +21 -0
  749. data/lib/stripe/params/v2/billing/collection_setting_retrieve_params.rb +10 -0
  750. data/lib/stripe/params/v2/billing/collection_setting_update_params.rb +229 -0
  751. data/lib/stripe/params/v2/billing/collection_settings/version_list_params.rb +19 -0
  752. data/lib/stripe/params/v2/billing/collection_settings/version_retrieve_params.rb +12 -0
  753. data/lib/stripe/params/v2/billing/meter_event_adjustment_create_params.rb +31 -0
  754. data/lib/stripe/params/v2/billing/meter_event_create_params.rb +33 -0
  755. data/lib/stripe/params/v2/billing/meter_event_session_create_params.rb +10 -0
  756. data/lib/stripe/params/v2/billing/meter_event_stream_create_params.rb +41 -0
  757. data/lib/stripe/params/v2/billing/profile_create_params.rb +37 -0
  758. data/lib/stripe/params/v2/billing/profile_list_params.rb +40 -0
  759. data/lib/stripe/params/v2/billing/profile_retrieve_params.rb +10 -0
  760. data/lib/stripe/params/v2/billing/profile_update_params.rb +35 -0
  761. data/lib/stripe/params/v2/core/account_close_params.rb +17 -0
  762. data/lib/stripe/params/v2/core/account_create_params.rb +2363 -0
  763. data/lib/stripe/params/v2/core/account_link_create_params.rb +101 -0
  764. data/lib/stripe/params/v2/core/account_list_params.rb +23 -0
  765. data/lib/stripe/params/v2/core/account_retrieve_params.rb +17 -0
  766. data/lib/stripe/params/v2/core/account_token_create_params.rb +1023 -0
  767. data/lib/stripe/params/v2/core/account_token_retrieve_params.rb +10 -0
  768. data/lib/stripe/params/v2/core/account_update_params.rb +2409 -0
  769. data/lib/stripe/params/v2/core/accounts/person_create_params.rb +497 -0
  770. data/lib/stripe/params/v2/core/accounts/person_delete_params.rb +12 -0
  771. data/lib/stripe/params/v2/core/accounts/person_list_params.rb +19 -0
  772. data/lib/stripe/params/v2/core/accounts/person_retrieve_params.rb +12 -0
  773. data/lib/stripe/params/v2/core/accounts/person_token_create_params.rb +487 -0
  774. data/lib/stripe/params/v2/core/accounts/person_token_retrieve_params.rb +12 -0
  775. data/lib/stripe/params/v2/core/accounts/person_update_params.rb +497 -0
  776. data/lib/stripe/params/v2/core/event_destination_create_params.rb +79 -0
  777. data/lib/stripe/params/v2/core/event_destination_delete_params.rb +10 -0
  778. data/lib/stripe/params/v2/core/event_destination_disable_params.rb +10 -0
  779. data/lib/stripe/params/v2/core/event_destination_enable_params.rb +10 -0
  780. data/lib/stripe/params/v2/core/event_destination_list_params.rb +20 -0
  781. data/lib/stripe/params/v2/core/event_destination_ping_params.rb +10 -0
  782. data/lib/stripe/params/v2/core/event_destination_retrieve_params.rb +17 -0
  783. data/lib/stripe/params/v2/core/event_destination_update_params.rb +47 -0
  784. data/lib/stripe/params/v2/core/event_list_params.rb +45 -0
  785. data/lib/stripe/params/v2/core/event_retrieve_params.rb +10 -0
  786. data/lib/stripe/params/v2/core/vault/gb_bank_account_acknowledge_confirmation_of_payee_params.rb +12 -0
  787. data/lib/stripe/params/v2/core/vault/gb_bank_account_archive_params.rb +12 -0
  788. data/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb +50 -0
  789. data/lib/stripe/params/v2/core/vault/gb_bank_account_initiate_confirmation_of_payee_params.rb +22 -0
  790. data/lib/stripe/params/v2/core/vault/gb_bank_account_list_params.rb +19 -0
  791. data/lib/stripe/params/v2/core/vault/gb_bank_account_retrieve_params.rb +12 -0
  792. data/lib/stripe/params/v2/core/vault/us_bank_account_archive_params.rb +12 -0
  793. data/lib/stripe/params/v2/core/vault/us_bank_account_confirm_microdeposits_params.rb +22 -0
  794. data/lib/stripe/params/v2/core/vault/us_bank_account_create_params.rb +33 -0
  795. data/lib/stripe/params/v2/core/vault/us_bank_account_list_params.rb +22 -0
  796. data/lib/stripe/params/v2/core/vault/us_bank_account_retrieve_params.rb +12 -0
  797. data/lib/stripe/params/v2/core/vault/us_bank_account_send_microdeposits_params.rb +12 -0
  798. data/lib/stripe/params/v2/core/vault/us_bank_account_update_params.rb +22 -0
  799. data/lib/stripe/params/v2/money_management/adjustment_list_params.rb +48 -0
  800. data/lib/stripe/params/v2/money_management/adjustment_retrieve_params.rb +10 -0
  801. data/lib/stripe/params/v2/money_management/financial_account_close_params.rb +28 -0
  802. data/lib/stripe/params/v2/money_management/financial_account_create_params.rb +34 -0
  803. data/lib/stripe/params/v2/money_management/financial_account_list_params.rb +20 -0
  804. data/lib/stripe/params/v2/money_management/financial_account_retrieve_params.rb +10 -0
  805. data/lib/stripe/params/v2/money_management/financial_account_update_params.rb +20 -0
  806. data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +20 -0
  807. data/lib/stripe/params/v2/money_management/financial_address_list_params.rb +23 -0
  808. data/lib/stripe/params/v2/money_management/financial_address_retrieve_params.rb +17 -0
  809. data/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb +62 -0
  810. data/lib/stripe/params/v2/money_management/inbound_transfer_list_params.rb +44 -0
  811. data/lib/stripe/params/v2/money_management/inbound_transfer_retrieve_params.rb +10 -0
  812. data/lib/stripe/params/v2/money_management/outbound_payment_cancel_params.rb +10 -0
  813. data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +110 -0
  814. data/lib/stripe/params/v2/money_management/outbound_payment_list_params.rb +52 -0
  815. data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +79 -0
  816. data/lib/stripe/params/v2/money_management/outbound_payment_quote_retrieve_params.rb +10 -0
  817. data/lib/stripe/params/v2/money_management/outbound_payment_retrieve_params.rb +10 -0
  818. data/lib/stripe/params/v2/money_management/outbound_setup_intent_cancel_params.rb +10 -0
  819. data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +85 -0
  820. data/lib/stripe/params/v2/money_management/outbound_setup_intent_list_params.rb +17 -0
  821. data/lib/stripe/params/v2/money_management/outbound_setup_intent_retrieve_params.rb +10 -0
  822. data/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb +80 -0
  823. data/lib/stripe/params/v2/money_management/outbound_transfer_cancel_params.rb +10 -0
  824. data/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb +89 -0
  825. data/lib/stripe/params/v2/money_management/outbound_transfer_list_params.rb +48 -0
  826. data/lib/stripe/params/v2/money_management/outbound_transfer_retrieve_params.rb +10 -0
  827. data/lib/stripe/params/v2/money_management/payout_method_archive_params.rb +10 -0
  828. data/lib/stripe/params/v2/money_management/payout_method_list_params.rb +31 -0
  829. data/lib/stripe/params/v2/money_management/payout_method_retrieve_params.rb +10 -0
  830. data/lib/stripe/params/v2/money_management/payout_method_unarchive_params.rb +10 -0
  831. data/lib/stripe/params/v2/money_management/payout_methods_bank_account_spec_retrieve_params.rb +17 -0
  832. data/lib/stripe/params/v2/money_management/received_credit_list_params.rb +44 -0
  833. data/lib/stripe/params/v2/money_management/received_credit_retrieve_params.rb +10 -0
  834. data/lib/stripe/params/v2/money_management/received_debit_list_params.rb +17 -0
  835. data/lib/stripe/params/v2/money_management/received_debit_retrieve_params.rb +10 -0
  836. data/lib/stripe/params/v2/money_management/transaction_entry_list_params.rb +43 -0
  837. data/lib/stripe/params/v2/money_management/transaction_entry_retrieve_params.rb +10 -0
  838. data/lib/stripe/params/v2/money_management/transaction_list_params.rb +47 -0
  839. data/lib/stripe/params/v2/money_management/transaction_retrieve_params.rb +10 -0
  840. data/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb +34 -0
  841. data/lib/stripe/params/v2/test_helpers/financial_address_generate_microdeposits_params.rb +10 -0
  842. data/lib/stripe/params/webhook_endpoint_create_params.rb +39 -0
  843. data/lib/stripe/params/webhook_endpoint_delete_params.rb +6 -0
  844. data/lib/stripe/params/webhook_endpoint_list_params.rb +22 -0
  845. data/lib/stripe/params/webhook_endpoint_retrieve_params.rb +13 -0
  846. data/lib/stripe/params/webhook_endpoint_update_params.rb +35 -0
  847. data/lib/stripe/params.rb +767 -0
  848. data/lib/stripe/request_options.rb +138 -0
  849. data/lib/stripe/request_params.rb +24 -0
  850. data/lib/stripe/resources/account.rb +1320 -26
  851. data/lib/stripe/resources/account_link.rb +29 -0
  852. data/lib/stripe/resources/account_notice.rb +94 -0
  853. data/lib/stripe/resources/account_session.rb +764 -0
  854. data/lib/stripe/resources/alipay_account.rb +1 -1
  855. data/lib/stripe/resources/apple_pay_domain.rb +59 -0
  856. data/lib/stripe/resources/application.rb +28 -0
  857. data/lib/stripe/resources/application_fee.rb +64 -2
  858. data/lib/stripe/resources/application_fee_refund.rb +34 -2
  859. data/lib/stripe/resources/apps/secret.rb +96 -0
  860. data/lib/stripe/resources/balance.rb +332 -0
  861. data/lib/stripe/resources/balance_settings.rb +92 -0
  862. data/lib/stripe/resources/balance_transaction.rb +80 -0
  863. data/lib/stripe/resources/bank_account.rb +177 -6
  864. data/lib/stripe/resources/billing/alert.rb +142 -0
  865. data/lib/stripe/resources/billing/alert_triggered.rb +34 -0
  866. data/lib/stripe/resources/billing/analytics/meter_usage.rb +33 -0
  867. data/lib/stripe/resources/billing/analytics/meter_usage_row.rb +38 -0
  868. data/lib/stripe/resources/billing/credit_balance_summary.rb +104 -0
  869. data/lib/stripe/resources/billing/credit_balance_transaction.rb +177 -0
  870. data/lib/stripe/resources/billing/credit_grant.rb +200 -0
  871. data/lib/stripe/resources/billing/meter.rb +178 -0
  872. data/lib/stripe/resources/billing/meter_event.rb +49 -0
  873. data/lib/stripe/resources/billing/meter_event_adjustment.rb +59 -0
  874. data/lib/stripe/resources/billing/meter_event_summary.rb +40 -0
  875. data/lib/stripe/resources/billing_portal/configuration.rb +292 -0
  876. data/lib/stripe/resources/billing_portal/session.rb +228 -0
  877. data/lib/stripe/resources/capability.rb +147 -2
  878. data/lib/stripe/resources/capital/financing_offer.rb +142 -0
  879. data/lib/stripe/resources/capital/financing_summary.rb +82 -0
  880. data/lib/stripe/resources/capital/financing_transaction.rb +99 -0
  881. data/lib/stripe/resources/card.rb +129 -3
  882. data/lib/stripe/resources/cash_balance.rb +39 -0
  883. data/lib/stripe/resources/charge.rb +2516 -3
  884. data/lib/stripe/resources/checkout/session.rb +2454 -4
  885. data/lib/stripe/resources/climate/order.rb +173 -0
  886. data/lib/stripe/resources/climate/product.rb +72 -0
  887. data/lib/stripe/resources/climate/supplier.rb +69 -0
  888. data/lib/stripe/resources/confirmation_token.rb +1873 -0
  889. data/lib/stripe/resources/connect_collection_transfer.rb +32 -0
  890. data/lib/stripe/resources/country_spec.rb +82 -0
  891. data/lib/stripe/resources/coupon.rb +143 -0
  892. data/lib/stripe/resources/credit_note.rb +290 -8
  893. data/lib/stripe/resources/credit_note_line_item.rb +133 -0
  894. data/lib/stripe/resources/customer.rb +403 -27
  895. data/lib/stripe/resources/customer_balance_transaction.rb +48 -1
  896. data/lib/stripe/resources/customer_cash_balance_transaction.rb +234 -0
  897. data/lib/stripe/resources/customer_session.rb +264 -0
  898. data/lib/stripe/resources/discount.rb +58 -0
  899. data/lib/stripe/resources/dispute.rb +466 -2
  900. data/lib/stripe/resources/entitlements/active_entitlement.rb +45 -0
  901. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +31 -0
  902. data/lib/stripe/resources/entitlements/feature.rb +72 -0
  903. data/lib/stripe/resources/ephemeral_key.rb +44 -0
  904. data/lib/stripe/resources/event.rb +149 -0
  905. data/lib/stripe/resources/exchange_rate.rb +59 -0
  906. data/lib/stripe/resources/file.rb +65 -12
  907. data/lib/stripe/resources/file_link.rb +53 -0
  908. data/lib/stripe/resources/financial_connections/account.rb +342 -5
  909. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +35 -0
  910. data/lib/stripe/resources/financial_connections/account_owner.rb +29 -0
  911. data/lib/stripe/resources/financial_connections/account_ownership.rb +21 -0
  912. data/lib/stripe/resources/financial_connections/institution.rb +127 -0
  913. data/lib/stripe/resources/financial_connections/session.rb +140 -0
  914. data/lib/stripe/resources/financial_connections/transaction.rb +73 -0
  915. data/lib/stripe/resources/forwarding/request.rb +163 -0
  916. data/lib/stripe/resources/funding_instructions.rb +510 -1
  917. data/lib/stripe/resources/fx_quote.rb +147 -0
  918. data/lib/stripe/resources/identity/verification_report.rb +396 -0
  919. data/lib/stripe/resources/identity/verification_session.rb +397 -4
  920. data/lib/stripe/resources/invoice.rb +1393 -20
  921. data/lib/stripe/resources/invoice_item.rb +214 -0
  922. data/lib/stripe/resources/invoice_line_item.rb +341 -1
  923. data/lib/stripe/resources/invoice_payment.rb +92 -0
  924. data/lib/stripe/resources/invoice_rendering_template.rb +90 -0
  925. data/lib/stripe/resources/issuing/authorization.rb +650 -4
  926. data/lib/stripe/resources/issuing/card.rb +410 -4
  927. data/lib/stripe/resources/issuing/cardholder.rb +278 -0
  928. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +263 -0
  929. data/lib/stripe/resources/issuing/dispute.rb +301 -2
  930. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +71 -0
  931. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +51 -0
  932. data/lib/stripe/resources/issuing/personalization_design.rb +206 -0
  933. data/lib/stripe/resources/issuing/physical_bundle.rb +65 -0
  934. data/lib/stripe/resources/issuing/settlement.rb +61 -0
  935. data/lib/stripe/resources/issuing/token.rb +195 -0
  936. data/lib/stripe/resources/issuing/transaction.rb +444 -0
  937. data/lib/stripe/resources/line_item.rb +142 -0
  938. data/lib/stripe/resources/login_link.rb +20 -0
  939. data/lib/stripe/resources/mandate.rb +433 -0
  940. data/lib/stripe/resources/margin.rb +64 -0
  941. data/lib/stripe/resources/order.rb +960 -6
  942. data/lib/stripe/resources/payment_attempt_record.rb +2165 -0
  943. data/lib/stripe/resources/payment_intent.rb +3886 -14
  944. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +138 -0
  945. data/lib/stripe/resources/payment_link.rb +772 -2
  946. data/lib/stripe/resources/payment_method.rb +1792 -4
  947. data/lib/stripe/resources/payment_method_configuration.rb +2090 -0
  948. data/lib/stripe/resources/payment_method_domain.rb +280 -0
  949. data/lib/stripe/resources/payment_record.rb +2295 -0
  950. data/lib/stripe/resources/payout.rb +139 -4
  951. data/lib/stripe/resources/person.rb +475 -1
  952. data/lib/stripe/resources/plan.rb +137 -0
  953. data/lib/stripe/resources/price.rb +240 -1
  954. data/lib/stripe/resources/privacy/redaction_job.rb +187 -0
  955. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +49 -0
  956. data/lib/stripe/resources/product.rb +138 -1
  957. data/lib/stripe/resources/product_feature.rb +33 -0
  958. data/lib/stripe/resources/promotion_code.rb +110 -0
  959. data/lib/stripe/resources/quote.rb +1173 -36
  960. data/lib/stripe/resources/quote_line.rb +521 -0
  961. data/lib/stripe/resources/quote_preview_invoice.rb +1182 -0
  962. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +732 -0
  963. data/lib/stripe/resources/radar/early_fraud_warning.rb +42 -0
  964. data/lib/stripe/resources/radar/value_list.rb +87 -0
  965. data/lib/stripe/resources/radar/value_list_item.rb +71 -0
  966. data/lib/stripe/resources/refund.rb +748 -4
  967. data/lib/stripe/resources/reporting/report_run.rb +91 -0
  968. data/lib/stripe/resources/reporting/report_type.rb +48 -1
  969. data/lib/stripe/resources/reserve/hold.rb +74 -0
  970. data/lib/stripe/resources/reserve/plan.rb +78 -0
  971. data/lib/stripe/resources/reserve/release.rb +77 -0
  972. data/lib/stripe/resources/reserve_transaction.rb +30 -0
  973. data/lib/stripe/resources/reversal.rb +46 -2
  974. data/lib/stripe/resources/review.rb +99 -2
  975. data/lib/stripe/resources/setup_attempt.rb +664 -0
  976. data/lib/stripe/resources/setup_intent.rb +816 -6
  977. data/lib/stripe/resources/shipping_rate.rb +132 -0
  978. data/lib/stripe/resources/sigma/scheduled_query_run.rb +60 -0
  979. data/lib/stripe/resources/source.rb +973 -10
  980. data/lib/stripe/resources/source_mandate_notification.rb +98 -0
  981. data/lib/stripe/resources/source_transaction.rb +146 -0
  982. data/lib/stripe/resources/subscription.rb +979 -5
  983. data/lib/stripe/resources/subscription_item.rb +132 -10
  984. data/lib/stripe/resources/subscription_schedule.rb +780 -4
  985. data/lib/stripe/resources/tax/association.rb +86 -0
  986. data/lib/stripe/resources/tax/calculation.rb +321 -0
  987. data/lib/stripe/resources/tax/calculation_line_item.rb +103 -0
  988. data/lib/stripe/resources/tax/form.rb +264 -0
  989. data/lib/stripe/resources/tax/registration.rb +2259 -0
  990. data/lib/stripe/resources/tax/settings.rb +131 -0
  991. data/lib/stripe/resources/tax/transaction.rb +287 -0
  992. data/lib/stripe/resources/tax/transaction_line_item.rb +60 -0
  993. data/lib/stripe/resources/tax_code.rb +26 -0
  994. data/lib/stripe/resources/tax_deducted_at_source.rb +30 -0
  995. data/lib/stripe/resources/tax_id.rb +103 -11
  996. data/lib/stripe/resources/tax_rate.rb +87 -0
  997. data/lib/stripe/resources/terminal/configuration.rb +724 -0
  998. data/lib/stripe/resources/terminal/connection_token.rb +31 -0
  999. data/lib/stripe/resources/terminal/location.rb +168 -0
  1000. data/lib/stripe/resources/terminal/onboarding_link.rb +71 -0
  1001. data/lib/stripe/resources/terminal/reader.rb +752 -10
  1002. data/lib/stripe/resources/terminal/reader_collected_data.rb +47 -0
  1003. data/lib/stripe/resources/test_helpers/test_clock.rb +110 -2
  1004. data/lib/stripe/resources/token.rb +66 -0
  1005. data/lib/stripe/resources/topup.rb +80 -2
  1006. data/lib/stripe/resources/transfer.rb +74 -6
  1007. data/lib/stripe/resources/treasury/credit_reversal.rb +86 -0
  1008. data/lib/stripe/resources/treasury/debit_reversal.rb +101 -0
  1009. data/lib/stripe/resources/treasury/financial_account.rb +255 -0
  1010. data/lib/stripe/resources/treasury/financial_account_features.rb +398 -0
  1011. data/lib/stripe/resources/treasury/inbound_transfer.rb +308 -0
  1012. data/lib/stripe/resources/treasury/outbound_payment.rb +408 -0
  1013. data/lib/stripe/resources/treasury/outbound_transfer.rb +418 -0
  1014. data/lib/stripe/resources/treasury/received_credit.rb +291 -0
  1015. data/lib/stripe/resources/treasury/received_debit.rb +256 -0
  1016. data/lib/stripe/resources/treasury/transaction.rb +143 -0
  1017. data/lib/stripe/resources/treasury/transaction_entry.rb +124 -0
  1018. data/lib/stripe/resources/v2/amount.rb +9 -0
  1019. data/lib/stripe/resources/v2/billing/bill_setting.rb +102 -0
  1020. data/lib/stripe/resources/v2/billing/bill_setting_version.rb +90 -0
  1021. data/lib/stripe/resources/v2/billing/cadence.rb +609 -0
  1022. data/lib/stripe/resources/v2/billing/collection_setting.rb +274 -0
  1023. data/lib/stripe/resources/v2/billing/collection_setting_version.rb +262 -0
  1024. data/lib/stripe/resources/v2/billing/meter_event.rb +43 -0
  1025. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +52 -0
  1026. data/lib/stripe/resources/v2/billing/meter_event_session.rb +37 -0
  1027. data/lib/stripe/resources/v2/billing/profile.rb +46 -0
  1028. data/lib/stripe/resources/v2/core/account.rb +4115 -0
  1029. data/lib/stripe/resources/v2/core/account_link.rb +123 -0
  1030. data/lib/stripe/resources/v2/core/account_person.rb +477 -0
  1031. data/lib/stripe/resources/v2/core/account_person_token.rb +37 -0
  1032. data/lib/stripe/resources/v2/core/account_token.rb +37 -0
  1033. data/lib/stripe/resources/v2/core/event.rb +69 -0
  1034. data/lib/stripe/resources/v2/core/event_destination.rb +119 -0
  1035. data/lib/stripe/resources/v2/core/event_notification.rb +62 -0
  1036. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +114 -0
  1037. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +83 -0
  1038. data/lib/stripe/resources/v2/deleted_object.rb +21 -0
  1039. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +28 -0
  1040. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +44 -0
  1041. data/lib/stripe/resources/v2/money_management/adjustment.rb +82 -0
  1042. data/lib/stripe/resources/v2/money_management/financial_account.rb +188 -0
  1043. data/lib/stripe/resources/v2/money_management/financial_address.rb +132 -0
  1044. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +197 -0
  1045. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +261 -0
  1046. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +202 -0
  1047. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +69 -0
  1048. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +240 -0
  1049. data/lib/stripe/resources/v2/money_management/payout_method.rb +111 -0
  1050. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +81 -0
  1051. data/lib/stripe/resources/v2/money_management/received_credit.rb +246 -0
  1052. data/lib/stripe/resources/v2/money_management/received_debit.rb +152 -0
  1053. data/lib/stripe/resources/v2/money_management/transaction.rb +180 -0
  1054. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +153 -0
  1055. data/lib/stripe/resources/webhook_endpoint.rb +90 -0
  1056. data/lib/stripe/resources.rb +175 -11
  1057. data/lib/stripe/search_result_object.rb +5 -2
  1058. data/lib/stripe/services/account_capability_service.rb +39 -0
  1059. data/lib/stripe/services/account_external_account_service.rb +68 -0
  1060. data/lib/stripe/services/account_link_service.rb +17 -0
  1061. data/lib/stripe/services/account_login_link_service.rb +19 -0
  1062. data/lib/stripe/services/account_notice_service.rb +39 -0
  1063. data/lib/stripe/services/account_person_service.rb +61 -0
  1064. data/lib/stripe/services/account_service.rb +100 -0
  1065. data/lib/stripe/services/account_session_service.rb +17 -0
  1066. data/lib/stripe/services/apple_pay_domain_service.rb +50 -0
  1067. data/lib/stripe/services/application_fee_refund_service.rb +60 -0
  1068. data/lib/stripe/services/application_fee_service.rb +35 -0
  1069. data/lib/stripe/services/apps/secret_service.rb +52 -0
  1070. data/lib/stripe/services/apps_service.rb +13 -0
  1071. data/lib/stripe/services/balance_service.rb +12 -0
  1072. data/lib/stripe/services/balance_settings_service.rb +30 -0
  1073. data/lib/stripe/services/balance_transaction_service.rb +32 -0
  1074. data/lib/stripe/services/billing/alert_service.rb +74 -0
  1075. data/lib/stripe/services/billing/analytics/meter_usage_service.rb +21 -0
  1076. data/lib/stripe/services/billing/analytics_service.rb +15 -0
  1077. data/lib/stripe/services/billing/credit_balance_summary_service.rb +19 -0
  1078. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +30 -0
  1079. data/lib/stripe/services/billing/credit_grant_service.rb +74 -0
  1080. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +19 -0
  1081. data/lib/stripe/services/billing/meter_event_service.rb +19 -0
  1082. data/lib/stripe/services/billing/meter_event_summary_service.rb +19 -0
  1083. data/lib/stripe/services/billing/meter_service.rb +81 -0
  1084. data/lib/stripe/services/billing_portal/configuration_service.rb +52 -0
  1085. data/lib/stripe/services/billing_portal/session_service.rb +19 -0
  1086. data/lib/stripe/services/billing_portal_service.rb +14 -0
  1087. data/lib/stripe/services/billing_service.rb +21 -0
  1088. data/lib/stripe/services/capital/financing_offer_service.rb +42 -0
  1089. data/lib/stripe/services/capital/financing_summary_service.rb +19 -0
  1090. data/lib/stripe/services/capital/financing_transaction_service.rb +31 -0
  1091. data/lib/stripe/services/capital_service.rb +15 -0
  1092. data/lib/stripe/services/charge_service.rb +69 -0
  1093. data/lib/stripe/services/checkout/session_line_item_service.rb +19 -0
  1094. data/lib/stripe/services/checkout/session_service.rb +74 -0
  1095. data/lib/stripe/services/checkout_service.rb +13 -0
  1096. data/lib/stripe/services/climate/order_service.rb +68 -0
  1097. data/lib/stripe/services/climate/product_service.rb +30 -0
  1098. data/lib/stripe/services/climate/supplier_service.rb +30 -0
  1099. data/lib/stripe/services/climate_service.rb +15 -0
  1100. data/lib/stripe/services/confirmation_token_service.rb +17 -0
  1101. data/lib/stripe/services/country_spec_service.rb +28 -0
  1102. data/lib/stripe/services/coupon_service.rb +51 -0
  1103. data/lib/stripe/services/credit_note_line_item_service.rb +17 -0
  1104. data/lib/stripe/services/credit_note_preview_lines_service.rb +17 -0
  1105. data/lib/stripe/services/credit_note_service.rb +92 -0
  1106. data/lib/stripe/services/customer_balance_transaction_service.rb +50 -0
  1107. data/lib/stripe/services/customer_cash_balance_service.rb +28 -0
  1108. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +28 -0
  1109. data/lib/stripe/services/customer_funding_instructions_service.rb +19 -0
  1110. data/lib/stripe/services/customer_payment_method_service.rb +28 -0
  1111. data/lib/stripe/services/customer_payment_source_service.rb +76 -0
  1112. data/lib/stripe/services/customer_service.rb +89 -0
  1113. data/lib/stripe/services/customer_session_service.rb +17 -0
  1114. data/lib/stripe/services/customer_tax_id_service.rb +50 -0
  1115. data/lib/stripe/services/dispute_service.rb +48 -0
  1116. data/lib/stripe/services/entitlements/active_entitlement_service.rb +30 -0
  1117. data/lib/stripe/services/entitlements/feature_service.rb +52 -0
  1118. data/lib/stripe/services/entitlements_service.rb +14 -0
  1119. data/lib/stripe/services/ephemeral_key_service.rb +28 -0
  1120. data/lib/stripe/services/event_service.rb +22 -0
  1121. data/lib/stripe/services/exchange_rate_service.rb +32 -0
  1122. data/lib/stripe/services/external_account_service.rb +68 -0
  1123. data/lib/stripe/services/file_link_service.rb +38 -0
  1124. data/lib/stripe/services/file_service.rb +35 -0
  1125. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
  1126. data/lib/stripe/services/financial_connections/account_owner_service.rb +19 -0
  1127. data/lib/stripe/services/financial_connections/account_service.rb +83 -0
  1128. data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
  1129. data/lib/stripe/services/financial_connections/session_service.rb +30 -0
  1130. data/lib/stripe/services/financial_connections/transaction_service.rb +30 -0
  1131. data/lib/stripe/services/financial_connections_service.rb +16 -0
  1132. data/lib/stripe/services/forwarding/request_service.rb +41 -0
  1133. data/lib/stripe/services/forwarding_service.rb +13 -0
  1134. data/lib/stripe/services/fx_quote_service.rb +27 -0
  1135. data/lib/stripe/services/identity/verification_report_service.rb +30 -0
  1136. data/lib/stripe/services/identity/verification_session_service.rb +106 -0
  1137. data/lib/stripe/services/identity_service.rb +14 -0
  1138. data/lib/stripe/services/invoice_item_service.rb +61 -0
  1139. data/lib/stripe/services/invoice_line_item_service.rb +31 -0
  1140. data/lib/stripe/services/invoice_payment_service.rb +28 -0
  1141. data/lib/stripe/services/invoice_rendering_template_service.rb +50 -0
  1142. data/lib/stripe/services/invoice_service.rb +206 -0
  1143. data/lib/stripe/services/issuing/authorization_service.rb +65 -0
  1144. data/lib/stripe/services/issuing/card_service.rb +52 -0
  1145. data/lib/stripe/services/issuing/cardholder_service.rb +52 -0
  1146. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
  1147. data/lib/stripe/services/issuing/dispute_service.rb +63 -0
  1148. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
  1149. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +30 -0
  1150. data/lib/stripe/services/issuing/personalization_design_service.rb +52 -0
  1151. data/lib/stripe/services/issuing/physical_bundle_service.rb +30 -0
  1152. data/lib/stripe/services/issuing/token_service.rb +41 -0
  1153. data/lib/stripe/services/issuing/transaction_service.rb +41 -0
  1154. data/lib/stripe/services/issuing_service.rb +24 -0
  1155. data/lib/stripe/services/mandate_service.rb +22 -0
  1156. data/lib/stripe/services/margin_service.rb +50 -0
  1157. data/lib/stripe/services/oauth_service.rb +63 -0
  1158. data/lib/stripe/services/order_line_item_service.rb +17 -0
  1159. data/lib/stripe/services/order_service.rb +78 -0
  1160. data/lib/stripe/services/payment_attempt_record_service.rb +28 -0
  1161. data/lib/stripe/services/payment_intent_amount_details_line_item_service.rb +17 -0
  1162. data/lib/stripe/services/payment_intent_service.rb +253 -0
  1163. data/lib/stripe/services/payment_link_line_item_service.rb +17 -0
  1164. data/lib/stripe/services/payment_link_service.rb +57 -0
  1165. data/lib/stripe/services/payment_method_configuration_service.rb +50 -0
  1166. data/lib/stripe/services/payment_method_domain_service.rb +66 -0
  1167. data/lib/stripe/services/payment_method_service.rb +86 -0
  1168. data/lib/stripe/services/payment_record_service.rb +101 -0
  1169. data/lib/stripe/services/payout_service.rb +66 -0
  1170. data/lib/stripe/services/plan_service.rb +49 -0
  1171. data/lib/stripe/services/price_service.rb +52 -0
  1172. data/lib/stripe/services/privacy/redaction_job_service.rb +104 -0
  1173. data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +19 -0
  1174. data/lib/stripe/services/privacy_service.rb +13 -0
  1175. data/lib/stripe/services/product_feature_service.rb +50 -0
  1176. data/lib/stripe/services/product_service.rb +70 -0
  1177. data/lib/stripe/services/promotion_code_service.rb +50 -0
  1178. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +17 -0
  1179. data/lib/stripe/services/quote_line_item_service.rb +17 -0
  1180. data/lib/stripe/services/quote_line_service.rb +17 -0
  1181. data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
  1182. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
  1183. data/lib/stripe/services/quote_service.rb +140 -0
  1184. data/lib/stripe/services/radar/early_fraud_warning_service.rb +32 -0
  1185. data/lib/stripe/services/radar/value_list_item_service.rb +52 -0
  1186. data/lib/stripe/services/radar/value_list_service.rb +63 -0
  1187. data/lib/stripe/services/radar_service.rb +15 -0
  1188. data/lib/stripe/services/refund_service.rb +63 -0
  1189. data/lib/stripe/services/reporting/report_run_service.rb +41 -0
  1190. data/lib/stripe/services/reporting/report_type_service.rb +30 -0
  1191. data/lib/stripe/services/reporting_service.rb +14 -0
  1192. data/lib/stripe/services/reserve/hold_service.rb +30 -0
  1193. data/lib/stripe/services/reserve/plan_service.rb +19 -0
  1194. data/lib/stripe/services/reserve/release_service.rb +30 -0
  1195. data/lib/stripe/services/reserve_service.rb +15 -0
  1196. data/lib/stripe/services/review_service.rb +33 -0
  1197. data/lib/stripe/services/setup_attempt_service.rb +17 -0
  1198. data/lib/stripe/services/setup_intent_service.rb +105 -0
  1199. data/lib/stripe/services/shipping_rate_service.rb +50 -0
  1200. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +30 -0
  1201. data/lib/stripe/services/sigma_service.rb +13 -0
  1202. data/lib/stripe/services/source_service.rb +64 -0
  1203. data/lib/stripe/services/source_transaction_service.rb +17 -0
  1204. data/lib/stripe/services/subscription_item_service.rb +61 -0
  1205. data/lib/stripe/services/subscription_schedule_service.rb +83 -0
  1206. data/lib/stripe/services/subscription_service.rb +149 -0
  1207. data/lib/stripe/services/tax/association_service.rb +19 -0
  1208. data/lib/stripe/services/tax/calculation_line_item_service.rb +19 -0
  1209. data/lib/stripe/services/tax/calculation_service.rb +37 -0
  1210. data/lib/stripe/services/tax/form_service.rb +37 -0
  1211. data/lib/stripe/services/tax/registration_service.rb +54 -0
  1212. data/lib/stripe/services/tax/settings_service.rb +30 -0
  1213. data/lib/stripe/services/tax/transaction_line_item_service.rb +19 -0
  1214. data/lib/stripe/services/tax/transaction_service.rb +48 -0
  1215. data/lib/stripe/services/tax_code_service.rb +22 -0
  1216. data/lib/stripe/services/tax_id_service.rb +38 -0
  1217. data/lib/stripe/services/tax_rate_service.rb +38 -0
  1218. data/lib/stripe/services/tax_service.rb +18 -0
  1219. data/lib/stripe/services/terminal/configuration_service.rb +63 -0
  1220. data/lib/stripe/services/terminal/connection_token_service.rb +19 -0
  1221. data/lib/stripe/services/terminal/location_service.rb +64 -0
  1222. data/lib/stripe/services/terminal/onboarding_link_service.rb +19 -0
  1223. data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
  1224. data/lib/stripe/services/terminal/reader_service.rb +151 -0
  1225. data/lib/stripe/services/terminal_service.rb +18 -0
  1226. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +19 -0
  1227. data/lib/stripe/services/test_helpers/customer_service.rb +19 -0
  1228. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +87 -0
  1229. data/lib/stripe/services/test_helpers/issuing/card_service.rb +65 -0
  1230. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +43 -0
  1231. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +43 -0
  1232. data/lib/stripe/services/test_helpers/issuing_service.rb +19 -0
  1233. data/lib/stripe/services/test_helpers/refund_service.rb +19 -0
  1234. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
  1235. data/lib/stripe/services/test_helpers/terminal_service.rb +15 -0
  1236. data/lib/stripe/services/test_helpers/test_clock_service.rb +63 -0
  1237. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +43 -0
  1238. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +54 -0
  1239. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +54 -0
  1240. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +21 -0
  1241. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +21 -0
  1242. data/lib/stripe/services/test_helpers/treasury_service.rb +19 -0
  1243. data/lib/stripe/services/test_helpers_service.rb +19 -0
  1244. data/lib/stripe/services/token_service.rb +23 -0
  1245. data/lib/stripe/services/topup_service.rb +49 -0
  1246. data/lib/stripe/services/transfer_reversal_service.rb +56 -0
  1247. data/lib/stripe/services/transfer_service.rb +47 -0
  1248. data/lib/stripe/services/treasury/credit_reversal_service.rb +41 -0
  1249. data/lib/stripe/services/treasury/debit_reversal_service.rb +41 -0
  1250. data/lib/stripe/services/treasury/financial_account_features_service.rb +30 -0
  1251. data/lib/stripe/services/treasury/financial_account_service.rb +70 -0
  1252. data/lib/stripe/services/treasury/inbound_transfer_service.rb +52 -0
  1253. data/lib/stripe/services/treasury/outbound_payment_service.rb +52 -0
  1254. data/lib/stripe/services/treasury/outbound_transfer_service.rb +52 -0
  1255. data/lib/stripe/services/treasury/received_credit_service.rb +30 -0
  1256. data/lib/stripe/services/treasury/received_debit_service.rb +30 -0
  1257. data/lib/stripe/services/treasury/transaction_entry_service.rb +30 -0
  1258. data/lib/stripe/services/treasury/transaction_service.rb +30 -0
  1259. data/lib/stripe/services/treasury_service.rb +22 -0
  1260. data/lib/stripe/services/v1_services.rb +101 -0
  1261. data/lib/stripe/services/v2/billing/bill_setting_service.rb +61 -0
  1262. data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +34 -0
  1263. data/lib/stripe/services/v2/billing/cadence_service.rb +65 -0
  1264. data/lib/stripe/services/v2/billing/collection_setting_service.rb +61 -0
  1265. data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +34 -0
  1266. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +21 -0
  1267. data/lib/stripe/services/v2/billing/meter_event_service.rb +21 -0
  1268. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +21 -0
  1269. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +23 -0
  1270. data/lib/stripe/services/v2/billing/profile_service.rb +54 -0
  1271. data/lib/stripe/services/v2/billing_service.rb +22 -0
  1272. data/lib/stripe/services/v2/core/account_link_service.rb +21 -0
  1273. data/lib/stripe/services/v2/core/account_service.rb +73 -0
  1274. data/lib/stripe/services/v2/core/account_token_service.rb +32 -0
  1275. data/lib/stripe/services/v2/core/accounts/person_service.rb +67 -0
  1276. data/lib/stripe/services/v2/core/accounts/person_token_service.rb +34 -0
  1277. data/lib/stripe/services/v2/core/event_destination_service.rb +98 -0
  1278. data/lib/stripe/services/v2/core/event_service.rb +32 -0
  1279. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +85 -0
  1280. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +101 -0
  1281. data/lib/stripe/services/v2/core/vault_service.rb +18 -0
  1282. data/lib/stripe/services/v2/core_service.rb +20 -0
  1283. data/lib/stripe/services/v2/money_management/adjustment_service.rb +32 -0
  1284. data/lib/stripe/services/v2/money_management/financial_account_service.rb +70 -0
  1285. data/lib/stripe/services/v2/money_management/financial_address_service.rb +46 -0
  1286. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +45 -0
  1287. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +34 -0
  1288. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +62 -0
  1289. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +75 -0
  1290. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +60 -0
  1291. data/lib/stripe/services/v2/money_management/payout_method_service.rb +65 -0
  1292. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +23 -0
  1293. data/lib/stripe/services/v2/money_management/received_credit_service.rb +32 -0
  1294. data/lib/stripe/services/v2/money_management/received_debit_service.rb +32 -0
  1295. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +32 -0
  1296. data/lib/stripe/services/v2/money_management/transaction_service.rb +32 -0
  1297. data/lib/stripe/services/v2/money_management_service.rb +31 -0
  1298. data/lib/stripe/services/v2/test_helper_service.rb +15 -0
  1299. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +36 -0
  1300. data/lib/stripe/services/v2_services.rb +16 -0
  1301. data/lib/stripe/services/webhook_endpoint_service.rb +61 -0
  1302. data/lib/stripe/services.rb +246 -0
  1303. data/lib/stripe/singleton_api_resource.rb +3 -3
  1304. data/lib/stripe/stripe_client.rb +61 -1023
  1305. data/lib/stripe/stripe_configuration.rb +60 -42
  1306. data/lib/stripe/stripe_context.rb +68 -0
  1307. data/lib/stripe/stripe_event_notification_handler.rb +425 -0
  1308. data/lib/stripe/stripe_object.rb +142 -47
  1309. data/lib/stripe/stripe_response.rb +1 -3
  1310. data/lib/stripe/stripe_service.rb +34 -0
  1311. data/lib/stripe/util.rb +134 -45
  1312. data/lib/stripe/v2_list_object.rb +84 -0
  1313. data/lib/stripe/version.rb +1 -1
  1314. data/lib/stripe/webhook.rb +3 -2
  1315. data/lib/stripe.rb +98 -0
  1316. data/rbi/stripe/resources/v2/core/event_notification.rbi +43 -0
  1317. data/rbi/stripe/stripe_client.rbi +30 -0
  1318. data/rbi/stripe.rbi +219587 -0
  1319. metadata +1210 -28
  1320. data/CHANGELOG.md +0 -1036
  1321. data/CODE_OF_CONDUCT.md +0 -77
  1322. data/CONTRIBUTORS +0 -3
  1323. data/Gemfile +0 -33
  1324. data/History.txt +0 -1
  1325. data/LICENSE +0 -21
  1326. data/Makefile +0 -7
  1327. data/README.md +0 -350
  1328. data/Rakefile +0 -37
  1329. data/VERSION +0 -1
  1330. data/lib/stripe/resources/bitcoin_receiver.rb +0 -24
  1331. data/lib/stripe/resources/bitcoin_transaction.rb +0 -16
  1332. data/lib/stripe/resources/order_return.rb +0 -10
  1333. data/lib/stripe/resources/recipient.rb +0 -14
  1334. data/lib/stripe/resources/sku.rb +0 -13
  1335. data/lib/stripe/resources/three_d_secure.rb +0 -14
  1336. data/stripe.gemspec +0 -41
@@ -0,0 +1,1810 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class InvoiceCreatePreviewParams < ::Stripe::RequestParams
6
+ class AutomaticTax < ::Stripe::RequestParams
7
+ class Liability < ::Stripe::RequestParams
8
+ # The connected account being referenced when `type` is `account`.
9
+ attr_accessor :account
10
+ # Type of the account referenced in the request.
11
+ attr_accessor :type
12
+
13
+ def initialize(account: nil, type: nil)
14
+ @account = account
15
+ @type = type
16
+ end
17
+ end
18
+ # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://docs.stripe.com/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
19
+ attr_accessor :enabled
20
+ # 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.
21
+ attr_accessor :liability
22
+
23
+ def initialize(enabled: nil, liability: nil)
24
+ @enabled = enabled
25
+ @liability = liability
26
+ end
27
+ end
28
+
29
+ class CustomerDetails < ::Stripe::RequestParams
30
+ class Address < ::Stripe::RequestParams
31
+ # City, district, suburb, town, or village.
32
+ attr_accessor :city
33
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
34
+ attr_accessor :country
35
+ # Address line 1, such as the street, PO Box, or company name.
36
+ attr_accessor :line1
37
+ # Address line 2, such as the apartment, suite, unit, or building.
38
+ attr_accessor :line2
39
+ # ZIP or postal code.
40
+ attr_accessor :postal_code
41
+ # State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
42
+ attr_accessor :state
43
+
44
+ def initialize(
45
+ city: nil,
46
+ country: nil,
47
+ line1: nil,
48
+ line2: nil,
49
+ postal_code: nil,
50
+ state: nil
51
+ )
52
+ @city = city
53
+ @country = country
54
+ @line1 = line1
55
+ @line2 = line2
56
+ @postal_code = postal_code
57
+ @state = state
58
+ end
59
+ end
60
+
61
+ class Shipping < ::Stripe::RequestParams
62
+ class Address < ::Stripe::RequestParams
63
+ # City, district, suburb, town, or village.
64
+ attr_accessor :city
65
+ # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
66
+ attr_accessor :country
67
+ # Address line 1, such as the street, PO Box, or company name.
68
+ attr_accessor :line1
69
+ # Address line 2, such as the apartment, suite, unit, or building.
70
+ attr_accessor :line2
71
+ # ZIP or postal code.
72
+ attr_accessor :postal_code
73
+ # State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
74
+ attr_accessor :state
75
+
76
+ def initialize(
77
+ city: nil,
78
+ country: nil,
79
+ line1: nil,
80
+ line2: nil,
81
+ postal_code: nil,
82
+ state: nil
83
+ )
84
+ @city = city
85
+ @country = country
86
+ @line1 = line1
87
+ @line2 = line2
88
+ @postal_code = postal_code
89
+ @state = state
90
+ end
91
+ end
92
+ # Customer shipping address.
93
+ attr_accessor :address
94
+ # Customer name.
95
+ attr_accessor :name
96
+ # Customer phone (including extension).
97
+ attr_accessor :phone
98
+
99
+ def initialize(address: nil, name: nil, phone: nil)
100
+ @address = address
101
+ @name = name
102
+ @phone = phone
103
+ end
104
+ end
105
+
106
+ class Tax < ::Stripe::RequestParams
107
+ # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
108
+ attr_accessor :ip_address
109
+
110
+ def initialize(ip_address: nil)
111
+ @ip_address = ip_address
112
+ end
113
+ end
114
+
115
+ class TaxId < ::Stripe::RequestParams
116
+ # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
117
+ attr_accessor :type
118
+ # Value of the tax ID.
119
+ attr_accessor :value
120
+
121
+ def initialize(type: nil, value: nil)
122
+ @type = type
123
+ @value = value
124
+ end
125
+ end
126
+ # The customer's address. Learn about [country-specific requirements for calculating tax](/invoicing/taxes?dashboard-or-api=dashboard#set-up-customer).
127
+ attr_accessor :address
128
+ # The customer's shipping information. Appears on invoices emailed to this customer.
129
+ attr_accessor :shipping
130
+ # Tax details about the customer.
131
+ attr_accessor :tax
132
+ # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
133
+ attr_accessor :tax_exempt
134
+ # The customer's tax IDs.
135
+ attr_accessor :tax_ids
136
+
137
+ def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil)
138
+ @address = address
139
+ @shipping = shipping
140
+ @tax = tax
141
+ @tax_exempt = tax_exempt
142
+ @tax_ids = tax_ids
143
+ end
144
+ end
145
+
146
+ class Discount < ::Stripe::RequestParams
147
+ class DiscountEnd < ::Stripe::RequestParams
148
+ class Duration < ::Stripe::RequestParams
149
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
150
+ attr_accessor :interval
151
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
152
+ attr_accessor :interval_count
153
+
154
+ def initialize(interval: nil, interval_count: nil)
155
+ @interval = interval
156
+ @interval_count = interval_count
157
+ end
158
+ end
159
+ # Time span for the redeemed discount.
160
+ attr_accessor :duration
161
+ # A precise Unix timestamp for the discount to end. Must be in the future.
162
+ attr_accessor :timestamp
163
+ # The type of calculation made to determine when the discount ends.
164
+ attr_accessor :type
165
+
166
+ def initialize(duration: nil, timestamp: nil, type: nil)
167
+ @duration = duration
168
+ @timestamp = timestamp
169
+ @type = type
170
+ end
171
+ end
172
+ # ID of the coupon to create a new discount for.
173
+ attr_accessor :coupon
174
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
175
+ attr_accessor :discount
176
+ # Details to determine how long the discount should be applied for.
177
+ attr_accessor :discount_end
178
+ # ID of the promotion code to create a new discount for.
179
+ attr_accessor :promotion_code
180
+
181
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
182
+ @coupon = coupon
183
+ @discount = discount
184
+ @discount_end = discount_end
185
+ @promotion_code = promotion_code
186
+ end
187
+ end
188
+
189
+ class InvoiceItem < ::Stripe::RequestParams
190
+ class Discount < ::Stripe::RequestParams
191
+ class DiscountEnd < ::Stripe::RequestParams
192
+ class Duration < ::Stripe::RequestParams
193
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
194
+ attr_accessor :interval
195
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
196
+ attr_accessor :interval_count
197
+
198
+ def initialize(interval: nil, interval_count: nil)
199
+ @interval = interval
200
+ @interval_count = interval_count
201
+ end
202
+ end
203
+ # Time span for the redeemed discount.
204
+ attr_accessor :duration
205
+ # A precise Unix timestamp for the discount to end. Must be in the future.
206
+ attr_accessor :timestamp
207
+ # The type of calculation made to determine when the discount ends.
208
+ attr_accessor :type
209
+
210
+ def initialize(duration: nil, timestamp: nil, type: nil)
211
+ @duration = duration
212
+ @timestamp = timestamp
213
+ @type = type
214
+ end
215
+ end
216
+ # ID of the coupon to create a new discount for.
217
+ attr_accessor :coupon
218
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
219
+ attr_accessor :discount
220
+ # Details to determine how long the discount should be applied for.
221
+ attr_accessor :discount_end
222
+ # ID of the promotion code to create a new discount for.
223
+ attr_accessor :promotion_code
224
+
225
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
226
+ @coupon = coupon
227
+ @discount = discount
228
+ @discount_end = discount_end
229
+ @promotion_code = promotion_code
230
+ end
231
+ end
232
+
233
+ class Period < ::Stripe::RequestParams
234
+ # The end of the period, which must be greater than or equal to the start. This value is inclusive.
235
+ attr_accessor :end
236
+ # The start of the period. This value is inclusive.
237
+ attr_accessor :start
238
+
239
+ def initialize(end_: nil, start: nil)
240
+ @end = end_
241
+ @start = start
242
+ end
243
+ end
244
+
245
+ class PriceData < ::Stripe::RequestParams
246
+ # 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).
247
+ attr_accessor :currency
248
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
249
+ attr_accessor :product
250
+ # Only required if a [default tax behavior](https://docs.stripe.com/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.
251
+ attr_accessor :tax_behavior
252
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
253
+ attr_accessor :unit_amount
254
+ # 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.
255
+ attr_accessor :unit_amount_decimal
256
+
257
+ def initialize(
258
+ currency: nil,
259
+ product: nil,
260
+ tax_behavior: nil,
261
+ unit_amount: nil,
262
+ unit_amount_decimal: nil
263
+ )
264
+ @currency = currency
265
+ @product = product
266
+ @tax_behavior = tax_behavior
267
+ @unit_amount = unit_amount
268
+ @unit_amount_decimal = unit_amount_decimal
269
+ end
270
+ end
271
+ # The integer amount in cents (or local equivalent) of previewed invoice item.
272
+ attr_accessor :amount
273
+ # 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). Only applicable to new invoice items.
274
+ attr_accessor :currency
275
+ # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
276
+ attr_accessor :description
277
+ # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
278
+ attr_accessor :discountable
279
+ # The coupons to redeem into discounts for the invoice item in the preview.
280
+ attr_accessor :discounts
281
+ # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
282
+ attr_accessor :invoiceitem
283
+ # Set of [key-value pairs](https://docs.stripe.com/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`.
284
+ attr_accessor :metadata
285
+ # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://docs.stripe.com/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
286
+ attr_accessor :period
287
+ # The ID of the price object. One of `price` or `price_data` is required.
288
+ attr_accessor :price
289
+ # Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
290
+ attr_accessor :price_data
291
+ # Non-negative integer. The quantity of units for the invoice item.
292
+ attr_accessor :quantity
293
+ # Only required if a [default tax behavior](https://docs.stripe.com/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.
294
+ attr_accessor :tax_behavior
295
+ # A [tax code](https://docs.stripe.com/tax/tax-categories) ID.
296
+ attr_accessor :tax_code
297
+ # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
298
+ attr_accessor :tax_rates
299
+ # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
300
+ attr_accessor :unit_amount
301
+ # 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.
302
+ attr_accessor :unit_amount_decimal
303
+
304
+ def initialize(
305
+ amount: nil,
306
+ currency: nil,
307
+ description: nil,
308
+ discountable: nil,
309
+ discounts: nil,
310
+ invoiceitem: nil,
311
+ metadata: nil,
312
+ period: nil,
313
+ price: nil,
314
+ price_data: nil,
315
+ quantity: nil,
316
+ tax_behavior: nil,
317
+ tax_code: nil,
318
+ tax_rates: nil,
319
+ unit_amount: nil,
320
+ unit_amount_decimal: nil
321
+ )
322
+ @amount = amount
323
+ @currency = currency
324
+ @description = description
325
+ @discountable = discountable
326
+ @discounts = discounts
327
+ @invoiceitem = invoiceitem
328
+ @metadata = metadata
329
+ @period = period
330
+ @price = price
331
+ @price_data = price_data
332
+ @quantity = quantity
333
+ @tax_behavior = tax_behavior
334
+ @tax_code = tax_code
335
+ @tax_rates = tax_rates
336
+ @unit_amount = unit_amount
337
+ @unit_amount_decimal = unit_amount_decimal
338
+ end
339
+ end
340
+
341
+ class Issuer < ::Stripe::RequestParams
342
+ # The connected account being referenced when `type` is `account`.
343
+ attr_accessor :account
344
+ # Type of the account referenced in the request.
345
+ attr_accessor :type
346
+
347
+ def initialize(account: nil, type: nil)
348
+ @account = account
349
+ @type = type
350
+ end
351
+ end
352
+
353
+ class ScheduleDetails < ::Stripe::RequestParams
354
+ class Amendment < ::Stripe::RequestParams
355
+ class AmendmentEnd < ::Stripe::RequestParams
356
+ class DiscountEnd < ::Stripe::RequestParams
357
+ # The ID of a specific discount.
358
+ attr_accessor :discount
359
+
360
+ def initialize(discount: nil)
361
+ @discount = discount
362
+ end
363
+ end
364
+
365
+ class Duration < ::Stripe::RequestParams
366
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
367
+ attr_accessor :interval
368
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
369
+ attr_accessor :interval_count
370
+
371
+ def initialize(interval: nil, interval_count: nil)
372
+ @interval = interval
373
+ @interval_count = interval_count
374
+ end
375
+ end
376
+ # Use the `end` time of a given discount.
377
+ attr_accessor :discount_end
378
+ # Time span for the amendment starting from the `amendment_start`.
379
+ attr_accessor :duration
380
+ # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
381
+ attr_accessor :timestamp
382
+ # Select one of three ways to pass the `amendment_end`.
383
+ attr_accessor :type
384
+
385
+ def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
386
+ @discount_end = discount_end
387
+ @duration = duration
388
+ @timestamp = timestamp
389
+ @type = type
390
+ end
391
+ end
392
+
393
+ class AmendmentStart < ::Stripe::RequestParams
394
+ class AmendmentEnd < ::Stripe::RequestParams
395
+ # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array.
396
+ attr_accessor :index
397
+
398
+ def initialize(index: nil)
399
+ @index = index
400
+ end
401
+ end
402
+
403
+ class DiscountEnd < ::Stripe::RequestParams
404
+ # The ID of a specific discount.
405
+ attr_accessor :discount
406
+
407
+ def initialize(discount: nil)
408
+ @discount = discount
409
+ end
410
+ end
411
+ # Details of another amendment in the same array, immediately after which this amendment should begin.
412
+ attr_accessor :amendment_end
413
+ # Use the `end` time of a given discount.
414
+ attr_accessor :discount_end
415
+ # A precise Unix timestamp for the amendment to start.
416
+ attr_accessor :timestamp
417
+ # Select one of three ways to pass the `amendment_start`.
418
+ attr_accessor :type
419
+
420
+ def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
421
+ @amendment_end = amendment_end
422
+ @discount_end = discount_end
423
+ @timestamp = timestamp
424
+ @type = type
425
+ end
426
+ end
427
+
428
+ class DiscountAction < ::Stripe::RequestParams
429
+ class Add < ::Stripe::RequestParams
430
+ class DiscountEnd < ::Stripe::RequestParams
431
+ # The type of calculation made to determine when the discount ends.
432
+ attr_accessor :type
433
+
434
+ def initialize(type: nil)
435
+ @type = type
436
+ end
437
+ end
438
+ # The coupon code to redeem.
439
+ attr_accessor :coupon
440
+ # An ID of an existing discount for a coupon that was already redeemed.
441
+ attr_accessor :discount
442
+ # Details to determine how long the discount should be applied for.
443
+ attr_accessor :discount_end
444
+ # 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.
445
+ attr_accessor :index
446
+ # The promotion code to redeem.
447
+ attr_accessor :promotion_code
448
+
449
+ def initialize(
450
+ coupon: nil,
451
+ discount: nil,
452
+ discount_end: nil,
453
+ index: nil,
454
+ promotion_code: nil
455
+ )
456
+ @coupon = coupon
457
+ @discount = discount
458
+ @discount_end = discount_end
459
+ @index = index
460
+ @promotion_code = promotion_code
461
+ end
462
+ end
463
+
464
+ class Remove < ::Stripe::RequestParams
465
+ # The coupon code to remove from the `discounts` array.
466
+ attr_accessor :coupon
467
+ # The ID of a discount to remove from the `discounts` array.
468
+ attr_accessor :discount
469
+ # The ID of a promotion code to remove from the `discounts` array.
470
+ attr_accessor :promotion_code
471
+
472
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
473
+ @coupon = coupon
474
+ @discount = discount
475
+ @promotion_code = promotion_code
476
+ end
477
+ end
478
+
479
+ class Set < ::Stripe::RequestParams
480
+ # The coupon code to replace the `discounts` array with.
481
+ attr_accessor :coupon
482
+ # An ID of an existing discount to replace the `discounts` array with.
483
+ attr_accessor :discount
484
+ # An ID of an existing promotion code to replace the `discounts` array with.
485
+ attr_accessor :promotion_code
486
+
487
+ def initialize(coupon: nil, discount: nil, promotion_code: nil)
488
+ @coupon = coupon
489
+ @discount = discount
490
+ @promotion_code = promotion_code
491
+ end
492
+ end
493
+ # Details of the discount to add.
494
+ attr_accessor :add
495
+ # Details of the discount to remove.
496
+ attr_accessor :remove
497
+ # Details of the discount to replace the existing discounts with.
498
+ attr_accessor :set
499
+ # Determines the type of discount action.
500
+ attr_accessor :type
501
+
502
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
503
+ @add = add
504
+ @remove = remove
505
+ @set = set
506
+ @type = type
507
+ end
508
+ end
509
+
510
+ class ItemAction < ::Stripe::RequestParams
511
+ class Add < ::Stripe::RequestParams
512
+ class Discount < ::Stripe::RequestParams
513
+ class DiscountEnd < ::Stripe::RequestParams
514
+ class Duration < ::Stripe::RequestParams
515
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
516
+ attr_accessor :interval
517
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
518
+ attr_accessor :interval_count
519
+
520
+ def initialize(interval: nil, interval_count: nil)
521
+ @interval = interval
522
+ @interval_count = interval_count
523
+ end
524
+ end
525
+ # Time span for the redeemed discount.
526
+ attr_accessor :duration
527
+ # A precise Unix timestamp for the discount to end. Must be in the future.
528
+ attr_accessor :timestamp
529
+ # The type of calculation made to determine when the discount ends.
530
+ attr_accessor :type
531
+
532
+ def initialize(duration: nil, timestamp: nil, type: nil)
533
+ @duration = duration
534
+ @timestamp = timestamp
535
+ @type = type
536
+ end
537
+ end
538
+ # ID of the coupon to create a new discount for.
539
+ attr_accessor :coupon
540
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
541
+ attr_accessor :discount
542
+ # Details to determine how long the discount should be applied for.
543
+ attr_accessor :discount_end
544
+ # ID of the promotion code to create a new discount for.
545
+ attr_accessor :promotion_code
546
+
547
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
548
+ @coupon = coupon
549
+ @discount = discount
550
+ @discount_end = discount_end
551
+ @promotion_code = promotion_code
552
+ end
553
+ end
554
+
555
+ class Trial < ::Stripe::RequestParams
556
+ # 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.
557
+ attr_accessor :converts_to
558
+ # Determines the type of trial for this item.
559
+ attr_accessor :type
560
+
561
+ def initialize(converts_to: nil, type: nil)
562
+ @converts_to = converts_to
563
+ @type = type
564
+ end
565
+ end
566
+ # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
567
+ attr_accessor :discounts
568
+ # Set of [key-value pairs](https://docs.stripe.com/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`.
569
+ attr_accessor :metadata
570
+ # The ID of the price object.
571
+ attr_accessor :price
572
+ # Quantity for this item.
573
+ attr_accessor :quantity
574
+ # 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`.
575
+ attr_accessor :tax_rates
576
+ # Options that configure the trial on the subscription item.
577
+ attr_accessor :trial
578
+
579
+ def initialize(
580
+ discounts: nil,
581
+ metadata: nil,
582
+ price: nil,
583
+ quantity: nil,
584
+ tax_rates: nil,
585
+ trial: nil
586
+ )
587
+ @discounts = discounts
588
+ @metadata = metadata
589
+ @price = price
590
+ @quantity = quantity
591
+ @tax_rates = tax_rates
592
+ @trial = trial
593
+ end
594
+ end
595
+
596
+ class Remove < ::Stripe::RequestParams
597
+ # ID of a price to remove.
598
+ attr_accessor :price
599
+
600
+ def initialize(price: nil)
601
+ @price = price
602
+ end
603
+ end
604
+
605
+ class Set < ::Stripe::RequestParams
606
+ class Discount < ::Stripe::RequestParams
607
+ class DiscountEnd < ::Stripe::RequestParams
608
+ class Duration < ::Stripe::RequestParams
609
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
610
+ attr_accessor :interval
611
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
612
+ attr_accessor :interval_count
613
+
614
+ def initialize(interval: nil, interval_count: nil)
615
+ @interval = interval
616
+ @interval_count = interval_count
617
+ end
618
+ end
619
+ # Time span for the redeemed discount.
620
+ attr_accessor :duration
621
+ # A precise Unix timestamp for the discount to end. Must be in the future.
622
+ attr_accessor :timestamp
623
+ # The type of calculation made to determine when the discount ends.
624
+ attr_accessor :type
625
+
626
+ def initialize(duration: nil, timestamp: nil, type: nil)
627
+ @duration = duration
628
+ @timestamp = timestamp
629
+ @type = type
630
+ end
631
+ end
632
+ # ID of the coupon to create a new discount for.
633
+ attr_accessor :coupon
634
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
635
+ attr_accessor :discount
636
+ # Details to determine how long the discount should be applied for.
637
+ attr_accessor :discount_end
638
+ # ID of the promotion code to create a new discount for.
639
+ attr_accessor :promotion_code
640
+
641
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
642
+ @coupon = coupon
643
+ @discount = discount
644
+ @discount_end = discount_end
645
+ @promotion_code = promotion_code
646
+ end
647
+ end
648
+
649
+ class Trial < ::Stripe::RequestParams
650
+ # 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.
651
+ attr_accessor :converts_to
652
+ # Determines the type of trial for this item.
653
+ attr_accessor :type
654
+
655
+ def initialize(converts_to: nil, type: nil)
656
+ @converts_to = converts_to
657
+ @type = type
658
+ end
659
+ end
660
+ # 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`.
661
+ attr_accessor :discounts
662
+ # 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`.
663
+ attr_accessor :metadata
664
+ # The ID of the price object.
665
+ attr_accessor :price
666
+ # 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`.
667
+ attr_accessor :quantity
668
+ # 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`.
669
+ attr_accessor :tax_rates
670
+ # 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`.
671
+ attr_accessor :trial
672
+
673
+ def initialize(
674
+ discounts: nil,
675
+ metadata: nil,
676
+ price: nil,
677
+ quantity: nil,
678
+ tax_rates: nil,
679
+ trial: nil
680
+ )
681
+ @discounts = discounts
682
+ @metadata = metadata
683
+ @price = price
684
+ @quantity = quantity
685
+ @tax_rates = tax_rates
686
+ @trial = trial
687
+ end
688
+ end
689
+ # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item.
690
+ attr_accessor :add
691
+ # Details of the subscription item to remove.
692
+ attr_accessor :remove
693
+ # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item.
694
+ attr_accessor :set
695
+ # Determines the type of item action.
696
+ attr_accessor :type
697
+
698
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
699
+ @add = add
700
+ @remove = remove
701
+ @set = set
702
+ @type = type
703
+ end
704
+ end
705
+
706
+ class MetadataAction < ::Stripe::RequestParams
707
+ # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
708
+ attr_accessor :add
709
+ # Keys to remove from schedule phase metadata.
710
+ attr_accessor :remove
711
+ # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
712
+ attr_accessor :set
713
+ # Select one of three ways to update phase-level `metadata` on subscription schedules.
714
+ attr_accessor :type
715
+
716
+ def initialize(add: nil, remove: nil, set: nil, type: nil)
717
+ @add = add
718
+ @remove = remove
719
+ @set = set
720
+ @type = type
721
+ end
722
+ end
723
+
724
+ class SetPauseCollection < ::Stripe::RequestParams
725
+ class Set < ::Stripe::RequestParams
726
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
727
+ attr_accessor :behavior
728
+
729
+ def initialize(behavior: nil)
730
+ @behavior = behavior
731
+ end
732
+ end
733
+ # Details of the pause_collection behavior to apply to the amendment.
734
+ attr_accessor :set
735
+ # Determines the type of the pause_collection amendment.
736
+ attr_accessor :type
737
+
738
+ def initialize(set: nil, type: nil)
739
+ @set = set
740
+ @type = type
741
+ end
742
+ end
743
+
744
+ class TrialSettings < ::Stripe::RequestParams
745
+ class EndBehavior < ::Stripe::RequestParams
746
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
747
+ attr_accessor :prorate_up_front
748
+
749
+ def initialize(prorate_up_front: nil)
750
+ @prorate_up_front = prorate_up_front
751
+ end
752
+ end
753
+ # Defines how the subscription should behave when a trial ends.
754
+ attr_accessor :end_behavior
755
+
756
+ def initialize(end_behavior: nil)
757
+ @end_behavior = end_behavior
758
+ end
759
+ end
760
+ # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment.
761
+ attr_accessor :amendment_end
762
+ # Details to identify the earliest timestamp where the proposed change should take effect.
763
+ attr_accessor :amendment_start
764
+ # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment.
765
+ attr_accessor :billing_cycle_anchor
766
+ # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
767
+ attr_accessor :discount_actions
768
+ # Changes to the subscription items during the amendment time span.
769
+ attr_accessor :item_actions
770
+ # Instructions for how to modify phase metadata
771
+ attr_accessor :metadata_actions
772
+ # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`.
773
+ attr_accessor :proration_behavior
774
+ # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
775
+ attr_accessor :set_pause_collection
776
+ # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
777
+ attr_accessor :set_schedule_end
778
+ # Settings related to subscription trials.
779
+ attr_accessor :trial_settings
780
+
781
+ def initialize(
782
+ amendment_end: nil,
783
+ amendment_start: nil,
784
+ billing_cycle_anchor: nil,
785
+ discount_actions: nil,
786
+ item_actions: nil,
787
+ metadata_actions: nil,
788
+ proration_behavior: nil,
789
+ set_pause_collection: nil,
790
+ set_schedule_end: nil,
791
+ trial_settings: nil
792
+ )
793
+ @amendment_end = amendment_end
794
+ @amendment_start = amendment_start
795
+ @billing_cycle_anchor = billing_cycle_anchor
796
+ @discount_actions = discount_actions
797
+ @item_actions = item_actions
798
+ @metadata_actions = metadata_actions
799
+ @proration_behavior = proration_behavior
800
+ @set_pause_collection = set_pause_collection
801
+ @set_schedule_end = set_schedule_end
802
+ @trial_settings = trial_settings
803
+ end
804
+ end
805
+
806
+ class BillingMode < ::Stripe::RequestParams
807
+ class Flexible < ::Stripe::RequestParams
808
+ # Controls how invoices and invoice items display proration amounts and discount amounts.
809
+ attr_accessor :proration_discounts
810
+
811
+ def initialize(proration_discounts: nil)
812
+ @proration_discounts = proration_discounts
813
+ end
814
+ end
815
+ # Configure behavior for flexible billing mode.
816
+ attr_accessor :flexible
817
+ # Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
818
+ attr_accessor :type
819
+
820
+ def initialize(flexible: nil, type: nil)
821
+ @flexible = flexible
822
+ @type = type
823
+ end
824
+ end
825
+
826
+ class Phase < ::Stripe::RequestParams
827
+ class AddInvoiceItem < ::Stripe::RequestParams
828
+ class Discount < ::Stripe::RequestParams
829
+ class DiscountEnd < ::Stripe::RequestParams
830
+ class Duration < ::Stripe::RequestParams
831
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
832
+ attr_accessor :interval
833
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
834
+ attr_accessor :interval_count
835
+
836
+ def initialize(interval: nil, interval_count: nil)
837
+ @interval = interval
838
+ @interval_count = interval_count
839
+ end
840
+ end
841
+ # Time span for the redeemed discount.
842
+ attr_accessor :duration
843
+ # A precise Unix timestamp for the discount to end. Must be in the future.
844
+ attr_accessor :timestamp
845
+ # The type of calculation made to determine when the discount ends.
846
+ attr_accessor :type
847
+
848
+ def initialize(duration: nil, timestamp: nil, type: nil)
849
+ @duration = duration
850
+ @timestamp = timestamp
851
+ @type = type
852
+ end
853
+ end
854
+ # ID of the coupon to create a new discount for.
855
+ attr_accessor :coupon
856
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
857
+ attr_accessor :discount
858
+ # Details to determine how long the discount should be applied for.
859
+ attr_accessor :discount_end
860
+ # ID of the promotion code to create a new discount for.
861
+ attr_accessor :promotion_code
862
+
863
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
864
+ @coupon = coupon
865
+ @discount = discount
866
+ @discount_end = discount_end
867
+ @promotion_code = promotion_code
868
+ end
869
+ end
870
+
871
+ class Period < ::Stripe::RequestParams
872
+ class End < ::Stripe::RequestParams
873
+ # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
874
+ attr_accessor :timestamp
875
+ # Select how to calculate the end of the invoice item period.
876
+ attr_accessor :type
877
+
878
+ def initialize(timestamp: nil, type: nil)
879
+ @timestamp = timestamp
880
+ @type = type
881
+ end
882
+ end
883
+
884
+ class Start < ::Stripe::RequestParams
885
+ # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
886
+ attr_accessor :timestamp
887
+ # Select how to calculate the start of the invoice item period.
888
+ attr_accessor :type
889
+
890
+ def initialize(timestamp: nil, type: nil)
891
+ @timestamp = timestamp
892
+ @type = type
893
+ end
894
+ end
895
+ # End of the invoice item period.
896
+ attr_accessor :end
897
+ # Start of the invoice item period.
898
+ attr_accessor :start
899
+
900
+ def initialize(end_: nil, start: nil)
901
+ @end = end_
902
+ @start = start
903
+ end
904
+ end
905
+
906
+ class PriceData < ::Stripe::RequestParams
907
+ # 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).
908
+ attr_accessor :currency
909
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
910
+ attr_accessor :product
911
+ # Only required if a [default tax behavior](https://docs.stripe.com/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.
912
+ attr_accessor :tax_behavior
913
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
914
+ attr_accessor :unit_amount
915
+ # 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.
916
+ attr_accessor :unit_amount_decimal
917
+
918
+ def initialize(
919
+ currency: nil,
920
+ product: nil,
921
+ tax_behavior: nil,
922
+ unit_amount: nil,
923
+ unit_amount_decimal: nil
924
+ )
925
+ @currency = currency
926
+ @product = product
927
+ @tax_behavior = tax_behavior
928
+ @unit_amount = unit_amount
929
+ @unit_amount_decimal = unit_amount_decimal
930
+ end
931
+ end
932
+ # The coupons to redeem into discounts for the item.
933
+ attr_accessor :discounts
934
+ # Set of [key-value pairs](https://docs.stripe.com/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`.
935
+ attr_accessor :metadata
936
+ # The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`.
937
+ attr_accessor :period
938
+ # The ID of the price object. One of `price` or `price_data` is required.
939
+ attr_accessor :price
940
+ # Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
941
+ attr_accessor :price_data
942
+ # Quantity for this item. Defaults to 1.
943
+ attr_accessor :quantity
944
+ # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
945
+ attr_accessor :tax_rates
946
+
947
+ def initialize(
948
+ discounts: nil,
949
+ metadata: nil,
950
+ period: nil,
951
+ price: nil,
952
+ price_data: nil,
953
+ quantity: nil,
954
+ tax_rates: nil
955
+ )
956
+ @discounts = discounts
957
+ @metadata = metadata
958
+ @period = period
959
+ @price = price
960
+ @price_data = price_data
961
+ @quantity = quantity
962
+ @tax_rates = tax_rates
963
+ end
964
+ end
965
+
966
+ class AutomaticTax < ::Stripe::RequestParams
967
+ class Liability < ::Stripe::RequestParams
968
+ # The connected account being referenced when `type` is `account`.
969
+ attr_accessor :account
970
+ # Type of the account referenced in the request.
971
+ attr_accessor :type
972
+
973
+ def initialize(account: nil, type: nil)
974
+ @account = account
975
+ @type = type
976
+ end
977
+ end
978
+ # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
979
+ attr_accessor :enabled
980
+ # 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.
981
+ attr_accessor :liability
982
+
983
+ def initialize(enabled: nil, liability: nil)
984
+ @enabled = enabled
985
+ @liability = liability
986
+ end
987
+ end
988
+
989
+ class BillingThresholds < ::Stripe::RequestParams
990
+ # Monetary threshold that triggers the subscription to advance to a new billing period
991
+ attr_accessor :amount_gte
992
+ # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
993
+ attr_accessor :reset_billing_cycle_anchor
994
+
995
+ def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
996
+ @amount_gte = amount_gte
997
+ @reset_billing_cycle_anchor = reset_billing_cycle_anchor
998
+ end
999
+ end
1000
+
1001
+ class Discount < ::Stripe::RequestParams
1002
+ class DiscountEnd < ::Stripe::RequestParams
1003
+ class Duration < ::Stripe::RequestParams
1004
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1005
+ attr_accessor :interval
1006
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1007
+ attr_accessor :interval_count
1008
+
1009
+ def initialize(interval: nil, interval_count: nil)
1010
+ @interval = interval
1011
+ @interval_count = interval_count
1012
+ end
1013
+ end
1014
+ # Time span for the redeemed discount.
1015
+ attr_accessor :duration
1016
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1017
+ attr_accessor :timestamp
1018
+ # The type of calculation made to determine when the discount ends.
1019
+ attr_accessor :type
1020
+
1021
+ def initialize(duration: nil, timestamp: nil, type: nil)
1022
+ @duration = duration
1023
+ @timestamp = timestamp
1024
+ @type = type
1025
+ end
1026
+ end
1027
+ # ID of the coupon to create a new discount for.
1028
+ attr_accessor :coupon
1029
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1030
+ attr_accessor :discount
1031
+ # Details to determine how long the discount should be applied for.
1032
+ attr_accessor :discount_end
1033
+ # ID of the promotion code to create a new discount for.
1034
+ attr_accessor :promotion_code
1035
+
1036
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1037
+ @coupon = coupon
1038
+ @discount = discount
1039
+ @discount_end = discount_end
1040
+ @promotion_code = promotion_code
1041
+ end
1042
+ end
1043
+
1044
+ class Duration < ::Stripe::RequestParams
1045
+ # Specifies phase duration. Either `day`, `week`, `month` or `year`.
1046
+ attr_accessor :interval
1047
+ # The multiplier applied to the interval.
1048
+ attr_accessor :interval_count
1049
+
1050
+ def initialize(interval: nil, interval_count: nil)
1051
+ @interval = interval
1052
+ @interval_count = interval_count
1053
+ end
1054
+ end
1055
+
1056
+ class InvoiceSettings < ::Stripe::RequestParams
1057
+ class Issuer < ::Stripe::RequestParams
1058
+ # The connected account being referenced when `type` is `account`.
1059
+ attr_accessor :account
1060
+ # Type of the account referenced in the request.
1061
+ attr_accessor :type
1062
+
1063
+ def initialize(account: nil, type: nil)
1064
+ @account = account
1065
+ @type = type
1066
+ end
1067
+ end
1068
+ # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
1069
+ attr_accessor :account_tax_ids
1070
+ # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
1071
+ attr_accessor :days_until_due
1072
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1073
+ attr_accessor :issuer
1074
+
1075
+ def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
1076
+ @account_tax_ids = account_tax_ids
1077
+ @days_until_due = days_until_due
1078
+ @issuer = issuer
1079
+ end
1080
+ end
1081
+
1082
+ class Item < ::Stripe::RequestParams
1083
+ class BillingThresholds < ::Stripe::RequestParams
1084
+ # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
1085
+ attr_accessor :usage_gte
1086
+
1087
+ def initialize(usage_gte: nil)
1088
+ @usage_gte = usage_gte
1089
+ end
1090
+ end
1091
+
1092
+ class Discount < ::Stripe::RequestParams
1093
+ class DiscountEnd < ::Stripe::RequestParams
1094
+ class Duration < ::Stripe::RequestParams
1095
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1096
+ attr_accessor :interval
1097
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1098
+ attr_accessor :interval_count
1099
+
1100
+ def initialize(interval: nil, interval_count: nil)
1101
+ @interval = interval
1102
+ @interval_count = interval_count
1103
+ end
1104
+ end
1105
+ # Time span for the redeemed discount.
1106
+ attr_accessor :duration
1107
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1108
+ attr_accessor :timestamp
1109
+ # The type of calculation made to determine when the discount ends.
1110
+ attr_accessor :type
1111
+
1112
+ def initialize(duration: nil, timestamp: nil, type: nil)
1113
+ @duration = duration
1114
+ @timestamp = timestamp
1115
+ @type = type
1116
+ end
1117
+ end
1118
+ # ID of the coupon to create a new discount for.
1119
+ attr_accessor :coupon
1120
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1121
+ attr_accessor :discount
1122
+ # Details to determine how long the discount should be applied for.
1123
+ attr_accessor :discount_end
1124
+ # ID of the promotion code to create a new discount for.
1125
+ attr_accessor :promotion_code
1126
+
1127
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1128
+ @coupon = coupon
1129
+ @discount = discount
1130
+ @discount_end = discount_end
1131
+ @promotion_code = promotion_code
1132
+ end
1133
+ end
1134
+
1135
+ class PriceData < ::Stripe::RequestParams
1136
+ class Recurring < ::Stripe::RequestParams
1137
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1138
+ attr_accessor :interval
1139
+ # 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).
1140
+ attr_accessor :interval_count
1141
+
1142
+ def initialize(interval: nil, interval_count: nil)
1143
+ @interval = interval
1144
+ @interval_count = interval_count
1145
+ end
1146
+ end
1147
+ # 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).
1148
+ attr_accessor :currency
1149
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1150
+ attr_accessor :product
1151
+ # The recurring components of a price such as `interval` and `interval_count`.
1152
+ attr_accessor :recurring
1153
+ # Only required if a [default tax behavior](https://docs.stripe.com/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.
1154
+ attr_accessor :tax_behavior
1155
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1156
+ attr_accessor :unit_amount
1157
+ # 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.
1158
+ attr_accessor :unit_amount_decimal
1159
+
1160
+ def initialize(
1161
+ currency: nil,
1162
+ product: nil,
1163
+ recurring: nil,
1164
+ tax_behavior: nil,
1165
+ unit_amount: nil,
1166
+ unit_amount_decimal: nil
1167
+ )
1168
+ @currency = currency
1169
+ @product = product
1170
+ @recurring = recurring
1171
+ @tax_behavior = tax_behavior
1172
+ @unit_amount = unit_amount
1173
+ @unit_amount_decimal = unit_amount_decimal
1174
+ end
1175
+ end
1176
+
1177
+ class Trial < ::Stripe::RequestParams
1178
+ # 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.
1179
+ attr_accessor :converts_to
1180
+ # Determines the type of trial for this item.
1181
+ attr_accessor :type
1182
+
1183
+ def initialize(converts_to: nil, type: nil)
1184
+ @converts_to = converts_to
1185
+ @type = type
1186
+ end
1187
+ end
1188
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
1189
+ attr_accessor :billing_thresholds
1190
+ # The coupons to redeem into discounts for the subscription item.
1191
+ attr_accessor :discounts
1192
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
1193
+ attr_accessor :metadata
1194
+ # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
1195
+ attr_accessor :plan
1196
+ # The ID of the price object.
1197
+ attr_accessor :price
1198
+ # Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline.
1199
+ attr_accessor :price_data
1200
+ # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
1201
+ attr_accessor :quantity
1202
+ # A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
1203
+ attr_accessor :tax_rates
1204
+ # Options that configure the trial on the subscription item.
1205
+ attr_accessor :trial
1206
+
1207
+ def initialize(
1208
+ billing_thresholds: nil,
1209
+ discounts: nil,
1210
+ metadata: nil,
1211
+ plan: nil,
1212
+ price: nil,
1213
+ price_data: nil,
1214
+ quantity: nil,
1215
+ tax_rates: nil,
1216
+ trial: nil
1217
+ )
1218
+ @billing_thresholds = billing_thresholds
1219
+ @discounts = discounts
1220
+ @metadata = metadata
1221
+ @plan = plan
1222
+ @price = price
1223
+ @price_data = price_data
1224
+ @quantity = quantity
1225
+ @tax_rates = tax_rates
1226
+ @trial = trial
1227
+ end
1228
+ end
1229
+
1230
+ class PauseCollection < ::Stripe::RequestParams
1231
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
1232
+ attr_accessor :behavior
1233
+
1234
+ def initialize(behavior: nil)
1235
+ @behavior = behavior
1236
+ end
1237
+ end
1238
+
1239
+ class TransferData < ::Stripe::RequestParams
1240
+ # 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.
1241
+ attr_accessor :amount_percent
1242
+ # ID of an existing, connected Stripe account.
1243
+ attr_accessor :destination
1244
+
1245
+ def initialize(amount_percent: nil, destination: nil)
1246
+ @amount_percent = amount_percent
1247
+ @destination = destination
1248
+ end
1249
+ end
1250
+
1251
+ class TrialSettings < ::Stripe::RequestParams
1252
+ class EndBehavior < ::Stripe::RequestParams
1253
+ # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
1254
+ attr_accessor :prorate_up_front
1255
+
1256
+ def initialize(prorate_up_front: nil)
1257
+ @prorate_up_front = prorate_up_front
1258
+ end
1259
+ end
1260
+ # Defines how the subscription should behave when a trial ends.
1261
+ attr_accessor :end_behavior
1262
+
1263
+ def initialize(end_behavior: nil)
1264
+ @end_behavior = end_behavior
1265
+ end
1266
+ end
1267
+ # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
1268
+ attr_accessor :add_invoice_items
1269
+ # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
1270
+ attr_accessor :application_fee_percent
1271
+ # Automatic tax settings for this phase.
1272
+ attr_accessor :automatic_tax
1273
+ # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).
1274
+ attr_accessor :billing_cycle_anchor
1275
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
1276
+ attr_accessor :billing_thresholds
1277
+ # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
1278
+ attr_accessor :collection_method
1279
+ # 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).
1280
+ attr_accessor :currency
1281
+ # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
1282
+ attr_accessor :default_payment_method
1283
+ # A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
1284
+ attr_accessor :default_tax_rates
1285
+ # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
1286
+ attr_accessor :description
1287
+ # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
1288
+ attr_accessor :discounts
1289
+ # The number of intervals the phase should last. If set, `end_date` must not be set.
1290
+ attr_accessor :duration
1291
+ # The date at which this phase of the subscription schedule ends. If set, `duration` must not be set.
1292
+ attr_accessor :end_date
1293
+ # All invoices will be billed using the specified settings.
1294
+ attr_accessor :invoice_settings
1295
+ # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
1296
+ attr_accessor :items
1297
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
1298
+ attr_accessor :metadata
1299
+ # The account on behalf of which to charge, for each of the associated subscription's invoices.
1300
+ attr_accessor :on_behalf_of
1301
+ # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment).
1302
+ attr_accessor :pause_collection
1303
+ # Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
1304
+ attr_accessor :proration_behavior
1305
+ # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
1306
+ attr_accessor :start_date
1307
+ # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
1308
+ attr_accessor :transfer_data
1309
+ # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
1310
+ attr_accessor :trial
1311
+ # Specify trial behavior when crossing phase boundaries
1312
+ attr_accessor :trial_continuation
1313
+ # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
1314
+ attr_accessor :trial_end
1315
+ # Settings related to subscription trials.
1316
+ attr_accessor :trial_settings
1317
+
1318
+ def initialize(
1319
+ add_invoice_items: nil,
1320
+ application_fee_percent: nil,
1321
+ automatic_tax: nil,
1322
+ billing_cycle_anchor: nil,
1323
+ billing_thresholds: nil,
1324
+ collection_method: nil,
1325
+ currency: nil,
1326
+ default_payment_method: nil,
1327
+ default_tax_rates: nil,
1328
+ description: nil,
1329
+ discounts: nil,
1330
+ duration: nil,
1331
+ end_date: nil,
1332
+ invoice_settings: nil,
1333
+ items: nil,
1334
+ metadata: nil,
1335
+ on_behalf_of: nil,
1336
+ pause_collection: nil,
1337
+ proration_behavior: nil,
1338
+ start_date: nil,
1339
+ transfer_data: nil,
1340
+ trial: nil,
1341
+ trial_continuation: nil,
1342
+ trial_end: nil,
1343
+ trial_settings: nil
1344
+ )
1345
+ @add_invoice_items = add_invoice_items
1346
+ @application_fee_percent = application_fee_percent
1347
+ @automatic_tax = automatic_tax
1348
+ @billing_cycle_anchor = billing_cycle_anchor
1349
+ @billing_thresholds = billing_thresholds
1350
+ @collection_method = collection_method
1351
+ @currency = currency
1352
+ @default_payment_method = default_payment_method
1353
+ @default_tax_rates = default_tax_rates
1354
+ @description = description
1355
+ @discounts = discounts
1356
+ @duration = duration
1357
+ @end_date = end_date
1358
+ @invoice_settings = invoice_settings
1359
+ @items = items
1360
+ @metadata = metadata
1361
+ @on_behalf_of = on_behalf_of
1362
+ @pause_collection = pause_collection
1363
+ @proration_behavior = proration_behavior
1364
+ @start_date = start_date
1365
+ @transfer_data = transfer_data
1366
+ @trial = trial
1367
+ @trial_continuation = trial_continuation
1368
+ @trial_end = trial_end
1369
+ @trial_settings = trial_settings
1370
+ end
1371
+ end
1372
+
1373
+ class Prebilling < ::Stripe::RequestParams
1374
+ class BillUntil < ::Stripe::RequestParams
1375
+ class AmendmentEnd < ::Stripe::RequestParams
1376
+ # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments.
1377
+ attr_accessor :index
1378
+
1379
+ def initialize(index: nil)
1380
+ @index = index
1381
+ end
1382
+ end
1383
+
1384
+ class Duration < ::Stripe::RequestParams
1385
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1386
+ attr_accessor :interval
1387
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1388
+ attr_accessor :interval_count
1389
+
1390
+ def initialize(interval: nil, interval_count: nil)
1391
+ @interval = interval
1392
+ @interval_count = interval_count
1393
+ end
1394
+ end
1395
+ # End the prebilled period when a specified amendment ends.
1396
+ attr_accessor :amendment_end
1397
+ # Time span for prebilling, starting from `bill_from`.
1398
+ attr_accessor :duration
1399
+ # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
1400
+ attr_accessor :timestamp
1401
+ # Select one of several ways to pass the `bill_until` value.
1402
+ attr_accessor :type
1403
+
1404
+ def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
1405
+ @amendment_end = amendment_end
1406
+ @duration = duration
1407
+ @timestamp = timestamp
1408
+ @type = type
1409
+ end
1410
+ end
1411
+ # The end of the prebilled time period.
1412
+ attr_accessor :bill_until
1413
+ # This is used to determine the number of billing cycles to prebill.
1414
+ attr_accessor :iterations
1415
+
1416
+ def initialize(bill_until: nil, iterations: nil)
1417
+ @bill_until = bill_until
1418
+ @iterations = iterations
1419
+ end
1420
+ end
1421
+ # Changes to apply to the phases of the subscription schedule, in the order provided.
1422
+ attr_accessor :amendments
1423
+ # 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.
1424
+ attr_accessor :billing_behavior
1425
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1426
+ attr_accessor :billing_mode
1427
+ # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
1428
+ attr_accessor :end_behavior
1429
+ # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
1430
+ attr_accessor :phases
1431
+ # Provide any time periods to bill in advance.
1432
+ attr_accessor :prebilling
1433
+ # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
1434
+ attr_accessor :proration_behavior
1435
+
1436
+ def initialize(
1437
+ amendments: nil,
1438
+ billing_behavior: nil,
1439
+ billing_mode: nil,
1440
+ end_behavior: nil,
1441
+ phases: nil,
1442
+ prebilling: nil,
1443
+ proration_behavior: nil
1444
+ )
1445
+ @amendments = amendments
1446
+ @billing_behavior = billing_behavior
1447
+ @billing_mode = billing_mode
1448
+ @end_behavior = end_behavior
1449
+ @phases = phases
1450
+ @prebilling = prebilling
1451
+ @proration_behavior = proration_behavior
1452
+ end
1453
+ end
1454
+
1455
+ class SubscriptionDetails < ::Stripe::RequestParams
1456
+ class BillingMode < ::Stripe::RequestParams
1457
+ class Flexible < ::Stripe::RequestParams
1458
+ # Controls how invoices and invoice items display proration amounts and discount amounts.
1459
+ attr_accessor :proration_discounts
1460
+
1461
+ def initialize(proration_discounts: nil)
1462
+ @proration_discounts = proration_discounts
1463
+ end
1464
+ end
1465
+ # Configure behavior for flexible billing mode.
1466
+ attr_accessor :flexible
1467
+ # Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
1468
+ attr_accessor :type
1469
+
1470
+ def initialize(flexible: nil, type: nil)
1471
+ @flexible = flexible
1472
+ @type = type
1473
+ end
1474
+ end
1475
+
1476
+ class BillingSchedule < ::Stripe::RequestParams
1477
+ class AppliesTo < ::Stripe::RequestParams
1478
+ # The ID of the price object.
1479
+ attr_accessor :price
1480
+ # Controls which subscription items the billing schedule applies to.
1481
+ attr_accessor :type
1482
+
1483
+ def initialize(price: nil, type: nil)
1484
+ @price = price
1485
+ @type = type
1486
+ end
1487
+ end
1488
+
1489
+ class BillUntil < ::Stripe::RequestParams
1490
+ class Duration < ::Stripe::RequestParams
1491
+ # Specifies billing duration. Either `day`, `week`, `month` or `year`.
1492
+ attr_accessor :interval
1493
+ # The multiplier applied to the interval.
1494
+ attr_accessor :interval_count
1495
+
1496
+ def initialize(interval: nil, interval_count: nil)
1497
+ @interval = interval
1498
+ @interval_count = interval_count
1499
+ end
1500
+ end
1501
+ # Specifies the billing period.
1502
+ attr_accessor :duration
1503
+ # The end date of the billing schedule.
1504
+ attr_accessor :timestamp
1505
+ # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
1506
+ attr_accessor :type
1507
+
1508
+ def initialize(duration: nil, timestamp: nil, type: nil)
1509
+ @duration = duration
1510
+ @timestamp = timestamp
1511
+ @type = type
1512
+ end
1513
+ end
1514
+ # Configure billing schedule differently for individual subscription items.
1515
+ attr_accessor :applies_to
1516
+ # The end date for the billing schedule.
1517
+ attr_accessor :bill_until
1518
+ # Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
1519
+ attr_accessor :key
1520
+
1521
+ def initialize(applies_to: nil, bill_until: nil, key: nil)
1522
+ @applies_to = applies_to
1523
+ @bill_until = bill_until
1524
+ @key = key
1525
+ end
1526
+ end
1527
+
1528
+ class Item < ::Stripe::RequestParams
1529
+ class BillingThresholds < ::Stripe::RequestParams
1530
+ # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
1531
+ attr_accessor :usage_gte
1532
+
1533
+ def initialize(usage_gte: nil)
1534
+ @usage_gte = usage_gte
1535
+ end
1536
+ end
1537
+
1538
+ class Discount < ::Stripe::RequestParams
1539
+ class DiscountEnd < ::Stripe::RequestParams
1540
+ class Duration < ::Stripe::RequestParams
1541
+ # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1542
+ attr_accessor :interval
1543
+ # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1544
+ attr_accessor :interval_count
1545
+
1546
+ def initialize(interval: nil, interval_count: nil)
1547
+ @interval = interval
1548
+ @interval_count = interval_count
1549
+ end
1550
+ end
1551
+ # Time span for the redeemed discount.
1552
+ attr_accessor :duration
1553
+ # A precise Unix timestamp for the discount to end. Must be in the future.
1554
+ attr_accessor :timestamp
1555
+ # The type of calculation made to determine when the discount ends.
1556
+ attr_accessor :type
1557
+
1558
+ def initialize(duration: nil, timestamp: nil, type: nil)
1559
+ @duration = duration
1560
+ @timestamp = timestamp
1561
+ @type = type
1562
+ end
1563
+ end
1564
+ # ID of the coupon to create a new discount for.
1565
+ attr_accessor :coupon
1566
+ # ID of an existing discount on the object (or one of its ancestors) to reuse.
1567
+ attr_accessor :discount
1568
+ # Details to determine how long the discount should be applied for.
1569
+ attr_accessor :discount_end
1570
+ # ID of the promotion code to create a new discount for.
1571
+ attr_accessor :promotion_code
1572
+
1573
+ def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1574
+ @coupon = coupon
1575
+ @discount = discount
1576
+ @discount_end = discount_end
1577
+ @promotion_code = promotion_code
1578
+ end
1579
+ end
1580
+
1581
+ class PriceData < ::Stripe::RequestParams
1582
+ class Recurring < ::Stripe::RequestParams
1583
+ # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
1584
+ attr_accessor :interval
1585
+ # 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).
1586
+ attr_accessor :interval_count
1587
+
1588
+ def initialize(interval: nil, interval_count: nil)
1589
+ @interval = interval
1590
+ @interval_count = interval_count
1591
+ end
1592
+ end
1593
+ # 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).
1594
+ attr_accessor :currency
1595
+ # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
1596
+ attr_accessor :product
1597
+ # The recurring components of a price such as `interval` and `interval_count`.
1598
+ attr_accessor :recurring
1599
+ # Only required if a [default tax behavior](https://docs.stripe.com/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.
1600
+ attr_accessor :tax_behavior
1601
+ # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
1602
+ attr_accessor :unit_amount
1603
+ # 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.
1604
+ attr_accessor :unit_amount_decimal
1605
+
1606
+ def initialize(
1607
+ currency: nil,
1608
+ product: nil,
1609
+ recurring: nil,
1610
+ tax_behavior: nil,
1611
+ unit_amount: nil,
1612
+ unit_amount_decimal: nil
1613
+ )
1614
+ @currency = currency
1615
+ @product = product
1616
+ @recurring = recurring
1617
+ @tax_behavior = tax_behavior
1618
+ @unit_amount = unit_amount
1619
+ @unit_amount_decimal = unit_amount_decimal
1620
+ end
1621
+ end
1622
+ # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
1623
+ attr_accessor :billing_thresholds
1624
+ # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
1625
+ attr_accessor :clear_usage
1626
+ # A flag that, if set to `true`, will delete the specified item.
1627
+ attr_accessor :deleted
1628
+ # The coupons to redeem into discounts for the subscription item.
1629
+ attr_accessor :discounts
1630
+ # Subscription item to update.
1631
+ attr_accessor :id
1632
+ # Set of [key-value pairs](https://docs.stripe.com/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`.
1633
+ attr_accessor :metadata
1634
+ # Plan ID for this item, as a string.
1635
+ attr_accessor :plan
1636
+ # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
1637
+ attr_accessor :price
1638
+ # Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
1639
+ attr_accessor :price_data
1640
+ # Quantity for this item.
1641
+ attr_accessor :quantity
1642
+ # A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
1643
+ attr_accessor :tax_rates
1644
+
1645
+ def initialize(
1646
+ billing_thresholds: nil,
1647
+ clear_usage: nil,
1648
+ deleted: nil,
1649
+ discounts: nil,
1650
+ id: nil,
1651
+ metadata: nil,
1652
+ plan: nil,
1653
+ price: nil,
1654
+ price_data: nil,
1655
+ quantity: nil,
1656
+ tax_rates: nil
1657
+ )
1658
+ @billing_thresholds = billing_thresholds
1659
+ @clear_usage = clear_usage
1660
+ @deleted = deleted
1661
+ @discounts = discounts
1662
+ @id = id
1663
+ @metadata = metadata
1664
+ @plan = plan
1665
+ @price = price
1666
+ @price_data = price_data
1667
+ @quantity = quantity
1668
+ @tax_rates = tax_rates
1669
+ end
1670
+ end
1671
+
1672
+ class Prebilling < ::Stripe::RequestParams
1673
+ # This is used to determine the number of billing cycles to prebill.
1674
+ attr_accessor :iterations
1675
+
1676
+ def initialize(iterations: nil)
1677
+ @iterations = iterations
1678
+ end
1679
+ end
1680
+ # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://docs.stripe.com/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
1681
+ attr_accessor :billing_cycle_anchor
1682
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1683
+ attr_accessor :billing_mode
1684
+ # Sets the billing schedules for the subscription.
1685
+ attr_accessor :billing_schedules
1686
+ # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
1687
+ attr_accessor :cancel_at
1688
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1689
+ attr_accessor :cancel_at_period_end
1690
+ # This simulates the subscription being canceled or expired immediately.
1691
+ attr_accessor :cancel_now
1692
+ # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
1693
+ attr_accessor :default_tax_rates
1694
+ # A list of up to 20 subscription items, each with an attached price.
1695
+ attr_accessor :items
1696
+ # The pre-billing to apply to the subscription as a preview.
1697
+ attr_accessor :prebilling
1698
+ # Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
1699
+ attr_accessor :proration_behavior
1700
+ # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
1701
+ attr_accessor :proration_date
1702
+ # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
1703
+ attr_accessor :resume_at
1704
+ # Date a subscription is intended to start (can be future or past).
1705
+ attr_accessor :start_date
1706
+ # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required.
1707
+ attr_accessor :trial_end
1708
+
1709
+ def initialize(
1710
+ billing_cycle_anchor: nil,
1711
+ billing_mode: nil,
1712
+ billing_schedules: nil,
1713
+ cancel_at: nil,
1714
+ cancel_at_period_end: nil,
1715
+ cancel_now: nil,
1716
+ default_tax_rates: nil,
1717
+ items: nil,
1718
+ prebilling: nil,
1719
+ proration_behavior: nil,
1720
+ proration_date: nil,
1721
+ resume_at: nil,
1722
+ start_date: nil,
1723
+ trial_end: nil
1724
+ )
1725
+ @billing_cycle_anchor = billing_cycle_anchor
1726
+ @billing_mode = billing_mode
1727
+ @billing_schedules = billing_schedules
1728
+ @cancel_at = cancel_at
1729
+ @cancel_at_period_end = cancel_at_period_end
1730
+ @cancel_now = cancel_now
1731
+ @default_tax_rates = default_tax_rates
1732
+ @items = items
1733
+ @prebilling = prebilling
1734
+ @proration_behavior = proration_behavior
1735
+ @proration_date = proration_date
1736
+ @resume_at = resume_at
1737
+ @start_date = start_date
1738
+ @trial_end = trial_end
1739
+ end
1740
+ end
1741
+ # Settings for automatic tax lookup for this invoice preview.
1742
+ attr_accessor :automatic_tax
1743
+ # The identifier of the billing cadence for which you’d like to retrieve the upcoming invoice. Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided.
1744
+ attr_accessor :billing_cadence
1745
+ # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
1746
+ attr_accessor :currency
1747
+ # The identifier of the customer whose upcoming invoice you're retrieving. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
1748
+ attr_accessor :customer
1749
+ # The identifier of the account representing the customer whose upcoming invoice you're retrieving. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
1750
+ attr_accessor :customer_account
1751
+ # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
1752
+ attr_accessor :customer_details
1753
+ # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
1754
+ attr_accessor :discounts
1755
+ # Specifies which fields in the response should be expanded.
1756
+ attr_accessor :expand
1757
+ # List of invoice items to add or update in the upcoming invoice preview (up to 250).
1758
+ attr_accessor :invoice_items
1759
+ # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1760
+ attr_accessor :issuer
1761
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://docs.stripe.com/billing/invoices/connect) documentation for details.
1762
+ attr_accessor :on_behalf_of
1763
+ # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
1764
+ attr_accessor :preview_mode
1765
+ # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
1766
+ attr_accessor :schedule
1767
+ # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
1768
+ attr_accessor :schedule_details
1769
+ # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
1770
+ attr_accessor :subscription
1771
+ # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
1772
+ attr_accessor :subscription_details
1773
+
1774
+ def initialize(
1775
+ automatic_tax: nil,
1776
+ billing_cadence: nil,
1777
+ currency: nil,
1778
+ customer: nil,
1779
+ customer_account: nil,
1780
+ customer_details: nil,
1781
+ discounts: nil,
1782
+ expand: nil,
1783
+ invoice_items: nil,
1784
+ issuer: nil,
1785
+ on_behalf_of: nil,
1786
+ preview_mode: nil,
1787
+ schedule: nil,
1788
+ schedule_details: nil,
1789
+ subscription: nil,
1790
+ subscription_details: nil
1791
+ )
1792
+ @automatic_tax = automatic_tax
1793
+ @billing_cadence = billing_cadence
1794
+ @currency = currency
1795
+ @customer = customer
1796
+ @customer_account = customer_account
1797
+ @customer_details = customer_details
1798
+ @discounts = discounts
1799
+ @expand = expand
1800
+ @invoice_items = invoice_items
1801
+ @issuer = issuer
1802
+ @on_behalf_of = on_behalf_of
1803
+ @preview_mode = preview_mode
1804
+ @schedule = schedule
1805
+ @schedule_details = schedule_details
1806
+ @subscription = subscription
1807
+ @subscription_details = subscription_details
1808
+ end
1809
+ end
1810
+ end