stripe 15.6.0.pre.beta.1 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1097) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_requestor.rb +5 -34
  3. data/lib/stripe/api_resource.rb +3 -0
  4. data/lib/stripe/api_version.rb +2 -1
  5. data/lib/stripe/errors.rb +0 -60
  6. data/lib/stripe/event_types.rb +20 -108
  7. data/lib/stripe/events/unknown_event_notification.rb +19 -0
  8. data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +115 -15
  9. data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +93 -6
  10. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +35 -12
  11. data/lib/stripe/object_types.rb +2 -54
  12. data/lib/stripe/params/account_capability_list_params.rb +13 -0
  13. data/lib/stripe/params/account_capability_retrieve_params.rb +13 -0
  14. data/lib/stripe/params/account_capability_update_params.rb +18 -0
  15. data/lib/stripe/params/account_create_params.rb +2083 -0
  16. data/lib/stripe/params/account_delete_params.rb +6 -0
  17. data/lib/stripe/params/account_external_account_create_params.rb +134 -0
  18. data/lib/stripe/params/account_external_account_delete_params.rb +6 -0
  19. data/lib/stripe/params/account_external_account_list_params.rb +25 -0
  20. data/lib/stripe/params/account_external_account_retrieve_params.rb +13 -0
  21. data/lib/stripe/params/account_external_account_update_params.rb +91 -0
  22. data/lib/stripe/params/account_link_create_params.rb +52 -0
  23. data/lib/stripe/params/account_list_params.rb +42 -0
  24. data/lib/stripe/params/account_login_link_create_params.rb +13 -0
  25. data/lib/stripe/params/account_person_create_params.rb +435 -0
  26. data/lib/stripe/params/account_person_delete_params.rb +6 -0
  27. data/lib/stripe/params/account_person_list_params.rb +61 -0
  28. data/lib/stripe/params/account_person_retrieve_params.rb +13 -0
  29. data/lib/stripe/params/account_person_update_params.rb +435 -0
  30. data/lib/stripe/params/account_persons_params.rb +61 -0
  31. data/lib/stripe/params/account_reject_params.rb +16 -0
  32. data/lib/stripe/params/account_retrieve_current_params.rb +13 -0
  33. data/lib/stripe/params/account_retrieve_params.rb +13 -0
  34. data/lib/stripe/params/account_session_create_params.rb +598 -0
  35. data/lib/stripe/params/account_update_params.rb +2030 -0
  36. data/lib/stripe/params/apple_pay_domain_create_params.rb +16 -0
  37. data/lib/stripe/params/apple_pay_domain_delete_params.rb +6 -0
  38. data/lib/stripe/params/apple_pay_domain_list_params.rb +31 -0
  39. data/lib/stripe/params/apple_pay_domain_retrieve_params.rb +13 -0
  40. data/lib/stripe/params/application_fee_list_params.rb +52 -0
  41. data/lib/stripe/params/application_fee_refund_create_params.rb +19 -0
  42. data/lib/stripe/params/application_fee_refund_list_params.rb +22 -0
  43. data/lib/stripe/params/application_fee_refund_retrieve_params.rb +13 -0
  44. data/lib/stripe/params/application_fee_refund_update_params.rb +16 -0
  45. data/lib/stripe/params/application_fee_retrieve_params.rb +13 -0
  46. data/lib/stripe/params/apps/secret_create_params.rb +38 -0
  47. data/lib/stripe/params/apps/secret_delete_where_params.rb +32 -0
  48. data/lib/stripe/params/apps/secret_find_params.rb +32 -0
  49. data/lib/stripe/{services/quote_line_service.rb → params/apps/secret_list_params.rb} +17 -14
  50. data/lib/stripe/params/balance_retrieve_params.rb +13 -0
  51. data/lib/stripe/params/balance_settings_retrieve_params.rb +13 -0
  52. data/lib/stripe/params/balance_settings_update_params.rb +67 -0
  53. data/lib/stripe/params/balance_transaction_list_params.rb +64 -0
  54. data/lib/stripe/params/balance_transaction_retrieve_params.rb +13 -0
  55. data/lib/stripe/params/billing/alert_activate_params.rb +15 -0
  56. data/lib/stripe/params/billing/alert_archive_params.rb +15 -0
  57. data/lib/stripe/params/billing/alert_create_params.rb +52 -0
  58. data/lib/stripe/params/billing/alert_deactivate_params.rb +15 -0
  59. data/lib/stripe/params/billing/alert_list_params.rb +37 -0
  60. data/lib/stripe/params/billing/alert_retrieve_params.rb +15 -0
  61. data/lib/stripe/params/billing/credit_balance_summary_retrieve_params.rb +54 -0
  62. data/lib/stripe/params/billing/credit_balance_transaction_list_params.rb +37 -0
  63. data/lib/stripe/params/billing/credit_balance_transaction_retrieve_params.rb +15 -0
  64. data/lib/stripe/params/billing/credit_grant_create_params.rb +103 -0
  65. data/lib/stripe/params/billing/credit_grant_expire_params.rb +15 -0
  66. data/lib/stripe/params/billing/credit_grant_list_params.rb +33 -0
  67. data/lib/stripe/params/billing/credit_grant_retrieve_params.rb +15 -0
  68. data/lib/stripe/params/billing/credit_grant_update_params.rb +21 -0
  69. data/lib/stripe/params/billing/credit_grant_void_grant_params.rb +15 -0
  70. data/lib/stripe/params/billing/meter_create_params.rb +70 -0
  71. data/lib/stripe/params/billing/meter_deactivate_params.rb +15 -0
  72. data/lib/stripe/params/billing/meter_event_adjustment_create_params.rb +32 -0
  73. data/lib/stripe/params/billing/meter_event_create_params.rb +27 -0
  74. data/lib/stripe/params/billing/meter_event_summary_list_params.rb +45 -0
  75. data/lib/stripe/params/billing/meter_list_params.rb +27 -0
  76. data/lib/stripe/params/billing/meter_reactivate_params.rb +15 -0
  77. data/lib/stripe/params/billing/meter_retrieve_params.rb +15 -0
  78. data/lib/stripe/params/billing/meter_update_params.rb +18 -0
  79. data/lib/stripe/params/billing_portal/configuration_create_params.rb +225 -0
  80. data/lib/stripe/params/billing_portal/configuration_list_params.rb +37 -0
  81. data/lib/stripe/params/billing_portal/configuration_retrieve_params.rb +15 -0
  82. data/lib/stripe/params/billing_portal/configuration_update_params.rb +231 -0
  83. data/lib/stripe/params/billing_portal/session_create_params.rb +179 -0
  84. data/lib/stripe/params/charge_capture_params.rb +57 -0
  85. data/lib/stripe/params/charge_create_params.rb +172 -0
  86. data/lib/stripe/params/charge_list_params.rb +60 -0
  87. data/lib/stripe/params/charge_retrieve_params.rb +13 -0
  88. data/lib/stripe/params/charge_search_params.rb +22 -0
  89. data/lib/stripe/params/charge_update_params.rb +102 -0
  90. data/lib/stripe/params/checkout/session_create_params.rb +2445 -0
  91. data/lib/stripe/params/checkout/session_expire_params.rb +15 -0
  92. data/lib/stripe/{services/quote_preview_subscription_schedule_service.rb → params/checkout/session_line_item_list_params.rb} +2 -13
  93. data/lib/stripe/{services/order_line_item_service.rb → params/checkout/session_list_line_items_params.rb} +2 -13
  94. data/lib/stripe/params/checkout/session_list_params.rb +83 -0
  95. data/lib/stripe/params/checkout/session_retrieve_params.rb +15 -0
  96. data/lib/stripe/params/checkout/session_update_params.rb +179 -0
  97. data/lib/stripe/params/climate/order_cancel_params.rb +15 -0
  98. data/lib/stripe/params/climate/order_create_params.rb +49 -0
  99. data/lib/stripe/params/climate/order_list_params.rb +24 -0
  100. data/lib/stripe/params/climate/order_retrieve_params.rb +15 -0
  101. data/lib/stripe/params/climate/order_update_params.rb +29 -0
  102. data/lib/stripe/params/climate/product_list_params.rb +24 -0
  103. data/lib/stripe/params/climate/product_retrieve_params.rb +15 -0
  104. data/lib/stripe/params/climate/supplier_list_params.rb +24 -0
  105. data/lib/stripe/params/climate/supplier_retrieve_params.rb +15 -0
  106. data/lib/stripe/params/confirmation_token_create_params.rb +650 -0
  107. data/lib/stripe/params/confirmation_token_retrieve_params.rb +13 -0
  108. data/lib/stripe/params/country_spec_list_params.rb +22 -0
  109. data/lib/stripe/params/country_spec_retrieve_params.rb +13 -0
  110. data/lib/stripe/params/coupon_create_params.rb +80 -0
  111. data/lib/stripe/params/coupon_delete_params.rb +6 -0
  112. data/lib/stripe/params/coupon_list_params.rb +42 -0
  113. data/lib/stripe/params/coupon_retrieve_params.rb +13 -0
  114. data/lib/stripe/params/coupon_update_params.rb +30 -0
  115. data/lib/stripe/params/credit_note_create_params.rb +144 -0
  116. data/lib/stripe/params/credit_note_line_item_list_params.rb +22 -0
  117. data/lib/stripe/params/credit_note_list_params.rb +56 -0
  118. data/lib/stripe/params/credit_note_list_preview_line_items_params.rb +156 -0
  119. data/lib/stripe/params/credit_note_preview_lines_list_params.rb +156 -0
  120. data/lib/stripe/params/credit_note_preview_params.rb +144 -0
  121. data/lib/stripe/params/credit_note_retrieve_params.rb +13 -0
  122. data/lib/stripe/params/credit_note_update_params.rb +19 -0
  123. data/lib/stripe/params/credit_note_void_credit_note_params.rb +13 -0
  124. data/lib/stripe/params/customer_balance_transaction_create_params.rb +25 -0
  125. data/lib/stripe/params/customer_balance_transaction_list_params.rb +22 -0
  126. data/lib/stripe/params/customer_balance_transaction_retrieve_params.rb +13 -0
  127. data/lib/stripe/params/customer_balance_transaction_update_params.rb +19 -0
  128. data/lib/stripe/params/customer_cash_balance_retrieve_params.rb +13 -0
  129. data/lib/stripe/params/customer_cash_balance_transaction_list_params.rb +22 -0
  130. data/lib/stripe/params/customer_cash_balance_transaction_retrieve_params.rb +13 -0
  131. data/lib/stripe/params/customer_cash_balance_update_params.rb +24 -0
  132. data/lib/stripe/params/customer_create_funding_instructions_params.rb +46 -0
  133. data/lib/stripe/params/customer_create_params.rb +259 -0
  134. data/lib/stripe/params/customer_delete_discount_params.rb +6 -0
  135. data/lib/stripe/params/customer_delete_params.rb +6 -0
  136. data/lib/stripe/params/customer_fund_cash_balance_params.rb +22 -0
  137. data/lib/stripe/params/customer_funding_instructions_create_params.rb +46 -0
  138. data/lib/stripe/params/customer_list_params.rb +56 -0
  139. data/lib/stripe/params/customer_list_payment_methods_params.rb +35 -0
  140. data/lib/stripe/params/customer_payment_method_list_params.rb +35 -0
  141. data/lib/stripe/params/customer_payment_method_retrieve_params.rb +13 -0
  142. data/lib/stripe/params/customer_payment_source_create_params.rb +22 -0
  143. data/lib/stripe/params/customer_payment_source_delete_params.rb +13 -0
  144. data/lib/stripe/params/customer_payment_source_list_params.rb +25 -0
  145. data/lib/stripe/params/customer_payment_source_retrieve_params.rb +13 -0
  146. data/lib/stripe/params/customer_payment_source_update_params.rb +114 -0
  147. data/lib/stripe/params/customer_payment_source_verify_params.rb +16 -0
  148. data/lib/stripe/params/customer_retrieve_params.rb +13 -0
  149. data/lib/stripe/params/customer_retrieve_payment_method_params.rb +13 -0
  150. data/lib/stripe/params/customer_search_params.rb +22 -0
  151. data/lib/stripe/params/customer_session_create_params.rb +100 -0
  152. data/lib/stripe/params/customer_tax_id_create_params.rb +19 -0
  153. data/lib/stripe/params/customer_tax_id_delete_params.rb +6 -0
  154. data/lib/stripe/params/customer_tax_id_list_params.rb +22 -0
  155. data/lib/stripe/params/customer_tax_id_retrieve_params.rb +13 -0
  156. data/lib/stripe/params/customer_update_params.rb +243 -0
  157. data/lib/stripe/params/dispute_close_params.rb +13 -0
  158. data/lib/stripe/params/dispute_list_params.rb +56 -0
  159. data/lib/stripe/params/dispute_retrieve_params.rb +13 -0
  160. data/lib/stripe/params/dispute_update_params.rb +308 -0
  161. data/lib/stripe/params/entitlements/active_entitlement_list_params.rb +33 -0
  162. data/lib/stripe/params/entitlements/active_entitlement_retrieve_params.rb +15 -0
  163. data/lib/stripe/params/entitlements/feature_create_params.rb +24 -0
  164. data/lib/stripe/params/entitlements/feature_list_params.rb +37 -0
  165. data/lib/stripe/params/entitlements/feature_retrieve_params.rb +15 -0
  166. data/lib/stripe/params/entitlements/feature_update_params.rb +24 -0
  167. data/lib/stripe/params/ephemeral_key_create_params.rb +31 -0
  168. data/lib/stripe/params/ephemeral_key_delete_params.rb +13 -0
  169. data/lib/stripe/params/event_list_params.rb +60 -0
  170. data/lib/stripe/params/event_retrieve_params.rb +13 -0
  171. data/lib/stripe/params/exchange_rate_list_params.rb +22 -0
  172. data/lib/stripe/params/exchange_rate_retrieve_params.rb +13 -0
  173. data/lib/stripe/params/file_create_params.rb +36 -0
  174. data/lib/stripe/params/file_link_create_params.rb +22 -0
  175. data/lib/stripe/params/file_link_list_params.rb +56 -0
  176. data/lib/stripe/params/file_link_retrieve_params.rb +13 -0
  177. data/lib/stripe/params/file_link_update_params.rb +19 -0
  178. data/lib/stripe/params/file_list_params.rb +52 -0
  179. data/lib/stripe/params/file_retrieve_params.rb +13 -0
  180. data/lib/stripe/params/financial_connections/account_disconnect_params.rb +15 -0
  181. data/lib/stripe/params/financial_connections/account_list_owners_params.rb +33 -0
  182. data/lib/stripe/params/financial_connections/account_list_params.rb +48 -0
  183. data/lib/stripe/params/financial_connections/account_owner_list_params.rb +33 -0
  184. data/lib/stripe/params/financial_connections/account_refresh_account_params.rb +18 -0
  185. data/lib/stripe/params/financial_connections/account_refresh_params.rb +18 -0
  186. data/lib/stripe/params/financial_connections/account_retrieve_params.rb +15 -0
  187. data/lib/stripe/params/financial_connections/account_subscribe_params.rb +18 -0
  188. data/lib/stripe/params/financial_connections/account_unsubscribe_params.rb +18 -0
  189. data/lib/stripe/params/financial_connections/session_create_params.rb +65 -0
  190. data/lib/stripe/params/financial_connections/session_retrieve_params.rb +15 -0
  191. data/lib/stripe/params/financial_connections/transaction_list_params.rb +67 -0
  192. data/lib/stripe/params/financial_connections/transaction_retrieve_params.rb +15 -0
  193. data/lib/stripe/params/forwarding/request_create_params.rb +59 -0
  194. data/lib/stripe/params/forwarding/request_list_params.rb +44 -0
  195. data/lib/stripe/params/forwarding/request_retrieve_params.rb +15 -0
  196. data/lib/stripe/params/identity/verification_report_list_params.rb +62 -0
  197. data/lib/stripe/params/identity/verification_report_retrieve_params.rb +15 -0
  198. data/lib/stripe/params/identity/verification_session_cancel_params.rb +15 -0
  199. data/lib/stripe/params/identity/verification_session_create_params.rb +107 -0
  200. data/lib/stripe/params/identity/verification_session_list_params.rb +62 -0
  201. data/lib/stripe/params/identity/verification_session_redact_params.rb +15 -0
  202. data/lib/stripe/params/identity/verification_session_retrieve_params.rb +15 -0
  203. data/lib/stripe/params/identity/verification_session_update_params.rb +69 -0
  204. data/lib/stripe/params/invoice_add_lines_params.rb +231 -0
  205. data/lib/stripe/params/invoice_attach_payment_params.rb +16 -0
  206. data/lib/stripe/params/invoice_create_params.rb +589 -0
  207. data/lib/stripe/params/invoice_create_preview_params.rb +993 -0
  208. data/lib/stripe/params/invoice_delete_params.rb +6 -0
  209. data/lib/stripe/params/invoice_finalize_invoice_params.rb +16 -0
  210. data/lib/stripe/params/invoice_item_create_params.rb +145 -0
  211. data/lib/stripe/params/invoice_item_delete_params.rb +6 -0
  212. data/lib/stripe/params/invoice_item_list_params.rb +60 -0
  213. data/lib/stripe/params/invoice_item_retrieve_params.rb +13 -0
  214. data/lib/stripe/params/invoice_item_update_params.rb +129 -0
  215. data/lib/stripe/params/invoice_line_item_list_params.rb +22 -0
  216. data/lib/stripe/params/invoice_line_item_update_params.rb +217 -0
  217. data/lib/stripe/params/invoice_list_params.rb +86 -0
  218. data/lib/stripe/params/invoice_mark_uncollectible_params.rb +13 -0
  219. data/lib/stripe/params/invoice_pay_params.rb +41 -0
  220. data/lib/stripe/params/invoice_payment_list_params.rb +50 -0
  221. data/lib/stripe/params/invoice_payment_retrieve_params.rb +13 -0
  222. data/lib/stripe/params/invoice_remove_lines_params.rb +30 -0
  223. data/lib/stripe/params/invoice_rendering_template_archive_params.rb +13 -0
  224. data/lib/stripe/params/invoice_rendering_template_list_params.rb +25 -0
  225. data/lib/stripe/params/invoice_rendering_template_retrieve_params.rb +16 -0
  226. data/lib/stripe/params/invoice_rendering_template_unarchive_params.rb +13 -0
  227. data/lib/stripe/params/invoice_retrieve_params.rb +13 -0
  228. data/lib/stripe/params/invoice_search_params.rb +22 -0
  229. data/lib/stripe/params/invoice_send_invoice_params.rb +13 -0
  230. data/lib/stripe/params/invoice_update_lines_params.rb +231 -0
  231. data/lib/stripe/params/invoice_update_params.rb +557 -0
  232. data/lib/stripe/params/invoice_void_invoice_params.rb +13 -0
  233. data/lib/stripe/params/issuing/authorization_approve_params.rb +21 -0
  234. data/lib/stripe/params/issuing/authorization_capture_params.rb +265 -0
  235. data/lib/stripe/params/issuing/authorization_create_params.rb +357 -0
  236. data/lib/stripe/params/issuing/authorization_decline_params.rb +18 -0
  237. data/lib/stripe/params/issuing/authorization_expire_params.rb +15 -0
  238. data/lib/stripe/params/issuing/authorization_finalize_amount_params.rb +143 -0
  239. data/lib/stripe/params/issuing/authorization_increment_params.rb +21 -0
  240. data/lib/stripe/params/issuing/authorization_list_params.rb +62 -0
  241. data/lib/stripe/params/issuing/authorization_respond_params.rb +18 -0
  242. data/lib/stripe/params/issuing/authorization_retrieve_params.rb +15 -0
  243. data/lib/stripe/params/issuing/authorization_reverse_params.rb +18 -0
  244. data/lib/stripe/params/issuing/authorization_update_params.rb +18 -0
  245. data/lib/stripe/params/issuing/card_create_params.rb +213 -0
  246. data/lib/stripe/params/issuing/card_deliver_card_params.rb +15 -0
  247. data/lib/stripe/params/issuing/card_fail_card_params.rb +15 -0
  248. data/lib/stripe/params/issuing/card_list_params.rb +78 -0
  249. data/lib/stripe/params/issuing/card_retrieve_params.rb +15 -0
  250. data/lib/stripe/params/issuing/card_return_card_params.rb +15 -0
  251. data/lib/stripe/params/issuing/card_ship_card_params.rb +15 -0
  252. data/lib/stripe/params/issuing/card_submit_card_params.rb +15 -0
  253. data/lib/stripe/params/issuing/card_update_params.rb +181 -0
  254. data/lib/stripe/params/issuing/cardholder_create_params.rb +238 -0
  255. data/lib/stripe/params/issuing/cardholder_list_params.rb +66 -0
  256. data/lib/stripe/params/issuing/cardholder_retrieve_params.rb +15 -0
  257. data/lib/stripe/params/issuing/cardholder_update_params.rb +230 -0
  258. data/lib/stripe/params/issuing/dispute_create_params.rb +297 -0
  259. data/lib/stripe/params/issuing/dispute_list_params.rb +58 -0
  260. data/lib/stripe/params/issuing/dispute_retrieve_params.rb +15 -0
  261. data/lib/stripe/params/issuing/dispute_submit_params.rb +18 -0
  262. data/lib/stripe/params/issuing/dispute_update_params.rb +275 -0
  263. data/lib/stripe/params/issuing/personalization_design_activate_params.rb +15 -0
  264. data/lib/stripe/params/issuing/personalization_design_create_params.rb +75 -0
  265. data/lib/stripe/params/issuing/personalization_design_deactivate_params.rb +15 -0
  266. data/lib/stripe/params/issuing/personalization_design_list_params.rb +52 -0
  267. data/lib/stripe/params/issuing/personalization_design_reject_params.rb +29 -0
  268. data/lib/stripe/params/issuing/personalization_design_retrieve_params.rb +15 -0
  269. data/lib/stripe/params/issuing/personalization_design_update_params.rb +75 -0
  270. data/lib/stripe/params/issuing/physical_bundle_list_params.rb +37 -0
  271. data/lib/stripe/params/issuing/physical_bundle_retrieve_params.rb +15 -0
  272. data/lib/stripe/params/issuing/token_list_params.rb +58 -0
  273. data/lib/stripe/params/issuing/token_retrieve_params.rb +15 -0
  274. data/lib/stripe/params/issuing/token_update_params.rb +18 -0
  275. data/lib/stripe/params/issuing/transaction_create_force_capture_params.rb +316 -0
  276. data/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb +316 -0
  277. data/lib/stripe/params/issuing/transaction_list_params.rb +62 -0
  278. data/lib/stripe/params/issuing/transaction_refund_params.rb +18 -0
  279. data/lib/stripe/params/issuing/transaction_retrieve_params.rb +15 -0
  280. data/lib/stripe/params/issuing/transaction_update_params.rb +18 -0
  281. data/lib/stripe/params/mandate_retrieve_params.rb +13 -0
  282. data/lib/stripe/params/payment_intent_apply_customer_balance_params.rb +23 -0
  283. data/lib/stripe/params/payment_intent_cancel_params.rb +16 -0
  284. data/lib/stripe/params/payment_intent_capture_params.rb +54 -0
  285. data/lib/stripe/params/payment_intent_confirm_params.rb +2379 -0
  286. data/lib/stripe/params/payment_intent_create_params.rb +2480 -0
  287. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +48 -0
  288. data/lib/stripe/params/payment_intent_list_params.rb +52 -0
  289. data/lib/stripe/params/payment_intent_retrieve_params.rb +16 -0
  290. data/lib/stripe/params/payment_intent_search_params.rb +22 -0
  291. data/lib/stripe/params/payment_intent_update_params.rb +2353 -0
  292. data/lib/stripe/params/payment_intent_verify_microdeposits_params.rb +19 -0
  293. data/lib/stripe/params/payment_link_create_params.rb +776 -0
  294. data/lib/stripe/params/payment_link_line_item_list_params.rb +22 -0
  295. data/lib/stripe/params/payment_link_list_line_items_params.rb +22 -0
  296. data/lib/stripe/params/payment_link_list_params.rb +25 -0
  297. data/lib/stripe/params/payment_link_retrieve_params.rb +13 -0
  298. data/lib/stripe/params/payment_link_update_params.rb +564 -0
  299. data/lib/stripe/params/payment_method_attach_params.rb +16 -0
  300. data/lib/stripe/params/payment_method_configuration_create_params.rb +1135 -0
  301. data/lib/stripe/params/payment_method_configuration_list_params.rb +31 -0
  302. data/lib/stripe/params/payment_method_configuration_retrieve_params.rb +13 -0
  303. data/lib/stripe/params/payment_method_configuration_update_params.rb +1135 -0
  304. data/lib/stripe/params/payment_method_create_params.rb +583 -0
  305. data/lib/stripe/params/payment_method_detach_params.rb +13 -0
  306. data/lib/stripe/params/payment_method_domain_create_params.rb +19 -0
  307. data/lib/stripe/params/payment_method_domain_list_params.rb +35 -0
  308. data/lib/stripe/params/payment_method_domain_retrieve_params.rb +13 -0
  309. data/lib/stripe/params/payment_method_domain_update_params.rb +16 -0
  310. data/lib/stripe/params/payment_method_domain_validate_params.rb +13 -0
  311. data/lib/stripe/params/payment_method_list_params.rb +35 -0
  312. data/lib/stripe/params/payment_method_retrieve_params.rb +13 -0
  313. data/lib/stripe/params/payment_method_update_params.rb +120 -0
  314. data/lib/stripe/params/payout_cancel_params.rb +13 -0
  315. data/lib/stripe/params/payout_create_params.rb +51 -0
  316. data/lib/stripe/params/payout_list_params.rb +78 -0
  317. data/lib/stripe/params/payout_retrieve_params.rb +13 -0
  318. data/lib/stripe/params/payout_reverse_params.rb +16 -0
  319. data/lib/stripe/params/payout_update_params.rb +16 -0
  320. data/lib/stripe/params/plan_create_params.rb +158 -0
  321. data/lib/stripe/params/plan_delete_params.rb +6 -0
  322. data/lib/stripe/params/plan_list_params.rb +56 -0
  323. data/lib/stripe/params/plan_retrieve_params.rb +13 -0
  324. data/lib/stripe/params/plan_update_params.rb +35 -0
  325. data/lib/stripe/params/price_create_params.rb +278 -0
  326. data/lib/stripe/params/price_list_params.rb +87 -0
  327. data/lib/stripe/params/price_retrieve_params.rb +13 -0
  328. data/lib/stripe/params/price_search_params.rb +22 -0
  329. data/lib/stripe/params/price_update_params.rb +113 -0
  330. data/lib/stripe/params/product_create_params.rb +243 -0
  331. data/lib/stripe/params/product_delete_params.rb +6 -0
  332. data/lib/stripe/params/product_feature_create_params.rb +16 -0
  333. data/lib/stripe/params/product_feature_delete_params.rb +6 -0
  334. data/lib/stripe/params/product_feature_list_params.rb +22 -0
  335. data/lib/stripe/params/product_feature_retrieve_params.rb +13 -0
  336. data/lib/stripe/params/product_list_params.rb +68 -0
  337. data/lib/stripe/params/product_retrieve_params.rb +13 -0
  338. data/lib/stripe/params/product_search_params.rb +22 -0
  339. data/lib/stripe/params/product_update_params.rb +96 -0
  340. data/lib/stripe/params/promotion_code_create_params.rb +91 -0
  341. data/lib/stripe/params/promotion_code_list_params.rb +64 -0
  342. data/lib/stripe/params/promotion_code_retrieve_params.rb +13 -0
  343. data/lib/stripe/params/promotion_code_update_params.rb +38 -0
  344. data/lib/stripe/params/quote_accept_params.rb +13 -0
  345. data/lib/stripe/params/quote_cancel_params.rb +13 -0
  346. data/lib/stripe/params/quote_computed_upfront_line_items_list_params.rb +22 -0
  347. data/lib/stripe/params/quote_create_params.rb +301 -0
  348. data/lib/stripe/params/quote_finalize_quote_params.rb +16 -0
  349. data/lib/stripe/params/quote_line_item_list_params.rb +22 -0
  350. data/lib/stripe/params/quote_list_computed_upfront_line_items_params.rb +22 -0
  351. data/lib/stripe/params/quote_list_line_items_params.rb +22 -0
  352. data/lib/stripe/params/quote_list_params.rb +39 -0
  353. data/lib/stripe/params/quote_pdf_params.rb +13 -0
  354. data/lib/stripe/params/quote_retrieve_params.rb +13 -0
  355. data/lib/stripe/params/quote_update_params.rb +263 -0
  356. data/lib/stripe/params/radar/early_fraud_warning_list_params.rb +58 -0
  357. data/lib/stripe/params/radar/early_fraud_warning_retrieve_params.rb +15 -0
  358. data/lib/stripe/params/radar/value_list_create_params.rb +27 -0
  359. data/lib/stripe/params/radar/value_list_delete_params.rb +8 -0
  360. data/lib/stripe/params/radar/value_list_item_create_params.rb +21 -0
  361. data/lib/stripe/params/radar/value_list_item_delete_params.rb +8 -0
  362. data/lib/stripe/params/radar/value_list_item_list_params.rb +58 -0
  363. data/lib/stripe/params/radar/value_list_item_retrieve_params.rb +15 -0
  364. data/lib/stripe/params/radar/value_list_list_params.rb +58 -0
  365. data/lib/stripe/params/radar/value_list_retrieve_params.rb +15 -0
  366. data/lib/stripe/params/radar/value_list_update_params.rb +24 -0
  367. data/lib/stripe/params/refund_cancel_params.rb +13 -0
  368. data/lib/stripe/params/refund_create_params.rb +59 -0
  369. data/lib/stripe/params/refund_expire_params.rb +13 -0
  370. data/lib/stripe/params/refund_list_params.rb +56 -0
  371. data/lib/stripe/params/refund_retrieve_params.rb +13 -0
  372. data/lib/stripe/params/refund_update_params.rb +16 -0
  373. data/lib/stripe/params/reporting/report_run_create_params.rb +59 -0
  374. data/lib/stripe/params/reporting/report_run_list_params.rb +44 -0
  375. data/lib/stripe/params/reporting/report_run_retrieve_params.rb +15 -0
  376. data/lib/stripe/params/reporting/report_type_list_params.rb +15 -0
  377. data/lib/stripe/params/reporting/report_type_retrieve_params.rb +15 -0
  378. data/lib/stripe/params/review_approve_params.rb +13 -0
  379. data/lib/stripe/params/review_list_params.rb +42 -0
  380. data/lib/stripe/params/review_retrieve_params.rb +13 -0
  381. data/lib/stripe/params/setup_attempt_list_params.rb +55 -0
  382. data/lib/stripe/params/setup_intent_cancel_params.rb +16 -0
  383. data/lib/stripe/params/setup_intent_confirm_params.rb +1050 -0
  384. data/lib/stripe/params/setup_intent_create_params.rb +1130 -0
  385. data/lib/stripe/params/setup_intent_list_params.rb +62 -0
  386. data/lib/stripe/params/setup_intent_retrieve_params.rb +16 -0
  387. data/lib/stripe/params/setup_intent_update_params.rb +1025 -0
  388. data/lib/stripe/params/setup_intent_verify_microdeposits_params.rb +19 -0
  389. data/lib/stripe/params/shipping_rate_create_params.rb +103 -0
  390. data/lib/stripe/params/shipping_rate_list_params.rb +56 -0
  391. data/lib/stripe/params/shipping_rate_retrieve_params.rb +13 -0
  392. data/lib/stripe/params/shipping_rate_update_params.rb +44 -0
  393. data/lib/stripe/params/sigma/scheduled_query_run_list_params.rb +24 -0
  394. data/lib/stripe/params/sigma/scheduled_query_run_retrieve_params.rb +15 -0
  395. data/lib/stripe/params/source_create_params.rb +317 -0
  396. data/lib/stripe/params/source_detach_params.rb +13 -0
  397. data/lib/stripe/params/source_retrieve_params.rb +16 -0
  398. data/lib/stripe/params/source_transaction_list_params.rb +22 -0
  399. data/lib/stripe/params/source_update_params.rb +259 -0
  400. data/lib/stripe/params/source_verify_params.rb +16 -0
  401. data/lib/stripe/params/subscription_cancel_params.rb +33 -0
  402. data/lib/stripe/params/subscription_create_params.rb +704 -0
  403. data/lib/stripe/params/subscription_delete_discount_params.rb +6 -0
  404. data/lib/stripe/params/subscription_item_create_params.rb +134 -0
  405. data/lib/stripe/params/subscription_item_delete_params.rb +19 -0
  406. data/lib/stripe/params/subscription_item_list_params.rb +31 -0
  407. data/lib/stripe/params/subscription_item_retrieve_params.rb +13 -0
  408. data/lib/stripe/params/subscription_item_update_params.rb +134 -0
  409. data/lib/stripe/params/subscription_list_params.rb +129 -0
  410. data/lib/stripe/params/subscription_migrate_params.rb +35 -0
  411. data/lib/stripe/params/subscription_resume_params.rb +27 -0
  412. data/lib/stripe/params/subscription_retrieve_params.rb +13 -0
  413. data/lib/stripe/params/subscription_schedule_cancel_params.rb +19 -0
  414. data/lib/stripe/params/subscription_schedule_create_params.rb +590 -0
  415. data/lib/stripe/params/subscription_schedule_list_params.rb +122 -0
  416. data/lib/stripe/params/subscription_schedule_release_params.rb +16 -0
  417. data/lib/stripe/params/subscription_schedule_retrieve_params.rb +13 -0
  418. data/lib/stripe/params/subscription_schedule_update_params.rb +562 -0
  419. data/lib/stripe/params/subscription_search_params.rb +22 -0
  420. data/lib/stripe/params/subscription_update_params.rb +683 -0
  421. data/lib/stripe/params/tax/calculation_create_params.rb +206 -0
  422. data/lib/stripe/params/tax/calculation_line_item_list_params.rb +24 -0
  423. data/lib/stripe/{services/quote_preview_invoice_service.rb → params/tax/calculation_list_line_items_params.rb} +2 -13
  424. data/lib/stripe/params/tax/calculation_retrieve_params.rb +15 -0
  425. data/lib/stripe/params/tax/registration_create_params.rb +2018 -0
  426. data/lib/stripe/params/tax/registration_list_params.rb +27 -0
  427. data/lib/stripe/params/tax/registration_retrieve_params.rb +15 -0
  428. data/lib/stripe/params/tax/registration_update_params.rb +21 -0
  429. data/lib/stripe/params/tax/settings_retrieve_params.rb +15 -0
  430. data/lib/stripe/params/tax/settings_update_params.rb +71 -0
  431. data/lib/stripe/params/tax/transaction_create_from_calculation_params.rb +27 -0
  432. data/lib/stripe/params/tax/transaction_create_reversal_params.rb +87 -0
  433. data/lib/stripe/params/tax/transaction_line_item_list_params.rb +24 -0
  434. data/lib/stripe/{services/payment_intent_amount_details_line_item_service.rb → params/tax/transaction_list_line_items_params.rb} +2 -13
  435. data/lib/stripe/params/tax/transaction_retrieve_params.rb +15 -0
  436. data/lib/stripe/params/tax_code_list_params.rb +22 -0
  437. data/lib/stripe/params/tax_code_retrieve_params.rb +13 -0
  438. data/lib/stripe/params/tax_id_create_params.rb +36 -0
  439. data/lib/stripe/params/tax_id_delete_params.rb +6 -0
  440. data/lib/stripe/params/tax_id_list_params.rb +39 -0
  441. data/lib/stripe/params/tax_id_retrieve_params.rb +13 -0
  442. data/lib/stripe/params/tax_rate_create_params.rb +55 -0
  443. data/lib/stripe/params/tax_rate_list_params.rb +56 -0
  444. data/lib/stripe/params/tax_rate_retrieve_params.rb +13 -0
  445. data/lib/stripe/params/tax_rate_update_params.rb +47 -0
  446. data/lib/stripe/params/terminal/configuration_create_params.rb +593 -0
  447. data/lib/stripe/params/terminal/configuration_delete_params.rb +8 -0
  448. data/lib/stripe/params/terminal/configuration_list_params.rb +33 -0
  449. data/lib/stripe/params/terminal/configuration_retrieve_params.rb +15 -0
  450. data/lib/stripe/params/terminal/configuration_update_params.rb +593 -0
  451. data/lib/stripe/params/terminal/connection_token_create_params.rb +18 -0
  452. data/lib/stripe/params/terminal/location_create_params.rb +153 -0
  453. data/lib/stripe/params/terminal/location_delete_params.rb +8 -0
  454. data/lib/stripe/params/terminal/location_list_params.rb +24 -0
  455. data/lib/stripe/params/terminal/location_retrieve_params.rb +15 -0
  456. data/lib/stripe/params/terminal/location_update_params.rb +153 -0
  457. data/lib/stripe/params/terminal/reader_cancel_action_params.rb +15 -0
  458. data/lib/stripe/params/terminal/reader_collect_inputs_params.rb +96 -0
  459. data/lib/stripe/params/terminal/reader_collect_payment_method_params.rb +51 -0
  460. data/lib/stripe/params/terminal/reader_confirm_payment_intent_params.rb +29 -0
  461. data/lib/stripe/params/terminal/reader_create_params.rb +27 -0
  462. data/lib/stripe/params/terminal/reader_delete_params.rb +8 -0
  463. data/lib/stripe/params/terminal/reader_list_params.rb +45 -0
  464. data/lib/stripe/params/terminal/reader_present_payment_method_params.rb +72 -0
  465. data/lib/stripe/params/terminal/reader_process_payment_intent_params.rb +55 -0
  466. data/lib/stripe/params/terminal/reader_process_setup_intent_params.rb +32 -0
  467. data/lib/stripe/params/terminal/reader_refund_payment_params.rb +53 -0
  468. data/lib/stripe/params/terminal/reader_retrieve_params.rb +15 -0
  469. data/lib/stripe/params/terminal/reader_set_reader_display_params.rb +52 -0
  470. data/lib/stripe/params/terminal/reader_succeed_input_collection_params.rb +18 -0
  471. data/lib/stripe/params/terminal/reader_timeout_input_collection_params.rb +15 -0
  472. data/lib/stripe/params/terminal/reader_update_params.rb +21 -0
  473. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +652 -0
  474. data/lib/stripe/params/test_helpers/customer_fund_cash_balance_params.rb +24 -0
  475. data/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb +267 -0
  476. data/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +359 -0
  477. data/lib/stripe/params/test_helpers/issuing/authorization_expire_params.rb +17 -0
  478. data/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb +145 -0
  479. data/lib/stripe/params/test_helpers/issuing/authorization_increment_params.rb +23 -0
  480. data/lib/stripe/params/test_helpers/issuing/authorization_respond_params.rb +20 -0
  481. data/lib/stripe/params/test_helpers/issuing/authorization_reverse_params.rb +20 -0
  482. data/lib/stripe/params/test_helpers/issuing/card_deliver_card_params.rb +17 -0
  483. data/lib/stripe/params/test_helpers/issuing/card_fail_card_params.rb +17 -0
  484. data/lib/stripe/params/test_helpers/issuing/card_return_card_params.rb +17 -0
  485. data/lib/stripe/params/test_helpers/issuing/card_ship_card_params.rb +17 -0
  486. data/lib/stripe/params/test_helpers/issuing/card_submit_card_params.rb +17 -0
  487. data/lib/stripe/params/test_helpers/issuing/personalization_design_activate_params.rb +17 -0
  488. data/lib/stripe/params/test_helpers/issuing/personalization_design_deactivate_params.rb +17 -0
  489. data/lib/stripe/params/test_helpers/issuing/personalization_design_reject_params.rb +31 -0
  490. data/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb +318 -0
  491. data/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb +318 -0
  492. data/lib/stripe/params/test_helpers/issuing/transaction_refund_params.rb +20 -0
  493. data/lib/stripe/params/test_helpers/refund_expire_params.rb +15 -0
  494. data/lib/stripe/params/test_helpers/terminal/reader_present_payment_method_params.rb +74 -0
  495. data/lib/stripe/params/test_helpers/terminal/reader_succeed_input_collection_params.rb +20 -0
  496. data/lib/stripe/params/test_helpers/terminal/reader_timeout_input_collection_params.rb +17 -0
  497. data/lib/stripe/params/test_helpers/test_clock_advance_params.rb +18 -0
  498. data/lib/stripe/params/test_helpers/test_clock_create_params.rb +21 -0
  499. data/lib/stripe/params/test_helpers/test_clock_delete_params.rb +8 -0
  500. data/lib/stripe/params/test_helpers/test_clock_list_params.rb +24 -0
  501. data/lib/stripe/params/test_helpers/test_clock_retrieve_params.rb +15 -0
  502. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_fail_params.rb +28 -0
  503. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_return_inbound_transfer_params.rb +17 -0
  504. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_succeed_params.rb +17 -0
  505. data/lib/stripe/params/test_helpers/treasury/outbound_payment_fail_params.rb +17 -0
  506. data/lib/stripe/params/test_helpers/treasury/outbound_payment_post_params.rb +17 -0
  507. data/lib/stripe/params/test_helpers/treasury/outbound_payment_return_outbound_payment_params.rb +28 -0
  508. data/lib/stripe/params/test_helpers/treasury/outbound_payment_update_params.rb +57 -0
  509. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_fail_params.rb +17 -0
  510. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_post_params.rb +17 -0
  511. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_return_outbound_transfer_params.rb +28 -0
  512. data/lib/stripe/params/test_helpers/treasury/outbound_transfer_update_params.rb +57 -0
  513. data/lib/stripe/params/test_helpers/treasury/received_credit_create_params.rb +68 -0
  514. data/lib/stripe/params/test_helpers/treasury/received_debit_create_params.rb +68 -0
  515. data/lib/stripe/params/token_create_params.rb +1191 -0
  516. data/lib/stripe/params/token_retrieve_params.rb +13 -0
  517. data/lib/stripe/params/topup_cancel_params.rb +13 -0
  518. data/lib/stripe/params/topup_create_params.rb +43 -0
  519. data/lib/stripe/params/topup_list_params.rb +74 -0
  520. data/lib/stripe/params/topup_retrieve_params.rb +13 -0
  521. data/lib/stripe/params/topup_update_params.rb +19 -0
  522. data/lib/stripe/params/transfer_create_params.rb +47 -0
  523. data/lib/stripe/params/transfer_list_params.rb +56 -0
  524. data/lib/stripe/params/transfer_retrieve_params.rb +13 -0
  525. data/lib/stripe/params/transfer_reversal_create_params.rb +31 -0
  526. data/lib/stripe/params/transfer_reversal_list_params.rb +22 -0
  527. data/lib/stripe/params/transfer_reversal_retrieve_params.rb +13 -0
  528. data/lib/stripe/params/transfer_reversal_update_params.rb +16 -0
  529. data/lib/stripe/params/transfer_update_params.rb +19 -0
  530. data/lib/stripe/params/treasury/credit_reversal_create_params.rb +21 -0
  531. data/lib/stripe/params/treasury/credit_reversal_list_params.rb +41 -0
  532. data/lib/stripe/params/treasury/credit_reversal_retrieve_params.rb +15 -0
  533. data/lib/stripe/params/treasury/debit_reversal_create_params.rb +21 -0
  534. data/lib/stripe/params/treasury/debit_reversal_list_params.rb +45 -0
  535. data/lib/stripe/params/treasury/debit_reversal_retrieve_params.rb +15 -0
  536. data/lib/stripe/params/treasury/financial_account_close_params.rb +32 -0
  537. data/lib/stripe/params/treasury/financial_account_create_params.rb +201 -0
  538. data/lib/stripe/params/treasury/financial_account_features_retrieve_params.rb +15 -0
  539. data/lib/stripe/params/treasury/financial_account_features_update_params.rb +163 -0
  540. data/lib/stripe/params/treasury/financial_account_list_params.rb +54 -0
  541. data/lib/stripe/params/treasury/financial_account_retrieve_features_params.rb +15 -0
  542. data/lib/stripe/params/treasury/financial_account_retrieve_params.rb +15 -0
  543. data/lib/stripe/params/treasury/financial_account_update_features_params.rb +163 -0
  544. data/lib/stripe/params/treasury/financial_account_update_params.rb +216 -0
  545. data/lib/stripe/params/treasury/inbound_transfer_cancel_params.rb +15 -0
  546. data/lib/stripe/params/treasury/inbound_transfer_create_params.rb +45 -0
  547. data/lib/stripe/params/treasury/inbound_transfer_fail_params.rb +26 -0
  548. data/lib/stripe/params/treasury/inbound_transfer_list_params.rb +37 -0
  549. data/lib/stripe/params/treasury/inbound_transfer_retrieve_params.rb +15 -0
  550. data/lib/stripe/params/treasury/inbound_transfer_return_inbound_transfer_params.rb +15 -0
  551. data/lib/stripe/params/treasury/inbound_transfer_succeed_params.rb +15 -0
  552. data/lib/stripe/params/treasury/outbound_payment_cancel_params.rb +15 -0
  553. data/lib/stripe/params/treasury/outbound_payment_create_params.rb +190 -0
  554. data/lib/stripe/params/treasury/outbound_payment_fail_params.rb +15 -0
  555. data/lib/stripe/params/treasury/outbound_payment_list_params.rb +62 -0
  556. data/lib/stripe/params/treasury/outbound_payment_post_params.rb +15 -0
  557. data/lib/stripe/params/treasury/outbound_payment_retrieve_params.rb +15 -0
  558. data/lib/stripe/params/treasury/outbound_payment_return_outbound_payment_params.rb +26 -0
  559. data/lib/stripe/params/treasury/outbound_payment_update_params.rb +55 -0
  560. data/lib/stripe/params/treasury/outbound_transfer_cancel_params.rb +15 -0
  561. data/lib/stripe/params/treasury/outbound_transfer_create_params.rb +81 -0
  562. data/lib/stripe/params/treasury/outbound_transfer_fail_params.rb +15 -0
  563. data/lib/stripe/params/treasury/outbound_transfer_list_params.rb +37 -0
  564. data/lib/stripe/params/treasury/outbound_transfer_post_params.rb +15 -0
  565. data/lib/stripe/params/treasury/outbound_transfer_retrieve_params.rb +15 -0
  566. data/lib/stripe/params/treasury/outbound_transfer_return_outbound_transfer_params.rb +26 -0
  567. data/lib/stripe/params/treasury/outbound_transfer_update_params.rb +55 -0
  568. data/lib/stripe/params/treasury/received_credit_create_params.rb +66 -0
  569. data/lib/stripe/params/treasury/received_credit_list_params.rb +49 -0
  570. data/lib/stripe/params/treasury/received_credit_retrieve_params.rb +15 -0
  571. data/lib/stripe/params/treasury/received_debit_create_params.rb +66 -0
  572. data/lib/stripe/params/treasury/received_debit_list_params.rb +37 -0
  573. data/lib/stripe/params/treasury/received_debit_retrieve_params.rb +15 -0
  574. data/lib/stripe/params/treasury/transaction_entry_list_params.rb +84 -0
  575. data/lib/stripe/params/treasury/transaction_entry_retrieve_params.rb +15 -0
  576. data/lib/stripe/params/treasury/transaction_list_params.rb +92 -0
  577. data/lib/stripe/params/treasury/transaction_retrieve_params.rb +15 -0
  578. data/lib/stripe/params/v2/billing/meter_event_adjustment_create_params.rb +31 -0
  579. data/lib/stripe/params/v2/billing/meter_event_create_params.rb +33 -0
  580. data/lib/stripe/params/v2/billing/meter_event_session_create_params.rb +10 -0
  581. data/lib/stripe/params/v2/billing/meter_event_stream_create_params.rb +41 -0
  582. data/lib/stripe/params/v2/core/event_destination_create_params.rb +79 -0
  583. data/lib/stripe/params/v2/core/event_destination_delete_params.rb +10 -0
  584. data/lib/stripe/params/v2/core/event_destination_disable_params.rb +10 -0
  585. data/lib/stripe/params/v2/core/event_destination_enable_params.rb +10 -0
  586. data/lib/stripe/params/v2/core/event_destination_list_params.rb +20 -0
  587. data/lib/stripe/params/v2/core/event_destination_ping_params.rb +10 -0
  588. data/lib/stripe/params/v2/core/event_destination_retrieve_params.rb +17 -0
  589. data/lib/stripe/params/v2/core/event_destination_update_params.rb +47 -0
  590. data/lib/stripe/params/v2/core/event_list_params.rb +22 -0
  591. data/lib/stripe/params/v2/core/event_retrieve_params.rb +10 -0
  592. data/lib/stripe/params/webhook_endpoint_create_params.rb +39 -0
  593. data/lib/stripe/params/webhook_endpoint_delete_params.rb +6 -0
  594. data/lib/stripe/params/webhook_endpoint_list_params.rb +22 -0
  595. data/lib/stripe/params/webhook_endpoint_retrieve_params.rb +13 -0
  596. data/lib/stripe/params/webhook_endpoint_update_params.rb +35 -0
  597. data/lib/stripe/params.rb +588 -0
  598. data/lib/stripe/request_options.rb +14 -5
  599. data/lib/stripe/resources/account.rb +437 -4906
  600. data/lib/stripe/resources/account_link.rb +8 -47
  601. data/lib/stripe/resources/account_session.rb +338 -910
  602. data/lib/stripe/resources/apple_pay_domain.rb +8 -40
  603. data/lib/stripe/resources/application.rb +8 -0
  604. data/lib/stripe/resources/application_fee.rb +12 -44
  605. data/lib/stripe/resources/application_fee_refund.rb +8 -0
  606. data/lib/stripe/resources/apps/secret.rb +12 -112
  607. data/lib/stripe/resources/balance.rb +159 -0
  608. data/lib/stripe/resources/balance_settings.rb +40 -60
  609. data/lib/stripe/resources/balance_transaction.rb +12 -56
  610. data/lib/stripe/resources/bank_account.rb +40 -0
  611. data/lib/stripe/resources/billing/alert.rb +20 -100
  612. data/lib/stripe/resources/billing/alert_triggered.rb +8 -0
  613. data/lib/stripe/resources/billing/credit_balance_summary.rb +48 -2
  614. data/lib/stripe/resources/billing/credit_balance_transaction.rb +73 -33
  615. data/lib/stripe/resources/billing/credit_grant.rb +42 -161
  616. data/lib/stripe/resources/billing/meter.rb +40 -116
  617. data/lib/stripe/resources/billing/meter_event.rb +8 -20
  618. data/lib/stripe/resources/billing/meter_event_adjustment.rb +12 -22
  619. data/lib/stripe/resources/billing/meter_event_summary.rb +8 -0
  620. data/lib/stripe/resources/billing_portal/configuration.rb +120 -473
  621. data/lib/stripe/resources/billing_portal/session.rb +98 -176
  622. data/lib/stripe/resources/capability.rb +56 -0
  623. data/lib/stripe/resources/card.rb +17 -3
  624. data/lib/stripe/resources/cash_balance.rb +16 -2
  625. data/lib/stripe/resources/charge.rb +949 -1945
  626. data/lib/stripe/resources/checkout/session.rb +1038 -2991
  627. data/lib/stripe/resources/climate/order.rb +28 -89
  628. data/lib/stripe/resources/climate/product.rb +13 -15
  629. data/lib/stripe/resources/climate/supplier.rb +13 -15
  630. data/lib/stripe/resources/confirmation_token.rb +883 -841
  631. data/lib/stripe/resources/connect_collection_transfer.rb +8 -0
  632. data/lib/stripe/resources/country_spec.rb +29 -15
  633. data/lib/stripe/resources/coupon.rb +19 -166
  634. data/lib/stripe/resources/credit_note.rb +66 -510
  635. data/lib/stripe/resources/credit_note_line_item.rb +43 -8
  636. data/lib/stripe/resources/customer.rb +81 -677
  637. data/lib/stripe/resources/customer_balance_transaction.rb +8 -2
  638. data/lib/stripe/resources/customer_cash_balance_transaction.rb +108 -2
  639. data/lib/stripe/resources/customer_session.rb +49 -98
  640. data/lib/stripe/resources/discount.rb +24 -6
  641. data/lib/stripe/resources/dispute.rb +159 -376
  642. data/lib/stripe/resources/entitlements/active_entitlement.rb +8 -26
  643. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +8 -0
  644. data/lib/stripe/resources/entitlements/feature.rb +8 -66
  645. data/lib/stripe/resources/ephemeral_key.rb +8 -8
  646. data/lib/stripe/resources/event.rb +16 -79
  647. data/lib/stripe/resources/exchange_rate.rb +18 -17
  648. data/lib/stripe/resources/file.rb +8 -79
  649. data/lib/stripe/resources/file_link.rb +8 -84
  650. data/lib/stripe/resources/financial_connections/account.rb +65 -130
  651. data/lib/stripe/resources/financial_connections/account_owner.rb +8 -0
  652. data/lib/stripe/resources/financial_connections/account_ownership.rb +8 -0
  653. data/lib/stripe/resources/financial_connections/session.rb +20 -115
  654. data/lib/stripe/resources/financial_connections/transaction.rb +12 -57
  655. data/lib/stripe/resources/forwarding/request.rb +48 -93
  656. data/lib/stripe/resources/funding_instructions.rb +217 -24
  657. data/lib/stripe/resources/identity/verification_report.rb +165 -56
  658. data/lib/stripe/resources/identity/verification_session.rb +124 -247
  659. data/lib/stripe/resources/invoice.rb +500 -4017
  660. data/lib/stripe/resources/invoice_item.rb +69 -385
  661. data/lib/stripe/resources/invoice_line_item.rb +124 -251
  662. data/lib/stripe/resources/invoice_payment.rb +20 -47
  663. data/lib/stripe/resources/invoice_rendering_template.rb +8 -38
  664. data/lib/stripe/resources/issuing/authorization.rb +173 -836
  665. data/lib/stripe/resources/issuing/card.rb +98 -499
  666. data/lib/stripe/resources/issuing/cardholder.rb +108 -515
  667. data/lib/stripe/resources/issuing/dispute.rb +93 -620
  668. data/lib/stripe/resources/issuing/personalization_design.rb +32 -221
  669. data/lib/stripe/resources/issuing/physical_bundle.rb +13 -28
  670. data/lib/stripe/resources/issuing/token.rb +57 -60
  671. data/lib/stripe/resources/issuing/transaction.rb +147 -702
  672. data/lib/stripe/resources/line_item.rb +22 -35
  673. data/lib/stripe/resources/login_link.rb +8 -0
  674. data/lib/stripe/resources/mandate.rb +219 -94
  675. data/lib/stripe/resources/payment_intent.rb +1241 -13361
  676. data/lib/stripe/resources/payment_link.rb +333 -1357
  677. data/lib/stripe/resources/payment_method.rb +796 -966
  678. data/lib/stripe/resources/payment_method_configuration.rb +862 -2528
  679. data/lib/stripe/resources/payment_method_domain.rb +107 -63
  680. data/lib/stripe/resources/payout.rb +12 -150
  681. data/lib/stripe/resources/person.rb +184 -4
  682. data/lib/stripe/resources/plan.rb +20 -235
  683. data/lib/stripe/resources/price.rb +65 -509
  684. data/lib/stripe/resources/product.rb +23 -411
  685. data/lib/stripe/resources/product_feature.rb +8 -0
  686. data/lib/stripe/resources/promotion_code.rb +40 -182
  687. data/lib/stripe/resources/quote.rb +280 -2743
  688. data/lib/stripe/resources/radar/early_fraud_warning.rb +8 -51
  689. data/lib/stripe/resources/radar/value_list.rb +8 -92
  690. data/lib/stripe/resources/radar/value_list_item.rb +8 -68
  691. data/lib/stripe/resources/refund.rb +365 -159
  692. data/lib/stripe/resources/reporting/report_run.rb +12 -93
  693. data/lib/stripe/resources/reporting/report_type.rb +8 -8
  694. data/lib/stripe/resources/reserve_transaction.rb +8 -0
  695. data/lib/stripe/resources/reversal.rb +8 -0
  696. data/lib/stripe/resources/review.rb +20 -43
  697. data/lib/stripe/resources/setup_attempt.rb +284 -87
  698. data/lib/stripe/resources/setup_intent.rb +358 -4143
  699. data/lib/stripe/resources/shipping_rate.rb +44 -187
  700. data/lib/stripe/resources/sigma/scheduled_query_run.rb +13 -15
  701. data/lib/stripe/resources/source.rb +267 -611
  702. data/lib/stripe/resources/source_mandate_notification.rb +32 -0
  703. data/lib/stripe/resources/source_transaction.rb +54 -0
  704. data/lib/stripe/resources/subscription.rb +266 -1931
  705. data/lib/stripe/resources/subscription_item.rb +12 -379
  706. data/lib/stripe/resources/subscription_schedule.rb +230 -2273
  707. data/lib/stripe/resources/tax/calculation.rb +111 -220
  708. data/lib/stripe/resources/tax/calculation_line_item.rb +32 -0
  709. data/lib/stripe/resources/tax/registration.rb +1274 -2096
  710. data/lib/stripe/resources/tax/settings.rb +61 -64
  711. data/lib/stripe/resources/tax/transaction.rb +95 -122
  712. data/lib/stripe/resources/tax/transaction_line_item.rb +16 -0
  713. data/lib/stripe/resources/tax_code.rb +8 -17
  714. data/lib/stripe/resources/tax_deducted_at_source.rb +8 -0
  715. data/lib/stripe/resources/tax_id.rb +20 -75
  716. data/lib/stripe/resources/tax_rate.rb +12 -142
  717. data/lib/stripe/resources/terminal/configuration.rb +301 -1205
  718. data/lib/stripe/resources/terminal/connection_token.rb +8 -11
  719. data/lib/stripe/resources/terminal/location.rb +72 -126
  720. data/lib/stripe/resources/terminal/reader.rb +237 -509
  721. data/lib/stripe/resources/test_helpers/test_clock.rb +20 -43
  722. data/lib/stripe/resources/token.rb +8 -1191
  723. data/lib/stripe/resources/topup.rb +8 -132
  724. data/lib/stripe/resources/transfer.rb +8 -115
  725. data/lib/stripe/resources/treasury/credit_reversal.rb +12 -46
  726. data/lib/stripe/resources/treasury/debit_reversal.rb +20 -50
  727. data/lib/stripe/resources/treasury/financial_account.rb +55 -658
  728. data/lib/stripe/resources/treasury/financial_account_features.rb +192 -2
  729. data/lib/stripe/resources/treasury/inbound_transfer.rb +67 -115
  730. data/lib/stripe/resources/treasury/outbound_payment.rb +104 -334
  731. data/lib/stripe/resources/treasury/outbound_transfer.rb +93 -235
  732. data/lib/stripe/resources/treasury/received_credit.rb +76 -136
  733. data/lib/stripe/resources/treasury/received_debit.rb +68 -126
  734. data/lib/stripe/resources/treasury/transaction.rb +32 -82
  735. data/lib/stripe/resources/treasury/transaction_entry.rb +20 -74
  736. data/lib/stripe/resources/v2/billing/meter_event.rb +8 -0
  737. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +16 -0
  738. data/lib/stripe/resources/v2/billing/meter_event_session.rb +8 -0
  739. data/lib/stripe/resources/v2/core/event.rb +67 -0
  740. data/lib/stripe/resources/v2/core/event_destination.rb +119 -0
  741. data/lib/stripe/resources/v2/core/event_notification.rb +62 -0
  742. data/lib/stripe/resources/v2/deleted_object.rb +21 -0
  743. data/lib/stripe/resources/webhook_endpoint.rb +8 -85
  744. data/lib/stripe/resources.rb +3 -110
  745. data/lib/stripe/services/account_capability_service.rb +0 -32
  746. data/lib/stripe/services/account_external_account_service.rb +0 -249
  747. data/lib/stripe/services/account_link_service.rb +0 -48
  748. data/lib/stripe/services/account_login_link_service.rb +0 -9
  749. data/lib/stripe/services/account_person_service.rb +0 -958
  750. data/lib/stripe/services/account_service.rb +0 -4710
  751. data/lib/stripe/services/account_session_service.rb +0 -862
  752. data/lib/stripe/services/apple_pay_domain_service.rb +0 -50
  753. data/lib/stripe/services/application_fee_refund_service.rb +0 -54
  754. data/lib/stripe/services/application_fee_service.rb +0 -57
  755. data/lib/stripe/services/apps/secret_service.rb +0 -116
  756. data/lib/stripe/services/balance_service.rb +0 -9
  757. data/lib/stripe/services/balance_settings_service.rb +0 -69
  758. data/lib/stripe/services/balance_transaction_service.rb +0 -69
  759. data/lib/stripe/services/billing/alert_service.rb +0 -113
  760. data/lib/stripe/services/billing/credit_balance_summary_service.rb +0 -51
  761. data/lib/stripe/services/billing/credit_balance_transaction_service.rb +0 -44
  762. data/lib/stripe/services/billing/credit_grant_service.rb +0 -174
  763. data/lib/stripe/services/billing/meter_event_adjustment_service.rb +0 -26
  764. data/lib/stripe/services/billing/meter_event_service.rb +0 -21
  765. data/lib/stripe/services/billing/meter_event_summary_service.rb +0 -39
  766. data/lib/stripe/services/billing/meter_service.rb +0 -130
  767. data/lib/stripe/services/billing_portal/configuration_service.rb +0 -486
  768. data/lib/stripe/services/billing_portal/session_service.rb +0 -177
  769. data/lib/stripe/services/billing_service.rb +1 -2
  770. data/lib/stripe/services/charge_service.rb +0 -1820
  771. data/lib/stripe/services/checkout/session_line_item_service.rb +0 -18
  772. data/lib/stripe/services/checkout/session_service.rb +0 -2882
  773. data/lib/stripe/services/climate/order_service.rb +0 -102
  774. data/lib/stripe/services/climate/product_service.rb +0 -27
  775. data/lib/stripe/services/climate/supplier_service.rb +0 -27
  776. data/lib/stripe/services/confirmation_token_service.rb +0 -9
  777. data/lib/stripe/services/country_spec_service.rb +0 -27
  778. data/lib/stripe/services/coupon_service.rb +0 -167
  779. data/lib/stripe/services/credit_note_line_item_service.rb +0 -18
  780. data/lib/stripe/services/credit_note_preview_lines_service.rb +0 -152
  781. data/lib/stripe/services/credit_note_service.rb +0 -369
  782. data/lib/stripe/services/customer_balance_transaction_service.rb +0 -63
  783. data/lib/stripe/services/customer_cash_balance_service.rb +0 -29
  784. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +0 -27
  785. data/lib/stripe/services/customer_funding_instructions_service.rb +0 -42
  786. data/lib/stripe/services/customer_payment_method_service.rb +0 -40
  787. data/lib/stripe/services/customer_payment_source_service.rb +0 -179
  788. data/lib/stripe/services/customer_service.rb +0 -575
  789. data/lib/stripe/services/customer_session_service.rb +0 -99
  790. data/lib/stripe/services/customer_tax_id_service.rb +0 -44
  791. data/lib/stripe/services/dispute_service.rb +0 -374
  792. data/lib/stripe/services/entitlements/active_entitlement_service.rb +0 -36
  793. data/lib/stripe/services/entitlements/feature_service.rb +0 -76
  794. data/lib/stripe/services/ephemeral_key_service.rb +0 -36
  795. data/lib/stripe/services/event_service.rb +0 -65
  796. data/lib/stripe/services/exchange_rate_service.rb +4 -27
  797. data/lib/stripe/services/file_link_service.rb +0 -94
  798. data/lib/stripe/services/file_service.rb +0 -89
  799. data/lib/stripe/services/financial_connections/account_owner_service.rb +0 -27
  800. data/lib/stripe/services/financial_connections/account_service.rb +1 -102
  801. data/lib/stripe/services/financial_connections/session_service.rb +0 -100
  802. data/lib/stripe/services/financial_connections/transaction_service.rb +0 -70
  803. data/lib/stripe/services/financial_connections_service.rb +1 -2
  804. data/lib/stripe/services/forwarding/request_service.rb +0 -106
  805. data/lib/stripe/services/identity/verification_report_service.rb +0 -65
  806. data/lib/stripe/services/identity/verification_session_service.rb +0 -255
  807. data/lib/stripe/services/invoice_item_service.rb +0 -405
  808. data/lib/stripe/services/invoice_line_item_service.rb +0 -253
  809. data/lib/stripe/services/invoice_payment_service.rb +0 -58
  810. data/lib/stripe/services/invoice_rendering_template_service.rb +0 -51
  811. data/lib/stripe/services/invoice_service.rb +0 -3836
  812. data/lib/stripe/services/issuing/authorization_service.rb +0 -104
  813. data/lib/stripe/services/issuing/card_service.rb +0 -463
  814. data/lib/stripe/services/issuing/cardholder_service.rb +0 -526
  815. data/lib/stripe/services/issuing/dispute_service.rb +0 -633
  816. data/lib/stripe/services/issuing/personalization_design_service.rb +0 -193
  817. data/lib/stripe/services/issuing/physical_bundle_service.rb +0 -40
  818. data/lib/stripe/services/issuing/token_service.rb +0 -73
  819. data/lib/stripe/services/issuing/transaction_service.rb +0 -81
  820. data/lib/stripe/services/issuing_service.rb +1 -5
  821. data/lib/stripe/services/mandate_service.rb +0 -49
  822. data/lib/stripe/services/payment_intent_service.rb +0 -12747
  823. data/lib/stripe/services/payment_link_line_item_service.rb +0 -18
  824. data/lib/stripe/services/payment_link_service.rb +0 -1352
  825. data/lib/stripe/services/payment_method_configuration_service.rb +0 -2466
  826. data/lib/stripe/services/payment_method_domain_service.rb +0 -76
  827. data/lib/stripe/services/payment_method_service.rb +0 -881
  828. data/lib/stripe/services/payout_service.rb +0 -163
  829. data/lib/stripe/services/plan_service.rb +0 -248
  830. data/lib/stripe/services/price_service.rb +0 -512
  831. data/lib/stripe/services/product_feature_service.rb +0 -41
  832. data/lib/stripe/services/product_service.rb +0 -424
  833. data/lib/stripe/services/promotion_code_service.rb +1 -187
  834. data/lib/stripe/services/quote_computed_upfront_line_items_service.rb +0 -18
  835. data/lib/stripe/services/quote_line_item_service.rb +0 -18
  836. data/lib/stripe/services/quote_service.rb +1 -2344
  837. data/lib/stripe/services/radar/early_fraud_warning_service.rb +0 -61
  838. data/lib/stripe/services/radar/value_list_item_service.rb +0 -78
  839. data/lib/stripe/services/radar/value_list_service.rb +0 -102
  840. data/lib/stripe/services/refund_service.rb +0 -137
  841. data/lib/stripe/services/reporting/report_run_service.rb +0 -106
  842. data/lib/stripe/services/reporting/report_type_service.rb +0 -18
  843. data/lib/stripe/services/review_service.rb +0 -56
  844. data/lib/stripe/services/setup_attempt_service.rb +0 -51
  845. data/lib/stripe/services/setup_intent_service.rb +0 -3957
  846. data/lib/stripe/services/shipping_rate_service.rb +0 -200
  847. data/lib/stripe/services/sigma/scheduled_query_run_service.rb +0 -27
  848. data/lib/stripe/services/source_service.rb +0 -601
  849. data/lib/stripe/services/source_transaction_service.rb +0 -18
  850. data/lib/stripe/services/subscription_item_service.rb +0 -383
  851. data/lib/stripe/services/subscription_schedule_service.rb +0 -2196
  852. data/lib/stripe/services/subscription_service.rb +0 -1894
  853. data/lib/stripe/services/tax/calculation_line_item_service.rb +0 -18
  854. data/lib/stripe/services/tax/calculation_service.rb +0 -209
  855. data/lib/stripe/services/tax/registration_service.rb +0 -2063
  856. data/lib/stripe/services/tax/settings_service.rb +0 -74
  857. data/lib/stripe/services/tax/transaction_line_item_service.rb +0 -18
  858. data/lib/stripe/services/tax/transaction_service.rb +0 -111
  859. data/lib/stripe/services/tax_code_service.rb +0 -27
  860. data/lib/stripe/services/tax_id_service.rb +0 -84
  861. data/lib/stripe/services/tax_rate_service.rb +0 -155
  862. data/lib/stripe/services/tax_service.rb +1 -3
  863. data/lib/stripe/services/terminal/configuration_service.rb +0 -1212
  864. data/lib/stripe/services/terminal/connection_token_service.rb +0 -12
  865. data/lib/stripe/services/terminal/location_service.rb +0 -143
  866. data/lib/stripe/services/terminal/reader_service.rb +0 -427
  867. data/lib/stripe/services/terminal_service.rb +1 -3
  868. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +0 -738
  869. data/lib/stripe/services/test_helpers/customer_service.rb +0 -18
  870. data/lib/stripe/services/test_helpers/issuing/authorization_service.rb +0 -745
  871. data/lib/stripe/services/test_helpers/issuing/card_service.rb +0 -45
  872. data/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +0 -41
  873. data/lib/stripe/services/test_helpers/issuing/transaction_service.rb +0 -632
  874. data/lib/stripe/services/test_helpers/refund_service.rb +0 -9
  875. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +0 -87
  876. data/lib/stripe/services/test_helpers/test_clock_service.rb +0 -56
  877. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +0 -38
  878. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +0 -87
  879. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +0 -87
  880. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +0 -84
  881. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +0 -84
  882. data/lib/stripe/services/token_service.rb +0 -1201
  883. data/lib/stripe/services/topup_service.rb +0 -142
  884. data/lib/stripe/services/transfer_reversal_service.rb +0 -66
  885. data/lib/stripe/services/transfer_service.rb +0 -123
  886. data/lib/stripe/services/treasury/credit_reversal_service.rb +0 -59
  887. data/lib/stripe/services/treasury/debit_reversal_service.rb +0 -63
  888. data/lib/stripe/services/treasury/financial_account_features_service.rb +0 -169
  889. data/lib/stripe/services/treasury/financial_account_service.rb +0 -502
  890. data/lib/stripe/services/treasury/inbound_transfer_service.rb +0 -88
  891. data/lib/stripe/services/treasury/outbound_payment_service.rb +0 -258
  892. data/lib/stripe/services/treasury/outbound_transfer_service.rb +0 -148
  893. data/lib/stripe/services/treasury/received_credit_service.rb +0 -52
  894. data/lib/stripe/services/treasury/received_debit_service.rb +0 -40
  895. data/lib/stripe/services/treasury/transaction_entry_service.rb +0 -87
  896. data/lib/stripe/services/treasury/transaction_service.rb +0 -95
  897. data/lib/stripe/services/v1_services.rb +1 -10
  898. data/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +0 -23
  899. data/lib/stripe/services/v2/billing/meter_event_service.rb +0 -25
  900. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +0 -2
  901. data/lib/stripe/services/v2/billing/meter_event_stream_service.rb +0 -33
  902. data/lib/stripe/services/v2/core/event_destination_service.rb +0 -137
  903. data/lib/stripe/services/v2/core/event_service.rb +0 -16
  904. data/lib/stripe/services/v2/core_service.rb +1 -4
  905. data/lib/stripe/services/v2_services.rb +1 -4
  906. data/lib/stripe/services/webhook_endpoint_service.rb +0 -95
  907. data/lib/stripe/services.rb +0 -54
  908. data/lib/stripe/stripe_client.rb +8 -5
  909. data/lib/stripe/stripe_configuration.rb +2 -9
  910. data/lib/stripe/stripe_context.rb +68 -0
  911. data/lib/stripe/stripe_object.rb +34 -10
  912. data/lib/stripe/util.rb +25 -20
  913. data/lib/stripe/version.rb +1 -1
  914. data/lib/stripe.rb +3 -54
  915. data/rbi/stripe/resources/v2/core/event_notification.rbi +43 -0
  916. data/rbi/stripe/stripe_client.rbi +17 -0
  917. data/rbi/stripe.rbi +121931 -190301
  918. metadata +599 -189
  919. data/API_VERSION +0 -1
  920. data/CHANGELOG.md +0 -2780
  921. data/CODE_OF_CONDUCT.md +0 -77
  922. data/CONTRIBUTING.md +0 -25
  923. data/CONTRIBUTORS +0 -3
  924. data/Gemfile +0 -41
  925. data/History.txt +0 -1
  926. data/LICENSE +0 -21
  927. data/Makefile +0 -22
  928. data/OPENAPI_VERSION +0 -1
  929. data/README.md +0 -424
  930. data/Rakefile +0 -34
  931. data/VERSION +0 -1
  932. data/examples/README.md +0 -16
  933. data/examples/example_template.rb +0 -36
  934. data/examples/meter_event_stream.rb +0 -57
  935. data/examples/thinevent_webhook_handler.rb +0 -39
  936. data/justfile +0 -43
  937. data/lib/stripe/events/v2_core_account_closed_event.rb +0 -21
  938. data/lib/stripe/events/v2_core_account_created_event.rb +0 -21
  939. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +0 -23
  940. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +0 -21
  941. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +0 -23
  942. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +0 -21
  943. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +0 -23
  944. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +0 -21
  945. data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +0 -23
  946. data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +0 -21
  947. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +0 -21
  948. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +0 -21
  949. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +0 -21
  950. data/lib/stripe/events/v2_core_account_link_returned_event.rb +0 -13
  951. data/lib/stripe/events/v2_core_account_person_created_event.rb +0 -23
  952. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +0 -23
  953. data/lib/stripe/events/v2_core_account_person_updated_event.rb +0 -23
  954. data/lib/stripe/events/v2_core_account_updated_event.rb +0 -21
  955. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +0 -21
  956. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +0 -21
  957. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +0 -21
  958. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +0 -21
  959. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +0 -21
  960. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +0 -23
  961. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +0 -21
  962. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +0 -21
  963. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +0 -21
  964. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +0 -21
  965. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +0 -21
  966. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +0 -21
  967. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +0 -21
  968. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +0 -21
  969. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +0 -21
  970. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +0 -21
  971. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +0 -21
  972. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +0 -21
  973. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +0 -21
  974. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +0 -21
  975. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +0 -21
  976. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +0 -21
  977. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +0 -21
  978. data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +0 -21
  979. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +0 -23
  980. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +0 -21
  981. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +0 -21
  982. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +0 -21
  983. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +0 -21
  984. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +0 -21
  985. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +0 -21
  986. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +0 -21
  987. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +0 -21
  988. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +0 -21
  989. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +0 -21
  990. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +0 -21
  991. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +0 -22
  992. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +0 -21
  993. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +0 -21
  994. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +0 -21
  995. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +0 -21
  996. data/lib/stripe/resources/account_notice.rb +0 -123
  997. data/lib/stripe/resources/billing/meter_usage.rb +0 -23
  998. data/lib/stripe/resources/billing/meter_usage_row.rb +0 -28
  999. data/lib/stripe/resources/capital/financing_offer.rb +0 -179
  1000. data/lib/stripe/resources/capital/financing_summary.rb +0 -55
  1001. data/lib/stripe/resources/capital/financing_transaction.rb +0 -114
  1002. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  1003. data/lib/stripe/resources/financial_connections/institution.rb +0 -92
  1004. data/lib/stripe/resources/fx_quote.rb +0 -186
  1005. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -602
  1006. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -82
  1007. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -86
  1008. data/lib/stripe/resources/issuing/settlement.rb +0 -53
  1009. data/lib/stripe/resources/margin.rb +0 -115
  1010. data/lib/stripe/resources/order.rb +0 -2958
  1011. data/lib/stripe/resources/payment_attempt_record.rb +0 -1181
  1012. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +0 -72
  1013. data/lib/stripe/resources/payment_record.rb +0 -1727
  1014. data/lib/stripe/resources/privacy/redaction_job.rb +0 -298
  1015. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +0 -33
  1016. data/lib/stripe/resources/quote_line.rb +0 -274
  1017. data/lib/stripe/resources/quote_preview_invoice.rb +0 -680
  1018. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -395
  1019. data/lib/stripe/resources/tax/association.rb +0 -66
  1020. data/lib/stripe/resources/tax/form.rb +0 -211
  1021. data/lib/stripe/resources/terminal/onboarding_link.rb +0 -84
  1022. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -31
  1023. data/lib/stripe/resources/v2/core/account.rb +0 -1938
  1024. data/lib/stripe/resources/v2/core/account_link.rb +0 -72
  1025. data/lib/stripe/resources/v2/core/person.rb +0 -276
  1026. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +0 -74
  1027. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +0 -39
  1028. data/lib/stripe/resources/v2/event.rb +0 -41
  1029. data/lib/stripe/resources/v2/event_destination.rb +0 -73
  1030. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +0 -20
  1031. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +0 -22
  1032. data/lib/stripe/resources/v2/money_management/adjustment.rb +0 -51
  1033. data/lib/stripe/resources/v2/money_management/financial_account.rb +0 -79
  1034. data/lib/stripe/resources/v2/money_management/financial_address.rb +0 -68
  1035. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +0 -94
  1036. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +0 -129
  1037. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +0 -82
  1038. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +0 -45
  1039. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +0 -117
  1040. data/lib/stripe/resources/v2/money_management/payout_method.rb +0 -77
  1041. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +0 -49
  1042. data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -122
  1043. data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -84
  1044. data/lib/stripe/resources/v2/money_management/transaction.rb +0 -80
  1045. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +0 -70
  1046. data/lib/stripe/resources/v2/payments/off_session_payment.rb +0 -89
  1047. data/lib/stripe/services/account_notice_service.rb +0 -101
  1048. data/lib/stripe/services/billing/meter_usage_service.rb +0 -76
  1049. data/lib/stripe/services/capital/financing_offer_service.rb +0 -112
  1050. data/lib/stripe/services/capital/financing_summary_service.rb +0 -28
  1051. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -79
  1052. data/lib/stripe/services/capital_service.rb +0 -15
  1053. data/lib/stripe/services/external_account_service.rb +0 -317
  1054. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -37
  1055. data/lib/stripe/services/financial_connections/institution_service.rb +0 -57
  1056. data/lib/stripe/services/fx_quote_service.rb +0 -123
  1057. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -504
  1058. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -66
  1059. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -83
  1060. data/lib/stripe/services/margin_service.rb +0 -119
  1061. data/lib/stripe/services/order_service.rb +0 -2388
  1062. data/lib/stripe/services/payment_attempt_record_service.rb +0 -52
  1063. data/lib/stripe/services/payment_record_service.rb +0 -562
  1064. data/lib/stripe/services/privacy/redaction_job_service.rb +0 -240
  1065. data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +0 -37
  1066. data/lib/stripe/services/privacy_service.rb +0 -13
  1067. data/lib/stripe/services/tax/association_service.rb +0 -31
  1068. data/lib/stripe/services/tax/form_service.rb +0 -100
  1069. data/lib/stripe/services/terminal/onboarding_link_service.rb +0 -56
  1070. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -28
  1071. data/lib/stripe/services/v2/core/account_link_service.rb +0 -114
  1072. data/lib/stripe/services/v2/core/account_service.rb +0 -4536
  1073. data/lib/stripe/services/v2/core/accounts/person_service.rb +0 -1045
  1074. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +0 -130
  1075. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +0 -107
  1076. data/lib/stripe/services/v2/core/vault_service.rb +0 -18
  1077. data/lib/stripe/services/v2/money_management/adjustment_service.rb +0 -74
  1078. data/lib/stripe/services/v2/money_management/financial_account_service.rb +0 -119
  1079. data/lib/stripe/services/v2/money_management/financial_address_service.rb +0 -82
  1080. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +0 -125
  1081. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +0 -95
  1082. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +0 -199
  1083. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +0 -235
  1084. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +0 -172
  1085. data/lib/stripe/services/v2/money_management/payout_method_service.rb +0 -90
  1086. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +0 -32
  1087. data/lib/stripe/services/v2/money_management/received_credit_service.rb +0 -70
  1088. data/lib/stripe/services/v2/money_management/received_debit_service.rb +0 -43
  1089. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +0 -69
  1090. data/lib/stripe/services/v2/money_management/transaction_service.rb +0 -73
  1091. data/lib/stripe/services/v2/money_management_service.rb +0 -31
  1092. data/lib/stripe/services/v2/payment_service.rb +0 -15
  1093. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +0 -152
  1094. data/lib/stripe/services/v2/test_helper_service.rb +0 -15
  1095. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +0 -53
  1096. data/lib/stripe/thin_event.rb +0 -37
  1097. data/stripe.gemspec +0 -47
@@ -49,31 +49,20 @@ module Stripe
49
49
 
50
50
  nested_resource_class_methods :line, operations: %i[list]
51
51
 
52
- class AmountsDue < Stripe::StripeObject
53
- # Incremental amount due for this payment in cents (or local equivalent).
54
- attr_reader :amount
55
- # The amount in cents (or local equivalent) that was paid for this payment.
56
- attr_reader :amount_paid
57
- # The difference between the payment’s amount and amount_paid, in cents (or local equivalent).
58
- attr_reader :amount_remaining
59
- # Number of days from when invoice is finalized until the payment is due.
60
- attr_reader :days_until_due
61
- # An arbitrary string attached to the object. Often useful for displaying to users.
62
- attr_reader :description
63
- # Date on which a payment plan’s payment is due.
64
- attr_reader :due_date
65
- # Timestamp when the payment was paid.
66
- attr_reader :paid_at
67
- # The status of the payment, one of `open`, `paid`, or `past_due`
68
- attr_reader :status
69
- end
70
-
71
52
  class AutomaticTax < Stripe::StripeObject
72
53
  class Liability < Stripe::StripeObject
73
54
  # The connected account being referenced when `type` is `account`.
74
55
  attr_reader :account
75
56
  # Type of the account referenced.
76
57
  attr_reader :type
58
+
59
+ def self.inner_class_types
60
+ @inner_class_types = {}
61
+ end
62
+
63
+ def self.field_remappings
64
+ @field_remappings = {}
65
+ end
77
66
  end
78
67
  # If Stripe disabled automatic tax, this enum describes why.
79
68
  attr_reader :disabled_reason
@@ -85,6 +74,14 @@ module Stripe
85
74
  attr_reader :provider
86
75
  # The status of the most recent automated tax calculation for this invoice.
87
76
  attr_reader :status
77
+
78
+ def self.inner_class_types
79
+ @inner_class_types = { liability: Liability }
80
+ end
81
+
82
+ def self.field_remappings
83
+ @field_remappings = {}
84
+ end
88
85
  end
89
86
 
90
87
  class ConfirmationSecret < Stripe::StripeObject
@@ -92,6 +89,14 @@ module Stripe
92
89
  attr_reader :client_secret
93
90
  # The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization
94
91
  attr_reader :type
92
+
93
+ def self.inner_class_types
94
+ @inner_class_types = {}
95
+ end
96
+
97
+ def self.field_remappings
98
+ @field_remappings = {}
99
+ end
95
100
  end
96
101
 
97
102
  class CustomField < Stripe::StripeObject
@@ -99,6 +104,14 @@ module Stripe
99
104
  attr_reader :name
100
105
  # The value of the custom field.
101
106
  attr_reader :value
107
+
108
+ def self.inner_class_types
109
+ @inner_class_types = {}
110
+ end
111
+
112
+ def self.field_remappings
113
+ @field_remappings = {}
114
+ end
102
115
  end
103
116
 
104
117
  class CustomerAddress < Stripe::StripeObject
@@ -106,14 +119,22 @@ module Stripe
106
119
  attr_reader :city
107
120
  # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
108
121
  attr_reader :country
109
- # Address line 1 (e.g., street, PO Box, or company name).
122
+ # Address line 1, such as the street, PO Box, or company name.
110
123
  attr_reader :line1
111
- # Address line 2 (e.g., apartment, suite, unit, or building).
124
+ # Address line 2, such as the apartment, suite, unit, or building.
112
125
  attr_reader :line2
113
126
  # ZIP or postal code.
114
127
  attr_reader :postal_code
115
128
  # State, county, province, or region.
116
129
  attr_reader :state
130
+
131
+ def self.inner_class_types
132
+ @inner_class_types = {}
133
+ end
134
+
135
+ def self.field_remappings
136
+ @field_remappings = {}
137
+ end
117
138
  end
118
139
 
119
140
  class CustomerShipping < Stripe::StripeObject
@@ -122,14 +143,22 @@ module Stripe
122
143
  attr_reader :city
123
144
  # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
124
145
  attr_reader :country
125
- # Address line 1 (e.g., street, PO Box, or company name).
146
+ # Address line 1, such as the street, PO Box, or company name.
126
147
  attr_reader :line1
127
- # Address line 2 (e.g., apartment, suite, unit, or building).
148
+ # Address line 2, such as the apartment, suite, unit, or building.
128
149
  attr_reader :line2
129
150
  # ZIP or postal code.
130
151
  attr_reader :postal_code
131
152
  # State, county, province, or region.
132
153
  attr_reader :state
154
+
155
+ def self.inner_class_types
156
+ @inner_class_types = {}
157
+ end
158
+
159
+ def self.field_remappings
160
+ @field_remappings = {}
161
+ end
133
162
  end
134
163
  # Attribute for field address
135
164
  attr_reader :address
@@ -141,6 +170,14 @@ module Stripe
141
170
  attr_reader :phone
142
171
  # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
143
172
  attr_reader :tracking_number
173
+
174
+ def self.inner_class_types
175
+ @inner_class_types = { address: Address }
176
+ end
177
+
178
+ def self.field_remappings
179
+ @field_remappings = {}
180
+ end
144
181
  end
145
182
 
146
183
  class CustomerTaxId < Stripe::StripeObject
@@ -148,6 +185,14 @@ module Stripe
148
185
  attr_reader :type
149
186
  # The value of the tax ID.
150
187
  attr_reader :value
188
+
189
+ def self.inner_class_types
190
+ @inner_class_types = {}
191
+ end
192
+
193
+ def self.field_remappings
194
+ @field_remappings = {}
195
+ end
151
196
  end
152
197
 
153
198
  class FromInvoice < Stripe::StripeObject
@@ -155,6 +200,14 @@ module Stripe
155
200
  attr_reader :action
156
201
  # The invoice that was cloned.
157
202
  attr_reader :invoice
203
+
204
+ def self.inner_class_types
205
+ @inner_class_types = {}
206
+ end
207
+
208
+ def self.field_remappings
209
+ @field_remappings = {}
210
+ end
158
211
  end
159
212
 
160
213
  class Issuer < Stripe::StripeObject
@@ -162,6 +215,14 @@ module Stripe
162
215
  attr_reader :account
163
216
  # Type of the account referenced.
164
217
  attr_reader :type
218
+
219
+ def self.inner_class_types
220
+ @inner_class_types = {}
221
+ end
222
+
223
+ def self.field_remappings
224
+ @field_remappings = {}
225
+ end
165
226
  end
166
227
 
167
228
  class LastFinalizationError < Stripe::StripeObject
@@ -231,30 +292,46 @@ module Stripe
231
292
  attr_reader :source
232
293
  # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
233
294
  attr_reader :type
295
+
296
+ def self.inner_class_types
297
+ @inner_class_types = {}
298
+ end
299
+
300
+ def self.field_remappings
301
+ @field_remappings = {}
302
+ end
234
303
  end
235
304
 
236
305
  class Parent < Stripe::StripeObject
237
306
  class QuoteDetails < Stripe::StripeObject
238
307
  # The quote that generated this invoice
239
308
  attr_reader :quote
309
+
310
+ def self.inner_class_types
311
+ @inner_class_types = {}
312
+ end
313
+
314
+ def self.field_remappings
315
+ @field_remappings = {}
316
+ end
240
317
  end
241
318
 
242
319
  class SubscriptionDetails < Stripe::StripeObject
243
- class PauseCollection < Stripe::StripeObject
244
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
245
- attr_reader :behavior
246
- # The time after which the subscription will resume collecting payments.
247
- attr_reader :resumes_at
248
- end
249
320
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization.
250
321
  # *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
251
322
  attr_reader :metadata
252
- # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
253
- attr_reader :pause_collection
254
323
  # The subscription that generated this invoice
255
324
  attr_reader :subscription
256
325
  # Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
257
326
  attr_reader :subscription_proration_date
327
+
328
+ def self.inner_class_types
329
+ @inner_class_types = {}
330
+ end
331
+
332
+ def self.field_remappings
333
+ @field_remappings = {}
334
+ end
258
335
  end
259
336
  # Details about the quote that generated this invoice
260
337
  attr_reader :quote_details
@@ -262,6 +339,17 @@ module Stripe
262
339
  attr_reader :subscription_details
263
340
  # The type of parent that generated this invoice
264
341
  attr_reader :type
342
+
343
+ def self.inner_class_types
344
+ @inner_class_types = {
345
+ quote_details: QuoteDetails,
346
+ subscription_details: SubscriptionDetails,
347
+ }
348
+ end
349
+
350
+ def self.field_remappings
351
+ @field_remappings = {}
352
+ end
265
353
  end
266
354
 
267
355
  class PaymentSettings < Stripe::StripeObject
@@ -270,27 +358,67 @@ module Stripe
270
358
  class MandateOptions < Stripe::StripeObject
271
359
  # Transaction type of the mandate.
272
360
  attr_reader :transaction_type
361
+
362
+ def self.inner_class_types
363
+ @inner_class_types = {}
364
+ end
365
+
366
+ def self.field_remappings
367
+ @field_remappings = {}
368
+ end
273
369
  end
274
370
  # Attribute for field mandate_options
275
371
  attr_reader :mandate_options
276
372
  # Bank account verification method.
277
373
  attr_reader :verification_method
374
+
375
+ def self.inner_class_types
376
+ @inner_class_types = { mandate_options: MandateOptions }
377
+ end
378
+
379
+ def self.field_remappings
380
+ @field_remappings = {}
381
+ end
278
382
  end
279
383
 
280
384
  class Bancontact < Stripe::StripeObject
281
385
  # Preferred language of the Bancontact authorization page that the customer is redirected to.
282
386
  attr_reader :preferred_language
387
+
388
+ def self.inner_class_types
389
+ @inner_class_types = {}
390
+ end
391
+
392
+ def self.field_remappings
393
+ @field_remappings = {}
394
+ end
283
395
  end
284
396
 
285
397
  class Card < Stripe::StripeObject
286
398
  class Installments < Stripe::StripeObject
287
399
  # Whether Installments are enabled for this Invoice.
288
400
  attr_reader :enabled
401
+
402
+ def self.inner_class_types
403
+ @inner_class_types = {}
404
+ end
405
+
406
+ def self.field_remappings
407
+ @field_remappings = {}
408
+ end
289
409
  end
290
410
  # Attribute for field installments
291
411
  attr_reader :installments
292
412
  # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
293
413
  attr_reader :request_three_d_secure
414
+
415
+ def self.inner_class_types
416
+ @inner_class_types = { installments: Installments }
417
+ end
418
+
419
+ def self.field_remappings
420
+ @field_remappings = {}
421
+ end
294
422
  end
295
423
 
296
424
  class CustomerBalance < Stripe::StripeObject
@@ -298,4045 +426,380 @@ module Stripe
298
426
  class EuBankTransfer < Stripe::StripeObject
299
427
  # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
300
428
  attr_reader :country
429
+
430
+ def self.inner_class_types
431
+ @inner_class_types = {}
432
+ end
433
+
434
+ def self.field_remappings
435
+ @field_remappings = {}
436
+ end
301
437
  end
302
438
  # Attribute for field eu_bank_transfer
303
439
  attr_reader :eu_bank_transfer
304
440
  # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
305
441
  attr_reader :type
306
- end
307
- # Attribute for field bank_transfer
308
- attr_reader :bank_transfer
309
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
310
- attr_reader :funding_type
311
- end
312
-
313
- class IdBankTransfer < Stripe::StripeObject; end
314
- class Konbini < Stripe::StripeObject; end
315
- class SepaDebit < Stripe::StripeObject; end
316
-
317
- class Upi < Stripe::StripeObject
318
- class MandateOptions < Stripe::StripeObject
319
- # Amount to be charged for future payments.
320
- attr_reader :amount
321
- # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
322
- attr_reader :amount_type
323
- # A description of the mandate or subscription that is meant to be displayed to the customer.
324
- attr_reader :description
325
- # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
326
- attr_reader :end_date
327
- end
328
- # Attribute for field mandate_options
329
- attr_reader :mandate_options
330
- end
331
442
 
332
- class UsBankAccount < Stripe::StripeObject
333
- class FinancialConnections < Stripe::StripeObject
334
- class Filters < Stripe::StripeObject
335
- # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
336
- attr_reader :account_subcategories
337
- # The institution to use to filter for possible accounts to link.
338
- attr_reader :institution
443
+ def self.inner_class_types
444
+ @inner_class_types = { eu_bank_transfer: EuBankTransfer }
339
445
  end
340
- # Attribute for field filters
341
- attr_reader :filters
342
- # The list of permissions to request. The `payment_method` permission must be included.
343
- attr_reader :permissions
344
- # Data features requested to be retrieved upon account creation.
345
- attr_reader :prefetch
346
- end
347
- # Attribute for field financial_connections
348
- attr_reader :financial_connections
349
- # Bank account verification method.
350
- attr_reader :verification_method
351
- end
352
- # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
353
- attr_reader :acss_debit
354
- # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
355
- attr_reader :bancontact
356
- # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
357
- attr_reader :card
358
- # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
359
- attr_reader :customer_balance
360
- # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
361
- attr_reader :id_bank_transfer
362
- # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
363
- attr_reader :konbini
364
- # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
365
- attr_reader :sepa_debit
366
- # If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
367
- attr_reader :upi
368
- # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
369
- attr_reader :us_bank_account
370
- end
371
- # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
372
- attr_reader :default_mandate
373
- # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
374
- attr_reader :payment_method_options
375
- # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
376
- attr_reader :payment_method_types
377
- end
378
-
379
- class Rendering < Stripe::StripeObject
380
- class Pdf < Stripe::StripeObject
381
- # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
382
- attr_reader :page_size
383
- end
384
- # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
385
- attr_reader :amount_tax_display
386
- # Invoice pdf rendering options
387
- attr_reader :pdf
388
- # ID of the rendering template that the invoice is formatted by.
389
- attr_reader :template
390
- # Version of the rendering template that the invoice is using.
391
- attr_reader :template_version
392
- end
393
-
394
- class ShippingCost < Stripe::StripeObject
395
- class Tax < Stripe::StripeObject
396
- # Amount of tax applied for this rate.
397
- attr_reader :amount
398
- # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
399
- #
400
- # Related guide: [Tax rates](/billing/taxes/tax-rates)
401
- attr_reader :rate
402
- # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
403
- attr_reader :taxability_reason
404
- # The amount on which tax is calculated, in cents (or local equivalent).
405
- attr_reader :taxable_amount
406
- end
407
- # Total shipping cost before any taxes are applied.
408
- attr_reader :amount_subtotal
409
- # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
410
- attr_reader :amount_tax
411
- # Total shipping cost after taxes are applied.
412
- attr_reader :amount_total
413
- # The ID of the ShippingRate for this invoice.
414
- attr_reader :shipping_rate
415
- # The taxes applied to the shipping rate.
416
- attr_reader :taxes
417
- end
418
-
419
- class ShippingDetails < Stripe::StripeObject
420
- class Address < Stripe::StripeObject
421
- # City, district, suburb, town, or village.
422
- attr_reader :city
423
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
424
- attr_reader :country
425
- # Address line 1 (e.g., street, PO Box, or company name).
426
- attr_reader :line1
427
- # Address line 2 (e.g., apartment, suite, unit, or building).
428
- attr_reader :line2
429
- # ZIP or postal code.
430
- attr_reader :postal_code
431
- # State, county, province, or region.
432
- attr_reader :state
433
- end
434
- # Attribute for field address
435
- attr_reader :address
436
- # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
437
- attr_reader :carrier
438
- # Recipient name.
439
- attr_reader :name
440
- # Recipient phone (including extension).
441
- attr_reader :phone
442
- # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
443
- attr_reader :tracking_number
444
- end
445
-
446
- class StatusTransitions < Stripe::StripeObject
447
- # The time that the invoice draft was finalized.
448
- attr_reader :finalized_at
449
- # The time that the invoice was marked uncollectible.
450
- attr_reader :marked_uncollectible_at
451
- # The time that the invoice was paid.
452
- attr_reader :paid_at
453
- # The time that the invoice was voided.
454
- attr_reader :voided_at
455
- end
456
-
457
- class ThresholdReason < Stripe::StripeObject
458
- class ItemReason < Stripe::StripeObject
459
- # The IDs of the line items that triggered the threshold invoice.
460
- attr_reader :line_item_ids
461
- # The quantity threshold boundary that applied to the given line item.
462
- attr_reader :usage_gte
463
- end
464
- # The total invoice amount threshold boundary if it triggered the threshold invoice.
465
- attr_reader :amount_gte
466
- # Indicates which line items triggered a threshold invoice.
467
- attr_reader :item_reasons
468
- end
469
-
470
- class TotalDiscountAmount < Stripe::StripeObject
471
- # The amount, in cents (or local equivalent), of the discount.
472
- attr_reader :amount
473
- # The discount that was applied to get this discount amount.
474
- attr_reader :discount
475
- end
476
-
477
- class TotalMarginAmount < Stripe::StripeObject
478
- # The amount, in cents (or local equivalent), of the reduction in line item amount.
479
- attr_reader :amount
480
- # The margin that was applied to get this margin amount.
481
- attr_reader :margin
482
- end
483
-
484
- class TotalPretaxCreditAmount < Stripe::StripeObject
485
- # The amount, in cents (or local equivalent), of the pretax credit amount.
486
- attr_reader :amount
487
- # The credit balance transaction that was applied to get this pretax credit amount.
488
- attr_reader :credit_balance_transaction
489
- # The discount that was applied to get this pretax credit amount.
490
- attr_reader :discount
491
- # The margin that was applied to get this pretax credit amount.
492
- attr_reader :margin
493
- # Type of the pretax credit amount referenced.
494
- attr_reader :type
495
- end
496
446
 
497
- class TotalTax < Stripe::StripeObject
498
- class TaxRateDetails < Stripe::StripeObject
499
- # Attribute for field tax_rate
500
- attr_reader :tax_rate
501
- end
502
- # The amount of the tax, in cents (or local equivalent).
503
- attr_reader :amount
504
- # Whether this tax is inclusive or exclusive.
505
- attr_reader :tax_behavior
506
- # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
507
- attr_reader :tax_rate_details
508
- # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
509
- attr_reader :taxability_reason
510
- # The amount on which tax is calculated, in cents (or local equivalent).
511
- attr_reader :taxable_amount
512
- # The type of tax information.
513
- attr_reader :type
514
- end
515
-
516
- class DeleteParams < Stripe::RequestParams; end
517
-
518
- class UpdateParams < Stripe::RequestParams
519
- class AmountsDue < Stripe::RequestParams
520
- # The amount in cents (or local equivalent).
521
- attr_accessor :amount
522
- # Number of days from when invoice is finalized until the payment is due.
523
- attr_accessor :days_until_due
524
- # An arbitrary string attached to the object. Often useful for displaying to users.
525
- attr_accessor :description
526
- # Date on which a payment plan’s payment is due.
527
- attr_accessor :due_date
528
-
529
- def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
530
- @amount = amount
531
- @days_until_due = days_until_due
532
- @description = description
533
- @due_date = due_date
534
- end
535
- end
536
-
537
- class AutomaticTax < Stripe::RequestParams
538
- class Liability < Stripe::RequestParams
539
- # The connected account being referenced when `type` is `account`.
540
- attr_accessor :account
541
- # Type of the account referenced in the request.
542
- attr_accessor :type
543
-
544
- def initialize(account: nil, type: nil)
545
- @account = account
546
- @type = type
547
- end
548
- end
549
- # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
550
- attr_accessor :enabled
551
- # 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.
552
- attr_accessor :liability
553
-
554
- def initialize(enabled: nil, liability: nil)
555
- @enabled = enabled
556
- @liability = liability
557
- end
558
- end
559
-
560
- class CustomField < Stripe::RequestParams
561
- # The name of the custom field. This may be up to 40 characters.
562
- attr_accessor :name
563
- # The value of the custom field. This may be up to 140 characters.
564
- attr_accessor :value
565
-
566
- def initialize(name: nil, value: nil)
567
- @name = name
568
- @value = value
569
- end
570
- end
571
-
572
- class Discount < Stripe::RequestParams
573
- class DiscountEnd < Stripe::RequestParams
574
- class Duration < Stripe::RequestParams
575
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
576
- attr_accessor :interval
577
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
578
- attr_accessor :interval_count
579
-
580
- def initialize(interval: nil, interval_count: nil)
581
- @interval = interval
582
- @interval_count = interval_count
583
- end
584
- end
585
- # Time span for the redeemed discount.
586
- attr_accessor :duration
587
- # A precise Unix timestamp for the discount to end. Must be in the future.
588
- attr_accessor :timestamp
589
- # The type of calculation made to determine when the discount ends.
590
- attr_accessor :type
591
-
592
- def initialize(duration: nil, timestamp: nil, type: nil)
593
- @duration = duration
594
- @timestamp = timestamp
595
- @type = type
596
- end
597
- end
598
- # ID of the coupon to create a new discount for.
599
- attr_accessor :coupon
600
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
601
- attr_accessor :discount
602
- # Details to determine how long the discount should be applied for.
603
- attr_accessor :discount_end
604
- # ID of the promotion code to create a new discount for.
605
- attr_accessor :promotion_code
606
-
607
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
608
- @coupon = coupon
609
- @discount = discount
610
- @discount_end = discount_end
611
- @promotion_code = promotion_code
612
- end
613
- end
614
-
615
- class Issuer < Stripe::RequestParams
616
- # The connected account being referenced when `type` is `account`.
617
- attr_accessor :account
618
- # Type of the account referenced in the request.
619
- attr_accessor :type
620
-
621
- def initialize(account: nil, type: nil)
622
- @account = account
623
- @type = type
624
- end
625
- end
626
-
627
- class PaymentSettings < Stripe::RequestParams
628
- class PaymentMethodOptions < Stripe::RequestParams
629
- class AcssDebit < Stripe::RequestParams
630
- class MandateOptions < Stripe::RequestParams
631
- # Transaction type of the mandate.
632
- attr_accessor :transaction_type
633
-
634
- def initialize(transaction_type: nil)
635
- @transaction_type = transaction_type
636
- end
637
- end
638
- # Additional fields for Mandate creation
639
- attr_accessor :mandate_options
640
- # Verification method for the intent
641
- attr_accessor :verification_method
642
-
643
- def initialize(mandate_options: nil, verification_method: nil)
644
- @mandate_options = mandate_options
645
- @verification_method = verification_method
646
- end
647
- end
648
-
649
- class Bancontact < Stripe::RequestParams
650
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
651
- attr_accessor :preferred_language
652
-
653
- def initialize(preferred_language: nil)
654
- @preferred_language = preferred_language
655
- end
656
- end
657
-
658
- class Card < Stripe::RequestParams
659
- class Installments < Stripe::RequestParams
660
- class Plan < Stripe::RequestParams
661
- # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
662
- attr_accessor :count
663
- # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
664
- # One of `month`.
665
- attr_accessor :interval
666
- # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
667
- attr_accessor :type
668
-
669
- def initialize(count: nil, interval: nil, type: nil)
670
- @count = count
671
- @interval = interval
672
- @type = type
673
- end
674
- end
675
- # Setting to true enables installments for this invoice.
676
- # Setting to false will prevent any selected plan from applying to a payment.
677
- attr_accessor :enabled
678
- # The selected installment plan to use for this invoice.
679
- attr_accessor :plan
680
-
681
- def initialize(enabled: nil, plan: nil)
682
- @enabled = enabled
683
- @plan = plan
684
- end
685
- end
686
- # Installment configuration for payments attempted on this invoice.
687
- #
688
- # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
689
- attr_accessor :installments
690
- # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
691
- attr_accessor :request_three_d_secure
692
-
693
- def initialize(installments: nil, request_three_d_secure: nil)
694
- @installments = installments
695
- @request_three_d_secure = request_three_d_secure
696
- end
697
- end
698
-
699
- class CustomerBalance < Stripe::RequestParams
700
- class BankTransfer < Stripe::RequestParams
701
- class EuBankTransfer < Stripe::RequestParams
702
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
703
- attr_accessor :country
704
-
705
- def initialize(country: nil)
706
- @country = country
707
- end
708
- end
709
- # Configuration for eu_bank_transfer funding type.
710
- attr_accessor :eu_bank_transfer
711
- # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
712
- attr_accessor :type
713
-
714
- def initialize(eu_bank_transfer: nil, type: nil)
715
- @eu_bank_transfer = eu_bank_transfer
716
- @type = type
717
- end
718
- end
719
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
720
- attr_accessor :bank_transfer
721
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
722
- attr_accessor :funding_type
723
-
724
- def initialize(bank_transfer: nil, funding_type: nil)
725
- @bank_transfer = bank_transfer
726
- @funding_type = funding_type
727
- end
728
- end
729
-
730
- class IdBankTransfer < Stripe::RequestParams; end
731
- class Konbini < Stripe::RequestParams; end
732
- class SepaDebit < Stripe::RequestParams; end
733
-
734
- class Upi < Stripe::RequestParams
735
- class MandateOptions < Stripe::RequestParams
736
- # Amount to be charged for future payments.
737
- attr_accessor :amount
738
- # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
739
- attr_accessor :amount_type
740
- # A description of the mandate or subscription that is meant to be displayed to the customer.
741
- attr_accessor :description
742
- # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
743
- attr_accessor :end_date
744
-
745
- def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
746
- @amount = amount
747
- @amount_type = amount_type
748
- @description = description
749
- @end_date = end_date
750
- end
751
- end
752
- # Configuration options for setting up an eMandate
753
- attr_accessor :mandate_options
754
-
755
- def initialize(mandate_options: nil)
756
- @mandate_options = mandate_options
757
- end
758
- end
759
-
760
- class UsBankAccount < Stripe::RequestParams
761
- class FinancialConnections < Stripe::RequestParams
762
- class Filters < Stripe::RequestParams
763
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
764
- attr_accessor :account_subcategories
765
- # ID of the institution to use to filter for selectable accounts.
766
- attr_accessor :institution
767
-
768
- def initialize(account_subcategories: nil, institution: nil)
769
- @account_subcategories = account_subcategories
770
- @institution = institution
771
- end
772
- end
773
- # Provide filters for the linked accounts that the customer can select for the payment method.
774
- attr_accessor :filters
775
- # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
776
- attr_accessor :permissions
777
- # List of data features that you would like to retrieve upon account creation.
778
- attr_accessor :prefetch
779
-
780
- def initialize(filters: nil, permissions: nil, prefetch: nil)
781
- @filters = filters
782
- @permissions = permissions
783
- @prefetch = prefetch
784
- end
785
- end
786
- # Additional fields for Financial Connections Session creation
787
- attr_accessor :financial_connections
788
- # Verification method for the intent
789
- attr_accessor :verification_method
790
-
791
- def initialize(financial_connections: nil, verification_method: nil)
792
- @financial_connections = financial_connections
793
- @verification_method = verification_method
794
- end
795
- end
796
- # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
797
- attr_accessor :acss_debit
798
- # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
799
- attr_accessor :bancontact
800
- # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
801
- attr_accessor :card
802
- # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
803
- attr_accessor :customer_balance
804
- # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
805
- attr_accessor :id_bank_transfer
806
- # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
807
- attr_accessor :konbini
808
- # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
809
- attr_accessor :sepa_debit
810
- # If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
811
- attr_accessor :upi
812
- # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
813
- attr_accessor :us_bank_account
814
-
815
- def initialize(
816
- acss_debit: nil,
817
- bancontact: nil,
818
- card: nil,
819
- customer_balance: nil,
820
- id_bank_transfer: nil,
821
- konbini: nil,
822
- sepa_debit: nil,
823
- upi: nil,
824
- us_bank_account: nil
825
- )
826
- @acss_debit = acss_debit
827
- @bancontact = bancontact
828
- @card = card
829
- @customer_balance = customer_balance
830
- @id_bank_transfer = id_bank_transfer
831
- @konbini = konbini
832
- @sepa_debit = sepa_debit
833
- @upi = upi
834
- @us_bank_account = us_bank_account
835
- end
836
- end
837
- # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
838
- attr_accessor :default_mandate
839
- # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
840
- attr_accessor :payment_method_options
841
- # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
842
- attr_accessor :payment_method_types
843
-
844
- def initialize(default_mandate: nil, payment_method_options: nil, payment_method_types: nil)
845
- @default_mandate = default_mandate
846
- @payment_method_options = payment_method_options
847
- @payment_method_types = payment_method_types
848
- end
849
- end
850
-
851
- class Rendering < Stripe::RequestParams
852
- class Pdf < Stripe::RequestParams
853
- # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
854
- # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
855
- # Japanese locale and `letter` for customers with other locales.
856
- attr_accessor :page_size
857
-
858
- def initialize(page_size: nil)
859
- @page_size = page_size
860
- end
861
- end
862
- # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
863
- attr_accessor :amount_tax_display
864
- # Invoice pdf rendering options
865
- attr_accessor :pdf
866
- # ID of the invoice rendering template to use for this invoice.
867
- attr_accessor :template
868
- # The specific version of invoice rendering template to use for this invoice.
869
- attr_accessor :template_version
870
-
871
- def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil)
872
- @amount_tax_display = amount_tax_display
873
- @pdf = pdf
874
- @template = template
875
- @template_version = template_version
876
- end
877
- end
878
-
879
- class ShippingCost < Stripe::RequestParams
880
- class ShippingRateData < Stripe::RequestParams
881
- class DeliveryEstimate < Stripe::RequestParams
882
- class Maximum < Stripe::RequestParams
883
- # A unit of time.
884
- attr_accessor :unit
885
- # Must be greater than 0.
886
- attr_accessor :value
887
-
888
- def initialize(unit: nil, value: nil)
889
- @unit = unit
890
- @value = value
891
- end
892
- end
893
-
894
- class Minimum < Stripe::RequestParams
895
- # A unit of time.
896
- attr_accessor :unit
897
- # Must be greater than 0.
898
- attr_accessor :value
899
-
900
- def initialize(unit: nil, value: nil)
901
- @unit = unit
902
- @value = value
903
- end
904
- end
905
- # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
906
- attr_accessor :maximum
907
- # The lower bound of the estimated range. If empty, represents no lower bound.
908
- attr_accessor :minimum
909
-
910
- def initialize(maximum: nil, minimum: nil)
911
- @maximum = maximum
912
- @minimum = minimum
913
- end
914
- end
915
-
916
- class FixedAmount < Stripe::RequestParams
917
- class CurrencyOptions < Stripe::RequestParams
918
- # A non-negative integer in cents representing how much to charge.
919
- attr_accessor :amount
920
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
921
- attr_accessor :tax_behavior
922
-
923
- def initialize(amount: nil, tax_behavior: nil)
924
- @amount = amount
925
- @tax_behavior = tax_behavior
926
- end
927
- end
928
- # A non-negative integer in cents representing how much to charge.
929
- attr_accessor :amount
930
- # 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).
931
- attr_accessor :currency
932
- # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
933
- attr_accessor :currency_options
934
-
935
- def initialize(amount: nil, currency: nil, currency_options: nil)
936
- @amount = amount
937
- @currency = currency
938
- @currency_options = currency_options
939
- end
940
- end
941
- # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
942
- attr_accessor :delivery_estimate
943
- # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
944
- attr_accessor :display_name
945
- # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
946
- attr_accessor :fixed_amount
947
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
948
- attr_accessor :metadata
949
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
950
- attr_accessor :tax_behavior
951
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
952
- attr_accessor :tax_code
953
- # The type of calculation to use on the shipping rate.
954
- attr_accessor :type
955
-
956
- def initialize(
957
- delivery_estimate: nil,
958
- display_name: nil,
959
- fixed_amount: nil,
960
- metadata: nil,
961
- tax_behavior: nil,
962
- tax_code: nil,
963
- type: nil
964
- )
965
- @delivery_estimate = delivery_estimate
966
- @display_name = display_name
967
- @fixed_amount = fixed_amount
968
- @metadata = metadata
969
- @tax_behavior = tax_behavior
970
- @tax_code = tax_code
971
- @type = type
972
- end
973
- end
974
- # The ID of the shipping rate to use for this order.
975
- attr_accessor :shipping_rate
976
- # Parameters to create a new ad-hoc shipping rate for this order.
977
- attr_accessor :shipping_rate_data
978
-
979
- def initialize(shipping_rate: nil, shipping_rate_data: nil)
980
- @shipping_rate = shipping_rate
981
- @shipping_rate_data = shipping_rate_data
982
- end
983
- end
984
-
985
- class ShippingDetails < Stripe::RequestParams
986
- class Address < Stripe::RequestParams
987
- # City, district, suburb, town, or village.
988
- attr_accessor :city
989
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
990
- attr_accessor :country
991
- # Address line 1 (e.g., street, PO Box, or company name).
992
- attr_accessor :line1
993
- # Address line 2 (e.g., apartment, suite, unit, or building).
994
- attr_accessor :line2
995
- # ZIP or postal code.
996
- attr_accessor :postal_code
997
- # State, county, province, or region.
998
- attr_accessor :state
999
-
1000
- def initialize(
1001
- city: nil,
1002
- country: nil,
1003
- line1: nil,
1004
- line2: nil,
1005
- postal_code: nil,
1006
- state: nil
1007
- )
1008
- @city = city
1009
- @country = country
1010
- @line1 = line1
1011
- @line2 = line2
1012
- @postal_code = postal_code
1013
- @state = state
1014
- end
1015
- end
1016
- # Shipping address
1017
- attr_accessor :address
1018
- # Recipient name.
1019
- attr_accessor :name
1020
- # Recipient phone (including extension)
1021
- attr_accessor :phone
1022
-
1023
- def initialize(address: nil, name: nil, phone: nil)
1024
- @address = address
1025
- @name = name
1026
- @phone = phone
1027
- end
1028
- end
1029
-
1030
- class TransferData < Stripe::RequestParams
1031
- # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
1032
- attr_accessor :amount
1033
- # ID of an existing, connected Stripe account.
1034
- attr_accessor :destination
1035
-
1036
- def initialize(amount: nil, destination: nil)
1037
- @amount = amount
1038
- @destination = destination
1039
- end
1040
- end
1041
- # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
1042
- attr_accessor :account_tax_ids
1043
- # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
1044
- attr_accessor :amounts_due
1045
- # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
1046
- attr_accessor :application_fee_amount
1047
- # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice.
1048
- attr_accessor :auto_advance
1049
- # Settings for automatic tax lookup for this invoice.
1050
- attr_accessor :automatic_tax
1051
- # The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. To turn off automatic finalization, set `auto_advance` to false.
1052
- attr_accessor :automatically_finalizes_at
1053
- # Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices.
1054
- attr_accessor :collection_method
1055
- # A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields.
1056
- attr_accessor :custom_fields
1057
- # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
1058
- attr_accessor :days_until_due
1059
- # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
1060
- attr_accessor :default_margins
1061
- # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
1062
- attr_accessor :default_payment_method
1063
- # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
1064
- attr_accessor :default_source
1065
- # The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates.
1066
- attr_accessor :default_tax_rates
1067
- # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
1068
- attr_accessor :description
1069
- # The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts.
1070
- attr_accessor :discounts
1071
- # The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices.
1072
- attr_accessor :due_date
1073
- # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
1074
- attr_accessor :effective_at
1075
- # Specifies which fields in the response should be expanded.
1076
- attr_accessor :expand
1077
- # Footer to be displayed on the invoice.
1078
- attr_accessor :footer
1079
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1080
- attr_accessor :issuer
1081
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
1082
- attr_accessor :metadata
1083
- # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
1084
- attr_accessor :number
1085
- # 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://stripe.com/docs/billing/invoices/connect) documentation for details.
1086
- attr_accessor :on_behalf_of
1087
- # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
1088
- attr_accessor :payment_settings
1089
- # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
1090
- attr_accessor :rendering
1091
- # Settings for the cost of shipping for this invoice.
1092
- attr_accessor :shipping_cost
1093
- # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
1094
- attr_accessor :shipping_details
1095
- # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
1096
- attr_accessor :statement_descriptor
1097
- # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value.
1098
- attr_accessor :transfer_data
1099
-
1100
- def initialize(
1101
- account_tax_ids: nil,
1102
- amounts_due: nil,
1103
- application_fee_amount: nil,
1104
- auto_advance: nil,
1105
- automatic_tax: nil,
1106
- automatically_finalizes_at: nil,
1107
- collection_method: nil,
1108
- custom_fields: nil,
1109
- days_until_due: nil,
1110
- default_margins: nil,
1111
- default_payment_method: nil,
1112
- default_source: nil,
1113
- default_tax_rates: nil,
1114
- description: nil,
1115
- discounts: nil,
1116
- due_date: nil,
1117
- effective_at: nil,
1118
- expand: nil,
1119
- footer: nil,
1120
- issuer: nil,
1121
- metadata: nil,
1122
- number: nil,
1123
- on_behalf_of: nil,
1124
- payment_settings: nil,
1125
- rendering: nil,
1126
- shipping_cost: nil,
1127
- shipping_details: nil,
1128
- statement_descriptor: nil,
1129
- transfer_data: nil
1130
- )
1131
- @account_tax_ids = account_tax_ids
1132
- @amounts_due = amounts_due
1133
- @application_fee_amount = application_fee_amount
1134
- @auto_advance = auto_advance
1135
- @automatic_tax = automatic_tax
1136
- @automatically_finalizes_at = automatically_finalizes_at
1137
- @collection_method = collection_method
1138
- @custom_fields = custom_fields
1139
- @days_until_due = days_until_due
1140
- @default_margins = default_margins
1141
- @default_payment_method = default_payment_method
1142
- @default_source = default_source
1143
- @default_tax_rates = default_tax_rates
1144
- @description = description
1145
- @discounts = discounts
1146
- @due_date = due_date
1147
- @effective_at = effective_at
1148
- @expand = expand
1149
- @footer = footer
1150
- @issuer = issuer
1151
- @metadata = metadata
1152
- @number = number
1153
- @on_behalf_of = on_behalf_of
1154
- @payment_settings = payment_settings
1155
- @rendering = rendering
1156
- @shipping_cost = shipping_cost
1157
- @shipping_details = shipping_details
1158
- @statement_descriptor = statement_descriptor
1159
- @transfer_data = transfer_data
1160
- end
1161
- end
1162
-
1163
- class ListParams < Stripe::RequestParams
1164
- class Created < Stripe::RequestParams
1165
- # Minimum value to filter by (exclusive)
1166
- attr_accessor :gt
1167
- # Minimum value to filter by (inclusive)
1168
- attr_accessor :gte
1169
- # Maximum value to filter by (exclusive)
1170
- attr_accessor :lt
1171
- # Maximum value to filter by (inclusive)
1172
- attr_accessor :lte
1173
-
1174
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
1175
- @gt = gt
1176
- @gte = gte
1177
- @lt = lt
1178
- @lte = lte
1179
- end
1180
- end
1181
-
1182
- class DueDate < Stripe::RequestParams
1183
- # Minimum value to filter by (exclusive)
1184
- attr_accessor :gt
1185
- # Minimum value to filter by (inclusive)
1186
- attr_accessor :gte
1187
- # Maximum value to filter by (exclusive)
1188
- attr_accessor :lt
1189
- # Maximum value to filter by (inclusive)
1190
- attr_accessor :lte
1191
-
1192
- def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
1193
- @gt = gt
1194
- @gte = gte
1195
- @lt = lt
1196
- @lte = lte
1197
- end
1198
- end
1199
- # The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`.
1200
- attr_accessor :collection_method
1201
- # Only return invoices that were created during the given date interval.
1202
- attr_accessor :created
1203
- # Only return invoices for the customer specified by this customer ID.
1204
- attr_accessor :customer
1205
- # Only return invoices for the account specified by this account ID.
1206
- attr_accessor :customer_account
1207
- # Attribute for param field due_date
1208
- attr_accessor :due_date
1209
- # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
1210
- attr_accessor :ending_before
1211
- # Specifies which fields in the response should be expanded.
1212
- attr_accessor :expand
1213
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1214
- attr_accessor :limit
1215
- # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
1216
- attr_accessor :starting_after
1217
- # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
1218
- attr_accessor :status
1219
- # Only return invoices for the subscription specified by this subscription ID.
1220
- attr_accessor :subscription
1221
-
1222
- def initialize(
1223
- collection_method: nil,
1224
- created: nil,
1225
- customer: nil,
1226
- customer_account: nil,
1227
- due_date: nil,
1228
- ending_before: nil,
1229
- expand: nil,
1230
- limit: nil,
1231
- starting_after: nil,
1232
- status: nil,
1233
- subscription: nil
1234
- )
1235
- @collection_method = collection_method
1236
- @created = created
1237
- @customer = customer
1238
- @customer_account = customer_account
1239
- @due_date = due_date
1240
- @ending_before = ending_before
1241
- @expand = expand
1242
- @limit = limit
1243
- @starting_after = starting_after
1244
- @status = status
1245
- @subscription = subscription
1246
- end
1247
- end
1248
-
1249
- class CreateParams < Stripe::RequestParams
1250
- class AmountsDue < Stripe::RequestParams
1251
- # The amount in cents (or local equivalent).
1252
- attr_accessor :amount
1253
- # Number of days from when invoice is finalized until the payment is due.
1254
- attr_accessor :days_until_due
1255
- # An arbitrary string attached to the object. Often useful for displaying to users.
1256
- attr_accessor :description
1257
- # Date on which a payment plan’s payment is due.
1258
- attr_accessor :due_date
1259
-
1260
- def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil)
1261
- @amount = amount
1262
- @days_until_due = days_until_due
1263
- @description = description
1264
- @due_date = due_date
1265
- end
1266
- end
1267
-
1268
- class AutomaticTax < Stripe::RequestParams
1269
- class Liability < Stripe::RequestParams
1270
- # The connected account being referenced when `type` is `account`.
1271
- attr_accessor :account
1272
- # Type of the account referenced in the request.
1273
- attr_accessor :type
1274
-
1275
- def initialize(account: nil, type: nil)
1276
- @account = account
1277
- @type = type
1278
- end
1279
- end
1280
- # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
1281
- attr_accessor :enabled
1282
- # 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.
1283
- attr_accessor :liability
1284
-
1285
- def initialize(enabled: nil, liability: nil)
1286
- @enabled = enabled
1287
- @liability = liability
1288
- end
1289
- end
1290
-
1291
- class CustomField < Stripe::RequestParams
1292
- # The name of the custom field. This may be up to 40 characters.
1293
- attr_accessor :name
1294
- # The value of the custom field. This may be up to 140 characters.
1295
- attr_accessor :value
1296
-
1297
- def initialize(name: nil, value: nil)
1298
- @name = name
1299
- @value = value
1300
- end
1301
- end
1302
-
1303
- class Discount < Stripe::RequestParams
1304
- class DiscountEnd < Stripe::RequestParams
1305
- class Duration < Stripe::RequestParams
1306
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1307
- attr_accessor :interval
1308
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1309
- attr_accessor :interval_count
1310
-
1311
- def initialize(interval: nil, interval_count: nil)
1312
- @interval = interval
1313
- @interval_count = interval_count
1314
- end
1315
- end
1316
- # Time span for the redeemed discount.
1317
- attr_accessor :duration
1318
- # A precise Unix timestamp for the discount to end. Must be in the future.
1319
- attr_accessor :timestamp
1320
- # The type of calculation made to determine when the discount ends.
1321
- attr_accessor :type
1322
-
1323
- def initialize(duration: nil, timestamp: nil, type: nil)
1324
- @duration = duration
1325
- @timestamp = timestamp
1326
- @type = type
1327
- end
1328
- end
1329
- # ID of the coupon to create a new discount for.
1330
- attr_accessor :coupon
1331
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1332
- attr_accessor :discount
1333
- # Details to determine how long the discount should be applied for.
1334
- attr_accessor :discount_end
1335
- # ID of the promotion code to create a new discount for.
1336
- attr_accessor :promotion_code
1337
-
1338
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1339
- @coupon = coupon
1340
- @discount = discount
1341
- @discount_end = discount_end
1342
- @promotion_code = promotion_code
1343
- end
1344
- end
1345
-
1346
- class FromInvoice < Stripe::RequestParams
1347
- # The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted
1348
- attr_accessor :action
1349
- # The `id` of the invoice that will be cloned.
1350
- attr_accessor :invoice
1351
-
1352
- def initialize(action: nil, invoice: nil)
1353
- @action = action
1354
- @invoice = invoice
1355
- end
1356
- end
1357
-
1358
- class Issuer < Stripe::RequestParams
1359
- # The connected account being referenced when `type` is `account`.
1360
- attr_accessor :account
1361
- # Type of the account referenced in the request.
1362
- attr_accessor :type
1363
-
1364
- def initialize(account: nil, type: nil)
1365
- @account = account
1366
- @type = type
1367
- end
1368
- end
1369
-
1370
- class PaymentSettings < Stripe::RequestParams
1371
- class PaymentMethodOptions < Stripe::RequestParams
1372
- class AcssDebit < Stripe::RequestParams
1373
- class MandateOptions < Stripe::RequestParams
1374
- # Transaction type of the mandate.
1375
- attr_accessor :transaction_type
1376
-
1377
- def initialize(transaction_type: nil)
1378
- @transaction_type = transaction_type
1379
- end
1380
- end
1381
- # Additional fields for Mandate creation
1382
- attr_accessor :mandate_options
1383
- # Verification method for the intent
1384
- attr_accessor :verification_method
1385
-
1386
- def initialize(mandate_options: nil, verification_method: nil)
1387
- @mandate_options = mandate_options
1388
- @verification_method = verification_method
1389
- end
1390
- end
1391
-
1392
- class Bancontact < Stripe::RequestParams
1393
- # Preferred language of the Bancontact authorization page that the customer is redirected to.
1394
- attr_accessor :preferred_language
1395
-
1396
- def initialize(preferred_language: nil)
1397
- @preferred_language = preferred_language
1398
- end
1399
- end
1400
-
1401
- class Card < Stripe::RequestParams
1402
- class Installments < Stripe::RequestParams
1403
- class Plan < Stripe::RequestParams
1404
- # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card.
1405
- attr_accessor :count
1406
- # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
1407
- # One of `month`.
1408
- attr_accessor :interval
1409
- # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
1410
- attr_accessor :type
1411
-
1412
- def initialize(count: nil, interval: nil, type: nil)
1413
- @count = count
1414
- @interval = interval
1415
- @type = type
1416
- end
1417
- end
1418
- # Setting to true enables installments for this invoice.
1419
- # Setting to false will prevent any selected plan from applying to a payment.
1420
- attr_accessor :enabled
1421
- # The selected installment plan to use for this invoice.
1422
- attr_accessor :plan
1423
-
1424
- def initialize(enabled: nil, plan: nil)
1425
- @enabled = enabled
1426
- @plan = plan
1427
- end
1428
- end
1429
- # Installment configuration for payments attempted on this invoice.
1430
- #
1431
- # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
1432
- attr_accessor :installments
1433
- # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
1434
- attr_accessor :request_three_d_secure
1435
-
1436
- def initialize(installments: nil, request_three_d_secure: nil)
1437
- @installments = installments
1438
- @request_three_d_secure = request_three_d_secure
1439
- end
1440
- end
1441
-
1442
- class CustomerBalance < Stripe::RequestParams
1443
- class BankTransfer < Stripe::RequestParams
1444
- class EuBankTransfer < Stripe::RequestParams
1445
- # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
1446
- attr_accessor :country
1447
-
1448
- def initialize(country: nil)
1449
- @country = country
1450
- end
1451
- end
1452
- # Configuration for eu_bank_transfer funding type.
1453
- attr_accessor :eu_bank_transfer
1454
- # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
1455
- attr_accessor :type
1456
-
1457
- def initialize(eu_bank_transfer: nil, type: nil)
1458
- @eu_bank_transfer = eu_bank_transfer
1459
- @type = type
1460
- end
1461
- end
1462
- # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
1463
- attr_accessor :bank_transfer
1464
- # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
1465
- attr_accessor :funding_type
1466
-
1467
- def initialize(bank_transfer: nil, funding_type: nil)
1468
- @bank_transfer = bank_transfer
1469
- @funding_type = funding_type
1470
- end
1471
- end
1472
-
1473
- class IdBankTransfer < Stripe::RequestParams; end
1474
- class Konbini < Stripe::RequestParams; end
1475
- class SepaDebit < Stripe::RequestParams; end
1476
-
1477
- class Upi < Stripe::RequestParams
1478
- class MandateOptions < Stripe::RequestParams
1479
- # Amount to be charged for future payments.
1480
- attr_accessor :amount
1481
- # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
1482
- attr_accessor :amount_type
1483
- # A description of the mandate or subscription that is meant to be displayed to the customer.
1484
- attr_accessor :description
1485
- # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
1486
- attr_accessor :end_date
1487
-
1488
- def initialize(amount: nil, amount_type: nil, description: nil, end_date: nil)
1489
- @amount = amount
1490
- @amount_type = amount_type
1491
- @description = description
1492
- @end_date = end_date
1493
- end
1494
- end
1495
- # Configuration options for setting up an eMandate
1496
- attr_accessor :mandate_options
1497
-
1498
- def initialize(mandate_options: nil)
1499
- @mandate_options = mandate_options
1500
- end
1501
- end
1502
-
1503
- class UsBankAccount < Stripe::RequestParams
1504
- class FinancialConnections < Stripe::RequestParams
1505
- class Filters < Stripe::RequestParams
1506
- # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
1507
- attr_accessor :account_subcategories
1508
- # ID of the institution to use to filter for selectable accounts.
1509
- attr_accessor :institution
1510
-
1511
- def initialize(account_subcategories: nil, institution: nil)
1512
- @account_subcategories = account_subcategories
1513
- @institution = institution
1514
- end
1515
- end
1516
- # Provide filters for the linked accounts that the customer can select for the payment method.
1517
- attr_accessor :filters
1518
- # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
1519
- attr_accessor :permissions
1520
- # List of data features that you would like to retrieve upon account creation.
1521
- attr_accessor :prefetch
1522
-
1523
- def initialize(filters: nil, permissions: nil, prefetch: nil)
1524
- @filters = filters
1525
- @permissions = permissions
1526
- @prefetch = prefetch
1527
- end
1528
- end
1529
- # Additional fields for Financial Connections Session creation
1530
- attr_accessor :financial_connections
1531
- # Verification method for the intent
1532
- attr_accessor :verification_method
1533
-
1534
- def initialize(financial_connections: nil, verification_method: nil)
1535
- @financial_connections = financial_connections
1536
- @verification_method = verification_method
1537
- end
1538
- end
1539
- # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
1540
- attr_accessor :acss_debit
1541
- # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
1542
- attr_accessor :bancontact
1543
- # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
1544
- attr_accessor :card
1545
- # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
1546
- attr_accessor :customer_balance
1547
- # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent.
1548
- attr_accessor :id_bank_transfer
1549
- # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
1550
- attr_accessor :konbini
1551
- # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
1552
- attr_accessor :sepa_debit
1553
- # If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
1554
- attr_accessor :upi
1555
- # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
1556
- attr_accessor :us_bank_account
1557
-
1558
- def initialize(
1559
- acss_debit: nil,
1560
- bancontact: nil,
1561
- card: nil,
1562
- customer_balance: nil,
1563
- id_bank_transfer: nil,
1564
- konbini: nil,
1565
- sepa_debit: nil,
1566
- upi: nil,
1567
- us_bank_account: nil
1568
- )
1569
- @acss_debit = acss_debit
1570
- @bancontact = bancontact
1571
- @card = card
1572
- @customer_balance = customer_balance
1573
- @id_bank_transfer = id_bank_transfer
1574
- @konbini = konbini
1575
- @sepa_debit = sepa_debit
1576
- @upi = upi
1577
- @us_bank_account = us_bank_account
1578
- end
1579
- end
1580
- # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
1581
- attr_accessor :default_mandate
1582
- # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
1583
- attr_accessor :payment_method_options
1584
- # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
1585
- attr_accessor :payment_method_types
1586
-
1587
- def initialize(default_mandate: nil, payment_method_options: nil, payment_method_types: nil)
1588
- @default_mandate = default_mandate
1589
- @payment_method_options = payment_method_options
1590
- @payment_method_types = payment_method_types
1591
- end
1592
- end
1593
-
1594
- class Rendering < Stripe::RequestParams
1595
- class Pdf < Stripe::RequestParams
1596
- # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`.
1597
- # If set to `auto`, invoice PDF page size defaults to `a4` for customers with
1598
- # Japanese locale and `letter` for customers with other locales.
1599
- attr_accessor :page_size
1600
-
1601
- def initialize(page_size: nil)
1602
- @page_size = page_size
1603
- end
1604
- end
1605
- # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
1606
- attr_accessor :amount_tax_display
1607
- # Invoice pdf rendering options
1608
- attr_accessor :pdf
1609
- # ID of the invoice rendering template to use for this invoice.
1610
- attr_accessor :template
1611
- # The specific version of invoice rendering template to use for this invoice.
1612
- attr_accessor :template_version
1613
-
1614
- def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil)
1615
- @amount_tax_display = amount_tax_display
1616
- @pdf = pdf
1617
- @template = template
1618
- @template_version = template_version
1619
- end
1620
- end
1621
-
1622
- class ShippingCost < Stripe::RequestParams
1623
- class ShippingRateData < Stripe::RequestParams
1624
- class DeliveryEstimate < Stripe::RequestParams
1625
- class Maximum < Stripe::RequestParams
1626
- # A unit of time.
1627
- attr_accessor :unit
1628
- # Must be greater than 0.
1629
- attr_accessor :value
1630
-
1631
- def initialize(unit: nil, value: nil)
1632
- @unit = unit
1633
- @value = value
1634
- end
1635
- end
1636
-
1637
- class Minimum < Stripe::RequestParams
1638
- # A unit of time.
1639
- attr_accessor :unit
1640
- # Must be greater than 0.
1641
- attr_accessor :value
1642
-
1643
- def initialize(unit: nil, value: nil)
1644
- @unit = unit
1645
- @value = value
1646
- end
1647
- end
1648
- # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
1649
- attr_accessor :maximum
1650
- # The lower bound of the estimated range. If empty, represents no lower bound.
1651
- attr_accessor :minimum
1652
-
1653
- def initialize(maximum: nil, minimum: nil)
1654
- @maximum = maximum
1655
- @minimum = minimum
1656
- end
1657
- end
1658
-
1659
- class FixedAmount < Stripe::RequestParams
1660
- class CurrencyOptions < Stripe::RequestParams
1661
- # A non-negative integer in cents representing how much to charge.
1662
- attr_accessor :amount
1663
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1664
- attr_accessor :tax_behavior
1665
-
1666
- def initialize(amount: nil, tax_behavior: nil)
1667
- @amount = amount
1668
- @tax_behavior = tax_behavior
1669
- end
1670
- end
1671
- # A non-negative integer in cents representing how much to charge.
1672
- attr_accessor :amount
1673
- # 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).
1674
- attr_accessor :currency
1675
- # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
1676
- attr_accessor :currency_options
1677
-
1678
- def initialize(amount: nil, currency: nil, currency_options: nil)
1679
- @amount = amount
1680
- @currency = currency
1681
- @currency_options = currency_options
1682
- end
1683
- end
1684
- # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
1685
- attr_accessor :delivery_estimate
1686
- # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
1687
- attr_accessor :display_name
1688
- # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
1689
- attr_accessor :fixed_amount
1690
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
1691
- attr_accessor :metadata
1692
- # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
1693
- attr_accessor :tax_behavior
1694
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
1695
- attr_accessor :tax_code
1696
- # The type of calculation to use on the shipping rate.
1697
- attr_accessor :type
1698
-
1699
- def initialize(
1700
- delivery_estimate: nil,
1701
- display_name: nil,
1702
- fixed_amount: nil,
1703
- metadata: nil,
1704
- tax_behavior: nil,
1705
- tax_code: nil,
1706
- type: nil
1707
- )
1708
- @delivery_estimate = delivery_estimate
1709
- @display_name = display_name
1710
- @fixed_amount = fixed_amount
1711
- @metadata = metadata
1712
- @tax_behavior = tax_behavior
1713
- @tax_code = tax_code
1714
- @type = type
1715
- end
1716
- end
1717
- # The ID of the shipping rate to use for this order.
1718
- attr_accessor :shipping_rate
1719
- # Parameters to create a new ad-hoc shipping rate for this order.
1720
- attr_accessor :shipping_rate_data
1721
-
1722
- def initialize(shipping_rate: nil, shipping_rate_data: nil)
1723
- @shipping_rate = shipping_rate
1724
- @shipping_rate_data = shipping_rate_data
1725
- end
1726
- end
1727
-
1728
- class ShippingDetails < Stripe::RequestParams
1729
- class Address < Stripe::RequestParams
1730
- # City, district, suburb, town, or village.
1731
- attr_accessor :city
1732
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
1733
- attr_accessor :country
1734
- # Address line 1 (e.g., street, PO Box, or company name).
1735
- attr_accessor :line1
1736
- # Address line 2 (e.g., apartment, suite, unit, or building).
1737
- attr_accessor :line2
1738
- # ZIP or postal code.
1739
- attr_accessor :postal_code
1740
- # State, county, province, or region.
1741
- attr_accessor :state
1742
-
1743
- def initialize(
1744
- city: nil,
1745
- country: nil,
1746
- line1: nil,
1747
- line2: nil,
1748
- postal_code: nil,
1749
- state: nil
1750
- )
1751
- @city = city
1752
- @country = country
1753
- @line1 = line1
1754
- @line2 = line2
1755
- @postal_code = postal_code
1756
- @state = state
1757
- end
1758
- end
1759
- # Shipping address
1760
- attr_accessor :address
1761
- # Recipient name.
1762
- attr_accessor :name
1763
- # Recipient phone (including extension)
1764
- attr_accessor :phone
1765
-
1766
- def initialize(address: nil, name: nil, phone: nil)
1767
- @address = address
1768
- @name = name
1769
- @phone = phone
1770
- end
1771
- end
1772
-
1773
- class TransferData < Stripe::RequestParams
1774
- # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
1775
- attr_accessor :amount
1776
- # ID of an existing, connected Stripe account.
1777
- attr_accessor :destination
1778
-
1779
- def initialize(amount: nil, destination: nil)
1780
- @amount = amount
1781
- @destination = destination
1782
- end
1783
- end
1784
- # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
1785
- attr_accessor :account_tax_ids
1786
- # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`.
1787
- attr_accessor :amounts_due
1788
- # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees).
1789
- attr_accessor :application_fee_amount
1790
- # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. Defaults to false.
1791
- attr_accessor :auto_advance
1792
- # Settings for automatic tax lookup for this invoice.
1793
- attr_accessor :automatic_tax
1794
- # The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state.
1795
- attr_accessor :automatically_finalizes_at
1796
- # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`.
1797
- attr_accessor :collection_method
1798
- # The currency to create this invoice in. Defaults to that of `customer` if not specified.
1799
- attr_accessor :currency
1800
- # A list of up to 4 custom fields to be displayed on the invoice.
1801
- attr_accessor :custom_fields
1802
- # The ID of the customer who will be billed.
1803
- attr_accessor :customer
1804
- # The ID of the account who will be billed.
1805
- attr_accessor :customer_account
1806
- # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`.
1807
- attr_accessor :days_until_due
1808
- # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`.
1809
- attr_accessor :default_margins
1810
- # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
1811
- attr_accessor :default_payment_method
1812
- # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
1813
- attr_accessor :default_source
1814
- # The tax rates that will apply to any line item that does not have `tax_rates` set.
1815
- attr_accessor :default_tax_rates
1816
- # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
1817
- attr_accessor :description
1818
- # The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.
1819
- attr_accessor :discounts
1820
- # The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`.
1821
- attr_accessor :due_date
1822
- # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
1823
- attr_accessor :effective_at
1824
- # Specifies which fields in the response should be expanded.
1825
- attr_accessor :expand
1826
- # Footer to be displayed on the invoice.
1827
- attr_accessor :footer
1828
- # Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
1829
- attr_accessor :from_invoice
1830
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
1831
- attr_accessor :issuer
1832
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
1833
- attr_accessor :metadata
1834
- # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically.
1835
- attr_accessor :number
1836
- # 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://stripe.com/docs/billing/invoices/connect) documentation for details.
1837
- attr_accessor :on_behalf_of
1838
- # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
1839
- attr_accessor :payment_settings
1840
- # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
1841
- attr_accessor :pending_invoice_items_behavior
1842
- # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
1843
- attr_accessor :rendering
1844
- # Settings for the cost of shipping for this invoice.
1845
- attr_accessor :shipping_cost
1846
- # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer.
1847
- attr_accessor :shipping_details
1848
- # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
1849
- attr_accessor :statement_descriptor
1850
- # The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected.
1851
- attr_accessor :subscription
1852
- # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.
1853
- attr_accessor :transfer_data
1854
-
1855
- def initialize(
1856
- account_tax_ids: nil,
1857
- amounts_due: nil,
1858
- application_fee_amount: nil,
1859
- auto_advance: nil,
1860
- automatic_tax: nil,
1861
- automatically_finalizes_at: nil,
1862
- collection_method: nil,
1863
- currency: nil,
1864
- custom_fields: nil,
1865
- customer: nil,
1866
- customer_account: nil,
1867
- days_until_due: nil,
1868
- default_margins: nil,
1869
- default_payment_method: nil,
1870
- default_source: nil,
1871
- default_tax_rates: nil,
1872
- description: nil,
1873
- discounts: nil,
1874
- due_date: nil,
1875
- effective_at: nil,
1876
- expand: nil,
1877
- footer: nil,
1878
- from_invoice: nil,
1879
- issuer: nil,
1880
- metadata: nil,
1881
- number: nil,
1882
- on_behalf_of: nil,
1883
- payment_settings: nil,
1884
- pending_invoice_items_behavior: nil,
1885
- rendering: nil,
1886
- shipping_cost: nil,
1887
- shipping_details: nil,
1888
- statement_descriptor: nil,
1889
- subscription: nil,
1890
- transfer_data: nil
1891
- )
1892
- @account_tax_ids = account_tax_ids
1893
- @amounts_due = amounts_due
1894
- @application_fee_amount = application_fee_amount
1895
- @auto_advance = auto_advance
1896
- @automatic_tax = automatic_tax
1897
- @automatically_finalizes_at = automatically_finalizes_at
1898
- @collection_method = collection_method
1899
- @currency = currency
1900
- @custom_fields = custom_fields
1901
- @customer = customer
1902
- @customer_account = customer_account
1903
- @days_until_due = days_until_due
1904
- @default_margins = default_margins
1905
- @default_payment_method = default_payment_method
1906
- @default_source = default_source
1907
- @default_tax_rates = default_tax_rates
1908
- @description = description
1909
- @discounts = discounts
1910
- @due_date = due_date
1911
- @effective_at = effective_at
1912
- @expand = expand
1913
- @footer = footer
1914
- @from_invoice = from_invoice
1915
- @issuer = issuer
1916
- @metadata = metadata
1917
- @number = number
1918
- @on_behalf_of = on_behalf_of
1919
- @payment_settings = payment_settings
1920
- @pending_invoice_items_behavior = pending_invoice_items_behavior
1921
- @rendering = rendering
1922
- @shipping_cost = shipping_cost
1923
- @shipping_details = shipping_details
1924
- @statement_descriptor = statement_descriptor
1925
- @subscription = subscription
1926
- @transfer_data = transfer_data
1927
- end
1928
- end
1929
-
1930
- class SearchParams < Stripe::RequestParams
1931
- # Specifies which fields in the response should be expanded.
1932
- attr_accessor :expand
1933
- # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
1934
- attr_accessor :limit
1935
- # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
1936
- attr_accessor :page
1937
- # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices).
1938
- attr_accessor :query
1939
-
1940
- def initialize(expand: nil, limit: nil, page: nil, query: nil)
1941
- @expand = expand
1942
- @limit = limit
1943
- @page = page
1944
- @query = query
1945
- end
1946
- end
1947
-
1948
- class AddLinesParams < Stripe::RequestParams
1949
- class Line < Stripe::RequestParams
1950
- class Discount < Stripe::RequestParams
1951
- class DiscountEnd < Stripe::RequestParams
1952
- class Duration < Stripe::RequestParams
1953
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
1954
- attr_accessor :interval
1955
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
1956
- attr_accessor :interval_count
1957
-
1958
- def initialize(interval: nil, interval_count: nil)
1959
- @interval = interval
1960
- @interval_count = interval_count
1961
- end
1962
- end
1963
- # Time span for the redeemed discount.
1964
- attr_accessor :duration
1965
- # A precise Unix timestamp for the discount to end. Must be in the future.
1966
- attr_accessor :timestamp
1967
- # The type of calculation made to determine when the discount ends.
1968
- attr_accessor :type
1969
-
1970
- def initialize(duration: nil, timestamp: nil, type: nil)
1971
- @duration = duration
1972
- @timestamp = timestamp
1973
- @type = type
1974
- end
1975
- end
1976
- # ID of the coupon to create a new discount for.
1977
- attr_accessor :coupon
1978
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
1979
- attr_accessor :discount
1980
- # Details to determine how long the discount should be applied for.
1981
- attr_accessor :discount_end
1982
- # ID of the promotion code to create a new discount for.
1983
- attr_accessor :promotion_code
1984
-
1985
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
1986
- @coupon = coupon
1987
- @discount = discount
1988
- @discount_end = discount_end
1989
- @promotion_code = promotion_code
1990
- end
1991
- end
1992
-
1993
- class Period < Stripe::RequestParams
1994
- # The end of the period, which must be greater than or equal to the start. This value is inclusive.
1995
- attr_accessor :end
1996
- # The start of the period. This value is inclusive.
1997
- attr_accessor :start
1998
-
1999
- def initialize(end_: nil, start: nil)
2000
- @end = end_
2001
- @start = start
2002
- end
2003
- end
2004
-
2005
- class PriceData < Stripe::RequestParams
2006
- class ProductData < Stripe::RequestParams
2007
- # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
2008
- attr_accessor :description
2009
- # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
2010
- attr_accessor :images
2011
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2012
- attr_accessor :metadata
2013
- # The product's name, meant to be displayable to the customer.
2014
- attr_accessor :name
2015
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
2016
- attr_accessor :tax_code
2017
-
2018
- def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
2019
- @description = description
2020
- @images = images
2021
- @metadata = metadata
2022
- @name = name
2023
- @tax_code = tax_code
2024
- end
2025
- end
2026
- # 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).
2027
- attr_accessor :currency
2028
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
2029
- attr_accessor :product
2030
- # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
2031
- attr_accessor :product_data
2032
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
2033
- attr_accessor :tax_behavior
2034
- # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
2035
- attr_accessor :unit_amount
2036
- # 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.
2037
- attr_accessor :unit_amount_decimal
2038
-
2039
- def initialize(
2040
- currency: nil,
2041
- product: nil,
2042
- product_data: nil,
2043
- tax_behavior: nil,
2044
- unit_amount: nil,
2045
- unit_amount_decimal: nil
2046
- )
2047
- @currency = currency
2048
- @product = product
2049
- @product_data = product_data
2050
- @tax_behavior = tax_behavior
2051
- @unit_amount = unit_amount
2052
- @unit_amount_decimal = unit_amount_decimal
2053
- end
2054
- end
2055
-
2056
- class Pricing < Stripe::RequestParams
2057
- # The ID of the price object.
2058
- attr_accessor :price
2059
-
2060
- def initialize(price: nil)
2061
- @price = price
2062
- end
2063
- end
2064
-
2065
- class TaxAmount < Stripe::RequestParams
2066
- class TaxRateData < Stripe::RequestParams
2067
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2068
- attr_accessor :country
2069
- # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
2070
- attr_accessor :description
2071
- # The display name of the tax rate, which will be shown to users.
2072
- attr_accessor :display_name
2073
- # This specifies if the tax rate is inclusive or exclusive.
2074
- attr_accessor :inclusive
2075
- # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
2076
- attr_accessor :jurisdiction
2077
- # The level of the jurisdiction that imposes this tax rate.
2078
- attr_accessor :jurisdiction_level
2079
- # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
2080
- attr_accessor :percentage
2081
- # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
2082
- attr_accessor :state
2083
- # The high-level tax type, such as `vat` or `sales_tax`.
2084
- attr_accessor :tax_type
2085
-
2086
- def initialize(
2087
- country: nil,
2088
- description: nil,
2089
- display_name: nil,
2090
- inclusive: nil,
2091
- jurisdiction: nil,
2092
- jurisdiction_level: nil,
2093
- percentage: nil,
2094
- state: nil,
2095
- tax_type: nil
2096
- )
2097
- @country = country
2098
- @description = description
2099
- @display_name = display_name
2100
- @inclusive = inclusive
2101
- @jurisdiction = jurisdiction
2102
- @jurisdiction_level = jurisdiction_level
2103
- @percentage = percentage
2104
- @state = state
2105
- @tax_type = tax_type
2106
- end
2107
- end
2108
- # The amount, in cents (or local equivalent), of the tax.
2109
- attr_accessor :amount
2110
- # Data to find or create a TaxRate object.
2111
- #
2112
- # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
2113
- attr_accessor :tax_rate_data
2114
- # The reasoning behind this tax, for example, if the product is tax exempt.
2115
- attr_accessor :taxability_reason
2116
- # The amount on which tax is calculated, in cents (or local equivalent).
2117
- attr_accessor :taxable_amount
2118
-
2119
- def initialize(
2120
- amount: nil,
2121
- tax_rate_data: nil,
2122
- taxability_reason: nil,
2123
- taxable_amount: nil
2124
- )
2125
- @amount = amount
2126
- @tax_rate_data = tax_rate_data
2127
- @taxability_reason = taxability_reason
2128
- @taxable_amount = taxable_amount
2129
- end
2130
- end
2131
- # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
2132
- attr_accessor :amount
2133
- # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
2134
- attr_accessor :description
2135
- # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
2136
- attr_accessor :discountable
2137
- # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
2138
- attr_accessor :discounts
2139
- # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created.
2140
- attr_accessor :invoice_item
2141
- # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
2142
- attr_accessor :margins
2143
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2144
- attr_accessor :metadata
2145
- # 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://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
2146
- attr_accessor :period
2147
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
2148
- attr_accessor :price_data
2149
- # The pricing information for the invoice item.
2150
- attr_accessor :pricing
2151
- # Non-negative integer. The quantity of units for the line item.
2152
- attr_accessor :quantity
2153
- # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
2154
- attr_accessor :tax_amounts
2155
- # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
2156
- attr_accessor :tax_rates
2157
-
2158
- def initialize(
2159
- amount: nil,
2160
- description: nil,
2161
- discountable: nil,
2162
- discounts: nil,
2163
- invoice_item: nil,
2164
- margins: nil,
2165
- metadata: nil,
2166
- period: nil,
2167
- price_data: nil,
2168
- pricing: nil,
2169
- quantity: nil,
2170
- tax_amounts: nil,
2171
- tax_rates: nil
2172
- )
2173
- @amount = amount
2174
- @description = description
2175
- @discountable = discountable
2176
- @discounts = discounts
2177
- @invoice_item = invoice_item
2178
- @margins = margins
2179
- @metadata = metadata
2180
- @period = period
2181
- @price_data = price_data
2182
- @pricing = pricing
2183
- @quantity = quantity
2184
- @tax_amounts = tax_amounts
2185
- @tax_rates = tax_rates
2186
- end
2187
- end
2188
- # Specifies which fields in the response should be expanded.
2189
- attr_accessor :expand
2190
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2191
- attr_accessor :invoice_metadata
2192
- # The line items to add.
2193
- attr_accessor :lines
2194
-
2195
- def initialize(expand: nil, invoice_metadata: nil, lines: nil)
2196
- @expand = expand
2197
- @invoice_metadata = invoice_metadata
2198
- @lines = lines
2199
- end
2200
- end
2201
-
2202
- class AttachPaymentParams < Stripe::RequestParams
2203
- class PaymentRecordData < Stripe::RequestParams
2204
- # The amount that was paid out of band.
2205
- attr_accessor :amount
2206
- # The currency that was paid out of band.
2207
- attr_accessor :currency
2208
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2209
- attr_accessor :metadata
2210
- # The type of money movement for this out of band payment record.
2211
- attr_accessor :money_movement_type
2212
- # The timestamp when this out of band payment was paid.
2213
- attr_accessor :paid_at
2214
- # The reference for this out of band payment record.
2215
- attr_accessor :payment_reference
2216
-
2217
- def initialize(
2218
- amount: nil,
2219
- currency: nil,
2220
- metadata: nil,
2221
- money_movement_type: nil,
2222
- paid_at: nil,
2223
- payment_reference: nil
2224
- )
2225
- @amount = amount
2226
- @currency = currency
2227
- @metadata = metadata
2228
- @money_movement_type = money_movement_type
2229
- @paid_at = paid_at
2230
- @payment_reference = payment_reference
2231
- end
2232
- end
2233
- # The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount.
2234
- attr_accessor :amount_requested
2235
- # Specifies which fields in the response should be expanded.
2236
- attr_accessor :expand
2237
- # The ID of the PaymentIntent to attach to the invoice.
2238
- attr_accessor :payment_intent
2239
- # The ID of the PaymentRecord to attach to the invoice.
2240
- attr_accessor :payment_record
2241
- # The PaymentRecord data for attaching an out of band payment to the invoice.
2242
- attr_accessor :payment_record_data
2243
-
2244
- def initialize(
2245
- amount_requested: nil,
2246
- expand: nil,
2247
- payment_intent: nil,
2248
- payment_record: nil,
2249
- payment_record_data: nil
2250
- )
2251
- @amount_requested = amount_requested
2252
- @expand = expand
2253
- @payment_intent = payment_intent
2254
- @payment_record = payment_record
2255
- @payment_record_data = payment_record_data
2256
- end
2257
- end
2258
-
2259
- class FinalizeInvoiceParams < Stripe::RequestParams
2260
- # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
2261
- attr_accessor :auto_advance
2262
- # Specifies which fields in the response should be expanded.
2263
- attr_accessor :expand
2264
-
2265
- def initialize(auto_advance: nil, expand: nil)
2266
- @auto_advance = auto_advance
2267
- @expand = expand
2268
- end
2269
- end
2270
-
2271
- class MarkUncollectibleParams < Stripe::RequestParams
2272
- # Specifies which fields in the response should be expanded.
2273
- attr_accessor :expand
2274
-
2275
- def initialize(expand: nil)
2276
- @expand = expand
2277
- end
2278
- end
2279
-
2280
- class PayParams < Stripe::RequestParams
2281
- # Specifies which fields in the response should be expanded.
2282
- attr_accessor :expand
2283
- # In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.
2284
- #
2285
- # Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.
2286
- attr_accessor :forgive
2287
- # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.
2288
- attr_accessor :mandate
2289
- # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
2290
- attr_accessor :off_session
2291
- # Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.
2292
- attr_accessor :paid_out_of_band
2293
- # A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
2294
- attr_accessor :payment_method
2295
- # A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.
2296
- attr_accessor :source
2297
-
2298
- def initialize(
2299
- expand: nil,
2300
- forgive: nil,
2301
- mandate: nil,
2302
- off_session: nil,
2303
- paid_out_of_band: nil,
2304
- payment_method: nil,
2305
- source: nil
2306
- )
2307
- @expand = expand
2308
- @forgive = forgive
2309
- @mandate = mandate
2310
- @off_session = off_session
2311
- @paid_out_of_band = paid_out_of_band
2312
- @payment_method = payment_method
2313
- @source = source
2314
- end
2315
- end
2316
-
2317
- class RemoveLinesParams < Stripe::RequestParams
2318
- class Line < Stripe::RequestParams
2319
- # Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice.
2320
- attr_accessor :behavior
2321
- # ID of an existing line item to remove from this invoice.
2322
- attr_accessor :id
2323
-
2324
- def initialize(behavior: nil, id: nil)
2325
- @behavior = behavior
2326
- @id = id
2327
- end
2328
- end
2329
- # Specifies which fields in the response should be expanded.
2330
- attr_accessor :expand
2331
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2332
- attr_accessor :invoice_metadata
2333
- # The line items to remove.
2334
- attr_accessor :lines
2335
-
2336
- def initialize(expand: nil, invoice_metadata: nil, lines: nil)
2337
- @expand = expand
2338
- @invoice_metadata = invoice_metadata
2339
- @lines = lines
2340
- end
2341
- end
2342
-
2343
- class SendInvoiceParams < Stripe::RequestParams
2344
- # Specifies which fields in the response should be expanded.
2345
- attr_accessor :expand
2346
-
2347
- def initialize(expand: nil)
2348
- @expand = expand
2349
- end
2350
- end
2351
-
2352
- class UpdateLinesParams < Stripe::RequestParams
2353
- class Line < Stripe::RequestParams
2354
- class Discount < Stripe::RequestParams
2355
- class DiscountEnd < Stripe::RequestParams
2356
- class Duration < Stripe::RequestParams
2357
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2358
- attr_accessor :interval
2359
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2360
- attr_accessor :interval_count
2361
-
2362
- def initialize(interval: nil, interval_count: nil)
2363
- @interval = interval
2364
- @interval_count = interval_count
2365
- end
2366
- end
2367
- # Time span for the redeemed discount.
2368
- attr_accessor :duration
2369
- # A precise Unix timestamp for the discount to end. Must be in the future.
2370
- attr_accessor :timestamp
2371
- # The type of calculation made to determine when the discount ends.
2372
- attr_accessor :type
2373
-
2374
- def initialize(duration: nil, timestamp: nil, type: nil)
2375
- @duration = duration
2376
- @timestamp = timestamp
2377
- @type = type
2378
- end
2379
- end
2380
- # ID of the coupon to create a new discount for.
2381
- attr_accessor :coupon
2382
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2383
- attr_accessor :discount
2384
- # Details to determine how long the discount should be applied for.
2385
- attr_accessor :discount_end
2386
- # ID of the promotion code to create a new discount for.
2387
- attr_accessor :promotion_code
2388
-
2389
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2390
- @coupon = coupon
2391
- @discount = discount
2392
- @discount_end = discount_end
2393
- @promotion_code = promotion_code
2394
- end
2395
- end
2396
-
2397
- class Period < Stripe::RequestParams
2398
- # The end of the period, which must be greater than or equal to the start. This value is inclusive.
2399
- attr_accessor :end
2400
- # The start of the period. This value is inclusive.
2401
- attr_accessor :start
2402
-
2403
- def initialize(end_: nil, start: nil)
2404
- @end = end_
2405
- @start = start
2406
- end
2407
- end
2408
-
2409
- class PriceData < Stripe::RequestParams
2410
- class ProductData < Stripe::RequestParams
2411
- # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
2412
- attr_accessor :description
2413
- # A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
2414
- attr_accessor :images
2415
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2416
- attr_accessor :metadata
2417
- # The product's name, meant to be displayable to the customer.
2418
- attr_accessor :name
2419
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
2420
- attr_accessor :tax_code
2421
-
2422
- def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
2423
- @description = description
2424
- @images = images
2425
- @metadata = metadata
2426
- @name = name
2427
- @tax_code = tax_code
2428
- end
2429
- end
2430
- # 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).
2431
- attr_accessor :currency
2432
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
2433
- attr_accessor :product
2434
- # Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
2435
- attr_accessor :product_data
2436
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
2437
- attr_accessor :tax_behavior
2438
- # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
2439
- attr_accessor :unit_amount
2440
- # 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.
2441
- attr_accessor :unit_amount_decimal
2442
-
2443
- def initialize(
2444
- currency: nil,
2445
- product: nil,
2446
- product_data: nil,
2447
- tax_behavior: nil,
2448
- unit_amount: nil,
2449
- unit_amount_decimal: nil
2450
- )
2451
- @currency = currency
2452
- @product = product
2453
- @product_data = product_data
2454
- @tax_behavior = tax_behavior
2455
- @unit_amount = unit_amount
2456
- @unit_amount_decimal = unit_amount_decimal
2457
- end
2458
- end
2459
-
2460
- class Pricing < Stripe::RequestParams
2461
- # The ID of the price object.
2462
- attr_accessor :price
2463
-
2464
- def initialize(price: nil)
2465
- @price = price
2466
- end
2467
- end
2468
-
2469
- class TaxAmount < Stripe::RequestParams
2470
- class TaxRateData < Stripe::RequestParams
2471
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2472
- attr_accessor :country
2473
- # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
2474
- attr_accessor :description
2475
- # The display name of the tax rate, which will be shown to users.
2476
- attr_accessor :display_name
2477
- # This specifies if the tax rate is inclusive or exclusive.
2478
- attr_accessor :inclusive
2479
- # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
2480
- attr_accessor :jurisdiction
2481
- # The level of the jurisdiction that imposes this tax rate.
2482
- attr_accessor :jurisdiction_level
2483
- # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
2484
- attr_accessor :percentage
2485
- # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
2486
- attr_accessor :state
2487
- # The high-level tax type, such as `vat` or `sales_tax`.
2488
- attr_accessor :tax_type
2489
-
2490
- def initialize(
2491
- country: nil,
2492
- description: nil,
2493
- display_name: nil,
2494
- inclusive: nil,
2495
- jurisdiction: nil,
2496
- jurisdiction_level: nil,
2497
- percentage: nil,
2498
- state: nil,
2499
- tax_type: nil
2500
- )
2501
- @country = country
2502
- @description = description
2503
- @display_name = display_name
2504
- @inclusive = inclusive
2505
- @jurisdiction = jurisdiction
2506
- @jurisdiction_level = jurisdiction_level
2507
- @percentage = percentage
2508
- @state = state
2509
- @tax_type = tax_type
2510
- end
2511
- end
2512
- # The amount, in cents (or local equivalent), of the tax.
2513
- attr_accessor :amount
2514
- # Data to find or create a TaxRate object.
2515
- #
2516
- # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
2517
- attr_accessor :tax_rate_data
2518
- # The reasoning behind this tax, for example, if the product is tax exempt.
2519
- attr_accessor :taxability_reason
2520
- # The amount on which tax is calculated, in cents (or local equivalent).
2521
- attr_accessor :taxable_amount
2522
-
2523
- def initialize(
2524
- amount: nil,
2525
- tax_rate_data: nil,
2526
- taxability_reason: nil,
2527
- taxable_amount: nil
2528
- )
2529
- @amount = amount
2530
- @tax_rate_data = tax_rate_data
2531
- @taxability_reason = taxability_reason
2532
- @taxable_amount = taxable_amount
2533
- end
2534
- end
2535
- # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
2536
- attr_accessor :amount
2537
- # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
2538
- attr_accessor :description
2539
- # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
2540
- attr_accessor :discountable
2541
- # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
2542
- attr_accessor :discounts
2543
- # ID of an existing line item on the invoice.
2544
- attr_accessor :id
2545
- # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
2546
- attr_accessor :margins
2547
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
2548
- attr_accessor :metadata
2549
- # 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://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
2550
- attr_accessor :period
2551
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
2552
- attr_accessor :price_data
2553
- # The pricing information for the invoice item.
2554
- attr_accessor :pricing
2555
- # Non-negative integer. The quantity of units for the line item.
2556
- attr_accessor :quantity
2557
- # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
2558
- attr_accessor :tax_amounts
2559
- # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
2560
- attr_accessor :tax_rates
2561
-
2562
- def initialize(
2563
- amount: nil,
2564
- description: nil,
2565
- discountable: nil,
2566
- discounts: nil,
2567
- id: nil,
2568
- margins: nil,
2569
- metadata: nil,
2570
- period: nil,
2571
- price_data: nil,
2572
- pricing: nil,
2573
- quantity: nil,
2574
- tax_amounts: nil,
2575
- tax_rates: nil
2576
- )
2577
- @amount = amount
2578
- @description = description
2579
- @discountable = discountable
2580
- @discounts = discounts
2581
- @id = id
2582
- @margins = margins
2583
- @metadata = metadata
2584
- @period = period
2585
- @price_data = price_data
2586
- @pricing = pricing
2587
- @quantity = quantity
2588
- @tax_amounts = tax_amounts
2589
- @tax_rates = tax_rates
2590
- end
2591
- end
2592
- # Specifies which fields in the response should be expanded.
2593
- attr_accessor :expand
2594
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
2595
- attr_accessor :invoice_metadata
2596
- # The line items to update.
2597
- attr_accessor :lines
2598
-
2599
- def initialize(expand: nil, invoice_metadata: nil, lines: nil)
2600
- @expand = expand
2601
- @invoice_metadata = invoice_metadata
2602
- @lines = lines
2603
- end
2604
- end
2605
-
2606
- class VoidInvoiceParams < Stripe::RequestParams
2607
- # Specifies which fields in the response should be expanded.
2608
- attr_accessor :expand
2609
-
2610
- def initialize(expand: nil)
2611
- @expand = expand
2612
- end
2613
- end
2614
-
2615
- class CreatePreviewParams < Stripe::RequestParams
2616
- class AutomaticTax < Stripe::RequestParams
2617
- class Liability < Stripe::RequestParams
2618
- # The connected account being referenced when `type` is `account`.
2619
- attr_accessor :account
2620
- # Type of the account referenced in the request.
2621
- attr_accessor :type
2622
-
2623
- def initialize(account: nil, type: nil)
2624
- @account = account
2625
- @type = type
2626
- end
2627
- end
2628
- # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
2629
- attr_accessor :enabled
2630
- # 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.
2631
- attr_accessor :liability
2632
-
2633
- def initialize(enabled: nil, liability: nil)
2634
- @enabled = enabled
2635
- @liability = liability
2636
- end
2637
- end
2638
-
2639
- class CustomerDetails < Stripe::RequestParams
2640
- class Address < Stripe::RequestParams
2641
- # City, district, suburb, town, or village.
2642
- attr_accessor :city
2643
- # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
2644
- attr_accessor :country
2645
- # Address line 1 (e.g., street, PO Box, or company name).
2646
- attr_accessor :line1
2647
- # Address line 2 (e.g., apartment, suite, unit, or building).
2648
- attr_accessor :line2
2649
- # ZIP or postal code.
2650
- attr_accessor :postal_code
2651
- # State, county, province, or region.
2652
- attr_accessor :state
2653
-
2654
- def initialize(
2655
- city: nil,
2656
- country: nil,
2657
- line1: nil,
2658
- line2: nil,
2659
- postal_code: nil,
2660
- state: nil
2661
- )
2662
- @city = city
2663
- @country = country
2664
- @line1 = line1
2665
- @line2 = line2
2666
- @postal_code = postal_code
2667
- @state = state
2668
- end
2669
- end
2670
-
2671
- class Shipping < Stripe::RequestParams
2672
- class Address < Stripe::RequestParams
2673
- # City, district, suburb, town, or village.
2674
- attr_accessor :city
2675
- # 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)).
2676
- attr_accessor :country
2677
- # Address line 1 (e.g., street, PO Box, or company name).
2678
- attr_accessor :line1
2679
- # Address line 2 (e.g., apartment, suite, unit, or building).
2680
- attr_accessor :line2
2681
- # ZIP or postal code.
2682
- attr_accessor :postal_code
2683
- # State, county, province, or region.
2684
- attr_accessor :state
2685
-
2686
- def initialize(
2687
- city: nil,
2688
- country: nil,
2689
- line1: nil,
2690
- line2: nil,
2691
- postal_code: nil,
2692
- state: nil
2693
- )
2694
- @city = city
2695
- @country = country
2696
- @line1 = line1
2697
- @line2 = line2
2698
- @postal_code = postal_code
2699
- @state = state
2700
- end
2701
- end
2702
- # Customer shipping address.
2703
- attr_accessor :address
2704
- # Customer name.
2705
- attr_accessor :name
2706
- # Customer phone (including extension).
2707
- attr_accessor :phone
2708
-
2709
- def initialize(address: nil, name: nil, phone: nil)
2710
- @address = address
2711
- @name = name
2712
- @phone = phone
2713
- end
2714
- end
2715
-
2716
- class Tax < Stripe::RequestParams
2717
- # 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.
2718
- attr_accessor :ip_address
2719
-
2720
- def initialize(ip_address: nil)
2721
- @ip_address = ip_address
2722
- end
2723
- end
2724
-
2725
- class TaxId < Stripe::RequestParams
2726
- # 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`
2727
- attr_accessor :type
2728
- # Value of the tax ID.
2729
- attr_accessor :value
2730
-
2731
- def initialize(type: nil, value: nil)
2732
- @type = type
2733
- @value = value
2734
- end
2735
- end
2736
- # The customer's address.
2737
- attr_accessor :address
2738
- # The customer's shipping information. Appears on invoices emailed to this customer.
2739
- attr_accessor :shipping
2740
- # Tax details about the customer.
2741
- attr_accessor :tax
2742
- # The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
2743
- attr_accessor :tax_exempt
2744
- # The customer's tax IDs.
2745
- attr_accessor :tax_ids
2746
-
2747
- def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil)
2748
- @address = address
2749
- @shipping = shipping
2750
- @tax = tax
2751
- @tax_exempt = tax_exempt
2752
- @tax_ids = tax_ids
2753
- end
2754
- end
2755
-
2756
- class Discount < Stripe::RequestParams
2757
- class DiscountEnd < Stripe::RequestParams
2758
- class Duration < Stripe::RequestParams
2759
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2760
- attr_accessor :interval
2761
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2762
- attr_accessor :interval_count
2763
-
2764
- def initialize(interval: nil, interval_count: nil)
2765
- @interval = interval
2766
- @interval_count = interval_count
2767
- end
2768
- end
2769
- # Time span for the redeemed discount.
2770
- attr_accessor :duration
2771
- # A precise Unix timestamp for the discount to end. Must be in the future.
2772
- attr_accessor :timestamp
2773
- # The type of calculation made to determine when the discount ends.
2774
- attr_accessor :type
2775
-
2776
- def initialize(duration: nil, timestamp: nil, type: nil)
2777
- @duration = duration
2778
- @timestamp = timestamp
2779
- @type = type
2780
- end
2781
- end
2782
- # ID of the coupon to create a new discount for.
2783
- attr_accessor :coupon
2784
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2785
- attr_accessor :discount
2786
- # Details to determine how long the discount should be applied for.
2787
- attr_accessor :discount_end
2788
- # ID of the promotion code to create a new discount for.
2789
- attr_accessor :promotion_code
2790
-
2791
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2792
- @coupon = coupon
2793
- @discount = discount
2794
- @discount_end = discount_end
2795
- @promotion_code = promotion_code
2796
- end
2797
- end
2798
-
2799
- class InvoiceItem < Stripe::RequestParams
2800
- class Discount < Stripe::RequestParams
2801
- class DiscountEnd < Stripe::RequestParams
2802
- class Duration < Stripe::RequestParams
2803
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2804
- attr_accessor :interval
2805
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2806
- attr_accessor :interval_count
2807
-
2808
- def initialize(interval: nil, interval_count: nil)
2809
- @interval = interval
2810
- @interval_count = interval_count
2811
- end
2812
- end
2813
- # Time span for the redeemed discount.
2814
- attr_accessor :duration
2815
- # A precise Unix timestamp for the discount to end. Must be in the future.
2816
- attr_accessor :timestamp
2817
- # The type of calculation made to determine when the discount ends.
2818
- attr_accessor :type
2819
-
2820
- def initialize(duration: nil, timestamp: nil, type: nil)
2821
- @duration = duration
2822
- @timestamp = timestamp
2823
- @type = type
2824
- end
2825
- end
2826
- # ID of the coupon to create a new discount for.
2827
- attr_accessor :coupon
2828
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
2829
- attr_accessor :discount
2830
- # Details to determine how long the discount should be applied for.
2831
- attr_accessor :discount_end
2832
- # ID of the promotion code to create a new discount for.
2833
- attr_accessor :promotion_code
2834
-
2835
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
2836
- @coupon = coupon
2837
- @discount = discount
2838
- @discount_end = discount_end
2839
- @promotion_code = promotion_code
2840
- end
2841
- end
2842
-
2843
- class Period < Stripe::RequestParams
2844
- # The end of the period, which must be greater than or equal to the start. This value is inclusive.
2845
- attr_accessor :end
2846
- # The start of the period. This value is inclusive.
2847
- attr_accessor :start
2848
-
2849
- def initialize(end_: nil, start: nil)
2850
- @end = end_
2851
- @start = start
2852
- end
2853
- end
2854
-
2855
- class PriceData < Stripe::RequestParams
2856
- # 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).
2857
- attr_accessor :currency
2858
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
2859
- attr_accessor :product
2860
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
2861
- attr_accessor :tax_behavior
2862
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
2863
- attr_accessor :unit_amount
2864
- # 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.
2865
- attr_accessor :unit_amount_decimal
2866
-
2867
- def initialize(
2868
- currency: nil,
2869
- product: nil,
2870
- tax_behavior: nil,
2871
- unit_amount: nil,
2872
- unit_amount_decimal: nil
2873
- )
2874
- @currency = currency
2875
- @product = product
2876
- @tax_behavior = tax_behavior
2877
- @unit_amount = unit_amount
2878
- @unit_amount_decimal = unit_amount_decimal
2879
- end
2880
- end
2881
- # The integer amount in cents (or local equivalent) of previewed invoice item.
2882
- attr_accessor :amount
2883
- # 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.
2884
- attr_accessor :currency
2885
- # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
2886
- attr_accessor :description
2887
- # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
2888
- attr_accessor :discountable
2889
- # The coupons to redeem into discounts for the invoice item in the preview.
2890
- attr_accessor :discounts
2891
- # 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.
2892
- attr_accessor :invoiceitem
2893
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
2894
- attr_accessor :metadata
2895
- # 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://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
2896
- attr_accessor :period
2897
- # The ID of the price object. One of `price` or `price_data` is required.
2898
- attr_accessor :price
2899
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
2900
- attr_accessor :price_data
2901
- # Non-negative integer. The quantity of units for the invoice item.
2902
- attr_accessor :quantity
2903
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
2904
- attr_accessor :tax_behavior
2905
- # A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
2906
- attr_accessor :tax_code
2907
- # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
2908
- attr_accessor :tax_rates
2909
- # 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.
2910
- attr_accessor :unit_amount
2911
- # 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.
2912
- attr_accessor :unit_amount_decimal
2913
-
2914
- def initialize(
2915
- amount: nil,
2916
- currency: nil,
2917
- description: nil,
2918
- discountable: nil,
2919
- discounts: nil,
2920
- invoiceitem: nil,
2921
- metadata: nil,
2922
- period: nil,
2923
- price: nil,
2924
- price_data: nil,
2925
- quantity: nil,
2926
- tax_behavior: nil,
2927
- tax_code: nil,
2928
- tax_rates: nil,
2929
- unit_amount: nil,
2930
- unit_amount_decimal: nil
2931
- )
2932
- @amount = amount
2933
- @currency = currency
2934
- @description = description
2935
- @discountable = discountable
2936
- @discounts = discounts
2937
- @invoiceitem = invoiceitem
2938
- @metadata = metadata
2939
- @period = period
2940
- @price = price
2941
- @price_data = price_data
2942
- @quantity = quantity
2943
- @tax_behavior = tax_behavior
2944
- @tax_code = tax_code
2945
- @tax_rates = tax_rates
2946
- @unit_amount = unit_amount
2947
- @unit_amount_decimal = unit_amount_decimal
2948
- end
2949
- end
2950
-
2951
- class Issuer < Stripe::RequestParams
2952
- # The connected account being referenced when `type` is `account`.
2953
- attr_accessor :account
2954
- # Type of the account referenced in the request.
2955
- attr_accessor :type
2956
-
2957
- def initialize(account: nil, type: nil)
2958
- @account = account
2959
- @type = type
2960
- end
2961
- end
2962
-
2963
- class ScheduleDetails < Stripe::RequestParams
2964
- class Amendment < Stripe::RequestParams
2965
- class AmendmentEnd < Stripe::RequestParams
2966
- class DiscountEnd < Stripe::RequestParams
2967
- # The ID of a specific discount.
2968
- attr_accessor :discount
2969
-
2970
- def initialize(discount: nil)
2971
- @discount = discount
2972
- end
2973
- end
2974
-
2975
- class Duration < Stripe::RequestParams
2976
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
2977
- attr_accessor :interval
2978
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
2979
- attr_accessor :interval_count
2980
-
2981
- def initialize(interval: nil, interval_count: nil)
2982
- @interval = interval
2983
- @interval_count = interval_count
2984
- end
2985
- end
2986
- # Use the `end` time of a given discount.
2987
- attr_accessor :discount_end
2988
- # Time span for the amendment starting from the `amendment_start`.
2989
- attr_accessor :duration
2990
- # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`.
2991
- attr_accessor :timestamp
2992
- # Select one of three ways to pass the `amendment_end`.
2993
- attr_accessor :type
2994
-
2995
- def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil)
2996
- @discount_end = discount_end
2997
- @duration = duration
2998
- @timestamp = timestamp
2999
- @type = type
3000
- end
3001
- end
3002
-
3003
- class AmendmentStart < Stripe::RequestParams
3004
- class AmendmentEnd < Stripe::RequestParams
3005
- # 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.
3006
- attr_accessor :index
3007
-
3008
- def initialize(index: nil)
3009
- @index = index
3010
- end
3011
- end
3012
-
3013
- class DiscountEnd < Stripe::RequestParams
3014
- # The ID of a specific discount.
3015
- attr_accessor :discount
3016
-
3017
- def initialize(discount: nil)
3018
- @discount = discount
3019
- end
3020
- end
3021
- # Details of another amendment in the same array, immediately after which this amendment should begin.
3022
- attr_accessor :amendment_end
3023
- # Use the `end` time of a given discount.
3024
- attr_accessor :discount_end
3025
- # A precise Unix timestamp for the amendment to start.
3026
- attr_accessor :timestamp
3027
- # Select one of three ways to pass the `amendment_start`.
3028
- attr_accessor :type
3029
-
3030
- def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil)
3031
- @amendment_end = amendment_end
3032
- @discount_end = discount_end
3033
- @timestamp = timestamp
3034
- @type = type
3035
- end
3036
- end
3037
-
3038
- class DiscountAction < Stripe::RequestParams
3039
- class Add < Stripe::RequestParams
3040
- class DiscountEnd < Stripe::RequestParams
3041
- # The type of calculation made to determine when the discount ends.
3042
- attr_accessor :type
3043
-
3044
- def initialize(type: nil)
3045
- @type = type
3046
- end
3047
- end
3048
- # The coupon code to redeem.
3049
- attr_accessor :coupon
3050
- # An ID of an existing discount for a coupon that was already redeemed.
3051
- attr_accessor :discount
3052
- # Details to determine how long the discount should be applied for.
3053
- attr_accessor :discount_end
3054
- # 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.
3055
- attr_accessor :index
3056
- # The promotion code to redeem.
3057
- attr_accessor :promotion_code
3058
-
3059
- def initialize(
3060
- coupon: nil,
3061
- discount: nil,
3062
- discount_end: nil,
3063
- index: nil,
3064
- promotion_code: nil
3065
- )
3066
- @coupon = coupon
3067
- @discount = discount
3068
- @discount_end = discount_end
3069
- @index = index
3070
- @promotion_code = promotion_code
3071
- end
3072
- end
3073
-
3074
- class Remove < Stripe::RequestParams
3075
- # The coupon code to remove from the `discounts` array.
3076
- attr_accessor :coupon
3077
- # The ID of a discount to remove from the `discounts` array.
3078
- attr_accessor :discount
3079
- # The ID of a promotion code to remove from the `discounts` array.
3080
- attr_accessor :promotion_code
3081
-
3082
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
3083
- @coupon = coupon
3084
- @discount = discount
3085
- @promotion_code = promotion_code
3086
- end
3087
- end
3088
-
3089
- class Set < Stripe::RequestParams
3090
- # The coupon code to replace the `discounts` array with.
3091
- attr_accessor :coupon
3092
- # An ID of an existing discount to replace the `discounts` array with.
3093
- attr_accessor :discount
3094
- # An ID of an existing promotion code to replace the `discounts` array with.
3095
- attr_accessor :promotion_code
3096
-
3097
- def initialize(coupon: nil, discount: nil, promotion_code: nil)
3098
- @coupon = coupon
3099
- @discount = discount
3100
- @promotion_code = promotion_code
3101
- end
3102
- end
3103
- # Details of the discount to add.
3104
- attr_accessor :add
3105
- # Details of the discount to remove.
3106
- attr_accessor :remove
3107
- # Details of the discount to replace the existing discounts with.
3108
- attr_accessor :set
3109
- # Determines the type of discount action.
3110
- attr_accessor :type
3111
-
3112
- def initialize(add: nil, remove: nil, set: nil, type: nil)
3113
- @add = add
3114
- @remove = remove
3115
- @set = set
3116
- @type = type
3117
- end
3118
- end
3119
-
3120
- class ItemAction < Stripe::RequestParams
3121
- class Add < Stripe::RequestParams
3122
- class Discount < Stripe::RequestParams
3123
- class DiscountEnd < Stripe::RequestParams
3124
- class Duration < Stripe::RequestParams
3125
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3126
- attr_accessor :interval
3127
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3128
- attr_accessor :interval_count
3129
-
3130
- def initialize(interval: nil, interval_count: nil)
3131
- @interval = interval
3132
- @interval_count = interval_count
3133
- end
3134
- end
3135
- # Time span for the redeemed discount.
3136
- attr_accessor :duration
3137
- # A precise Unix timestamp for the discount to end. Must be in the future.
3138
- attr_accessor :timestamp
3139
- # The type of calculation made to determine when the discount ends.
3140
- attr_accessor :type
3141
-
3142
- def initialize(duration: nil, timestamp: nil, type: nil)
3143
- @duration = duration
3144
- @timestamp = timestamp
3145
- @type = type
3146
- end
3147
- end
3148
- # ID of the coupon to create a new discount for.
3149
- attr_accessor :coupon
3150
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
3151
- attr_accessor :discount
3152
- # Details to determine how long the discount should be applied for.
3153
- attr_accessor :discount_end
3154
- # ID of the promotion code to create a new discount for.
3155
- attr_accessor :promotion_code
3156
-
3157
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
3158
- @coupon = coupon
3159
- @discount = discount
3160
- @discount_end = discount_end
3161
- @promotion_code = promotion_code
3162
- end
3163
- end
3164
-
3165
- class Trial < Stripe::RequestParams
3166
- # 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.
3167
- attr_accessor :converts_to
3168
- # Determines the type of trial for this item.
3169
- attr_accessor :type
3170
-
3171
- def initialize(converts_to: nil, type: nil)
3172
- @converts_to = converts_to
3173
- @type = type
3174
- end
3175
- end
3176
- # The discounts applied to the item. Subscription item discounts are applied before subscription discounts.
3177
- attr_accessor :discounts
3178
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
3179
- attr_accessor :metadata
3180
- # The ID of the price object.
3181
- attr_accessor :price
3182
- # Quantity for this item.
3183
- attr_accessor :quantity
3184
- # 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`.
3185
- attr_accessor :tax_rates
3186
- # Options that configure the trial on the subscription item.
3187
- attr_accessor :trial
3188
-
3189
- def initialize(
3190
- discounts: nil,
3191
- metadata: nil,
3192
- price: nil,
3193
- quantity: nil,
3194
- tax_rates: nil,
3195
- trial: nil
3196
- )
3197
- @discounts = discounts
3198
- @metadata = metadata
3199
- @price = price
3200
- @quantity = quantity
3201
- @tax_rates = tax_rates
3202
- @trial = trial
3203
- end
3204
- end
3205
-
3206
- class Remove < Stripe::RequestParams
3207
- # ID of a price to remove.
3208
- attr_accessor :price
3209
-
3210
- def initialize(price: nil)
3211
- @price = price
3212
- end
3213
- end
3214
-
3215
- class Set < Stripe::RequestParams
3216
- class Discount < Stripe::RequestParams
3217
- class DiscountEnd < Stripe::RequestParams
3218
- class Duration < Stripe::RequestParams
3219
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3220
- attr_accessor :interval
3221
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3222
- attr_accessor :interval_count
3223
-
3224
- def initialize(interval: nil, interval_count: nil)
3225
- @interval = interval
3226
- @interval_count = interval_count
3227
- end
3228
- end
3229
- # Time span for the redeemed discount.
3230
- attr_accessor :duration
3231
- # A precise Unix timestamp for the discount to end. Must be in the future.
3232
- attr_accessor :timestamp
3233
- # The type of calculation made to determine when the discount ends.
3234
- attr_accessor :type
3235
-
3236
- def initialize(duration: nil, timestamp: nil, type: nil)
3237
- @duration = duration
3238
- @timestamp = timestamp
3239
- @type = type
3240
- end
3241
- end
3242
- # ID of the coupon to create a new discount for.
3243
- attr_accessor :coupon
3244
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
3245
- attr_accessor :discount
3246
- # Details to determine how long the discount should be applied for.
3247
- attr_accessor :discount_end
3248
- # ID of the promotion code to create a new discount for.
3249
- attr_accessor :promotion_code
3250
-
3251
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
3252
- @coupon = coupon
3253
- @discount = discount
3254
- @discount_end = discount_end
3255
- @promotion_code = promotion_code
3256
- end
3257
- end
3258
-
3259
- class Trial < Stripe::RequestParams
3260
- # 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.
3261
- attr_accessor :converts_to
3262
- # Determines the type of trial for this item.
3263
- attr_accessor :type
3264
-
3265
- def initialize(converts_to: nil, type: nil)
3266
- @converts_to = converts_to
3267
- @type = type
3268
- end
3269
- end
3270
- # 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`.
3271
- attr_accessor :discounts
3272
- # 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`.
3273
- attr_accessor :metadata
3274
- # The ID of the price object.
3275
- attr_accessor :price
3276
- # 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`.
3277
- attr_accessor :quantity
3278
- # 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`.
3279
- attr_accessor :tax_rates
3280
- # 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`.
3281
- attr_accessor :trial
3282
-
3283
- def initialize(
3284
- discounts: nil,
3285
- metadata: nil,
3286
- price: nil,
3287
- quantity: nil,
3288
- tax_rates: nil,
3289
- trial: nil
3290
- )
3291
- @discounts = discounts
3292
- @metadata = metadata
3293
- @price = price
3294
- @quantity = quantity
3295
- @tax_rates = tax_rates
3296
- @trial = trial
3297
- end
3298
- end
3299
- # 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.
3300
- attr_accessor :add
3301
- # Details of the subscription item to remove.
3302
- attr_accessor :remove
3303
- # 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.
3304
- attr_accessor :set
3305
- # Determines the type of item action.
3306
- attr_accessor :type
3307
-
3308
- def initialize(add: nil, remove: nil, set: nil, type: nil)
3309
- @add = add
3310
- @remove = remove
3311
- @set = set
3312
- @type = type
3313
- end
3314
- end
3315
-
3316
- class MetadataAction < Stripe::RequestParams
3317
- # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata.
3318
- attr_accessor :add
3319
- # Keys to remove from schedule phase metadata.
3320
- attr_accessor :remove
3321
- # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten.
3322
- attr_accessor :set
3323
- # Select one of three ways to update phase-level `metadata` on subscription schedules.
3324
- attr_accessor :type
3325
-
3326
- def initialize(add: nil, remove: nil, set: nil, type: nil)
3327
- @add = add
3328
- @remove = remove
3329
- @set = set
3330
- @type = type
3331
- end
3332
- end
3333
-
3334
- class SetPauseCollection < Stripe::RequestParams
3335
- class Set < Stripe::RequestParams
3336
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3337
- attr_accessor :behavior
3338
-
3339
- def initialize(behavior: nil)
3340
- @behavior = behavior
3341
- end
3342
- end
3343
- # Details of the pause_collection behavior to apply to the amendment.
3344
- attr_accessor :set
3345
- # Determines the type of the pause_collection amendment.
3346
- attr_accessor :type
3347
-
3348
- def initialize(set: nil, type: nil)
3349
- @set = set
3350
- @type = type
3351
- end
3352
- end
3353
-
3354
- class TrialSettings < Stripe::RequestParams
3355
- class EndBehavior < Stripe::RequestParams
3356
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3357
- attr_accessor :prorate_up_front
3358
-
3359
- def initialize(prorate_up_front: nil)
3360
- @prorate_up_front = prorate_up_front
3361
- end
3362
- end
3363
- # Defines how the subscription should behave when a trial ends.
3364
- attr_accessor :end_behavior
3365
-
3366
- def initialize(end_behavior: nil)
3367
- @end_behavior = end_behavior
3368
- end
3369
- end
3370
- # 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.
3371
- attr_accessor :amendment_end
3372
- # Details to identify the earliest timestamp where the proposed change should take effect.
3373
- attr_accessor :amendment_start
3374
- # 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.
3375
- attr_accessor :billing_cycle_anchor
3376
- # Changes to the coupons being redeemed or discounts being applied during the amendment time span.
3377
- attr_accessor :discount_actions
3378
- # Changes to the subscription items during the amendment time span.
3379
- attr_accessor :item_actions
3380
- # Instructions for how to modify phase metadata
3381
- attr_accessor :metadata_actions
3382
- # 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`.
3383
- attr_accessor :proration_behavior
3384
- # Defines how to pause collection for the underlying subscription throughout the duration of the amendment.
3385
- attr_accessor :set_pause_collection
3386
- # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end.
3387
- attr_accessor :set_schedule_end
3388
- # Settings related to subscription trials.
3389
- attr_accessor :trial_settings
3390
-
3391
- def initialize(
3392
- amendment_end: nil,
3393
- amendment_start: nil,
3394
- billing_cycle_anchor: nil,
3395
- discount_actions: nil,
3396
- item_actions: nil,
3397
- metadata_actions: nil,
3398
- proration_behavior: nil,
3399
- set_pause_collection: nil,
3400
- set_schedule_end: nil,
3401
- trial_settings: nil
3402
- )
3403
- @amendment_end = amendment_end
3404
- @amendment_start = amendment_start
3405
- @billing_cycle_anchor = billing_cycle_anchor
3406
- @discount_actions = discount_actions
3407
- @item_actions = item_actions
3408
- @metadata_actions = metadata_actions
3409
- @proration_behavior = proration_behavior
3410
- @set_pause_collection = set_pause_collection
3411
- @set_schedule_end = set_schedule_end
3412
- @trial_settings = trial_settings
3413
- end
3414
- end
3415
-
3416
- class BillingMode < Stripe::RequestParams
3417
- # Controls the calculation and orchestration of prorations and invoices for subscriptions.
3418
- attr_accessor :type
3419
-
3420
- def initialize(type: nil)
3421
- @type = type
3422
- end
3423
- end
3424
-
3425
- class Phase < Stripe::RequestParams
3426
- class AddInvoiceItem < Stripe::RequestParams
3427
- class Discount < Stripe::RequestParams
3428
- class DiscountEnd < Stripe::RequestParams
3429
- class Duration < Stripe::RequestParams
3430
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3431
- attr_accessor :interval
3432
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3433
- attr_accessor :interval_count
3434
-
3435
- def initialize(interval: nil, interval_count: nil)
3436
- @interval = interval
3437
- @interval_count = interval_count
3438
- end
3439
- end
3440
- # Time span for the redeemed discount.
3441
- attr_accessor :duration
3442
- # A precise Unix timestamp for the discount to end. Must be in the future.
3443
- attr_accessor :timestamp
3444
- # The type of calculation made to determine when the discount ends.
3445
- attr_accessor :type
3446
-
3447
- def initialize(duration: nil, timestamp: nil, type: nil)
3448
- @duration = duration
3449
- @timestamp = timestamp
3450
- @type = type
3451
- end
3452
- end
3453
- # ID of the coupon to create a new discount for.
3454
- attr_accessor :coupon
3455
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
3456
- attr_accessor :discount
3457
- # Details to determine how long the discount should be applied for.
3458
- attr_accessor :discount_end
3459
- # ID of the promotion code to create a new discount for.
3460
- attr_accessor :promotion_code
3461
-
3462
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
3463
- @coupon = coupon
3464
- @discount = discount
3465
- @discount_end = discount_end
3466
- @promotion_code = promotion_code
3467
- end
3468
- end
3469
-
3470
- class Period < Stripe::RequestParams
3471
- class End < Stripe::RequestParams
3472
- # A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
3473
- attr_accessor :timestamp
3474
- # Select how to calculate the end of the invoice item period.
3475
- attr_accessor :type
3476
-
3477
- def initialize(timestamp: nil, type: nil)
3478
- @timestamp = timestamp
3479
- @type = type
3480
- end
3481
- end
3482
-
3483
- class Start < Stripe::RequestParams
3484
- # A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
3485
- attr_accessor :timestamp
3486
- # Select how to calculate the start of the invoice item period.
3487
- attr_accessor :type
3488
-
3489
- def initialize(timestamp: nil, type: nil)
3490
- @timestamp = timestamp
3491
- @type = type
3492
- end
3493
- end
3494
- # End of the invoice item period.
3495
- attr_accessor :end
3496
- # Start of the invoice item period.
3497
- attr_accessor :start
3498
-
3499
- def initialize(end_: nil, start: nil)
3500
- @end = end_
3501
- @start = start
3502
- end
3503
- end
3504
-
3505
- class PriceData < Stripe::RequestParams
3506
- # 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).
3507
- attr_accessor :currency
3508
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
3509
- attr_accessor :product
3510
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
3511
- attr_accessor :tax_behavior
3512
- # 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.
3513
- attr_accessor :unit_amount
3514
- # 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.
3515
- attr_accessor :unit_amount_decimal
3516
-
3517
- def initialize(
3518
- currency: nil,
3519
- product: nil,
3520
- tax_behavior: nil,
3521
- unit_amount: nil,
3522
- unit_amount_decimal: nil
3523
- )
3524
- @currency = currency
3525
- @product = product
3526
- @tax_behavior = tax_behavior
3527
- @unit_amount = unit_amount
3528
- @unit_amount_decimal = unit_amount_decimal
3529
- end
3530
- end
3531
- # The coupons to redeem into discounts for the item.
3532
- attr_accessor :discounts
3533
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
3534
- attr_accessor :metadata
3535
- # The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
3536
- attr_accessor :period
3537
- # The ID of the price object. One of `price` or `price_data` is required.
3538
- attr_accessor :price
3539
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
3540
- attr_accessor :price_data
3541
- # Quantity for this item. Defaults to 1.
3542
- attr_accessor :quantity
3543
- # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
3544
- attr_accessor :tax_rates
3545
-
3546
- def initialize(
3547
- discounts: nil,
3548
- metadata: nil,
3549
- period: nil,
3550
- price: nil,
3551
- price_data: nil,
3552
- quantity: nil,
3553
- tax_rates: nil
3554
- )
3555
- @discounts = discounts
3556
- @metadata = metadata
3557
- @period = period
3558
- @price = price
3559
- @price_data = price_data
3560
- @quantity = quantity
3561
- @tax_rates = tax_rates
3562
- end
3563
- end
3564
-
3565
- class AutomaticTax < Stripe::RequestParams
3566
- class Liability < Stripe::RequestParams
3567
- # The connected account being referenced when `type` is `account`.
3568
- attr_accessor :account
3569
- # Type of the account referenced in the request.
3570
- attr_accessor :type
3571
-
3572
- def initialize(account: nil, type: nil)
3573
- @account = account
3574
- @type = type
3575
- end
3576
- end
3577
- # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
3578
- attr_accessor :enabled
3579
- # 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.
3580
- attr_accessor :liability
3581
-
3582
- def initialize(enabled: nil, liability: nil)
3583
- @enabled = enabled
3584
- @liability = liability
447
+ def self.field_remappings
448
+ @field_remappings = {}
3585
449
  end
3586
450
  end
451
+ # Attribute for field bank_transfer
452
+ attr_reader :bank_transfer
453
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
454
+ attr_reader :funding_type
3587
455
 
3588
- class BillingThresholds < Stripe::RequestParams
3589
- # Monetary threshold that triggers the subscription to advance to a new billing period
3590
- attr_accessor :amount_gte
3591
- # 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.
3592
- attr_accessor :reset_billing_cycle_anchor
3593
-
3594
- def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil)
3595
- @amount_gte = amount_gte
3596
- @reset_billing_cycle_anchor = reset_billing_cycle_anchor
3597
- end
456
+ def self.inner_class_types
457
+ @inner_class_types = { bank_transfer: BankTransfer }
3598
458
  end
3599
459
 
3600
- class Discount < Stripe::RequestParams
3601
- class DiscountEnd < Stripe::RequestParams
3602
- class Duration < Stripe::RequestParams
3603
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3604
- attr_accessor :interval
3605
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3606
- attr_accessor :interval_count
3607
-
3608
- def initialize(interval: nil, interval_count: nil)
3609
- @interval = interval
3610
- @interval_count = interval_count
3611
- end
3612
- end
3613
- # Time span for the redeemed discount.
3614
- attr_accessor :duration
3615
- # A precise Unix timestamp for the discount to end. Must be in the future.
3616
- attr_accessor :timestamp
3617
- # The type of calculation made to determine when the discount ends.
3618
- attr_accessor :type
3619
-
3620
- def initialize(duration: nil, timestamp: nil, type: nil)
3621
- @duration = duration
3622
- @timestamp = timestamp
3623
- @type = type
3624
- end
3625
- end
3626
- # ID of the coupon to create a new discount for.
3627
- attr_accessor :coupon
3628
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
3629
- attr_accessor :discount
3630
- # Details to determine how long the discount should be applied for.
3631
- attr_accessor :discount_end
3632
- # ID of the promotion code to create a new discount for.
3633
- attr_accessor :promotion_code
3634
-
3635
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
3636
- @coupon = coupon
3637
- @discount = discount
3638
- @discount_end = discount_end
3639
- @promotion_code = promotion_code
3640
- end
460
+ def self.field_remappings
461
+ @field_remappings = {}
3641
462
  end
463
+ end
3642
464
 
3643
- class Duration < Stripe::RequestParams
3644
- # Specifies phase duration. Either `day`, `week`, `month` or `year`.
3645
- attr_accessor :interval
3646
- # The multiplier applied to the interval.
3647
- attr_accessor :interval_count
465
+ class Konbini < Stripe::StripeObject
466
+ def self.inner_class_types
467
+ @inner_class_types = {}
468
+ end
3648
469
 
3649
- def initialize(interval: nil, interval_count: nil)
3650
- @interval = interval
3651
- @interval_count = interval_count
3652
- end
470
+ def self.field_remappings
471
+ @field_remappings = {}
3653
472
  end
473
+ end
3654
474
 
3655
- class InvoiceSettings < Stripe::RequestParams
3656
- class Issuer < Stripe::RequestParams
3657
- # The connected account being referenced when `type` is `account`.
3658
- attr_accessor :account
3659
- # Type of the account referenced in the request.
3660
- attr_accessor :type
475
+ class SepaDebit < Stripe::StripeObject
476
+ def self.inner_class_types
477
+ @inner_class_types = {}
478
+ end
3661
479
 
3662
- def initialize(account: nil, type: nil)
3663
- @account = account
3664
- @type = type
3665
- end
3666
- end
3667
- # 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.
3668
- attr_accessor :account_tax_ids
3669
- # 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`.
3670
- attr_accessor :days_until_due
3671
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
3672
- attr_accessor :issuer
3673
-
3674
- def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil)
3675
- @account_tax_ids = account_tax_ids
3676
- @days_until_due = days_until_due
3677
- @issuer = issuer
3678
- end
480
+ def self.field_remappings
481
+ @field_remappings = {}
3679
482
  end
483
+ end
3680
484
 
3681
- class Item < Stripe::RequestParams
3682
- class BillingThresholds < Stripe::RequestParams
3683
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
3684
- attr_accessor :usage_gte
485
+ class UsBankAccount < Stripe::StripeObject
486
+ class FinancialConnections < Stripe::StripeObject
487
+ class Filters < Stripe::StripeObject
488
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
489
+ attr_reader :account_subcategories
3685
490
 
3686
- def initialize(usage_gte: nil)
3687
- @usage_gte = usage_gte
491
+ def self.inner_class_types
492
+ @inner_class_types = {}
3688
493
  end
3689
- end
3690
494
 
3691
- class Discount < Stripe::RequestParams
3692
- class DiscountEnd < Stripe::RequestParams
3693
- class Duration < Stripe::RequestParams
3694
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3695
- attr_accessor :interval
3696
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3697
- attr_accessor :interval_count
3698
-
3699
- def initialize(interval: nil, interval_count: nil)
3700
- @interval = interval
3701
- @interval_count = interval_count
3702
- end
3703
- end
3704
- # Time span for the redeemed discount.
3705
- attr_accessor :duration
3706
- # A precise Unix timestamp for the discount to end. Must be in the future.
3707
- attr_accessor :timestamp
3708
- # The type of calculation made to determine when the discount ends.
3709
- attr_accessor :type
3710
-
3711
- def initialize(duration: nil, timestamp: nil, type: nil)
3712
- @duration = duration
3713
- @timestamp = timestamp
3714
- @type = type
3715
- end
3716
- end
3717
- # ID of the coupon to create a new discount for.
3718
- attr_accessor :coupon
3719
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
3720
- attr_accessor :discount
3721
- # Details to determine how long the discount should be applied for.
3722
- attr_accessor :discount_end
3723
- # ID of the promotion code to create a new discount for.
3724
- attr_accessor :promotion_code
3725
-
3726
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
3727
- @coupon = coupon
3728
- @discount = discount
3729
- @discount_end = discount_end
3730
- @promotion_code = promotion_code
495
+ def self.field_remappings
496
+ @field_remappings = {}
3731
497
  end
3732
498
  end
499
+ # Attribute for field filters
500
+ attr_reader :filters
501
+ # The list of permissions to request. The `payment_method` permission must be included.
502
+ attr_reader :permissions
503
+ # Data features requested to be retrieved upon account creation.
504
+ attr_reader :prefetch
3733
505
 
3734
- class PriceData < Stripe::RequestParams
3735
- class Recurring < Stripe::RequestParams
3736
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
3737
- attr_accessor :interval
3738
- # 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).
3739
- attr_accessor :interval_count
3740
-
3741
- def initialize(interval: nil, interval_count: nil)
3742
- @interval = interval
3743
- @interval_count = interval_count
3744
- end
3745
- end
3746
- # 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).
3747
- attr_accessor :currency
3748
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
3749
- attr_accessor :product
3750
- # The recurring components of a price such as `interval` and `interval_count`.
3751
- attr_accessor :recurring
3752
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
3753
- attr_accessor :tax_behavior
3754
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
3755
- attr_accessor :unit_amount
3756
- # 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.
3757
- attr_accessor :unit_amount_decimal
3758
-
3759
- def initialize(
3760
- currency: nil,
3761
- product: nil,
3762
- recurring: nil,
3763
- tax_behavior: nil,
3764
- unit_amount: nil,
3765
- unit_amount_decimal: nil
3766
- )
3767
- @currency = currency
3768
- @product = product
3769
- @recurring = recurring
3770
- @tax_behavior = tax_behavior
3771
- @unit_amount = unit_amount
3772
- @unit_amount_decimal = unit_amount_decimal
3773
- end
506
+ def self.inner_class_types
507
+ @inner_class_types = { filters: Filters }
3774
508
  end
3775
509
 
3776
- class Trial < Stripe::RequestParams
3777
- # 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.
3778
- attr_accessor :converts_to
3779
- # Determines the type of trial for this item.
3780
- attr_accessor :type
3781
-
3782
- def initialize(converts_to: nil, type: nil)
3783
- @converts_to = converts_to
3784
- @type = type
3785
- end
3786
- end
3787
- # 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.
3788
- attr_accessor :billing_thresholds
3789
- # The coupons to redeem into discounts for the subscription item.
3790
- attr_accessor :discounts
3791
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
3792
- attr_accessor :metadata
3793
- # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
3794
- attr_accessor :plan
3795
- # The ID of the price object.
3796
- attr_accessor :price
3797
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
3798
- attr_accessor :price_data
3799
- # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
3800
- attr_accessor :quantity
3801
- # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
3802
- attr_accessor :tax_rates
3803
- # Options that configure the trial on the subscription item.
3804
- attr_accessor :trial
3805
-
3806
- def initialize(
3807
- billing_thresholds: nil,
3808
- discounts: nil,
3809
- metadata: nil,
3810
- plan: nil,
3811
- price: nil,
3812
- price_data: nil,
3813
- quantity: nil,
3814
- tax_rates: nil,
3815
- trial: nil
3816
- )
3817
- @billing_thresholds = billing_thresholds
3818
- @discounts = discounts
3819
- @metadata = metadata
3820
- @plan = plan
3821
- @price = price
3822
- @price_data = price_data
3823
- @quantity = quantity
3824
- @tax_rates = tax_rates
3825
- @trial = trial
510
+ def self.field_remappings
511
+ @field_remappings = {}
3826
512
  end
3827
513
  end
514
+ # Attribute for field financial_connections
515
+ attr_reader :financial_connections
516
+ # Bank account verification method.
517
+ attr_reader :verification_method
3828
518
 
3829
- class PauseCollection < Stripe::RequestParams
3830
- # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
3831
- attr_accessor :behavior
519
+ def self.inner_class_types
520
+ @inner_class_types = { financial_connections: FinancialConnections }
521
+ end
3832
522
 
3833
- def initialize(behavior: nil)
3834
- @behavior = behavior
3835
- end
523
+ def self.field_remappings
524
+ @field_remappings = {}
3836
525
  end
526
+ end
527
+ # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
528
+ attr_reader :acss_debit
529
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
530
+ attr_reader :bancontact
531
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
532
+ attr_reader :card
533
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
534
+ attr_reader :customer_balance
535
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
536
+ attr_reader :konbini
537
+ # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent.
538
+ attr_reader :sepa_debit
539
+ # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent.
540
+ attr_reader :us_bank_account
3837
541
 
3838
- class TransferData < Stripe::RequestParams
3839
- # 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.
3840
- attr_accessor :amount_percent
3841
- # ID of an existing, connected Stripe account.
3842
- attr_accessor :destination
542
+ def self.inner_class_types
543
+ @inner_class_types = {
544
+ acss_debit: AcssDebit,
545
+ bancontact: Bancontact,
546
+ card: Card,
547
+ customer_balance: CustomerBalance,
548
+ konbini: Konbini,
549
+ sepa_debit: SepaDebit,
550
+ us_bank_account: UsBankAccount,
551
+ }
552
+ end
3843
553
 
3844
- def initialize(amount_percent: nil, destination: nil)
3845
- @amount_percent = amount_percent
3846
- @destination = destination
3847
- end
3848
- end
554
+ def self.field_remappings
555
+ @field_remappings = {}
556
+ end
557
+ end
558
+ # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set.
559
+ attr_reader :default_mandate
560
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
561
+ attr_reader :payment_method_options
562
+ # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
563
+ attr_reader :payment_method_types
3849
564
 
3850
- class TrialSettings < Stripe::RequestParams
3851
- class EndBehavior < Stripe::RequestParams
3852
- # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`.
3853
- attr_accessor :prorate_up_front
565
+ def self.inner_class_types
566
+ @inner_class_types = { payment_method_options: PaymentMethodOptions }
567
+ end
3854
568
 
3855
- def initialize(prorate_up_front: nil)
3856
- @prorate_up_front = prorate_up_front
3857
- end
3858
- end
3859
- # Defines how the subscription should behave when a trial ends.
3860
- attr_accessor :end_behavior
569
+ def self.field_remappings
570
+ @field_remappings = {}
571
+ end
572
+ end
3861
573
 
3862
- def initialize(end_behavior: nil)
3863
- @end_behavior = end_behavior
3864
- end
3865
- end
3866
- # 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.
3867
- attr_accessor :add_invoice_items
3868
- # 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).
3869
- attr_accessor :application_fee_percent
3870
- # Automatic tax settings for this phase.
3871
- attr_accessor :automatic_tax
3872
- # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
3873
- attr_accessor :billing_cycle_anchor
3874
- # 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.
3875
- attr_accessor :billing_thresholds
3876
- # 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.
3877
- attr_accessor :collection_method
3878
- # 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).
3879
- attr_accessor :currency
3880
- # 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.
3881
- attr_accessor :default_payment_method
3882
- # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
3883
- attr_accessor :default_tax_rates
3884
- # 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.
3885
- attr_accessor :description
3886
- # 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.
3887
- attr_accessor :discounts
3888
- # The number of intervals the phase should last. If set, `end_date` must not be set.
3889
- attr_accessor :duration
3890
- # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
3891
- attr_accessor :end_date
3892
- # All invoices will be billed using the specified settings.
3893
- attr_accessor :invoice_settings
3894
- # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
3895
- attr_accessor :items
3896
- # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
3897
- attr_accessor :iterations
3898
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
3899
- attr_accessor :metadata
3900
- # The account on behalf of which to charge, for each of the associated subscription's invoices.
3901
- attr_accessor :on_behalf_of
3902
- # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment).
3903
- attr_accessor :pause_collection
3904
- # Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
3905
- attr_accessor :proration_behavior
3906
- # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
3907
- attr_accessor :start_date
3908
- # The data with which to automatically create a Transfer for each of the associated subscription's invoices.
3909
- attr_accessor :transfer_data
3910
- # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
3911
- attr_accessor :trial
3912
- # Specify trial behavior when crossing phase boundaries
3913
- attr_accessor :trial_continuation
3914
- # 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`
3915
- attr_accessor :trial_end
3916
- # Settings related to subscription trials.
3917
- attr_accessor :trial_settings
3918
-
3919
- def initialize(
3920
- add_invoice_items: nil,
3921
- application_fee_percent: nil,
3922
- automatic_tax: nil,
3923
- billing_cycle_anchor: nil,
3924
- billing_thresholds: nil,
3925
- collection_method: nil,
3926
- currency: nil,
3927
- default_payment_method: nil,
3928
- default_tax_rates: nil,
3929
- description: nil,
3930
- discounts: nil,
3931
- duration: nil,
3932
- end_date: nil,
3933
- invoice_settings: nil,
3934
- items: nil,
3935
- iterations: nil,
3936
- metadata: nil,
3937
- on_behalf_of: nil,
3938
- pause_collection: nil,
3939
- proration_behavior: nil,
3940
- start_date: nil,
3941
- transfer_data: nil,
3942
- trial: nil,
3943
- trial_continuation: nil,
3944
- trial_end: nil,
3945
- trial_settings: nil
3946
- )
3947
- @add_invoice_items = add_invoice_items
3948
- @application_fee_percent = application_fee_percent
3949
- @automatic_tax = automatic_tax
3950
- @billing_cycle_anchor = billing_cycle_anchor
3951
- @billing_thresholds = billing_thresholds
3952
- @collection_method = collection_method
3953
- @currency = currency
3954
- @default_payment_method = default_payment_method
3955
- @default_tax_rates = default_tax_rates
3956
- @description = description
3957
- @discounts = discounts
3958
- @duration = duration
3959
- @end_date = end_date
3960
- @invoice_settings = invoice_settings
3961
- @items = items
3962
- @iterations = iterations
3963
- @metadata = metadata
3964
- @on_behalf_of = on_behalf_of
3965
- @pause_collection = pause_collection
3966
- @proration_behavior = proration_behavior
3967
- @start_date = start_date
3968
- @transfer_data = transfer_data
3969
- @trial = trial
3970
- @trial_continuation = trial_continuation
3971
- @trial_end = trial_end
3972
- @trial_settings = trial_settings
3973
- end
574
+ class Rendering < Stripe::StripeObject
575
+ class Pdf < Stripe::StripeObject
576
+ # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale.
577
+ attr_reader :page_size
578
+
579
+ def self.inner_class_types
580
+ @inner_class_types = {}
581
+ end
582
+
583
+ def self.field_remappings
584
+ @field_remappings = {}
3974
585
  end
586
+ end
587
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
588
+ attr_reader :amount_tax_display
589
+ # Invoice pdf rendering options
590
+ attr_reader :pdf
591
+ # ID of the rendering template that the invoice is formatted by.
592
+ attr_reader :template
593
+ # Version of the rendering template that the invoice is using.
594
+ attr_reader :template_version
3975
595
 
3976
- class Prebilling < Stripe::RequestParams
3977
- class BillUntil < Stripe::RequestParams
3978
- class AmendmentEnd < Stripe::RequestParams
3979
- # 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.
3980
- attr_accessor :index
596
+ def self.inner_class_types
597
+ @inner_class_types = { pdf: Pdf }
598
+ end
3981
599
 
3982
- def initialize(index: nil)
3983
- @index = index
3984
- end
3985
- end
600
+ def self.field_remappings
601
+ @field_remappings = {}
602
+ end
603
+ end
3986
604
 
3987
- class Duration < Stripe::RequestParams
3988
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
3989
- attr_accessor :interval
3990
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
3991
- attr_accessor :interval_count
605
+ class ShippingCost < Stripe::StripeObject
606
+ class Tax < Stripe::StripeObject
607
+ # Amount of tax applied for this rate.
608
+ attr_reader :amount
609
+ # Tax rates can be applied to [invoices](/invoicing/taxes/tax-rates), [subscriptions](/billing/taxes/tax-rates) and [Checkout Sessions](/payments/checkout/use-manual-tax-rates) to collect tax.
610
+ #
611
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
612
+ attr_reader :rate
613
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
614
+ attr_reader :taxability_reason
615
+ # The amount on which tax is calculated, in cents (or local equivalent).
616
+ attr_reader :taxable_amount
3992
617
 
3993
- def initialize(interval: nil, interval_count: nil)
3994
- @interval = interval
3995
- @interval_count = interval_count
3996
- end
3997
- end
3998
- # End the prebilled period when a specified amendment ends.
3999
- attr_accessor :amendment_end
4000
- # Time span for prebilling, starting from `bill_from`.
4001
- attr_accessor :duration
4002
- # End the prebilled period at a precise integer timestamp, starting from the Unix epoch.
4003
- attr_accessor :timestamp
4004
- # Select one of several ways to pass the `bill_until` value.
4005
- attr_accessor :type
4006
-
4007
- def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil)
4008
- @amendment_end = amendment_end
4009
- @duration = duration
4010
- @timestamp = timestamp
4011
- @type = type
4012
- end
4013
- end
4014
- # The end of the prebilled time period.
4015
- attr_accessor :bill_until
4016
- # This is used to determine the number of billing cycles to prebill.
4017
- attr_accessor :iterations
4018
-
4019
- def initialize(bill_until: nil, iterations: nil)
4020
- @bill_until = bill_until
4021
- @iterations = iterations
4022
- end
618
+ def self.inner_class_types
619
+ @inner_class_types = {}
4023
620
  end
4024
- # Changes to apply to the phases of the subscription schedule, in the order provided.
4025
- attr_accessor :amendments
4026
- # 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.
4027
- attr_accessor :billing_behavior
4028
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
4029
- attr_accessor :billing_mode
4030
- # 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.
4031
- attr_accessor :end_behavior
4032
- # 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.
4033
- attr_accessor :phases
4034
- # Provide any time periods to bill in advance.
4035
- attr_accessor :prebilling
4036
- # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
4037
- attr_accessor :proration_behavior
4038
-
4039
- def initialize(
4040
- amendments: nil,
4041
- billing_behavior: nil,
4042
- billing_mode: nil,
4043
- end_behavior: nil,
4044
- phases: nil,
4045
- prebilling: nil,
4046
- proration_behavior: nil
4047
- )
4048
- @amendments = amendments
4049
- @billing_behavior = billing_behavior
4050
- @billing_mode = billing_mode
4051
- @end_behavior = end_behavior
4052
- @phases = phases
4053
- @prebilling = prebilling
4054
- @proration_behavior = proration_behavior
621
+
622
+ def self.field_remappings
623
+ @field_remappings = {}
4055
624
  end
4056
625
  end
626
+ # Total shipping cost before any taxes are applied.
627
+ attr_reader :amount_subtotal
628
+ # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
629
+ attr_reader :amount_tax
630
+ # Total shipping cost after taxes are applied.
631
+ attr_reader :amount_total
632
+ # The ID of the ShippingRate for this invoice.
633
+ attr_reader :shipping_rate
634
+ # The taxes applied to the shipping rate.
635
+ attr_reader :taxes
4057
636
 
4058
- class SubscriptionDetails < Stripe::RequestParams
4059
- class BillingMode < Stripe::RequestParams
4060
- # Controls the calculation and orchestration of prorations and invoices for subscriptions.
4061
- attr_accessor :type
637
+ def self.inner_class_types
638
+ @inner_class_types = { taxes: Tax }
639
+ end
4062
640
 
4063
- def initialize(type: nil)
4064
- @type = type
4065
- end
641
+ def self.field_remappings
642
+ @field_remappings = {}
643
+ end
644
+ end
645
+
646
+ class ShippingDetails < Stripe::StripeObject
647
+ class Address < Stripe::StripeObject
648
+ # City, district, suburb, town, or village.
649
+ attr_reader :city
650
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
651
+ attr_reader :country
652
+ # Address line 1, such as the street, PO Box, or company name.
653
+ attr_reader :line1
654
+ # Address line 2, such as the apartment, suite, unit, or building.
655
+ attr_reader :line2
656
+ # ZIP or postal code.
657
+ attr_reader :postal_code
658
+ # State, county, province, or region.
659
+ attr_reader :state
660
+
661
+ def self.inner_class_types
662
+ @inner_class_types = {}
4066
663
  end
4067
664
 
4068
- class Item < Stripe::RequestParams
4069
- class BillingThresholds < Stripe::RequestParams
4070
- # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
4071
- attr_accessor :usage_gte
665
+ def self.field_remappings
666
+ @field_remappings = {}
667
+ end
668
+ end
669
+ # Attribute for field address
670
+ attr_reader :address
671
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
672
+ attr_reader :carrier
673
+ # Recipient name.
674
+ attr_reader :name
675
+ # Recipient phone (including extension).
676
+ attr_reader :phone
677
+ # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
678
+ attr_reader :tracking_number
4072
679
 
4073
- def initialize(usage_gte: nil)
4074
- @usage_gte = usage_gte
4075
- end
4076
- end
680
+ def self.inner_class_types
681
+ @inner_class_types = { address: Address }
682
+ end
4077
683
 
4078
- class Discount < Stripe::RequestParams
4079
- class DiscountEnd < Stripe::RequestParams
4080
- class Duration < Stripe::RequestParams
4081
- # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
4082
- attr_accessor :interval
4083
- # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
4084
- attr_accessor :interval_count
4085
-
4086
- def initialize(interval: nil, interval_count: nil)
4087
- @interval = interval
4088
- @interval_count = interval_count
4089
- end
4090
- end
4091
- # Time span for the redeemed discount.
4092
- attr_accessor :duration
4093
- # A precise Unix timestamp for the discount to end. Must be in the future.
4094
- attr_accessor :timestamp
4095
- # The type of calculation made to determine when the discount ends.
4096
- attr_accessor :type
4097
-
4098
- def initialize(duration: nil, timestamp: nil, type: nil)
4099
- @duration = duration
4100
- @timestamp = timestamp
4101
- @type = type
4102
- end
4103
- end
4104
- # ID of the coupon to create a new discount for.
4105
- attr_accessor :coupon
4106
- # ID of an existing discount on the object (or one of its ancestors) to reuse.
4107
- attr_accessor :discount
4108
- # Details to determine how long the discount should be applied for.
4109
- attr_accessor :discount_end
4110
- # ID of the promotion code to create a new discount for.
4111
- attr_accessor :promotion_code
4112
-
4113
- def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
4114
- @coupon = coupon
4115
- @discount = discount
4116
- @discount_end = discount_end
4117
- @promotion_code = promotion_code
4118
- end
4119
- end
684
+ def self.field_remappings
685
+ @field_remappings = {}
686
+ end
687
+ end
4120
688
 
4121
- class PriceData < Stripe::RequestParams
4122
- class Recurring < Stripe::RequestParams
4123
- # Specifies billing frequency. Either `day`, `week`, `month` or `year`.
4124
- attr_accessor :interval
4125
- # 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).
4126
- attr_accessor :interval_count
689
+ class StatusTransitions < Stripe::StripeObject
690
+ # The time that the invoice draft was finalized.
691
+ attr_reader :finalized_at
692
+ # The time that the invoice was marked uncollectible.
693
+ attr_reader :marked_uncollectible_at
694
+ # The time that the invoice was paid.
695
+ attr_reader :paid_at
696
+ # The time that the invoice was voided.
697
+ attr_reader :voided_at
4127
698
 
4128
- def initialize(interval: nil, interval_count: nil)
4129
- @interval = interval
4130
- @interval_count = interval_count
4131
- end
4132
- end
4133
- # 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).
4134
- attr_accessor :currency
4135
- # The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
4136
- attr_accessor :product
4137
- # The recurring components of a price such as `interval` and `interval_count`.
4138
- attr_accessor :recurring
4139
- # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
4140
- attr_accessor :tax_behavior
4141
- # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
4142
- attr_accessor :unit_amount
4143
- # 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.
4144
- attr_accessor :unit_amount_decimal
4145
-
4146
- def initialize(
4147
- currency: nil,
4148
- product: nil,
4149
- recurring: nil,
4150
- tax_behavior: nil,
4151
- unit_amount: nil,
4152
- unit_amount_decimal: nil
4153
- )
4154
- @currency = currency
4155
- @product = product
4156
- @recurring = recurring
4157
- @tax_behavior = tax_behavior
4158
- @unit_amount = unit_amount
4159
- @unit_amount_decimal = unit_amount_decimal
4160
- end
4161
- end
4162
- # 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.
4163
- attr_accessor :billing_thresholds
4164
- # 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.
4165
- attr_accessor :clear_usage
4166
- # A flag that, if set to `true`, will delete the specified item.
4167
- attr_accessor :deleted
4168
- # The coupons to redeem into discounts for the subscription item.
4169
- attr_accessor :discounts
4170
- # Subscription item to update.
4171
- attr_accessor :id
4172
- # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
4173
- attr_accessor :metadata
4174
- # Plan ID for this item, as a string.
4175
- attr_accessor :plan
4176
- # 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.
4177
- attr_accessor :price
4178
- # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
4179
- attr_accessor :price_data
4180
- # Quantity for this item.
4181
- attr_accessor :quantity
4182
- # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
4183
- attr_accessor :tax_rates
4184
-
4185
- def initialize(
4186
- billing_thresholds: nil,
4187
- clear_usage: nil,
4188
- deleted: nil,
4189
- discounts: nil,
4190
- id: nil,
4191
- metadata: nil,
4192
- plan: nil,
4193
- price: nil,
4194
- price_data: nil,
4195
- quantity: nil,
4196
- tax_rates: nil
4197
- )
4198
- @billing_thresholds = billing_thresholds
4199
- @clear_usage = clear_usage
4200
- @deleted = deleted
4201
- @discounts = discounts
4202
- @id = id
4203
- @metadata = metadata
4204
- @plan = plan
4205
- @price = price
4206
- @price_data = price_data
4207
- @quantity = quantity
4208
- @tax_rates = tax_rates
4209
- end
699
+ def self.inner_class_types
700
+ @inner_class_types = {}
701
+ end
702
+
703
+ def self.field_remappings
704
+ @field_remappings = {}
705
+ end
706
+ end
707
+
708
+ class ThresholdReason < Stripe::StripeObject
709
+ class ItemReason < Stripe::StripeObject
710
+ # The IDs of the line items that triggered the threshold invoice.
711
+ attr_reader :line_item_ids
712
+ # The quantity threshold boundary that applied to the given line item.
713
+ attr_reader :usage_gte
714
+
715
+ def self.inner_class_types
716
+ @inner_class_types = {}
4210
717
  end
4211
718
 
4212
- class Prebilling < Stripe::RequestParams
4213
- # This is used to determine the number of billing cycles to prebill.
4214
- attr_accessor :iterations
719
+ def self.field_remappings
720
+ @field_remappings = {}
721
+ end
722
+ end
723
+ # The total invoice amount threshold boundary if it triggered the threshold invoice.
724
+ attr_reader :amount_gte
725
+ # Indicates which line items triggered a threshold invoice.
726
+ attr_reader :item_reasons
4215
727
 
4216
- def initialize(iterations: nil)
4217
- @iterations = iterations
4218
- end
728
+ def self.inner_class_types
729
+ @inner_class_types = { item_reasons: ItemReason }
730
+ end
731
+
732
+ def self.field_remappings
733
+ @field_remappings = {}
734
+ end
735
+ end
736
+
737
+ class TotalDiscountAmount < Stripe::StripeObject
738
+ # The amount, in cents (or local equivalent), of the discount.
739
+ attr_reader :amount
740
+ # The discount that was applied to get this discount amount.
741
+ attr_reader :discount
742
+
743
+ def self.inner_class_types
744
+ @inner_class_types = {}
745
+ end
746
+
747
+ def self.field_remappings
748
+ @field_remappings = {}
749
+ end
750
+ end
751
+
752
+ class TotalPretaxCreditAmount < Stripe::StripeObject
753
+ # The amount, in cents (or local equivalent), of the pretax credit amount.
754
+ attr_reader :amount
755
+ # The credit balance transaction that was applied to get this pretax credit amount.
756
+ attr_reader :credit_balance_transaction
757
+ # The discount that was applied to get this pretax credit amount.
758
+ attr_reader :discount
759
+ # Type of the pretax credit amount referenced.
760
+ attr_reader :type
761
+
762
+ def self.inner_class_types
763
+ @inner_class_types = {}
764
+ end
765
+
766
+ def self.field_remappings
767
+ @field_remappings = {}
768
+ end
769
+ end
770
+
771
+ class TotalTax < Stripe::StripeObject
772
+ class TaxRateDetails < Stripe::StripeObject
773
+ # Attribute for field tax_rate
774
+ attr_reader :tax_rate
775
+
776
+ def self.inner_class_types
777
+ @inner_class_types = {}
4219
778
  end
4220
- # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/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`.
4221
- attr_accessor :billing_cycle_anchor
4222
- # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
4223
- attr_accessor :billing_mode
4224
- # 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.
4225
- attr_accessor :cancel_at
4226
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
4227
- attr_accessor :cancel_at_period_end
4228
- # This simulates the subscription being canceled or expired immediately.
4229
- attr_accessor :cancel_now
4230
- # 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.
4231
- attr_accessor :default_tax_rates
4232
- # A list of up to 20 subscription items, each with an attached price.
4233
- attr_accessor :items
4234
- # The pre-billing to apply to the subscription as a preview.
4235
- attr_accessor :prebilling
4236
- # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
4237
- attr_accessor :proration_behavior
4238
- # 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'.
4239
- attr_accessor :proration_date
4240
- # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
4241
- attr_accessor :resume_at
4242
- # Date a subscription is intended to start (can be future or past).
4243
- attr_accessor :start_date
4244
- # 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.
4245
- attr_accessor :trial_end
4246
-
4247
- def initialize(
4248
- billing_cycle_anchor: nil,
4249
- billing_mode: nil,
4250
- cancel_at: nil,
4251
- cancel_at_period_end: nil,
4252
- cancel_now: nil,
4253
- default_tax_rates: nil,
4254
- items: nil,
4255
- prebilling: nil,
4256
- proration_behavior: nil,
4257
- proration_date: nil,
4258
- resume_at: nil,
4259
- start_date: nil,
4260
- trial_end: nil
4261
- )
4262
- @billing_cycle_anchor = billing_cycle_anchor
4263
- @billing_mode = billing_mode
4264
- @cancel_at = cancel_at
4265
- @cancel_at_period_end = cancel_at_period_end
4266
- @cancel_now = cancel_now
4267
- @default_tax_rates = default_tax_rates
4268
- @items = items
4269
- @prebilling = prebilling
4270
- @proration_behavior = proration_behavior
4271
- @proration_date = proration_date
4272
- @resume_at = resume_at
4273
- @start_date = start_date
4274
- @trial_end = trial_end
779
+
780
+ def self.field_remappings
781
+ @field_remappings = {}
4275
782
  end
4276
783
  end
4277
- # Settings for automatic tax lookup for this invoice preview.
4278
- attr_accessor :automatic_tax
4279
- # The currency to preview this invoice in. Defaults to that of `customer` if not specified.
4280
- attr_accessor :currency
4281
- # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
4282
- attr_accessor :customer
4283
- # The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set.
4284
- attr_accessor :customer_account
4285
- # 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.
4286
- attr_accessor :customer_details
4287
- # 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.
4288
- attr_accessor :discounts
4289
- # Specifies which fields in the response should be expanded.
4290
- attr_accessor :expand
4291
- # List of invoice items to add or update in the upcoming invoice preview (up to 250).
4292
- attr_accessor :invoice_items
4293
- # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
4294
- attr_accessor :issuer
4295
- # 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://stripe.com/docs/billing/invoices/connect) documentation for details.
4296
- attr_accessor :on_behalf_of
4297
- # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
4298
- attr_accessor :preview_mode
4299
- # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
4300
- attr_accessor :schedule
4301
- # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
4302
- attr_accessor :schedule_details
4303
- # 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.
4304
- attr_accessor :subscription
4305
- # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
4306
- attr_accessor :subscription_details
4307
-
4308
- def initialize(
4309
- automatic_tax: nil,
4310
- currency: nil,
4311
- customer: nil,
4312
- customer_account: nil,
4313
- customer_details: nil,
4314
- discounts: nil,
4315
- expand: nil,
4316
- invoice_items: nil,
4317
- issuer: nil,
4318
- on_behalf_of: nil,
4319
- preview_mode: nil,
4320
- schedule: nil,
4321
- schedule_details: nil,
4322
- subscription: nil,
4323
- subscription_details: nil
4324
- )
4325
- @automatic_tax = automatic_tax
4326
- @currency = currency
4327
- @customer = customer
4328
- @customer_account = customer_account
4329
- @customer_details = customer_details
4330
- @discounts = discounts
4331
- @expand = expand
4332
- @invoice_items = invoice_items
4333
- @issuer = issuer
4334
- @on_behalf_of = on_behalf_of
4335
- @preview_mode = preview_mode
4336
- @schedule = schedule
4337
- @schedule_details = schedule_details
4338
- @subscription = subscription
4339
- @subscription_details = subscription_details
784
+ # The amount of the tax, in cents (or local equivalent).
785
+ attr_reader :amount
786
+ # Whether this tax is inclusive or exclusive.
787
+ attr_reader :tax_behavior
788
+ # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
789
+ attr_reader :tax_rate_details
790
+ # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
791
+ attr_reader :taxability_reason
792
+ # The amount on which tax is calculated, in cents (or local equivalent).
793
+ attr_reader :taxable_amount
794
+ # The type of tax information.
795
+ attr_reader :type
796
+
797
+ def self.inner_class_types
798
+ @inner_class_types = { tax_rate_details: TaxRateDetails }
799
+ end
800
+
801
+ def self.field_remappings
802
+ @field_remappings = {}
4340
803
  end
4341
804
  end
4342
805
  # The country of the business associated with this invoice, most often the business creating the invoice.
@@ -4355,8 +818,6 @@ module Stripe
4355
818
  attr_reader :amount_remaining
4356
819
  # This is the sum of all the shipping amounts.
4357
820
  attr_reader :amount_shipping
4358
- # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
4359
- attr_reader :amounts_due
4360
821
  # ID of the Connect Application that created the invoice.
4361
822
  attr_reader :application
4362
823
  # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
@@ -4391,8 +852,6 @@ module Stripe
4391
852
  attr_reader :custom_fields
4392
853
  # The ID of the customer who will be billed.
4393
854
  attr_reader :customer
4394
- # The ID of the account who will be billed.
4395
- attr_reader :customer_account
4396
855
  # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
4397
856
  attr_reader :customer_address
4398
857
  # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
@@ -4407,8 +866,6 @@ module Stripe
4407
866
  attr_reader :customer_tax_exempt
4408
867
  # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.
4409
868
  attr_reader :customer_tax_ids
4410
- # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
4411
- attr_reader :default_margins
4412
869
  # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
4413
870
  attr_reader :default_payment_method
4414
871
  # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
@@ -4499,8 +956,6 @@ module Stripe
4499
956
  attr_reader :total_discount_amounts
4500
957
  # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
4501
958
  attr_reader :total_excluding_tax
4502
- # The aggregate amounts calculated per margin across all line items.
4503
- attr_reader :total_margin_amounts
4504
959
  # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
4505
960
  attr_reader :total_pretax_credit_amounts
4506
961
  # The aggregate tax information of all line items.
@@ -4786,5 +1241,33 @@ module Stripe
4786
1241
  opts: opts
4787
1242
  )
4788
1243
  end
1244
+
1245
+ def self.inner_class_types
1246
+ @inner_class_types = {
1247
+ automatic_tax: AutomaticTax,
1248
+ confirmation_secret: ConfirmationSecret,
1249
+ custom_fields: CustomField,
1250
+ customer_address: CustomerAddress,
1251
+ customer_shipping: CustomerShipping,
1252
+ customer_tax_ids: CustomerTaxId,
1253
+ from_invoice: FromInvoice,
1254
+ issuer: Issuer,
1255
+ last_finalization_error: LastFinalizationError,
1256
+ parent: Parent,
1257
+ payment_settings: PaymentSettings,
1258
+ rendering: Rendering,
1259
+ shipping_cost: ShippingCost,
1260
+ shipping_details: ShippingDetails,
1261
+ status_transitions: StatusTransitions,
1262
+ threshold_reason: ThresholdReason,
1263
+ total_discount_amounts: TotalDiscountAmount,
1264
+ total_pretax_credit_amounts: TotalPretaxCreditAmount,
1265
+ total_taxes: TotalTax,
1266
+ }
1267
+ end
1268
+
1269
+ def self.field_remappings
1270
+ @field_remappings = {}
1271
+ end
4789
1272
  end
4790
1273
  end