stripe 18.1.0 → 18.2.0.pre.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) 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 +213 -0
  6. data/lib/stripe/events/v2_core_account_closed_event.rb +44 -0
  7. data/lib/stripe/events/v2_core_account_created_event.rb +44 -0
  8. data/lib/stripe/events/v2_core_account_including_configuration_customer_capability_status_updated_event.rb +63 -0
  9. data/lib/stripe/events/v2_core_account_including_configuration_customer_updated_event.rb +44 -0
  10. data/lib/stripe/events/v2_core_account_including_configuration_merchant_capability_status_updated_event.rb +63 -0
  11. data/lib/stripe/events/v2_core_account_including_configuration_merchant_updated_event.rb +44 -0
  12. data/lib/stripe/events/v2_core_account_including_configuration_recipient_capability_status_updated_event.rb +63 -0
  13. data/lib/stripe/events/v2_core_account_including_configuration_recipient_updated_event.rb +44 -0
  14. data/lib/stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event.rb +63 -0
  15. data/lib/stripe/events/v2_core_account_including_configuration_storer_updated_event.rb +44 -0
  16. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +44 -0
  17. data/lib/stripe/events/v2_core_account_including_identity_updated_event.rb +44 -0
  18. data/lib/stripe/events/v2_core_account_including_requirements_updated_event.rb +44 -0
  19. data/lib/stripe/events/v2_core_account_link_returned_event.rb +42 -0
  20. data/lib/stripe/events/v2_core_account_person_created_event.rb +61 -0
  21. data/lib/stripe/events/v2_core_account_person_deleted_event.rb +61 -0
  22. data/lib/stripe/events/v2_core_account_person_updated_event.rb +61 -0
  23. data/lib/stripe/events/v2_core_account_updated_event.rb +44 -0
  24. data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +78 -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_created_event.rb +44 -0
  49. data/lib/stripe/events/v2_money_management_payout_method_updated_event.rb +44 -0
  50. data/lib/stripe/events/v2_money_management_received_credit_available_event.rb +61 -0
  51. data/lib/stripe/events/v2_money_management_received_credit_failed_event.rb +44 -0
  52. data/lib/stripe/events/v2_money_management_received_credit_returned_event.rb +44 -0
  53. data/lib/stripe/events/v2_money_management_received_credit_succeeded_event.rb +44 -0
  54. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +44 -0
  55. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +44 -0
  56. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +44 -0
  57. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +44 -0
  58. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +44 -0
  59. data/lib/stripe/events/v2_money_management_transaction_created_event.rb +61 -0
  60. data/lib/stripe/events/v2_money_management_transaction_updated_event.rb +44 -0
  61. data/lib/stripe/object_types.rb +52 -0
  62. data/lib/stripe/params/account_create_params.rb +304 -1
  63. data/lib/stripe/params/account_notice_list_params.rb +25 -0
  64. data/lib/stripe/params/account_notice_retrieve_params.rb +13 -0
  65. data/lib/stripe/params/account_notice_update_params.rb +36 -0
  66. data/lib/stripe/params/account_session_create_params.rb +226 -1
  67. data/lib/stripe/params/account_update_params.rb +266 -0
  68. data/lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb +65 -0
  69. data/lib/stripe/params/capital/financing_offer_list_params.rb +58 -0
  70. data/lib/stripe/params/capital/financing_offer_mark_delivered_params.rb +15 -0
  71. data/lib/stripe/params/capital/financing_offer_retrieve_params.rb +15 -0
  72. data/lib/stripe/params/capital/financing_summary_retrieve_params.rb +15 -0
  73. data/lib/stripe/params/capital/financing_transaction_list_params.rb +45 -0
  74. data/lib/stripe/params/capital/financing_transaction_retrieve_params.rb +15 -0
  75. data/lib/stripe/params/charge_capture_params.rb +1648 -0
  76. data/lib/stripe/params/charge_update_params.rb +1648 -0
  77. data/lib/stripe/params/checkout/session_create_params.rb +129 -3
  78. data/lib/stripe/params/checkout/session_update_params.rb +141 -1
  79. data/lib/stripe/params/confirmation_token_create_params.rb +77 -0
  80. data/lib/stripe/params/coupon_create_params.rb +17 -1
  81. data/lib/stripe/params/customer_session_create_params.rb +32 -1
  82. data/lib/stripe/params/dispute_update_params.rb +10 -1
  83. data/lib/stripe/params/external_account_create_params.rb +134 -0
  84. data/lib/stripe/params/external_account_delete_params.rb +6 -0
  85. data/lib/stripe/params/external_account_list_params.rb +25 -0
  86. data/lib/stripe/params/external_account_retrieve_params.rb +13 -0
  87. data/lib/stripe/params/external_account_update_params.rb +91 -0
  88. data/lib/stripe/params/financial_connections/account_inferred_balance_list_params.rb +24 -0
  89. data/lib/stripe/params/financial_connections/institution_list_params.rb +24 -0
  90. data/lib/stripe/params/financial_connections/institution_retrieve_params.rb +15 -0
  91. data/lib/stripe/params/financial_connections/session_create_params.rb +30 -1
  92. data/lib/stripe/params/fx_quote_create_params.rb +73 -0
  93. data/lib/stripe/params/fx_quote_list_params.rb +22 -0
  94. data/lib/stripe/params/fx_quote_retrieve_params.rb +13 -0
  95. data/lib/stripe/params/invoice_add_lines_params.rb +33 -1
  96. data/lib/stripe/params/invoice_attach_payment_params.rb +43 -1
  97. data/lib/stripe/params/invoice_create_params.rb +107 -2
  98. data/lib/stripe/params/invoice_create_preview_params.rb +822 -9
  99. data/lib/stripe/params/invoice_item_create_params.rb +33 -1
  100. data/lib/stripe/params/invoice_item_update_params.rb +33 -1
  101. data/lib/stripe/params/invoice_line_item_update_params.rb +33 -1
  102. data/lib/stripe/params/invoice_update_lines_params.rb +33 -1
  103. data/lib/stripe/params/invoice_update_params.rb +107 -2
  104. data/lib/stripe/params/issuing/cardholder_create_params.rb +2 -1
  105. data/lib/stripe/params/issuing/credit_underwriting_record_correct_params.rb +163 -0
  106. data/lib/stripe/params/issuing/credit_underwriting_record_create_from_application_params.rb +50 -0
  107. data/lib/stripe/params/issuing/credit_underwriting_record_create_from_proactive_review_params.rb +128 -0
  108. data/lib/stripe/params/issuing/credit_underwriting_record_list_params.rb +24 -0
  109. data/lib/stripe/params/issuing/credit_underwriting_record_report_decision_params.rb +86 -0
  110. data/lib/stripe/params/issuing/credit_underwriting_record_retrieve_params.rb +15 -0
  111. data/lib/stripe/params/issuing/dispute_settlement_detail_list_params.rb +33 -0
  112. data/lib/stripe/params/issuing/dispute_settlement_detail_retrieve_params.rb +15 -0
  113. data/lib/stripe/params/issuing/fraud_liability_debit_list_params.rb +44 -0
  114. data/lib/stripe/params/issuing/fraud_liability_debit_retrieve_params.rb +15 -0
  115. data/lib/stripe/params/issuing/transaction_list_params.rb +4 -0
  116. data/lib/stripe/params/mandate_list_params.rb +39 -0
  117. data/lib/stripe/params/margin_create_params.rb +25 -0
  118. data/lib/stripe/params/margin_list_params.rb +25 -0
  119. data/lib/stripe/params/margin_retrieve_params.rb +13 -0
  120. data/lib/stripe/params/margin_update_params.rb +22 -0
  121. data/lib/stripe/params/order_cancel_params.rb +13 -0
  122. data/lib/stripe/params/order_create_params.rb +2061 -0
  123. data/lib/stripe/params/order_line_item_list_params.rb +22 -0
  124. data/lib/stripe/params/order_list_line_items_params.rb +22 -0
  125. data/lib/stripe/params/order_list_params.rb +25 -0
  126. data/lib/stripe/params/order_reopen_params.rb +13 -0
  127. data/lib/stripe/params/order_retrieve_params.rb +13 -0
  128. data/lib/stripe/params/order_submit_params.rb +16 -0
  129. data/lib/stripe/params/order_update_params.rb +2065 -0
  130. data/lib/stripe/params/payment_intent_capture_params.rb +1627 -1
  131. data/lib/stripe/params/payment_intent_confirm_params.rb +2971 -11
  132. data/lib/stripe/params/payment_intent_create_params.rb +2971 -11
  133. data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +73 -0
  134. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +21 -0
  135. data/lib/stripe/params/payment_intent_trigger_action_params.rb +27 -0
  136. data/lib/stripe/params/payment_intent_update_params.rb +3003 -12
  137. data/lib/stripe/params/payment_method_configuration_create_params.rb +105 -0
  138. data/lib/stripe/params/payment_method_configuration_update_params.rb +105 -0
  139. data/lib/stripe/params/payment_method_create_params.rb +77 -0
  140. data/lib/stripe/params/price_update_params.rb +19 -0
  141. data/lib/stripe/params/privacy/redaction_job_cancel_params.rb +15 -0
  142. data/lib/stripe/params/privacy/redaction_job_create_params.rb +67 -0
  143. data/lib/stripe/params/privacy/redaction_job_list_params.rb +27 -0
  144. data/lib/stripe/params/privacy/redaction_job_retrieve_params.rb +15 -0
  145. data/lib/stripe/params/privacy/redaction_job_run_params.rb +15 -0
  146. data/lib/stripe/params/privacy/redaction_job_update_params.rb +18 -0
  147. data/lib/stripe/params/privacy/redaction_job_validate_params.rb +15 -0
  148. data/lib/stripe/params/privacy/redaction_job_validation_error_list_params.rb +24 -0
  149. data/lib/stripe/params/quote_create_params.rb +801 -3
  150. data/lib/stripe/params/quote_line_list_params.rb +22 -0
  151. data/lib/stripe/params/quote_list_lines_params.rb +22 -0
  152. data/lib/stripe/params/quote_list_params.rb +4 -0
  153. data/lib/stripe/params/quote_list_preview_invoice_lines_params.rb +22 -0
  154. data/lib/stripe/params/quote_mark_draft_params.rb +13 -0
  155. data/lib/stripe/params/quote_mark_stale_params.rb +16 -0
  156. data/lib/stripe/params/quote_preview_invoice_list_params.rb +22 -0
  157. data/lib/stripe/params/quote_preview_subscription_schedule_list_params.rb +22 -0
  158. data/lib/stripe/params/quote_reestimate_params.rb +13 -0
  159. data/lib/stripe/params/quote_update_params.rb +809 -4
  160. data/lib/stripe/params/reserve/hold_list_params.rb +53 -0
  161. data/lib/stripe/params/reserve/hold_retrieve_params.rb +15 -0
  162. data/lib/stripe/params/reserve/plan_retrieve_params.rb +15 -0
  163. data/lib/stripe/params/reserve/release_list_params.rb +41 -0
  164. data/lib/stripe/params/reserve/release_retrieve_params.rb +15 -0
  165. data/lib/stripe/params/setup_intent_confirm_params.rb +158 -3
  166. data/lib/stripe/params/setup_intent_create_params.rb +158 -3
  167. data/lib/stripe/params/setup_intent_update_params.rb +158 -3
  168. data/lib/stripe/params/subscription_attach_cadence_params.rb +16 -0
  169. data/lib/stripe/params/subscription_create_params.rb +254 -5
  170. data/lib/stripe/params/subscription_item_create_params.rb +46 -2
  171. data/lib/stripe/params/subscription_item_update_params.rb +29 -1
  172. data/lib/stripe/params/subscription_schedule_amend_params.rb +570 -0
  173. data/lib/stripe/params/subscription_schedule_create_params.rb +163 -5
  174. data/lib/stripe/params/subscription_schedule_update_params.rb +163 -5
  175. data/lib/stripe/params/subscription_update_params.rb +237 -4
  176. data/lib/stripe/params/tax/form_list_params.rb +51 -0
  177. data/lib/stripe/params/tax/form_pdf_params.rb +15 -0
  178. data/lib/stripe/params/tax/form_retrieve_params.rb +15 -0
  179. data/lib/stripe/params/terminal/configuration_create_params.rb +13 -0
  180. data/lib/stripe/params/terminal/configuration_update_params.rb +13 -0
  181. data/lib/stripe/params/terminal/reader_collected_data_retrieve_params.rb +15 -0
  182. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +77 -0
  183. data/lib/stripe/params/test_helpers/treasury/received_credit_create_params.rb +25 -1
  184. data/lib/stripe/params/test_helpers/treasury/received_debit_create_params.rb +25 -1
  185. data/lib/stripe/params/transfer_create_params.rb +4 -0
  186. data/lib/stripe/params/treasury/financial_account_create_params.rb +8 -1
  187. data/lib/stripe/params/treasury/financial_account_features_update_params.rb +4 -1
  188. data/lib/stripe/params/treasury/financial_account_update_features_params.rb +4 -1
  189. data/lib/stripe/params/treasury/financial_account_update_params.rb +8 -1
  190. data/lib/stripe/params/treasury/outbound_transfer_create_params.rb +24 -0
  191. data/lib/stripe/params/treasury/received_credit_create_params.rb +25 -1
  192. data/lib/stripe/params/treasury/received_debit_create_params.rb +25 -1
  193. data/lib/stripe/params/v2/billing/bill_setting_create_params.rb +74 -0
  194. data/lib/stripe/params/v2/billing/bill_setting_list_params.rb +21 -0
  195. data/lib/stripe/params/v2/billing/bill_setting_retrieve_params.rb +10 -0
  196. data/lib/stripe/params/v2/billing/bill_setting_update_params.rb +80 -0
  197. data/lib/stripe/params/v2/billing/bill_settings/version_list_params.rb +19 -0
  198. data/lib/stripe/params/v2/billing/bill_settings/version_retrieve_params.rb +12 -0
  199. data/lib/stripe/params/v2/billing/cadence_cancel_params.rb +10 -0
  200. data/lib/stripe/params/v2/billing/cadence_create_params.rb +253 -0
  201. data/lib/stripe/params/v2/billing/cadence_list_params.rb +43 -0
  202. data/lib/stripe/params/v2/billing/cadence_retrieve_params.rb +17 -0
  203. data/lib/stripe/params/v2/billing/cadence_update_params.rb +75 -0
  204. data/lib/stripe/params/v2/billing/collection_setting_create_params.rb +223 -0
  205. data/lib/stripe/params/v2/billing/collection_setting_list_params.rb +21 -0
  206. data/lib/stripe/params/v2/billing/collection_setting_retrieve_params.rb +10 -0
  207. data/lib/stripe/params/v2/billing/collection_setting_update_params.rb +229 -0
  208. data/lib/stripe/params/v2/billing/collection_settings/version_list_params.rb +19 -0
  209. data/lib/stripe/params/v2/billing/collection_settings/version_retrieve_params.rb +12 -0
  210. data/lib/stripe/params/v2/billing/profile_create_params.rb +37 -0
  211. data/lib/stripe/params/v2/billing/profile_list_params.rb +40 -0
  212. data/lib/stripe/params/v2/billing/profile_retrieve_params.rb +10 -0
  213. data/lib/stripe/params/v2/billing/profile_update_params.rb +35 -0
  214. data/lib/stripe/params/v2/core/account_create_params.rb +251 -4
  215. data/lib/stripe/params/v2/core/account_token_create_params.rb +13 -1
  216. data/lib/stripe/params/v2/core/account_update_params.rb +243 -3
  217. data/lib/stripe/params/v2/core/vault/gb_bank_account_acknowledge_confirmation_of_payee_params.rb +12 -0
  218. data/lib/stripe/params/v2/core/vault/gb_bank_account_archive_params.rb +12 -0
  219. data/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb +50 -0
  220. data/lib/stripe/params/v2/core/vault/gb_bank_account_initiate_confirmation_of_payee_params.rb +22 -0
  221. data/lib/stripe/params/v2/core/vault/gb_bank_account_list_params.rb +19 -0
  222. data/lib/stripe/params/v2/core/vault/gb_bank_account_retrieve_params.rb +12 -0
  223. data/lib/stripe/params/v2/core/vault/us_bank_account_archive_params.rb +12 -0
  224. data/lib/stripe/params/v2/core/vault/us_bank_account_confirm_microdeposits_params.rb +22 -0
  225. data/lib/stripe/params/v2/core/vault/us_bank_account_create_params.rb +33 -0
  226. data/lib/stripe/params/v2/core/vault/us_bank_account_list_params.rb +22 -0
  227. data/lib/stripe/params/v2/core/vault/us_bank_account_retrieve_params.rb +12 -0
  228. data/lib/stripe/params/v2/core/vault/us_bank_account_send_microdeposits_params.rb +12 -0
  229. data/lib/stripe/params/v2/core/vault/us_bank_account_update_params.rb +22 -0
  230. data/lib/stripe/params/v2/money_management/adjustment_list_params.rb +48 -0
  231. data/lib/stripe/params/v2/money_management/adjustment_retrieve_params.rb +10 -0
  232. data/lib/stripe/params/v2/money_management/financial_account_close_params.rb +28 -0
  233. data/lib/stripe/params/v2/money_management/financial_account_create_params.rb +34 -0
  234. data/lib/stripe/params/v2/money_management/financial_account_list_params.rb +20 -0
  235. data/lib/stripe/params/v2/money_management/financial_account_retrieve_params.rb +10 -0
  236. data/lib/stripe/params/v2/money_management/financial_account_update_params.rb +20 -0
  237. data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +20 -0
  238. data/lib/stripe/params/v2/money_management/financial_address_list_params.rb +23 -0
  239. data/lib/stripe/params/v2/money_management/financial_address_retrieve_params.rb +17 -0
  240. data/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb +62 -0
  241. data/lib/stripe/params/v2/money_management/inbound_transfer_list_params.rb +44 -0
  242. data/lib/stripe/params/v2/money_management/inbound_transfer_retrieve_params.rb +10 -0
  243. data/lib/stripe/params/v2/money_management/outbound_payment_cancel_params.rb +10 -0
  244. data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +110 -0
  245. data/lib/stripe/params/v2/money_management/outbound_payment_list_params.rb +52 -0
  246. data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +79 -0
  247. data/lib/stripe/params/v2/money_management/outbound_payment_quote_retrieve_params.rb +10 -0
  248. data/lib/stripe/params/v2/money_management/outbound_payment_retrieve_params.rb +10 -0
  249. data/lib/stripe/params/v2/money_management/outbound_setup_intent_cancel_params.rb +10 -0
  250. data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +85 -0
  251. data/lib/stripe/params/v2/money_management/outbound_setup_intent_list_params.rb +17 -0
  252. data/lib/stripe/params/v2/money_management/outbound_setup_intent_retrieve_params.rb +10 -0
  253. data/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb +80 -0
  254. data/lib/stripe/params/v2/money_management/outbound_transfer_cancel_params.rb +10 -0
  255. data/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb +89 -0
  256. data/lib/stripe/params/v2/money_management/outbound_transfer_list_params.rb +48 -0
  257. data/lib/stripe/params/v2/money_management/outbound_transfer_retrieve_params.rb +10 -0
  258. data/lib/stripe/params/v2/money_management/payout_method_archive_params.rb +10 -0
  259. data/lib/stripe/params/v2/money_management/payout_method_list_params.rb +31 -0
  260. data/lib/stripe/params/v2/money_management/payout_method_retrieve_params.rb +10 -0
  261. data/lib/stripe/params/v2/money_management/payout_method_unarchive_params.rb +10 -0
  262. data/lib/stripe/params/v2/money_management/payout_methods_bank_account_spec_retrieve_params.rb +17 -0
  263. data/lib/stripe/params/v2/money_management/received_credit_list_params.rb +44 -0
  264. data/lib/stripe/params/v2/money_management/received_credit_retrieve_params.rb +10 -0
  265. data/lib/stripe/params/v2/money_management/received_debit_list_params.rb +17 -0
  266. data/lib/stripe/params/v2/money_management/received_debit_retrieve_params.rb +10 -0
  267. data/lib/stripe/params/v2/money_management/transaction_entry_list_params.rb +43 -0
  268. data/lib/stripe/params/v2/money_management/transaction_entry_retrieve_params.rb +10 -0
  269. data/lib/stripe/params/v2/money_management/transaction_list_params.rb +47 -0
  270. data/lib/stripe/params/v2/money_management/transaction_retrieve_params.rb +10 -0
  271. data/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb +34 -0
  272. data/lib/stripe/params/v2/test_helpers/financial_address_generate_microdeposits_params.rb +10 -0
  273. data/lib/stripe/params.rb +151 -0
  274. data/lib/stripe/resources/account.rb +182 -1
  275. data/lib/stripe/resources/account_notice.rb +94 -0
  276. data/lib/stripe/resources/account_session.rb +81 -0
  277. data/lib/stripe/resources/billing/analytics/meter_usage.rb +33 -0
  278. data/lib/stripe/resources/billing/analytics/meter_usage_row.rb +38 -0
  279. data/lib/stripe/resources/capital/financing_offer.rb +142 -0
  280. data/lib/stripe/resources/capital/financing_summary.rb +82 -0
  281. data/lib/stripe/resources/capital/financing_transaction.rb +99 -0
  282. data/lib/stripe/resources/card.rb +2 -0
  283. data/lib/stripe/resources/charge.rb +215 -1
  284. data/lib/stripe/resources/checkout/session.rb +104 -4
  285. data/lib/stripe/resources/confirmation_token.rb +133 -0
  286. data/lib/stripe/resources/coupon.rb +26 -1
  287. data/lib/stripe/resources/credit_note_line_item.rb +18 -0
  288. data/lib/stripe/resources/customer_session.rb +36 -0
  289. data/lib/stripe/resources/dispute.rb +22 -0
  290. data/lib/stripe/resources/event.rb +64 -1
  291. data/lib/stripe/resources/financial_connections/account.rb +25 -0
  292. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +35 -0
  293. data/lib/stripe/resources/financial_connections/institution.rb +127 -0
  294. data/lib/stripe/resources/financial_connections/session.rb +65 -1
  295. data/lib/stripe/resources/fx_quote.rb +147 -0
  296. data/lib/stripe/resources/invoice.rb +150 -1
  297. data/lib/stripe/resources/invoice_item.rb +2 -0
  298. data/lib/stripe/resources/invoice_line_item.rb +40 -0
  299. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +263 -0
  300. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +71 -0
  301. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +51 -0
  302. data/lib/stripe/resources/issuing/settlement.rb +61 -0
  303. data/lib/stripe/resources/issuing/transaction.rb +2 -0
  304. data/lib/stripe/resources/line_item.rb +66 -1
  305. data/lib/stripe/resources/mandate.rb +43 -0
  306. data/lib/stripe/resources/margin.rb +64 -0
  307. data/lib/stripe/resources/order.rb +987 -0
  308. data/lib/stripe/resources/payment_attempt_record.rb +181 -1
  309. data/lib/stripe/resources/payment_intent.rb +737 -4
  310. data/lib/stripe/resources/payment_method.rb +135 -0
  311. data/lib/stripe/resources/payment_method_configuration.rb +170 -0
  312. data/lib/stripe/resources/payment_record.rb +181 -1
  313. data/lib/stripe/resources/price.rb +20 -0
  314. data/lib/stripe/resources/privacy/redaction_job.rb +187 -0
  315. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +49 -0
  316. data/lib/stripe/resources/quote.rb +569 -2
  317. data/lib/stripe/resources/quote_line.rb +521 -0
  318. data/lib/stripe/resources/quote_preview_invoice.rb +1182 -0
  319. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +732 -0
  320. data/lib/stripe/resources/refund.rb +18 -0
  321. data/lib/stripe/resources/reserve/hold.rb +74 -0
  322. data/lib/stripe/resources/reserve/plan.rb +78 -0
  323. data/lib/stripe/resources/reserve/release.rb +77 -0
  324. data/lib/stripe/resources/setup_attempt.rb +48 -0
  325. data/lib/stripe/resources/setup_intent.rb +88 -1
  326. data/lib/stripe/resources/source.rb +38 -0
  327. data/lib/stripe/resources/subscription.rb +230 -0
  328. data/lib/stripe/resources/subscription_item.rb +20 -1
  329. data/lib/stripe/resources/subscription_schedule.rb +196 -3
  330. data/lib/stripe/resources/tax/form.rb +264 -0
  331. data/lib/stripe/resources/terminal/configuration.rb +16 -0
  332. data/lib/stripe/resources/terminal/reader.rb +8 -0
  333. data/lib/stripe/resources/terminal/reader_collected_data.rb +47 -0
  334. data/lib/stripe/resources/transfer.rb +2 -0
  335. data/lib/stripe/resources/treasury/financial_account.rb +2 -0
  336. data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
  337. data/lib/stripe/resources/treasury/outbound_transfer.rb +30 -0
  338. data/lib/stripe/resources/treasury/received_credit.rb +30 -0
  339. data/lib/stripe/resources/treasury/received_debit.rb +32 -0
  340. data/lib/stripe/resources/v2/billing/bill_setting.rb +102 -0
  341. data/lib/stripe/resources/v2/billing/bill_setting_version.rb +90 -0
  342. data/lib/stripe/resources/v2/billing/cadence.rb +609 -0
  343. data/lib/stripe/resources/v2/billing/collection_setting.rb +274 -0
  344. data/lib/stripe/resources/v2/billing/collection_setting_version.rb +262 -0
  345. data/lib/stripe/resources/v2/billing/profile.rb +46 -0
  346. data/lib/stripe/resources/v2/core/account.rb +565 -3
  347. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +114 -0
  348. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +83 -0
  349. data/lib/stripe/resources/v2/financial_address_credit_simulation.rb +28 -0
  350. data/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +44 -0
  351. data/lib/stripe/resources/v2/money_management/adjustment.rb +82 -0
  352. data/lib/stripe/resources/v2/money_management/financial_account.rb +188 -0
  353. data/lib/stripe/resources/v2/money_management/financial_address.rb +132 -0
  354. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +197 -0
  355. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +261 -0
  356. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +202 -0
  357. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +69 -0
  358. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +240 -0
  359. data/lib/stripe/resources/v2/money_management/payout_method.rb +111 -0
  360. data/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +81 -0
  361. data/lib/stripe/resources/v2/money_management/received_credit.rb +246 -0
  362. data/lib/stripe/resources/v2/money_management/received_debit.rb +152 -0
  363. data/lib/stripe/resources/v2/money_management/transaction.rb +180 -0
  364. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +153 -0
  365. data/lib/stripe/resources.rb +104 -0
  366. data/lib/stripe/services/account_notice_service.rb +39 -0
  367. data/lib/stripe/services/billing/analytics/meter_usage_service.rb +21 -0
  368. data/lib/stripe/services/billing/analytics_service.rb +15 -0
  369. data/lib/stripe/services/billing_service.rb +2 -1
  370. data/lib/stripe/services/capital/financing_offer_service.rb +42 -0
  371. data/lib/stripe/services/capital/financing_summary_service.rb +19 -0
  372. data/lib/stripe/services/capital/financing_transaction_service.rb +31 -0
  373. data/lib/stripe/services/capital_service.rb +15 -0
  374. data/lib/stripe/services/external_account_service.rb +68 -0
  375. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
  376. data/lib/stripe/services/financial_connections/account_service.rb +3 -1
  377. data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
  378. data/lib/stripe/services/financial_connections_service.rb +2 -1
  379. data/lib/stripe/services/fx_quote_service.rb +27 -0
  380. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
  381. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
  382. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +30 -0
  383. data/lib/stripe/services/issuing_service.rb +5 -1
  384. data/lib/stripe/services/mandate_service.rb +5 -0
  385. data/lib/stripe/services/margin_service.rb +50 -0
  386. data/lib/stripe/services/order_line_item_service.rb +17 -0
  387. data/lib/stripe/services/order_service.rb +78 -0
  388. data/lib/stripe/services/payment_intent_service.rb +37 -0
  389. data/lib/stripe/services/privacy/redaction_job_service.rb +104 -0
  390. data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +19 -0
  391. data/lib/stripe/services/privacy_service.rb +13 -0
  392. data/lib/stripe/services/quote_line_service.rb +17 -0
  393. data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
  394. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
  395. data/lib/stripe/services/quote_service.rb +49 -1
  396. data/lib/stripe/services/reserve/hold_service.rb +30 -0
  397. data/lib/stripe/services/reserve/plan_service.rb +19 -0
  398. data/lib/stripe/services/reserve/release_service.rb +30 -0
  399. data/lib/stripe/services/reserve_service.rb +15 -0
  400. data/lib/stripe/services/subscription_schedule_service.rb +11 -0
  401. data/lib/stripe/services/subscription_service.rb +11 -0
  402. data/lib/stripe/services/tax/form_service.rb +37 -0
  403. data/lib/stripe/services/tax_service.rb +2 -1
  404. data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
  405. data/lib/stripe/services/terminal_service.rb +2 -1
  406. data/lib/stripe/services/v1_services.rb +9 -1
  407. data/lib/stripe/services/v2/billing/bill_setting_service.rb +61 -0
  408. data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +34 -0
  409. data/lib/stripe/services/v2/billing/cadence_service.rb +65 -0
  410. data/lib/stripe/services/v2/billing/collection_setting_service.rb +61 -0
  411. data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +34 -0
  412. data/lib/stripe/services/v2/billing/profile_service.rb +54 -0
  413. data/lib/stripe/services/v2/billing_service.rb +5 -1
  414. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +85 -0
  415. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +101 -0
  416. data/lib/stripe/services/v2/core/vault_service.rb +18 -0
  417. data/lib/stripe/services/v2/core_service.rb +2 -1
  418. data/lib/stripe/services/v2/money_management/adjustment_service.rb +32 -0
  419. data/lib/stripe/services/v2/money_management/financial_account_service.rb +70 -0
  420. data/lib/stripe/services/v2/money_management/financial_address_service.rb +46 -0
  421. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +45 -0
  422. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +34 -0
  423. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +62 -0
  424. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +75 -0
  425. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +60 -0
  426. data/lib/stripe/services/v2/money_management/payout_method_service.rb +65 -0
  427. data/lib/stripe/services/v2/money_management/payout_methods_bank_account_spec_service.rb +23 -0
  428. data/lib/stripe/services/v2/money_management/received_credit_service.rb +32 -0
  429. data/lib/stripe/services/v2/money_management/received_debit_service.rb +32 -0
  430. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +32 -0
  431. data/lib/stripe/services/v2/money_management/transaction_service.rb +32 -0
  432. data/lib/stripe/services/v2/money_management_service.rb +31 -0
  433. data/lib/stripe/services/v2/test_helper_service.rb +15 -0
  434. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +36 -0
  435. data/lib/stripe/services/v2_services.rb +3 -1
  436. data/lib/stripe/services.rb +55 -0
  437. data/lib/stripe/stripe_client.rb +8 -1
  438. data/lib/stripe/stripe_configuration.rb +3 -1
  439. data/lib/stripe/stripe_event_notification_handler.rb +425 -0
  440. data/lib/stripe/stripe_object.rb +1 -1
  441. data/lib/stripe/util.rb +7 -1
  442. data/lib/stripe/version.rb +1 -1
  443. data/lib/stripe.rb +54 -0
  444. data/rbi/stripe/stripe_client.rbi +13 -0
  445. data/rbi/stripe.rbi +93543 -33169
  446. metadata +314 -3
@@ -0,0 +1,1182 @@
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://api.stripe.com#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://docs.stripe.com/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://docs.stripe.com/billing/customer/balance).
35
+ #
36
+ # Related guide: [Send invoices to customers](https://docs.stripe.com/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://docs.stripe.com/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 ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
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 ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
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://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/declines#issuer-declines) if they provide one.
271
+ attr_reader :decline_code
272
+ # A URL to more information about the [error code](https://docs.stripe.com/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](/payments/paymentintents/lifecycle)
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://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/payments/payment-methods) and [More Payment Scenarios](https://docs.stripe.com/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://api.stripe.com#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://api.stripe.com#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://api.stripe.com#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://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/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://docs.stripe.com/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 Payto < ::Stripe::StripeObject
553
+ class MandateOptions < ::Stripe::StripeObject
554
+ # The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit.
555
+ attr_reader :amount
556
+ # Only `maximum` is supported.
557
+ attr_reader :amount_type
558
+ # The purpose for which payments are made. Has a default value based on your merchant category code.
559
+ attr_reader :purpose
560
+
561
+ def self.inner_class_types
562
+ @inner_class_types = {}
563
+ end
564
+
565
+ def self.field_remappings
566
+ @field_remappings = {}
567
+ end
568
+ end
569
+ # Attribute for field mandate_options
570
+ attr_reader :mandate_options
571
+
572
+ def self.inner_class_types
573
+ @inner_class_types = { mandate_options: MandateOptions }
574
+ end
575
+
576
+ def self.field_remappings
577
+ @field_remappings = {}
578
+ end
579
+ end
580
+
581
+ class Pix < ::Stripe::StripeObject
582
+ # Determines if the amount includes the IOF tax.
583
+ attr_reader :amount_includes_iof
584
+
585
+ def self.inner_class_types
586
+ @inner_class_types = {}
587
+ end
588
+
589
+ def self.field_remappings
590
+ @field_remappings = {}
591
+ end
592
+ end
593
+
594
+ class SepaDebit < ::Stripe::StripeObject
595
+ def self.inner_class_types
596
+ @inner_class_types = {}
597
+ end
598
+
599
+ def self.field_remappings
600
+ @field_remappings = {}
601
+ end
602
+ end
603
+
604
+ class Upi < ::Stripe::StripeObject
605
+ class MandateOptions < ::Stripe::StripeObject
606
+ # Amount to be charged for future payments.
607
+ attr_reader :amount
608
+ # 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.
609
+ attr_reader :amount_type
610
+ # A description of the mandate or subscription that is meant to be displayed to the customer.
611
+ attr_reader :description
612
+ # 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.
613
+ attr_reader :end_date
614
+
615
+ def self.inner_class_types
616
+ @inner_class_types = {}
617
+ end
618
+
619
+ def self.field_remappings
620
+ @field_remappings = {}
621
+ end
622
+ end
623
+ # Attribute for field mandate_options
624
+ attr_reader :mandate_options
625
+
626
+ def self.inner_class_types
627
+ @inner_class_types = { mandate_options: MandateOptions }
628
+ end
629
+
630
+ def self.field_remappings
631
+ @field_remappings = {}
632
+ end
633
+ end
634
+
635
+ class UsBankAccount < ::Stripe::StripeObject
636
+ class FinancialConnections < ::Stripe::StripeObject
637
+ class Filters < ::Stripe::StripeObject
638
+ # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`.
639
+ attr_reader :account_subcategories
640
+ # The institution to use to filter for possible accounts to link.
641
+ attr_reader :institution
642
+
643
+ def self.inner_class_types
644
+ @inner_class_types = {}
645
+ end
646
+
647
+ def self.field_remappings
648
+ @field_remappings = {}
649
+ end
650
+ end
651
+ # Attribute for field filters
652
+ attr_reader :filters
653
+ # The list of permissions to request. The `payment_method` permission must be included.
654
+ attr_reader :permissions
655
+ # Data features requested to be retrieved upon account creation.
656
+ attr_reader :prefetch
657
+
658
+ def self.inner_class_types
659
+ @inner_class_types = { filters: Filters }
660
+ end
661
+
662
+ def self.field_remappings
663
+ @field_remappings = {}
664
+ end
665
+ end
666
+ # Attribute for field financial_connections
667
+ attr_reader :financial_connections
668
+ # Bank account verification method.
669
+ attr_reader :verification_method
670
+
671
+ def self.inner_class_types
672
+ @inner_class_types = { financial_connections: FinancialConnections }
673
+ end
674
+
675
+ def self.field_remappings
676
+ @field_remappings = {}
677
+ end
678
+ end
679
+ # 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.
680
+ attr_reader :acss_debit
681
+ # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
682
+ attr_reader :bancontact
683
+ # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.
684
+ attr_reader :card
685
+ # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent.
686
+ attr_reader :customer_balance
687
+ # 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.
688
+ attr_reader :id_bank_transfer
689
+ # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.
690
+ attr_reader :konbini
691
+ # If paying by `payto`, this sub-hash contains details about the PayTo payment method options to pass to the invoice’s PaymentIntent.
692
+ attr_reader :payto
693
+ # If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice’s PaymentIntent.
694
+ attr_reader :pix
695
+ # 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.
696
+ attr_reader :sepa_debit
697
+ # If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice’s PaymentIntent.
698
+ attr_reader :upi
699
+ # 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.
700
+ attr_reader :us_bank_account
701
+
702
+ def self.inner_class_types
703
+ @inner_class_types = {
704
+ acss_debit: AcssDebit,
705
+ bancontact: Bancontact,
706
+ card: Card,
707
+ customer_balance: CustomerBalance,
708
+ id_bank_transfer: IdBankTransfer,
709
+ konbini: Konbini,
710
+ payto: Payto,
711
+ pix: Pix,
712
+ sepa_debit: SepaDebit,
713
+ upi: Upi,
714
+ us_bank_account: UsBankAccount,
715
+ }
716
+ end
717
+
718
+ def self.field_remappings
719
+ @field_remappings = {}
720
+ end
721
+ end
722
+ # 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.
723
+ attr_reader :default_mandate
724
+ # Payment-method-specific configuration to provide to the invoice’s PaymentIntent.
725
+ attr_reader :payment_method_options
726
+ # 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).
727
+ attr_reader :payment_method_types
728
+
729
+ def self.inner_class_types
730
+ @inner_class_types = { payment_method_options: PaymentMethodOptions }
731
+ end
732
+
733
+ def self.field_remappings
734
+ @field_remappings = {}
735
+ end
736
+ end
737
+
738
+ class Rendering < ::Stripe::StripeObject
739
+ class Pdf < ::Stripe::StripeObject
740
+ # 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.
741
+ attr_reader :page_size
742
+
743
+ def self.inner_class_types
744
+ @inner_class_types = {}
745
+ end
746
+
747
+ def self.field_remappings
748
+ @field_remappings = {}
749
+ end
750
+ end
751
+ # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
752
+ attr_reader :amount_tax_display
753
+ # Invoice pdf rendering options
754
+ attr_reader :pdf
755
+ # ID of the rendering template that the invoice is formatted by.
756
+ attr_reader :template
757
+ # Version of the rendering template that the invoice is using.
758
+ attr_reader :template_version
759
+
760
+ def self.inner_class_types
761
+ @inner_class_types = { pdf: Pdf }
762
+ end
763
+
764
+ def self.field_remappings
765
+ @field_remappings = {}
766
+ end
767
+ end
768
+
769
+ class ShippingCost < ::Stripe::StripeObject
770
+ class Tax < ::Stripe::StripeObject
771
+ # Amount of tax applied for this rate.
772
+ attr_reader :amount
773
+ # 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.
774
+ #
775
+ # Related guide: [Tax rates](/billing/taxes/tax-rates)
776
+ attr_reader :rate
777
+ # 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.
778
+ attr_reader :taxability_reason
779
+ # The amount on which tax is calculated, in cents (or local equivalent).
780
+ attr_reader :taxable_amount
781
+
782
+ def self.inner_class_types
783
+ @inner_class_types = {}
784
+ end
785
+
786
+ def self.field_remappings
787
+ @field_remappings = {}
788
+ end
789
+ end
790
+ # Total shipping cost before any taxes are applied.
791
+ attr_reader :amount_subtotal
792
+ # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
793
+ attr_reader :amount_tax
794
+ # Total shipping cost after taxes are applied.
795
+ attr_reader :amount_total
796
+ # The ID of the ShippingRate for this invoice.
797
+ attr_reader :shipping_rate
798
+ # The taxes applied to the shipping rate.
799
+ attr_reader :taxes
800
+
801
+ def self.inner_class_types
802
+ @inner_class_types = { taxes: Tax }
803
+ end
804
+
805
+ def self.field_remappings
806
+ @field_remappings = {}
807
+ end
808
+ end
809
+
810
+ class ShippingDetails < ::Stripe::StripeObject
811
+ class Address < ::Stripe::StripeObject
812
+ # City, district, suburb, town, or village.
813
+ attr_reader :city
814
+ # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
815
+ attr_reader :country
816
+ # Address line 1, such as the street, PO Box, or company name.
817
+ attr_reader :line1
818
+ # Address line 2, such as the apartment, suite, unit, or building.
819
+ attr_reader :line2
820
+ # ZIP or postal code.
821
+ attr_reader :postal_code
822
+ # State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
823
+ attr_reader :state
824
+
825
+ def self.inner_class_types
826
+ @inner_class_types = {}
827
+ end
828
+
829
+ def self.field_remappings
830
+ @field_remappings = {}
831
+ end
832
+ end
833
+ # Attribute for field address
834
+ attr_reader :address
835
+ # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
836
+ attr_reader :carrier
837
+ # Recipient name.
838
+ attr_reader :name
839
+ # Recipient phone (including extension).
840
+ attr_reader :phone
841
+ # 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.
842
+ attr_reader :tracking_number
843
+
844
+ def self.inner_class_types
845
+ @inner_class_types = { address: Address }
846
+ end
847
+
848
+ def self.field_remappings
849
+ @field_remappings = {}
850
+ end
851
+ end
852
+
853
+ class StatusTransitions < ::Stripe::StripeObject
854
+ # The time that the invoice draft was finalized.
855
+ attr_reader :finalized_at
856
+ # The time that the invoice was marked uncollectible.
857
+ attr_reader :marked_uncollectible_at
858
+ # The time that the invoice was paid.
859
+ attr_reader :paid_at
860
+ # The time that the invoice was voided.
861
+ attr_reader :voided_at
862
+
863
+ def self.inner_class_types
864
+ @inner_class_types = {}
865
+ end
866
+
867
+ def self.field_remappings
868
+ @field_remappings = {}
869
+ end
870
+ end
871
+
872
+ class ThresholdReason < ::Stripe::StripeObject
873
+ class ItemReason < ::Stripe::StripeObject
874
+ # The IDs of the line items that triggered the threshold invoice.
875
+ attr_reader :line_item_ids
876
+ # The quantity threshold boundary that applied to the given line item.
877
+ attr_reader :usage_gte
878
+
879
+ def self.inner_class_types
880
+ @inner_class_types = {}
881
+ end
882
+
883
+ def self.field_remappings
884
+ @field_remappings = {}
885
+ end
886
+ end
887
+ # The total invoice amount threshold boundary if it triggered the threshold invoice.
888
+ attr_reader :amount_gte
889
+ # Indicates which line items triggered a threshold invoice.
890
+ attr_reader :item_reasons
891
+
892
+ def self.inner_class_types
893
+ @inner_class_types = { item_reasons: ItemReason }
894
+ end
895
+
896
+ def self.field_remappings
897
+ @field_remappings = {}
898
+ end
899
+ end
900
+
901
+ class TotalDiscountAmount < ::Stripe::StripeObject
902
+ # The amount, in cents (or local equivalent), of the discount.
903
+ attr_reader :amount
904
+ # The discount that was applied to get this discount amount.
905
+ attr_reader :discount
906
+
907
+ def self.inner_class_types
908
+ @inner_class_types = {}
909
+ end
910
+
911
+ def self.field_remappings
912
+ @field_remappings = {}
913
+ end
914
+ end
915
+
916
+ class TotalMarginAmount < ::Stripe::StripeObject
917
+ # The amount, in cents (or local equivalent), of the reduction in line item amount.
918
+ attr_reader :amount
919
+ # The margin that was applied to get this margin amount.
920
+ attr_reader :margin
921
+
922
+ def self.inner_class_types
923
+ @inner_class_types = {}
924
+ end
925
+
926
+ def self.field_remappings
927
+ @field_remappings = {}
928
+ end
929
+ end
930
+
931
+ class TotalPretaxCreditAmount < ::Stripe::StripeObject
932
+ # The amount, in cents (or local equivalent), of the pretax credit amount.
933
+ attr_reader :amount
934
+ # The credit balance transaction that was applied to get this pretax credit amount.
935
+ attr_reader :credit_balance_transaction
936
+ # The discount that was applied to get this pretax credit amount.
937
+ attr_reader :discount
938
+ # The margin that was applied to get this pretax credit amount.
939
+ attr_reader :margin
940
+ # Type of the pretax credit amount referenced.
941
+ attr_reader :type
942
+
943
+ def self.inner_class_types
944
+ @inner_class_types = {}
945
+ end
946
+
947
+ def self.field_remappings
948
+ @field_remappings = {}
949
+ end
950
+ end
951
+
952
+ class TotalTax < ::Stripe::StripeObject
953
+ class TaxRateDetails < ::Stripe::StripeObject
954
+ # ID of the tax rate
955
+ attr_reader :tax_rate
956
+
957
+ def self.inner_class_types
958
+ @inner_class_types = {}
959
+ end
960
+
961
+ def self.field_remappings
962
+ @field_remappings = {}
963
+ end
964
+ end
965
+ # The amount of the tax, in cents (or local equivalent).
966
+ attr_reader :amount
967
+ # Whether this tax is inclusive or exclusive.
968
+ attr_reader :tax_behavior
969
+ # Additional details about the tax rate. Only present when `type` is `tax_rate_details`.
970
+ attr_reader :tax_rate_details
971
+ # 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.
972
+ attr_reader :taxability_reason
973
+ # The amount on which tax is calculated, in cents (or local equivalent).
974
+ attr_reader :taxable_amount
975
+ # The type of tax information.
976
+ attr_reader :type
977
+
978
+ def self.inner_class_types
979
+ @inner_class_types = { tax_rate_details: TaxRateDetails }
980
+ end
981
+
982
+ def self.field_remappings
983
+ @field_remappings = {}
984
+ end
985
+ end
986
+ # The country of the business associated with this invoice, most often the business creating the invoice.
987
+ attr_reader :account_country
988
+ # The public name of the business associated with this invoice, most often the business creating the invoice.
989
+ attr_reader :account_name
990
+ # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
991
+ attr_reader :account_tax_ids
992
+ # 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`.
993
+ attr_reader :amount_due
994
+ # Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.
995
+ attr_reader :amount_overpaid
996
+ # The amount, in cents (or local equivalent), that was paid.
997
+ attr_reader :amount_paid
998
+ # The difference between amount_due and amount_paid, in cents (or local equivalent).
999
+ attr_reader :amount_remaining
1000
+ # This is the sum of all the shipping amounts.
1001
+ attr_reader :amount_shipping
1002
+ # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
1003
+ attr_reader :amounts_due
1004
+ # ID of the Connect Application that created the invoice.
1005
+ attr_reader :application
1006
+ # Attribute for field applies_to
1007
+ attr_reader :applies_to
1008
+ # 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.
1009
+ attr_reader :attempt_count
1010
+ # 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.
1011
+ attr_reader :attempted
1012
+ # Attribute for field automatic_tax
1013
+ attr_reader :automatic_tax
1014
+ # 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.
1015
+ attr_reader :automatically_finalizes_at
1016
+ # Indicates the reason why the invoice was created.
1017
+ #
1018
+ # * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
1019
+ # * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
1020
+ # * `subscription_create`: A new subscription was created.
1021
+ # * `subscription_cycle`: A subscription advanced into a new period.
1022
+ # * `subscription_threshold`: A subscription reached a billing threshold.
1023
+ # * `subscription_update`: A subscription was updated.
1024
+ # * `upcoming`: Reserved for upcoming invoices created through the Create Preview Invoice API or when an `invoice.upcoming` event is generated for an upcoming invoice on a subscription.
1025
+ attr_reader :billing_reason
1026
+ # 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.
1027
+ attr_reader :collection_method
1028
+ # The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization.
1029
+ attr_reader :confirmation_secret
1030
+ # Time at which the object was created. Measured in seconds since the Unix epoch.
1031
+ attr_reader :created
1032
+ # 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).
1033
+ attr_reader :currency
1034
+ # Custom fields displayed on the invoice.
1035
+ attr_reader :custom_fields
1036
+ # The ID of the account representing the customer to bill.
1037
+ attr_reader :customer_account
1038
+ # 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.
1039
+ attr_reader :customer_address
1040
+ # 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.
1041
+ attr_reader :customer_email
1042
+ # 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.
1043
+ attr_reader :customer_name
1044
+ # 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.
1045
+ attr_reader :customer_phone
1046
+ # 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.
1047
+ attr_reader :customer_shipping
1048
+ # 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.
1049
+ attr_reader :customer_tax_exempt
1050
+ # 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.
1051
+ attr_reader :customer_tax_ids
1052
+ # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
1053
+ attr_reader :default_margins
1054
+ # 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.
1055
+ attr_reader :default_payment_method
1056
+ # 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.
1057
+ attr_reader :default_source
1058
+ # The tax rates applied to this invoice, if any.
1059
+ attr_reader :default_tax_rates
1060
+ # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
1061
+ attr_reader :description
1062
+ # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
1063
+ attr_reader :discounts
1064
+ # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.
1065
+ attr_reader :due_date
1066
+ # 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.
1067
+ attr_reader :effective_at
1068
+ # 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.
1069
+ attr_reader :ending_balance
1070
+ # Footer displayed on the invoice.
1071
+ attr_reader :footer
1072
+ # Details of the invoice that was cloned. See the [revision documentation](https://docs.stripe.com/invoicing/invoice-revisions) for more details.
1073
+ attr_reader :from_invoice
1074
+ # 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`.
1075
+ attr_reader :id
1076
+ # Attribute for field issuer
1077
+ attr_reader :issuer
1078
+ # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
1079
+ attr_reader :last_finalization_error
1080
+ # The ID of the most recent non-draft revision of this invoice
1081
+ attr_reader :latest_revision
1082
+ # 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.
1083
+ attr_reader :lines
1084
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
1085
+ attr_reader :livemode
1086
+ # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
1087
+ attr_reader :metadata
1088
+ # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.
1089
+ attr_reader :next_payment_attempt
1090
+ # 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.
1091
+ attr_reader :number
1092
+ # String representing the object's type. Objects of the same type share the same value.
1093
+ attr_reader :object
1094
+ # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://docs.stripe.com/billing/invoices/connect) documentation for details.
1095
+ attr_reader :on_behalf_of
1096
+ # The parent that generated this invoice
1097
+ attr_reader :parent
1098
+ # Attribute for field payment_settings
1099
+ attr_reader :payment_settings
1100
+ # Payments for this invoice
1101
+ attr_reader :payments
1102
+ # 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.
1103
+ attr_reader :period_end
1104
+ # 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.
1105
+ attr_reader :period_start
1106
+ # Total amount of all post-payment credit notes issued for this invoice.
1107
+ attr_reader :post_payment_credit_notes_amount
1108
+ # Total amount of all pre-payment credit notes issued for this invoice.
1109
+ attr_reader :pre_payment_credit_notes_amount
1110
+ # This is the transaction number that appears on email receipts sent for this invoice.
1111
+ attr_reader :receipt_number
1112
+ # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
1113
+ attr_reader :rendering
1114
+ # The details of the cost of shipping, including the ShippingRate applied on the invoice.
1115
+ attr_reader :shipping_cost
1116
+ # 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.
1117
+ attr_reader :shipping_details
1118
+ # 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.
1119
+ attr_reader :starting_balance
1120
+ # Extra information about an invoice for the customer's credit card statement.
1121
+ attr_reader :statement_descriptor
1122
+ # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://docs.stripe.com/billing/invoices/workflow#workflow-overview)
1123
+ attr_reader :status
1124
+ # Attribute for field status_transitions
1125
+ attr_reader :status_transitions
1126
+ # Attribute for field subscription
1127
+ attr_reader :subscription
1128
+ # 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
1129
+ attr_reader :subtotal
1130
+ # 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
1131
+ attr_reader :subtotal_excluding_tax
1132
+ # ID of the test clock this invoice belongs to.
1133
+ attr_reader :test_clock
1134
+ # Attribute for field threshold_reason
1135
+ attr_reader :threshold_reason
1136
+ # Total after discounts and taxes.
1137
+ attr_reader :total
1138
+ # The aggregate amounts calculated per discount across all line items.
1139
+ attr_reader :total_discount_amounts
1140
+ # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
1141
+ attr_reader :total_excluding_tax
1142
+ # The aggregate amounts calculated per margin across all line items.
1143
+ attr_reader :total_margin_amounts
1144
+ # 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.
1145
+ attr_reader :total_pretax_credit_amounts
1146
+ # The aggregate tax information of all line items.
1147
+ attr_reader :total_taxes
1148
+ # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://docs.stripe.com/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.
1149
+ attr_reader :webhooks_delivered_at
1150
+
1151
+ def self.inner_class_types
1152
+ @inner_class_types = {
1153
+ amounts_due: AmountsDue,
1154
+ applies_to: AppliesTo,
1155
+ automatic_tax: AutomaticTax,
1156
+ confirmation_secret: ConfirmationSecret,
1157
+ custom_fields: CustomField,
1158
+ customer_address: CustomerAddress,
1159
+ customer_shipping: CustomerShipping,
1160
+ customer_tax_ids: CustomerTaxId,
1161
+ from_invoice: FromInvoice,
1162
+ issuer: Issuer,
1163
+ last_finalization_error: LastFinalizationError,
1164
+ parent: Parent,
1165
+ payment_settings: PaymentSettings,
1166
+ rendering: Rendering,
1167
+ shipping_cost: ShippingCost,
1168
+ shipping_details: ShippingDetails,
1169
+ status_transitions: StatusTransitions,
1170
+ threshold_reason: ThresholdReason,
1171
+ total_discount_amounts: TotalDiscountAmount,
1172
+ total_margin_amounts: TotalMarginAmount,
1173
+ total_pretax_credit_amounts: TotalPretaxCreditAmount,
1174
+ total_taxes: TotalTax,
1175
+ }
1176
+ end
1177
+
1178
+ def self.field_remappings
1179
+ @field_remappings = {}
1180
+ end
1181
+ end
1182
+ end