stripe 21.0.0 → 21.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 (558) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_operations/request.rb +16 -7
  3. data/lib/stripe/api_operations/save.rb +4 -4
  4. data/lib/stripe/api_requestor.rb +58 -34
  5. data/lib/stripe/api_resource.rb +1 -2
  6. data/lib/stripe/api_version.rb +2 -2
  7. data/lib/stripe/connection_manager.rb +3 -0
  8. data/lib/stripe/errors.rb +6 -0
  9. data/lib/stripe/event_types.rb +213 -0
  10. data/lib/stripe/events/unknown_event_notification.rb +1 -0
  11. data/lib/stripe/events/v2_core_account_closed_event.rb +2 -2
  12. data/lib/stripe/events/v2_core_account_including_configuration_money_manager_capability_status_updated_event.rb +63 -0
  13. data/lib/stripe/events/v2_core_account_including_configuration_money_manager_updated_event.rb +44 -0
  14. data/lib/stripe/events/v2_core_account_including_defaults_updated_event.rb +2 -2
  15. data/lib/stripe/events/v2_core_approval_request_approved_event.rb +44 -0
  16. data/lib/stripe/events/v2_core_approval_request_canceled_event.rb +44 -0
  17. data/lib/stripe/events/v2_core_approval_request_created_event.rb +44 -0
  18. data/lib/stripe/events/v2_core_approval_request_expired_event.rb +44 -0
  19. data/lib/stripe/events/v2_core_approval_request_failed_event.rb +44 -0
  20. data/lib/stripe/events/v2_core_approval_request_rejected_event.rb +44 -0
  21. data/lib/stripe/events/v2_core_approval_request_succeeded_event.rb +44 -0
  22. data/lib/stripe/events/v2_core_batch_job_batch_failed_event.rb +44 -0
  23. data/lib/stripe/events/v2_core_batch_job_canceled_event.rb +44 -0
  24. data/lib/stripe/events/v2_core_batch_job_completed_event.rb +44 -0
  25. data/lib/stripe/events/v2_core_batch_job_created_event.rb +44 -0
  26. data/lib/stripe/events/v2_core_batch_job_ready_for_upload_event.rb +44 -0
  27. data/lib/stripe/events/v2_core_batch_job_timeout_event.rb +44 -0
  28. data/lib/stripe/events/v2_core_batch_job_updated_event.rb +44 -0
  29. data/lib/stripe/events/v2_core_batch_job_upload_timeout_event.rb +44 -0
  30. data/lib/stripe/events/v2_core_batch_job_validating_event.rb +44 -0
  31. data/lib/stripe/events/v2_core_batch_job_validation_failed_event.rb +44 -0
  32. data/lib/stripe/events/v2_core_claimable_sandbox_claimed_event.rb +44 -0
  33. data/lib/stripe/events/v2_core_claimable_sandbox_created_event.rb +44 -0
  34. data/lib/stripe/events/v2_core_claimable_sandbox_expired_event.rb +44 -0
  35. data/lib/stripe/events/v2_core_claimable_sandbox_expiring_event.rb +44 -0
  36. data/lib/stripe/events/v2_core_claimable_sandbox_updated_event.rb +44 -0
  37. data/lib/stripe/events/v2_core_health_event_generation_failure_resolved_event.rb +80 -0
  38. data/lib/stripe/events/v2_data_query_run_created_event.rb +44 -0
  39. data/lib/stripe/events/v2_data_query_run_failed_event.rb +44 -0
  40. data/lib/stripe/events/v2_data_query_run_succeeded_event.rb +44 -0
  41. data/lib/stripe/events/v2_data_query_run_updated_event.rb +44 -0
  42. data/lib/stripe/events/v2_data_report_run_created_event.rb +44 -0
  43. data/lib/stripe/events/v2_data_report_run_failed_event.rb +44 -0
  44. data/lib/stripe/events/v2_data_report_run_succeeded_event.rb +44 -0
  45. data/lib/stripe/events/v2_data_report_run_updated_event.rb +44 -0
  46. data/lib/stripe/events/v2_data_reporting_query_run_created_event.rb +44 -0
  47. data/lib/stripe/events/v2_data_reporting_query_run_failed_event.rb +44 -0
  48. data/lib/stripe/events/v2_data_reporting_query_run_succeeded_event.rb +44 -0
  49. data/lib/stripe/events/v2_data_reporting_query_run_updated_event.rb +44 -0
  50. data/lib/stripe/events/v2_extend_workflow_run_failed_event.rb +75 -0
  51. data/lib/stripe/events/v2_extend_workflow_run_started_event.rb +44 -0
  52. data/lib/stripe/events/v2_extend_workflow_run_succeeded_event.rb +44 -0
  53. data/lib/stripe/events/v2_money_management_outbound_transfer_canceled_event.rb +44 -0
  54. data/lib/stripe/events/v2_money_management_outbound_transfer_created_event.rb +44 -0
  55. data/lib/stripe/events/v2_money_management_outbound_transfer_failed_event.rb +44 -0
  56. data/lib/stripe/events/v2_money_management_outbound_transfer_posted_event.rb +44 -0
  57. data/lib/stripe/events/v2_money_management_outbound_transfer_returned_event.rb +44 -0
  58. data/lib/stripe/events/v2_money_management_outbound_transfer_under_review_event.rb +44 -0
  59. data/lib/stripe/events/v2_money_management_outbound_transfer_updated_event.rb +44 -0
  60. data/lib/stripe/events/v2_money_management_received_debit_canceled_event.rb +44 -0
  61. data/lib/stripe/events/v2_money_management_received_debit_failed_event.rb +44 -0
  62. data/lib/stripe/events/v2_money_management_received_debit_pending_event.rb +44 -0
  63. data/lib/stripe/events/v2_money_management_received_debit_succeeded_event.rb +44 -0
  64. data/lib/stripe/events/v2_money_management_received_debit_updated_event.rb +44 -0
  65. data/lib/stripe/events/v2_orchestrated_commerce_agreement_confirmed_event.rb +97 -0
  66. data/lib/stripe/events/v2_orchestrated_commerce_agreement_created_event.rb +97 -0
  67. data/lib/stripe/events/v2_orchestrated_commerce_agreement_partially_confirmed_event.rb +97 -0
  68. data/lib/stripe/events/v2_orchestrated_commerce_agreement_terminated_event.rb +97 -0
  69. data/lib/stripe/events/v2_signals_account_evaluation_complete_event.rb +44 -0
  70. data/lib/stripe/events/v2_signals_account_signal_fraudulent_merchant_ready_event.rb +44 -0
  71. data/lib/stripe/events/v2_signals_account_signal_fraudulent_website_ready_event.rb +44 -0
  72. data/lib/stripe/object_types.rb +53 -0
  73. data/lib/stripe/params/account_create_params.rb +299 -1
  74. data/lib/stripe/params/account_notice_list_params.rb +25 -0
  75. data/lib/stripe/params/account_notice_retrieve_params.rb +13 -0
  76. data/lib/stripe/params/account_notice_update_params.rb +36 -0
  77. data/lib/stripe/params/account_session_create_params.rb +191 -0
  78. data/lib/stripe/params/account_update_params.rb +261 -0
  79. data/lib/stripe/params/balance_settings_update_params.rb +9 -1
  80. data/lib/stripe/params/billing/analytics/meter_usage_retrieve_params.rb +65 -0
  81. data/lib/stripe/params/billing_portal/configuration_create_params.rb +1 -1
  82. data/lib/stripe/params/billing_portal/configuration_update_params.rb +1 -1
  83. data/lib/stripe/params/capital/financing_offer_create_params.rb +37 -0
  84. data/lib/stripe/params/capital/financing_offer_list_params.rb +58 -0
  85. data/lib/stripe/params/capital/financing_offer_mark_delivered_params.rb +15 -0
  86. data/lib/stripe/params/capital/financing_offer_refill_params.rb +37 -0
  87. data/lib/stripe/params/capital/financing_offer_retrieve_params.rb +15 -0
  88. data/lib/stripe/params/capital/financing_summary_retrieve_params.rb +15 -0
  89. data/lib/stripe/params/capital/financing_transaction_list_params.rb +45 -0
  90. data/lib/stripe/params/capital/financing_transaction_retrieve_params.rb +15 -0
  91. data/lib/stripe/params/charge_capture_params.rb +1646 -0
  92. data/lib/stripe/params/charge_update_params.rb +1646 -0
  93. data/lib/stripe/params/checkout/session_create_params.rb +95 -4
  94. data/lib/stripe/params/checkout/session_update_params.rb +161 -1
  95. data/lib/stripe/params/confirmation_token_create_params.rb +92 -0
  96. data/lib/stripe/params/coupon_create_params.rb +49 -2
  97. data/lib/stripe/params/customer_balance_transaction_create_params.rb +23 -1
  98. data/lib/stripe/params/customer_session_create_params.rb +32 -1
  99. data/lib/stripe/params/external_account_create_params.rb +134 -0
  100. data/lib/stripe/params/external_account_delete_params.rb +6 -0
  101. data/lib/stripe/params/external_account_list_params.rb +25 -0
  102. data/lib/stripe/params/external_account_retrieve_params.rb +13 -0
  103. data/lib/stripe/params/external_account_update_params.rb +91 -0
  104. data/lib/stripe/params/financial_connections/account_inferred_balance_list_params.rb +24 -0
  105. data/lib/stripe/params/financial_connections/authorization_retrieve_params.rb +15 -0
  106. data/lib/stripe/params/financial_connections/institution_list_params.rb +24 -0
  107. data/lib/stripe/params/financial_connections/institution_retrieve_params.rb +15 -0
  108. data/lib/stripe/params/financial_connections/session_create_params.rb +39 -2
  109. data/lib/stripe/params/fx_quote_create_params.rb +71 -0
  110. data/lib/stripe/params/fx_quote_list_params.rb +22 -0
  111. data/lib/stripe/params/fx_quote_retrieve_params.rb +13 -0
  112. data/lib/stripe/params/invoice_add_lines_params.rb +33 -1
  113. data/lib/stripe/params/invoice_attach_payment_params.rb +43 -1
  114. data/lib/stripe/params/invoice_create_params.rb +64 -2
  115. data/lib/stripe/params/invoice_create_preview_params.rb +772 -9
  116. data/lib/stripe/params/invoice_detach_payment_params.rb +16 -0
  117. data/lib/stripe/params/invoice_item_create_params.rb +34 -2
  118. data/lib/stripe/params/invoice_item_update_params.rb +33 -1
  119. data/lib/stripe/params/invoice_line_item_update_params.rb +33 -1
  120. data/lib/stripe/params/invoice_update_lines_params.rb +33 -1
  121. data/lib/stripe/params/invoice_update_params.rb +64 -2
  122. data/lib/stripe/params/issuing/cardholder_create_params.rb +2 -1
  123. data/lib/stripe/params/issuing/cardholder_update_params.rb +4 -0
  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_create_params.rb +2083 -0
  141. data/lib/stripe/params/order_list_params.rb +25 -0
  142. data/lib/stripe/params/order_retrieve_params.rb +13 -0
  143. data/lib/stripe/params/order_submit_params.rb +16 -0
  144. data/lib/stripe/params/order_update_params.rb +2087 -0
  145. data/lib/stripe/params/payment_intent_capture_params.rb +1643 -1
  146. data/lib/stripe/params/payment_intent_confirm_params.rb +3038 -85
  147. data/lib/stripe/params/payment_intent_create_params.rb +3051 -98
  148. data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +297 -0
  149. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +37 -0
  150. data/lib/stripe/params/payment_intent_trigger_action_params.rb +27 -0
  151. data/lib/stripe/params/payment_intent_update_params.rb +3040 -56
  152. data/lib/stripe/params/payment_link_update_params.rb +4 -0
  153. data/lib/stripe/params/payment_method_configuration_create_params.rb +105 -0
  154. data/lib/stripe/params/payment_method_configuration_update_params.rb +105 -0
  155. data/lib/stripe/params/payment_method_create_params.rb +88 -0
  156. data/lib/stripe/params/payment_plan_create_params.rb +128 -0
  157. data/lib/stripe/params/payment_plan_list_params.rb +25 -0
  158. data/lib/stripe/params/payment_plan_retrieve_params.rb +13 -0
  159. data/lib/stripe/params/payment_plan_update_params.rb +105 -0
  160. data/lib/stripe/params/price_update_params.rb +19 -0
  161. data/lib/stripe/params/privacy/redaction_job_cancel_params.rb +15 -0
  162. data/lib/stripe/params/privacy/redaction_job_create_params.rb +67 -0
  163. data/lib/stripe/params/privacy/redaction_job_list_params.rb +27 -0
  164. data/lib/stripe/params/privacy/redaction_job_retrieve_params.rb +15 -0
  165. data/lib/stripe/params/privacy/redaction_job_run_params.rb +15 -0
  166. data/lib/stripe/params/privacy/redaction_job_update_params.rb +18 -0
  167. data/lib/stripe/params/privacy/redaction_job_validate_params.rb +15 -0
  168. data/lib/stripe/params/privacy/redaction_job_validation_error_list_params.rb +24 -0
  169. data/lib/stripe/params/product_create_params.rb +4 -1
  170. data/lib/stripe/params/product_update_params.rb +4 -1
  171. data/lib/stripe/params/quote_create_params.rb +810 -4
  172. data/lib/stripe/params/quote_line_list_params.rb +22 -0
  173. data/lib/stripe/params/quote_list_lines_params.rb +22 -0
  174. data/lib/stripe/params/quote_list_params.rb +4 -0
  175. data/lib/stripe/params/quote_list_preview_invoice_lines_params.rb +22 -0
  176. data/lib/stripe/params/quote_mark_draft_params.rb +13 -0
  177. data/lib/stripe/params/quote_mark_stale_params.rb +16 -0
  178. data/lib/stripe/params/quote_preview_invoice_list_params.rb +22 -0
  179. data/lib/stripe/params/quote_preview_subscription_schedule_list_params.rb +22 -0
  180. data/lib/stripe/params/quote_reestimate_params.rb +13 -0
  181. data/lib/stripe/params/quote_update_params.rb +818 -5
  182. data/lib/stripe/params/radar/billing_evaluation_create_params.rb +231 -0
  183. data/lib/stripe/params/reporting/report_run_create_params.rb +4 -0
  184. data/lib/stripe/params/reserve/hold_list_params.rb +53 -0
  185. data/lib/stripe/params/reserve/hold_retrieve_params.rb +15 -0
  186. data/lib/stripe/params/reserve/plan_list_params.rb +37 -0
  187. data/lib/stripe/params/reserve/plan_retrieve_params.rb +15 -0
  188. data/lib/stripe/params/reserve/release_list_params.rb +41 -0
  189. data/lib/stripe/params/reserve/release_retrieve_params.rb +15 -0
  190. data/lib/stripe/params/setup_intent_confirm_params.rb +122 -3
  191. data/lib/stripe/params/setup_intent_create_params.rb +122 -3
  192. data/lib/stripe/params/setup_intent_update_params.rb +122 -3
  193. data/lib/stripe/params/shared_payment/granted_token_create_params.rb +47 -0
  194. data/lib/stripe/params/shared_payment/granted_token_retrieve_params.rb +15 -0
  195. data/lib/stripe/params/shared_payment/granted_token_revoke_params.rb +15 -0
  196. data/lib/stripe/params/shared_payment/issued_token_create_params.rb +71 -0
  197. data/lib/stripe/params/shared_payment/issued_token_retrieve_params.rb +15 -0
  198. data/lib/stripe/params/shared_payment/issued_token_revoke_params.rb +15 -0
  199. data/lib/stripe/params/subscription_create_params.rb +133 -6
  200. data/lib/stripe/params/subscription_item_create_params.rb +50 -3
  201. data/lib/stripe/params/subscription_item_update_params.rb +33 -2
  202. data/lib/stripe/params/subscription_schedule_amend_params.rb +578 -0
  203. data/lib/stripe/params/subscription_schedule_create_params.rb +167 -5
  204. data/lib/stripe/params/subscription_schedule_update_params.rb +167 -5
  205. data/lib/stripe/params/subscription_update_params.rb +116 -5
  206. data/lib/stripe/params/tax/form_list_params.rb +51 -0
  207. data/lib/stripe/params/tax/form_pdf_params.rb +15 -0
  208. data/lib/stripe/params/tax/form_retrieve_params.rb +15 -0
  209. data/lib/stripe/params/tax/registration_create_params.rb +13 -1
  210. data/lib/stripe/params/terminal/reader_collected_data_retrieve_params.rb +15 -0
  211. data/lib/stripe/params/test_helpers/capital/financing_offer_create_params.rb +39 -0
  212. data/lib/stripe/params/test_helpers/capital/financing_offer_refill_params.rb +39 -0
  213. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +92 -0
  214. data/lib/stripe/params/test_helpers/shared_payment/granted_token_create_params.rb +49 -0
  215. data/lib/stripe/params/test_helpers/shared_payment/granted_token_revoke_params.rb +17 -0
  216. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_fail_params.rb +23 -1
  217. data/lib/stripe/params/test_helpers/treasury/inbound_transfer_return_inbound_transfer_params.rb +34 -1
  218. data/lib/stripe/params/test_helpers/treasury/received_credit_create_params.rb +25 -1
  219. data/lib/stripe/params/test_helpers/treasury/received_debit_create_params.rb +25 -1
  220. data/lib/stripe/params/transfer_create_params.rb +4 -0
  221. data/lib/stripe/params/treasury/financial_account_create_params.rb +8 -1
  222. data/lib/stripe/params/treasury/financial_account_features_update_params.rb +4 -1
  223. data/lib/stripe/params/treasury/financial_account_update_features_params.rb +4 -1
  224. data/lib/stripe/params/treasury/financial_account_update_params.rb +8 -1
  225. data/lib/stripe/params/treasury/inbound_transfer_fail_params.rb +23 -1
  226. data/lib/stripe/params/treasury/inbound_transfer_return_inbound_transfer_params.rb +34 -1
  227. data/lib/stripe/params/treasury/outbound_payment_create_params.rb +19 -0
  228. data/lib/stripe/params/treasury/outbound_transfer_create_params.rb +24 -0
  229. data/lib/stripe/params/treasury/received_credit_create_params.rb +25 -1
  230. data/lib/stripe/params/treasury/received_debit_create_params.rb +25 -1
  231. data/lib/stripe/params/v2/billing/bill_setting_create_params.rb +74 -0
  232. data/lib/stripe/params/v2/billing/bill_setting_list_params.rb +21 -0
  233. data/lib/stripe/params/v2/billing/bill_setting_retrieve_params.rb +10 -0
  234. data/lib/stripe/params/v2/billing/bill_setting_update_params.rb +80 -0
  235. data/lib/stripe/params/v2/billing/bill_settings/version_list_params.rb +19 -0
  236. data/lib/stripe/params/v2/billing/bill_settings/version_retrieve_params.rb +12 -0
  237. data/lib/stripe/params/v2/billing/collection_setting_create_params.rb +257 -0
  238. data/lib/stripe/params/v2/billing/collection_setting_list_params.rb +21 -0
  239. data/lib/stripe/params/v2/billing/collection_setting_retrieve_params.rb +10 -0
  240. data/lib/stripe/params/v2/billing/collection_setting_update_params.rb +263 -0
  241. data/lib/stripe/params/v2/billing/collection_settings/version_list_params.rb +19 -0
  242. data/lib/stripe/params/v2/billing/collection_settings/version_retrieve_params.rb +12 -0
  243. data/lib/stripe/params/v2/billing/profile_create_params.rb +37 -0
  244. data/lib/stripe/params/v2/billing/profile_list_params.rb +40 -0
  245. data/lib/stripe/params/v2/billing/profile_retrieve_params.rb +10 -0
  246. data/lib/stripe/params/v2/billing/profile_update_params.rb +35 -0
  247. data/lib/stripe/params/v2/core/account_create_params.rb +530 -9
  248. data/lib/stripe/params/v2/core/account_link_create_params.rb +19 -1
  249. data/lib/stripe/params/v2/core/account_token_create_params.rb +29 -1
  250. data/lib/stripe/params/v2/core/account_update_params.rb +514 -8
  251. data/lib/stripe/params/v2/core/approval_request_cancel_params.rb +10 -0
  252. data/lib/stripe/params/v2/core/approval_request_list_params.rb +47 -0
  253. data/lib/stripe/params/v2/core/approval_request_retrieve_params.rb +10 -0
  254. data/lib/stripe/params/v2/core/approval_request_update_params.rb +17 -0
  255. data/lib/stripe/params/v2/core/batch_job_cancel_params.rb +10 -0
  256. data/lib/stripe/params/v2/core/batch_job_create_params.rb +53 -0
  257. data/lib/stripe/params/v2/core/batch_job_retrieve_params.rb +10 -0
  258. data/lib/stripe/params/v2/core/claimable_sandbox_create_params.rb +63 -0
  259. data/lib/stripe/params/v2/core/claimable_sandbox_renew_onboarding_link_params.rb +32 -0
  260. data/lib/stripe/params/v2/core/claimable_sandbox_retrieve_params.rb +17 -0
  261. data/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb +21 -0
  262. data/lib/stripe/params/v2/data/query_run_create_params.rb +50 -0
  263. data/lib/stripe/params/v2/data/query_run_retrieve_params.rb +23 -0
  264. data/lib/stripe/params/v2/data/report_list_params.rb +23 -0
  265. data/lib/stripe/params/v2/data/report_retrieve_params.rb +17 -0
  266. data/lib/stripe/params/v2/data/report_run_create_params.rb +48 -0
  267. data/lib/stripe/params/v2/data/report_run_retrieve_params.rb +23 -0
  268. data/lib/stripe/params/v2/data/reporting/query_run_create_params.rb +31 -0
  269. data/lib/stripe/params/v2/data/reporting/query_run_retrieve_params.rb +12 -0
  270. data/lib/stripe/params/v2/data/schema_list_params.rb +26 -0
  271. data/lib/stripe/params/v2/data/schema_retrieve_params.rb +10 -0
  272. data/lib/stripe/params/v2/extend/workflow_invoke_params.rb +17 -0
  273. data/lib/stripe/params/v2/extend/workflow_list_params.rb +21 -0
  274. data/lib/stripe/params/v2/extend/workflow_retrieve_params.rb +10 -0
  275. data/lib/stripe/params/v2/extend/workflow_run_list_params.rb +23 -0
  276. data/lib/stripe/params/v2/extend/workflow_run_retrieve_params.rb +10 -0
  277. data/lib/stripe/params/v2/iam/activity_log_list_params.rb +26 -0
  278. data/lib/stripe/params/v2/iam/activity_log_retrieve_params.rb +10 -0
  279. data/lib/stripe/params/v2/money_management/financial_account_close_params.rb +30 -0
  280. data/lib/stripe/params/v2/money_management/financial_account_create_params.rb +35 -0
  281. data/lib/stripe/params/v2/money_management/financial_account_list_params.rb +1 -1
  282. data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +2 -2
  283. data/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +21 -0
  284. data/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +113 -0
  285. data/lib/stripe/params/v2/money_management/outbound_payment_quote_retrieve_params.rb +10 -0
  286. data/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +61 -1
  287. data/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb +22 -1
  288. data/lib/stripe/params/v2/money_management/outbound_transfer_cancel_params.rb +10 -0
  289. data/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb +112 -0
  290. data/lib/stripe/params/v2/money_management/outbound_transfer_list_params.rb +48 -0
  291. data/lib/stripe/params/v2/money_management/outbound_transfer_retrieve_params.rb +10 -0
  292. data/lib/stripe/params/v2/money_management/payout_method_disable_params.rb +10 -0
  293. data/lib/stripe/params/v2/money_management/received_debit_list_params.rb +37 -0
  294. data/lib/stripe/params/v2/money_management/received_debit_retrieve_params.rb +10 -0
  295. data/lib/stripe/params/v2/money_management/test_helpers/financial_address_generate_microdeposits_params.rb +12 -0
  296. data/lib/stripe/params/v2/network/business_profile_me_params.rb +10 -0
  297. data/lib/stripe/params/v2/network/business_profile_retrieve_params.rb +10 -0
  298. data/lib/stripe/params/v2/orchestrated_commerce/agreement_confirm_params.rb +10 -0
  299. data/lib/stripe/params/v2/orchestrated_commerce/agreement_create_params.rb +17 -0
  300. data/lib/stripe/params/v2/orchestrated_commerce/agreement_list_params.rb +20 -0
  301. data/lib/stripe/params/v2/orchestrated_commerce/agreement_retrieve_params.rb +10 -0
  302. data/lib/stripe/params/v2/orchestrated_commerce/agreement_terminate_params.rb +10 -0
  303. data/lib/stripe/params/v2/signals/account_activity_create_params.rb +200 -0
  304. data/lib/stripe/params/v2/signals/account_activity_delete_params.rb +10 -0
  305. data/lib/stripe/params/v2/signals/account_activity_retrieve_params.rb +10 -0
  306. data/lib/stripe/params/v2/signals/account_evaluation_create_params.rb +192 -0
  307. data/lib/stripe/params/v2/signals/account_evaluation_retrieve_params.rb +10 -0
  308. data/lib/stripe/params/v2/signals/account_signal_list_params.rb +35 -0
  309. data/lib/stripe/params/v2/signals/account_signal_retrieve_params.rb +10 -0
  310. data/lib/stripe/params.rb +372 -0
  311. data/lib/stripe/request_options.rb +19 -2
  312. data/lib/stripe/resources/account.rb +176 -1
  313. data/lib/stripe/resources/account_notice.rb +94 -0
  314. data/lib/stripe/resources/account_session.rb +162 -0
  315. data/lib/stripe/resources/apps/install.rb +2 -2
  316. data/lib/stripe/resources/balance.rb +83 -0
  317. data/lib/stripe/resources/balance_settings.rb +4 -0
  318. data/lib/stripe/resources/balance_transaction.rb +1 -1
  319. data/lib/stripe/resources/billing/alert_triggered.rb +4 -0
  320. data/lib/stripe/resources/billing/analytics/meter_usage.rb +33 -0
  321. data/lib/stripe/resources/billing/analytics/meter_usage_row.rb +38 -0
  322. data/lib/stripe/resources/capital/financing_offer.rb +185 -0
  323. data/lib/stripe/resources/capital/financing_summary.rb +82 -0
  324. data/lib/stripe/resources/capital/financing_transaction.rb +99 -0
  325. data/lib/stripe/resources/card.rb +18 -1
  326. data/lib/stripe/resources/charge.rb +501 -6
  327. data/lib/stripe/resources/checkout/session.rb +95 -3
  328. data/lib/stripe/resources/confirmation_token.rb +133 -2
  329. data/lib/stripe/resources/coupon.rb +64 -4
  330. data/lib/stripe/resources/credit_note_line_item.rb +18 -0
  331. data/lib/stripe/resources/customer.rb +16 -0
  332. data/lib/stripe/resources/customer_session.rb +36 -0
  333. data/lib/stripe/resources/dispute.rb +19 -1
  334. data/lib/stripe/resources/event.rb +66 -3
  335. data/lib/stripe/resources/financial_connections/account.rb +45 -1
  336. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +35 -0
  337. data/lib/stripe/resources/financial_connections/authorization.rb +24 -1
  338. data/lib/stripe/resources/financial_connections/institution.rb +127 -0
  339. data/lib/stripe/resources/financial_connections/session.rb +92 -0
  340. data/lib/stripe/resources/fx_quote.rb +147 -0
  341. data/lib/stripe/resources/invoice.rb +126 -1
  342. data/lib/stripe/resources/invoice_item.rb +2 -0
  343. data/lib/stripe/resources/invoice_line_item.rb +40 -0
  344. data/lib/stripe/resources/issuing/authorization.rb +16 -0
  345. data/lib/stripe/resources/issuing/card.rb +17 -1
  346. data/lib/stripe/resources/issuing/cardholder.rb +16 -0
  347. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +263 -0
  348. data/lib/stripe/resources/issuing/dispute.rb +16 -1
  349. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +71 -0
  350. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +51 -0
  351. data/lib/stripe/resources/issuing/settlement.rb +61 -0
  352. data/lib/stripe/resources/issuing/transaction.rb +18 -0
  353. data/lib/stripe/resources/line_item.rb +42 -0
  354. data/lib/stripe/resources/mandate.rb +12 -0
  355. data/lib/stripe/resources/margin.rb +64 -0
  356. data/lib/stripe/resources/order.rb +927 -0
  357. data/lib/stripe/resources/payment_attempt_record.rb +181 -2
  358. data/lib/stripe/resources/payment_intent.rb +1589 -11
  359. data/lib/stripe/resources/payment_method.rb +153 -2
  360. data/lib/stripe/resources/payment_method_configuration.rb +170 -0
  361. data/lib/stripe/resources/payment_plan.rb +213 -0
  362. data/lib/stripe/resources/payment_record.rb +181 -2
  363. data/lib/stripe/resources/price.rb +20 -0
  364. data/lib/stripe/resources/privacy/redaction_job.rb +189 -0
  365. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +49 -0
  366. data/lib/stripe/resources/product.rb +2 -0
  367. data/lib/stripe/resources/quote.rb +569 -2
  368. data/lib/stripe/resources/quote_line.rb +525 -0
  369. data/lib/stripe/resources/quote_preview_invoice.rb +1261 -0
  370. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +968 -0
  371. data/lib/stripe/resources/radar/billing_evaluation.rb +281 -0
  372. data/lib/stripe/resources/radar/payment_evaluation.rb +1 -1
  373. data/lib/stripe/resources/radar/value_list_item.rb +15 -1
  374. data/lib/stripe/resources/refund.rb +56 -0
  375. data/lib/stripe/resources/reporting/report_run.rb +2 -0
  376. data/lib/stripe/resources/reserve/hold.rb +8 -1
  377. data/lib/stripe/resources/reserve/plan.rb +7 -0
  378. data/lib/stripe/resources/reserve/release.rb +12 -0
  379. data/lib/stripe/resources/setup_attempt.rb +37 -2
  380. data/lib/stripe/resources/setup_intent.rb +39 -2
  381. data/lib/stripe/resources/shared_payment/granted_token.rb +681 -0
  382. data/lib/stripe/resources/shared_payment/issued_token.rb +310 -0
  383. data/lib/stripe/resources/source.rb +54 -0
  384. data/lib/stripe/resources/subscription.rb +73 -0
  385. data/lib/stripe/resources/subscription_item.rb +22 -1
  386. data/lib/stripe/resources/subscription_schedule.rb +198 -3
  387. data/lib/stripe/resources/tax/form.rb +264 -0
  388. data/lib/stripe/resources/tax/registration.rb +16 -1
  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/token.rb +15 -1
  392. data/lib/stripe/resources/transfer.rb +2 -0
  393. data/lib/stripe/resources/treasury/financial_account.rb +2 -0
  394. data/lib/stripe/resources/treasury/financial_account_features.rb +2 -0
  395. data/lib/stripe/resources/treasury/inbound_transfer.rb +35 -7
  396. data/lib/stripe/resources/treasury/outbound_payment.rb +39 -9
  397. data/lib/stripe/resources/treasury/outbound_transfer.rb +67 -9
  398. data/lib/stripe/resources/treasury/received_credit.rb +31 -1
  399. data/lib/stripe/resources/treasury/received_debit.rb +33 -1
  400. data/lib/stripe/resources/v2/billing/bill_setting.rb +102 -0
  401. data/lib/stripe/resources/v2/billing/bill_setting_version.rb +91 -0
  402. data/lib/stripe/resources/v2/billing/collection_setting.rb +327 -0
  403. data/lib/stripe/resources/v2/billing/collection_setting_version.rb +316 -0
  404. data/lib/stripe/resources/v2/billing/profile.rb +47 -0
  405. data/lib/stripe/resources/v2/core/account.rb +1095 -52
  406. data/lib/stripe/resources/v2/core/account_link.rb +18 -1
  407. data/lib/stripe/resources/v2/core/account_person_token.rb +2 -0
  408. data/lib/stripe/resources/v2/core/account_token.rb +3 -1
  409. data/lib/stripe/resources/v2/core/approval_request.rb +395 -0
  410. data/lib/stripe/resources/v2/core/batch_job.rb +536 -0
  411. data/lib/stripe/resources/v2/core/claimable_sandbox.rb +269 -0
  412. data/lib/stripe/resources/v2/core/event_base.rb +8 -25
  413. data/lib/stripe/resources/v2/core/event_notification.rb +33 -0
  414. data/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +91 -1
  415. data/lib/stripe/resources/v2/core/vault/us_bank_account.rb +26 -1
  416. data/lib/stripe/resources/v2/data/query_run.rb +255 -0
  417. data/lib/stripe/resources/v2/data/report.rb +104 -0
  418. data/lib/stripe/resources/v2/data/report_run.rb +246 -0
  419. data/lib/stripe/resources/v2/data/reporting/query_run.rb +143 -0
  420. data/lib/stripe/resources/v2/data/schema.rb +121 -0
  421. data/lib/stripe/resources/v2/extend/workflow.rb +80 -0
  422. data/lib/stripe/resources/v2/extend/workflow_run.rb +158 -0
  423. data/lib/stripe/resources/v2/iam/activity_log.rb +926 -0
  424. data/lib/stripe/resources/v2/money_management/adjustment.rb +4 -0
  425. data/lib/stripe/resources/v2/money_management/financial_account.rb +50 -1
  426. data/lib/stripe/resources/v2/money_management/financial_address_generated_microdeposits.rb +33 -0
  427. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +2 -0
  428. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +63 -1
  429. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +255 -0
  430. data/lib/stripe/resources/v2/money_management/outbound_setup_intent.rb +31 -1
  431. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +260 -0
  432. data/lib/stripe/resources/v2/money_management/payout_method.rb +77 -1
  433. data/lib/stripe/resources/v2/money_management/received_credit.rb +2 -0
  434. data/lib/stripe/resources/v2/money_management/received_debit.rb +177 -0
  435. data/lib/stripe/resources/v2/money_management/recipient_verification.rb +2 -0
  436. data/lib/stripe/resources/v2/network/business_profile.rb +84 -0
  437. data/lib/stripe/resources/v2/orchestrated_commerce/agreement.rb +93 -0
  438. data/lib/stripe/resources/v2/signals/account_activity.rb +252 -0
  439. data/lib/stripe/resources/v2/signals/account_evaluation.rb +249 -0
  440. data/lib/stripe/resources/v2/signals/account_signal.rb +184 -0
  441. data/lib/stripe/resources.rb +356 -0
  442. data/lib/stripe/services/account_notice_service.rb +39 -0
  443. data/lib/stripe/services/account_service.rb +15 -0
  444. data/lib/stripe/services/apps/install_service.rb +2 -2
  445. data/lib/stripe/services/billing/analytics/meter_usage_service.rb +21 -0
  446. data/lib/stripe/services/billing/analytics_service.rb +15 -0
  447. data/lib/stripe/services/billing_service.rb +2 -1
  448. data/lib/stripe/services/capital/financing_offer_service.rb +42 -0
  449. data/lib/stripe/services/capital/financing_summary_service.rb +19 -0
  450. data/lib/stripe/services/capital/financing_transaction_service.rb +31 -0
  451. data/lib/stripe/services/capital_service.rb +15 -0
  452. data/lib/stripe/services/checkout/session_service.rb +2 -0
  453. data/lib/stripe/services/coupon_service.rb +14 -0
  454. data/lib/stripe/services/customer_service.rb +15 -0
  455. data/lib/stripe/services/event_service.rb +1 -1
  456. data/lib/stripe/services/external_account_service.rb +68 -0
  457. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +19 -0
  458. data/lib/stripe/services/financial_connections/account_service.rb +3 -1
  459. data/lib/stripe/services/financial_connections/authorization_service.rb +19 -0
  460. data/lib/stripe/services/financial_connections/institution_service.rb +30 -0
  461. data/lib/stripe/services/financial_connections_service.rb +3 -1
  462. data/lib/stripe/services/fx_quote_service.rb +27 -0
  463. data/lib/stripe/services/invoice_service.rb +11 -0
  464. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +74 -0
  465. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +30 -0
  466. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +30 -0
  467. data/lib/stripe/services/issuing_service.rb +5 -1
  468. data/lib/stripe/services/mandate_service.rb +5 -0
  469. data/lib/stripe/services/margin_service.rb +50 -0
  470. data/lib/stripe/services/order_service.rb +53 -0
  471. data/lib/stripe/services/payment_intent_service.rb +37 -0
  472. data/lib/stripe/services/payment_plan_service.rb +50 -0
  473. data/lib/stripe/services/privacy/redaction_job_service.rb +104 -0
  474. data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +19 -0
  475. data/lib/stripe/services/privacy_service.rb +13 -0
  476. data/lib/stripe/services/promotion_code_service.rb +29 -0
  477. data/lib/stripe/services/quote_line_service.rb +17 -0
  478. data/lib/stripe/services/quote_preview_invoice_service.rb +17 -0
  479. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +17 -0
  480. data/lib/stripe/services/quote_service.rb +49 -1
  481. data/lib/stripe/services/radar/billing_evaluation_service.rb +19 -0
  482. data/lib/stripe/services/radar_service.rb +2 -1
  483. data/lib/stripe/services/reserve/hold_service.rb +30 -0
  484. data/lib/stripe/services/reserve/plan_service.rb +30 -0
  485. data/lib/stripe/services/reserve/release_service.rb +30 -0
  486. data/lib/stripe/services/reserve_service.rb +15 -0
  487. data/lib/stripe/services/shared_payment/granted_token_service.rb +19 -0
  488. data/lib/stripe/services/shared_payment/issued_token_service.rb +41 -0
  489. data/lib/stripe/services/shared_payment_service.rb +14 -0
  490. data/lib/stripe/services/subscription_schedule_service.rb +11 -0
  491. data/lib/stripe/services/subscription_service.rb +45 -0
  492. data/lib/stripe/services/tax/form_service.rb +37 -0
  493. data/lib/stripe/services/tax_service.rb +2 -1
  494. data/lib/stripe/services/terminal/reader_collected_data_service.rb +19 -0
  495. data/lib/stripe/services/terminal_service.rb +2 -1
  496. data/lib/stripe/services/test_helpers/capital/financing_offer_service.rb +32 -0
  497. data/lib/stripe/services/test_helpers/capital_service.rb +15 -0
  498. data/lib/stripe/services/test_helpers/shared_payment/granted_token_service.rb +32 -0
  499. data/lib/stripe/services/test_helpers/shared_payment_service.rb +15 -0
  500. data/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +3 -3
  501. data/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +4 -4
  502. data/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +4 -4
  503. data/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +1 -1
  504. data/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +1 -1
  505. data/lib/stripe/services/test_helpers_service.rb +3 -1
  506. data/lib/stripe/services/v1_services.rb +11 -1
  507. data/lib/stripe/services/v2/billing/bill_setting_service.rb +61 -0
  508. data/lib/stripe/services/v2/billing/bill_settings/version_service.rb +34 -0
  509. data/lib/stripe/services/v2/billing/collection_setting_service.rb +69 -0
  510. data/lib/stripe/services/v2/billing/collection_settings/version_service.rb +34 -0
  511. data/lib/stripe/services/v2/billing/profile_service.rb +54 -0
  512. data/lib/stripe/services/v2/billing_service.rb +4 -1
  513. data/lib/stripe/services/v2/core/account_link_service.rb +1 -1
  514. data/lib/stripe/services/v2/core/account_token_service.rb +2 -2
  515. data/lib/stripe/services/v2/core/accounts/person_token_service.rb +2 -1
  516. data/lib/stripe/services/v2/core/approval_request_service.rb +58 -0
  517. data/lib/stripe/services/v2/core/batch_job_service.rb +43 -0
  518. data/lib/stripe/services/v2/core/claimable_sandbox_service.rb +49 -0
  519. data/lib/stripe/services/v2/core_service.rb +4 -1
  520. data/lib/stripe/services/v2/data/query_run_service.rb +34 -0
  521. data/lib/stripe/services/v2/data/report_run_service.rb +36 -0
  522. data/lib/stripe/services/v2/data/report_service.rb +34 -0
  523. data/lib/stripe/services/v2/data/reporting/query_run_service.rb +35 -0
  524. data/lib/stripe/services/v2/data/reporting_service.rb +17 -0
  525. data/lib/stripe/services/v2/data/schema_service.rb +32 -0
  526. data/lib/stripe/services/v2/data_service.rb +19 -0
  527. data/lib/stripe/services/v2/extend/workflow_run_service.rb +32 -0
  528. data/lib/stripe/services/v2/extend/workflow_service.rb +45 -0
  529. data/lib/stripe/services/v2/extend_service.rb +16 -0
  530. data/lib/stripe/services/v2/iam/activity_log_service.rb +32 -0
  531. data/lib/stripe/services/v2/iam_service.rb +15 -0
  532. data/lib/stripe/services/v2/money_management/financial_account_service.rb +27 -0
  533. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +35 -0
  534. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +61 -0
  535. data/lib/stripe/services/v2/money_management/payout_method_service.rb +15 -0
  536. data/lib/stripe/services/v2/money_management/received_debit_service.rb +32 -0
  537. data/lib/stripe/services/v2/money_management/test_helpers/financial_address_service.rb +13 -0
  538. data/lib/stripe/services/v2/money_management_service.rb +5 -1
  539. data/lib/stripe/services/v2/network/business_profile_service.rb +32 -0
  540. data/lib/stripe/services/v2/network_service.rb +15 -0
  541. data/lib/stripe/services/v2/orchestrated_commerce/agreement_service.rb +65 -0
  542. data/lib/stripe/services/v2/orchestrated_commerce_service.rb +15 -0
  543. data/lib/stripe/services/v2/signals/account_activity_service.rb +43 -0
  544. data/lib/stripe/services/v2/signals/account_evaluation_service.rb +32 -0
  545. data/lib/stripe/services/v2/signals/account_signal_service.rb +32 -0
  546. data/lib/stripe/services/v2/signals_service.rb +17 -0
  547. data/lib/stripe/services/v2_services.rb +7 -1
  548. data/lib/stripe/services.rb +188 -0
  549. data/lib/stripe/stripe_client.rb +10 -1
  550. data/lib/stripe/stripe_configuration.rb +12 -3
  551. data/lib/stripe/stripe_event_notification_handler.rb +242 -0
  552. data/lib/stripe/stripe_object.rb +23 -10
  553. data/lib/stripe/util.rb +7 -1
  554. data/lib/stripe/version.rb +1 -1
  555. data/lib/stripe.rb +53 -0
  556. data/rbi/stripe/resources/v2/core/event_notification.rbi +2 -0
  557. data/rbi/stripe.rbi +134977 -66505
  558. metadata +341 -4
@@ -0,0 +1,269 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module V2
6
+ module Core
7
+ # A claimable sandbox is a Stripe sandbox that a user can claim into a new or existing Stripe account
8
+ # through an onboarding link. You can prefill it with an email address, sandbox name, and country.
9
+ # Claimable sandboxes have 60 days to be claimed. After this expiration time has passed,
10
+ # if the sandbox is not claimed, it will be deleted.
11
+ class ClaimableSandbox < APIResource
12
+ OBJECT_NAME = "v2.core.claimable_sandbox"
13
+ def self.object_name
14
+ "v2.core.claimable_sandbox"
15
+ end
16
+
17
+ class OnboardingLinkDetails < ::Stripe::StripeObject
18
+ # Time at which the onboarding link expires. Represented as an RFC 3339 timestamp in UTC
19
+ # with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
20
+ attr_reader :expires_at
21
+ # The URL the user will be redirected to if the onboarding link is expired or invalid.
22
+ # The URL specified should attempt to generate a new onboarding link,
23
+ # and re-direct the user to this new onboarding link so that they can proceed with the onboarding flow.
24
+ attr_reader :refresh_url
25
+ # The URL offered to the user as a way back to your app after they claim the sandbox.
26
+ attr_reader :return_url
27
+ # The URL that lets a user claim the sandbox or continue onboarding their Stripe account,
28
+ # depending on the sandbox's status.
29
+ attr_reader :url
30
+
31
+ def self.inner_class_types
32
+ @inner_class_types = {}
33
+ end
34
+
35
+ def self.field_remappings
36
+ @field_remappings = {}
37
+ end
38
+ end
39
+
40
+ class OwnerDetails < ::Stripe::StripeObject
41
+ # The ID of the live mode Stripe account that owns the sandbox.
42
+ # This field is only set when `owner_details.app_install_status` is `installed`.
43
+ attr_reader :account
44
+ # Indicates whether the platform app is installed on the sandbox’s live mode owner account.
45
+ attr_reader :app_install_status
46
+
47
+ def self.inner_class_types
48
+ @inner_class_types = {}
49
+ end
50
+
51
+ def self.field_remappings
52
+ @field_remappings = {}
53
+ end
54
+ end
55
+
56
+ class Prefill < ::Stripe::StripeObject
57
+ # Country in which the account holder resides, or in which the business is legally established.
58
+ # Use two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
59
+ attr_reader :country
60
+ # Email address of the user who will claim the sandbox.
61
+ # Stripe sends this address an invitation to claim the sandbox and a reminder before the unclaimed sandbox expires.
62
+ attr_reader :email
63
+ # Name for the sandbox.
64
+ attr_reader :name
65
+
66
+ def self.inner_class_types
67
+ @inner_class_types = {}
68
+ end
69
+
70
+ def self.field_remappings
71
+ @field_remappings = {}
72
+ end
73
+ end
74
+
75
+ class SandboxDetails < ::Stripe::StripeObject
76
+ class ApiKeys < ::Stripe::StripeObject
77
+ class Mcp < ::Stripe::StripeObject
78
+ class SecretKey < ::Stripe::StripeObject
79
+ # The plaintext token for the API key.
80
+ attr_reader :token
81
+
82
+ def self.inner_class_types
83
+ @inner_class_types = {}
84
+ end
85
+
86
+ def self.field_remappings
87
+ @field_remappings = {}
88
+ end
89
+ end
90
+ # Time at which the API key was created. Represented as an RFC 3339 timestamp in UTC
91
+ # with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
92
+ attr_reader :created
93
+ # Time at which the API key expires. Represented as an RFC 3339 timestamp in UTC
94
+ # with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
95
+ attr_reader :expires_at
96
+ # Unique identifier of the API key.
97
+ attr_reader :id
98
+ # Token for the secret key. Present only in the create response;
99
+ # null in subsequent retrieve responses.
100
+ attr_reader :secret_key
101
+ # Current status of the API key.
102
+ attr_reader :status
103
+ # Type of the API key.
104
+ attr_reader :type
105
+
106
+ def self.inner_class_types
107
+ @inner_class_types = { secret_key: SecretKey }
108
+ end
109
+
110
+ def self.field_remappings
111
+ @field_remappings = {}
112
+ end
113
+ end
114
+
115
+ class Publishable < ::Stripe::StripeObject
116
+ class PublishableKey < ::Stripe::StripeObject
117
+ # The plaintext token for the API key.
118
+ attr_reader :token
119
+
120
+ def self.inner_class_types
121
+ @inner_class_types = {}
122
+ end
123
+
124
+ def self.field_remappings
125
+ @field_remappings = {}
126
+ end
127
+ end
128
+ # Time at which the API key was created. Represented as an RFC 3339 timestamp in UTC
129
+ # with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
130
+ attr_reader :created
131
+ # Time at which the API key expires. Represented as an RFC 3339 timestamp in UTC
132
+ # with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
133
+ attr_reader :expires_at
134
+ # Unique identifier of the API key.
135
+ attr_reader :id
136
+ # Token for the publishable key. Present only in the create response;
137
+ # null in subsequent retrieve responses.
138
+ attr_reader :publishable_key
139
+ # Current status of the API key.
140
+ attr_reader :status
141
+ # Type of the API key.
142
+ attr_reader :type
143
+
144
+ def self.inner_class_types
145
+ @inner_class_types = { publishable_key: PublishableKey }
146
+ end
147
+
148
+ def self.field_remappings
149
+ @field_remappings = {}
150
+ end
151
+ end
152
+
153
+ class Secret < ::Stripe::StripeObject
154
+ class SecretKey < ::Stripe::StripeObject
155
+ # The plaintext token for the API key.
156
+ attr_reader :token
157
+
158
+ def self.inner_class_types
159
+ @inner_class_types = {}
160
+ end
161
+
162
+ def self.field_remappings
163
+ @field_remappings = {}
164
+ end
165
+ end
166
+ # Time at which the API key was created. Represented as an RFC 3339 timestamp in UTC
167
+ # with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
168
+ attr_reader :created
169
+ # Time at which the API key expires. Represented as an RFC 3339 timestamp in UTC
170
+ # with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
171
+ attr_reader :expires_at
172
+ # Unique identifier of the API key.
173
+ attr_reader :id
174
+ # Token for the secret key. Present only in the create response;
175
+ # null in subsequent retrieve responses.
176
+ attr_reader :secret_key
177
+ # Current status of the API key.
178
+ attr_reader :status
179
+ # Type of the API key.
180
+ attr_reader :type
181
+
182
+ def self.inner_class_types
183
+ @inner_class_types = { secret_key: SecretKey }
184
+ end
185
+
186
+ def self.field_remappings
187
+ @field_remappings = {}
188
+ end
189
+ end
190
+ # Object hash for the sandbox's MCP key.
191
+ # Null unless `enable_mcp_access: true` was passed in the creation request.
192
+ attr_reader :mcp
193
+ # Object hash for the sandbox's publishable key.
194
+ attr_reader :publishable
195
+ # Object hash for the sandbox's secret key.
196
+ attr_reader :secret
197
+
198
+ def self.inner_class_types
199
+ @inner_class_types = { mcp: Mcp, publishable: Publishable, secret: Secret }
200
+ end
201
+
202
+ def self.field_remappings
203
+ @field_remappings = {}
204
+ end
205
+ end
206
+ # The sandbox's Stripe account ID.
207
+ attr_reader :account
208
+ # Keys that can be used to set up an integration for this sandbox and operate on the account.
209
+ # Present in the create response. To fetch this field in the retrieve response,
210
+ # pass `sandbox_details.api_keys` in the `include` parameter.
211
+ attr_reader :api_keys
212
+
213
+ def self.inner_class_types
214
+ @inner_class_types = { api_keys: ApiKeys }
215
+ end
216
+
217
+ def self.field_remappings
218
+ @field_remappings = {}
219
+ end
220
+ end
221
+ # The distribution channel used to pre-install your Stripe App on the claimable sandbox.
222
+ # Use `testing` to install your app's external test version or `public` to install its published version.
223
+ attr_reader :channel
224
+ # Time at which the sandbox was claimed. Set when the status is `claimed` or `live`.
225
+ # Represented as an RFC 3339 timestamp in UTC with millisecond precision,
226
+ # for example `2022-09-18T13:22:18.123Z`.
227
+ attr_reader :claimed_at
228
+ # Time at which the sandbox was created. Represented as an RFC 3339 timestamp in UTC
229
+ # with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
230
+ attr_reader :created
231
+ # Time at which the unclaimed sandbox expires. Null when the status is `claimed` or `live`.
232
+ # Represented as an RFC 3339 timestamp in UTC with millisecond precision,
233
+ # for example `2022-09-18T13:22:18.123Z`.
234
+ attr_reader :expires_at
235
+ # Unique identifier for the claimable sandbox.
236
+ attr_reader :id
237
+ # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
238
+ attr_reader :livemode
239
+ # String representing the object's type. Objects of the same type share the same value of the object field.
240
+ attr_reader :object
241
+ # Details about the onboarding link.
242
+ # Null when the sandbox status is `live` or `expired`.
243
+ attr_reader :onboarding_link_details
244
+ # Details about the live mode owner account of the sandbox.
245
+ # This will be null until the sandbox is claimed.
246
+ attr_reader :owner_details
247
+ # Values prefilled during the creation of the sandbox. When a user claims the sandbox, they will be able to update these values.
248
+ attr_reader :prefill
249
+ # Data about the Stripe sandbox object.
250
+ attr_reader :sandbox_details
251
+ # Status of the sandbox.
252
+ attr_reader :status
253
+
254
+ def self.inner_class_types
255
+ @inner_class_types = {
256
+ onboarding_link_details: OnboardingLinkDetails,
257
+ owner_details: OwnerDetails,
258
+ prefill: Prefill,
259
+ sandbox_details: SandboxDetails,
260
+ }
261
+ end
262
+
263
+ def self.field_remappings
264
+ @field_remappings = {}
265
+ end
266
+ end
267
+ end
268
+ end
269
+ end
@@ -4,31 +4,14 @@ module Stripe
4
4
  module V2
5
5
  module Core
6
6
  class EventBase < APIResource
7
- # internal use: a requestor scoped to this event's own Stripe-Context,
8
- # discarding any Stripe-Account the configured requestor may carry.
9
- # `context`, not account, is what routes a direct-retrieve `Event` (and
10
- # requests made through #fetch_related_object) to the right account --
11
- # mirrors how EventNotification#initialize scopes @client.
12
- private def scoped_requestor
13
- @scoped_requestor ||= begin
14
- scoped_config = @requestor.config.reverse_duplicate_merge(
15
- stripe_account: nil, stripe_context: context
16
- )
17
- APIRequestor.new(scoped_config)
18
- end
19
- end
20
-
21
- # Overridden so that every generated `fetch_related_object` (which calls
22
- # this method) routes through #scoped_requestor. Still combines with this
23
- # event's retained @opts so a retained api_key/stripe_version override
24
- # survives, but with @opts's own stripe_account/stripe_context forced to
25
- # the safe values first, since those are exactly what may be stale left
26
- # over from how this Event itself was retrieved.
27
- protected def _request(method:, path:, base_address:, params: {}, opts: {})
28
- req_opts = RequestOptions.extract_opts_from_hash(opts)
29
- safe_opts = @opts.merge(stripe_account: nil, stripe_context: context)
30
- req_opts = RequestOptions.combine_opts(safe_opts, req_opts)
31
- scoped_requestor.execute_request(method, path, base_address, params: params, opts: req_opts)
7
+ # An event's payload determines the scope of its related objects, even
8
+ # when the event was retrieved using a different account or context.
9
+ protected def initialize_from(values, opts, last_response = nil, api_mode:, requestor:)
10
+ requestor = requestor.with_authorization_scope(
11
+ stripe_account: nil, stripe_context: values[:context] || values["context"]
12
+ )
13
+ opts = Util.normalize_opts(opts).except(:stripe_account, :stripe_context)
14
+ super
32
15
  end
33
16
  end
34
17
  end
@@ -1,3 +1,4 @@
1
+ # File copied from our code generator; changes here will be overwritten.
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Stripe
@@ -75,6 +76,38 @@ module Stripe
75
76
  usage: ["fetch_event"])
76
77
  @client.deserialize(resp.http_body, api_mode: :v2)
77
78
  end
79
+
80
+ # The default inspect renders every instance variable, which would
81
+ # include the API key held by @client.
82
+ def inspect
83
+ "#<#{self.class}:0x#{object_id.to_s(16)} id=#{id.inspect} type=#{type.inspect}>"
84
+ end
85
+
86
+ # Implements custom encoding for YAML (Psych). Without it, Psych dumps
87
+ # every instance variable, including the API key held by @client.
88
+ def encode_with(coder)
89
+ (instance_variables - [:@client]).each do |ivar|
90
+ coder[ivar.to_s.delete_prefix("@")] = instance_variable_get(ivar)
91
+ end
92
+ end
93
+
94
+ # Implements custom decoding for YAML (Psych). A restored notification
95
+ # has no client, so it can't make requests.
96
+ def init_with(coder)
97
+ coder.map.each { |name, value| instance_variable_set("@#{name}", value) }
98
+ @client = DetachedClient.new
99
+ end
100
+
101
+ # Stands in for the client on a notification restored from YAML, so
102
+ # requests fail with an actionable error instead of a NoMethodError.
103
+ class DetachedClient
104
+ def raw_request(*)
105
+ raise AuthenticationError,
106
+ "This EventNotification was restored from a serialized copy and has no client. " \
107
+ "Parse the original payload with StripeClient#parse_event_notification to make requests."
108
+ end
109
+ end
110
+ private_constant :DetachedClient
78
111
  end
79
112
  end
80
113
  end
@@ -12,6 +12,87 @@ module Stripe
12
12
  "v2.core.vault.gb_bank_account"
13
13
  end
14
14
 
15
+ class AlternativeReference < ::Stripe::StripeObject
16
+ # The ID of the alternative resource being referenced.
17
+ attr_reader :id
18
+ # The type of the alternative reference (e.g., external_account for V1 external accounts).
19
+ attr_reader :type
20
+
21
+ def self.inner_class_types
22
+ @inner_class_types = {}
23
+ end
24
+
25
+ def self.field_remappings
26
+ @field_remappings = {}
27
+ end
28
+ end
29
+
30
+ class ConfirmationOfPayee < ::Stripe::StripeObject
31
+ class Result < ::Stripe::StripeObject
32
+ class Matched < ::Stripe::StripeObject
33
+ # The business type given by the bank for this account, in case of a MATCH or PARTIAL_MATCH.
34
+ # Closed enum.
35
+ attr_reader :business_type
36
+ # The name given by the bank for this account, in case of a MATCH or PARTIAL_MATCH.
37
+ attr_reader :name
38
+
39
+ def self.inner_class_types
40
+ @inner_class_types = {}
41
+ end
42
+
43
+ def self.field_remappings
44
+ @field_remappings = {}
45
+ end
46
+ end
47
+
48
+ class Provided < ::Stripe::StripeObject
49
+ # The provided or Legal Entity business type to match against the CoP service. Closed enum.
50
+ attr_reader :business_type
51
+ # The provided or Legal Entity name to match against the CoP service.
52
+ attr_reader :name
53
+
54
+ def self.inner_class_types
55
+ @inner_class_types = {}
56
+ end
57
+
58
+ def self.field_remappings
59
+ @field_remappings = {}
60
+ end
61
+ end
62
+ # When the CoP result was created.
63
+ attr_reader :created
64
+ # Whether or not the information of the bank account matches what you have provided. Closed enum.
65
+ attr_reader :match_result
66
+ # The fields that CoP service matched against. Only has value if MATCH or PARTIAL_MATCH, empty otherwise.
67
+ attr_reader :matched
68
+ # Human-readable message describing the match result.
69
+ attr_reader :message
70
+ # The fields that are matched against what the network has on file.
71
+ attr_reader :provided
72
+
73
+ def self.inner_class_types
74
+ @inner_class_types = { matched: Matched, provided: Provided }
75
+ end
76
+
77
+ def self.field_remappings
78
+ @field_remappings = {}
79
+ end
80
+ end
81
+ # The result of the Confirmation of Payee check, once the check has been initiated. Closed enum.
82
+ attr_reader :result
83
+ # The current state of Confirmation of Payee on this bank account. Closed enum.
84
+ attr_reader :status
85
+
86
+ def self.inner_class_types
87
+ @inner_class_types = { result: Result }
88
+ end
89
+
90
+ def self.field_remappings
91
+ @field_remappings = {}
92
+ end
93
+ end
94
+ # The alternative reference for this payout method, if it's a projected payout method.
95
+ attr_reader :alternative_reference
15
96
  # Whether this bank account object was archived. Bank account objects can be archived through
16
97
  # the /archive API, and they will not be automatically archived by Stripe. Archived bank account objects
17
98
  # cannot be used as outbound destinations and will not appear in the outbound destination list.
@@ -20,8 +101,14 @@ module Stripe
20
101
  attr_reader :bank_account_type
21
102
  # The name of the bank.
22
103
  attr_reader :bank_name
104
+ # Information around the status of Confirmation of Payee matching done on this bank account.
105
+ # Confirmation of Payee is a name matching service that must be done before making OutboundPayments in the UK.
106
+ attr_reader :confirmation_of_payee
23
107
  # Creation time.
24
108
  attr_reader :created
109
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two
110
+ # recipients who've signed up with you are using the same bank account, for example.
111
+ attr_reader :fingerprint
25
112
  # The ID of the GBBankAccount object.
26
113
  attr_reader :id
27
114
  # The last 4 digits of the account number or IBAN.
@@ -38,7 +125,10 @@ module Stripe
38
125
  attr_reader :supported_currencies
39
126
 
40
127
  def self.inner_class_types
41
- @inner_class_types = {}
128
+ @inner_class_types = {
129
+ alternative_reference: AlternativeReference,
130
+ confirmation_of_payee: ConfirmationOfPayee,
131
+ }
42
132
  end
43
133
 
44
134
  def self.field_remappings
@@ -12,6 +12,21 @@ module Stripe
12
12
  "v2.core.vault.us_bank_account"
13
13
  end
14
14
 
15
+ class AlternativeReference < ::Stripe::StripeObject
16
+ # The ID of the alternative resource being referenced.
17
+ attr_reader :id
18
+ # The type of the alternative reference (e.g., external_account for V1 external accounts).
19
+ attr_reader :type
20
+
21
+ def self.inner_class_types
22
+ @inner_class_types = {}
23
+ end
24
+
25
+ def self.field_remappings
26
+ @field_remappings = {}
27
+ end
28
+ end
29
+
15
30
  class Verification < ::Stripe::StripeObject
16
31
  class MicrodepositVerificationDetails < ::Stripe::StripeObject
17
32
  # Time when microdeposits will expire and have to be re-sent.
@@ -44,6 +59,8 @@ module Stripe
44
59
  @field_remappings = {}
45
60
  end
46
61
  end
62
+ # The alternative reference for this payout method, if it's a projected payout method.
63
+ attr_reader :alternative_reference
47
64
  # Whether this USBankAccount object was archived.
48
65
  attr_reader :archived
49
66
  # Closed Enum. The type of bank account (checking or savings).
@@ -52,10 +69,15 @@ module Stripe
52
69
  attr_reader :bank_name
53
70
  # Creation time of the object.
54
71
  attr_reader :created
72
+ # Same as `fingerprint`, but uniquely identifies the bank account using its `fedwire_routing_number` instead of its `routing_number`.
73
+ attr_reader :fedwire_fingerprint
55
74
  # The fedwire routing number of the bank account.
56
75
  attr_reader :fedwire_routing_number
57
76
  # The ID of the Financial Connections Account used to create the bank account.
58
77
  attr_reader :financial_connections_account
78
+ # Uniquely identifies this particular bank account. You can use this attribute to check whether two
79
+ # recipients who've signed up with you are using the same bank account, for example.
80
+ attr_reader :fingerprint
59
81
  # The ID of the USBankAccount object.
60
82
  attr_reader :id
61
83
  # The last 4 digits of the account number.
@@ -74,7 +96,10 @@ module Stripe
74
96
  attr_reader :verification
75
97
 
76
98
  def self.inner_class_types
77
- @inner_class_types = { verification: Verification }
99
+ @inner_class_types = {
100
+ alternative_reference: AlternativeReference,
101
+ verification: Verification,
102
+ }
78
103
  end
79
104
 
80
105
  def self.field_remappings