stripe 17.0.0 → 17.1.0.pre.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (509) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_requestor.rb +34 -0
  3. data/lib/stripe/api_version.rb +1 -2
  4. data/lib/stripe/errors.rb +63 -0
  5. data/lib/stripe/event_types.rb +236 -0
  6. data/lib/stripe/events/v2_billing_bill_setting_updated_event.rb +61 -0
  7. data/lib/stripe/events/v2_core_account_closed_event.rb +44 -0
  8. data/lib/stripe/events/v2_core_account_created_event.rb +44 -0
  9. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +63 -0
  10. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +44 -0
  11. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +63 -0
  12. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +44 -0
  13. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +63 -0
  14. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +44 -0
  15. data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +63 -0
  16. data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +44 -0
  17. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +44 -0
  18. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +44 -0
  19. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +44 -0
  20. data/lib/stripe/events/v2_core_account_link_returned_event.rb +42 -0
  21. data/lib/stripe/events/v2_core_account_person_created_event.rb +61 -0
  22. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +61 -0
  23. data/lib/stripe/events/v2_core_account_person_updated_event.rb +61 -0
  24. data/lib/stripe/events/v2_core_account_updated_event.rb +44 -0
  25. data/lib/stripe/events/v2_money_management_adjustment_created_event.rb +44 -0
  26. data/lib/stripe/events/v2_money_management_financial_account_created_event.rb +44 -0
  27. data/lib/stripe/events/v2_money_management_financial_account_updated_event.rb +44 -0
  28. data/lib/stripe/events/v2_money_management_financial_address_activated_event.rb +44 -0
  29. data/lib/stripe/events/v2_money_management_financial_address_failed_event.rb +44 -0
  30. data/lib/stripe/events/v2_money_management_inbound_transfer_available_event.rb +61 -0
  31. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +44 -0
  32. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +44 -0
  33. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +44 -0
  34. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +44 -0
  35. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +44 -0
  36. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +44 -0
  37. data/lib/stripe/events/v2_money_management_outbound_payment_created_event.rb +44 -0
  38. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +44 -0
  39. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +44 -0
  40. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +44 -0
  41. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +44 -0
  42. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +44 -0
  43. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +44 -0
  44. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +44 -0
  45. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +44 -0
  46. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +44 -0
  47. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +44 -0
  48. data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +44 -0
  49. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +61 -0
  50. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +44 -0
  51. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +44 -0
  52. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +44 -0
  53. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +44 -0
  54. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +44 -0
  55. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +44 -0
  56. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +44 -0
  57. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +44 -0
  58. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +44 -0
  59. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +44 -0
  60. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +44 -0
  61. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +46 -0
  62. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +44 -0
  63. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +44 -0
  64. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +44 -0
  65. data/lib/stripe/events/v2_payments_off_session_payment_requires_capture_event.rb +44 -0
  66. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +44 -0
  67. data/lib/stripe/object_types.rb +58 -0
  68. data/lib/stripe/params/account_create_params.rb +300 -1
  69. data/lib/stripe/params/account_notice_list_params.rb +25 -0
  70. data/lib/stripe/params/account_notice_retrieve_params.rb +13 -0
  71. data/lib/stripe/params/account_notice_update_params.rb +36 -0
  72. data/lib/stripe/params/account_session_create_params.rb +226 -1
  73. data/lib/stripe/params/account_update_params.rb +262 -0
  74. data/lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb +65 -0
  75. data/lib/stripe/params/billing/credit_balance_summary_retrieve_params.rb +4 -1
  76. data/lib/stripe/params/billing/credit_balance_transaction_list_params.rb +4 -0
  77. data/lib/stripe/params/billing/credit_grant_create_params.rb +4 -0
  78. data/lib/stripe/params/billing/credit_grant_list_params.rb +4 -0
  79. data/lib/stripe/params/billing_portal/session_create_params.rb +4 -0
  80. data/lib/stripe/params/capital/financing_offer_list_params.rb +58 -0
  81. data/lib/stripe/params/capital/financing_offer_mark_delivered_params.rb +15 -0
  82. data/lib/stripe/params/capital/financing_offer_retrieve_params.rb +15 -0
  83. data/lib/stripe/params/capital/financing_summary_retrieve_params.rb +15 -0
  84. data/lib/stripe/params/capital/financing_transaction_list_params.rb +45 -0
  85. data/lib/stripe/params/capital/financing_transaction_retrieve_params.rb +15 -0
  86. data/lib/stripe/params/charge_capture_params.rb +709 -0
  87. data/lib/stripe/params/charge_update_params.rb +709 -0
  88. data/lib/stripe/params/checkout/session_create_params.rb +193 -3
  89. data/lib/stripe/params/checkout/session_list_params.rb +4 -0
  90. data/lib/stripe/params/checkout/session_update_params.rb +288 -1
  91. data/lib/stripe/params/confirmation_token_create_params.rb +97 -0
  92. data/lib/stripe/params/coupon_create_params.rb +17 -1
  93. data/lib/stripe/params/credit_note_list_params.rb +4 -0
  94. data/lib/stripe/params/customer_session_create_params.rb +4 -1
  95. data/lib/stripe/params/dispute_update_params.rb +10 -1
  96. data/lib/stripe/params/external_account_create_params.rb +134 -0
  97. data/lib/stripe/params/external_account_delete_params.rb +6 -0
  98. data/lib/stripe/params/external_account_list_params.rb +25 -0
  99. data/lib/stripe/params/external_account_retrieve_params.rb +13 -0
  100. data/lib/stripe/params/external_account_update_params.rb +91 -0
  101. data/lib/stripe/params/financial_connections/account_inferred_balance_list_params.rb +24 -0
  102. data/lib/stripe/params/financial_connections/account_list_params.rb +4 -1
  103. data/lib/stripe/params/financial_connections/institution_list_params.rb +24 -0
  104. data/lib/stripe/params/financial_connections/institution_retrieve_params.rb +15 -0
  105. data/lib/stripe/params/financial_connections/session_create_params.rb +34 -2
  106. data/lib/stripe/params/fx_quote_create_params.rb +73 -0
  107. data/lib/stripe/params/fx_quote_list_params.rb +22 -0
  108. data/lib/stripe/params/fx_quote_retrieve_params.rb +13 -0
  109. data/lib/stripe/params/identity/verification_session_create_params.rb +4 -0
  110. data/lib/stripe/params/identity/verification_session_list_params.rb +4 -0
  111. data/lib/stripe/params/invoice_add_lines_params.rb +33 -1
  112. data/lib/stripe/params/invoice_attach_payment_params.rb +46 -1
  113. data/lib/stripe/params/invoice_create_params.rb +112 -2
  114. data/lib/stripe/params/invoice_create_preview_params.rb +826 -9
  115. data/lib/stripe/params/invoice_item_create_params.rb +37 -1
  116. data/lib/stripe/params/invoice_item_list_params.rb +4 -0
  117. data/lib/stripe/params/invoice_item_update_params.rb +33 -1
  118. data/lib/stripe/params/invoice_line_item_update_params.rb +33 -1
  119. data/lib/stripe/params/invoice_list_params.rb +4 -0
  120. data/lib/stripe/params/invoice_payment_list_params.rb +4 -1
  121. data/lib/stripe/params/invoice_update_lines_params.rb +33 -1
  122. data/lib/stripe/params/invoice_update_params.rb +108 -2
  123. data/lib/stripe/params/issuing/cardholder_create_params.rb +2 -1
  124. data/lib/stripe/params/issuing/credit_underwriting_record_correct_params.rb +163 -0
  125. data/lib/stripe/params/issuing/credit_underwriting_record_create_from_application_params.rb +50 -0
  126. data/lib/stripe/params/issuing/credit_underwriting_record_create_from_proactive_review_params.rb +128 -0
  127. data/lib/stripe/params/issuing/credit_underwriting_record_list_params.rb +24 -0
  128. data/lib/stripe/params/issuing/credit_underwriting_record_report_decision_params.rb +86 -0
  129. data/lib/stripe/params/issuing/credit_underwriting_record_retrieve_params.rb +15 -0
  130. data/lib/stripe/params/issuing/dispute_settlement_detail_list_params.rb +33 -0
  131. data/lib/stripe/params/issuing/dispute_settlement_detail_retrieve_params.rb +15 -0
  132. data/lib/stripe/params/issuing/fraud_liability_debit_list_params.rb +44 -0
  133. data/lib/stripe/params/issuing/fraud_liability_debit_retrieve_params.rb +15 -0
  134. data/lib/stripe/params/issuing/transaction_list_params.rb +4 -0
  135. data/lib/stripe/params/mandate_list_params.rb +39 -0
  136. data/lib/stripe/params/margin_create_params.rb +25 -0
  137. data/lib/stripe/params/margin_list_params.rb +25 -0
  138. data/lib/stripe/params/margin_retrieve_params.rb +13 -0
  139. data/lib/stripe/params/margin_update_params.rb +22 -0
  140. data/lib/stripe/params/order_cancel_params.rb +13 -0
  141. data/lib/stripe/params/order_create_params.rb +1124 -0
  142. data/lib/stripe/params/order_line_item_list_params.rb +22 -0
  143. data/lib/stripe/params/order_list_line_items_params.rb +22 -0
  144. data/lib/stripe/params/order_list_params.rb +25 -0
  145. data/lib/stripe/params/order_reopen_params.rb +13 -0
  146. data/lib/stripe/params/order_retrieve_params.rb +13 -0
  147. data/lib/stripe/params/order_submit_params.rb +16 -0
  148. data/lib/stripe/params/order_update_params.rb +1128 -0
  149. data/lib/stripe/params/payment_attempt_record_list_params.rb +19 -0
  150. data/lib/stripe/params/payment_attempt_record_retrieve_params.rb +13 -0
  151. data/lib/stripe/params/payment_intent_amount_details_line_item_list_params.rb +22 -0
  152. data/lib/stripe/params/payment_intent_capture_params.rb +895 -0
  153. data/lib/stripe/params/payment_intent_confirm_params.rb +1373 -7
  154. data/lib/stripe/params/payment_intent_create_params.rb +1387 -13
  155. data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +73 -0
  156. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +223 -0
  157. data/lib/stripe/params/payment_intent_list_params.rb +4 -0
  158. data/lib/stripe/params/payment_intent_trigger_action_params.rb +27 -0
  159. data/lib/stripe/params/payment_intent_update_params.rb +1409 -4
  160. data/lib/stripe/params/payment_method_attach_params.rb +4 -1
  161. data/lib/stripe/params/payment_method_configuration_create_params.rb +126 -0
  162. data/lib/stripe/params/payment_method_configuration_update_params.rb +126 -0
  163. data/lib/stripe/params/payment_method_create_params.rb +97 -0
  164. data/lib/stripe/params/payment_method_update_params.rb +19 -0
  165. data/lib/stripe/params/payment_record_report_payment_attempt_canceled_params.rb +19 -0
  166. data/lib/stripe/params/payment_record_report_payment_attempt_failed_params.rb +19 -0
  167. data/lib/stripe/params/payment_record_report_payment_attempt_guaranteed_params.rb +19 -0
  168. data/lib/stripe/params/payment_record_report_payment_attempt_informational_params.rb +93 -0
  169. data/lib/stripe/params/payment_record_report_payment_attempt_params.rb +186 -0
  170. data/lib/stripe/params/payment_record_report_payment_params.rb +252 -0
  171. data/lib/stripe/params/payment_record_retrieve_params.rb +13 -0
  172. data/lib/stripe/params/price_update_params.rb +19 -0
  173. data/lib/stripe/params/privacy/redaction_job_cancel_params.rb +15 -0
  174. data/lib/stripe/params/privacy/redaction_job_create_params.rb +67 -0
  175. data/lib/stripe/params/privacy/redaction_job_list_params.rb +27 -0
  176. data/lib/stripe/params/privacy/redaction_job_retrieve_params.rb +15 -0
  177. data/lib/stripe/params/privacy/redaction_job_run_params.rb +15 -0
  178. data/lib/stripe/params/privacy/redaction_job_update_params.rb +18 -0
  179. data/lib/stripe/params/privacy/redaction_job_validate_params.rb +15 -0
  180. data/lib/stripe/params/privacy/redaction_job_validation_error_list_params.rb +24 -0
  181. data/lib/stripe/params/promotion_code_create_params.rb +4 -0
  182. data/lib/stripe/params/promotion_code_list_params.rb +4 -0
  183. data/lib/stripe/params/quote_create_params.rb +805 -3
  184. data/lib/stripe/params/quote_line_list_params.rb +22 -0
  185. data/lib/stripe/params/quote_list_lines_params.rb +22 -0
  186. data/lib/stripe/params/quote_list_params.rb +8 -0
  187. data/lib/stripe/params/quote_list_preview_invoice_lines_params.rb +22 -0
  188. data/lib/stripe/params/quote_mark_draft_params.rb +13 -0
  189. data/lib/stripe/params/quote_mark_stale_params.rb +16 -0
  190. data/lib/stripe/params/quote_preview_invoice_list_params.rb +22 -0
  191. data/lib/stripe/params/quote_preview_subscription_schedule_list_params.rb +22 -0
  192. data/lib/stripe/params/quote_reestimate_params.rb +13 -0
  193. data/lib/stripe/params/quote_update_params.rb +813 -4
  194. data/lib/stripe/params/setup_intent_confirm_params.rb +225 -3
  195. data/lib/stripe/params/setup_intent_create_params.rb +231 -3
  196. data/lib/stripe/params/setup_intent_list_params.rb +4 -0
  197. data/lib/stripe/params/setup_intent_update_params.rb +231 -3
  198. data/lib/stripe/params/subscription_attach_cadence_params.rb +16 -0
  199. data/lib/stripe/params/subscription_create_params.rb +259 -5
  200. data/lib/stripe/params/subscription_item_create_params.rb +46 -2
  201. data/lib/stripe/params/subscription_item_update_params.rb +29 -1
  202. data/lib/stripe/params/subscription_list_params.rb +4 -0
  203. data/lib/stripe/params/subscription_schedule_amend_params.rb +570 -0
  204. data/lib/stripe/params/subscription_schedule_create_params.rb +167 -5
  205. data/lib/stripe/params/subscription_schedule_list_params.rb +4 -0
  206. data/lib/stripe/params/subscription_schedule_update_params.rb +163 -5
  207. data/lib/stripe/params/subscription_update_params.rb +238 -4
  208. data/lib/stripe/params/tax/association_find_params.rb +18 -0
  209. data/lib/stripe/params/tax/form_list_params.rb +51 -0
  210. data/lib/stripe/params/tax/form_pdf_params.rb +15 -0
  211. data/lib/stripe/params/tax/form_retrieve_params.rb +15 -0
  212. data/lib/stripe/params/tax_id_create_params.rb +4 -1
  213. data/lib/stripe/params/tax_id_list_params.rb +4 -1
  214. data/lib/stripe/params/terminal/configuration_create_params.rb +13 -0
  215. data/lib/stripe/params/terminal/configuration_update_params.rb +13 -0
  216. data/lib/stripe/params/terminal/onboarding_link_create_params.rb +43 -0
  217. data/lib/stripe/params/terminal/reader_collected_data_retrieve_params.rb +15 -0
  218. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +97 -0
  219. data/lib/stripe/params/test_helpers/treasury/received_credit_create_params.rb +25 -1
  220. data/lib/stripe/params/test_helpers/treasury/received_debit_create_params.rb +25 -1
  221. data/lib/stripe/params/transfer_create_params.rb +4 -0
  222. data/lib/stripe/params/treasury/financial_account_create_params.rb +8 -1
  223. data/lib/stripe/params/treasury/financial_account_features_update_params.rb +4 -1
  224. data/lib/stripe/params/treasury/financial_account_update_features_params.rb +4 -1
  225. data/lib/stripe/params/treasury/financial_account_update_params.rb +8 -1
  226. data/lib/stripe/params/treasury/outbound_transfer_create_params.rb +24 -0
  227. data/lib/stripe/params/treasury/received_credit_create_params.rb +25 -1
  228. data/lib/stripe/params/treasury/received_debit_create_params.rb +25 -1
  229. data/lib/stripe/params/v2/billing/bill_setting_create_params.rb +74 -0
  230. data/lib/stripe/params/v2/billing/bill_setting_list_params.rb +21 -0
  231. data/lib/stripe/params/v2/billing/bill_setting_retrieve_params.rb +10 -0
  232. data/lib/stripe/params/v2/billing/bill_setting_update_params.rb +80 -0
  233. data/lib/stripe/params/v2/billing/bill_settings/version_list_params.rb +19 -0
  234. data/lib/stripe/params/v2/billing/bill_settings/version_retrieve_params.rb +12 -0
  235. data/lib/stripe/params/v2/billing/cadence_cancel_params.rb +10 -0
  236. data/lib/stripe/params/v2/billing/cadence_create_params.rb +253 -0
  237. data/lib/stripe/params/v2/billing/cadence_list_params.rb +43 -0
  238. data/lib/stripe/params/v2/billing/cadence_retrieve_params.rb +17 -0
  239. data/lib/stripe/params/v2/billing/cadence_update_params.rb +75 -0
  240. data/lib/stripe/params/v2/billing/collection_setting_create_params.rb +223 -0
  241. data/lib/stripe/params/v2/billing/collection_setting_list_params.rb +21 -0
  242. data/lib/stripe/params/v2/billing/collection_setting_retrieve_params.rb +10 -0
  243. data/lib/stripe/params/v2/billing/collection_setting_update_params.rb +229 -0
  244. data/lib/stripe/params/v2/billing/collection_settings/version_list_params.rb +19 -0
  245. data/lib/stripe/params/v2/billing/collection_settings/version_retrieve_params.rb +12 -0
  246. data/lib/stripe/params/v2/billing/profile_create_params.rb +37 -0
  247. data/lib/stripe/params/v2/billing/profile_list_params.rb +40 -0
  248. data/lib/stripe/params/v2/billing/profile_retrieve_params.rb +10 -0
  249. data/lib/stripe/params/v2/billing/profile_update_params.rb +35 -0
  250. data/lib/stripe/params/v2/core/account_close_params.rb +17 -0
  251. data/lib/stripe/params/v2/core/account_create_params.rb +2217 -0
  252. data/lib/stripe/params/v2/core/account_link_create_params.rb +101 -0
  253. data/lib/stripe/params/v2/core/account_list_params.rb +20 -0
  254. data/lib/stripe/params/v2/core/account_retrieve_params.rb +17 -0
  255. data/lib/stripe/params/v2/core/account_update_params.rb +2245 -0
  256. data/lib/stripe/params/v2/core/accounts/person_create_params.rb +493 -0
  257. data/lib/stripe/params/v2/core/accounts/person_delete_params.rb +12 -0
  258. data/lib/stripe/params/v2/core/accounts/person_list_params.rb +19 -0
  259. data/lib/stripe/params/v2/core/accounts/person_retrieve_params.rb +12 -0
  260. data/lib/stripe/params/v2/core/accounts/person_update_params.rb +493 -0
  261. data/lib/stripe/params/v2/core/vault/gb_bank_account_acknowledge_confirmation_of_payee_params.rb +12 -0
  262. data/lib/stripe/params/v2/core/vault/gb_bank_account_archive_params.rb +12 -0
  263. data/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb +50 -0
  264. data/lib/stripe/params/v2/core/vault/gb_bank_account_initiate_confirmation_of_payee_params.rb +22 -0
  265. data/lib/stripe/params/v2/core/vault/gb_bank_account_retrieve_params.rb +12 -0
  266. data/lib/stripe/params/v2/core/vault/us_bank_account_archive_params.rb +12 -0
  267. data/lib/stripe/params/v2/core/vault/us_bank_account_create_params.rb +33 -0
  268. data/lib/stripe/params/v2/core/vault/us_bank_account_retrieve_params.rb +12 -0
  269. data/lib/stripe/params/v2/core/vault/us_bank_account_update_params.rb +22 -0
  270. data/lib/stripe/params/v2/money_management/adjustment_list_params.rb +48 -0
  271. data/lib/stripe/params/v2/money_management/adjustment_retrieve_params.rb +10 -0
  272. data/lib/stripe/params/v2/money_management/financial_account_close_params.rb +28 -0
  273. data/lib/stripe/params/v2/money_management/financial_account_create_params.rb +34 -0
  274. data/lib/stripe/params/v2/money_management/financial_account_list_params.rb +20 -0
  275. data/lib/stripe/params/v2/money_management/financial_account_retrieve_params.rb +10 -0
  276. data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +20 -0
  277. data/lib/stripe/params/v2/money_management/financial_address_list_params.rb +23 -0
  278. data/lib/stripe/params/v2/money_management/financial_address_retrieve_params.rb +17 -0
  279. data/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb +50 -0
  280. data/lib/stripe/params/v2/money_management/inbound_transfer_list_params.rb +44 -0
  281. data/lib/stripe/params/v2/money_management/inbound_transfer_retrieve_params.rb +10 -0
  282. data/lib/stripe/params/v2/money_management/outbound_payment_cancel_params.rb +10 -0
  283. data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +98 -0
  284. data/lib/stripe/params/v2/money_management/outbound_payment_list_params.rb +52 -0
  285. data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +67 -0
  286. data/lib/stripe/params/v2/money_management/outbound_payment_quote_retrieve_params.rb +10 -0
  287. data/lib/stripe/params/v2/money_management/outbound_payment_retrieve_params.rb +10 -0
  288. data/lib/stripe/params/v2/money_management/outbound_setup_intent_cancel_params.rb +10 -0
  289. data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +85 -0
  290. data/lib/stripe/params/v2/money_management/outbound_setup_intent_list_params.rb +17 -0
  291. data/lib/stripe/params/v2/money_management/outbound_setup_intent_retrieve_params.rb +10 -0
  292. data/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb +80 -0
  293. data/lib/stripe/params/v2/money_management/outbound_transfer_cancel_params.rb +10 -0
  294. data/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb +77 -0
  295. data/lib/stripe/params/v2/money_management/outbound_transfer_list_params.rb +48 -0
  296. data/lib/stripe/params/v2/money_management/outbound_transfer_retrieve_params.rb +10 -0
  297. data/lib/stripe/params/v2/money_management/payout_method_archive_params.rb +10 -0
  298. data/lib/stripe/params/v2/money_management/payout_method_list_params.rb +31 -0
  299. data/lib/stripe/params/v2/money_management/payout_method_retrieve_params.rb +10 -0
  300. data/lib/stripe/params/v2/money_management/payout_method_unarchive_params.rb +10 -0
  301. data/lib/stripe/params/v2/money_management/payout_methods_bank_account_spec_retrieve_params.rb +17 -0
  302. data/lib/stripe/params/v2/money_management/received_credit_list_params.rb +44 -0
  303. data/lib/stripe/params/v2/money_management/received_credit_retrieve_params.rb +10 -0
  304. data/lib/stripe/params/v2/money_management/received_debit_list_params.rb +17 -0
  305. data/lib/stripe/params/v2/money_management/received_debit_retrieve_params.rb +10 -0
  306. data/lib/stripe/params/v2/money_management/transaction_entry_list_params.rb +43 -0
  307. data/lib/stripe/params/v2/money_management/transaction_entry_retrieve_params.rb +10 -0
  308. data/lib/stripe/params/v2/money_management/transaction_list_params.rb +47 -0
  309. data/lib/stripe/params/v2/money_management/transaction_retrieve_params.rb +10 -0
  310. data/lib/stripe/params/v2/payments/off_session_payment_cancel_params.rb +10 -0
  311. data/lib/stripe/params/v2/payments/off_session_payment_capture_params.rb +61 -0
  312. data/lib/stripe/params/v2/payments/off_session_payment_create_params.rb +237 -0
  313. data/lib/stripe/params/v2/payments/off_session_payment_list_params.rb +17 -0
  314. data/lib/stripe/params/v2/payments/off_session_payment_retrieve_params.rb +10 -0
  315. data/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb +23 -0
  316. data/lib/stripe/params/v2/test_helpers/financial_address_generate_microdeposits_params.rb +10 -0
  317. data/lib/stripe/params.rb +169 -0
  318. data/lib/stripe/resources/account.rb +166 -1
  319. data/lib/stripe/resources/account_notice.rb +94 -0
  320. data/lib/stripe/resources/account_session.rb +81 -0
  321. data/lib/stripe/resources/billing/analytics/meter_usage.rb +33 -0
  322. data/lib/stripe/resources/billing/analytics/meter_usage_row.rb +38 -0
  323. data/lib/stripe/resources/billing/credit_balance_summary.rb +2 -0
  324. data/lib/stripe/resources/billing/credit_grant.rb +2 -0
  325. data/lib/stripe/resources/billing_portal/session.rb +2 -0
  326. data/lib/stripe/resources/capital/financing_offer.rb +142 -0
  327. data/lib/stripe/resources/capital/financing_summary.rb +79 -0
  328. data/lib/stripe/resources/capital/financing_transaction.rb +99 -0
  329. data/lib/stripe/resources/card.rb +2 -0
  330. data/lib/stripe/resources/cash_balance.rb +2 -0
  331. data/lib/stripe/resources/charge.rb +234 -1
  332. data/lib/stripe/resources/checkout/session.rb +154 -4
  333. data/lib/stripe/resources/confirmation_token.rb +155 -0
  334. data/lib/stripe/resources/coupon.rb +26 -1
  335. data/lib/stripe/resources/credit_note.rb +2 -0
  336. data/lib/stripe/resources/credit_note_line_item.rb +18 -0
  337. data/lib/stripe/resources/customer.rb +2 -0
  338. data/lib/stripe/resources/customer_balance_transaction.rb +2 -0
  339. data/lib/stripe/resources/customer_cash_balance_transaction.rb +2 -0
  340. data/lib/stripe/resources/customer_session.rb +2 -0
  341. data/lib/stripe/resources/discount.rb +2 -0
  342. data/lib/stripe/resources/dispute.rb +22 -0
  343. data/lib/stripe/resources/event.rb +64 -1
  344. data/lib/stripe/resources/financial_connections/account.rb +27 -0
  345. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +35 -0
  346. data/lib/stripe/resources/financial_connections/institution.rb +127 -0
  347. data/lib/stripe/resources/financial_connections/session.rb +67 -1
  348. data/lib/stripe/resources/fx_quote.rb +147 -0
  349. data/lib/stripe/resources/identity/verification_session.rb +2 -0
  350. data/lib/stripe/resources/invoice.rb +152 -1
  351. data/lib/stripe/resources/invoice_item.rb +4 -0
  352. data/lib/stripe/resources/invoice_line_item.rb +40 -0
  353. data/lib/stripe/resources/invoice_payment.rb +2 -0
  354. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +263 -0
  355. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +71 -0
  356. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +51 -0
  357. data/lib/stripe/resources/issuing/settlement.rb +61 -0
  358. data/lib/stripe/resources/issuing/transaction.rb +2 -0
  359. data/lib/stripe/resources/line_item.rb +68 -1
  360. data/lib/stripe/resources/mandate.rb +71 -0
  361. data/lib/stripe/resources/margin.rb +64 -0
  362. data/lib/stripe/resources/order.rb +987 -0
  363. data/lib/stripe/resources/payment_attempt_record.rb +2102 -0
  364. data/lib/stripe/resources/payment_intent.rb +848 -4
  365. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +128 -0
  366. data/lib/stripe/resources/payment_method.rb +157 -0
  367. data/lib/stripe/resources/payment_method_configuration.rb +204 -0
  368. data/lib/stripe/resources/payment_record.rb +2208 -0
  369. data/lib/stripe/resources/price.rb +20 -0
  370. data/lib/stripe/resources/privacy/redaction_job.rb +187 -0
  371. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +49 -0
  372. data/lib/stripe/resources/promotion_code.rb +2 -0
  373. data/lib/stripe/resources/quote.rb +571 -2
  374. data/lib/stripe/resources/quote_line.rb +521 -0
  375. data/lib/stripe/resources/quote_preview_invoice.rb +1150 -0
  376. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +732 -0
  377. data/lib/stripe/resources/refund.rb +18 -0
  378. data/lib/stripe/resources/setup_attempt.rb +63 -0
  379. data/lib/stripe/resources/setup_intent.rb +132 -1
  380. data/lib/stripe/resources/source.rb +38 -0
  381. data/lib/stripe/resources/subscription.rb +232 -0
  382. data/lib/stripe/resources/subscription_item.rb +20 -1
  383. data/lib/stripe/resources/subscription_schedule.rb +198 -3
  384. data/lib/stripe/resources/tax/association.rb +86 -0
  385. data/lib/stripe/resources/tax/form.rb +264 -0
  386. data/lib/stripe/resources/tax_id.rb +4 -0
  387. data/lib/stripe/resources/terminal/configuration.rb +16 -0
  388. data/lib/stripe/resources/terminal/onboarding_link.rb +71 -0
  389. data/lib/stripe/resources/terminal/reader.rb +8 -0
  390. data/lib/stripe/resources/terminal/reader_collected_data.rb +47 -0
  391. data/lib/stripe/resources/transfer.rb +2 -0
  392. data/lib/stripe/resources/treasury/financial_account.rb +2 -0
  393. data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
  394. data/lib/stripe/resources/treasury/outbound_transfer.rb +30 -0
  395. data/lib/stripe/resources/treasury/received_credit.rb +30 -0
  396. data/lib/stripe/resources/treasury/received_debit.rb +32 -0
  397. data/lib/stripe/resources/v2/billing/bill_setting.rb +102 -0
  398. data/lib/stripe/resources/v2/billing/bill_setting_version.rb +90 -0
  399. data/lib/stripe/resources/v2/billing/cadence.rb +609 -0
  400. data/lib/stripe/resources/v2/billing/collection_setting.rb +274 -0
  401. data/lib/stripe/resources/v2/billing/collection_setting_version.rb +262 -0
  402. data/lib/stripe/resources/v2/billing/profile.rb +46 -0
  403. data/lib/stripe/resources/v2/core/account.rb +3851 -0
  404. data/lib/stripe/resources/v2/core/account_link.rb +123 -0
  405. data/lib/stripe/resources/v2/core/account_person.rb +477 -0
  406. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +114 -0
  407. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +47 -0
  408. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +28 -0
  409. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +30 -0
  410. data/lib/stripe/resources/v2/money_management/adjustment.rb +67 -0
  411. data/lib/stripe/resources/v2/money_management/financial_account.rb +140 -0
  412. data/lib/stripe/resources/v2/money_management/financial_address.rb +132 -0
  413. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +148 -0
  414. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +217 -0
  415. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +144 -0
  416. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +69 -0
  417. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +196 -0
  418. data/lib/stripe/resources/v2/money_management/payout_method.rb +109 -0
  419. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +81 -0
  420. data/lib/stripe/resources/v2/money_management/received_credit.rb +228 -0
  421. data/lib/stripe/resources/v2/money_management/received_debit.rb +136 -0
  422. data/lib/stripe/resources/v2/money_management/transaction.rb +116 -0
  423. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +105 -0
  424. data/lib/stripe/resources/v2/payments/off_session_payment.rb +242 -0
  425. data/lib/stripe/resources.rb +116 -0
  426. data/lib/stripe/services/account_notice_service.rb +39 -0
  427. data/lib/stripe/services/billing/analytics/meter_usage_service.rb +21 -0
  428. data/lib/stripe/services/billing/analytics_service.rb +15 -0
  429. data/lib/stripe/services/billing_service.rb +2 -1
  430. data/lib/stripe/services/capital/financing_offer_service.rb +42 -0
  431. data/lib/stripe/services/capital/financing_summary_service.rb +19 -0
  432. data/lib/stripe/services/capital/financing_transaction_service.rb +31 -0
  433. data/lib/stripe/services/capital_service.rb +15 -0
  434. data/lib/stripe/services/external_account_service.rb +68 -0
  435. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
  436. data/lib/stripe/services/financial_connections/account_service.rb +3 -1
  437. data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
  438. data/lib/stripe/services/financial_connections_service.rb +2 -1
  439. data/lib/stripe/services/fx_quote_service.rb +27 -0
  440. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
  441. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
  442. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +30 -0
  443. data/lib/stripe/services/issuing_service.rb +5 -1
  444. data/lib/stripe/services/mandate_service.rb +5 -0
  445. data/lib/stripe/services/margin_service.rb +50 -0
  446. data/lib/stripe/services/order_line_item_service.rb +17 -0
  447. data/lib/stripe/services/order_service.rb +78 -0
  448. data/lib/stripe/services/payment_attempt_record_service.rb +28 -0
  449. data/lib/stripe/services/payment_intent_amount_details_line_item_service.rb +17 -0
  450. data/lib/stripe/services/payment_intent_service.rb +44 -0
  451. data/lib/stripe/services/payment_record_service.rb +89 -0
  452. data/lib/stripe/services/privacy/redaction_job_service.rb +104 -0
  453. data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +19 -0
  454. data/lib/stripe/services/privacy_service.rb +13 -0
  455. data/lib/stripe/services/quote_line_service.rb +17 -0
  456. data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
  457. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
  458. data/lib/stripe/services/quote_service.rb +49 -1
  459. data/lib/stripe/services/subscription_schedule_service.rb +11 -0
  460. data/lib/stripe/services/subscription_service.rb +11 -0
  461. data/lib/stripe/services/tax/association_service.rb +19 -0
  462. data/lib/stripe/services/tax/form_service.rb +37 -0
  463. data/lib/stripe/services/tax_service.rb +3 -1
  464. data/lib/stripe/services/terminal/onboarding_link_service.rb +19 -0
  465. data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
  466. data/lib/stripe/services/terminal_service.rb +3 -1
  467. data/lib/stripe/services/v1_services.rb +10 -1
  468. data/lib/stripe/services/v2/billing/bill_setting_service.rb +61 -0
  469. data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +34 -0
  470. data/lib/stripe/services/v2/billing/cadence_service.rb +65 -0
  471. data/lib/stripe/services/v2/billing/collection_setting_service.rb +61 -0
  472. data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +34 -0
  473. data/lib/stripe/services/v2/billing/profile_service.rb +54 -0
  474. data/lib/stripe/services/v2/billing_service.rb +5 -1
  475. data/lib/stripe/services/v2/core/account_link_service.rb +21 -0
  476. data/lib/stripe/services/v2/core/account_service.rb +76 -0
  477. data/lib/stripe/services/v2/core/accounts/person_service.rb +67 -0
  478. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +74 -0
  479. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +68 -0
  480. data/lib/stripe/services/v2/core/vault_service.rb +18 -0
  481. data/lib/stripe/services/v2/core_service.rb +4 -1
  482. data/lib/stripe/services/v2/money_management/adjustment_service.rb +32 -0
  483. data/lib/stripe/services/v2/money_management/financial_account_service.rb +59 -0
  484. data/lib/stripe/services/v2/money_management/financial_address_service.rb +46 -0
  485. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +45 -0
  486. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +34 -0
  487. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +62 -0
  488. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +73 -0
  489. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +60 -0
  490. data/lib/stripe/services/v2/money_management/payout_method_service.rb +63 -0
  491. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +23 -0
  492. data/lib/stripe/services/v2/money_management/received_credit_service.rb +32 -0
  493. data/lib/stripe/services/v2/money_management/received_debit_service.rb +32 -0
  494. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +32 -0
  495. data/lib/stripe/services/v2/money_management/transaction_service.rb +32 -0
  496. data/lib/stripe/services/v2/money_management_service.rb +31 -0
  497. data/lib/stripe/services/v2/payment_service.rb +15 -0
  498. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +65 -0
  499. data/lib/stripe/services/v2/test_helper_service.rb +15 -0
  500. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +36 -0
  501. data/lib/stripe/services/v2_services.rb +4 -1
  502. data/lib/stripe/services.rb +61 -0
  503. data/lib/stripe/stripe_configuration.rb +3 -1
  504. data/lib/stripe/stripe_object.rb +1 -1
  505. data/lib/stripe/util.rb +7 -1
  506. data/lib/stripe/version.rb +1 -1
  507. data/lib/stripe.rb +53 -0
  508. data/rbi/stripe.rbi +155102 -90522
  509. metadata +349 -3
@@ -0,0 +1,1150 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # Invoices are statements of amounts owed by a customer, and are either
6
+ # generated one-off, or generated periodically from a subscription.
7
+ #
8
+ # They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments
9
+ # that may be caused by subscription upgrades/downgrades (if necessary).
10
+ #
11
+ # If your invoice is configured to be billed through automatic charges,
12
+ # Stripe automatically finalizes your invoice and attempts payment. Note
13
+ # that finalizing the invoice,
14
+ # [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does
15
+ # not happen immediately as the invoice is created. Stripe waits
16
+ # until one hour after the last webhook was successfully sent (or the last
17
+ # webhook timed out after failing). If you (and the platforms you may have
18
+ # connected to) have no webhooks configured, Stripe waits one hour after
19
+ # creation to finalize the invoice.
20
+ #
21
+ # If your invoice is configured to be billed by sending an email, then based on your
22
+ # [email settings](https://dashboard.stripe.com/account/billing/automatic),
23
+ # Stripe will email the invoice to your customer and await payment. These
24
+ # emails can contain a link to a hosted page to pay the invoice.
25
+ #
26
+ # Stripe applies any customer credit on the account before determining the
27
+ # amount due for the invoice (i.e., the amount that will be actually
28
+ # charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
29
+ # per currency](https://docs.stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
30
+ # invoice is automatically marked paid, and we add the amount due to the
31
+ # customer's credit balance which is applied to the next invoice.
32
+ #
33
+ # More details on the customer's credit balance are
34
+ # [here](https://stripe.com/docs/billing/customer/balance).
35
+ #
36
+ # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
37
+ class QuotePreviewInvoice < APIResource
38
+ OBJECT_NAME = "quote_preview_invoice"
39
+ def self.object_name
40
+ "quote_preview_invoice"
41
+ end
42
+
43
+ class AmountsDue < Stripe::StripeObject
44
+ # Incremental amount due for this payment in cents (or local equivalent).
45
+ attr_reader :amount
46
+ # The amount in cents (or local equivalent) that was paid for this payment.
47
+ attr_reader :amount_paid
48
+ # The difference between the payment’s amount and amount_paid, in cents (or local equivalent).
49
+ attr_reader :amount_remaining
50
+ # Number of days from when invoice is finalized until the payment is due.
51
+ attr_reader :days_until_due
52
+ # An arbitrary string attached to the object. Often useful for displaying to users.
53
+ attr_reader :description
54
+ # Date on which a payment plan’s payment is due.
55
+ attr_reader :due_date
56
+ # Timestamp when the payment was paid.
57
+ attr_reader :paid_at
58
+ # The status of the payment, one of `open`, `paid`, or `past_due`
59
+ attr_reader :status
60
+
61
+ def self.inner_class_types
62
+ @inner_class_types = {}
63
+ end
64
+
65
+ def self.field_remappings
66
+ @field_remappings = {}
67
+ end
68
+ end
69
+
70
+ class AppliesTo < Stripe::StripeObject
71
+ # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule.
72
+ attr_reader :new_reference
73
+ # The ID of the schedule the line applies to.
74
+ attr_reader :subscription_schedule
75
+ # Describes whether the quote line is affecting a new schedule or an existing schedule.
76
+ attr_reader :type
77
+
78
+ def self.inner_class_types
79
+ @inner_class_types = {}
80
+ end
81
+
82
+ def self.field_remappings
83
+ @field_remappings = {}
84
+ end
85
+ end
86
+
87
+ class AutomaticTax < Stripe::StripeObject
88
+ class Liability < Stripe::StripeObject
89
+ # The connected account being referenced when `type` is `account`.
90
+ attr_reader :account
91
+ # Type of the account referenced.
92
+ attr_reader :type
93
+
94
+ def self.inner_class_types
95
+ @inner_class_types = {}
96
+ end
97
+
98
+ def self.field_remappings
99
+ @field_remappings = {}
100
+ end
101
+ end
102
+ # If Stripe disabled automatic tax, this enum describes why.
103
+ attr_reader :disabled_reason
104
+ # 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.
105
+ attr_reader :enabled
106
+ # 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.
107
+ attr_reader :liability
108
+ # The tax provider powering automatic tax.
109
+ attr_reader :provider
110
+ # The status of the most recent automated tax calculation for this invoice.
111
+ attr_reader :status
112
+
113
+ def self.inner_class_types
114
+ @inner_class_types = { liability: Liability }
115
+ end
116
+
117
+ def self.field_remappings
118
+ @field_remappings = {}
119
+ end
120
+ end
121
+
122
+ class ConfirmationSecret < Stripe::StripeObject
123
+ # The client_secret of the payment that Stripe creates for the invoice after finalization.
124
+ attr_reader :client_secret
125
+ # The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization
126
+ attr_reader :type
127
+
128
+ def self.inner_class_types
129
+ @inner_class_types = {}
130
+ end
131
+
132
+ def self.field_remappings
133
+ @field_remappings = {}
134
+ end
135
+ end
136
+
137
+ class CustomField < Stripe::StripeObject
138
+ # The name of the custom field.
139
+ attr_reader :name
140
+ # The value of the custom field.
141
+ attr_reader :value
142
+
143
+ def self.inner_class_types
144
+ @inner_class_types = {}
145
+ end
146
+
147
+ def self.field_remappings
148
+ @field_remappings = {}
149
+ end
150
+ end
151
+
152
+ class CustomerAddress < Stripe::StripeObject
153
+ # City, district, suburb, town, or village.
154
+ attr_reader :city
155
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
156
+ attr_reader :country
157
+ # Address line 1, such as the street, PO Box, or company name.
158
+ attr_reader :line1
159
+ # Address line 2, such as the apartment, suite, unit, or building.
160
+ attr_reader :line2
161
+ # ZIP or postal code.
162
+ attr_reader :postal_code
163
+ # State, county, province, or region.
164
+ attr_reader :state
165
+
166
+ def self.inner_class_types
167
+ @inner_class_types = {}
168
+ end
169
+
170
+ def self.field_remappings
171
+ @field_remappings = {}
172
+ end
173
+ end
174
+
175
+ class CustomerShipping < Stripe::StripeObject
176
+ class Address < Stripe::StripeObject
177
+ # City, district, suburb, town, or village.
178
+ attr_reader :city
179
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
180
+ attr_reader :country
181
+ # Address line 1, such as the street, PO Box, or company name.
182
+ attr_reader :line1
183
+ # Address line 2, such as the apartment, suite, unit, or building.
184
+ attr_reader :line2
185
+ # ZIP or postal code.
186
+ attr_reader :postal_code
187
+ # State, county, province, or region.
188
+ attr_reader :state
189
+
190
+ def self.inner_class_types
191
+ @inner_class_types = {}
192
+ end
193
+
194
+ def self.field_remappings
195
+ @field_remappings = {}
196
+ end
197
+ end
198
+ # Attribute for field address
199
+ attr_reader :address
200
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
201
+ attr_reader :carrier
202
+ # Recipient name.
203
+ attr_reader :name
204
+ # Recipient phone (including extension).
205
+ attr_reader :phone
206
+ # 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.
207
+ attr_reader :tracking_number
208
+
209
+ def self.inner_class_types
210
+ @inner_class_types = { address: Address }
211
+ end
212
+
213
+ def self.field_remappings
214
+ @field_remappings = {}
215
+ end
216
+ end
217
+
218
+ class CustomerTaxId < Stripe::StripeObject
219
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`
220
+ attr_reader :type
221
+ # The value of the tax ID.
222
+ attr_reader :value
223
+
224
+ def self.inner_class_types
225
+ @inner_class_types = {}
226
+ end
227
+
228
+ def self.field_remappings
229
+ @field_remappings = {}
230
+ end
231
+ end
232
+
233
+ class FromInvoice < Stripe::StripeObject
234
+ # The relation between this invoice and the cloned invoice
235
+ attr_reader :action
236
+ # The invoice that was cloned.
237
+ attr_reader :invoice
238
+
239
+ def self.inner_class_types
240
+ @inner_class_types = {}
241
+ end
242
+
243
+ def self.field_remappings
244
+ @field_remappings = {}
245
+ end
246
+ end
247
+
248
+ class Issuer < Stripe::StripeObject
249
+ # The connected account being referenced when `type` is `account`.
250
+ attr_reader :account
251
+ # Type of the account referenced.
252
+ attr_reader :type
253
+
254
+ def self.inner_class_types
255
+ @inner_class_types = {}
256
+ end
257
+
258
+ def self.field_remappings
259
+ @field_remappings = {}
260
+ end
261
+ end
262
+
263
+ class LastFinalizationError < Stripe::StripeObject
264
+ # For card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://stripe.com/docs/declines#retrying-issuer-declines) if they provide one.
265
+ attr_reader :advice_code
266
+ # For card errors, the ID of the failed charge.
267
+ attr_reader :charge
268
+ # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported.
269
+ attr_reader :code
270
+ # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one.
271
+ attr_reader :decline_code
272
+ # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported.
273
+ attr_reader :doc_url
274
+ # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
275
+ attr_reader :message
276
+ # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
277
+ attr_reader :network_advice_code
278
+ # For payments declined by the network, an alphanumeric code which indicates the reason the payment failed.
279
+ attr_reader :network_decline_code
280
+ # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
281
+ attr_reader :param
282
+ # A PaymentIntent guides you through the process of collecting a payment from your customer.
283
+ # We recommend that you create exactly one PaymentIntent for each order or
284
+ # customer session in your system. You can reference the PaymentIntent later to
285
+ # see the history of payment attempts for a particular session.
286
+ #
287
+ # A PaymentIntent transitions through
288
+ # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses)
289
+ # throughout its lifetime as it interfaces with Stripe.js to perform
290
+ # authentication flows and ultimately creates at most one successful charge.
291
+ #
292
+ # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents)
293
+ attr_reader :payment_intent
294
+ # PaymentMethod objects represent your customer's payment instruments.
295
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
296
+ # Customer objects to store instrument details for future payments.
297
+ #
298
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
299
+ attr_reader :payment_method
300
+ # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
301
+ attr_reader :payment_method_type
302
+ # A URL to the request log entry in your dashboard.
303
+ attr_reader :request_log_url
304
+ # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments.
305
+ # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment.
306
+ # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow.
307
+ #
308
+ # Create a SetupIntent when you're ready to collect your customer's payment credentials.
309
+ # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid.
310
+ # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides
311
+ # you through the setup process.
312
+ #
313
+ # Successful SetupIntents result in payment credentials that are optimized for future payments.
314
+ # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through
315
+ # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection
316
+ # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents).
317
+ # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer),
318
+ # it automatically attaches the resulting payment method to that Customer after successful setup.
319
+ # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on
320
+ # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods.
321
+ #
322
+ # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time.
323
+ #
324
+ # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents)
325
+ attr_reader :setup_intent
326
+ # Attribute for field source
327
+ attr_reader :source
328
+ # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
329
+ attr_reader :type
330
+
331
+ def self.inner_class_types
332
+ @inner_class_types = {}
333
+ end
334
+
335
+ def self.field_remappings
336
+ @field_remappings = {}
337
+ end
338
+ end
339
+
340
+ class Parent < Stripe::StripeObject
341
+ class BillingCadenceDetails < Stripe::StripeObject
342
+ # The billing cadence that generated this invoice
343
+ attr_reader :billing_cadence
344
+
345
+ def self.inner_class_types
346
+ @inner_class_types = {}
347
+ end
348
+
349
+ def self.field_remappings
350
+ @field_remappings = {}
351
+ end
352
+ end
353
+
354
+ class QuoteDetails < Stripe::StripeObject
355
+ # The quote that generated this invoice
356
+ attr_reader :quote
357
+
358
+ def self.inner_class_types
359
+ @inner_class_types = {}
360
+ end
361
+
362
+ def self.field_remappings
363
+ @field_remappings = {}
364
+ end
365
+ end
366
+
367
+ class SubscriptionDetails < Stripe::StripeObject
368
+ class PauseCollection < Stripe::StripeObject
369
+ # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
370
+ attr_reader :behavior
371
+ # The time after which the subscription will resume collecting payments.
372
+ attr_reader :resumes_at
373
+
374
+ def self.inner_class_types
375
+ @inner_class_types = {}
376
+ end
377
+
378
+ def self.field_remappings
379
+ @field_remappings = {}
380
+ end
381
+ end
382
+ # 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.
383
+ # *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
384
+ attr_reader :metadata
385
+ # 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).
386
+ attr_reader :pause_collection
387
+ # The subscription that generated this invoice
388
+ attr_reader :subscription
389
+ # Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
390
+ attr_reader :subscription_proration_date
391
+
392
+ def self.inner_class_types
393
+ @inner_class_types = { pause_collection: PauseCollection }
394
+ end
395
+
396
+ def self.field_remappings
397
+ @field_remappings = {}
398
+ end
399
+ end
400
+ # Details about the billing cadence that generated this invoice
401
+ attr_reader :billing_cadence_details
402
+ # Details about the quote that generated this invoice
403
+ attr_reader :quote_details
404
+ # Details about the subscription that generated this invoice
405
+ attr_reader :subscription_details
406
+ # The type of parent that generated this invoice
407
+ attr_reader :type
408
+
409
+ def self.inner_class_types
410
+ @inner_class_types = {
411
+ billing_cadence_details: BillingCadenceDetails,
412
+ quote_details: QuoteDetails,
413
+ subscription_details: SubscriptionDetails,
414
+ }
415
+ end
416
+
417
+ def self.field_remappings
418
+ @field_remappings = {}
419
+ end
420
+ end
421
+
422
+ class PaymentSettings < Stripe::StripeObject
423
+ class PaymentMethodOptions < Stripe::StripeObject
424
+ class AcssDebit < Stripe::StripeObject
425
+ class MandateOptions < Stripe::StripeObject
426
+ # Transaction type of the mandate.
427
+ attr_reader :transaction_type
428
+
429
+ def self.inner_class_types
430
+ @inner_class_types = {}
431
+ end
432
+
433
+ def self.field_remappings
434
+ @field_remappings = {}
435
+ end
436
+ end
437
+ # Attribute for field mandate_options
438
+ attr_reader :mandate_options
439
+ # Bank account verification method.
440
+ attr_reader :verification_method
441
+
442
+ def self.inner_class_types
443
+ @inner_class_types = { mandate_options: MandateOptions }
444
+ end
445
+
446
+ def self.field_remappings
447
+ @field_remappings = {}
448
+ end
449
+ end
450
+
451
+ class Bancontact < Stripe::StripeObject
452
+ # Preferred language of the Bancontact authorization page that the customer is redirected to.
453
+ attr_reader :preferred_language
454
+
455
+ def self.inner_class_types
456
+ @inner_class_types = {}
457
+ end
458
+
459
+ def self.field_remappings
460
+ @field_remappings = {}
461
+ end
462
+ end
463
+
464
+ class Card < Stripe::StripeObject
465
+ class Installments < Stripe::StripeObject
466
+ # Whether Installments are enabled for this Invoice.
467
+ attr_reader :enabled
468
+
469
+ def self.inner_class_types
470
+ @inner_class_types = {}
471
+ end
472
+
473
+ def self.field_remappings
474
+ @field_remappings = {}
475
+ end
476
+ end
477
+ # Attribute for field installments
478
+ attr_reader :installments
479
+ # 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.
480
+ attr_reader :request_three_d_secure
481
+
482
+ def self.inner_class_types
483
+ @inner_class_types = { installments: Installments }
484
+ end
485
+
486
+ def self.field_remappings
487
+ @field_remappings = {}
488
+ end
489
+ end
490
+
491
+ class CustomerBalance < Stripe::StripeObject
492
+ class BankTransfer < Stripe::StripeObject
493
+ class EuBankTransfer < Stripe::StripeObject
494
+ # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
495
+ attr_reader :country
496
+
497
+ def self.inner_class_types
498
+ @inner_class_types = {}
499
+ end
500
+
501
+ def self.field_remappings
502
+ @field_remappings = {}
503
+ end
504
+ end
505
+ # Attribute for field eu_bank_transfer
506
+ attr_reader :eu_bank_transfer
507
+ # 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`.
508
+ attr_reader :type
509
+
510
+ def self.inner_class_types
511
+ @inner_class_types = { eu_bank_transfer: EuBankTransfer }
512
+ end
513
+
514
+ def self.field_remappings
515
+ @field_remappings = {}
516
+ end
517
+ end
518
+ # Attribute for field bank_transfer
519
+ attr_reader :bank_transfer
520
+ # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
521
+ attr_reader :funding_type
522
+
523
+ def self.inner_class_types
524
+ @inner_class_types = { bank_transfer: BankTransfer }
525
+ end
526
+
527
+ def self.field_remappings
528
+ @field_remappings = {}
529
+ end
530
+ end
531
+
532
+ class IdBankTransfer < Stripe::StripeObject
533
+ def self.inner_class_types
534
+ @inner_class_types = {}
535
+ end
536
+
537
+ def self.field_remappings
538
+ @field_remappings = {}
539
+ end
540
+ end
541
+
542
+ class Konbini < Stripe::StripeObject
543
+ def self.inner_class_types
544
+ @inner_class_types = {}
545
+ end
546
+
547
+ def self.field_remappings
548
+ @field_remappings = {}
549
+ end
550
+ end
551
+
552
+ class Pix < Stripe::StripeObject
553
+ # Determines if the amount includes the IOF tax.
554
+ attr_reader :amount_includes_iof
555
+
556
+ def self.inner_class_types
557
+ @inner_class_types = {}
558
+ end
559
+
560
+ def self.field_remappings
561
+ @field_remappings = {}
562
+ end
563
+ end
564
+
565
+ class SepaDebit < Stripe::StripeObject
566
+ def self.inner_class_types
567
+ @inner_class_types = {}
568
+ end
569
+
570
+ def self.field_remappings
571
+ @field_remappings = {}
572
+ end
573
+ end
574
+
575
+ class Upi < Stripe::StripeObject
576
+ class MandateOptions < Stripe::StripeObject
577
+ # Amount to be charged for future payments.
578
+ attr_reader :amount
579
+ # 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.
580
+ attr_reader :amount_type
581
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
582
+ attr_reader :description
583
+ # 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.
584
+ attr_reader :end_date
585
+
586
+ def self.inner_class_types
587
+ @inner_class_types = {}
588
+ end
589
+
590
+ def self.field_remappings
591
+ @field_remappings = {}
592
+ end
593
+ end
594
+ # Attribute for field mandate_options
595
+ attr_reader :mandate_options
596
+
597
+ def self.inner_class_types
598
+ @inner_class_types = { mandate_options: MandateOptions }
599
+ end
600
+
601
+ def self.field_remappings
602
+ @field_remappings = {}
603
+ end
604
+ end
605
+
606
+ class UsBankAccount < Stripe::StripeObject
607
+ class FinancialConnections < Stripe::StripeObject
608
+ class Filters < Stripe::StripeObject
609
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
610
+ attr_reader :account_subcategories
611
+ # The institution to use to filter for possible accounts to link.
612
+ attr_reader :institution
613
+
614
+ def self.inner_class_types
615
+ @inner_class_types = {}
616
+ end
617
+
618
+ def self.field_remappings
619
+ @field_remappings = {}
620
+ end
621
+ end
622
+ # Attribute for field filters
623
+ attr_reader :filters
624
+ # The list of permissions to request. The `payment_method` permission must be included.
625
+ attr_reader :permissions
626
+ # Data features requested to be retrieved upon account creation.
627
+ attr_reader :prefetch
628
+
629
+ def self.inner_class_types
630
+ @inner_class_types = { filters: Filters }
631
+ end
632
+
633
+ def self.field_remappings
634
+ @field_remappings = {}
635
+ end
636
+ end
637
+ # Attribute for field financial_connections
638
+ attr_reader :financial_connections
639
+ # Bank account verification method.
640
+ attr_reader :verification_method
641
+
642
+ def self.inner_class_types
643
+ @inner_class_types = { financial_connections: FinancialConnections }
644
+ end
645
+
646
+ def self.field_remappings
647
+ @field_remappings = {}
648
+ end
649
+ end
650
+ # 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.
651
+ attr_reader :acss_debit
652
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
653
+ attr_reader :bancontact
654
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
655
+ attr_reader :card
656
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
657
+ attr_reader :customer_balance
658
+ # 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.
659
+ attr_reader :id_bank_transfer
660
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
661
+ attr_reader :konbini
662
+ # If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice’s PaymentIntent.
663
+ attr_reader :pix
664
+ # 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.
665
+ attr_reader :sepa_debit
666
+ # If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
667
+ attr_reader :upi
668
+ # 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.
669
+ attr_reader :us_bank_account
670
+
671
+ def self.inner_class_types
672
+ @inner_class_types = {
673
+ acss_debit: AcssDebit,
674
+ bancontact: Bancontact,
675
+ card: Card,
676
+ customer_balance: CustomerBalance,
677
+ id_bank_transfer: IdBankTransfer,
678
+ konbini: Konbini,
679
+ pix: Pix,
680
+ sepa_debit: SepaDebit,
681
+ upi: Upi,
682
+ us_bank_account: UsBankAccount,
683
+ }
684
+ end
685
+
686
+ def self.field_remappings
687
+ @field_remappings = {}
688
+ end
689
+ end
690
+ # 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.
691
+ attr_reader :default_mandate
692
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
693
+ attr_reader :payment_method_options
694
+ # 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).
695
+ attr_reader :payment_method_types
696
+
697
+ def self.inner_class_types
698
+ @inner_class_types = { payment_method_options: PaymentMethodOptions }
699
+ end
700
+
701
+ def self.field_remappings
702
+ @field_remappings = {}
703
+ end
704
+ end
705
+
706
+ class Rendering < Stripe::StripeObject
707
+ class Pdf < Stripe::StripeObject
708
+ # 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.
709
+ attr_reader :page_size
710
+
711
+ def self.inner_class_types
712
+ @inner_class_types = {}
713
+ end
714
+
715
+ def self.field_remappings
716
+ @field_remappings = {}
717
+ end
718
+ end
719
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
720
+ attr_reader :amount_tax_display
721
+ # Invoice pdf rendering options
722
+ attr_reader :pdf
723
+ # ID of the rendering template that the invoice is formatted by.
724
+ attr_reader :template
725
+ # Version of the rendering template that the invoice is using.
726
+ attr_reader :template_version
727
+
728
+ def self.inner_class_types
729
+ @inner_class_types = { pdf: Pdf }
730
+ end
731
+
732
+ def self.field_remappings
733
+ @field_remappings = {}
734
+ end
735
+ end
736
+
737
+ class ShippingCost < Stripe::StripeObject
738
+ class Tax < Stripe::StripeObject
739
+ # Amount of tax applied for this rate.
740
+ attr_reader :amount
741
+ # 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.
742
+ #
743
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
744
+ attr_reader :rate
745
+ # 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.
746
+ attr_reader :taxability_reason
747
+ # The amount on which tax is calculated, in cents (or local equivalent).
748
+ attr_reader :taxable_amount
749
+
750
+ def self.inner_class_types
751
+ @inner_class_types = {}
752
+ end
753
+
754
+ def self.field_remappings
755
+ @field_remappings = {}
756
+ end
757
+ end
758
+ # Total shipping cost before any taxes are applied.
759
+ attr_reader :amount_subtotal
760
+ # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
761
+ attr_reader :amount_tax
762
+ # Total shipping cost after taxes are applied.
763
+ attr_reader :amount_total
764
+ # The ID of the ShippingRate for this invoice.
765
+ attr_reader :shipping_rate
766
+ # The taxes applied to the shipping rate.
767
+ attr_reader :taxes
768
+
769
+ def self.inner_class_types
770
+ @inner_class_types = { taxes: Tax }
771
+ end
772
+
773
+ def self.field_remappings
774
+ @field_remappings = {}
775
+ end
776
+ end
777
+
778
+ class ShippingDetails < Stripe::StripeObject
779
+ class Address < Stripe::StripeObject
780
+ # City, district, suburb, town, or village.
781
+ attr_reader :city
782
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
783
+ attr_reader :country
784
+ # Address line 1, such as the street, PO Box, or company name.
785
+ attr_reader :line1
786
+ # Address line 2, such as the apartment, suite, unit, or building.
787
+ attr_reader :line2
788
+ # ZIP or postal code.
789
+ attr_reader :postal_code
790
+ # State, county, province, or region.
791
+ attr_reader :state
792
+
793
+ def self.inner_class_types
794
+ @inner_class_types = {}
795
+ end
796
+
797
+ def self.field_remappings
798
+ @field_remappings = {}
799
+ end
800
+ end
801
+ # Attribute for field address
802
+ attr_reader :address
803
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
804
+ attr_reader :carrier
805
+ # Recipient name.
806
+ attr_reader :name
807
+ # Recipient phone (including extension).
808
+ attr_reader :phone
809
+ # 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.
810
+ attr_reader :tracking_number
811
+
812
+ def self.inner_class_types
813
+ @inner_class_types = { address: Address }
814
+ end
815
+
816
+ def self.field_remappings
817
+ @field_remappings = {}
818
+ end
819
+ end
820
+
821
+ class StatusTransitions < Stripe::StripeObject
822
+ # The time that the invoice draft was finalized.
823
+ attr_reader :finalized_at
824
+ # The time that the invoice was marked uncollectible.
825
+ attr_reader :marked_uncollectible_at
826
+ # The time that the invoice was paid.
827
+ attr_reader :paid_at
828
+ # The time that the invoice was voided.
829
+ attr_reader :voided_at
830
+
831
+ def self.inner_class_types
832
+ @inner_class_types = {}
833
+ end
834
+
835
+ def self.field_remappings
836
+ @field_remappings = {}
837
+ end
838
+ end
839
+
840
+ class ThresholdReason < Stripe::StripeObject
841
+ class ItemReason < Stripe::StripeObject
842
+ # The IDs of the line items that triggered the threshold invoice.
843
+ attr_reader :line_item_ids
844
+ # The quantity threshold boundary that applied to the given line item.
845
+ attr_reader :usage_gte
846
+
847
+ def self.inner_class_types
848
+ @inner_class_types = {}
849
+ end
850
+
851
+ def self.field_remappings
852
+ @field_remappings = {}
853
+ end
854
+ end
855
+ # The total invoice amount threshold boundary if it triggered the threshold invoice.
856
+ attr_reader :amount_gte
857
+ # Indicates which line items triggered a threshold invoice.
858
+ attr_reader :item_reasons
859
+
860
+ def self.inner_class_types
861
+ @inner_class_types = { item_reasons: ItemReason }
862
+ end
863
+
864
+ def self.field_remappings
865
+ @field_remappings = {}
866
+ end
867
+ end
868
+
869
+ class TotalDiscountAmount < Stripe::StripeObject
870
+ # The amount, in cents (or local equivalent), of the discount.
871
+ attr_reader :amount
872
+ # The discount that was applied to get this discount amount.
873
+ attr_reader :discount
874
+
875
+ def self.inner_class_types
876
+ @inner_class_types = {}
877
+ end
878
+
879
+ def self.field_remappings
880
+ @field_remappings = {}
881
+ end
882
+ end
883
+
884
+ class TotalMarginAmount < Stripe::StripeObject
885
+ # The amount, in cents (or local equivalent), of the reduction in line item amount.
886
+ attr_reader :amount
887
+ # The margin that was applied to get this margin amount.
888
+ attr_reader :margin
889
+
890
+ def self.inner_class_types
891
+ @inner_class_types = {}
892
+ end
893
+
894
+ def self.field_remappings
895
+ @field_remappings = {}
896
+ end
897
+ end
898
+
899
+ class TotalPretaxCreditAmount < Stripe::StripeObject
900
+ # The amount, in cents (or local equivalent), of the pretax credit amount.
901
+ attr_reader :amount
902
+ # The credit balance transaction that was applied to get this pretax credit amount.
903
+ attr_reader :credit_balance_transaction
904
+ # The discount that was applied to get this pretax credit amount.
905
+ attr_reader :discount
906
+ # The margin that was applied to get this pretax credit amount.
907
+ attr_reader :margin
908
+ # Type of the pretax credit amount referenced.
909
+ attr_reader :type
910
+
911
+ def self.inner_class_types
912
+ @inner_class_types = {}
913
+ end
914
+
915
+ def self.field_remappings
916
+ @field_remappings = {}
917
+ end
918
+ end
919
+
920
+ class TotalTax < Stripe::StripeObject
921
+ class TaxRateDetails < Stripe::StripeObject
922
+ # Attribute for field tax_rate
923
+ attr_reader :tax_rate
924
+
925
+ def self.inner_class_types
926
+ @inner_class_types = {}
927
+ end
928
+
929
+ def self.field_remappings
930
+ @field_remappings = {}
931
+ end
932
+ end
933
+ # The amount of the tax, in cents (or local equivalent).
934
+ attr_reader :amount
935
+ # Whether this tax is inclusive or exclusive.
936
+ attr_reader :tax_behavior
937
+ # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
938
+ attr_reader :tax_rate_details
939
+ # 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.
940
+ attr_reader :taxability_reason
941
+ # The amount on which tax is calculated, in cents (or local equivalent).
942
+ attr_reader :taxable_amount
943
+ # The type of tax information.
944
+ attr_reader :type
945
+
946
+ def self.inner_class_types
947
+ @inner_class_types = { tax_rate_details: TaxRateDetails }
948
+ end
949
+
950
+ def self.field_remappings
951
+ @field_remappings = {}
952
+ end
953
+ end
954
+ # The country of the business associated with this invoice, most often the business creating the invoice.
955
+ attr_reader :account_country
956
+ # The public name of the business associated with this invoice, most often the business creating the invoice.
957
+ attr_reader :account_name
958
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
959
+ attr_reader :account_tax_ids
960
+ # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.
961
+ attr_reader :amount_due
962
+ # Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.
963
+ attr_reader :amount_overpaid
964
+ # The amount, in cents (or local equivalent), that was paid.
965
+ attr_reader :amount_paid
966
+ # The difference between amount_due and amount_paid, in cents (or local equivalent).
967
+ attr_reader :amount_remaining
968
+ # This is the sum of all the shipping amounts.
969
+ attr_reader :amount_shipping
970
+ # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
971
+ attr_reader :amounts_due
972
+ # ID of the Connect Application that created the invoice.
973
+ attr_reader :application
974
+ # Attribute for field applies_to
975
+ attr_reader :applies_to
976
+ # 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.
977
+ attr_reader :attempt_count
978
+ # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.
979
+ attr_reader :attempted
980
+ # Attribute for field automatic_tax
981
+ attr_reader :automatic_tax
982
+ # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized.
983
+ attr_reader :automatically_finalizes_at
984
+ # Indicates the reason why the invoice was created.
985
+ #
986
+ # * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
987
+ # * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
988
+ # * `subscription_create`: A new subscription was created.
989
+ # * `subscription_cycle`: A subscription advanced into a new period.
990
+ # * `subscription_threshold`: A subscription reached a billing threshold.
991
+ # * `subscription_update`: A subscription was updated.
992
+ # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.
993
+ attr_reader :billing_reason
994
+ # 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.
995
+ attr_reader :collection_method
996
+ # The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization.
997
+ attr_reader :confirmation_secret
998
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
999
+ attr_reader :created
1000
+ # 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).
1001
+ attr_reader :currency
1002
+ # Custom fields displayed on the invoice.
1003
+ attr_reader :custom_fields
1004
+ # The ID of the account who will be billed.
1005
+ attr_reader :customer_account
1006
+ # 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.
1007
+ attr_reader :customer_address
1008
+ # 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.
1009
+ attr_reader :customer_email
1010
+ # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated.
1011
+ attr_reader :customer_name
1012
+ # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated.
1013
+ attr_reader :customer_phone
1014
+ # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated.
1015
+ attr_reader :customer_shipping
1016
+ # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated.
1017
+ attr_reader :customer_tax_exempt
1018
+ # 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.
1019
+ attr_reader :customer_tax_ids
1020
+ # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
1021
+ attr_reader :default_margins
1022
+ # 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.
1023
+ attr_reader :default_payment_method
1024
+ # 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.
1025
+ attr_reader :default_source
1026
+ # The tax rates applied to this invoice, if any.
1027
+ attr_reader :default_tax_rates
1028
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
1029
+ attr_reader :description
1030
+ # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
1031
+ attr_reader :discounts
1032
+ # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.
1033
+ attr_reader :due_date
1034
+ # 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.
1035
+ attr_reader :effective_at
1036
+ # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
1037
+ attr_reader :ending_balance
1038
+ # Footer displayed on the invoice.
1039
+ attr_reader :footer
1040
+ # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
1041
+ attr_reader :from_invoice
1042
+ # Unique identifier for the object. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`.
1043
+ attr_reader :id
1044
+ # Attribute for field issuer
1045
+ attr_reader :issuer
1046
+ # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
1047
+ attr_reader :last_finalization_error
1048
+ # The ID of the most recent non-draft revision of this invoice
1049
+ attr_reader :latest_revision
1050
+ # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
1051
+ attr_reader :lines
1052
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
1053
+ attr_reader :livemode
1054
+ # 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.
1055
+ attr_reader :metadata
1056
+ # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.
1057
+ attr_reader :next_payment_attempt
1058
+ # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.
1059
+ attr_reader :number
1060
+ # String representing the object's type. Objects of the same type share the same value.
1061
+ attr_reader :object
1062
+ # 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.
1063
+ attr_reader :on_behalf_of
1064
+ # The parent that generated this invoice
1065
+ attr_reader :parent
1066
+ # Attribute for field payment_settings
1067
+ attr_reader :payment_settings
1068
+ # Payments for this invoice
1069
+ attr_reader :payments
1070
+ # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
1071
+ attr_reader :period_end
1072
+ # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.
1073
+ attr_reader :period_start
1074
+ # Total amount of all post-payment credit notes issued for this invoice.
1075
+ attr_reader :post_payment_credit_notes_amount
1076
+ # Total amount of all pre-payment credit notes issued for this invoice.
1077
+ attr_reader :pre_payment_credit_notes_amount
1078
+ # This is the transaction number that appears on email receipts sent for this invoice.
1079
+ attr_reader :receipt_number
1080
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
1081
+ attr_reader :rendering
1082
+ # The details of the cost of shipping, including the ShippingRate applied on the invoice.
1083
+ attr_reader :shipping_cost
1084
+ # 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.
1085
+ attr_reader :shipping_details
1086
+ # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.
1087
+ attr_reader :starting_balance
1088
+ # Extra information about an invoice for the customer's credit card statement.
1089
+ attr_reader :statement_descriptor
1090
+ # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
1091
+ attr_reader :status
1092
+ # Attribute for field status_transitions
1093
+ attr_reader :status_transitions
1094
+ # Attribute for field subscription
1095
+ attr_reader :subscription
1096
+ # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
1097
+ attr_reader :subtotal
1098
+ # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
1099
+ attr_reader :subtotal_excluding_tax
1100
+ # ID of the test clock this invoice belongs to.
1101
+ attr_reader :test_clock
1102
+ # Attribute for field threshold_reason
1103
+ attr_reader :threshold_reason
1104
+ # Total after discounts and taxes.
1105
+ attr_reader :total
1106
+ # The aggregate amounts calculated per discount across all line items.
1107
+ attr_reader :total_discount_amounts
1108
+ # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
1109
+ attr_reader :total_excluding_tax
1110
+ # The aggregate amounts calculated per margin across all line items.
1111
+ attr_reader :total_margin_amounts
1112
+ # 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.
1113
+ attr_reader :total_pretax_credit_amounts
1114
+ # The aggregate tax information of all line items.
1115
+ attr_reader :total_taxes
1116
+ # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
1117
+ attr_reader :webhooks_delivered_at
1118
+
1119
+ def self.inner_class_types
1120
+ @inner_class_types = {
1121
+ amounts_due: AmountsDue,
1122
+ applies_to: AppliesTo,
1123
+ automatic_tax: AutomaticTax,
1124
+ confirmation_secret: ConfirmationSecret,
1125
+ custom_fields: CustomField,
1126
+ customer_address: CustomerAddress,
1127
+ customer_shipping: CustomerShipping,
1128
+ customer_tax_ids: CustomerTaxId,
1129
+ from_invoice: FromInvoice,
1130
+ issuer: Issuer,
1131
+ last_finalization_error: LastFinalizationError,
1132
+ parent: Parent,
1133
+ payment_settings: PaymentSettings,
1134
+ rendering: Rendering,
1135
+ shipping_cost: ShippingCost,
1136
+ shipping_details: ShippingDetails,
1137
+ status_transitions: StatusTransitions,
1138
+ threshold_reason: ThresholdReason,
1139
+ total_discount_amounts: TotalDiscountAmount,
1140
+ total_margin_amounts: TotalMarginAmount,
1141
+ total_pretax_credit_amounts: TotalPretaxCreditAmount,
1142
+ total_taxes: TotalTax,
1143
+ }
1144
+ end
1145
+
1146
+ def self.field_remappings
1147
+ @field_remappings = {}
1148
+ end
1149
+ end
1150
+ end