From 50545695ebebb47fa414f91cc9aac0c43c928b28 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 18:42:23 +0000 Subject: [PATCH] Update generated code for v2596 and 65c49b0893d71e8cfe272b2d38cd3307ee1833f2 --- ...26-10-29_stripe-openapi_7d39ffde.change.md | 87 + CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- stripe/__init__.py | 36 + stripe/_account.py | 34 + stripe/_account_session.py | 39 + stripe/_api_requestor.py | 54 + stripe/_api_version.py | 2 +- stripe/_application_fee.py | 8 + stripe/_card.py | 5 + stripe/_charge.py | 13 + stripe/_customer.py | 16 +- stripe/_customer_cash_balance_transaction.py | 7 +- stripe/_dispute.py | 44 +- stripe/_error.py | 180 ++ stripe/_event.py | 7 + stripe/_event_notification_handler.py | 1488 ++++++++++++- stripe/_invoice.py | 27 +- stripe/_invoice_item.py | 2 +- stripe/_object_classes.py | 65 + stripe/_payment_attempt_record.py | 7 + stripe/_payment_intent.py | 20 +- stripe/_payment_link.py | 32 +- stripe/_payment_record.py | 7 + stripe/_payout.py | 2 +- stripe/_refund.py | 26 +- stripe/_setup_attempt.py | 4 + stripe/_setup_intent.py | 10 + stripe/_source.py | 4 +- stripe/_source_mandate_notification.py | 4 +- stripe/_subscription.py | 21 +- stripe/_subscription_item.py | 9 + stripe/_subscription_schedule.py | 2 +- stripe/_subscription_service.py | 4 +- stripe/_tax_id.py | 20 +- stripe/_tax_rate.py | 10 + stripe/_token.py | 2 + stripe/_v2_services.py | 9 + stripe/apps/_install.py | 12 +- stripe/apps/_install_service.py | 12 +- stripe/billing_portal/_configuration.py | 33 + stripe/billing_portal/_session.py | 35 +- stripe/checkout/_session.py | 23 +- stripe/events/__init__.py | 1032 +++++++++ stripe/events/_event_classes.py | 1032 +++++++++ ..._customer_discount_source_changed_event.py | 31 + .../_v1_customer_subscription_active_event.py | 113 + ...er_subscription_cancel_at_changed_event.py | 117 ++ ...on_default_payment_method_changed_event.py | 119 ++ ..._customer_subscription_incomplete_event.py | 115 + ...r_subscription_incomplete_expired_event.py | 117 ++ ..._customer_subscription_item_added_event.py | 115 + ...r_subscription_item_price_changed_event.py | 117 ++ ...ubscription_item_quantity_changed_event.py | 117 ++ ...ustomer_subscription_item_removed_event.py | 115 + ...bscription_item_tax_rates_changed_event.py | 117 ++ ...v1_customer_subscription_past_due_event.py | 113 + ...v1_customer_subscription_trialing_event.py | 113 + .../_v1_customer_subscription_unpaid_event.py | 113 + ...tlement_summary_entitlement_added_event.py | 43 + ...ement_summary_entitlement_removed_event.py | 43 + ...ns_account_balance_refresh_failed_event.py | 119 ++ ...account_balance_refresh_succeeded_event.py | 119 ++ ..._inferred_balances_refresh_failed_event.py | 127 ++ ...ferred_balances_refresh_succeeded_event.py | 129 ++ ..._account_ownership_refresh_failed_event.py | 119 ++ ...count_ownership_refresh_succeeded_event.py | 127 ++ ..._risk_intelligence_refresh_failed_event.py | 127 ++ ...sk_intelligence_refresh_succeeded_event.py | 129 ++ ...count_transactions_refresh_failed_event.py | 127 ++ ...nt_transactions_refresh_succeeded_event.py | 127 ++ .../_v1_invoice_discount_added_event.py | 113 + .../_v1_invoice_discount_removed_event.py | 113 + .../_v1_invoice_line_item_added_event.py | 113 + ...invoice_line_item_pricing_changed_event.py | 115 + ...nvoice_line_item_quantity_changed_event.py | 115 + .../_v1_invoice_line_item_removed_event.py | 113 + .../_v1_invoice_payment_canceled_event.py | 113 + .../events/_v1_invoice_payment_open_event.py | 113 + stripe/events/_v1_invoice_upcoming_event.py | 49 +- .../_v1_invoiceitem_amount_changed_event.py | 113 + .../_v1_invoiceitem_discount_added_event.py | 113 + .../_v1_invoiceitem_discount_removed_event.py | 113 + stripe/events/_v1_price_activated_event.py | 113 + stripe/events/_v1_price_deactivated_event.py | 113 + .../_v1_price_lookup_key_changed_event.py | 113 + .../_v1_price_tax_behavior_changed_event.py | 113 + stripe/events/_v1_product_activated_event.py | 113 + .../events/_v1_product_deactivated_event.py | 113 + ..._v1_product_default_price_changed_event.py | 113 + .../_v1_product_tax_code_changed_event.py | 113 + ..._v1_promotion_code_fully_redeemed_event.py | 113 + ...subscription_schedule_phase_added_event.py | 115 + ...e_phase_default_tax_rates_changed_event.py | 119 ++ ...n_schedule_phase_end_date_changed_event.py | 117 ++ ...bscription_schedule_phase_removed_event.py | 115 + ..._schedule_phase_trial_end_changed_event.py | 117 ++ ...cipient_capability_status_updated_event.py | 6 + ...ney_management_adjustment_created_event.py | 115 + ...agement_financial_account_created_event.py | 117 ++ ...agement_financial_account_updated_event.py | 117 ++ ...ement_financial_address_activated_event.py | 117 ++ ...nagement_financial_address_failed_event.py | 117 ++ ...gement_inbound_transfer_available_event.py | 155 ++ ...nbound_transfer_bank_debit_failed_event.py | 119 ++ ...nd_transfer_bank_debit_processing_event.py | 119 ++ ...nbound_transfer_bank_debit_queued_event.py | 119 ++ ...ound_transfer_bank_debit_returned_event.py | 119 ++ ...und_transfer_bank_debit_succeeded_event.py | 119 ++ ...agement_outbound_payment_canceled_event.py | 117 ++ ...nagement_outbound_payment_created_event.py | 117 ++ ...anagement_outbound_payment_failed_event.py | 117 ++ ...anagement_outbound_payment_posted_event.py | 117 ++ ...agement_outbound_payment_returned_event.py | 117 ++ ...ent_outbound_payment_under_review_event.py | 119 ++ ...nagement_outbound_payment_updated_event.py | 117 ++ ...management_payout_intent_canceled_event.py | 117 ++ ..._management_payout_intent_created_event.py | 115 + ..._management_payout_intent_pending_event.py | 115 + ...y_management_payout_intent_posted_event.py | 115 + ...nagement_payout_intent_processing_event.py | 117 ++ ...ent_payout_intent_requires_action_event.py | 119 ++ ..._management_payout_intent_updated_event.py | 115 + ..._management_payout_method_created_event.py | 115 + ..._management_payout_method_updated_event.py | 115 + ...agement_received_credit_available_event.py | 155 ++ ...management_received_credit_failed_event.py | 117 ++ ...nagement_received_credit_returned_event.py | 117 ++ ...agement_received_credit_succeeded_event.py | 117 ++ ...nt_recipient_verification_created_event.py | 121 ++ ...nt_recipient_verification_updated_event.py | 121 ++ ...ey_management_transaction_created_event.py | 157 ++ ...ey_management_transaction_updated_event.py | 153 ++ stripe/financial_connections/_account.py | 2 +- stripe/issuing/_card.py | 8 + stripe/params/__init__.py | 155 ++ stripe/params/_account_create_params.py | 61 +- .../params/_account_session_create_params.py | 73 + stripe/params/_account_update_params.py | 55 + stripe/params/_charge_capture_params.py | 2 +- stripe/params/_charge_create_params.py | 2 +- stripe/params/_customer_create_params.py | 20 +- .../params/_customer_create_tax_id_params.py | 20 +- .../params/_customer_tax_id_create_params.py | 20 +- stripe/params/_dispute_modify_params.py | 33 + stripe/params/_dispute_update_params.py | 33 + stripe/params/_invoice_add_lines_params.py | 2 +- stripe/params/_invoice_create_params.py | 4 +- .../params/_invoice_create_preview_params.py | 203 +- .../_invoice_line_item_update_params.py | 2 +- stripe/params/_invoice_modify_params.py | 4 +- stripe/params/_invoice_update_lines_params.py | 2 +- stripe/params/_invoice_update_params.py | 4 +- .../params/_payment_intent_confirm_params.py | 24 +- .../params/_payment_intent_create_params.py | 24 +- .../params/_payment_intent_modify_params.py | 24 +- .../params/_payment_intent_update_params.py | 24 +- stripe/params/_payment_link_create_params.py | 32 + stripe/params/_payment_link_modify_params.py | 33 +- stripe/params/_payment_link_update_params.py | 33 +- stripe/params/_setup_intent_confirm_params.py | 8 +- stripe/params/_setup_intent_create_params.py | 8 +- stripe/params/_setup_intent_modify_params.py | 8 +- stripe/params/_setup_intent_update_params.py | 8 +- stripe/params/_subscription_create_params.py | 4 +- stripe/params/_subscription_modify_params.py | 6 +- .../_subscription_schedule_modify_params.py | 2 +- .../_subscription_schedule_update_params.py | 2 +- stripe/params/_subscription_update_params.py | 6 +- stripe/params/_tax_id_create_params.py | 20 +- stripe/params/_tax_rate_create_params.py | 2 +- stripe/params/_tax_rate_modify_params.py | 2 +- stripe/params/_tax_rate_update_params.py | 2 +- stripe/params/_token_create_params.py | 33 + .../params/_webhook_endpoint_create_params.py | 8 + .../params/_webhook_endpoint_modify_params.py | 7 + .../params/_webhook_endpoint_update_params.py | 7 + stripe/params/apps/_install_create_params.py | 2 +- stripe/params/apps/_install_list_params.py | 4 +- stripe/params/billing_portal/__init__.py | 60 + .../_configuration_create_params.py | 45 + .../_configuration_modify_params.py | 45 + .../_configuration_update_params.py | 45 + .../billing_portal/_session_create_params.py | 38 + stripe/params/checkout/__init__.py | 15 + .../params/checkout/_session_create_params.py | 37 +- .../params/checkout/_session_modify_params.py | 52 +- .../params/checkout/_session_update_params.py | 52 +- stripe/params/issuing/_card_modify_params.py | 4 + stripe/params/issuing/_card_update_params.py | 4 + stripe/params/tax/__init__.py | 25 + .../params/tax/_calculation_create_params.py | 20 +- .../params/tax/_registration_create_params.py | 61 +- stripe/params/terminal/__init__.py | 30 + .../terminal/_configuration_create_params.py | 24 + .../terminal/_configuration_modify_params.py | 24 + .../terminal/_configuration_update_params.py | 24 + stripe/params/terminal/_reader_list_params.py | 2 +- stripe/params/v2/__init__.py | 9 +- stripe/params/v2/core/__init__.py | 93 +- .../params/v2/core/_account_create_params.py | 177 +- stripe/params/v2/core/_account_list_params.py | 2 +- .../v2/core/_account_token_create_params.py | 42 +- .../params/v2/core/_account_update_params.py | 183 +- .../v2/core/accounts/_person_create_params.py | 18 +- .../v2/core/accounts/_person_list_params.py | 2 +- .../accounts/_person_token_create_params.py | 18 +- .../v2/core/accounts/_person_update_params.py | 18 +- stripe/params/v2/core/vault/__init__.py | 116 + .../vault/_gb_bank_account_archive_params.py | 7 + .../vault/_gb_bank_account_create_params.py | 26 + .../vault/_gb_bank_account_list_params.py | 10 + .../vault/_gb_bank_account_retrieve_params.py | 7 + .../_gb_bank_account_unarchive_params.py | 7 + .../vault/_us_bank_account_archive_params.py | 7 + ...nk_account_confirm_microdeposits_params.py | 15 + .../vault/_us_bank_account_create_params.py | 26 + .../vault/_us_bank_account_list_params.py | 21 + .../vault/_us_bank_account_retrieve_params.py | 7 + ..._bank_account_send_microdeposits_params.py | 7 + .../_us_bank_account_unarchive_params.py | 7 + .../vault/_us_bank_account_update_params.py | 14 + stripe/params/v2/money_management/__init__.py | 515 +++++ .../_adjustment_list_params.py | 42 + .../_adjustment_retrieve_params.py | 7 + .../_financial_account_list_params.py | 22 + .../_financial_account_retrieve_params.py | 13 + .../_financial_account_update_params.py | 19 + .../_financial_address_create_params.py | 30 + .../_financial_address_list_params.py | 14 + .../_financial_address_retrieve_params.py | 7 + .../_inbound_transfer_create_params.py | 47 + .../_inbound_transfer_list_params.py | 37 + .../_inbound_transfer_retrieve_params.py | 7 + .../_outbound_payment_cancel_params.py | 7 + .../_outbound_payment_create_params.py | 142 ++ .../_outbound_payment_list_params.py | 48 + .../_outbound_payment_retrieve_params.py | 7 + .../_outbound_setup_intent_cancel_params.py | 7 + .../_outbound_setup_intent_create_params.py | 70 + .../_outbound_setup_intent_list_params.py | 10 + .../_outbound_setup_intent_retrieve_params.py | 7 + .../_outbound_setup_intent_update_params.py | 65 + .../_payout_intent_cancel_params.py | 7 + .../_payout_intent_confirm_params.py | 7 + .../_payout_intent_create_params.py | 147 ++ .../_payout_intent_list_params.py | 10 + .../_payout_intent_refresh_fx_quote_params.py | 7 + ...t_refresh_recipient_verification_params.py | 7 + .../_payout_intent_retrieve_params.py | 7 + .../_payout_intent_update_params.py | 122 ++ .../_payout_method_archive_params.py | 7 + .../_payout_method_list_params.py | 46 + .../_payout_method_retrieve_params.py | 7 + .../_payout_method_unarchive_params.py | 7 + ...thods_bank_account_spec_retrieve_params.py | 11 + .../_received_credit_list_params.py | 37 + .../_received_credit_retrieve_params.py | 7 + ...cipient_verification_acknowledge_params.py | 7 + .../_recipient_verification_create_params.py | 14 + ..._recipient_verification_retrieve_params.py | 7 + .../_transaction_entry_list_params.py | 38 + .../_transaction_entry_retrieve_params.py | 7 + .../_transaction_list_params.py | 43 + ...ction_refresh_regulatory_receipt_params.py | 7 + .../_transaction_retrieve_params.py | 7 + .../_transaction_update_params.py | 20 + .../money_management/test_helpers/__init__.py | 32 + .../_financial_address_credit_params.py | 22 + stripe/params/v2/test_helpers/__init__.py | 32 + ...nagement_recipient_verifications_params.py | 19 + stripe/tax/_calculation.py | 24 +- stripe/tax/_calculation_line_item.py | 2 + stripe/tax/_registration.py | 42 + stripe/tax/_transaction.py | 22 +- stripe/terminal/_configuration.py | 16 + stripe/terminal/_reader.py | 6 + stripe/test_helpers/_customer_service.py | 4 +- stripe/treasury/_credit_reversal.py | 2 + stripe/treasury/_debit_reversal.py | 2 + stripe/treasury/_financial_account.py | 2 + stripe/treasury/_inbound_transfer.py | 2 + stripe/treasury/_outbound_payment.py | 2 + stripe/treasury/_outbound_transfer.py | 2 + stripe/treasury/_received_credit.py | 8 + stripe/treasury/_received_debit.py | 2 + stripe/treasury/_transaction.py | 16 + stripe/treasury/_transaction_entry.py | 16 + stripe/v2/__init__.py | 12 + stripe/v2/_core_service.py | 3 + stripe/v2/_money_management_service.py | 144 ++ stripe/v2/_test_helper_service.py | 40 + stripe/v2/core/__init__.py | 5 +- stripe/v2/core/_account.py | 915 +++++++- stripe/v2/core/_account_person.py | 18 +- stripe/v2/core/_event.py | 2 +- stripe/v2/core/_event_destination.py | 2 +- stripe/v2/core/_vault_service.py | 48 + stripe/v2/core/vault/__init__.py | 47 + stripe/v2/core/vault/_gb_bank_account.py | 61 + .../v2/core/vault/_gb_bank_account_service.py | 244 +++ stripe/v2/core/vault/_us_bank_account.py | 107 + .../v2/core/vault/_us_bank_account_service.py | 393 ++++ stripe/v2/money_management/__init__.py | 200 ++ stripe/v2/money_management/_adjustment.py | 95 + .../money_management/_adjustment_service.py | 103 + .../v2/money_management/_financial_account.py | 124 ++ .../_financial_account_service.py | 152 ++ .../v2/money_management/_financial_address.py | 159 ++ .../_financial_address_credit_simulation.py | 27 + .../_financial_address_service.py | 144 ++ .../v2/money_management/_inbound_transfer.py | 184 ++ .../_inbound_transfer_service.py | 144 ++ .../v2/money_management/_outbound_payment.py | 310 +++ .../_outbound_payment_service.py | 193 ++ .../_outbound_setup_intent.py | 48 + .../_outbound_setup_intent_service.py | 244 +++ stripe/v2/money_management/_payout_intent.py | 468 +++++ .../_payout_intent_service.py | 393 ++++ stripe/v2/money_management/_payout_method.py | 145 ++ .../_payout_method_service.py | 207 ++ .../_payout_methods_bank_account_spec.py | 81 + ...ayout_methods_bank_account_spec_service.py | 58 + .../v2/money_management/_received_credit.py | 266 +++ .../_received_credit_service.py | 103 + .../_recipient_verification.py | 127 ++ .../_recipient_verification_service.py | 153 ++ .../money_management/_test_helpers_service.py | 40 + stripe/v2/money_management/_transaction.py | 209 ++ .../v2/money_management/_transaction_entry.py | 155 ++ .../_transaction_entry_service.py | 103 + .../money_management/_transaction_service.py | 201 ++ .../money_management/test_helpers/__init__.py | 32 + .../_financial_address_service.py | 63 + stripe/v2/test_helpers/__init__.py | 32 + .../test_helpers/_money_management_service.py | 54 + tests/test_generated_examples.py | 1864 +++++++++++++++++ 337 files changed, 27578 insertions(+), 327 deletions(-) create mode 100644 .hark/changes/2026-10-29_stripe-openapi_7d39ffde.change.md create mode 100644 stripe/events/_v1_customer_discount_source_changed_event.py create mode 100644 stripe/events/_v1_customer_subscription_active_event.py create mode 100644 stripe/events/_v1_customer_subscription_cancel_at_changed_event.py create mode 100644 stripe/events/_v1_customer_subscription_default_payment_method_changed_event.py create mode 100644 stripe/events/_v1_customer_subscription_incomplete_event.py create mode 100644 stripe/events/_v1_customer_subscription_incomplete_expired_event.py create mode 100644 stripe/events/_v1_customer_subscription_item_added_event.py create mode 100644 stripe/events/_v1_customer_subscription_item_price_changed_event.py create mode 100644 stripe/events/_v1_customer_subscription_item_quantity_changed_event.py create mode 100644 stripe/events/_v1_customer_subscription_item_removed_event.py create mode 100644 stripe/events/_v1_customer_subscription_item_tax_rates_changed_event.py create mode 100644 stripe/events/_v1_customer_subscription_past_due_event.py create mode 100644 stripe/events/_v1_customer_subscription_trialing_event.py create mode 100644 stripe/events/_v1_customer_subscription_unpaid_event.py create mode 100644 stripe/events/_v1_entitlements_active_entitlement_summary_entitlement_added_event.py create mode 100644 stripe/events/_v1_entitlements_active_entitlement_summary_entitlement_removed_event.py create mode 100644 stripe/events/_v1_financial_connections_account_balance_refresh_failed_event.py create mode 100644 stripe/events/_v1_financial_connections_account_balance_refresh_succeeded_event.py create mode 100644 stripe/events/_v1_financial_connections_account_inferred_balances_refresh_failed_event.py create mode 100644 stripe/events/_v1_financial_connections_account_inferred_balances_refresh_succeeded_event.py create mode 100644 stripe/events/_v1_financial_connections_account_ownership_refresh_failed_event.py create mode 100644 stripe/events/_v1_financial_connections_account_ownership_refresh_succeeded_event.py create mode 100644 stripe/events/_v1_financial_connections_account_risk_intelligence_refresh_failed_event.py create mode 100644 stripe/events/_v1_financial_connections_account_risk_intelligence_refresh_succeeded_event.py create mode 100644 stripe/events/_v1_financial_connections_account_transactions_refresh_failed_event.py create mode 100644 stripe/events/_v1_financial_connections_account_transactions_refresh_succeeded_event.py create mode 100644 stripe/events/_v1_invoice_discount_added_event.py create mode 100644 stripe/events/_v1_invoice_discount_removed_event.py create mode 100644 stripe/events/_v1_invoice_line_item_added_event.py create mode 100644 stripe/events/_v1_invoice_line_item_pricing_changed_event.py create mode 100644 stripe/events/_v1_invoice_line_item_quantity_changed_event.py create mode 100644 stripe/events/_v1_invoice_line_item_removed_event.py create mode 100644 stripe/events/_v1_invoice_payment_canceled_event.py create mode 100644 stripe/events/_v1_invoice_payment_open_event.py create mode 100644 stripe/events/_v1_invoiceitem_amount_changed_event.py create mode 100644 stripe/events/_v1_invoiceitem_discount_added_event.py create mode 100644 stripe/events/_v1_invoiceitem_discount_removed_event.py create mode 100644 stripe/events/_v1_price_activated_event.py create mode 100644 stripe/events/_v1_price_deactivated_event.py create mode 100644 stripe/events/_v1_price_lookup_key_changed_event.py create mode 100644 stripe/events/_v1_price_tax_behavior_changed_event.py create mode 100644 stripe/events/_v1_product_activated_event.py create mode 100644 stripe/events/_v1_product_deactivated_event.py create mode 100644 stripe/events/_v1_product_default_price_changed_event.py create mode 100644 stripe/events/_v1_product_tax_code_changed_event.py create mode 100644 stripe/events/_v1_promotion_code_fully_redeemed_event.py create mode 100644 stripe/events/_v1_subscription_schedule_phase_added_event.py create mode 100644 stripe/events/_v1_subscription_schedule_phase_default_tax_rates_changed_event.py create mode 100644 stripe/events/_v1_subscription_schedule_phase_end_date_changed_event.py create mode 100644 stripe/events/_v1_subscription_schedule_phase_removed_event.py create mode 100644 stripe/events/_v1_subscription_schedule_phase_trial_end_changed_event.py create mode 100644 stripe/events/_v2_money_management_adjustment_created_event.py create mode 100644 stripe/events/_v2_money_management_financial_account_created_event.py create mode 100644 stripe/events/_v2_money_management_financial_account_updated_event.py create mode 100644 stripe/events/_v2_money_management_financial_address_activated_event.py create mode 100644 stripe/events/_v2_money_management_financial_address_failed_event.py create mode 100644 stripe/events/_v2_money_management_inbound_transfer_available_event.py create mode 100644 stripe/events/_v2_money_management_inbound_transfer_bank_debit_failed_event.py create mode 100644 stripe/events/_v2_money_management_inbound_transfer_bank_debit_processing_event.py create mode 100644 stripe/events/_v2_money_management_inbound_transfer_bank_debit_queued_event.py create mode 100644 stripe/events/_v2_money_management_inbound_transfer_bank_debit_returned_event.py create mode 100644 stripe/events/_v2_money_management_inbound_transfer_bank_debit_succeeded_event.py create mode 100644 stripe/events/_v2_money_management_outbound_payment_canceled_event.py create mode 100644 stripe/events/_v2_money_management_outbound_payment_created_event.py create mode 100644 stripe/events/_v2_money_management_outbound_payment_failed_event.py create mode 100644 stripe/events/_v2_money_management_outbound_payment_posted_event.py create mode 100644 stripe/events/_v2_money_management_outbound_payment_returned_event.py create mode 100644 stripe/events/_v2_money_management_outbound_payment_under_review_event.py create mode 100644 stripe/events/_v2_money_management_outbound_payment_updated_event.py create mode 100644 stripe/events/_v2_money_management_payout_intent_canceled_event.py create mode 100644 stripe/events/_v2_money_management_payout_intent_created_event.py create mode 100644 stripe/events/_v2_money_management_payout_intent_pending_event.py create mode 100644 stripe/events/_v2_money_management_payout_intent_posted_event.py create mode 100644 stripe/events/_v2_money_management_payout_intent_processing_event.py create mode 100644 stripe/events/_v2_money_management_payout_intent_requires_action_event.py create mode 100644 stripe/events/_v2_money_management_payout_intent_updated_event.py create mode 100644 stripe/events/_v2_money_management_payout_method_created_event.py create mode 100644 stripe/events/_v2_money_management_payout_method_updated_event.py create mode 100644 stripe/events/_v2_money_management_received_credit_available_event.py create mode 100644 stripe/events/_v2_money_management_received_credit_failed_event.py create mode 100644 stripe/events/_v2_money_management_received_credit_returned_event.py create mode 100644 stripe/events/_v2_money_management_received_credit_succeeded_event.py create mode 100644 stripe/events/_v2_money_management_recipient_verification_created_event.py create mode 100644 stripe/events/_v2_money_management_recipient_verification_updated_event.py create mode 100644 stripe/events/_v2_money_management_transaction_created_event.py create mode 100644 stripe/events/_v2_money_management_transaction_updated_event.py create mode 100644 stripe/params/v2/core/vault/__init__.py create mode 100644 stripe/params/v2/core/vault/_gb_bank_account_archive_params.py create mode 100644 stripe/params/v2/core/vault/_gb_bank_account_create_params.py create mode 100644 stripe/params/v2/core/vault/_gb_bank_account_list_params.py create mode 100644 stripe/params/v2/core/vault/_gb_bank_account_retrieve_params.py create mode 100644 stripe/params/v2/core/vault/_gb_bank_account_unarchive_params.py create mode 100644 stripe/params/v2/core/vault/_us_bank_account_archive_params.py create mode 100644 stripe/params/v2/core/vault/_us_bank_account_confirm_microdeposits_params.py create mode 100644 stripe/params/v2/core/vault/_us_bank_account_create_params.py create mode 100644 stripe/params/v2/core/vault/_us_bank_account_list_params.py create mode 100644 stripe/params/v2/core/vault/_us_bank_account_retrieve_params.py create mode 100644 stripe/params/v2/core/vault/_us_bank_account_send_microdeposits_params.py create mode 100644 stripe/params/v2/core/vault/_us_bank_account_unarchive_params.py create mode 100644 stripe/params/v2/core/vault/_us_bank_account_update_params.py create mode 100644 stripe/params/v2/money_management/__init__.py create mode 100644 stripe/params/v2/money_management/_adjustment_list_params.py create mode 100644 stripe/params/v2/money_management/_adjustment_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_financial_account_list_params.py create mode 100644 stripe/params/v2/money_management/_financial_account_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_financial_account_update_params.py create mode 100644 stripe/params/v2/money_management/_financial_address_create_params.py create mode 100644 stripe/params/v2/money_management/_financial_address_list_params.py create mode 100644 stripe/params/v2/money_management/_financial_address_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_inbound_transfer_create_params.py create mode 100644 stripe/params/v2/money_management/_inbound_transfer_list_params.py create mode 100644 stripe/params/v2/money_management/_inbound_transfer_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_outbound_payment_cancel_params.py create mode 100644 stripe/params/v2/money_management/_outbound_payment_create_params.py create mode 100644 stripe/params/v2/money_management/_outbound_payment_list_params.py create mode 100644 stripe/params/v2/money_management/_outbound_payment_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_outbound_setup_intent_cancel_params.py create mode 100644 stripe/params/v2/money_management/_outbound_setup_intent_create_params.py create mode 100644 stripe/params/v2/money_management/_outbound_setup_intent_list_params.py create mode 100644 stripe/params/v2/money_management/_outbound_setup_intent_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_outbound_setup_intent_update_params.py create mode 100644 stripe/params/v2/money_management/_payout_intent_cancel_params.py create mode 100644 stripe/params/v2/money_management/_payout_intent_confirm_params.py create mode 100644 stripe/params/v2/money_management/_payout_intent_create_params.py create mode 100644 stripe/params/v2/money_management/_payout_intent_list_params.py create mode 100644 stripe/params/v2/money_management/_payout_intent_refresh_fx_quote_params.py create mode 100644 stripe/params/v2/money_management/_payout_intent_refresh_recipient_verification_params.py create mode 100644 stripe/params/v2/money_management/_payout_intent_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_payout_intent_update_params.py create mode 100644 stripe/params/v2/money_management/_payout_method_archive_params.py create mode 100644 stripe/params/v2/money_management/_payout_method_list_params.py create mode 100644 stripe/params/v2/money_management/_payout_method_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_payout_method_unarchive_params.py create mode 100644 stripe/params/v2/money_management/_payout_methods_bank_account_spec_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_received_credit_list_params.py create mode 100644 stripe/params/v2/money_management/_received_credit_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_recipient_verification_acknowledge_params.py create mode 100644 stripe/params/v2/money_management/_recipient_verification_create_params.py create mode 100644 stripe/params/v2/money_management/_recipient_verification_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_transaction_entry_list_params.py create mode 100644 stripe/params/v2/money_management/_transaction_entry_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_transaction_list_params.py create mode 100644 stripe/params/v2/money_management/_transaction_refresh_regulatory_receipt_params.py create mode 100644 stripe/params/v2/money_management/_transaction_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_transaction_update_params.py create mode 100644 stripe/params/v2/money_management/test_helpers/__init__.py create mode 100644 stripe/params/v2/money_management/test_helpers/_financial_address_credit_params.py create mode 100644 stripe/params/v2/test_helpers/__init__.py create mode 100644 stripe/params/v2/test_helpers/_money_management_recipient_verifications_params.py create mode 100644 stripe/v2/_money_management_service.py create mode 100644 stripe/v2/_test_helper_service.py create mode 100644 stripe/v2/core/_vault_service.py create mode 100644 stripe/v2/core/vault/__init__.py create mode 100644 stripe/v2/core/vault/_gb_bank_account.py create mode 100644 stripe/v2/core/vault/_gb_bank_account_service.py create mode 100644 stripe/v2/core/vault/_us_bank_account.py create mode 100644 stripe/v2/core/vault/_us_bank_account_service.py create mode 100644 stripe/v2/money_management/__init__.py create mode 100644 stripe/v2/money_management/_adjustment.py create mode 100644 stripe/v2/money_management/_adjustment_service.py create mode 100644 stripe/v2/money_management/_financial_account.py create mode 100644 stripe/v2/money_management/_financial_account_service.py create mode 100644 stripe/v2/money_management/_financial_address.py create mode 100644 stripe/v2/money_management/_financial_address_credit_simulation.py create mode 100644 stripe/v2/money_management/_financial_address_service.py create mode 100644 stripe/v2/money_management/_inbound_transfer.py create mode 100644 stripe/v2/money_management/_inbound_transfer_service.py create mode 100644 stripe/v2/money_management/_outbound_payment.py create mode 100644 stripe/v2/money_management/_outbound_payment_service.py create mode 100644 stripe/v2/money_management/_outbound_setup_intent.py create mode 100644 stripe/v2/money_management/_outbound_setup_intent_service.py create mode 100644 stripe/v2/money_management/_payout_intent.py create mode 100644 stripe/v2/money_management/_payout_intent_service.py create mode 100644 stripe/v2/money_management/_payout_method.py create mode 100644 stripe/v2/money_management/_payout_method_service.py create mode 100644 stripe/v2/money_management/_payout_methods_bank_account_spec.py create mode 100644 stripe/v2/money_management/_payout_methods_bank_account_spec_service.py create mode 100644 stripe/v2/money_management/_received_credit.py create mode 100644 stripe/v2/money_management/_received_credit_service.py create mode 100644 stripe/v2/money_management/_recipient_verification.py create mode 100644 stripe/v2/money_management/_recipient_verification_service.py create mode 100644 stripe/v2/money_management/_test_helpers_service.py create mode 100644 stripe/v2/money_management/_transaction.py create mode 100644 stripe/v2/money_management/_transaction_entry.py create mode 100644 stripe/v2/money_management/_transaction_entry_service.py create mode 100644 stripe/v2/money_management/_transaction_service.py create mode 100644 stripe/v2/money_management/test_helpers/__init__.py create mode 100644 stripe/v2/money_management/test_helpers/_financial_address_service.py create mode 100644 stripe/v2/test_helpers/__init__.py create mode 100644 stripe/v2/test_helpers/_money_management_service.py diff --git a/.hark/changes/2026-10-29_stripe-openapi_7d39ffde.change.md b/.hark/changes/2026-10-29_stripe-openapi_7d39ffde.change.md new file mode 100644 index 000000000..e1b910ea7 --- /dev/null +++ b/.hark/changes/2026-10-29_stripe-openapi_7d39ffde.change.md @@ -0,0 +1,87 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-python/pull/1949 +semver_level: minor +is_stripe_api_change: true +--- + +* Add support for new resources `v2.core.vault.GbBankAccount`, `v2.core.vault.UsBankAccount`, `v2.money_management.Adjustment`, `v2.money_management.FinancialAccount`, `v2.money_management.FinancialAddressCreditSimulation`, `v2.money_management.FinancialAddress`, `v2.money_management.InboundTransfer`, `v2.money_management.OutboundPayment`, `v2.money_management.OutboundSetupIntent`, `v2.money_management.PayoutIntent`, `v2.money_management.PayoutMethod`, `v2.money_management.PayoutMethodsBankAccountSpec`, `v2.money_management.ReceivedCredit`, `v2.money_management.RecipientVerification`, `v2.money_management.TransactionEntry`, and `v2.money_management.Transaction` +* Add support for `acknowledge`, `create`, `recipient_verifications`, and `retrieve` methods on resource `v2.money_management.RecipientVerification` +* Add support for `list` and `retrieve` methods on resources `v2.money_management.Adjustment`, `v2.money_management.ReceivedCredit`, and `v2.money_management.TransactionEntry` +* Add support for `list`, `modify`, `refresh_regulatory_receipt`, and `retrieve` methods on resource `v2.money_management.Transaction` +* Add support for `credit` method on resource `v2.money_management.FinancialAddressCreditSimulation` +* Add support for `retrieve` method on resource `v2.money_management.PayoutMethodsBankAccountSpec` +* Add support for `archive`, `list`, `retrieve`, and `unarchive` methods on resource `v2.money_management.PayoutMethod` +* Add support for `cancel`, `confirm`, `create`, `list`, `modify`, `refresh_fx_quote`, `refresh_recipient_verification`, and `retrieve` methods on resource `v2.money_management.PayoutIntent` +* Add support for `cancel`, `create`, `list`, `modify`, and `retrieve` methods on resource `v2.money_management.OutboundSetupIntent` +* Add support for `cancel`, `create`, `list`, and `retrieve` methods on resource `v2.money_management.OutboundPayment` +* Add support for `create`, `list`, and `retrieve` methods on resources `v2.money_management.FinancialAddress` and `v2.money_management.InboundTransfer` +* Add support for `list`, `modify`, and `retrieve` methods on resource `v2.money_management.FinancialAccount` +* Add support for `archive`, `confirm_microdeposits`, `create`, `list`, `modify`, `retrieve`, `send_microdeposits`, and `unarchive` methods on resource `v2.core.vault.UsBankAccount` +* Add support for `archive`, `create`, `list`, `retrieve`, and `unarchive` methods on resource `v2.core.vault.GbBankAccount` +* Add support for new values `get_fund` and `nhil` on enums `Tax.Calculation.ShippingCost.TaxBreakdown.TaxRateDetail.tax_type`, `Tax.Calculation.TaxBreakdown.TaxRateDetail.tax_type`, `Tax.CalculationLineItem.TaxBreakdown.TaxRateDetail.tax_type`, and `Tax.Transaction.ShippingCost.TaxBreakdown.TaxRateDetail.tax_type` +* Add support for `reporting_chart`, `terminal_hardware_orders`, and `terminal_hardware_shop` on `AccountSession.Component` and `AccountSessionCreateParamsComponent` +* Add support for `wero_payments` on `Account.Capability`, `AccountCreateParamsCapability`, and `AccountModifyParamsCapability` +* Add support for `physical_address` on `Account.Company`, `AccountCreateParamsCompany`, `AccountModifyParamsCompany`, and `TokenCreateParamsAccountCompany` +* Add support for `proof_of_business_presence` on `AccountCreateParamsDocument` and `AccountModifyParamsDocument` +* Add support for `subscription_pause` on `BillingPortal.Configuration.Feature`, `BillingPortal.Session.Flow`, `billing_portal.ConfigurationCreateParamsFeature`, `billing_portal.ConfigurationModifyParamsFeature`, and `billing_portal.SessionCreateParamsFlowDatum` +* Add support for `after_expiration` on `BillingPortal.Session` and `billing_portal.SessionCreateParams` +* Add support for new value `subscription_pause` on enums `BillingPortal.Session.Flow.type` and `billing_portal.SessionCreateParamsFlowDatum.type` +* Add support for `setup_credential_usage` on `Charge.PaymentMethodDetail.Card`, `PaymentIntent.PaymentMethodOption.Card`, `PaymentIntentConfirmParamsPaymentMethodOptionCard`, `PaymentIntentCreateParamsPaymentMethodOptionCard`, `PaymentIntentModifyParamsPaymentMethodOptionCard`, `SetupIntent.PaymentMethodOption.Card`, `SetupIntentConfirmParamsPaymentMethodOptionCard`, `SetupIntentCreateParamsPaymentMethodOptionCard`, and `SetupIntentModifyParamsPaymentMethodOptionCard` +* Add support for `stored_credential_usage` on `Charge.PaymentMethodDetail.Card`, `PaymentAttemptRecord.PaymentMethodDetail.Card`, `PaymentIntent.PaymentMethodOption.Card`, `PaymentIntentConfirmParamsPaymentMethodOptionCard`, `PaymentIntentCreateParamsPaymentMethodOptionCard`, `PaymentIntentModifyParamsPaymentMethodOptionCard`, and `PaymentRecord.PaymentMethodDetail.Card` +* Add support for new value `ousd` on enums `Charge.PaymentMethodDetail.Crypto.token_currency`, `PaymentAttemptRecord.PaymentMethodDetail.Crypto.token_currency`, and `PaymentRecord.PaymentMethodDetail.Crypto.token_currency` +* Add support for new value `hi-IN` on enums `Checkout.Session.locale` and `checkout.SessionCreateParams.locale` +* Add support for `account_tax_ids`, `custom_fields`, `description`, and `footer` on `PaymentLink.SubscriptionDatum.InvoiceSetting`, `PaymentLinkCreateParamsSubscriptionDatumInvoiceSetting`, `PaymentLinkModifyParamsSubscriptionDatumInvoiceSetting`, and `checkout.SessionCreateParamsSubscriptionDatumInvoiceSetting` +* Add support for `payment_intent_data` on `checkout.SessionModifyParams` +* Add support for new values `au_acn`, `au_wpn`, `bw_vat`, `ci_vat`, `cz_dic`, `fr_siren`, `fr_siret`, `fr_spi`, `gh_tin`, `is_kt`, `md_cf`, `mu_vat`, `mz_nuit`, `nz_bn`, `pt_nif`, `sm_coe`, `tt_bir`, and `tt_vat` on enums `Checkout.Session.CustomerDetail.TaxId.type`, `Invoice.CustomerTaxId.type`, `Tax.Calculation.CustomerDetail.TaxId.type`, `Tax.Transaction.CustomerDetail.TaxId.type`, and `TaxId.type` +* Add support for new values `au_acn`, `au_wpn`, `bw_vat`, `ci_vat`, `cz_dic`, `fr_siren`, `fr_siret`, `fr_spi`, `gh_tin`, `is_kt`, `md_cf`, `mu_vat`, `mz_nuit`, `nz_bn`, `pt_nif`, `sm_coe`, `tt_bir`, and `tt_vat` on enums `CustomerCreateParamsTaxIdDatum.type`, `CustomerCreateTaxIdParams.type`, `InvoiceCreatePreviewParamsCustomerDetailTaxId.type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParamsCustomerDetailTaxId.type` +* Add support for new values `fednow` and `rtp` on enum `CustomerCashBalanceTransaction.Funded.BankTransfer.UsBankTransfer.network` +* Add support for `intended_submission_method` on `DisputeModifyParams` and `Dispute` +* Add support for `appeal` on `Dispute.Evidence` and `DisputeModifyParamsEvidence` +* Add support for `submission_method` on `Dispute.EvidenceDetail` +* Add support for new values `appeal_needs_response` and `appeal_under_review` on enum `Dispute.status` +* Add support for new values `three_d_secure.authentication.canceled`, `three_d_secure.authentication.challenge_started`, `three_d_secure.authentication.errored`, `three_d_secure.authentication.failed`, `three_d_secure.authentication.requires_challenge`, `three_d_secure.authentication.requires_submission`, and `three_d_secure.authentication.succeeded` on enum `Event.type` +* Add support for new value `sequra` on enums `Invoice.PaymentSetting.payment_method_types`, `InvoiceCreateParamsPaymentSetting.payment_method_types`, `InvoiceModifyParamsPaymentSetting.payment_method_types`, `Subscription.PaymentSetting.payment_method_types`, `SubscriptionCreateParamsPaymentSetting.payment_method_types`, and `SubscriptionModifyParamsPaymentSetting.payment_method_types` +* Add support for new values `admissions_tax`, `attendance_tax`, `entertainment_tax`, `get_fund`, `gross_receipts_tax`, `hospitality_tax`, `luxury_tax`, `nhil`, `resort_tax`, and `tourism_tax` on enums `InvoiceAddLinesParamsLineTaxAmountTaxRateDatum.tax_type`, `InvoiceLineItemModifyParamsTaxAmountTaxRateDatum.tax_type`, `InvoiceUpdateLinesParamsLineTaxAmountTaxRateDatum.tax_type`, `TaxRate.tax_type`, `TaxRateCreateParams.tax_type`, and `TaxRateModifyParams.tax_type` +* Add support for `pause_schedules` on `InvoiceCreatePreviewParamsScheduleDetail` +* Add support for `financial_account` on `issuing.CardModifyParams` +* Add support for `delivered_at` and `shipped_at` on `Issuing.Card.Shipping` +* Add support for new value `scalapay` on enums `PaymentLink.payment_method_types`, `PaymentLinkCreateParams.payment_method_types`, and `PaymentLinkModifyParams.payment_method_types` +* Add support for `reference_status` and `reference` on `Refund.DestinationDetail.AfterpayClearpay`, `Refund.DestinationDetail.Klarna`, and `Refund.DestinationDetail.Paypal` +* Change `SubscriptionSchedule.pause_schedules` to be required +* Add support for `bw`, `ci`, `gh`, and `mu` on `Tax.Registration.CountryOption` and `tax.RegistrationCreateParamsCountryOption` +* Add support for `utility_users_tax` on `Tax.Registration.CountryOption.Me` and `tax.RegistrationCreateParamsCountryOptionMe` +* Add support for new values `digital_excise_tax` and `utility_users_tax` on enums `Tax.Registration.CountryOption.Me.type` and `tax.RegistrationCreateParamsCountryOptionMe.type` +* Add support for `reader_security` and `stripe_t600` on `Terminal.Configuration`, `terminal.ConfigurationCreateParams`, and `terminal.ConfigurationModifyParams` +* Add support for new values `simulated_stripe_t600` and `stripe_t600` on enums `Terminal.Reader.device_type` and `terminal.ReaderListParams.device_type` +* Add support for new values `three_d_secure.authentication.canceled`, `three_d_secure.authentication.challenge_started`, `three_d_secure.authentication.errored`, `three_d_secure.authentication.failed`, `three_d_secure.authentication.requires_challenge`, `three_d_secure.authentication.requires_submission`, and `three_d_secure.authentication.succeeded` on enums `WebhookEndpointCreateParams.enabled_events` and `WebhookEndpointModifyParams.enabled_events` +* Add support for new value `2026-10-28.endive` on enum `WebhookEndpointCreateParams.api_version` +* Add support for `bank_accounts` and `cards` on `V2.Core.Account.Configuration.Recipient.Capability`, `v2.core.AccountCreateParamsConfigurationRecipientCapability`, and `v2.core.AccountModifyParamsConfigurationRecipientCapability` +* Add support for `payout_methods` on `V2.Core.Account.Default` and `v2.core.AccountModifyParamsDefault` +* Add support for `alternatives` on `V2.Core.Account.FutureRequirement` and `V2.Core.Account.Requirement` +* Add support for new values `bank_accounts.ach`, `bank_accounts.fedwire`, `bank_accounts.fps`, `bank_accounts.rtp`, `bank_accounts.sepa`, and `bank_accounts.swift` on enums `V2.Core.Account.FutureRequirement.Entry.Impact.RestrictsCapability.capability` and `V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capability` +* Add support for `customer` and `subscription` on `EventsV1InvoiceUpcomingEvent` +* Add support for new values `bank_accounts.ach`, `bank_accounts.fedwire`, `bank_accounts.fps`, `bank_accounts.rtp`, `bank_accounts.sepa`, and `bank_accounts.swift` on enum `EventsV2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.updated_capability` +* Add support for snapshot events `three_d_secure.authentication.canceled`, `three_d_secure.authentication.challenge_started`, `three_d_secure.authentication.errored`, `three_d_secure.authentication.failed`, `three_d_secure.authentication.requires_challenge`, `three_d_secure.authentication.requires_submission`, and `three_d_secure.authentication.succeeded` with resource `three_d_secure.Authentication` +* Add support for event notifications `V1CustomerDiscountSourceChangedEvent`, `V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent`, and `V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent` +* Add support for event notifications `V1CustomerSubscriptionActiveEvent`, `V1CustomerSubscriptionCancelAtChangedEvent`, `V1CustomerSubscriptionDefaultPaymentMethodChangedEvent`, `V1CustomerSubscriptionIncompleteEvent`, `V1CustomerSubscriptionIncompleteExpiredEvent`, `V1CustomerSubscriptionItemAddedEvent`, `V1CustomerSubscriptionItemPriceChangedEvent`, `V1CustomerSubscriptionItemQuantityChangedEvent`, `V1CustomerSubscriptionItemRemovedEvent`, `V1CustomerSubscriptionItemTaxRatesChangedEvent`, `V1CustomerSubscriptionPastDueEvent`, `V1CustomerSubscriptionTrialingEvent`, and `V1CustomerSubscriptionUnpaidEvent` with related object `Subscription` +* Add support for event notifications `V1FinancialConnectionsAccountBalanceRefreshFailedEvent`, `V1FinancialConnectionsAccountBalanceRefreshSucceededEvent`, `V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent`, `V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent`, `V1FinancialConnectionsAccountOwnershipRefreshFailedEvent`, `V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent`, `V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent`, `V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent`, `V1FinancialConnectionsAccountTransactionsRefreshFailedEvent`, and `V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent` with related object `financial_connections.Account` +* Add support for event notifications `V1InvoiceDiscountAddedEvent`, `V1InvoiceDiscountRemovedEvent`, `V1InvoiceLineItemAddedEvent`, `V1InvoiceLineItemPricingChangedEvent`, `V1InvoiceLineItemQuantityChangedEvent`, and `V1InvoiceLineItemRemovedEvent` with related object `Invoice` +* Add support for event notifications `V1InvoicePaymentCanceledEvent` and `V1InvoicePaymentOpenEvent` with related object `InvoicePayment` +* Add support for event notifications `V1InvoiceitemAmountChangedEvent`, `V1InvoiceitemDiscountAddedEvent`, and `V1InvoiceitemDiscountRemovedEvent` with related object `InvoiceItem` +* Add support for event notifications `V1PriceActivatedEvent`, `V1PriceDeactivatedEvent`, `V1PriceLookupKeyChangedEvent`, and `V1PriceTaxBehaviorChangedEvent` with related object `Price` +* Add support for event notifications `V1ProductActivatedEvent`, `V1ProductDeactivatedEvent`, `V1ProductDefaultPriceChangedEvent`, and `V1ProductTaxCodeChangedEvent` with related object `Product` +* Add support for event notification `V1PromotionCodeFullyRedeemedEvent` with related object `PromotionCode` +* Add support for event notifications `V1SubscriptionSchedulePhaseAddedEvent`, `V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent`, `V1SubscriptionSchedulePhaseEndDateChangedEvent`, `V1SubscriptionSchedulePhaseRemovedEvent`, and `V1SubscriptionSchedulePhaseTrialEndChangedEvent` with related object `SubscriptionSchedule` +* Add support for event notification `V2MoneyManagementAdjustmentCreatedEvent` with related object `v2.money_management.Adjustment` +* Add support for event notifications `V2MoneyManagementFinancialAccountCreatedEvent` and `V2MoneyManagementFinancialAccountUpdatedEvent` with related object `v2.money_management.FinancialAccount` +* Add support for event notifications `V2MoneyManagementFinancialAddressActivatedEvent` and `V2MoneyManagementFinancialAddressFailedEvent` with related object `v2.money_management.FinancialAddress` +* Add support for event notifications `V2MoneyManagementInboundTransferAvailableEvent`, `V2MoneyManagementInboundTransferBankDebitFailedEvent`, `V2MoneyManagementInboundTransferBankDebitProcessingEvent`, `V2MoneyManagementInboundTransferBankDebitQueuedEvent`, `V2MoneyManagementInboundTransferBankDebitReturnedEvent`, and `V2MoneyManagementInboundTransferBankDebitSucceededEvent` with related object `v2.money_management.InboundTransfer` +* Add support for event notifications `V2MoneyManagementOutboundPaymentCanceledEvent`, `V2MoneyManagementOutboundPaymentCreatedEvent`, `V2MoneyManagementOutboundPaymentFailedEvent`, `V2MoneyManagementOutboundPaymentPostedEvent`, `V2MoneyManagementOutboundPaymentReturnedEvent`, `V2MoneyManagementOutboundPaymentUnderReviewEvent`, and `V2MoneyManagementOutboundPaymentUpdatedEvent` with related object `v2.money_management.OutboundPayment` +* Add support for event notifications `V2MoneyManagementPayoutIntentCanceledEvent`, `V2MoneyManagementPayoutIntentCreatedEvent`, `V2MoneyManagementPayoutIntentPendingEvent`, `V2MoneyManagementPayoutIntentPostedEvent`, `V2MoneyManagementPayoutIntentProcessingEvent`, `V2MoneyManagementPayoutIntentRequiresActionEvent`, and `V2MoneyManagementPayoutIntentUpdatedEvent` with related object `v2.money_management.PayoutIntent` +* Add support for event notifications `V2MoneyManagementPayoutMethodCreatedEvent` and `V2MoneyManagementPayoutMethodUpdatedEvent` with related object `v2.money_management.PayoutMethod` +* Add support for event notifications `V2MoneyManagementReceivedCreditAvailableEvent`, `V2MoneyManagementReceivedCreditFailedEvent`, `V2MoneyManagementReceivedCreditReturnedEvent`, and `V2MoneyManagementReceivedCreditSucceededEvent` with related object `v2.money_management.ReceivedCredit` +* Add support for event notifications `V2MoneyManagementRecipientVerificationCreatedEvent` and `V2MoneyManagementRecipientVerificationUpdatedEvent` with related object `v2.money_management.RecipientVerification` +* Add support for event notifications `V2MoneyManagementTransactionCreatedEvent` and `V2MoneyManagementTransactionUpdatedEvent` with related object `v2.money_management.Transaction` +* Add support for error types `AlreadyCanceledError`, `BlockedByStripeError`, `CannotProceedError`, `CapabilityNotEnabledError`, `ControlledByAlternateResourceError`, `FeatureNotEnabledError`, `FinancialAccountNotOpenError`, `FxQuoteNeedsRefreshError`, `InsufficientFundsError`, `InvalidPaymentMethodError`, `InvalidPayoutMethodError`, `InvalidVaultedCredentialError`, `NotCancelableError`, `QuotaExceededError`, `RecipientNotNotifiableError`, `VerificationAttemptFailedError`, `VerificationExpiredError`, and `VerificationNotInitiatedError` +* Add support for error codes `smart_disputes_not_available`, `subscription_update_trial_after_billing_cycle_anchor`, `three_d_secure_authentication_not_supported`, and `three_d_secure_authentication_upstream_error` on `Invoice.LastFinalizationError`, `PaymentIntent.LastPaymentError`, `SetupAttempt.SetupError`, `SetupIntent.LastSetupError`, `StripeError`, and `Terminal.Reader.Action.ApiError` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 6aca587b4..b9979ecd9 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -588801ef34f7b5f7d6a784d3354f5f93d2a26ffb \ No newline at end of file +65c49b0893d71e8cfe272b2d38cd3307ee1833f2 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bfaa37da3..9a21d2dc6 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2526 \ No newline at end of file +v2596 \ No newline at end of file diff --git a/stripe/__init__.py b/stripe/__init__.py index d5124858a..36c2f5f24 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -287,16 +287,34 @@ def set_app_info( from stripe._error import ( APIConnectionError as APIConnectionError, APIError as APIError, + AlreadyCanceledError as AlreadyCanceledError, AuthenticationError as AuthenticationError, + BlockedByStripeError as BlockedByStripeError, + CannotProceedError as CannotProceedError, + CapabilityNotEnabledError as CapabilityNotEnabledError, CardError as CardError, + ControlledByAlternateResourceError as ControlledByAlternateResourceError, + FeatureNotEnabledError as FeatureNotEnabledError, + FinancialAccountNotOpenError as FinancialAccountNotOpenError, + FxQuoteNeedsRefreshError as FxQuoteNeedsRefreshError, IdempotencyError as IdempotencyError, + InsufficientFundsError as InsufficientFundsError, + InvalidPaymentMethodError as InvalidPaymentMethodError, + InvalidPayoutMethodError as InvalidPayoutMethodError, InvalidRequestError as InvalidRequestError, + InvalidVaultedCredentialError as InvalidVaultedCredentialError, + NotCancelableError as NotCancelableError, PermissionError as PermissionError, + QuotaExceededError as QuotaExceededError, RateLimitError as RateLimitError, + RecipientNotNotifiableError as RecipientNotNotifiableError, SignatureVerificationError as SignatureVerificationError, StripeError as StripeError, StripeErrorWithParamCode as StripeErrorWithParamCode, TemporarySessionExpiredError as TemporarySessionExpiredError, + VerificationAttemptFailedError as VerificationAttemptFailedError, + VerificationExpiredError as VerificationExpiredError, + VerificationNotInitiatedError as VerificationNotInitiatedError, ) from stripe._error_object import ( ErrorObject as ErrorObject, @@ -700,16 +718,34 @@ def set_app_info( "EphemeralKeyService": ("stripe._ephemeral_key_service", False), "APIConnectionError": ("stripe._error", False), "APIError": ("stripe._error", False), + "AlreadyCanceledError": ("stripe._error", False), "AuthenticationError": ("stripe._error", False), + "BlockedByStripeError": ("stripe._error", False), + "CannotProceedError": ("stripe._error", False), + "CapabilityNotEnabledError": ("stripe._error", False), "CardError": ("stripe._error", False), + "ControlledByAlternateResourceError": ("stripe._error", False), + "FeatureNotEnabledError": ("stripe._error", False), + "FinancialAccountNotOpenError": ("stripe._error", False), + "FxQuoteNeedsRefreshError": ("stripe._error", False), "IdempotencyError": ("stripe._error", False), + "InsufficientFundsError": ("stripe._error", False), + "InvalidPaymentMethodError": ("stripe._error", False), + "InvalidPayoutMethodError": ("stripe._error", False), "InvalidRequestError": ("stripe._error", False), + "InvalidVaultedCredentialError": ("stripe._error", False), + "NotCancelableError": ("stripe._error", False), "PermissionError": ("stripe._error", False), + "QuotaExceededError": ("stripe._error", False), "RateLimitError": ("stripe._error", False), + "RecipientNotNotifiableError": ("stripe._error", False), "SignatureVerificationError": ("stripe._error", False), "StripeError": ("stripe._error", False), "StripeErrorWithParamCode": ("stripe._error", False), "TemporarySessionExpiredError": ("stripe._error", False), + "VerificationAttemptFailedError": ("stripe._error", False), + "VerificationExpiredError": ("stripe._error", False), + "VerificationNotInitiatedError": ("stripe._error", False), "ErrorObject": ("stripe._error_object", False), "OAuthErrorObject": ("stripe._error_object", False), "Event": ("stripe._event", False), diff --git a/stripe/_account.py b/stripe/_account.py index ac0113ddb..aab0223ac 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -628,6 +628,12 @@ class Capabilities(StripeObject): """ The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. """ + wero_payments: Optional[ + Union[Literal["active", "inactive", "pending"], str] + ] + """ + The status of the Wero capability of the account, or whether the account can directly process Wero payments. + """ zip_payments: Optional[ Union[Literal["active", "inactive", "pending"], str] ] @@ -776,6 +782,32 @@ class OwnershipDeclaration(StripeObject): The user-agent string from the browser where the beneficial owner attestation was made. """ + class PhysicalAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: Optional[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: Optional[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + class PrincipalPlaceOfBusiness(StripeObject): city: Optional[str] """ @@ -918,6 +950,7 @@ class Document(StripeObject): """ The company's phone number (used for verification). """ + physical_address: Optional[PhysicalAddress] principal_place_of_business: Optional[PrincipalPlaceOfBusiness] registration_date: Optional[RegistrationDate] representative_declaration: Optional[RepresentativeDeclaration] @@ -980,6 +1013,7 @@ class Document(StripeObject): "administrative_address": AdministrativeAddress, "directorship_declaration": DirectorshipDeclaration, "ownership_declaration": OwnershipDeclaration, + "physical_address": PhysicalAddress, "principal_place_of_business": PrincipalPlaceOfBusiness, "registration_date": RegistrationDate, "representative_declaration": RepresentativeDeclaration, diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 2c5ae1d7c..59545a527 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -442,6 +442,17 @@ class Features(StripeObject): features: Features _inner_class_types = {"features": Features} + class ReportingChart(StripeObject): + class Features(StripeObject): + pass + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + class TaxRegistrations(StripeObject): class Features(StripeObject): pass @@ -464,6 +475,28 @@ class Features(StripeObject): features: Features _inner_class_types = {"features": Features} + class TerminalHardwareOrders(StripeObject): + class Features(StripeObject): + pass + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + + class TerminalHardwareShop(StripeObject): + class Features(StripeObject): + pass + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + account_management: AccountManagement account_onboarding: AccountOnboarding balance_report: BalanceReport @@ -484,8 +517,11 @@ class Features(StripeObject): payout_reconciliation_report: PayoutReconciliationReport payouts: Payouts payouts_list: PayoutsList + reporting_chart: ReportingChart tax_registrations: TaxRegistrations tax_settings: TaxSettings + terminal_hardware_orders: TerminalHardwareOrders + terminal_hardware_shop: TerminalHardwareShop _inner_class_types = { "account_management": AccountManagement, "account_onboarding": AccountOnboarding, @@ -507,8 +543,11 @@ class Features(StripeObject): "payout_reconciliation_report": PayoutReconciliationReport, "payouts": Payouts, "payouts_list": PayoutsList, + "reporting_chart": ReportingChart, "tax_registrations": TaxRegistrations, "tax_settings": TaxSettings, + "terminal_hardware_orders": TerminalHardwareOrders, + "terminal_hardware_shop": TerminalHardwareShop, } account: str diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index e94147c5e..6224c5e6d 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -417,10 +417,64 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data): code, ) # switchCases: The beginning of the section generated from our OpenAPI spec + elif type == "already_canceled": + return error.AlreadyCanceledError(**error_args) + elif type == "blocked_by_stripe": + return error.BlockedByStripeError(**error_args) + elif type == "cannot_proceed": + return error.CannotProceedError( + **error_args, + reason=error_data.get("reason"), + ) + elif type == "capability_not_enabled": + return error.CapabilityNotEnabledError(**error_args) + elif type == "controlled_by_alternate_resource": + return error.ControlledByAlternateResourceError(**error_args) + elif type == "feature_not_enabled": + return error.FeatureNotEnabledError(**error_args) + elif type == "financial_account_not_open": + return error.FinancialAccountNotOpenError(**error_args) + elif type == "fx_quote_needs_refresh": + return error.FxQuoteNeedsRefreshError(**error_args) + elif type == "insufficient_funds": + return error.InsufficientFundsError(**error_args) + elif type == "invalid_payment_method": + return error.InvalidPaymentMethodError( + **error_args, + invalid_param=error_data.get("invalid_param"), + ) + elif type == "invalid_payout_method": + return error.InvalidPayoutMethodError(**error_args) + elif type == "invalid_vaulted_credential": + return error.InvalidVaultedCredentialError( + **error_args, + invalid_param=error_data.get("invalid_param"), + ) + elif type == "not_cancelable": + return error.NotCancelableError(**error_args) + elif type == "quota_exceeded": + return error.QuotaExceededError(**error_args) elif type == "rate_limit": return error.RateLimitError(**error_args) + elif type == "recipient_not_notifiable": + return error.RecipientNotNotifiableError(**error_args) elif type == "temporary_session_expired": return error.TemporarySessionExpiredError(**error_args) + elif type == "verification_attempt_failed": + return error.VerificationAttemptFailedError( + **error_args, + verification_status=error_data.get("verification_status"), + ) + elif type == "verification_expired": + return error.VerificationExpiredError( + **error_args, + verification_status=error_data.get("verification_status"), + ) + elif type == "verification_not_initiated": + return error.VerificationNotInitiatedError( + **error_args, + verification_status=error_data.get("verification_status"), + ) # switchCases: The end of the section generated from our OpenAPI spec return self.specific_v1_api_error( diff --git a/stripe/_api_version.py b/stripe/_api_version.py index f07003b47..a1f3b968c 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2026-09-30.endive" + CURRENT = "2026-10-28.endive" CURRENT_MAJOR = "endive" diff --git a/stripe/_application_fee.py b/stripe/_application_fee.py index b8412b7d0..3b5e35560 100644 --- a/stripe/_application_fee.py +++ b/stripe/_application_fee.py @@ -40,6 +40,14 @@ @nested_resource_class_methods("refund") class ApplicationFee(ListableAPIResource["ApplicationFee"]): + """ + When you collect a transaction fee on top of a charge made for your user + (using [Connect](https://docs.stripe.com/connect)), an `Application Fee` object is created in + your account. You can list, retrieve, and refund application fees. + + Related guide: [Collecting application fees](https://docs.stripe.com/connect/direct-charges#collect-fees) + """ + OBJECT_NAME: ClassVar[Literal["application_fee"]] = "application_fee" class FeeSource(StripeObject): diff --git a/stripe/_card.py b/stripe/_card.py index f1398a00d..2af86d191 100644 --- a/stripe/_card.py +++ b/stripe/_card.py @@ -22,6 +22,8 @@ class Card(DeletableAPIResource["Card"], UpdateableAPIResource["Card"]): later. You can also store multiple debit cards on a recipient in order to transfer to those cards later. + This API is deprecated. Use the [PaymentMethods API](https://docs.stripe.com/api/payment_methods) instead. + Related guide: [Card payments with Sources](https://docs.stripe.com/sources/cards) """ @@ -34,6 +36,9 @@ class Networks(StripeObject): """ account: Optional[ExpandableField["Account"]] + """ + The account this card belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](https://docs.stripe.com/api/external_account_cards/object) where [controller.is_controller](https://docs.stripe.com/api/accounts/object#account_object-controller-is_controller) is `true`. + """ address_city: Optional[str] """ City/District/Suburb/Town/Village. diff --git a/stripe/_charge.py b/stripe/_charge.py index 9597ea161..792a1ae18 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -937,6 +937,18 @@ class ShippingAddress(StripeObject): """ Status of a card based on the card issuer. """ + setup_credential_usage: Optional[ + Union[Literal["installment", "recurring", "unscheduled"], str] + ] + """ + The payment_method_options.card.setup_credential_usage value that was passed when setup_future_usage was present at confirmation, one of `recurring`, `unscheduled`, or `installment` + """ + stored_credential_usage: Optional[ + Union[Literal["installment", "recurring", "unscheduled"], str] + ] + """ + The payment_method_options.card.stored_credential_usage value that was passed for an off session, merchant-initiated transaction. + """ three_d_secure: Optional[ThreeDSecure] """ Populated if this transaction used 3D Secure authentication. @@ -1183,6 +1195,7 @@ class Crypto(StripeObject): token_currency: Optional[ Union[ Literal[ + "ousd", "phantom_cash", "usdc", "usdg", diff --git a/stripe/_customer.py b/stripe/_customer.py index d871cb332..0967d69f5 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -1923,7 +1923,7 @@ def _cls_fund_cash_balance( **params: Unpack["CustomerFundCashBalanceParams"], ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", @@ -1942,7 +1942,7 @@ def fund_cash_balance( customer: str, /, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ ... @@ -1951,7 +1951,7 @@ def fund_cash_balance( self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ ... @@ -1960,7 +1960,7 @@ def fund_cash_balance( self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", @@ -1981,7 +1981,7 @@ async def _cls_fund_cash_balance_async( **params: Unpack["CustomerFundCashBalanceParams"], ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", @@ -2000,7 +2000,7 @@ async def fund_cash_balance_async( customer: str, /, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ ... @@ -2009,7 +2009,7 @@ async def fund_cash_balance_async( self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ ... @@ -2018,7 +2018,7 @@ async def fund_cash_balance_async( self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", diff --git a/stripe/_customer_cash_balance_transaction.py b/stripe/_customer_cash_balance_transaction.py index f144e71c4..851347047 100644 --- a/stripe/_customer_cash_balance_transaction.py +++ b/stripe/_customer_cash_balance_transaction.py @@ -86,7 +86,12 @@ class JpBankTransfer(StripeObject): class UsBankTransfer(StripeObject): network: Optional[ - Union[Literal["ach", "domestic_wire_us", "swift"], str] + Union[ + Literal[ + "ach", "domestic_wire_us", "fednow", "rtp", "swift" + ], + str, + ] ] """ The banking network used for this funding. diff --git a/stripe/_dispute.py b/stripe/_dispute.py index c42c6c512..2989110e4 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -34,6 +34,20 @@ class Dispute( OBJECT_NAME: ClassVar[Literal["dispute"]] = "dispute" class Evidence(StripeObject): + class Appeal(StripeObject): + class Card(StripeObject): + reason_for_filing: Optional[str] + """ + The reason for filing the appeal. + """ + supporting_files: Optional[List[str]] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `dispute_evidence` to support the appeal. + """ + + card: Optional[Card] + _inner_class_types = {"card": Card} + class EnhancedEvidence(StripeObject): class MastercardCompliance(StripeObject): fee_acknowledged: bool @@ -198,6 +212,10 @@ class VisaCompliance(StripeObject): """ Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. """ + appeal: Optional[Appeal] + """ + Appeal evidence submitted during the appeal stage. + """ billing_address: Optional[str] """ The billing address provided by the customer. @@ -303,7 +321,10 @@ class VisaCompliance(StripeObject): """ Any additional evidence or statements. """ - _inner_class_types = {"enhanced_evidence": EnhancedEvidence} + _inner_class_types = { + "appeal": Appeal, + "enhanced_evidence": EnhancedEvidence, + } class EvidenceDetails(StripeObject): class EnhancedEligibility(StripeObject): @@ -376,6 +397,12 @@ class VisaCompliance(StripeObject): """ The number of times evidence has been submitted. Typically, you may only submit evidence once. """ + submission_method: Union[ + Literal["manual", "not_submitted", "smart_disputes"], str + ] + """ + Whether the dispute was submitted manually, with Smart Disputes, or not submitted. + """ _inner_class_types = {"enhanced_eligibility": EnhancedEligibility} class PaymentMethodDetails(StripeObject): @@ -486,6 +513,17 @@ class Paypal(StripeObject): """ Unique identifier for the object. """ + intended_submission_method: Optional[ + Literal[ + "manual", + "prefer_manual", + "prefer_smart_disputes", + "smart_disputes", + ] + ] + """ + Intended submission method for the dispute. + """ is_charge_refundable: bool """ If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. @@ -517,6 +555,8 @@ class Paypal(StripeObject): """ status: Union[ Literal[ + "appeal_needs_response", + "appeal_under_review", "lost", "needs_response", "prevented", @@ -529,7 +569,7 @@ class Paypal(StripeObject): str, ] """ - The current status of a dispute. Possible values include:`warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, `lost`, or `prevented`. + The current status of a dispute. Possible values include:`warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `appeal_needs_response`, `appeal_under_review`, `won`, `lost`, or `prevented`. """ @classmethod diff --git a/stripe/_error.py b/stripe/_error.py index bcb8b8e1d..432a47076 100644 --- a/stripe/_error.py +++ b/stripe/_error.py @@ -214,8 +214,188 @@ def __init__(self, message, sig_header, http_body=None): # classDefinitions: The beginning of the section generated from our OpenAPI spec +class AlreadyCanceledError(StripeError): + pass + + +class BlockedByStripeError(StripeError): + pass + + +class CannotProceedError(StripeError): + def __init__( + self, + message=None, + http_body=None, + http_status=None, + json_body=None, + headers=None, + code=None, + reason=None, + ): + super().__init__( + message, + http_body, + http_status, + json_body, + headers, + code, + ) + self.reason = reason + + +class CapabilityNotEnabledError(StripeError): + pass + + +class ControlledByAlternateResourceError(StripeError): + pass + + +class FeatureNotEnabledError(StripeError): + pass + + +class FinancialAccountNotOpenError(StripeError): + pass + + +class FxQuoteNeedsRefreshError(StripeError): + pass + + +class InsufficientFundsError(StripeError): + pass + + +class InvalidPaymentMethodError(StripeError): + def __init__( + self, + message=None, + http_body=None, + http_status=None, + json_body=None, + headers=None, + code=None, + invalid_param=None, + ): + super().__init__( + message, + http_body, + http_status, + json_body, + headers, + code, + ) + self.invalid_param = invalid_param + + +class InvalidPayoutMethodError(StripeError): + pass + + +class InvalidVaultedCredentialError(StripeError): + def __init__( + self, + message=None, + http_body=None, + http_status=None, + json_body=None, + headers=None, + code=None, + invalid_param=None, + ): + super().__init__( + message, + http_body, + http_status, + json_body, + headers, + code, + ) + self.invalid_param = invalid_param + + +class NotCancelableError(StripeError): + pass + + +class QuotaExceededError(StripeError): + pass + + +class RecipientNotNotifiableError(StripeError): + pass + + class TemporarySessionExpiredError(StripeError): pass +class VerificationAttemptFailedError(StripeError): + def __init__( + self, + message=None, + http_body=None, + http_status=None, + json_body=None, + headers=None, + code=None, + verification_status=None, + ): + super().__init__( + message, + http_body, + http_status, + json_body, + headers, + code, + ) + self.verification_status = verification_status + + +class VerificationExpiredError(StripeError): + def __init__( + self, + message=None, + http_body=None, + http_status=None, + json_body=None, + headers=None, + code=None, + verification_status=None, + ): + super().__init__( + message, + http_body, + http_status, + json_body, + headers, + code, + ) + self.verification_status = verification_status + + +class VerificationNotInitiatedError(StripeError): + def __init__( + self, + message=None, + http_body=None, + http_status=None, + json_body=None, + headers=None, + code=None, + verification_status=None, + ): + super().__init__( + message, + http_body, + http_status, + json_body, + headers, + code, + ) + self.verification_status = verification_status + + # classDefinitions: The end of the section generated from our OpenAPI spec diff --git a/stripe/_event.py b/stripe/_event.py index 9cfbf5e6b..cd7a81189 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -323,6 +323,13 @@ class Request(StripeObject): "test_helpers.test_clock.deleted", "test_helpers.test_clock.internal_failure", "test_helpers.test_clock.ready", + "three_d_secure.authentication.canceled", + "three_d_secure.authentication.challenge_started", + "three_d_secure.authentication.errored", + "three_d_secure.authentication.failed", + "three_d_secure.authentication.requires_challenge", + "three_d_secure.authentication.requires_submission", + "three_d_secure.authentication.succeeded", "topup.canceled", "topup.created", "topup.failed", diff --git a/stripe/_event_notification_handler.py b/stripe/_event_notification_handler.py index 9988213f8..7866ab3db 100644 --- a/stripe/_event_notification_handler.py +++ b/stripe/_event_notification_handler.py @@ -222,15 +222,51 @@ from stripe.events._v1_customer_discount_deleted_event import ( V1CustomerDiscountDeletedEventNotification, ) + from stripe.events._v1_customer_discount_source_changed_event import ( + V1CustomerDiscountSourceChangedEventNotification, + ) from stripe.events._v1_customer_discount_updated_event import ( V1CustomerDiscountUpdatedEventNotification, ) + from stripe.events._v1_customer_subscription_active_event import ( + V1CustomerSubscriptionActiveEventNotification, + ) + from stripe.events._v1_customer_subscription_cancel_at_changed_event import ( + V1CustomerSubscriptionCancelAtChangedEventNotification, + ) from stripe.events._v1_customer_subscription_created_event import ( V1CustomerSubscriptionCreatedEventNotification, ) + from stripe.events._v1_customer_subscription_default_payment_method_changed_event import ( + V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification, + ) from stripe.events._v1_customer_subscription_deleted_event import ( V1CustomerSubscriptionDeletedEventNotification, ) + from stripe.events._v1_customer_subscription_incomplete_event import ( + V1CustomerSubscriptionIncompleteEventNotification, + ) + from stripe.events._v1_customer_subscription_incomplete_expired_event import ( + V1CustomerSubscriptionIncompleteExpiredEventNotification, + ) + from stripe.events._v1_customer_subscription_item_added_event import ( + V1CustomerSubscriptionItemAddedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_price_changed_event import ( + V1CustomerSubscriptionItemPriceChangedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_quantity_changed_event import ( + V1CustomerSubscriptionItemQuantityChangedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_removed_event import ( + V1CustomerSubscriptionItemRemovedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_tax_rates_changed_event import ( + V1CustomerSubscriptionItemTaxRatesChangedEventNotification, + ) + from stripe.events._v1_customer_subscription_past_due_event import ( + V1CustomerSubscriptionPastDueEventNotification, + ) from stripe.events._v1_customer_subscription_paused_event import ( V1CustomerSubscriptionPausedEventNotification, ) @@ -243,9 +279,15 @@ from stripe.events._v1_customer_subscription_resumed_event import ( V1CustomerSubscriptionResumedEventNotification, ) + from stripe.events._v1_customer_subscription_trialing_event import ( + V1CustomerSubscriptionTrialingEventNotification, + ) from stripe.events._v1_customer_subscription_trial_will_end_event import ( V1CustomerSubscriptionTrialWillEndEventNotification, ) + from stripe.events._v1_customer_subscription_unpaid_event import ( + V1CustomerSubscriptionUnpaidEventNotification, + ) from stripe.events._v1_customer_subscription_updated_event import ( V1CustomerSubscriptionUpdatedEventNotification, ) @@ -261,6 +303,12 @@ from stripe.events._v1_customer_updated_event import ( V1CustomerUpdatedEventNotification, ) + from stripe.events._v1_entitlements_active_entitlement_summary_entitlement_added_event import ( + V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification, + ) + from stripe.events._v1_entitlements_active_entitlement_summary_entitlement_removed_event import ( + V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification, + ) from stripe.events._v1_entitlements_active_entitlement_summary_updated_event import ( V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification, ) @@ -270,6 +318,12 @@ from stripe.events._v1_financial_connections_account_account_numbers_updated_event import ( V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification, ) + from stripe.events._v1_financial_connections_account_balance_refresh_failed_event import ( + V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_balance_refresh_succeeded_event import ( + V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_created_event import ( V1FinancialConnectionsAccountCreatedEventNotification, ) @@ -282,6 +336,18 @@ from stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event import ( V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification, ) + from stripe.events._v1_financial_connections_account_inferred_balances_refresh_failed_event import ( + V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_inferred_balances_refresh_succeeded_event import ( + V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification, + ) + from stripe.events._v1_financial_connections_account_ownership_refresh_failed_event import ( + V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_ownership_refresh_succeeded_event import ( + V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_reactivated_event import ( V1FinancialConnectionsAccountReactivatedEventNotification, ) @@ -294,9 +360,21 @@ from stripe.events._v1_financial_connections_account_refreshed_transactions_event import ( V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, ) + from stripe.events._v1_financial_connections_account_risk_intelligence_refresh_failed_event import ( + V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_risk_intelligence_refresh_succeeded_event import ( + V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event import ( V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification, ) + from stripe.events._v1_financial_connections_account_transactions_refresh_failed_event import ( + V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_transactions_refresh_succeeded_event import ( + V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event import ( V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification, ) @@ -327,18 +405,45 @@ from stripe.events._v1_invoice_deleted_event import ( V1InvoiceDeletedEventNotification, ) + from stripe.events._v1_invoice_discount_added_event import ( + V1InvoiceDiscountAddedEventNotification, + ) + from stripe.events._v1_invoice_discount_removed_event import ( + V1InvoiceDiscountRemovedEventNotification, + ) from stripe.events._v1_invoice_finalization_failed_event import ( V1InvoiceFinalizationFailedEventNotification, ) from stripe.events._v1_invoice_finalized_event import ( V1InvoiceFinalizedEventNotification, ) + from stripe.events._v1_invoiceitem_amount_changed_event import ( + V1InvoiceitemAmountChangedEventNotification, + ) from stripe.events._v1_invoiceitem_created_event import ( V1InvoiceitemCreatedEventNotification, ) from stripe.events._v1_invoiceitem_deleted_event import ( V1InvoiceitemDeletedEventNotification, ) + from stripe.events._v1_invoiceitem_discount_added_event import ( + V1InvoiceitemDiscountAddedEventNotification, + ) + from stripe.events._v1_invoiceitem_discount_removed_event import ( + V1InvoiceitemDiscountRemovedEventNotification, + ) + from stripe.events._v1_invoice_line_item_added_event import ( + V1InvoiceLineItemAddedEventNotification, + ) + from stripe.events._v1_invoice_line_item_pricing_changed_event import ( + V1InvoiceLineItemPricingChangedEventNotification, + ) + from stripe.events._v1_invoice_line_item_quantity_changed_event import ( + V1InvoiceLineItemQuantityChangedEventNotification, + ) + from stripe.events._v1_invoice_line_item_removed_event import ( + V1InvoiceLineItemRemovedEventNotification, + ) from stripe.events._v1_invoice_marked_uncollectible_event import ( V1InvoiceMarkedUncollectibleEventNotification, ) @@ -357,9 +462,15 @@ from stripe.events._v1_invoice_payment_attempt_required_event import ( V1InvoicePaymentAttemptRequiredEventNotification, ) + from stripe.events._v1_invoice_payment_canceled_event import ( + V1InvoicePaymentCanceledEventNotification, + ) from stripe.events._v1_invoice_payment_failed_event import ( V1InvoicePaymentFailedEventNotification, ) + from stripe.events._v1_invoice_payment_open_event import ( + V1InvoicePaymentOpenEventNotification, + ) from stripe.events._v1_invoice_payment_paid_event import ( V1InvoicePaymentPaidEventNotification, ) @@ -528,27 +639,54 @@ from stripe.events._v1_plan_updated_event import ( V1PlanUpdatedEventNotification, ) + from stripe.events._v1_price_activated_event import ( + V1PriceActivatedEventNotification, + ) from stripe.events._v1_price_created_event import ( V1PriceCreatedEventNotification, ) + from stripe.events._v1_price_deactivated_event import ( + V1PriceDeactivatedEventNotification, + ) from stripe.events._v1_price_deleted_event import ( V1PriceDeletedEventNotification, ) + from stripe.events._v1_price_lookup_key_changed_event import ( + V1PriceLookupKeyChangedEventNotification, + ) + from stripe.events._v1_price_tax_behavior_changed_event import ( + V1PriceTaxBehaviorChangedEventNotification, + ) from stripe.events._v1_price_updated_event import ( V1PriceUpdatedEventNotification, ) + from stripe.events._v1_product_activated_event import ( + V1ProductActivatedEventNotification, + ) from stripe.events._v1_product_created_event import ( V1ProductCreatedEventNotification, ) + from stripe.events._v1_product_deactivated_event import ( + V1ProductDeactivatedEventNotification, + ) + from stripe.events._v1_product_default_price_changed_event import ( + V1ProductDefaultPriceChangedEventNotification, + ) from stripe.events._v1_product_deleted_event import ( V1ProductDeletedEventNotification, ) + from stripe.events._v1_product_tax_code_changed_event import ( + V1ProductTaxCodeChangedEventNotification, + ) from stripe.events._v1_product_updated_event import ( V1ProductUpdatedEventNotification, ) from stripe.events._v1_promotion_code_created_event import ( V1PromotionCodeCreatedEventNotification, ) + from stripe.events._v1_promotion_code_fully_redeemed_event import ( + V1PromotionCodeFullyRedeemedEventNotification, + ) from stripe.events._v1_promotion_code_updated_event import ( V1PromotionCodeUpdatedEventNotification, ) @@ -630,6 +768,21 @@ from stripe.events._v1_subscription_schedule_expiring_event import ( V1SubscriptionScheduleExpiringEventNotification, ) + from stripe.events._v1_subscription_schedule_phase_added_event import ( + V1SubscriptionSchedulePhaseAddedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_default_tax_rates_changed_event import ( + V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_end_date_changed_event import ( + V1SubscriptionSchedulePhaseEndDateChangedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_removed_event import ( + V1SubscriptionSchedulePhaseRemovedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_trial_end_changed_event import ( + V1SubscriptionSchedulePhaseTrialEndChangedEventNotification, + ) from stripe.events._v1_subscription_schedule_released_event import ( V1SubscriptionScheduleReleasedEventNotification, ) @@ -759,6 +912,111 @@ from stripe.events._v2_core_event_destination_ping_event import ( V2CoreEventDestinationPingEventNotification, ) + from stripe.events._v2_money_management_adjustment_created_event import ( + V2MoneyManagementAdjustmentCreatedEventNotification, + ) + from stripe.events._v2_money_management_financial_account_created_event import ( + V2MoneyManagementFinancialAccountCreatedEventNotification, + ) + from stripe.events._v2_money_management_financial_account_updated_event import ( + V2MoneyManagementFinancialAccountUpdatedEventNotification, + ) + from stripe.events._v2_money_management_financial_address_activated_event import ( + V2MoneyManagementFinancialAddressActivatedEventNotification, + ) + from stripe.events._v2_money_management_financial_address_failed_event import ( + V2MoneyManagementFinancialAddressFailedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_available_event import ( + V2MoneyManagementInboundTransferAvailableEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_failed_event import ( + V2MoneyManagementInboundTransferBankDebitFailedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_processing_event import ( + V2MoneyManagementInboundTransferBankDebitProcessingEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_queued_event import ( + V2MoneyManagementInboundTransferBankDebitQueuedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_returned_event import ( + V2MoneyManagementInboundTransferBankDebitReturnedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_succeeded_event import ( + V2MoneyManagementInboundTransferBankDebitSucceededEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_canceled_event import ( + V2MoneyManagementOutboundPaymentCanceledEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_created_event import ( + V2MoneyManagementOutboundPaymentCreatedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_failed_event import ( + V2MoneyManagementOutboundPaymentFailedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_posted_event import ( + V2MoneyManagementOutboundPaymentPostedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_returned_event import ( + V2MoneyManagementOutboundPaymentReturnedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_under_review_event import ( + V2MoneyManagementOutboundPaymentUnderReviewEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_updated_event import ( + V2MoneyManagementOutboundPaymentUpdatedEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_canceled_event import ( + V2MoneyManagementPayoutIntentCanceledEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_created_event import ( + V2MoneyManagementPayoutIntentCreatedEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_pending_event import ( + V2MoneyManagementPayoutIntentPendingEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_posted_event import ( + V2MoneyManagementPayoutIntentPostedEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_processing_event import ( + V2MoneyManagementPayoutIntentProcessingEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_requires_action_event import ( + V2MoneyManagementPayoutIntentRequiresActionEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_updated_event import ( + V2MoneyManagementPayoutIntentUpdatedEventNotification, + ) + from stripe.events._v2_money_management_payout_method_created_event import ( + V2MoneyManagementPayoutMethodCreatedEventNotification, + ) + from stripe.events._v2_money_management_payout_method_updated_event import ( + V2MoneyManagementPayoutMethodUpdatedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_available_event import ( + V2MoneyManagementReceivedCreditAvailableEventNotification, + ) + from stripe.events._v2_money_management_received_credit_failed_event import ( + V2MoneyManagementReceivedCreditFailedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_returned_event import ( + V2MoneyManagementReceivedCreditReturnedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_succeeded_event import ( + V2MoneyManagementReceivedCreditSucceededEventNotification, + ) + from stripe.events._v2_money_management_recipient_verification_created_event import ( + V2MoneyManagementRecipientVerificationCreatedEventNotification, + ) + from stripe.events._v2_money_management_recipient_verification_updated_event import ( + V2MoneyManagementRecipientVerificationUpdatedEventNotification, + ) + from stripe.events._v2_money_management_transaction_created_event import ( + V2MoneyManagementTransactionCreatedEventNotification, + ) + from stripe.events._v2_money_management_transaction_updated_event import ( + V2MoneyManagementTransactionUpdatedEventNotification, + ) # event-notification-types: The end of the section generated from our OpenAPI spec # internal type to represent any EventNotification subclass @@ -1688,6 +1946,19 @@ def on_v1_customer_discount_deleted( ) return func + def on_v1_customer_discount_source_changed( + self, + func: "Callable[[V1CustomerDiscountSourceChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerDiscountSourceChangedEvent` (`v1.customer.discount.source_changed`) event notification. + """ + self._register( + "v1.customer.discount.source_changed", + func, + ) + return func + def on_v1_customer_discount_updated( self, func: "Callable[[V1CustomerDiscountUpdatedEventNotification, StripeClient], CallbackReturn]", @@ -1701,6 +1972,32 @@ def on_v1_customer_discount_updated( ) return func + def on_v1_customer_subscription_active( + self, + func: "Callable[[V1CustomerSubscriptionActiveEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionActiveEvent` (`v1.customer.subscription.active`) event notification. + """ + self._register( + "v1.customer.subscription.active", + func, + ) + return func + + def on_v1_customer_subscription_cancel_at_changed( + self, + func: "Callable[[V1CustomerSubscriptionCancelAtChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionCancelAtChangedEvent` (`v1.customer.subscription.cancel_at_changed`) event notification. + """ + self._register( + "v1.customer.subscription.cancel_at_changed", + func, + ) + return func + def on_v1_customer_subscription_created( self, func: "Callable[[V1CustomerSubscriptionCreatedEventNotification, StripeClient], CallbackReturn]", @@ -1714,6 +2011,19 @@ def on_v1_customer_subscription_created( ) return func + def on_v1_customer_subscription_default_payment_method_changed( + self, + func: "Callable[[V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionDefaultPaymentMethodChangedEvent` (`v1.customer.subscription.default_payment_method_changed`) event notification. + """ + self._register( + "v1.customer.subscription.default_payment_method_changed", + func, + ) + return func + def on_v1_customer_subscription_deleted( self, func: "Callable[[V1CustomerSubscriptionDeletedEventNotification, StripeClient], CallbackReturn]", @@ -1727,6 +2037,110 @@ def on_v1_customer_subscription_deleted( ) return func + def on_v1_customer_subscription_incomplete( + self, + func: "Callable[[V1CustomerSubscriptionIncompleteEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionIncompleteEvent` (`v1.customer.subscription.incomplete`) event notification. + """ + self._register( + "v1.customer.subscription.incomplete", + func, + ) + return func + + def on_v1_customer_subscription_incomplete_expired( + self, + func: "Callable[[V1CustomerSubscriptionIncompleteExpiredEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionIncompleteExpiredEvent` (`v1.customer.subscription.incomplete_expired`) event notification. + """ + self._register( + "v1.customer.subscription.incomplete_expired", + func, + ) + return func + + def on_v1_customer_subscription_item_added( + self, + func: "Callable[[V1CustomerSubscriptionItemAddedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionItemAddedEvent` (`v1.customer.subscription.item_added`) event notification. + """ + self._register( + "v1.customer.subscription.item_added", + func, + ) + return func + + def on_v1_customer_subscription_item_price_changed( + self, + func: "Callable[[V1CustomerSubscriptionItemPriceChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionItemPriceChangedEvent` (`v1.customer.subscription.item_price_changed`) event notification. + """ + self._register( + "v1.customer.subscription.item_price_changed", + func, + ) + return func + + def on_v1_customer_subscription_item_quantity_changed( + self, + func: "Callable[[V1CustomerSubscriptionItemQuantityChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionItemQuantityChangedEvent` (`v1.customer.subscription.item_quantity_changed`) event notification. + """ + self._register( + "v1.customer.subscription.item_quantity_changed", + func, + ) + return func + + def on_v1_customer_subscription_item_removed( + self, + func: "Callable[[V1CustomerSubscriptionItemRemovedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionItemRemovedEvent` (`v1.customer.subscription.item_removed`) event notification. + """ + self._register( + "v1.customer.subscription.item_removed", + func, + ) + return func + + def on_v1_customer_subscription_item_tax_rates_changed( + self, + func: "Callable[[V1CustomerSubscriptionItemTaxRatesChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionItemTaxRatesChangedEvent` (`v1.customer.subscription.item_tax_rates_changed`) event notification. + """ + self._register( + "v1.customer.subscription.item_tax_rates_changed", + func, + ) + return func + + def on_v1_customer_subscription_past_due( + self, + func: "Callable[[V1CustomerSubscriptionPastDueEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionPastDueEvent` (`v1.customer.subscription.past_due`) event notification. + """ + self._register( + "v1.customer.subscription.past_due", + func, + ) + return func + def on_v1_customer_subscription_paused( self, func: "Callable[[V1CustomerSubscriptionPausedEventNotification, StripeClient], CallbackReturn]", @@ -1779,6 +2193,19 @@ def on_v1_customer_subscription_resumed( ) return func + def on_v1_customer_subscription_trialing( + self, + func: "Callable[[V1CustomerSubscriptionTrialingEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionTrialingEvent` (`v1.customer.subscription.trialing`) event notification. + """ + self._register( + "v1.customer.subscription.trialing", + func, + ) + return func + def on_v1_customer_subscription_trial_will_end( self, func: "Callable[[V1CustomerSubscriptionTrialWillEndEventNotification, StripeClient], CallbackReturn]", @@ -1792,6 +2219,19 @@ def on_v1_customer_subscription_trial_will_end( ) return func + def on_v1_customer_subscription_unpaid( + self, + func: "Callable[[V1CustomerSubscriptionUnpaidEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1CustomerSubscriptionUnpaidEvent` (`v1.customer.subscription.unpaid`) event notification. + """ + self._register( + "v1.customer.subscription.unpaid", + func, + ) + return func + def on_v1_customer_subscription_updated( self, func: "Callable[[V1CustomerSubscriptionUpdatedEventNotification, StripeClient], CallbackReturn]", @@ -1857,6 +2297,32 @@ def on_v1_customer_updated( ) return func + def on_v1_entitlements_active_entitlement_summary_entitlement_added( + self, + func: "Callable[[V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent` (`v1.entitlements.active_entitlement_summary.entitlement_added`) event notification. + """ + self._register( + "v1.entitlements.active_entitlement_summary.entitlement_added", + func, + ) + return func + + def on_v1_entitlements_active_entitlement_summary_entitlement_removed( + self, + func: "Callable[[V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent` (`v1.entitlements.active_entitlement_summary.entitlement_removed`) event notification. + """ + self._register( + "v1.entitlements.active_entitlement_summary.entitlement_removed", + func, + ) + return func + def on_v1_entitlements_active_entitlement_summary_updated( self, func: "Callable[[V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification, StripeClient], CallbackReturn]", @@ -1896,6 +2362,32 @@ def on_v1_financial_connections_account_account_numbers_updated( ) return func + def on_v1_financial_connections_account_balance_refresh_failed( + self, + func: "Callable[[V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountBalanceRefreshFailedEvent` (`v1.financial_connections.account.balance_refresh_failed`) event notification. + """ + self._register( + "v1.financial_connections.account.balance_refresh_failed", + func, + ) + return func + + def on_v1_financial_connections_account_balance_refresh_succeeded( + self, + func: "Callable[[V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountBalanceRefreshSucceededEvent` (`v1.financial_connections.account.balance_refresh_succeeded`) event notification. + """ + self._register( + "v1.financial_connections.account.balance_refresh_succeeded", + func, + ) + return func + def on_v1_financial_connections_account_created( self, func: "Callable[[V1FinancialConnectionsAccountCreatedEventNotification, StripeClient], CallbackReturn]", @@ -1948,28 +2440,80 @@ def on_v1_financial_connections_account_expected_deactivation_date_updated( ) return func - def on_v1_financial_connections_account_reactivated( + def on_v1_financial_connections_account_inferred_balances_refresh_failed( self, - func: "Callable[[V1FinancialConnectionsAccountReactivatedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1FinancialConnectionsAccountReactivatedEvent` (`v1.financial_connections.account.reactivated`) event notification. + Registers a callback for the `V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent` (`v1.financial_connections.account.inferred_balances_refresh_failed`) event notification. """ self._register( - "v1.financial_connections.account.reactivated", + "v1.financial_connections.account.inferred_balances_refresh_failed", func, ) return func - def on_v1_financial_connections_account_refreshed_balance( + def on_v1_financial_connections_account_inferred_balances_refresh_succeeded( self, - func: "Callable[[V1FinancialConnectionsAccountRefreshedBalanceEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1FinancialConnectionsAccountRefreshedBalanceEvent` (`v1.financial_connections.account.refreshed_balance`) event notification. + Registers a callback for the `V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent` (`v1.financial_connections.account.inferred_balances_refresh_succeeded`) event notification. """ self._register( - "v1.financial_connections.account.refreshed_balance", + "v1.financial_connections.account.inferred_balances_refresh_succeeded", + func, + ) + return func + + def on_v1_financial_connections_account_ownership_refresh_failed( + self, + func: "Callable[[V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountOwnershipRefreshFailedEvent` (`v1.financial_connections.account.ownership_refresh_failed`) event notification. + """ + self._register( + "v1.financial_connections.account.ownership_refresh_failed", + func, + ) + return func + + def on_v1_financial_connections_account_ownership_refresh_succeeded( + self, + func: "Callable[[V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent` (`v1.financial_connections.account.ownership_refresh_succeeded`) event notification. + """ + self._register( + "v1.financial_connections.account.ownership_refresh_succeeded", + func, + ) + return func + + def on_v1_financial_connections_account_reactivated( + self, + func: "Callable[[V1FinancialConnectionsAccountReactivatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountReactivatedEvent` (`v1.financial_connections.account.reactivated`) event notification. + """ + self._register( + "v1.financial_connections.account.reactivated", + func, + ) + return func + + def on_v1_financial_connections_account_refreshed_balance( + self, + func: "Callable[[V1FinancialConnectionsAccountRefreshedBalanceEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountRefreshedBalanceEvent` (`v1.financial_connections.account.refreshed_balance`) event notification. + """ + self._register( + "v1.financial_connections.account.refreshed_balance", func, ) return func @@ -2000,6 +2544,32 @@ def on_v1_financial_connections_account_refreshed_transactions( ) return func + def on_v1_financial_connections_account_risk_intelligence_refresh_failed( + self, + func: "Callable[[V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent` (`v1.financial_connections.account.risk_intelligence_refresh_failed`) event notification. + """ + self._register( + "v1.financial_connections.account.risk_intelligence_refresh_failed", + func, + ) + return func + + def on_v1_financial_connections_account_risk_intelligence_refresh_succeeded( + self, + func: "Callable[[V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent` (`v1.financial_connections.account.risk_intelligence_refresh_succeeded`) event notification. + """ + self._register( + "v1.financial_connections.account.risk_intelligence_refresh_succeeded", + func, + ) + return func + def on_v1_financial_connections_account_supported_payment_method_types_updated( self, func: "Callable[[V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification, StripeClient], CallbackReturn]", @@ -2013,6 +2583,32 @@ def on_v1_financial_connections_account_supported_payment_method_types_updated( ) return func + def on_v1_financial_connections_account_transactions_refresh_failed( + self, + func: "Callable[[V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountTransactionsRefreshFailedEvent` (`v1.financial_connections.account.transactions_refresh_failed`) event notification. + """ + self._register( + "v1.financial_connections.account.transactions_refresh_failed", + func, + ) + return func + + def on_v1_financial_connections_account_transactions_refresh_succeeded( + self, + func: "Callable[[V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent` (`v1.financial_connections.account.transactions_refresh_succeeded`) event notification. + """ + self._register( + "v1.financial_connections.account.transactions_refresh_succeeded", + func, + ) + return func + def on_v1_financial_connections_account_upcoming_account_number_expiry( self, func: "Callable[[V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification, StripeClient], CallbackReturn]", @@ -2143,6 +2739,32 @@ def on_v1_invoice_deleted( ) return func + def on_v1_invoice_discount_added( + self, + func: "Callable[[V1InvoiceDiscountAddedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceDiscountAddedEvent` (`v1.invoice.discount_added`) event notification. + """ + self._register( + "v1.invoice.discount_added", + func, + ) + return func + + def on_v1_invoice_discount_removed( + self, + func: "Callable[[V1InvoiceDiscountRemovedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceDiscountRemovedEvent` (`v1.invoice.discount_removed`) event notification. + """ + self._register( + "v1.invoice.discount_removed", + func, + ) + return func + def on_v1_invoice_finalization_failed( self, func: "Callable[[V1InvoiceFinalizationFailedEventNotification, StripeClient], CallbackReturn]", @@ -2169,6 +2791,19 @@ def on_v1_invoice_finalized( ) return func + def on_v1_invoiceitem_amount_changed( + self, + func: "Callable[[V1InvoiceitemAmountChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceitemAmountChangedEvent` (`v1.invoiceitem.amount_changed`) event notification. + """ + self._register( + "v1.invoiceitem.amount_changed", + func, + ) + return func + def on_v1_invoiceitem_created( self, func: "Callable[[V1InvoiceitemCreatedEventNotification, StripeClient], CallbackReturn]", @@ -2195,6 +2830,84 @@ def on_v1_invoiceitem_deleted( ) return func + def on_v1_invoiceitem_discount_added( + self, + func: "Callable[[V1InvoiceitemDiscountAddedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceitemDiscountAddedEvent` (`v1.invoiceitem.discount_added`) event notification. + """ + self._register( + "v1.invoiceitem.discount_added", + func, + ) + return func + + def on_v1_invoiceitem_discount_removed( + self, + func: "Callable[[V1InvoiceitemDiscountRemovedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceitemDiscountRemovedEvent` (`v1.invoiceitem.discount_removed`) event notification. + """ + self._register( + "v1.invoiceitem.discount_removed", + func, + ) + return func + + def on_v1_invoice_line_item_added( + self, + func: "Callable[[V1InvoiceLineItemAddedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceLineItemAddedEvent` (`v1.invoice.line_item_added`) event notification. + """ + self._register( + "v1.invoice.line_item_added", + func, + ) + return func + + def on_v1_invoice_line_item_pricing_changed( + self, + func: "Callable[[V1InvoiceLineItemPricingChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceLineItemPricingChangedEvent` (`v1.invoice.line_item_pricing_changed`) event notification. + """ + self._register( + "v1.invoice.line_item_pricing_changed", + func, + ) + return func + + def on_v1_invoice_line_item_quantity_changed( + self, + func: "Callable[[V1InvoiceLineItemQuantityChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceLineItemQuantityChangedEvent` (`v1.invoice.line_item_quantity_changed`) event notification. + """ + self._register( + "v1.invoice.line_item_quantity_changed", + func, + ) + return func + + def on_v1_invoice_line_item_removed( + self, + func: "Callable[[V1InvoiceLineItemRemovedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoiceLineItemRemovedEvent` (`v1.invoice.line_item_removed`) event notification. + """ + self._register( + "v1.invoice.line_item_removed", + func, + ) + return func + def on_v1_invoice_marked_uncollectible( self, func: "Callable[[V1InvoiceMarkedUncollectibleEventNotification, StripeClient], CallbackReturn]", @@ -2273,6 +2986,19 @@ def on_v1_invoice_payment_attempt_required( ) return func + def on_v1_invoice_payment_canceled( + self, + func: "Callable[[V1InvoicePaymentCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoicePaymentCanceledEvent` (`v1.invoice_payment.canceled`) event notification. + """ + self._register( + "v1.invoice_payment.canceled", + func, + ) + return func + def on_v1_invoice_payment_failed( self, func: "Callable[[V1InvoicePaymentFailedEventNotification, StripeClient], CallbackReturn]", @@ -2286,6 +3012,19 @@ def on_v1_invoice_payment_failed( ) return func + def on_v1_invoice_payment_open( + self, + func: "Callable[[V1InvoicePaymentOpenEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1InvoicePaymentOpenEvent` (`v1.invoice_payment.open`) event notification. + """ + self._register( + "v1.invoice_payment.open", + func, + ) + return func + def on_v1_invoice_payment_paid( self, func: "Callable[[V1InvoicePaymentPaidEventNotification, StripeClient], CallbackReturn]", @@ -3014,6 +3753,19 @@ def on_v1_plan_updated( ) return func + def on_v1_price_activated( + self, + func: "Callable[[V1PriceActivatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PriceActivatedEvent` (`v1.price.activated`) event notification. + """ + self._register( + "v1.price.activated", + func, + ) + return func + def on_v1_price_created( self, func: "Callable[[V1PriceCreatedEventNotification, StripeClient], CallbackReturn]", @@ -3027,158 +3779,262 @@ def on_v1_price_created( ) return func - def on_v1_price_deleted( + def on_v1_price_deactivated( self, - func: "Callable[[V1PriceDeletedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1PriceDeactivatedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1PriceDeletedEvent` (`v1.price.deleted`) event notification. + Registers a callback for the `V1PriceDeactivatedEvent` (`v1.price.deactivated`) event notification. """ self._register( - "v1.price.deleted", + "v1.price.deactivated", func, ) return func - def on_v1_price_updated( + def on_v1_price_deleted( self, - func: "Callable[[V1PriceUpdatedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1PriceDeletedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1PriceUpdatedEvent` (`v1.price.updated`) event notification. + Registers a callback for the `V1PriceDeletedEvent` (`v1.price.deleted`) event notification. """ self._register( - "v1.price.updated", + "v1.price.deleted", func, ) return func - def on_v1_product_created( + def on_v1_price_lookup_key_changed( self, - func: "Callable[[V1ProductCreatedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1PriceLookupKeyChangedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1ProductCreatedEvent` (`v1.product.created`) event notification. + Registers a callback for the `V1PriceLookupKeyChangedEvent` (`v1.price.lookup_key_changed`) event notification. """ self._register( - "v1.product.created", + "v1.price.lookup_key_changed", func, ) return func - def on_v1_product_deleted( + def on_v1_price_tax_behavior_changed( self, - func: "Callable[[V1ProductDeletedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1PriceTaxBehaviorChangedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1ProductDeletedEvent` (`v1.product.deleted`) event notification. + Registers a callback for the `V1PriceTaxBehaviorChangedEvent` (`v1.price.tax_behavior_changed`) event notification. """ self._register( - "v1.product.deleted", + "v1.price.tax_behavior_changed", func, ) return func - def on_v1_product_updated( + def on_v1_price_updated( self, - func: "Callable[[V1ProductUpdatedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1PriceUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1ProductUpdatedEvent` (`v1.product.updated`) event notification. + Registers a callback for the `V1PriceUpdatedEvent` (`v1.price.updated`) event notification. """ self._register( - "v1.product.updated", + "v1.price.updated", func, ) return func - def on_v1_promotion_code_created( + def on_v1_product_activated( self, - func: "Callable[[V1PromotionCodeCreatedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1ProductActivatedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1PromotionCodeCreatedEvent` (`v1.promotion_code.created`) event notification. + Registers a callback for the `V1ProductActivatedEvent` (`v1.product.activated`) event notification. """ self._register( - "v1.promotion_code.created", + "v1.product.activated", func, ) return func - def on_v1_promotion_code_updated( + def on_v1_product_created( self, - func: "Callable[[V1PromotionCodeUpdatedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1ProductCreatedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1PromotionCodeUpdatedEvent` (`v1.promotion_code.updated`) event notification. + Registers a callback for the `V1ProductCreatedEvent` (`v1.product.created`) event notification. """ self._register( - "v1.promotion_code.updated", + "v1.product.created", func, ) return func - def on_v1_quote_accepted( + def on_v1_product_deactivated( self, - func: "Callable[[V1QuoteAcceptedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1ProductDeactivatedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1QuoteAcceptedEvent` (`v1.quote.accepted`) event notification. + Registers a callback for the `V1ProductDeactivatedEvent` (`v1.product.deactivated`) event notification. """ self._register( - "v1.quote.accepted", + "v1.product.deactivated", func, ) return func - def on_v1_quote_canceled( + def on_v1_product_default_price_changed( self, - func: "Callable[[V1QuoteCanceledEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1ProductDefaultPriceChangedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1QuoteCanceledEvent` (`v1.quote.canceled`) event notification. + Registers a callback for the `V1ProductDefaultPriceChangedEvent` (`v1.product.default_price_changed`) event notification. """ self._register( - "v1.quote.canceled", + "v1.product.default_price_changed", func, ) return func - def on_v1_quote_created( + def on_v1_product_deleted( self, - func: "Callable[[V1QuoteCreatedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1ProductDeletedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1QuoteCreatedEvent` (`v1.quote.created`) event notification. + Registers a callback for the `V1ProductDeletedEvent` (`v1.product.deleted`) event notification. """ self._register( - "v1.quote.created", + "v1.product.deleted", func, ) return func - def on_v1_quote_finalized( + def on_v1_product_tax_code_changed( self, - func: "Callable[[V1QuoteFinalizedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1ProductTaxCodeChangedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1QuoteFinalizedEvent` (`v1.quote.finalized`) event notification. + Registers a callback for the `V1ProductTaxCodeChangedEvent` (`v1.product.tax_code_changed`) event notification. """ self._register( - "v1.quote.finalized", + "v1.product.tax_code_changed", func, ) return func - def on_v1_radar_early_fraud_warning_created( + def on_v1_product_updated( self, - func: "Callable[[V1RadarEarlyFraudWarningCreatedEventNotification, StripeClient], CallbackReturn]", + func: "Callable[[V1ProductUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ - Registers a callback for the `V1RadarEarlyFraudWarningCreatedEvent` (`v1.radar.early_fraud_warning.created`) event notification. + Registers a callback for the `V1ProductUpdatedEvent` (`v1.product.updated`) event notification. """ self._register( - "v1.radar.early_fraud_warning.created", + "v1.product.updated", + func, + ) + return func + + def on_v1_promotion_code_created( + self, + func: "Callable[[V1PromotionCodeCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PromotionCodeCreatedEvent` (`v1.promotion_code.created`) event notification. + """ + self._register( + "v1.promotion_code.created", + func, + ) + return func + + def on_v1_promotion_code_fully_redeemed( + self, + func: "Callable[[V1PromotionCodeFullyRedeemedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PromotionCodeFullyRedeemedEvent` (`v1.promotion_code.fully_redeemed`) event notification. + """ + self._register( + "v1.promotion_code.fully_redeemed", + func, + ) + return func + + def on_v1_promotion_code_updated( + self, + func: "Callable[[V1PromotionCodeUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1PromotionCodeUpdatedEvent` (`v1.promotion_code.updated`) event notification. + """ + self._register( + "v1.promotion_code.updated", + func, + ) + return func + + def on_v1_quote_accepted( + self, + func: "Callable[[V1QuoteAcceptedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1QuoteAcceptedEvent` (`v1.quote.accepted`) event notification. + """ + self._register( + "v1.quote.accepted", + func, + ) + return func + + def on_v1_quote_canceled( + self, + func: "Callable[[V1QuoteCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1QuoteCanceledEvent` (`v1.quote.canceled`) event notification. + """ + self._register( + "v1.quote.canceled", + func, + ) + return func + + def on_v1_quote_created( + self, + func: "Callable[[V1QuoteCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1QuoteCreatedEvent` (`v1.quote.created`) event notification. + """ + self._register( + "v1.quote.created", + func, + ) + return func + + def on_v1_quote_finalized( + self, + func: "Callable[[V1QuoteFinalizedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1QuoteFinalizedEvent` (`v1.quote.finalized`) event notification. + """ + self._register( + "v1.quote.finalized", + func, + ) + return func + + def on_v1_radar_early_fraud_warning_created( + self, + func: "Callable[[V1RadarEarlyFraudWarningCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1RadarEarlyFraudWarningCreatedEvent` (`v1.radar.early_fraud_warning.created`) event notification. + """ + self._register( + "v1.radar.early_fraud_warning.created", func, ) return func @@ -3456,6 +4312,71 @@ def on_v1_subscription_schedule_expiring( ) return func + def on_v1_subscription_schedule_phase_added( + self, + func: "Callable[[V1SubscriptionSchedulePhaseAddedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionSchedulePhaseAddedEvent` (`v1.subscription_schedule.phase_added`) event notification. + """ + self._register( + "v1.subscription_schedule.phase_added", + func, + ) + return func + + def on_v1_subscription_schedule_phase_default_tax_rates_changed( + self, + func: "Callable[[V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent` (`v1.subscription_schedule.phase_default_tax_rates_changed`) event notification. + """ + self._register( + "v1.subscription_schedule.phase_default_tax_rates_changed", + func, + ) + return func + + def on_v1_subscription_schedule_phase_end_date_changed( + self, + func: "Callable[[V1SubscriptionSchedulePhaseEndDateChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionSchedulePhaseEndDateChangedEvent` (`v1.subscription_schedule.phase_end_date_changed`) event notification. + """ + self._register( + "v1.subscription_schedule.phase_end_date_changed", + func, + ) + return func + + def on_v1_subscription_schedule_phase_removed( + self, + func: "Callable[[V1SubscriptionSchedulePhaseRemovedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionSchedulePhaseRemovedEvent` (`v1.subscription_schedule.phase_removed`) event notification. + """ + self._register( + "v1.subscription_schedule.phase_removed", + func, + ) + return func + + def on_v1_subscription_schedule_phase_trial_end_changed( + self, + func: "Callable[[V1SubscriptionSchedulePhaseTrialEndChangedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V1SubscriptionSchedulePhaseTrialEndChangedEvent` (`v1.subscription_schedule.phase_trial_end_changed`) event notification. + """ + self._register( + "v1.subscription_schedule.phase_trial_end_changed", + func, + ) + return func + def on_v1_subscription_schedule_released( self, func: "Callable[[V1SubscriptionScheduleReleasedEventNotification, StripeClient], CallbackReturn]", @@ -4015,6 +4936,461 @@ def on_v2_core_event_destination_ping( ) return func + def on_v2_money_management_adjustment_created( + self, + func: "Callable[[V2MoneyManagementAdjustmentCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementAdjustmentCreatedEvent` (`v2.money_management.adjustment.created`) event notification. + """ + self._register( + "v2.money_management.adjustment.created", + func, + ) + return func + + def on_v2_money_management_financial_account_created( + self, + func: "Callable[[V2MoneyManagementFinancialAccountCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementFinancialAccountCreatedEvent` (`v2.money_management.financial_account.created`) event notification. + """ + self._register( + "v2.money_management.financial_account.created", + func, + ) + return func + + def on_v2_money_management_financial_account_updated( + self, + func: "Callable[[V2MoneyManagementFinancialAccountUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementFinancialAccountUpdatedEvent` (`v2.money_management.financial_account.updated`) event notification. + """ + self._register( + "v2.money_management.financial_account.updated", + func, + ) + return func + + def on_v2_money_management_financial_address_activated( + self, + func: "Callable[[V2MoneyManagementFinancialAddressActivatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementFinancialAddressActivatedEvent` (`v2.money_management.financial_address.activated`) event notification. + """ + self._register( + "v2.money_management.financial_address.activated", + func, + ) + return func + + def on_v2_money_management_financial_address_failed( + self, + func: "Callable[[V2MoneyManagementFinancialAddressFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementFinancialAddressFailedEvent` (`v2.money_management.financial_address.failed`) event notification. + """ + self._register( + "v2.money_management.financial_address.failed", + func, + ) + return func + + def on_v2_money_management_inbound_transfer_available( + self, + func: "Callable[[V2MoneyManagementInboundTransferAvailableEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementInboundTransferAvailableEvent` (`v2.money_management.inbound_transfer.available`) event notification. + """ + self._register( + "v2.money_management.inbound_transfer.available", + func, + ) + return func + + def on_v2_money_management_inbound_transfer_bank_debit_failed( + self, + func: "Callable[[V2MoneyManagementInboundTransferBankDebitFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementInboundTransferBankDebitFailedEvent` (`v2.money_management.inbound_transfer.bank_debit_failed`) event notification. + """ + self._register( + "v2.money_management.inbound_transfer.bank_debit_failed", + func, + ) + return func + + def on_v2_money_management_inbound_transfer_bank_debit_processing( + self, + func: "Callable[[V2MoneyManagementInboundTransferBankDebitProcessingEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementInboundTransferBankDebitProcessingEvent` (`v2.money_management.inbound_transfer.bank_debit_processing`) event notification. + """ + self._register( + "v2.money_management.inbound_transfer.bank_debit_processing", + func, + ) + return func + + def on_v2_money_management_inbound_transfer_bank_debit_queued( + self, + func: "Callable[[V2MoneyManagementInboundTransferBankDebitQueuedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementInboundTransferBankDebitQueuedEvent` (`v2.money_management.inbound_transfer.bank_debit_queued`) event notification. + """ + self._register( + "v2.money_management.inbound_transfer.bank_debit_queued", + func, + ) + return func + + def on_v2_money_management_inbound_transfer_bank_debit_returned( + self, + func: "Callable[[V2MoneyManagementInboundTransferBankDebitReturnedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementInboundTransferBankDebitReturnedEvent` (`v2.money_management.inbound_transfer.bank_debit_returned`) event notification. + """ + self._register( + "v2.money_management.inbound_transfer.bank_debit_returned", + func, + ) + return func + + def on_v2_money_management_inbound_transfer_bank_debit_succeeded( + self, + func: "Callable[[V2MoneyManagementInboundTransferBankDebitSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementInboundTransferBankDebitSucceededEvent` (`v2.money_management.inbound_transfer.bank_debit_succeeded`) event notification. + """ + self._register( + "v2.money_management.inbound_transfer.bank_debit_succeeded", + func, + ) + return func + + def on_v2_money_management_outbound_payment_canceled( + self, + func: "Callable[[V2MoneyManagementOutboundPaymentCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementOutboundPaymentCanceledEvent` (`v2.money_management.outbound_payment.canceled`) event notification. + """ + self._register( + "v2.money_management.outbound_payment.canceled", + func, + ) + return func + + def on_v2_money_management_outbound_payment_created( + self, + func: "Callable[[V2MoneyManagementOutboundPaymentCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementOutboundPaymentCreatedEvent` (`v2.money_management.outbound_payment.created`) event notification. + """ + self._register( + "v2.money_management.outbound_payment.created", + func, + ) + return func + + def on_v2_money_management_outbound_payment_failed( + self, + func: "Callable[[V2MoneyManagementOutboundPaymentFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementOutboundPaymentFailedEvent` (`v2.money_management.outbound_payment.failed`) event notification. + """ + self._register( + "v2.money_management.outbound_payment.failed", + func, + ) + return func + + def on_v2_money_management_outbound_payment_posted( + self, + func: "Callable[[V2MoneyManagementOutboundPaymentPostedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementOutboundPaymentPostedEvent` (`v2.money_management.outbound_payment.posted`) event notification. + """ + self._register( + "v2.money_management.outbound_payment.posted", + func, + ) + return func + + def on_v2_money_management_outbound_payment_returned( + self, + func: "Callable[[V2MoneyManagementOutboundPaymentReturnedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementOutboundPaymentReturnedEvent` (`v2.money_management.outbound_payment.returned`) event notification. + """ + self._register( + "v2.money_management.outbound_payment.returned", + func, + ) + return func + + def on_v2_money_management_outbound_payment_under_review( + self, + func: "Callable[[V2MoneyManagementOutboundPaymentUnderReviewEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementOutboundPaymentUnderReviewEvent` (`v2.money_management.outbound_payment.under_review`) event notification. + """ + self._register( + "v2.money_management.outbound_payment.under_review", + func, + ) + return func + + def on_v2_money_management_outbound_payment_updated( + self, + func: "Callable[[V2MoneyManagementOutboundPaymentUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementOutboundPaymentUpdatedEvent` (`v2.money_management.outbound_payment.updated`) event notification. + """ + self._register( + "v2.money_management.outbound_payment.updated", + func, + ) + return func + + def on_v2_money_management_payout_intent_canceled( + self, + func: "Callable[[V2MoneyManagementPayoutIntentCanceledEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementPayoutIntentCanceledEvent` (`v2.money_management.payout_intent.canceled`) event notification. + """ + self._register( + "v2.money_management.payout_intent.canceled", + func, + ) + return func + + def on_v2_money_management_payout_intent_created( + self, + func: "Callable[[V2MoneyManagementPayoutIntentCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementPayoutIntentCreatedEvent` (`v2.money_management.payout_intent.created`) event notification. + """ + self._register( + "v2.money_management.payout_intent.created", + func, + ) + return func + + def on_v2_money_management_payout_intent_pending( + self, + func: "Callable[[V2MoneyManagementPayoutIntentPendingEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementPayoutIntentPendingEvent` (`v2.money_management.payout_intent.pending`) event notification. + """ + self._register( + "v2.money_management.payout_intent.pending", + func, + ) + return func + + def on_v2_money_management_payout_intent_posted( + self, + func: "Callable[[V2MoneyManagementPayoutIntentPostedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementPayoutIntentPostedEvent` (`v2.money_management.payout_intent.posted`) event notification. + """ + self._register( + "v2.money_management.payout_intent.posted", + func, + ) + return func + + def on_v2_money_management_payout_intent_processing( + self, + func: "Callable[[V2MoneyManagementPayoutIntentProcessingEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementPayoutIntentProcessingEvent` (`v2.money_management.payout_intent.processing`) event notification. + """ + self._register( + "v2.money_management.payout_intent.processing", + func, + ) + return func + + def on_v2_money_management_payout_intent_requires_action( + self, + func: "Callable[[V2MoneyManagementPayoutIntentRequiresActionEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementPayoutIntentRequiresActionEvent` (`v2.money_management.payout_intent.requires_action`) event notification. + """ + self._register( + "v2.money_management.payout_intent.requires_action", + func, + ) + return func + + def on_v2_money_management_payout_intent_updated( + self, + func: "Callable[[V2MoneyManagementPayoutIntentUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementPayoutIntentUpdatedEvent` (`v2.money_management.payout_intent.updated`) event notification. + """ + self._register( + "v2.money_management.payout_intent.updated", + func, + ) + return func + + def on_v2_money_management_payout_method_created( + self, + func: "Callable[[V2MoneyManagementPayoutMethodCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementPayoutMethodCreatedEvent` (`v2.money_management.payout_method.created`) event notification. + """ + self._register( + "v2.money_management.payout_method.created", + func, + ) + return func + + def on_v2_money_management_payout_method_updated( + self, + func: "Callable[[V2MoneyManagementPayoutMethodUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementPayoutMethodUpdatedEvent` (`v2.money_management.payout_method.updated`) event notification. + """ + self._register( + "v2.money_management.payout_method.updated", + func, + ) + return func + + def on_v2_money_management_received_credit_available( + self, + func: "Callable[[V2MoneyManagementReceivedCreditAvailableEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementReceivedCreditAvailableEvent` (`v2.money_management.received_credit.available`) event notification. + """ + self._register( + "v2.money_management.received_credit.available", + func, + ) + return func + + def on_v2_money_management_received_credit_failed( + self, + func: "Callable[[V2MoneyManagementReceivedCreditFailedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementReceivedCreditFailedEvent` (`v2.money_management.received_credit.failed`) event notification. + """ + self._register( + "v2.money_management.received_credit.failed", + func, + ) + return func + + def on_v2_money_management_received_credit_returned( + self, + func: "Callable[[V2MoneyManagementReceivedCreditReturnedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementReceivedCreditReturnedEvent` (`v2.money_management.received_credit.returned`) event notification. + """ + self._register( + "v2.money_management.received_credit.returned", + func, + ) + return func + + def on_v2_money_management_received_credit_succeeded( + self, + func: "Callable[[V2MoneyManagementReceivedCreditSucceededEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementReceivedCreditSucceededEvent` (`v2.money_management.received_credit.succeeded`) event notification. + """ + self._register( + "v2.money_management.received_credit.succeeded", + func, + ) + return func + + def on_v2_money_management_recipient_verification_created( + self, + func: "Callable[[V2MoneyManagementRecipientVerificationCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementRecipientVerificationCreatedEvent` (`v2.money_management.recipient_verification.created`) event notification. + """ + self._register( + "v2.money_management.recipient_verification.created", + func, + ) + return func + + def on_v2_money_management_recipient_verification_updated( + self, + func: "Callable[[V2MoneyManagementRecipientVerificationUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementRecipientVerificationUpdatedEvent` (`v2.money_management.recipient_verification.updated`) event notification. + """ + self._register( + "v2.money_management.recipient_verification.updated", + func, + ) + return func + + def on_v2_money_management_transaction_created( + self, + func: "Callable[[V2MoneyManagementTransactionCreatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementTransactionCreatedEvent` (`v2.money_management.transaction.created`) event notification. + """ + self._register( + "v2.money_management.transaction.created", + func, + ) + return func + + def on_v2_money_management_transaction_updated( + self, + func: "Callable[[V2MoneyManagementTransactionUpdatedEventNotification, StripeClient], CallbackReturn]", + ): + """ + Registers a callback for the `V2MoneyManagementTransactionUpdatedEvent` (`v2.money_management.transaction.updated`) event notification. + """ + self._register( + "v2.money_management.transaction.updated", + func, + ) + return func + # event-notification-registration-methods: The end of the section generated from our OpenAPI spec diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 0bbe63d17..4f98e6ae5 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -271,7 +271,9 @@ class CustomerTaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -285,6 +287,7 @@ class CustomerTaxId(StripeObject): "br_cnpj", "br_cpf", "bs_tin", + "bw_vat", "by_tin", "ca_bn", "ca_gst_hst", @@ -295,12 +298,14 @@ class CustomerTaxId(StripeObject): "cd_nif", "ch_uid", "ch_vat", + "ci_vat", "cl_tin", "cm_niu", "cn_tin", "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -310,8 +315,12 @@ class CustomerTaxId(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", + "gh_tin", "gi_tin", "gn_nif", "hk_br", @@ -321,6 +330,7 @@ class CustomerTaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -336,23 +346,28 @@ class CustomerTaxId(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -362,12 +377,15 @@ class CustomerTaxId(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -386,7 +404,7 @@ class CustomerTaxId(StripeObject): str, ] """ - 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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_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`, `ic_nif`, or `unknown` + 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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_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`, `au_acn`, `nz_bn`, `pt_nif`, `cz_dic`, `fr_siret`, `fr_siren`, `fr_spi`, `sm_coe`, `tt_vat`, `tt_bir`, `mu_vat`, `mz_nuit`, `au_wpn`, `md_cf`, `is_kt`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, `ic_nif`, `gh_tin`, `bw_vat`, `ci_vat`, or `unknown` """ value: Optional[str] """ @@ -607,11 +625,13 @@ class LastFinalizationError(StripeObject): "shipping_calculation_failed", "siret_invalid", "sku_inactive", + "smart_disputes_not_available", "state_unsupported", "status_transition_invalid", "storer_capability_missing", "storer_capability_not_active", "stripe_tax_inactive", + "subscription_update_trial_after_billing_cycle_anchor", "tax_id_invalid", "tax_id_prohibited", "taxes_calculation_failed", @@ -623,6 +643,8 @@ class LastFinalizationError(StripeObject): "terminal_reader_offline", "terminal_reader_timeout", "testmode_charges_only", + "three_d_secure_authentication_not_supported", + "three_d_secure_authentication_upstream_error", "tls_version_unsupported", "token_already_used", "token_card_network_invalid", @@ -963,7 +985,7 @@ class Pix(StripeObject): """ expires_after_seconds: Optional[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). """ class SepaDebit(StripeObject): @@ -1167,6 +1189,7 @@ class Filters(StripeObject): "satispay", "sepa_credit_transfer", "sepa_debit", + "sequra", "sofort", "swish", "twint", diff --git a/stripe/_invoice_item.py b/stripe/_invoice_item.py index 433971ae4..8c32de3c2 100644 --- a/stripe/_invoice_item.py +++ b/stripe/_invoice_item.py @@ -150,7 +150,7 @@ class DiscountAmount(StripeObject): credited_items: Optional[CreditedItems] """ - For a credit proration, links to the debit invoice line items or invoice item that the credit applies to. + For a credit proration, links to the debit that the credit applies to. The reference is to an invoice item if the debit was pending when the credit was created, and to invoice line items if the debit was already invoiced. """ discount_amounts: List[DiscountAmount] """ diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 3f7679509..03ab5aa3f 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -349,6 +349,7 @@ "SearchResultObject", ), # V2 Object classes: The beginning of the section generated from our OpenAPI spec + "list": ("stripe.v2._list_object", "ListObject"), "v2.billing.meter_event": ("stripe.v2.billing._meter_event", "MeterEvent"), "v2.billing.meter_event_adjustment": ( "stripe.v2.billing._meter_event_adjustment", @@ -378,6 +379,70 @@ "stripe.v2.core._event_destination", "EventDestination", ), + "v2.core.vault.gb_bank_account": ( + "stripe.v2.core.vault._gb_bank_account", + "GbBankAccount", + ), + "v2.core.vault.us_bank_account": ( + "stripe.v2.core.vault._us_bank_account", + "UsBankAccount", + ), + "v2.money_management.adjustment": ( + "stripe.v2.money_management._adjustment", + "Adjustment", + ), + "v2.money_management.financial_account": ( + "stripe.v2.money_management._financial_account", + "FinancialAccount", + ), + "v2.money_management.financial_address": ( + "stripe.v2.money_management._financial_address", + "FinancialAddress", + ), + "v2.money_management.financial_address_credit_simulation": ( + "stripe.v2.money_management._financial_address_credit_simulation", + "FinancialAddressCreditSimulation", + ), + "v2.money_management.inbound_transfer": ( + "stripe.v2.money_management._inbound_transfer", + "InboundTransfer", + ), + "v2.money_management.outbound_payment": ( + "stripe.v2.money_management._outbound_payment", + "OutboundPayment", + ), + "v2.money_management.outbound_setup_intent": ( + "stripe.v2.money_management._outbound_setup_intent", + "OutboundSetupIntent", + ), + "v2.money_management.payout_intent": ( + "stripe.v2.money_management._payout_intent", + "PayoutIntent", + ), + "v2.money_management.payout_method": ( + "stripe.v2.money_management._payout_method", + "PayoutMethod", + ), + "v2.money_management.payout_methods_bank_account_spec": ( + "stripe.v2.money_management._payout_methods_bank_account_spec", + "PayoutMethodsBankAccountSpec", + ), + "v2.money_management.received_credit": ( + "stripe.v2.money_management._received_credit", + "ReceivedCredit", + ), + "v2.money_management.recipient_verification": ( + "stripe.v2.money_management._recipient_verification", + "RecipientVerification", + ), + "v2.money_management.transaction": ( + "stripe.v2.money_management._transaction", + "Transaction", + ), + "v2.money_management.transaction_entry": ( + "stripe.v2.money_management._transaction_entry", + "TransactionEntry", + ), # V2 Object classes: The end of the section generated from our OpenAPI spec } diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 67bebe320..6d132e04c 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -720,6 +720,12 @@ class Link(StripeObject): """ This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. """ + stored_credential_usage: Optional[ + Union[Literal["installment", "recurring", "unscheduled"], str] + ] + """ + The transaction type that was passed for an off-session, Merchant-Initiated transaction, one of `recurring` or `unscheduled`. + """ three_d_secure: Optional[ThreeDSecure] """ Populated if this transaction used 3D Secure authentication. @@ -958,6 +964,7 @@ class Crypto(StripeObject): token_currency: Optional[ Union[ Literal[ + "ousd", "phantom_cash", "usdc", "usdg", diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 2c824858e..95c9c106a 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -387,11 +387,13 @@ class LastPaymentError(StripeObject): "shipping_calculation_failed", "siret_invalid", "sku_inactive", + "smart_disputes_not_available", "state_unsupported", "status_transition_invalid", "storer_capability_missing", "storer_capability_not_active", "stripe_tax_inactive", + "subscription_update_trial_after_billing_cycle_anchor", "tax_id_invalid", "tax_id_prohibited", "taxes_calculation_failed", @@ -403,6 +405,8 @@ class LastPaymentError(StripeObject): "terminal_reader_offline", "terminal_reader_timeout", "testmode_charges_only", + "three_d_secure_authentication_not_supported", + "three_d_secure_authentication_upstream_error", "tls_version_unsupported", "token_already_used", "token_card_network_invalid", @@ -2049,6 +2053,12 @@ class MandateOptions(StripeObject): """ When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ + setup_credential_usage: Optional[ + Union[Literal["installment", "recurring", "unscheduled"], str] + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ setup_future_usage: Optional[ Union[Literal["none", "off_session", "on_session"], str] ] @@ -2069,6 +2079,12 @@ class MandateOptions(StripeObject): """ Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. """ + stored_credential_usage: Optional[ + Union[Literal["installment", "recurring", "unscheduled"], str] + ] + """ + Selected usage to indicate the transaction type of the off-session payment. + """ _inner_class_types = { "installments": Installments, "mandate_options": MandateOptions, @@ -2660,11 +2676,11 @@ class MandateOptions(StripeObject): """ expires_after_seconds: Optional[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 seconds (4 hours). Mutually exclusive with `expires_at`. """ expires_at: Optional[int] """ - The timestamp at which the Pix expires. + The absolute Unix timestamp at which the Pix expires. When supplied as an input, it must be between 60 and 1209600 seconds from the current time at validation, inclusive. If neither expiration option is supplied, the Pix expires 14400 seconds (4 hours) after PaymentIntent confirmation. Mutually exclusive with `expires_after_seconds`. """ mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 9aece350e..9e2f6368f 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -720,6 +720,16 @@ class ShippingOption(StripeObject): class SubscriptionData(StripeObject): class InvoiceSettings(StripeObject): + class CustomField(StripeObject): + name: str + """ + The name of the custom field. + """ + value: str + """ + The value of the custom field. + """ + class Issuer(StripeObject): account: Optional[ExpandableField["Account"]] """ @@ -730,8 +740,27 @@ class Issuer(StripeObject): Type of the account referenced. """ + account_tax_ids: Optional[List[ExpandableField["TaxId"]]] + """ + The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + """ + custom_fields: Optional[List[CustomField]] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: Optional[str] + """ + Footer to be displayed on the invoice. + """ issuer: Issuer - _inner_class_types = {"issuer": Issuer} + _inner_class_types = { + "custom_fields": CustomField, + "issuer": Issuer, + } class TrialSettings(StripeObject): class EndBehavior(StripeObject): @@ -921,6 +950,7 @@ class TransferData(StripeObject): "pix", "promptpay", "satispay", + "scalapay", "sepa_debit", "sequra", "sofort", diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 9206ce896..f80571d42 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -740,6 +740,12 @@ class Link(StripeObject): """ This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. """ + stored_credential_usage: Optional[ + Union[Literal["installment", "recurring", "unscheduled"], str] + ] + """ + The transaction type that was passed for an off-session, Merchant-Initiated transaction, one of `recurring` or `unscheduled`. + """ three_d_secure: Optional[ThreeDSecure] """ Populated if this transaction used 3D Secure authentication. @@ -978,6 +984,7 @@ class Crypto(StripeObject): token_currency: Optional[ Union[ Literal[ + "ousd", "phantom_cash", "usdc", "usdg", diff --git a/stripe/_payout.py b/stripe/_payout.py index 8257fde2c..d3c33e442 100644 --- a/stripe/_payout.py +++ b/stripe/_payout.py @@ -99,7 +99,7 @@ class TraceId(StripeObject): """ failure_code: Optional[str] """ - Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://docs.stripe.com/api#payout_failures). + Error code that provides a reason for a payout failure, if available. """ failure_message: Optional[str] """ diff --git a/stripe/_refund.py b/stripe/_refund.py index 38dbeb37f..c819c0cdd 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -46,7 +46,14 @@ class Affirm(StripeObject): pass class AfterpayClearpay(StripeObject): - pass + reference: Optional[str] + """ + The reference assigned to the refund. + """ + reference_status: Optional[str] + """ + Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + """ class Alipay(StripeObject): pass @@ -154,7 +161,14 @@ class JpBankTransfer(StripeObject): """ class Klarna(StripeObject): - pass + reference: Optional[str] + """ + The reference assigned to the refund. + """ + reference_status: Optional[str] + """ + Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + """ class MbWay(StripeObject): reference: Optional[str] @@ -207,6 +221,14 @@ class Paypal(StripeObject): """ For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. """ + reference: Optional[str] + """ + The reference assigned to the refund. + """ + reference_status: Optional[str] + """ + Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + """ class Pix(StripeObject): pass diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index c98d7f282..d0c4d07a7 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -705,11 +705,13 @@ class SetupError(StripeObject): "shipping_calculation_failed", "siret_invalid", "sku_inactive", + "smart_disputes_not_available", "state_unsupported", "status_transition_invalid", "storer_capability_missing", "storer_capability_not_active", "stripe_tax_inactive", + "subscription_update_trial_after_billing_cycle_anchor", "tax_id_invalid", "tax_id_prohibited", "taxes_calculation_failed", @@ -721,6 +723,8 @@ class SetupError(StripeObject): "terminal_reader_offline", "terminal_reader_timeout", "testmode_charges_only", + "three_d_secure_authentication_not_supported", + "three_d_secure_authentication_upstream_error", "tls_version_unsupported", "token_already_used", "token_card_network_invalid", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 5b5497441..6ad608b70 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -279,11 +279,13 @@ class LastSetupError(StripeObject): "shipping_calculation_failed", "siret_invalid", "sku_inactive", + "smart_disputes_not_available", "state_unsupported", "status_transition_invalid", "storer_capability_missing", "storer_capability_not_active", "stripe_tax_inactive", + "subscription_update_trial_after_billing_cycle_anchor", "tax_id_invalid", "tax_id_prohibited", "taxes_calculation_failed", @@ -295,6 +297,8 @@ class LastSetupError(StripeObject): "terminal_reader_offline", "terminal_reader_timeout", "testmode_charges_only", + "three_d_secure_authentication_not_supported", + "three_d_secure_authentication_upstream_error", "tls_version_unsupported", "token_already_used", "token_card_network_invalid", @@ -697,6 +701,12 @@ class MandateOptions(StripeObject): """ 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. If not provided, this value defaults to `automatic`. 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. """ + setup_credential_usage: Optional[ + Union[Literal["installment", "recurring", "unscheduled"], str] + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ _inner_class_types = {"mandate_options": MandateOptions} class CardPresent(StripeObject): diff --git a/stripe/_source.py b/stripe/_source.py index 350e3dfb3..24710e71d 100644 --- a/stripe/_source.py +++ b/stripe/_source.py @@ -28,9 +28,7 @@ class Source(CreateableAPIResource["Source"], UpdateableAPIResource["Source"]): just like a `Card` object: once chargeable, they can be charged, or can be attached to customers. - Stripe doesn't recommend using the deprecated [Sources API](https://docs.stripe.com/api/sources). - We recommend that you adopt the [PaymentMethods API](https://docs.stripe.com/api/payment_methods). - This newer API provides access to our latest features and payment method types. + This API is deprecated. Use the [PaymentMethods API](https://docs.stripe.com/api/payment_methods) instead. Related guides: [Sources API](https://docs.stripe.com/sources) and [Sources & Customers](https://docs.stripe.com/sources/customers). """ diff --git a/stripe/_source_mandate_notification.py b/stripe/_source_mandate_notification.py index 3f5fbae43..d0ba848f5 100644 --- a/stripe/_source_mandate_notification.py +++ b/stripe/_source_mandate_notification.py @@ -79,9 +79,7 @@ class SepaDebit(StripeObject): just like a `Card` object: once chargeable, they can be charged, or can be attached to customers. - Stripe doesn't recommend using the deprecated [Sources API](https://docs.stripe.com/api/sources). - We recommend that you adopt the [PaymentMethods API](https://docs.stripe.com/api/payment_methods). - This newer API provides access to our latest features and payment method types. + This API is deprecated. Use the [PaymentMethods API](https://docs.stripe.com/api/payment_methods) instead. Related guides: [Sources API](https://docs.stripe.com/sources) and [Sources & Customers](https://docs.stripe.com/sources/customers). """ diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 05a29bcdc..2b6e54493 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -573,7 +573,7 @@ class MandateOptions(StripeObject): expires_after_seconds: Optional[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). """ mandate_options: Optional[MandateOptions] _inner_class_types = {"mandate_options": MandateOptions} @@ -775,6 +775,7 @@ class Filters(StripeObject): "satispay", "sepa_credit_transfer", "sepa_debit", + "sequra", "sofort", "swish", "twint", @@ -1104,7 +1105,7 @@ class EndBehavior(StripeObject): A subscription that is currently in a trial period is `trialing` and moves to `active` when the trial period is over. - A subscription can only enter a `paused` status [when a trial ends without a payment method](https://docs.stripe.com/billing/subscriptions/trials/free-trials#create-free-trials-without-payment). A `paused` subscription doesn't generate invoices and can be resumed after your customer adds their payment method. The `paused` status is different from [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. + A subscription can enter a `paused` status in several ways, including [when a trial ends without a payment method](https://docs.stripe.com/billing/subscriptions/trials/free-trials#create-free-trials-without-payment) or when you pause it using the [pause endpoint](https://docs.stripe.com/api/subscriptions/pause). A `paused` subscription doesn't advance to a new billing period or generate invoices until it resumes. The `paused` status is different from [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment), which still generates invoices and leaves the subscription's status unchanged. If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). @@ -1145,7 +1146,7 @@ def _cls_cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. + Pending invoice items are included on a final invoice if you generate one. Otherwise, they remain pending and can be billed on another invoice for the customer. To prevent billing, manually [delete](https://docs.stripe.com/api/invoiceitems/delete) them. If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1172,7 +1173,7 @@ def cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. + Pending invoice items are included on a final invoice if you generate one. Otherwise, they remain pending and can be billed on another invoice for the customer. To prevent billing, manually [delete](https://docs.stripe.com/api/invoiceitems/delete) them. If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1185,7 +1186,7 @@ def cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. + Pending invoice items are included on a final invoice if you generate one. Otherwise, they remain pending and can be billed on another invoice for the customer. To prevent billing, manually [delete](https://docs.stripe.com/api/invoiceitems/delete) them. If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1198,7 +1199,7 @@ def cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. + Pending invoice items are included on a final invoice if you generate one. Otherwise, they remain pending and can be billed on another invoice for the customer. To prevent billing, manually [delete](https://docs.stripe.com/api/invoiceitems/delete) them. If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1223,7 +1224,7 @@ async def _cls_cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. + Pending invoice items are included on a final invoice if you generate one. Otherwise, they remain pending and can be billed on another invoice for the customer. To prevent billing, manually [delete](https://docs.stripe.com/api/invoiceitems/delete) them. If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1250,7 +1251,7 @@ async def cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. + Pending invoice items are included on a final invoice if you generate one. Otherwise, they remain pending and can be billed on another invoice for the customer. To prevent billing, manually [delete](https://docs.stripe.com/api/invoiceitems/delete) them. If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1263,7 +1264,7 @@ async def cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. + Pending invoice items are included on a final invoice if you generate one. Otherwise, they remain pending and can be billed on another invoice for the customer. To prevent billing, manually [delete](https://docs.stripe.com/api/invoiceitems/delete) them. If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -1276,7 +1277,7 @@ async def cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. + Pending invoice items are included on a final invoice if you generate one. Otherwise, they remain pending and can be billed on another invoice for the customer. To prevent billing, manually [delete](https://docs.stripe.com/api/invoiceitems/delete) them. If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ diff --git a/stripe/_subscription_item.py b/stripe/_subscription_item.py index 046ac6f17..1ddbebb38 100644 --- a/stripe/_subscription_item.py +++ b/stripe/_subscription_item.py @@ -54,8 +54,17 @@ class BillingThresholds(StripeObject): class CurrentTrial(StripeObject): end_date: int + """ + The time the current trial ends. + """ start_date: int + """ + The time the current trial started. + """ trial_offer: str + """ + The Trial Offer ID applied to the subscription item. + """ billed_until: Optional[int] """ diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index afa211479..0b3604cba 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -760,7 +760,7 @@ class TransferData(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - pause_schedules: Optional[List[PauseSchedule]] + pause_schedules: List[PauseSchedule] """ The pause schedules for this subscription schedule. """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index 011da0884..13fd1b8d0 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -52,7 +52,7 @@ def cancel( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. + Pending invoice items are included on a final invoice if you generate one. Otherwise, they remain pending and can be billed on another invoice for the customer. To prevent billing, manually [delete](https://docs.stripe.com/api/invoiceitems/delete) them. If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ @@ -81,7 +81,7 @@ async def cancel_async( """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, the subscription is largely immutable. You can still update its [metadata](https://docs.stripe.com/metadata) and cancellation_details. - Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://docs.stripe.com/api/invoiceitems/delete). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. + Pending invoice items are included on a final invoice if you generate one. Otherwise, they remain pending and can be billed on another invoice for the customer. To prevent billing, manually [delete](https://docs.stripe.com/api/invoiceitems/delete) them. If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to false. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. """ diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index 4f3889c73..e3f624df5 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -117,7 +117,9 @@ class Verification(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -131,6 +133,7 @@ class Verification(StripeObject): "br_cnpj", "br_cpf", "bs_tin", + "bw_vat", "by_tin", "ca_bn", "ca_gst_hst", @@ -141,12 +144,14 @@ class Verification(StripeObject): "cd_nif", "ch_uid", "ch_vat", + "ci_vat", "cl_tin", "cm_niu", "cn_tin", "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -156,8 +161,12 @@ class Verification(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", + "gh_tin", "gi_tin", "gn_nif", "hk_br", @@ -167,6 +176,7 @@ class Verification(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -182,23 +192,28 @@ class Verification(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -208,12 +223,15 @@ class Verification(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -232,7 +250,7 @@ class Verification(StripeObject): str, ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_acn`, `au_arn`, `au_wpn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `bw_vat`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `ci_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `cz_dic`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `fr_siren`, `fr_siret`, `fr_spi`, `gb_vat`, `ge_vat`, `gh_tin`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_kt`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_cf`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mu_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `mz_nuit`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_bn`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `pt_nif`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sm_coe`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tt_bir`, `tt_vat`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` """ value: str """ diff --git a/stripe/_tax_rate.py b/stripe/_tax_rate.py index 0c3c5c77f..ebb52c6b5 100644 --- a/stripe/_tax_rate.py +++ b/stripe/_tax_rate.py @@ -119,22 +119,32 @@ class FlatAmount(StripeObject): tax_type: Optional[ Union[ Literal[ + "admissions_tax", "amusement_tax", + "attendance_tax", "communications_tax", "digital_excise_tax", + "entertainment_tax", + "get_fund", + "gross_receipts_tax", "gst", + "hospitality_tax", "hst", "igst", "jct", "lease_tax", + "luxury_tax", "mass_transit_parking_tax", + "nhil", "parking_tax", "pst", "qst", + "resort_tax", "retail_delivery_fee", "rst", "sales_tax", "service_tax", + "tourism_tax", "utility_users_tax", "vat", ], diff --git a/stripe/_token.py b/stripe/_token.py index d316f43f5..5c6ec7af0 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -52,6 +52,8 @@ class Token(CreateableAPIResource["Token"]): later. You can also store multiple debit cards on a recipient in order to transfer to those cards later. + This API is deprecated. Use the [PaymentMethods API](https://docs.stripe.com/api/payment_methods) instead. + Related guide: [Card payments with Sources](https://docs.stripe.com/sources/cards) """ client_ip: Optional[str] diff --git a/stripe/_v2_services.py b/stripe/_v2_services.py index 49316d6ae..1a67514e4 100644 --- a/stripe/_v2_services.py +++ b/stripe/_v2_services.py @@ -8,11 +8,18 @@ from stripe.v2._billing_service import BillingService from stripe.v2._commerce_service import CommerceService from stripe.v2._core_service import CoreService + from stripe.v2._money_management_service import MoneyManagementService + from stripe.v2._test_helper_service import TestHelperService _subservices = { "billing": ["stripe.v2._billing_service", "BillingService"], "commerce": ["stripe.v2._commerce_service", "CommerceService"], "core": ["stripe.v2._core_service", "CoreService"], + "money_management": [ + "stripe.v2._money_management_service", + "MoneyManagementService", + ], + "test_helpers": ["stripe.v2._test_helper_service", "TestHelperService"], } @@ -20,6 +27,8 @@ class V2Services(StripeService): billing: "BillingService" commerce: "CommerceService" core: "CoreService" + money_management: "MoneyManagementService" + test_helpers: "TestHelperService" def __init__(self, requestor): super().__init__(requestor) diff --git a/stripe/apps/_install.py b/stripe/apps/_install.py index 41d2fc2cf..c40ac4da4 100644 --- a/stripe/apps/_install.py +++ b/stripe/apps/_install.py @@ -133,7 +133,7 @@ class ContentSecurityPolicyPending(StripeObject): @classmethod def create(cls, **params: Unpack["InstallCreateParams"]) -> "Install": """ - Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer or embedding platform acting on a connected account through Stripe-Account installs or reinstalls its app there. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. + Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. """ return cast( "Install", @@ -149,7 +149,7 @@ async def create_async( cls, **params: Unpack["InstallCreateParams"] ) -> "Install": """ - Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer or embedding platform acting on a connected account through Stripe-Account installs or reinstalls its app there. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. + Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. """ return cast( "Install", @@ -165,7 +165,7 @@ def list( cls, **params: Unpack["InstallListParams"] ) -> ListObject["Install"]: """ - Returns a list of app installs. An app developer or embedding platform filtering by its own app sees the installs across the accounts that installed it; other callers see the installs on their own account. The key selects the environment: a live key lists live installs, a sandbox API key lists the installs on that sandbox, and the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. For existing accounts that still use legacy test mode, a test mode key lists legacy test mode installs. + Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. """ result = cls._static_request( "get", @@ -185,7 +185,7 @@ async def list_async( cls, **params: Unpack["InstallListParams"] ) -> ListObject["Install"]: """ - Returns a list of app installs. An app developer or embedding platform filtering by its own app sees the installs across the accounts that installed it; other callers see the installs on their own account. The key selects the environment: a live key lists live installs, a sandbox API key lists the installs on that sandbox, and the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. For existing accounts that still use legacy test mode, a test mode key lists legacy test mode installs. + Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. """ result = await cls._static_request_async( "get", @@ -205,7 +205,7 @@ def modify( cls, id: str, /, **params: Unpack["InstallModifyParams"] ) -> "Install": """ - Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key; app developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. For private apps, the version being installed is the newest completed upload. + Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key, which grants all of that access, so only give app_install_write to keys that may approve an app's access. App developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. An app developer can't grant new access. An embedding platform can grant new access only once the app's developer approves its request to embed the app. For private apps, the version being installed is the newest completed upload. """ url = "%s/%s" % (cls.class_url(), sanitize_id(id)) return cast( @@ -222,7 +222,7 @@ async def modify_async( cls, id: str, /, **params: Unpack["InstallModifyParams"] ) -> "Install": """ - Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key; app developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. For private apps, the version being installed is the newest completed upload. + Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key, which grants all of that access, so only give app_install_write to keys that may approve an app's access. App developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. An app developer can't grant new access. An embedding platform can grant new access only once the app's developer approves its request to embed the app. For private apps, the version being installed is the newest completed upload. """ url = "%s/%s" % (cls.class_url(), sanitize_id(id)) return cast( diff --git a/stripe/apps/_install_service.py b/stripe/apps/_install_service.py index bd6740126..930d3be45 100644 --- a/stripe/apps/_install_service.py +++ b/stripe/apps/_install_service.py @@ -27,7 +27,7 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[Install]": """ - Returns a list of app installs. An app developer or embedding platform filtering by its own app sees the installs across the accounts that installed it; other callers see the installs on their own account. The key selects the environment: a live key lists live installs, a sandbox API key lists the installs on that sandbox, and the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. For existing accounts that still use legacy test mode, a test mode key lists legacy test mode installs. + Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. """ return cast( "ListObject[Install]", @@ -46,7 +46,7 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[Install]": """ - Returns a list of app installs. An app developer or embedding platform filtering by its own app sees the installs across the accounts that installed it; other callers see the installs on their own account. The key selects the environment: a live key lists live installs, a sandbox API key lists the installs on that sandbox, and the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. For existing accounts that still use legacy test mode, a test mode key lists legacy test mode installs. + Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox. """ return cast( "ListObject[Install]", @@ -65,7 +65,7 @@ def create( options: Optional["RequestOptions"] = None, ) -> "Install": """ - Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer or embedding platform acting on a connected account through Stripe-Account installs or reinstalls its app there. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. + Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. """ return cast( "Install", @@ -84,7 +84,7 @@ async def create_async( options: Optional["RequestOptions"] = None, ) -> "Install": """ - Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer or embedding platform acting on a connected account through Stripe-Account installs or reinstalls its app there. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. + Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned. """ return cast( "Install", @@ -147,7 +147,7 @@ def update( options: Optional["RequestOptions"] = None, ) -> "Install": """ - Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key; app developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. For private apps, the version being installed is the newest completed upload. + Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key, which grants all of that access, so only give app_install_write to keys that may approve an app's access. App developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. An app developer can't grant new access. An embedding platform can grant new access only once the app's developer approves its request to embed the app. For private apps, the version being installed is the newest completed upload. """ return cast( "Install", @@ -168,7 +168,7 @@ async def update_async( options: Optional["RequestOptions"] = None, ) -> "Install": """ - Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key; app developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. For private apps, the version being installed is the newest completed upload. + Reauthorizes an app install. The installer grants the permissions, content security policy entries, and endpoints that the version being installed requests. An account reauthorizes its own installs on any channel with its own key, which grants all of that access, so only give app_install_write to keys that may approve an app's access. App developers and embedding platforms reauthorize installs on connected accounts through Stripe-Account. An app developer can't grant new access. An embedding platform can grant new access only once the app's developer approves its request to embed the app. For private apps, the version being installed is the newest completed upload. """ return cast( "Install", diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index 201d3f630..3db61c0f2 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -141,6 +141,37 @@ class CancellationReason(StripeObject): """ _inner_class_types = {"cancellation_reason": CancellationReason} + class SubscriptionPause(StripeObject): + class Duration(StripeObject): + class IntervalOption(StripeObject): + interval: Union[ + Literal["day", "month", "week", "year"], str + ] + """ + Specifies the pause duration unit. Either `day`, `week`, `month`, or `year`. + """ + interval_count: int + """ + The number of intervals in the pause duration. The maximum duration is three years. + """ + + interval_options: List[IntervalOption] + """ + The preset pause durations customers can choose from. + """ + type: Union[Literal["indefinite", "interval_options"], str] + """ + Whether subscriptions can be paused indefinitely or for a preset duration. + """ + _inner_class_types = {"interval_options": IntervalOption} + + duration: Duration + enabled: bool + """ + Whether the feature is enabled. Customers can only pause subscriptions in the [redesigned customer portal](https://docs.stripe.com/customer-management). + """ + _inner_class_types = {"duration": Duration} + class SubscriptionUpdate(StripeObject): class Product(StripeObject): class AdjustableQuantity(StripeObject): @@ -230,12 +261,14 @@ class Condition(StripeObject): invoice_history: InvoiceHistory payment_method_update: PaymentMethodUpdate subscription_cancel: SubscriptionCancel + subscription_pause: SubscriptionPause subscription_update: SubscriptionUpdate _inner_class_types = { "customer_update": CustomerUpdate, "invoice_history": InvoiceHistory, "payment_method_update": PaymentMethodUpdate, "subscription_cancel": SubscriptionCancel, + "subscription_pause": SubscriptionPause, "subscription_update": SubscriptionUpdate, } diff --git a/stripe/billing_portal/_session.py b/stripe/billing_portal/_session.py index 57c69dd94..e934fc705 100644 --- a/stripe/billing_portal/_session.py +++ b/stripe/billing_portal/_session.py @@ -35,6 +35,23 @@ class Session(CreateableAPIResource["Session"]): "billing_portal.session" ) + class AfterExpiration(StripeObject): + class CustomerLogin(StripeObject): + expires_at: Optional[int] + """ + The time after which the customer can no longer recover this session. + """ + + customer_login: Optional[CustomerLogin] + """ + Configuration for authenticating the customer after the session expires. + """ + type: Union[Literal["customer_login"], str] + """ + The behavior to apply when the session expires. + """ + _inner_class_types = {"customer_login": CustomerLogin} + class Flow(StripeObject): class AfterCompletion(StripeObject): class HostedConfirmation(StripeObject): @@ -100,6 +117,12 @@ class CouponOffer(StripeObject): """ _inner_class_types = {"retention": Retention} + class SubscriptionPause(StripeObject): + subscription: str + """ + The ID of the subscription to be paused. + """ + class SubscriptionUpdate(StripeObject): subscription: str """ @@ -154,6 +177,10 @@ class Item(StripeObject): """ Configuration when `flow.type=subscription_cancel`. """ + subscription_pause: Optional[SubscriptionPause] + """ + Configuration when `flow.type=subscription_pause`. + """ subscription_update: Optional[SubscriptionUpdate] """ Configuration when `flow.type=subscription_update`. @@ -167,6 +194,7 @@ class Item(StripeObject): "customer_update", "payment_method_update", "subscription_cancel", + "subscription_pause", "subscription_update", "subscription_update_confirm", ], @@ -179,10 +207,15 @@ class Item(StripeObject): "after_completion": AfterCompletion, "customer_update": CustomerUpdate, "subscription_cancel": SubscriptionCancel, + "subscription_pause": SubscriptionPause, "subscription_update": SubscriptionUpdate, "subscription_update_confirm": SubscriptionUpdateConfirm, } + after_expiration: Optional[AfterExpiration] + """ + Behavior after the portal session expires. + """ configuration: ExpandableField["Configuration"] """ The configuration used by this session, describing the features available. @@ -315,4 +348,4 @@ async def create_async( ), ) - _inner_class_types = {"flow": Flow} + _inner_class_types = {"after_expiration": AfterExpiration, "flow": Flow} diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 54eb0e8bb..5b0f755d2 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -479,7 +479,9 @@ class TaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -493,6 +495,7 @@ class TaxId(StripeObject): "br_cnpj", "br_cpf", "bs_tin", + "bw_vat", "by_tin", "ca_bn", "ca_gst_hst", @@ -503,12 +506,14 @@ class TaxId(StripeObject): "cd_nif", "ch_uid", "ch_vat", + "ci_vat", "cl_tin", "cm_niu", "cn_tin", "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -518,8 +523,12 @@ class TaxId(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", + "gh_tin", "gi_tin", "gn_nif", "hk_br", @@ -529,6 +538,7 @@ class TaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -544,23 +554,28 @@ class TaxId(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -570,12 +585,15 @@ class TaxId(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -594,7 +612,7 @@ class TaxId(StripeObject): str, ] """ - 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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_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`, `ic_nif`, or `unknown` + 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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_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`, `au_acn`, `nz_bn`, `pt_nif`, `cz_dic`, `fr_siret`, `fr_siren`, `fr_spi`, `sm_coe`, `tt_vat`, `tt_bir`, `mu_vat`, `mz_nuit`, `au_wpn`, `md_cf`, `is_kt`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, `ic_nif`, `gh_tin`, `bw_vat`, `ci_vat`, or `unknown` """ value: Optional[str] """ @@ -2565,6 +2583,7 @@ class Link(StripeObject): "fil", "fr", "fr-CA", + "hi-IN", "hr", "hu", "id", @@ -2635,7 +2654,7 @@ class Link(StripeObject): Union[Literal["always", "if_required"], str] ] """ - Configure whether a Checkout Session should collect a payment method for sessions with mode `payment`. Defaults to `always`. + Configure whether a Checkout Session should collect a payment method. Can only be set in `subscription` mode. Defaults to `always`. """ payment_method_configuration_details: Optional[ PaymentMethodConfigurationDetails diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py index ebca31636..f4b3dc127 100644 --- a/stripe/events/__init__.py +++ b/stripe/events/__init__.py @@ -257,18 +257,66 @@ V1CustomerDiscountDeletedEvent as V1CustomerDiscountDeletedEvent, V1CustomerDiscountDeletedEventNotification as V1CustomerDiscountDeletedEventNotification, ) + from stripe.events._v1_customer_discount_source_changed_event import ( + V1CustomerDiscountSourceChangedEvent as V1CustomerDiscountSourceChangedEvent, + V1CustomerDiscountSourceChangedEventNotification as V1CustomerDiscountSourceChangedEventNotification, + ) from stripe.events._v1_customer_discount_updated_event import ( V1CustomerDiscountUpdatedEvent as V1CustomerDiscountUpdatedEvent, V1CustomerDiscountUpdatedEventNotification as V1CustomerDiscountUpdatedEventNotification, ) + from stripe.events._v1_customer_subscription_active_event import ( + V1CustomerSubscriptionActiveEvent as V1CustomerSubscriptionActiveEvent, + V1CustomerSubscriptionActiveEventNotification as V1CustomerSubscriptionActiveEventNotification, + ) + from stripe.events._v1_customer_subscription_cancel_at_changed_event import ( + V1CustomerSubscriptionCancelAtChangedEvent as V1CustomerSubscriptionCancelAtChangedEvent, + V1CustomerSubscriptionCancelAtChangedEventNotification as V1CustomerSubscriptionCancelAtChangedEventNotification, + ) from stripe.events._v1_customer_subscription_created_event import ( V1CustomerSubscriptionCreatedEvent as V1CustomerSubscriptionCreatedEvent, V1CustomerSubscriptionCreatedEventNotification as V1CustomerSubscriptionCreatedEventNotification, ) + from stripe.events._v1_customer_subscription_default_payment_method_changed_event import ( + V1CustomerSubscriptionDefaultPaymentMethodChangedEvent as V1CustomerSubscriptionDefaultPaymentMethodChangedEvent, + V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification as V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification, + ) from stripe.events._v1_customer_subscription_deleted_event import ( V1CustomerSubscriptionDeletedEvent as V1CustomerSubscriptionDeletedEvent, V1CustomerSubscriptionDeletedEventNotification as V1CustomerSubscriptionDeletedEventNotification, ) + from stripe.events._v1_customer_subscription_incomplete_event import ( + V1CustomerSubscriptionIncompleteEvent as V1CustomerSubscriptionIncompleteEvent, + V1CustomerSubscriptionIncompleteEventNotification as V1CustomerSubscriptionIncompleteEventNotification, + ) + from stripe.events._v1_customer_subscription_incomplete_expired_event import ( + V1CustomerSubscriptionIncompleteExpiredEvent as V1CustomerSubscriptionIncompleteExpiredEvent, + V1CustomerSubscriptionIncompleteExpiredEventNotification as V1CustomerSubscriptionIncompleteExpiredEventNotification, + ) + from stripe.events._v1_customer_subscription_item_added_event import ( + V1CustomerSubscriptionItemAddedEvent as V1CustomerSubscriptionItemAddedEvent, + V1CustomerSubscriptionItemAddedEventNotification as V1CustomerSubscriptionItemAddedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_price_changed_event import ( + V1CustomerSubscriptionItemPriceChangedEvent as V1CustomerSubscriptionItemPriceChangedEvent, + V1CustomerSubscriptionItemPriceChangedEventNotification as V1CustomerSubscriptionItemPriceChangedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_quantity_changed_event import ( + V1CustomerSubscriptionItemQuantityChangedEvent as V1CustomerSubscriptionItemQuantityChangedEvent, + V1CustomerSubscriptionItemQuantityChangedEventNotification as V1CustomerSubscriptionItemQuantityChangedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_removed_event import ( + V1CustomerSubscriptionItemRemovedEvent as V1CustomerSubscriptionItemRemovedEvent, + V1CustomerSubscriptionItemRemovedEventNotification as V1CustomerSubscriptionItemRemovedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_tax_rates_changed_event import ( + V1CustomerSubscriptionItemTaxRatesChangedEvent as V1CustomerSubscriptionItemTaxRatesChangedEvent, + V1CustomerSubscriptionItemTaxRatesChangedEventNotification as V1CustomerSubscriptionItemTaxRatesChangedEventNotification, + ) + from stripe.events._v1_customer_subscription_past_due_event import ( + V1CustomerSubscriptionPastDueEvent as V1CustomerSubscriptionPastDueEvent, + V1CustomerSubscriptionPastDueEventNotification as V1CustomerSubscriptionPastDueEventNotification, + ) from stripe.events._v1_customer_subscription_paused_event import ( V1CustomerSubscriptionPausedEvent as V1CustomerSubscriptionPausedEvent, V1CustomerSubscriptionPausedEventNotification as V1CustomerSubscriptionPausedEventNotification, @@ -289,6 +337,14 @@ V1CustomerSubscriptionTrialWillEndEvent as V1CustomerSubscriptionTrialWillEndEvent, V1CustomerSubscriptionTrialWillEndEventNotification as V1CustomerSubscriptionTrialWillEndEventNotification, ) + from stripe.events._v1_customer_subscription_trialing_event import ( + V1CustomerSubscriptionTrialingEvent as V1CustomerSubscriptionTrialingEvent, + V1CustomerSubscriptionTrialingEventNotification as V1CustomerSubscriptionTrialingEventNotification, + ) + from stripe.events._v1_customer_subscription_unpaid_event import ( + V1CustomerSubscriptionUnpaidEvent as V1CustomerSubscriptionUnpaidEvent, + V1CustomerSubscriptionUnpaidEventNotification as V1CustomerSubscriptionUnpaidEventNotification, + ) from stripe.events._v1_customer_subscription_updated_event import ( V1CustomerSubscriptionUpdatedEvent as V1CustomerSubscriptionUpdatedEvent, V1CustomerSubscriptionUpdatedEventNotification as V1CustomerSubscriptionUpdatedEventNotification, @@ -309,6 +365,14 @@ V1CustomerUpdatedEvent as V1CustomerUpdatedEvent, V1CustomerUpdatedEventNotification as V1CustomerUpdatedEventNotification, ) + from stripe.events._v1_entitlements_active_entitlement_summary_entitlement_added_event import ( + V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent as V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent, + V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification as V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification, + ) + from stripe.events._v1_entitlements_active_entitlement_summary_entitlement_removed_event import ( + V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent as V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent, + V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification as V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification, + ) from stripe.events._v1_entitlements_active_entitlement_summary_updated_event import ( V1EntitlementsActiveEntitlementSummaryUpdatedEvent as V1EntitlementsActiveEntitlementSummaryUpdatedEvent, V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification as V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification, @@ -321,6 +385,14 @@ V1FinancialConnectionsAccountAccountNumbersUpdatedEvent as V1FinancialConnectionsAccountAccountNumbersUpdatedEvent, V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification as V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification, ) + from stripe.events._v1_financial_connections_account_balance_refresh_failed_event import ( + V1FinancialConnectionsAccountBalanceRefreshFailedEvent as V1FinancialConnectionsAccountBalanceRefreshFailedEvent, + V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification as V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_balance_refresh_succeeded_event import ( + V1FinancialConnectionsAccountBalanceRefreshSucceededEvent as V1FinancialConnectionsAccountBalanceRefreshSucceededEvent, + V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification as V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_created_event import ( V1FinancialConnectionsAccountCreatedEvent as V1FinancialConnectionsAccountCreatedEvent, V1FinancialConnectionsAccountCreatedEventNotification as V1FinancialConnectionsAccountCreatedEventNotification, @@ -337,6 +409,22 @@ V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent as V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent, V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification as V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification, ) + from stripe.events._v1_financial_connections_account_inferred_balances_refresh_failed_event import ( + V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent as V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent, + V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification as V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_inferred_balances_refresh_succeeded_event import ( + V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent as V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent, + V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification as V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification, + ) + from stripe.events._v1_financial_connections_account_ownership_refresh_failed_event import ( + V1FinancialConnectionsAccountOwnershipRefreshFailedEvent as V1FinancialConnectionsAccountOwnershipRefreshFailedEvent, + V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification as V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_ownership_refresh_succeeded_event import ( + V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent as V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent, + V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification as V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_reactivated_event import ( V1FinancialConnectionsAccountReactivatedEvent as V1FinancialConnectionsAccountReactivatedEvent, V1FinancialConnectionsAccountReactivatedEventNotification as V1FinancialConnectionsAccountReactivatedEventNotification, @@ -353,10 +441,26 @@ V1FinancialConnectionsAccountRefreshedTransactionsEvent as V1FinancialConnectionsAccountRefreshedTransactionsEvent, V1FinancialConnectionsAccountRefreshedTransactionsEventNotification as V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, ) + from stripe.events._v1_financial_connections_account_risk_intelligence_refresh_failed_event import ( + V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent as V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent, + V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification as V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_risk_intelligence_refresh_succeeded_event import ( + V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent as V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent, + V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification as V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event import ( V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent as V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent, V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification as V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification, ) + from stripe.events._v1_financial_connections_account_transactions_refresh_failed_event import ( + V1FinancialConnectionsAccountTransactionsRefreshFailedEvent as V1FinancialConnectionsAccountTransactionsRefreshFailedEvent, + V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification as V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_transactions_refresh_succeeded_event import ( + V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent as V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent, + V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification as V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event import ( V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent as V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent, V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification as V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification, @@ -397,6 +501,14 @@ V1InvoiceDeletedEvent as V1InvoiceDeletedEvent, V1InvoiceDeletedEventNotification as V1InvoiceDeletedEventNotification, ) + from stripe.events._v1_invoice_discount_added_event import ( + V1InvoiceDiscountAddedEvent as V1InvoiceDiscountAddedEvent, + V1InvoiceDiscountAddedEventNotification as V1InvoiceDiscountAddedEventNotification, + ) + from stripe.events._v1_invoice_discount_removed_event import ( + V1InvoiceDiscountRemovedEvent as V1InvoiceDiscountRemovedEvent, + V1InvoiceDiscountRemovedEventNotification as V1InvoiceDiscountRemovedEventNotification, + ) from stripe.events._v1_invoice_finalization_failed_event import ( V1InvoiceFinalizationFailedEvent as V1InvoiceFinalizationFailedEvent, V1InvoiceFinalizationFailedEventNotification as V1InvoiceFinalizationFailedEventNotification, @@ -405,6 +517,22 @@ V1InvoiceFinalizedEvent as V1InvoiceFinalizedEvent, V1InvoiceFinalizedEventNotification as V1InvoiceFinalizedEventNotification, ) + from stripe.events._v1_invoice_line_item_added_event import ( + V1InvoiceLineItemAddedEvent as V1InvoiceLineItemAddedEvent, + V1InvoiceLineItemAddedEventNotification as V1InvoiceLineItemAddedEventNotification, + ) + from stripe.events._v1_invoice_line_item_pricing_changed_event import ( + V1InvoiceLineItemPricingChangedEvent as V1InvoiceLineItemPricingChangedEvent, + V1InvoiceLineItemPricingChangedEventNotification as V1InvoiceLineItemPricingChangedEventNotification, + ) + from stripe.events._v1_invoice_line_item_quantity_changed_event import ( + V1InvoiceLineItemQuantityChangedEvent as V1InvoiceLineItemQuantityChangedEvent, + V1InvoiceLineItemQuantityChangedEventNotification as V1InvoiceLineItemQuantityChangedEventNotification, + ) + from stripe.events._v1_invoice_line_item_removed_event import ( + V1InvoiceLineItemRemovedEvent as V1InvoiceLineItemRemovedEvent, + V1InvoiceLineItemRemovedEventNotification as V1InvoiceLineItemRemovedEventNotification, + ) from stripe.events._v1_invoice_marked_uncollectible_event import ( V1InvoiceMarkedUncollectibleEvent as V1InvoiceMarkedUncollectibleEvent, V1InvoiceMarkedUncollectibleEventNotification as V1InvoiceMarkedUncollectibleEventNotification, @@ -429,10 +557,18 @@ V1InvoicePaymentAttemptRequiredEvent as V1InvoicePaymentAttemptRequiredEvent, V1InvoicePaymentAttemptRequiredEventNotification as V1InvoicePaymentAttemptRequiredEventNotification, ) + from stripe.events._v1_invoice_payment_canceled_event import ( + V1InvoicePaymentCanceledEvent as V1InvoicePaymentCanceledEvent, + V1InvoicePaymentCanceledEventNotification as V1InvoicePaymentCanceledEventNotification, + ) from stripe.events._v1_invoice_payment_failed_event import ( V1InvoicePaymentFailedEvent as V1InvoicePaymentFailedEvent, V1InvoicePaymentFailedEventNotification as V1InvoicePaymentFailedEventNotification, ) + from stripe.events._v1_invoice_payment_open_event import ( + V1InvoicePaymentOpenEvent as V1InvoicePaymentOpenEvent, + V1InvoicePaymentOpenEventNotification as V1InvoicePaymentOpenEventNotification, + ) from stripe.events._v1_invoice_payment_paid_event import ( V1InvoicePaymentPaidEvent as V1InvoicePaymentPaidEvent, V1InvoicePaymentPaidEventNotification as V1InvoicePaymentPaidEventNotification, @@ -461,6 +597,10 @@ V1InvoiceWillBeDueEvent as V1InvoiceWillBeDueEvent, V1InvoiceWillBeDueEventNotification as V1InvoiceWillBeDueEventNotification, ) + from stripe.events._v1_invoiceitem_amount_changed_event import ( + V1InvoiceitemAmountChangedEvent as V1InvoiceitemAmountChangedEvent, + V1InvoiceitemAmountChangedEventNotification as V1InvoiceitemAmountChangedEventNotification, + ) from stripe.events._v1_invoiceitem_created_event import ( V1InvoiceitemCreatedEvent as V1InvoiceitemCreatedEvent, V1InvoiceitemCreatedEventNotification as V1InvoiceitemCreatedEventNotification, @@ -469,6 +609,14 @@ V1InvoiceitemDeletedEvent as V1InvoiceitemDeletedEvent, V1InvoiceitemDeletedEventNotification as V1InvoiceitemDeletedEventNotification, ) + from stripe.events._v1_invoiceitem_discount_added_event import ( + V1InvoiceitemDiscountAddedEvent as V1InvoiceitemDiscountAddedEvent, + V1InvoiceitemDiscountAddedEventNotification as V1InvoiceitemDiscountAddedEventNotification, + ) + from stripe.events._v1_invoiceitem_discount_removed_event import ( + V1InvoiceitemDiscountRemovedEvent as V1InvoiceitemDiscountRemovedEvent, + V1InvoiceitemDiscountRemovedEventNotification as V1InvoiceitemDiscountRemovedEventNotification, + ) from stripe.events._v1_issuing_authorization_created_event import ( V1IssuingAuthorizationCreatedEvent as V1IssuingAuthorizationCreatedEvent, V1IssuingAuthorizationCreatedEventNotification as V1IssuingAuthorizationCreatedEventNotification, @@ -665,26 +813,58 @@ V1PlanUpdatedEvent as V1PlanUpdatedEvent, V1PlanUpdatedEventNotification as V1PlanUpdatedEventNotification, ) + from stripe.events._v1_price_activated_event import ( + V1PriceActivatedEvent as V1PriceActivatedEvent, + V1PriceActivatedEventNotification as V1PriceActivatedEventNotification, + ) from stripe.events._v1_price_created_event import ( V1PriceCreatedEvent as V1PriceCreatedEvent, V1PriceCreatedEventNotification as V1PriceCreatedEventNotification, ) + from stripe.events._v1_price_deactivated_event import ( + V1PriceDeactivatedEvent as V1PriceDeactivatedEvent, + V1PriceDeactivatedEventNotification as V1PriceDeactivatedEventNotification, + ) from stripe.events._v1_price_deleted_event import ( V1PriceDeletedEvent as V1PriceDeletedEvent, V1PriceDeletedEventNotification as V1PriceDeletedEventNotification, ) + from stripe.events._v1_price_lookup_key_changed_event import ( + V1PriceLookupKeyChangedEvent as V1PriceLookupKeyChangedEvent, + V1PriceLookupKeyChangedEventNotification as V1PriceLookupKeyChangedEventNotification, + ) + from stripe.events._v1_price_tax_behavior_changed_event import ( + V1PriceTaxBehaviorChangedEvent as V1PriceTaxBehaviorChangedEvent, + V1PriceTaxBehaviorChangedEventNotification as V1PriceTaxBehaviorChangedEventNotification, + ) from stripe.events._v1_price_updated_event import ( V1PriceUpdatedEvent as V1PriceUpdatedEvent, V1PriceUpdatedEventNotification as V1PriceUpdatedEventNotification, ) + from stripe.events._v1_product_activated_event import ( + V1ProductActivatedEvent as V1ProductActivatedEvent, + V1ProductActivatedEventNotification as V1ProductActivatedEventNotification, + ) from stripe.events._v1_product_created_event import ( V1ProductCreatedEvent as V1ProductCreatedEvent, V1ProductCreatedEventNotification as V1ProductCreatedEventNotification, ) + from stripe.events._v1_product_deactivated_event import ( + V1ProductDeactivatedEvent as V1ProductDeactivatedEvent, + V1ProductDeactivatedEventNotification as V1ProductDeactivatedEventNotification, + ) + from stripe.events._v1_product_default_price_changed_event import ( + V1ProductDefaultPriceChangedEvent as V1ProductDefaultPriceChangedEvent, + V1ProductDefaultPriceChangedEventNotification as V1ProductDefaultPriceChangedEventNotification, + ) from stripe.events._v1_product_deleted_event import ( V1ProductDeletedEvent as V1ProductDeletedEvent, V1ProductDeletedEventNotification as V1ProductDeletedEventNotification, ) + from stripe.events._v1_product_tax_code_changed_event import ( + V1ProductTaxCodeChangedEvent as V1ProductTaxCodeChangedEvent, + V1ProductTaxCodeChangedEventNotification as V1ProductTaxCodeChangedEventNotification, + ) from stripe.events._v1_product_updated_event import ( V1ProductUpdatedEvent as V1ProductUpdatedEvent, V1ProductUpdatedEventNotification as V1ProductUpdatedEventNotification, @@ -693,6 +873,10 @@ V1PromotionCodeCreatedEvent as V1PromotionCodeCreatedEvent, V1PromotionCodeCreatedEventNotification as V1PromotionCodeCreatedEventNotification, ) + from stripe.events._v1_promotion_code_fully_redeemed_event import ( + V1PromotionCodeFullyRedeemedEvent as V1PromotionCodeFullyRedeemedEvent, + V1PromotionCodeFullyRedeemedEventNotification as V1PromotionCodeFullyRedeemedEventNotification, + ) from stripe.events._v1_promotion_code_updated_event import ( V1PromotionCodeUpdatedEvent as V1PromotionCodeUpdatedEvent, V1PromotionCodeUpdatedEventNotification as V1PromotionCodeUpdatedEventNotification, @@ -801,6 +985,26 @@ V1SubscriptionScheduleExpiringEvent as V1SubscriptionScheduleExpiringEvent, V1SubscriptionScheduleExpiringEventNotification as V1SubscriptionScheduleExpiringEventNotification, ) + from stripe.events._v1_subscription_schedule_phase_added_event import ( + V1SubscriptionSchedulePhaseAddedEvent as V1SubscriptionSchedulePhaseAddedEvent, + V1SubscriptionSchedulePhaseAddedEventNotification as V1SubscriptionSchedulePhaseAddedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_default_tax_rates_changed_event import ( + V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent as V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent, + V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification as V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_end_date_changed_event import ( + V1SubscriptionSchedulePhaseEndDateChangedEvent as V1SubscriptionSchedulePhaseEndDateChangedEvent, + V1SubscriptionSchedulePhaseEndDateChangedEventNotification as V1SubscriptionSchedulePhaseEndDateChangedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_removed_event import ( + V1SubscriptionSchedulePhaseRemovedEvent as V1SubscriptionSchedulePhaseRemovedEvent, + V1SubscriptionSchedulePhaseRemovedEventNotification as V1SubscriptionSchedulePhaseRemovedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_trial_end_changed_event import ( + V1SubscriptionSchedulePhaseTrialEndChangedEvent as V1SubscriptionSchedulePhaseTrialEndChangedEvent, + V1SubscriptionSchedulePhaseTrialEndChangedEventNotification as V1SubscriptionSchedulePhaseTrialEndChangedEventNotification, + ) from stripe.events._v1_subscription_schedule_released_event import ( V1SubscriptionScheduleReleasedEvent as V1SubscriptionScheduleReleasedEvent, V1SubscriptionScheduleReleasedEventNotification as V1SubscriptionScheduleReleasedEventNotification, @@ -973,6 +1177,146 @@ V2CoreEventDestinationPingEvent as V2CoreEventDestinationPingEvent, V2CoreEventDestinationPingEventNotification as V2CoreEventDestinationPingEventNotification, ) + from stripe.events._v2_money_management_adjustment_created_event import ( + V2MoneyManagementAdjustmentCreatedEvent as V2MoneyManagementAdjustmentCreatedEvent, + V2MoneyManagementAdjustmentCreatedEventNotification as V2MoneyManagementAdjustmentCreatedEventNotification, + ) + from stripe.events._v2_money_management_financial_account_created_event import ( + V2MoneyManagementFinancialAccountCreatedEvent as V2MoneyManagementFinancialAccountCreatedEvent, + V2MoneyManagementFinancialAccountCreatedEventNotification as V2MoneyManagementFinancialAccountCreatedEventNotification, + ) + from stripe.events._v2_money_management_financial_account_updated_event import ( + V2MoneyManagementFinancialAccountUpdatedEvent as V2MoneyManagementFinancialAccountUpdatedEvent, + V2MoneyManagementFinancialAccountUpdatedEventNotification as V2MoneyManagementFinancialAccountUpdatedEventNotification, + ) + from stripe.events._v2_money_management_financial_address_activated_event import ( + V2MoneyManagementFinancialAddressActivatedEvent as V2MoneyManagementFinancialAddressActivatedEvent, + V2MoneyManagementFinancialAddressActivatedEventNotification as V2MoneyManagementFinancialAddressActivatedEventNotification, + ) + from stripe.events._v2_money_management_financial_address_failed_event import ( + V2MoneyManagementFinancialAddressFailedEvent as V2MoneyManagementFinancialAddressFailedEvent, + V2MoneyManagementFinancialAddressFailedEventNotification as V2MoneyManagementFinancialAddressFailedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_available_event import ( + V2MoneyManagementInboundTransferAvailableEvent as V2MoneyManagementInboundTransferAvailableEvent, + V2MoneyManagementInboundTransferAvailableEventNotification as V2MoneyManagementInboundTransferAvailableEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_failed_event import ( + V2MoneyManagementInboundTransferBankDebitFailedEvent as V2MoneyManagementInboundTransferBankDebitFailedEvent, + V2MoneyManagementInboundTransferBankDebitFailedEventNotification as V2MoneyManagementInboundTransferBankDebitFailedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_processing_event import ( + V2MoneyManagementInboundTransferBankDebitProcessingEvent as V2MoneyManagementInboundTransferBankDebitProcessingEvent, + V2MoneyManagementInboundTransferBankDebitProcessingEventNotification as V2MoneyManagementInboundTransferBankDebitProcessingEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_queued_event import ( + V2MoneyManagementInboundTransferBankDebitQueuedEvent as V2MoneyManagementInboundTransferBankDebitQueuedEvent, + V2MoneyManagementInboundTransferBankDebitQueuedEventNotification as V2MoneyManagementInboundTransferBankDebitQueuedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_returned_event import ( + V2MoneyManagementInboundTransferBankDebitReturnedEvent as V2MoneyManagementInboundTransferBankDebitReturnedEvent, + V2MoneyManagementInboundTransferBankDebitReturnedEventNotification as V2MoneyManagementInboundTransferBankDebitReturnedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_succeeded_event import ( + V2MoneyManagementInboundTransferBankDebitSucceededEvent as V2MoneyManagementInboundTransferBankDebitSucceededEvent, + V2MoneyManagementInboundTransferBankDebitSucceededEventNotification as V2MoneyManagementInboundTransferBankDebitSucceededEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_canceled_event import ( + V2MoneyManagementOutboundPaymentCanceledEvent as V2MoneyManagementOutboundPaymentCanceledEvent, + V2MoneyManagementOutboundPaymentCanceledEventNotification as V2MoneyManagementOutboundPaymentCanceledEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_created_event import ( + V2MoneyManagementOutboundPaymentCreatedEvent as V2MoneyManagementOutboundPaymentCreatedEvent, + V2MoneyManagementOutboundPaymentCreatedEventNotification as V2MoneyManagementOutboundPaymentCreatedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_failed_event import ( + V2MoneyManagementOutboundPaymentFailedEvent as V2MoneyManagementOutboundPaymentFailedEvent, + V2MoneyManagementOutboundPaymentFailedEventNotification as V2MoneyManagementOutboundPaymentFailedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_posted_event import ( + V2MoneyManagementOutboundPaymentPostedEvent as V2MoneyManagementOutboundPaymentPostedEvent, + V2MoneyManagementOutboundPaymentPostedEventNotification as V2MoneyManagementOutboundPaymentPostedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_returned_event import ( + V2MoneyManagementOutboundPaymentReturnedEvent as V2MoneyManagementOutboundPaymentReturnedEvent, + V2MoneyManagementOutboundPaymentReturnedEventNotification as V2MoneyManagementOutboundPaymentReturnedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_under_review_event import ( + V2MoneyManagementOutboundPaymentUnderReviewEvent as V2MoneyManagementOutboundPaymentUnderReviewEvent, + V2MoneyManagementOutboundPaymentUnderReviewEventNotification as V2MoneyManagementOutboundPaymentUnderReviewEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_updated_event import ( + V2MoneyManagementOutboundPaymentUpdatedEvent as V2MoneyManagementOutboundPaymentUpdatedEvent, + V2MoneyManagementOutboundPaymentUpdatedEventNotification as V2MoneyManagementOutboundPaymentUpdatedEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_canceled_event import ( + V2MoneyManagementPayoutIntentCanceledEvent as V2MoneyManagementPayoutIntentCanceledEvent, + V2MoneyManagementPayoutIntentCanceledEventNotification as V2MoneyManagementPayoutIntentCanceledEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_created_event import ( + V2MoneyManagementPayoutIntentCreatedEvent as V2MoneyManagementPayoutIntentCreatedEvent, + V2MoneyManagementPayoutIntentCreatedEventNotification as V2MoneyManagementPayoutIntentCreatedEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_pending_event import ( + V2MoneyManagementPayoutIntentPendingEvent as V2MoneyManagementPayoutIntentPendingEvent, + V2MoneyManagementPayoutIntentPendingEventNotification as V2MoneyManagementPayoutIntentPendingEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_posted_event import ( + V2MoneyManagementPayoutIntentPostedEvent as V2MoneyManagementPayoutIntentPostedEvent, + V2MoneyManagementPayoutIntentPostedEventNotification as V2MoneyManagementPayoutIntentPostedEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_processing_event import ( + V2MoneyManagementPayoutIntentProcessingEvent as V2MoneyManagementPayoutIntentProcessingEvent, + V2MoneyManagementPayoutIntentProcessingEventNotification as V2MoneyManagementPayoutIntentProcessingEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_requires_action_event import ( + V2MoneyManagementPayoutIntentRequiresActionEvent as V2MoneyManagementPayoutIntentRequiresActionEvent, + V2MoneyManagementPayoutIntentRequiresActionEventNotification as V2MoneyManagementPayoutIntentRequiresActionEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_updated_event import ( + V2MoneyManagementPayoutIntentUpdatedEvent as V2MoneyManagementPayoutIntentUpdatedEvent, + V2MoneyManagementPayoutIntentUpdatedEventNotification as V2MoneyManagementPayoutIntentUpdatedEventNotification, + ) + from stripe.events._v2_money_management_payout_method_created_event import ( + V2MoneyManagementPayoutMethodCreatedEvent as V2MoneyManagementPayoutMethodCreatedEvent, + V2MoneyManagementPayoutMethodCreatedEventNotification as V2MoneyManagementPayoutMethodCreatedEventNotification, + ) + from stripe.events._v2_money_management_payout_method_updated_event import ( + V2MoneyManagementPayoutMethodUpdatedEvent as V2MoneyManagementPayoutMethodUpdatedEvent, + V2MoneyManagementPayoutMethodUpdatedEventNotification as V2MoneyManagementPayoutMethodUpdatedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_available_event import ( + V2MoneyManagementReceivedCreditAvailableEvent as V2MoneyManagementReceivedCreditAvailableEvent, + V2MoneyManagementReceivedCreditAvailableEventNotification as V2MoneyManagementReceivedCreditAvailableEventNotification, + ) + from stripe.events._v2_money_management_received_credit_failed_event import ( + V2MoneyManagementReceivedCreditFailedEvent as V2MoneyManagementReceivedCreditFailedEvent, + V2MoneyManagementReceivedCreditFailedEventNotification as V2MoneyManagementReceivedCreditFailedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_returned_event import ( + V2MoneyManagementReceivedCreditReturnedEvent as V2MoneyManagementReceivedCreditReturnedEvent, + V2MoneyManagementReceivedCreditReturnedEventNotification as V2MoneyManagementReceivedCreditReturnedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_succeeded_event import ( + V2MoneyManagementReceivedCreditSucceededEvent as V2MoneyManagementReceivedCreditSucceededEvent, + V2MoneyManagementReceivedCreditSucceededEventNotification as V2MoneyManagementReceivedCreditSucceededEventNotification, + ) + from stripe.events._v2_money_management_recipient_verification_created_event import ( + V2MoneyManagementRecipientVerificationCreatedEvent as V2MoneyManagementRecipientVerificationCreatedEvent, + V2MoneyManagementRecipientVerificationCreatedEventNotification as V2MoneyManagementRecipientVerificationCreatedEventNotification, + ) + from stripe.events._v2_money_management_recipient_verification_updated_event import ( + V2MoneyManagementRecipientVerificationUpdatedEvent as V2MoneyManagementRecipientVerificationUpdatedEvent, + V2MoneyManagementRecipientVerificationUpdatedEventNotification as V2MoneyManagementRecipientVerificationUpdatedEventNotification, + ) + from stripe.events._v2_money_management_transaction_created_event import ( + V2MoneyManagementTransactionCreatedEvent as V2MoneyManagementTransactionCreatedEvent, + V2MoneyManagementTransactionCreatedEventNotification as V2MoneyManagementTransactionCreatedEventNotification, + ) + from stripe.events._v2_money_management_transaction_updated_event import ( + V2MoneyManagementTransactionUpdatedEvent as V2MoneyManagementTransactionUpdatedEvent, + V2MoneyManagementTransactionUpdatedEventNotification as V2MoneyManagementTransactionUpdatedEventNotification, + ) # name -> (import_target, is_submodule) _import_map = { @@ -1444,6 +1788,14 @@ "stripe.events._v1_customer_discount_deleted_event", False, ), + "V1CustomerDiscountSourceChangedEvent": ( + "stripe.events._v1_customer_discount_source_changed_event", + False, + ), + "V1CustomerDiscountSourceChangedEventNotification": ( + "stripe.events._v1_customer_discount_source_changed_event", + False, + ), "V1CustomerDiscountUpdatedEvent": ( "stripe.events._v1_customer_discount_updated_event", False, @@ -1452,6 +1804,22 @@ "stripe.events._v1_customer_discount_updated_event", False, ), + "V1CustomerSubscriptionActiveEvent": ( + "stripe.events._v1_customer_subscription_active_event", + False, + ), + "V1CustomerSubscriptionActiveEventNotification": ( + "stripe.events._v1_customer_subscription_active_event", + False, + ), + "V1CustomerSubscriptionCancelAtChangedEvent": ( + "stripe.events._v1_customer_subscription_cancel_at_changed_event", + False, + ), + "V1CustomerSubscriptionCancelAtChangedEventNotification": ( + "stripe.events._v1_customer_subscription_cancel_at_changed_event", + False, + ), "V1CustomerSubscriptionCreatedEvent": ( "stripe.events._v1_customer_subscription_created_event", False, @@ -1460,6 +1828,14 @@ "stripe.events._v1_customer_subscription_created_event", False, ), + "V1CustomerSubscriptionDefaultPaymentMethodChangedEvent": ( + "stripe.events._v1_customer_subscription_default_payment_method_changed_event", + False, + ), + "V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification": ( + "stripe.events._v1_customer_subscription_default_payment_method_changed_event", + False, + ), "V1CustomerSubscriptionDeletedEvent": ( "stripe.events._v1_customer_subscription_deleted_event", False, @@ -1468,6 +1844,70 @@ "stripe.events._v1_customer_subscription_deleted_event", False, ), + "V1CustomerSubscriptionIncompleteEvent": ( + "stripe.events._v1_customer_subscription_incomplete_event", + False, + ), + "V1CustomerSubscriptionIncompleteEventNotification": ( + "stripe.events._v1_customer_subscription_incomplete_event", + False, + ), + "V1CustomerSubscriptionIncompleteExpiredEvent": ( + "stripe.events._v1_customer_subscription_incomplete_expired_event", + False, + ), + "V1CustomerSubscriptionIncompleteExpiredEventNotification": ( + "stripe.events._v1_customer_subscription_incomplete_expired_event", + False, + ), + "V1CustomerSubscriptionItemAddedEvent": ( + "stripe.events._v1_customer_subscription_item_added_event", + False, + ), + "V1CustomerSubscriptionItemAddedEventNotification": ( + "stripe.events._v1_customer_subscription_item_added_event", + False, + ), + "V1CustomerSubscriptionItemPriceChangedEvent": ( + "stripe.events._v1_customer_subscription_item_price_changed_event", + False, + ), + "V1CustomerSubscriptionItemPriceChangedEventNotification": ( + "stripe.events._v1_customer_subscription_item_price_changed_event", + False, + ), + "V1CustomerSubscriptionItemQuantityChangedEvent": ( + "stripe.events._v1_customer_subscription_item_quantity_changed_event", + False, + ), + "V1CustomerSubscriptionItemQuantityChangedEventNotification": ( + "stripe.events._v1_customer_subscription_item_quantity_changed_event", + False, + ), + "V1CustomerSubscriptionItemRemovedEvent": ( + "stripe.events._v1_customer_subscription_item_removed_event", + False, + ), + "V1CustomerSubscriptionItemRemovedEventNotification": ( + "stripe.events._v1_customer_subscription_item_removed_event", + False, + ), + "V1CustomerSubscriptionItemTaxRatesChangedEvent": ( + "stripe.events._v1_customer_subscription_item_tax_rates_changed_event", + False, + ), + "V1CustomerSubscriptionItemTaxRatesChangedEventNotification": ( + "stripe.events._v1_customer_subscription_item_tax_rates_changed_event", + False, + ), + "V1CustomerSubscriptionPastDueEvent": ( + "stripe.events._v1_customer_subscription_past_due_event", + False, + ), + "V1CustomerSubscriptionPastDueEventNotification": ( + "stripe.events._v1_customer_subscription_past_due_event", + False, + ), "V1CustomerSubscriptionPausedEvent": ( "stripe.events._v1_customer_subscription_paused_event", False, @@ -1508,6 +1948,22 @@ "stripe.events._v1_customer_subscription_trial_will_end_event", False, ), + "V1CustomerSubscriptionTrialingEvent": ( + "stripe.events._v1_customer_subscription_trialing_event", + False, + ), + "V1CustomerSubscriptionTrialingEventNotification": ( + "stripe.events._v1_customer_subscription_trialing_event", + False, + ), + "V1CustomerSubscriptionUnpaidEvent": ( + "stripe.events._v1_customer_subscription_unpaid_event", + False, + ), + "V1CustomerSubscriptionUnpaidEventNotification": ( + "stripe.events._v1_customer_subscription_unpaid_event", + False, + ), "V1CustomerSubscriptionUpdatedEvent": ( "stripe.events._v1_customer_subscription_updated_event", False, @@ -1548,6 +2004,22 @@ "stripe.events._v1_customer_updated_event", False, ), + "V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent": ( + "stripe.events._v1_entitlements_active_entitlement_summary_entitlement_added_event", + False, + ), + "V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification": ( + "stripe.events._v1_entitlements_active_entitlement_summary_entitlement_added_event", + False, + ), + "V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent": ( + "stripe.events._v1_entitlements_active_entitlement_summary_entitlement_removed_event", + False, + ), + "V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification": ( + "stripe.events._v1_entitlements_active_entitlement_summary_entitlement_removed_event", + False, + ), "V1EntitlementsActiveEntitlementSummaryUpdatedEvent": ( "stripe.events._v1_entitlements_active_entitlement_summary_updated_event", False, @@ -1569,6 +2041,22 @@ "stripe.events._v1_financial_connections_account_account_numbers_updated_event", False, ), + "V1FinancialConnectionsAccountBalanceRefreshFailedEvent": ( + "stripe.events._v1_financial_connections_account_balance_refresh_failed_event", + False, + ), + "V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification": ( + "stripe.events._v1_financial_connections_account_balance_refresh_failed_event", + False, + ), + "V1FinancialConnectionsAccountBalanceRefreshSucceededEvent": ( + "stripe.events._v1_financial_connections_account_balance_refresh_succeeded_event", + False, + ), + "V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification": ( + "stripe.events._v1_financial_connections_account_balance_refresh_succeeded_event", + False, + ), "V1FinancialConnectionsAccountCreatedEvent": ( "stripe.events._v1_financial_connections_account_created_event", False, @@ -1601,6 +2089,38 @@ "stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event", False, ), + "V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent": ( + "stripe.events._v1_financial_connections_account_inferred_balances_refresh_failed_event", + False, + ), + "V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification": ( + "stripe.events._v1_financial_connections_account_inferred_balances_refresh_failed_event", + False, + ), + "V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent": ( + "stripe.events._v1_financial_connections_account_inferred_balances_refresh_succeeded_event", + False, + ), + "V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification": ( + "stripe.events._v1_financial_connections_account_inferred_balances_refresh_succeeded_event", + False, + ), + "V1FinancialConnectionsAccountOwnershipRefreshFailedEvent": ( + "stripe.events._v1_financial_connections_account_ownership_refresh_failed_event", + False, + ), + "V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification": ( + "stripe.events._v1_financial_connections_account_ownership_refresh_failed_event", + False, + ), + "V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent": ( + "stripe.events._v1_financial_connections_account_ownership_refresh_succeeded_event", + False, + ), + "V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification": ( + "stripe.events._v1_financial_connections_account_ownership_refresh_succeeded_event", + False, + ), "V1FinancialConnectionsAccountReactivatedEvent": ( "stripe.events._v1_financial_connections_account_reactivated_event", False, @@ -1633,6 +2153,22 @@ "stripe.events._v1_financial_connections_account_refreshed_transactions_event", False, ), + "V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent": ( + "stripe.events._v1_financial_connections_account_risk_intelligence_refresh_failed_event", + False, + ), + "V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification": ( + "stripe.events._v1_financial_connections_account_risk_intelligence_refresh_failed_event", + False, + ), + "V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent": ( + "stripe.events._v1_financial_connections_account_risk_intelligence_refresh_succeeded_event", + False, + ), + "V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification": ( + "stripe.events._v1_financial_connections_account_risk_intelligence_refresh_succeeded_event", + False, + ), "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent": ( "stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event", False, @@ -1641,6 +2177,22 @@ "stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event", False, ), + "V1FinancialConnectionsAccountTransactionsRefreshFailedEvent": ( + "stripe.events._v1_financial_connections_account_transactions_refresh_failed_event", + False, + ), + "V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification": ( + "stripe.events._v1_financial_connections_account_transactions_refresh_failed_event", + False, + ), + "V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent": ( + "stripe.events._v1_financial_connections_account_transactions_refresh_succeeded_event", + False, + ), + "V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification": ( + "stripe.events._v1_financial_connections_account_transactions_refresh_succeeded_event", + False, + ), "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent": ( "stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event", False, @@ -1721,6 +2273,22 @@ "stripe.events._v1_invoice_deleted_event", False, ), + "V1InvoiceDiscountAddedEvent": ( + "stripe.events._v1_invoice_discount_added_event", + False, + ), + "V1InvoiceDiscountAddedEventNotification": ( + "stripe.events._v1_invoice_discount_added_event", + False, + ), + "V1InvoiceDiscountRemovedEvent": ( + "stripe.events._v1_invoice_discount_removed_event", + False, + ), + "V1InvoiceDiscountRemovedEventNotification": ( + "stripe.events._v1_invoice_discount_removed_event", + False, + ), "V1InvoiceFinalizationFailedEvent": ( "stripe.events._v1_invoice_finalization_failed_event", False, @@ -1737,6 +2305,38 @@ "stripe.events._v1_invoice_finalized_event", False, ), + "V1InvoiceLineItemAddedEvent": ( + "stripe.events._v1_invoice_line_item_added_event", + False, + ), + "V1InvoiceLineItemAddedEventNotification": ( + "stripe.events._v1_invoice_line_item_added_event", + False, + ), + "V1InvoiceLineItemPricingChangedEvent": ( + "stripe.events._v1_invoice_line_item_pricing_changed_event", + False, + ), + "V1InvoiceLineItemPricingChangedEventNotification": ( + "stripe.events._v1_invoice_line_item_pricing_changed_event", + False, + ), + "V1InvoiceLineItemQuantityChangedEvent": ( + "stripe.events._v1_invoice_line_item_quantity_changed_event", + False, + ), + "V1InvoiceLineItemQuantityChangedEventNotification": ( + "stripe.events._v1_invoice_line_item_quantity_changed_event", + False, + ), + "V1InvoiceLineItemRemovedEvent": ( + "stripe.events._v1_invoice_line_item_removed_event", + False, + ), + "V1InvoiceLineItemRemovedEventNotification": ( + "stripe.events._v1_invoice_line_item_removed_event", + False, + ), "V1InvoiceMarkedUncollectibleEvent": ( "stripe.events._v1_invoice_marked_uncollectible_event", False, @@ -1782,6 +2382,14 @@ "stripe.events._v1_invoice_payment_attempt_required_event", False, ), + "V1InvoicePaymentCanceledEvent": ( + "stripe.events._v1_invoice_payment_canceled_event", + False, + ), + "V1InvoicePaymentCanceledEventNotification": ( + "stripe.events._v1_invoice_payment_canceled_event", + False, + ), "V1InvoicePaymentFailedEvent": ( "stripe.events._v1_invoice_payment_failed_event", False, @@ -1790,6 +2398,14 @@ "stripe.events._v1_invoice_payment_failed_event", False, ), + "V1InvoicePaymentOpenEvent": ( + "stripe.events._v1_invoice_payment_open_event", + False, + ), + "V1InvoicePaymentOpenEventNotification": ( + "stripe.events._v1_invoice_payment_open_event", + False, + ), "V1InvoicePaymentPaidEvent": ( "stripe.events._v1_invoice_payment_paid_event", False, @@ -1840,6 +2456,14 @@ "stripe.events._v1_invoice_will_be_due_event", False, ), + "V1InvoiceitemAmountChangedEvent": ( + "stripe.events._v1_invoiceitem_amount_changed_event", + False, + ), + "V1InvoiceitemAmountChangedEventNotification": ( + "stripe.events._v1_invoiceitem_amount_changed_event", + False, + ), "V1InvoiceitemCreatedEvent": ( "stripe.events._v1_invoiceitem_created_event", False, @@ -1856,6 +2480,22 @@ "stripe.events._v1_invoiceitem_deleted_event", False, ), + "V1InvoiceitemDiscountAddedEvent": ( + "stripe.events._v1_invoiceitem_discount_added_event", + False, + ), + "V1InvoiceitemDiscountAddedEventNotification": ( + "stripe.events._v1_invoiceitem_discount_added_event", + False, + ), + "V1InvoiceitemDiscountRemovedEvent": ( + "stripe.events._v1_invoiceitem_discount_removed_event", + False, + ), + "V1InvoiceitemDiscountRemovedEventNotification": ( + "stripe.events._v1_invoiceitem_discount_removed_event", + False, + ), "V1IssuingAuthorizationCreatedEvent": ( "stripe.events._v1_issuing_authorization_created_event", False, @@ -2218,21 +2858,61 @@ "stripe.events._v1_plan_updated_event", False, ), + "V1PriceActivatedEvent": ( + "stripe.events._v1_price_activated_event", + False, + ), + "V1PriceActivatedEventNotification": ( + "stripe.events._v1_price_activated_event", + False, + ), "V1PriceCreatedEvent": ("stripe.events._v1_price_created_event", False), "V1PriceCreatedEventNotification": ( "stripe.events._v1_price_created_event", False, ), + "V1PriceDeactivatedEvent": ( + "stripe.events._v1_price_deactivated_event", + False, + ), + "V1PriceDeactivatedEventNotification": ( + "stripe.events._v1_price_deactivated_event", + False, + ), "V1PriceDeletedEvent": ("stripe.events._v1_price_deleted_event", False), "V1PriceDeletedEventNotification": ( "stripe.events._v1_price_deleted_event", False, ), + "V1PriceLookupKeyChangedEvent": ( + "stripe.events._v1_price_lookup_key_changed_event", + False, + ), + "V1PriceLookupKeyChangedEventNotification": ( + "stripe.events._v1_price_lookup_key_changed_event", + False, + ), + "V1PriceTaxBehaviorChangedEvent": ( + "stripe.events._v1_price_tax_behavior_changed_event", + False, + ), + "V1PriceTaxBehaviorChangedEventNotification": ( + "stripe.events._v1_price_tax_behavior_changed_event", + False, + ), "V1PriceUpdatedEvent": ("stripe.events._v1_price_updated_event", False), "V1PriceUpdatedEventNotification": ( "stripe.events._v1_price_updated_event", False, ), + "V1ProductActivatedEvent": ( + "stripe.events._v1_product_activated_event", + False, + ), + "V1ProductActivatedEventNotification": ( + "stripe.events._v1_product_activated_event", + False, + ), "V1ProductCreatedEvent": ( "stripe.events._v1_product_created_event", False, @@ -2241,6 +2921,22 @@ "stripe.events._v1_product_created_event", False, ), + "V1ProductDeactivatedEvent": ( + "stripe.events._v1_product_deactivated_event", + False, + ), + "V1ProductDeactivatedEventNotification": ( + "stripe.events._v1_product_deactivated_event", + False, + ), + "V1ProductDefaultPriceChangedEvent": ( + "stripe.events._v1_product_default_price_changed_event", + False, + ), + "V1ProductDefaultPriceChangedEventNotification": ( + "stripe.events._v1_product_default_price_changed_event", + False, + ), "V1ProductDeletedEvent": ( "stripe.events._v1_product_deleted_event", False, @@ -2249,6 +2945,14 @@ "stripe.events._v1_product_deleted_event", False, ), + "V1ProductTaxCodeChangedEvent": ( + "stripe.events._v1_product_tax_code_changed_event", + False, + ), + "V1ProductTaxCodeChangedEventNotification": ( + "stripe.events._v1_product_tax_code_changed_event", + False, + ), "V1ProductUpdatedEvent": ( "stripe.events._v1_product_updated_event", False, @@ -2265,6 +2969,14 @@ "stripe.events._v1_promotion_code_created_event", False, ), + "V1PromotionCodeFullyRedeemedEvent": ( + "stripe.events._v1_promotion_code_fully_redeemed_event", + False, + ), + "V1PromotionCodeFullyRedeemedEventNotification": ( + "stripe.events._v1_promotion_code_fully_redeemed_event", + False, + ), "V1PromotionCodeUpdatedEvent": ( "stripe.events._v1_promotion_code_updated_event", False, @@ -2454,6 +3166,46 @@ "stripe.events._v1_subscription_schedule_expiring_event", False, ), + "V1SubscriptionSchedulePhaseAddedEvent": ( + "stripe.events._v1_subscription_schedule_phase_added_event", + False, + ), + "V1SubscriptionSchedulePhaseAddedEventNotification": ( + "stripe.events._v1_subscription_schedule_phase_added_event", + False, + ), + "V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent": ( + "stripe.events._v1_subscription_schedule_phase_default_tax_rates_changed_event", + False, + ), + "V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification": ( + "stripe.events._v1_subscription_schedule_phase_default_tax_rates_changed_event", + False, + ), + "V1SubscriptionSchedulePhaseEndDateChangedEvent": ( + "stripe.events._v1_subscription_schedule_phase_end_date_changed_event", + False, + ), + "V1SubscriptionSchedulePhaseEndDateChangedEventNotification": ( + "stripe.events._v1_subscription_schedule_phase_end_date_changed_event", + False, + ), + "V1SubscriptionSchedulePhaseRemovedEvent": ( + "stripe.events._v1_subscription_schedule_phase_removed_event", + False, + ), + "V1SubscriptionSchedulePhaseRemovedEventNotification": ( + "stripe.events._v1_subscription_schedule_phase_removed_event", + False, + ), + "V1SubscriptionSchedulePhaseTrialEndChangedEvent": ( + "stripe.events._v1_subscription_schedule_phase_trial_end_changed_event", + False, + ), + "V1SubscriptionSchedulePhaseTrialEndChangedEventNotification": ( + "stripe.events._v1_subscription_schedule_phase_trial_end_changed_event", + False, + ), "V1SubscriptionScheduleReleasedEvent": ( "stripe.events._v1_subscription_schedule_released_event", False, @@ -2786,6 +3538,286 @@ "stripe.events._v2_core_event_destination_ping_event", False, ), + "V2MoneyManagementAdjustmentCreatedEvent": ( + "stripe.events._v2_money_management_adjustment_created_event", + False, + ), + "V2MoneyManagementAdjustmentCreatedEventNotification": ( + "stripe.events._v2_money_management_adjustment_created_event", + False, + ), + "V2MoneyManagementFinancialAccountCreatedEvent": ( + "stripe.events._v2_money_management_financial_account_created_event", + False, + ), + "V2MoneyManagementFinancialAccountCreatedEventNotification": ( + "stripe.events._v2_money_management_financial_account_created_event", + False, + ), + "V2MoneyManagementFinancialAccountUpdatedEvent": ( + "stripe.events._v2_money_management_financial_account_updated_event", + False, + ), + "V2MoneyManagementFinancialAccountUpdatedEventNotification": ( + "stripe.events._v2_money_management_financial_account_updated_event", + False, + ), + "V2MoneyManagementFinancialAddressActivatedEvent": ( + "stripe.events._v2_money_management_financial_address_activated_event", + False, + ), + "V2MoneyManagementFinancialAddressActivatedEventNotification": ( + "stripe.events._v2_money_management_financial_address_activated_event", + False, + ), + "V2MoneyManagementFinancialAddressFailedEvent": ( + "stripe.events._v2_money_management_financial_address_failed_event", + False, + ), + "V2MoneyManagementFinancialAddressFailedEventNotification": ( + "stripe.events._v2_money_management_financial_address_failed_event", + False, + ), + "V2MoneyManagementInboundTransferAvailableEvent": ( + "stripe.events._v2_money_management_inbound_transfer_available_event", + False, + ), + "V2MoneyManagementInboundTransferAvailableEventNotification": ( + "stripe.events._v2_money_management_inbound_transfer_available_event", + False, + ), + "V2MoneyManagementInboundTransferBankDebitFailedEvent": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_failed_event", + False, + ), + "V2MoneyManagementInboundTransferBankDebitFailedEventNotification": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_failed_event", + False, + ), + "V2MoneyManagementInboundTransferBankDebitProcessingEvent": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_processing_event", + False, + ), + "V2MoneyManagementInboundTransferBankDebitProcessingEventNotification": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_processing_event", + False, + ), + "V2MoneyManagementInboundTransferBankDebitQueuedEvent": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_queued_event", + False, + ), + "V2MoneyManagementInboundTransferBankDebitQueuedEventNotification": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_queued_event", + False, + ), + "V2MoneyManagementInboundTransferBankDebitReturnedEvent": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_returned_event", + False, + ), + "V2MoneyManagementInboundTransferBankDebitReturnedEventNotification": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_returned_event", + False, + ), + "V2MoneyManagementInboundTransferBankDebitSucceededEvent": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_succeeded_event", + False, + ), + "V2MoneyManagementInboundTransferBankDebitSucceededEventNotification": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_succeeded_event", + False, + ), + "V2MoneyManagementOutboundPaymentCanceledEvent": ( + "stripe.events._v2_money_management_outbound_payment_canceled_event", + False, + ), + "V2MoneyManagementOutboundPaymentCanceledEventNotification": ( + "stripe.events._v2_money_management_outbound_payment_canceled_event", + False, + ), + "V2MoneyManagementOutboundPaymentCreatedEvent": ( + "stripe.events._v2_money_management_outbound_payment_created_event", + False, + ), + "V2MoneyManagementOutboundPaymentCreatedEventNotification": ( + "stripe.events._v2_money_management_outbound_payment_created_event", + False, + ), + "V2MoneyManagementOutboundPaymentFailedEvent": ( + "stripe.events._v2_money_management_outbound_payment_failed_event", + False, + ), + "V2MoneyManagementOutboundPaymentFailedEventNotification": ( + "stripe.events._v2_money_management_outbound_payment_failed_event", + False, + ), + "V2MoneyManagementOutboundPaymentPostedEvent": ( + "stripe.events._v2_money_management_outbound_payment_posted_event", + False, + ), + "V2MoneyManagementOutboundPaymentPostedEventNotification": ( + "stripe.events._v2_money_management_outbound_payment_posted_event", + False, + ), + "V2MoneyManagementOutboundPaymentReturnedEvent": ( + "stripe.events._v2_money_management_outbound_payment_returned_event", + False, + ), + "V2MoneyManagementOutboundPaymentReturnedEventNotification": ( + "stripe.events._v2_money_management_outbound_payment_returned_event", + False, + ), + "V2MoneyManagementOutboundPaymentUnderReviewEvent": ( + "stripe.events._v2_money_management_outbound_payment_under_review_event", + False, + ), + "V2MoneyManagementOutboundPaymentUnderReviewEventNotification": ( + "stripe.events._v2_money_management_outbound_payment_under_review_event", + False, + ), + "V2MoneyManagementOutboundPaymentUpdatedEvent": ( + "stripe.events._v2_money_management_outbound_payment_updated_event", + False, + ), + "V2MoneyManagementOutboundPaymentUpdatedEventNotification": ( + "stripe.events._v2_money_management_outbound_payment_updated_event", + False, + ), + "V2MoneyManagementPayoutIntentCanceledEvent": ( + "stripe.events._v2_money_management_payout_intent_canceled_event", + False, + ), + "V2MoneyManagementPayoutIntentCanceledEventNotification": ( + "stripe.events._v2_money_management_payout_intent_canceled_event", + False, + ), + "V2MoneyManagementPayoutIntentCreatedEvent": ( + "stripe.events._v2_money_management_payout_intent_created_event", + False, + ), + "V2MoneyManagementPayoutIntentCreatedEventNotification": ( + "stripe.events._v2_money_management_payout_intent_created_event", + False, + ), + "V2MoneyManagementPayoutIntentPendingEvent": ( + "stripe.events._v2_money_management_payout_intent_pending_event", + False, + ), + "V2MoneyManagementPayoutIntentPendingEventNotification": ( + "stripe.events._v2_money_management_payout_intent_pending_event", + False, + ), + "V2MoneyManagementPayoutIntentPostedEvent": ( + "stripe.events._v2_money_management_payout_intent_posted_event", + False, + ), + "V2MoneyManagementPayoutIntentPostedEventNotification": ( + "stripe.events._v2_money_management_payout_intent_posted_event", + False, + ), + "V2MoneyManagementPayoutIntentProcessingEvent": ( + "stripe.events._v2_money_management_payout_intent_processing_event", + False, + ), + "V2MoneyManagementPayoutIntentProcessingEventNotification": ( + "stripe.events._v2_money_management_payout_intent_processing_event", + False, + ), + "V2MoneyManagementPayoutIntentRequiresActionEvent": ( + "stripe.events._v2_money_management_payout_intent_requires_action_event", + False, + ), + "V2MoneyManagementPayoutIntentRequiresActionEventNotification": ( + "stripe.events._v2_money_management_payout_intent_requires_action_event", + False, + ), + "V2MoneyManagementPayoutIntentUpdatedEvent": ( + "stripe.events._v2_money_management_payout_intent_updated_event", + False, + ), + "V2MoneyManagementPayoutIntentUpdatedEventNotification": ( + "stripe.events._v2_money_management_payout_intent_updated_event", + False, + ), + "V2MoneyManagementPayoutMethodCreatedEvent": ( + "stripe.events._v2_money_management_payout_method_created_event", + False, + ), + "V2MoneyManagementPayoutMethodCreatedEventNotification": ( + "stripe.events._v2_money_management_payout_method_created_event", + False, + ), + "V2MoneyManagementPayoutMethodUpdatedEvent": ( + "stripe.events._v2_money_management_payout_method_updated_event", + False, + ), + "V2MoneyManagementPayoutMethodUpdatedEventNotification": ( + "stripe.events._v2_money_management_payout_method_updated_event", + False, + ), + "V2MoneyManagementReceivedCreditAvailableEvent": ( + "stripe.events._v2_money_management_received_credit_available_event", + False, + ), + "V2MoneyManagementReceivedCreditAvailableEventNotification": ( + "stripe.events._v2_money_management_received_credit_available_event", + False, + ), + "V2MoneyManagementReceivedCreditFailedEvent": ( + "stripe.events._v2_money_management_received_credit_failed_event", + False, + ), + "V2MoneyManagementReceivedCreditFailedEventNotification": ( + "stripe.events._v2_money_management_received_credit_failed_event", + False, + ), + "V2MoneyManagementReceivedCreditReturnedEvent": ( + "stripe.events._v2_money_management_received_credit_returned_event", + False, + ), + "V2MoneyManagementReceivedCreditReturnedEventNotification": ( + "stripe.events._v2_money_management_received_credit_returned_event", + False, + ), + "V2MoneyManagementReceivedCreditSucceededEvent": ( + "stripe.events._v2_money_management_received_credit_succeeded_event", + False, + ), + "V2MoneyManagementReceivedCreditSucceededEventNotification": ( + "stripe.events._v2_money_management_received_credit_succeeded_event", + False, + ), + "V2MoneyManagementRecipientVerificationCreatedEvent": ( + "stripe.events._v2_money_management_recipient_verification_created_event", + False, + ), + "V2MoneyManagementRecipientVerificationCreatedEventNotification": ( + "stripe.events._v2_money_management_recipient_verification_created_event", + False, + ), + "V2MoneyManagementRecipientVerificationUpdatedEvent": ( + "stripe.events._v2_money_management_recipient_verification_updated_event", + False, + ), + "V2MoneyManagementRecipientVerificationUpdatedEventNotification": ( + "stripe.events._v2_money_management_recipient_verification_updated_event", + False, + ), + "V2MoneyManagementTransactionCreatedEvent": ( + "stripe.events._v2_money_management_transaction_created_event", + False, + ), + "V2MoneyManagementTransactionCreatedEventNotification": ( + "stripe.events._v2_money_management_transaction_created_event", + False, + ), + "V2MoneyManagementTransactionUpdatedEvent": ( + "stripe.events._v2_money_management_transaction_updated_event", + False, + ), + "V2MoneyManagementTransactionUpdatedEventNotification": ( + "stripe.events._v2_money_management_transaction_updated_event", + False, + ), } if not TYPE_CHECKING: diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py index ab1a8bbe7..bb3e32ef0 100644 --- a/stripe/events/_event_classes.py +++ b/stripe/events/_event_classes.py @@ -190,15 +190,51 @@ from stripe.events._v1_customer_discount_deleted_event import ( V1CustomerDiscountDeletedEventNotification, ) + from stripe.events._v1_customer_discount_source_changed_event import ( + V1CustomerDiscountSourceChangedEventNotification, + ) from stripe.events._v1_customer_discount_updated_event import ( V1CustomerDiscountUpdatedEventNotification, ) + from stripe.events._v1_customer_subscription_active_event import ( + V1CustomerSubscriptionActiveEventNotification, + ) + from stripe.events._v1_customer_subscription_cancel_at_changed_event import ( + V1CustomerSubscriptionCancelAtChangedEventNotification, + ) from stripe.events._v1_customer_subscription_created_event import ( V1CustomerSubscriptionCreatedEventNotification, ) + from stripe.events._v1_customer_subscription_default_payment_method_changed_event import ( + V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification, + ) from stripe.events._v1_customer_subscription_deleted_event import ( V1CustomerSubscriptionDeletedEventNotification, ) + from stripe.events._v1_customer_subscription_incomplete_event import ( + V1CustomerSubscriptionIncompleteEventNotification, + ) + from stripe.events._v1_customer_subscription_incomplete_expired_event import ( + V1CustomerSubscriptionIncompleteExpiredEventNotification, + ) + from stripe.events._v1_customer_subscription_item_added_event import ( + V1CustomerSubscriptionItemAddedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_price_changed_event import ( + V1CustomerSubscriptionItemPriceChangedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_quantity_changed_event import ( + V1CustomerSubscriptionItemQuantityChangedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_removed_event import ( + V1CustomerSubscriptionItemRemovedEventNotification, + ) + from stripe.events._v1_customer_subscription_item_tax_rates_changed_event import ( + V1CustomerSubscriptionItemTaxRatesChangedEventNotification, + ) + from stripe.events._v1_customer_subscription_past_due_event import ( + V1CustomerSubscriptionPastDueEventNotification, + ) from stripe.events._v1_customer_subscription_paused_event import ( V1CustomerSubscriptionPausedEventNotification, ) @@ -211,9 +247,15 @@ from stripe.events._v1_customer_subscription_resumed_event import ( V1CustomerSubscriptionResumedEventNotification, ) + from stripe.events._v1_customer_subscription_trialing_event import ( + V1CustomerSubscriptionTrialingEventNotification, + ) from stripe.events._v1_customer_subscription_trial_will_end_event import ( V1CustomerSubscriptionTrialWillEndEventNotification, ) + from stripe.events._v1_customer_subscription_unpaid_event import ( + V1CustomerSubscriptionUnpaidEventNotification, + ) from stripe.events._v1_customer_subscription_updated_event import ( V1CustomerSubscriptionUpdatedEventNotification, ) @@ -229,6 +271,12 @@ from stripe.events._v1_customer_updated_event import ( V1CustomerUpdatedEventNotification, ) + from stripe.events._v1_entitlements_active_entitlement_summary_entitlement_added_event import ( + V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification, + ) + from stripe.events._v1_entitlements_active_entitlement_summary_entitlement_removed_event import ( + V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification, + ) from stripe.events._v1_entitlements_active_entitlement_summary_updated_event import ( V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification, ) @@ -238,6 +286,12 @@ from stripe.events._v1_financial_connections_account_account_numbers_updated_event import ( V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification, ) + from stripe.events._v1_financial_connections_account_balance_refresh_failed_event import ( + V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_balance_refresh_succeeded_event import ( + V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_created_event import ( V1FinancialConnectionsAccountCreatedEventNotification, ) @@ -250,6 +304,18 @@ from stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event import ( V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification, ) + from stripe.events._v1_financial_connections_account_inferred_balances_refresh_failed_event import ( + V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_inferred_balances_refresh_succeeded_event import ( + V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification, + ) + from stripe.events._v1_financial_connections_account_ownership_refresh_failed_event import ( + V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_ownership_refresh_succeeded_event import ( + V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_reactivated_event import ( V1FinancialConnectionsAccountReactivatedEventNotification, ) @@ -262,9 +328,21 @@ from stripe.events._v1_financial_connections_account_refreshed_transactions_event import ( V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, ) + from stripe.events._v1_financial_connections_account_risk_intelligence_refresh_failed_event import ( + V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_risk_intelligence_refresh_succeeded_event import ( + V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event import ( V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification, ) + from stripe.events._v1_financial_connections_account_transactions_refresh_failed_event import ( + V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification, + ) + from stripe.events._v1_financial_connections_account_transactions_refresh_succeeded_event import ( + V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification, + ) from stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event import ( V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification, ) @@ -295,18 +373,45 @@ from stripe.events._v1_invoice_deleted_event import ( V1InvoiceDeletedEventNotification, ) + from stripe.events._v1_invoice_discount_added_event import ( + V1InvoiceDiscountAddedEventNotification, + ) + from stripe.events._v1_invoice_discount_removed_event import ( + V1InvoiceDiscountRemovedEventNotification, + ) from stripe.events._v1_invoice_finalization_failed_event import ( V1InvoiceFinalizationFailedEventNotification, ) from stripe.events._v1_invoice_finalized_event import ( V1InvoiceFinalizedEventNotification, ) + from stripe.events._v1_invoiceitem_amount_changed_event import ( + V1InvoiceitemAmountChangedEventNotification, + ) from stripe.events._v1_invoiceitem_created_event import ( V1InvoiceitemCreatedEventNotification, ) from stripe.events._v1_invoiceitem_deleted_event import ( V1InvoiceitemDeletedEventNotification, ) + from stripe.events._v1_invoiceitem_discount_added_event import ( + V1InvoiceitemDiscountAddedEventNotification, + ) + from stripe.events._v1_invoiceitem_discount_removed_event import ( + V1InvoiceitemDiscountRemovedEventNotification, + ) + from stripe.events._v1_invoice_line_item_added_event import ( + V1InvoiceLineItemAddedEventNotification, + ) + from stripe.events._v1_invoice_line_item_pricing_changed_event import ( + V1InvoiceLineItemPricingChangedEventNotification, + ) + from stripe.events._v1_invoice_line_item_quantity_changed_event import ( + V1InvoiceLineItemQuantityChangedEventNotification, + ) + from stripe.events._v1_invoice_line_item_removed_event import ( + V1InvoiceLineItemRemovedEventNotification, + ) from stripe.events._v1_invoice_marked_uncollectible_event import ( V1InvoiceMarkedUncollectibleEventNotification, ) @@ -325,9 +430,15 @@ from stripe.events._v1_invoice_payment_attempt_required_event import ( V1InvoicePaymentAttemptRequiredEventNotification, ) + from stripe.events._v1_invoice_payment_canceled_event import ( + V1InvoicePaymentCanceledEventNotification, + ) from stripe.events._v1_invoice_payment_failed_event import ( V1InvoicePaymentFailedEventNotification, ) + from stripe.events._v1_invoice_payment_open_event import ( + V1InvoicePaymentOpenEventNotification, + ) from stripe.events._v1_invoice_payment_paid_event import ( V1InvoicePaymentPaidEventNotification, ) @@ -496,27 +607,54 @@ from stripe.events._v1_plan_updated_event import ( V1PlanUpdatedEventNotification, ) + from stripe.events._v1_price_activated_event import ( + V1PriceActivatedEventNotification, + ) from stripe.events._v1_price_created_event import ( V1PriceCreatedEventNotification, ) + from stripe.events._v1_price_deactivated_event import ( + V1PriceDeactivatedEventNotification, + ) from stripe.events._v1_price_deleted_event import ( V1PriceDeletedEventNotification, ) + from stripe.events._v1_price_lookup_key_changed_event import ( + V1PriceLookupKeyChangedEventNotification, + ) + from stripe.events._v1_price_tax_behavior_changed_event import ( + V1PriceTaxBehaviorChangedEventNotification, + ) from stripe.events._v1_price_updated_event import ( V1PriceUpdatedEventNotification, ) + from stripe.events._v1_product_activated_event import ( + V1ProductActivatedEventNotification, + ) from stripe.events._v1_product_created_event import ( V1ProductCreatedEventNotification, ) + from stripe.events._v1_product_deactivated_event import ( + V1ProductDeactivatedEventNotification, + ) + from stripe.events._v1_product_default_price_changed_event import ( + V1ProductDefaultPriceChangedEventNotification, + ) from stripe.events._v1_product_deleted_event import ( V1ProductDeletedEventNotification, ) + from stripe.events._v1_product_tax_code_changed_event import ( + V1ProductTaxCodeChangedEventNotification, + ) from stripe.events._v1_product_updated_event import ( V1ProductUpdatedEventNotification, ) from stripe.events._v1_promotion_code_created_event import ( V1PromotionCodeCreatedEventNotification, ) + from stripe.events._v1_promotion_code_fully_redeemed_event import ( + V1PromotionCodeFullyRedeemedEventNotification, + ) from stripe.events._v1_promotion_code_updated_event import ( V1PromotionCodeUpdatedEventNotification, ) @@ -598,6 +736,21 @@ from stripe.events._v1_subscription_schedule_expiring_event import ( V1SubscriptionScheduleExpiringEventNotification, ) + from stripe.events._v1_subscription_schedule_phase_added_event import ( + V1SubscriptionSchedulePhaseAddedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_default_tax_rates_changed_event import ( + V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_end_date_changed_event import ( + V1SubscriptionSchedulePhaseEndDateChangedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_removed_event import ( + V1SubscriptionSchedulePhaseRemovedEventNotification, + ) + from stripe.events._v1_subscription_schedule_phase_trial_end_changed_event import ( + V1SubscriptionSchedulePhaseTrialEndChangedEventNotification, + ) from stripe.events._v1_subscription_schedule_released_event import ( V1SubscriptionScheduleReleasedEventNotification, ) @@ -727,6 +880,111 @@ from stripe.events._v2_core_event_destination_ping_event import ( V2CoreEventDestinationPingEventNotification, ) + from stripe.events._v2_money_management_adjustment_created_event import ( + V2MoneyManagementAdjustmentCreatedEventNotification, + ) + from stripe.events._v2_money_management_financial_account_created_event import ( + V2MoneyManagementFinancialAccountCreatedEventNotification, + ) + from stripe.events._v2_money_management_financial_account_updated_event import ( + V2MoneyManagementFinancialAccountUpdatedEventNotification, + ) + from stripe.events._v2_money_management_financial_address_activated_event import ( + V2MoneyManagementFinancialAddressActivatedEventNotification, + ) + from stripe.events._v2_money_management_financial_address_failed_event import ( + V2MoneyManagementFinancialAddressFailedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_available_event import ( + V2MoneyManagementInboundTransferAvailableEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_failed_event import ( + V2MoneyManagementInboundTransferBankDebitFailedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_processing_event import ( + V2MoneyManagementInboundTransferBankDebitProcessingEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_queued_event import ( + V2MoneyManagementInboundTransferBankDebitQueuedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_returned_event import ( + V2MoneyManagementInboundTransferBankDebitReturnedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_succeeded_event import ( + V2MoneyManagementInboundTransferBankDebitSucceededEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_canceled_event import ( + V2MoneyManagementOutboundPaymentCanceledEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_created_event import ( + V2MoneyManagementOutboundPaymentCreatedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_failed_event import ( + V2MoneyManagementOutboundPaymentFailedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_posted_event import ( + V2MoneyManagementOutboundPaymentPostedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_returned_event import ( + V2MoneyManagementOutboundPaymentReturnedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_under_review_event import ( + V2MoneyManagementOutboundPaymentUnderReviewEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_updated_event import ( + V2MoneyManagementOutboundPaymentUpdatedEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_canceled_event import ( + V2MoneyManagementPayoutIntentCanceledEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_created_event import ( + V2MoneyManagementPayoutIntentCreatedEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_pending_event import ( + V2MoneyManagementPayoutIntentPendingEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_posted_event import ( + V2MoneyManagementPayoutIntentPostedEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_processing_event import ( + V2MoneyManagementPayoutIntentProcessingEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_requires_action_event import ( + V2MoneyManagementPayoutIntentRequiresActionEventNotification, + ) + from stripe.events._v2_money_management_payout_intent_updated_event import ( + V2MoneyManagementPayoutIntentUpdatedEventNotification, + ) + from stripe.events._v2_money_management_payout_method_created_event import ( + V2MoneyManagementPayoutMethodCreatedEventNotification, + ) + from stripe.events._v2_money_management_payout_method_updated_event import ( + V2MoneyManagementPayoutMethodUpdatedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_available_event import ( + V2MoneyManagementReceivedCreditAvailableEventNotification, + ) + from stripe.events._v2_money_management_received_credit_failed_event import ( + V2MoneyManagementReceivedCreditFailedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_returned_event import ( + V2MoneyManagementReceivedCreditReturnedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_succeeded_event import ( + V2MoneyManagementReceivedCreditSucceededEventNotification, + ) + from stripe.events._v2_money_management_recipient_verification_created_event import ( + V2MoneyManagementRecipientVerificationCreatedEventNotification, + ) + from stripe.events._v2_money_management_recipient_verification_updated_event import ( + V2MoneyManagementRecipientVerificationUpdatedEventNotification, + ) + from stripe.events._v2_money_management_transaction_created_event import ( + V2MoneyManagementTransactionCreatedEventNotification, + ) + from stripe.events._v2_money_management_transaction_updated_event import ( + V2MoneyManagementTransactionUpdatedEventNotification, + ) _V2_EVENT_CLASS_LOOKUP = { @@ -974,18 +1232,66 @@ "stripe.events._v1_customer_discount_deleted_event", "V1CustomerDiscountDeletedEvent", ), + "v1.customer.discount.source_changed": ( + "stripe.events._v1_customer_discount_source_changed_event", + "V1CustomerDiscountSourceChangedEvent", + ), "v1.customer.discount.updated": ( "stripe.events._v1_customer_discount_updated_event", "V1CustomerDiscountUpdatedEvent", ), + "v1.customer.subscription.active": ( + "stripe.events._v1_customer_subscription_active_event", + "V1CustomerSubscriptionActiveEvent", + ), + "v1.customer.subscription.cancel_at_changed": ( + "stripe.events._v1_customer_subscription_cancel_at_changed_event", + "V1CustomerSubscriptionCancelAtChangedEvent", + ), "v1.customer.subscription.created": ( "stripe.events._v1_customer_subscription_created_event", "V1CustomerSubscriptionCreatedEvent", ), + "v1.customer.subscription.default_payment_method_changed": ( + "stripe.events._v1_customer_subscription_default_payment_method_changed_event", + "V1CustomerSubscriptionDefaultPaymentMethodChangedEvent", + ), "v1.customer.subscription.deleted": ( "stripe.events._v1_customer_subscription_deleted_event", "V1CustomerSubscriptionDeletedEvent", ), + "v1.customer.subscription.incomplete": ( + "stripe.events._v1_customer_subscription_incomplete_event", + "V1CustomerSubscriptionIncompleteEvent", + ), + "v1.customer.subscription.incomplete_expired": ( + "stripe.events._v1_customer_subscription_incomplete_expired_event", + "V1CustomerSubscriptionIncompleteExpiredEvent", + ), + "v1.customer.subscription.item_added": ( + "stripe.events._v1_customer_subscription_item_added_event", + "V1CustomerSubscriptionItemAddedEvent", + ), + "v1.customer.subscription.item_price_changed": ( + "stripe.events._v1_customer_subscription_item_price_changed_event", + "V1CustomerSubscriptionItemPriceChangedEvent", + ), + "v1.customer.subscription.item_quantity_changed": ( + "stripe.events._v1_customer_subscription_item_quantity_changed_event", + "V1CustomerSubscriptionItemQuantityChangedEvent", + ), + "v1.customer.subscription.item_removed": ( + "stripe.events._v1_customer_subscription_item_removed_event", + "V1CustomerSubscriptionItemRemovedEvent", + ), + "v1.customer.subscription.item_tax_rates_changed": ( + "stripe.events._v1_customer_subscription_item_tax_rates_changed_event", + "V1CustomerSubscriptionItemTaxRatesChangedEvent", + ), + "v1.customer.subscription.past_due": ( + "stripe.events._v1_customer_subscription_past_due_event", + "V1CustomerSubscriptionPastDueEvent", + ), "v1.customer.subscription.paused": ( "stripe.events._v1_customer_subscription_paused_event", "V1CustomerSubscriptionPausedEvent", @@ -1002,10 +1308,18 @@ "stripe.events._v1_customer_subscription_resumed_event", "V1CustomerSubscriptionResumedEvent", ), + "v1.customer.subscription.trialing": ( + "stripe.events._v1_customer_subscription_trialing_event", + "V1CustomerSubscriptionTrialingEvent", + ), "v1.customer.subscription.trial_will_end": ( "stripe.events._v1_customer_subscription_trial_will_end_event", "V1CustomerSubscriptionTrialWillEndEvent", ), + "v1.customer.subscription.unpaid": ( + "stripe.events._v1_customer_subscription_unpaid_event", + "V1CustomerSubscriptionUnpaidEvent", + ), "v1.customer.subscription.updated": ( "stripe.events._v1_customer_subscription_updated_event", "V1CustomerSubscriptionUpdatedEvent", @@ -1026,6 +1340,14 @@ "stripe.events._v1_customer_updated_event", "V1CustomerUpdatedEvent", ), + "v1.entitlements.active_entitlement_summary.entitlement_added": ( + "stripe.events._v1_entitlements_active_entitlement_summary_entitlement_added_event", + "V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent", + ), + "v1.entitlements.active_entitlement_summary.entitlement_removed": ( + "stripe.events._v1_entitlements_active_entitlement_summary_entitlement_removed_event", + "V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent", + ), "v1.entitlements.active_entitlement_summary.updated": ( "stripe.events._v1_entitlements_active_entitlement_summary_updated_event", "V1EntitlementsActiveEntitlementSummaryUpdatedEvent", @@ -1038,6 +1360,14 @@ "stripe.events._v1_financial_connections_account_account_numbers_updated_event", "V1FinancialConnectionsAccountAccountNumbersUpdatedEvent", ), + "v1.financial_connections.account.balance_refresh_failed": ( + "stripe.events._v1_financial_connections_account_balance_refresh_failed_event", + "V1FinancialConnectionsAccountBalanceRefreshFailedEvent", + ), + "v1.financial_connections.account.balance_refresh_succeeded": ( + "stripe.events._v1_financial_connections_account_balance_refresh_succeeded_event", + "V1FinancialConnectionsAccountBalanceRefreshSucceededEvent", + ), "v1.financial_connections.account.created": ( "stripe.events._v1_financial_connections_account_created_event", "V1FinancialConnectionsAccountCreatedEvent", @@ -1054,6 +1384,22 @@ "stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event", "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent", ), + "v1.financial_connections.account.inferred_balances_refresh_failed": ( + "stripe.events._v1_financial_connections_account_inferred_balances_refresh_failed_event", + "V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent", + ), + "v1.financial_connections.account.inferred_balances_refresh_succeeded": ( + "stripe.events._v1_financial_connections_account_inferred_balances_refresh_succeeded_event", + "V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent", + ), + "v1.financial_connections.account.ownership_refresh_failed": ( + "stripe.events._v1_financial_connections_account_ownership_refresh_failed_event", + "V1FinancialConnectionsAccountOwnershipRefreshFailedEvent", + ), + "v1.financial_connections.account.ownership_refresh_succeeded": ( + "stripe.events._v1_financial_connections_account_ownership_refresh_succeeded_event", + "V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent", + ), "v1.financial_connections.account.reactivated": ( "stripe.events._v1_financial_connections_account_reactivated_event", "V1FinancialConnectionsAccountReactivatedEvent", @@ -1070,10 +1416,26 @@ "stripe.events._v1_financial_connections_account_refreshed_transactions_event", "V1FinancialConnectionsAccountRefreshedTransactionsEvent", ), + "v1.financial_connections.account.risk_intelligence_refresh_failed": ( + "stripe.events._v1_financial_connections_account_risk_intelligence_refresh_failed_event", + "V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent", + ), + "v1.financial_connections.account.risk_intelligence_refresh_succeeded": ( + "stripe.events._v1_financial_connections_account_risk_intelligence_refresh_succeeded_event", + "V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent", + ), "v1.financial_connections.account.supported_payment_method_types_updated": ( "stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event", "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent", ), + "v1.financial_connections.account.transactions_refresh_failed": ( + "stripe.events._v1_financial_connections_account_transactions_refresh_failed_event", + "V1FinancialConnectionsAccountTransactionsRefreshFailedEvent", + ), + "v1.financial_connections.account.transactions_refresh_succeeded": ( + "stripe.events._v1_financial_connections_account_transactions_refresh_succeeded_event", + "V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent", + ), "v1.financial_connections.account.upcoming_account_number_expiry": ( "stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event", "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent", @@ -1114,6 +1476,14 @@ "stripe.events._v1_invoice_deleted_event", "V1InvoiceDeletedEvent", ), + "v1.invoice.discount_added": ( + "stripe.events._v1_invoice_discount_added_event", + "V1InvoiceDiscountAddedEvent", + ), + "v1.invoice.discount_removed": ( + "stripe.events._v1_invoice_discount_removed_event", + "V1InvoiceDiscountRemovedEvent", + ), "v1.invoice.finalization_failed": ( "stripe.events._v1_invoice_finalization_failed_event", "V1InvoiceFinalizationFailedEvent", @@ -1122,6 +1492,10 @@ "stripe.events._v1_invoice_finalized_event", "V1InvoiceFinalizedEvent", ), + "v1.invoiceitem.amount_changed": ( + "stripe.events._v1_invoiceitem_amount_changed_event", + "V1InvoiceitemAmountChangedEvent", + ), "v1.invoiceitem.created": ( "stripe.events._v1_invoiceitem_created_event", "V1InvoiceitemCreatedEvent", @@ -1130,6 +1504,30 @@ "stripe.events._v1_invoiceitem_deleted_event", "V1InvoiceitemDeletedEvent", ), + "v1.invoiceitem.discount_added": ( + "stripe.events._v1_invoiceitem_discount_added_event", + "V1InvoiceitemDiscountAddedEvent", + ), + "v1.invoiceitem.discount_removed": ( + "stripe.events._v1_invoiceitem_discount_removed_event", + "V1InvoiceitemDiscountRemovedEvent", + ), + "v1.invoice.line_item_added": ( + "stripe.events._v1_invoice_line_item_added_event", + "V1InvoiceLineItemAddedEvent", + ), + "v1.invoice.line_item_pricing_changed": ( + "stripe.events._v1_invoice_line_item_pricing_changed_event", + "V1InvoiceLineItemPricingChangedEvent", + ), + "v1.invoice.line_item_quantity_changed": ( + "stripe.events._v1_invoice_line_item_quantity_changed_event", + "V1InvoiceLineItemQuantityChangedEvent", + ), + "v1.invoice.line_item_removed": ( + "stripe.events._v1_invoice_line_item_removed_event", + "V1InvoiceLineItemRemovedEvent", + ), "v1.invoice.marked_uncollectible": ( "stripe.events._v1_invoice_marked_uncollectible_event", "V1InvoiceMarkedUncollectibleEvent", @@ -1154,10 +1552,18 @@ "stripe.events._v1_invoice_payment_attempt_required_event", "V1InvoicePaymentAttemptRequiredEvent", ), + "v1.invoice_payment.canceled": ( + "stripe.events._v1_invoice_payment_canceled_event", + "V1InvoicePaymentCanceledEvent", + ), "v1.invoice.payment_failed": ( "stripe.events._v1_invoice_payment_failed_event", "V1InvoicePaymentFailedEvent", ), + "v1.invoice_payment.open": ( + "stripe.events._v1_invoice_payment_open_event", + "V1InvoicePaymentOpenEvent", + ), "v1.invoice_payment.paid": ( "stripe.events._v1_invoice_payment_paid_event", "V1InvoicePaymentPaidEvent", @@ -1382,26 +1788,58 @@ "stripe.events._v1_plan_updated_event", "V1PlanUpdatedEvent", ), + "v1.price.activated": ( + "stripe.events._v1_price_activated_event", + "V1PriceActivatedEvent", + ), "v1.price.created": ( "stripe.events._v1_price_created_event", "V1PriceCreatedEvent", ), + "v1.price.deactivated": ( + "stripe.events._v1_price_deactivated_event", + "V1PriceDeactivatedEvent", + ), "v1.price.deleted": ( "stripe.events._v1_price_deleted_event", "V1PriceDeletedEvent", ), + "v1.price.lookup_key_changed": ( + "stripe.events._v1_price_lookup_key_changed_event", + "V1PriceLookupKeyChangedEvent", + ), + "v1.price.tax_behavior_changed": ( + "stripe.events._v1_price_tax_behavior_changed_event", + "V1PriceTaxBehaviorChangedEvent", + ), "v1.price.updated": ( "stripe.events._v1_price_updated_event", "V1PriceUpdatedEvent", ), + "v1.product.activated": ( + "stripe.events._v1_product_activated_event", + "V1ProductActivatedEvent", + ), "v1.product.created": ( "stripe.events._v1_product_created_event", "V1ProductCreatedEvent", ), + "v1.product.deactivated": ( + "stripe.events._v1_product_deactivated_event", + "V1ProductDeactivatedEvent", + ), + "v1.product.default_price_changed": ( + "stripe.events._v1_product_default_price_changed_event", + "V1ProductDefaultPriceChangedEvent", + ), "v1.product.deleted": ( "stripe.events._v1_product_deleted_event", "V1ProductDeletedEvent", ), + "v1.product.tax_code_changed": ( + "stripe.events._v1_product_tax_code_changed_event", + "V1ProductTaxCodeChangedEvent", + ), "v1.product.updated": ( "stripe.events._v1_product_updated_event", "V1ProductUpdatedEvent", @@ -1410,6 +1848,10 @@ "stripe.events._v1_promotion_code_created_event", "V1PromotionCodeCreatedEvent", ), + "v1.promotion_code.fully_redeemed": ( + "stripe.events._v1_promotion_code_fully_redeemed_event", + "V1PromotionCodeFullyRedeemedEvent", + ), "v1.promotion_code.updated": ( "stripe.events._v1_promotion_code_updated_event", "V1PromotionCodeUpdatedEvent", @@ -1518,6 +1960,26 @@ "stripe.events._v1_subscription_schedule_expiring_event", "V1SubscriptionScheduleExpiringEvent", ), + "v1.subscription_schedule.phase_added": ( + "stripe.events._v1_subscription_schedule_phase_added_event", + "V1SubscriptionSchedulePhaseAddedEvent", + ), + "v1.subscription_schedule.phase_default_tax_rates_changed": ( + "stripe.events._v1_subscription_schedule_phase_default_tax_rates_changed_event", + "V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent", + ), + "v1.subscription_schedule.phase_end_date_changed": ( + "stripe.events._v1_subscription_schedule_phase_end_date_changed_event", + "V1SubscriptionSchedulePhaseEndDateChangedEvent", + ), + "v1.subscription_schedule.phase_removed": ( + "stripe.events._v1_subscription_schedule_phase_removed_event", + "V1SubscriptionSchedulePhaseRemovedEvent", + ), + "v1.subscription_schedule.phase_trial_end_changed": ( + "stripe.events._v1_subscription_schedule_phase_trial_end_changed_event", + "V1SubscriptionSchedulePhaseTrialEndChangedEvent", + ), "v1.subscription_schedule.released": ( "stripe.events._v1_subscription_schedule_released_event", "V1SubscriptionScheduleReleasedEvent", @@ -1690,6 +2152,146 @@ "stripe.events._v2_core_event_destination_ping_event", "V2CoreEventDestinationPingEvent", ), + "v2.money_management.adjustment.created": ( + "stripe.events._v2_money_management_adjustment_created_event", + "V2MoneyManagementAdjustmentCreatedEvent", + ), + "v2.money_management.financial_account.created": ( + "stripe.events._v2_money_management_financial_account_created_event", + "V2MoneyManagementFinancialAccountCreatedEvent", + ), + "v2.money_management.financial_account.updated": ( + "stripe.events._v2_money_management_financial_account_updated_event", + "V2MoneyManagementFinancialAccountUpdatedEvent", + ), + "v2.money_management.financial_address.activated": ( + "stripe.events._v2_money_management_financial_address_activated_event", + "V2MoneyManagementFinancialAddressActivatedEvent", + ), + "v2.money_management.financial_address.failed": ( + "stripe.events._v2_money_management_financial_address_failed_event", + "V2MoneyManagementFinancialAddressFailedEvent", + ), + "v2.money_management.inbound_transfer.available": ( + "stripe.events._v2_money_management_inbound_transfer_available_event", + "V2MoneyManagementInboundTransferAvailableEvent", + ), + "v2.money_management.inbound_transfer.bank_debit_failed": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_failed_event", + "V2MoneyManagementInboundTransferBankDebitFailedEvent", + ), + "v2.money_management.inbound_transfer.bank_debit_processing": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_processing_event", + "V2MoneyManagementInboundTransferBankDebitProcessingEvent", + ), + "v2.money_management.inbound_transfer.bank_debit_queued": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_queued_event", + "V2MoneyManagementInboundTransferBankDebitQueuedEvent", + ), + "v2.money_management.inbound_transfer.bank_debit_returned": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_returned_event", + "V2MoneyManagementInboundTransferBankDebitReturnedEvent", + ), + "v2.money_management.inbound_transfer.bank_debit_succeeded": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_succeeded_event", + "V2MoneyManagementInboundTransferBankDebitSucceededEvent", + ), + "v2.money_management.outbound_payment.canceled": ( + "stripe.events._v2_money_management_outbound_payment_canceled_event", + "V2MoneyManagementOutboundPaymentCanceledEvent", + ), + "v2.money_management.outbound_payment.created": ( + "stripe.events._v2_money_management_outbound_payment_created_event", + "V2MoneyManagementOutboundPaymentCreatedEvent", + ), + "v2.money_management.outbound_payment.failed": ( + "stripe.events._v2_money_management_outbound_payment_failed_event", + "V2MoneyManagementOutboundPaymentFailedEvent", + ), + "v2.money_management.outbound_payment.posted": ( + "stripe.events._v2_money_management_outbound_payment_posted_event", + "V2MoneyManagementOutboundPaymentPostedEvent", + ), + "v2.money_management.outbound_payment.returned": ( + "stripe.events._v2_money_management_outbound_payment_returned_event", + "V2MoneyManagementOutboundPaymentReturnedEvent", + ), + "v2.money_management.outbound_payment.under_review": ( + "stripe.events._v2_money_management_outbound_payment_under_review_event", + "V2MoneyManagementOutboundPaymentUnderReviewEvent", + ), + "v2.money_management.outbound_payment.updated": ( + "stripe.events._v2_money_management_outbound_payment_updated_event", + "V2MoneyManagementOutboundPaymentUpdatedEvent", + ), + "v2.money_management.payout_intent.canceled": ( + "stripe.events._v2_money_management_payout_intent_canceled_event", + "V2MoneyManagementPayoutIntentCanceledEvent", + ), + "v2.money_management.payout_intent.created": ( + "stripe.events._v2_money_management_payout_intent_created_event", + "V2MoneyManagementPayoutIntentCreatedEvent", + ), + "v2.money_management.payout_intent.pending": ( + "stripe.events._v2_money_management_payout_intent_pending_event", + "V2MoneyManagementPayoutIntentPendingEvent", + ), + "v2.money_management.payout_intent.posted": ( + "stripe.events._v2_money_management_payout_intent_posted_event", + "V2MoneyManagementPayoutIntentPostedEvent", + ), + "v2.money_management.payout_intent.processing": ( + "stripe.events._v2_money_management_payout_intent_processing_event", + "V2MoneyManagementPayoutIntentProcessingEvent", + ), + "v2.money_management.payout_intent.requires_action": ( + "stripe.events._v2_money_management_payout_intent_requires_action_event", + "V2MoneyManagementPayoutIntentRequiresActionEvent", + ), + "v2.money_management.payout_intent.updated": ( + "stripe.events._v2_money_management_payout_intent_updated_event", + "V2MoneyManagementPayoutIntentUpdatedEvent", + ), + "v2.money_management.payout_method.created": ( + "stripe.events._v2_money_management_payout_method_created_event", + "V2MoneyManagementPayoutMethodCreatedEvent", + ), + "v2.money_management.payout_method.updated": ( + "stripe.events._v2_money_management_payout_method_updated_event", + "V2MoneyManagementPayoutMethodUpdatedEvent", + ), + "v2.money_management.received_credit.available": ( + "stripe.events._v2_money_management_received_credit_available_event", + "V2MoneyManagementReceivedCreditAvailableEvent", + ), + "v2.money_management.received_credit.failed": ( + "stripe.events._v2_money_management_received_credit_failed_event", + "V2MoneyManagementReceivedCreditFailedEvent", + ), + "v2.money_management.received_credit.returned": ( + "stripe.events._v2_money_management_received_credit_returned_event", + "V2MoneyManagementReceivedCreditReturnedEvent", + ), + "v2.money_management.received_credit.succeeded": ( + "stripe.events._v2_money_management_received_credit_succeeded_event", + "V2MoneyManagementReceivedCreditSucceededEvent", + ), + "v2.money_management.recipient_verification.created": ( + "stripe.events._v2_money_management_recipient_verification_created_event", + "V2MoneyManagementRecipientVerificationCreatedEvent", + ), + "v2.money_management.recipient_verification.updated": ( + "stripe.events._v2_money_management_recipient_verification_updated_event", + "V2MoneyManagementRecipientVerificationUpdatedEvent", + ), + "v2.money_management.transaction.created": ( + "stripe.events._v2_money_management_transaction_created_event", + "V2MoneyManagementTransactionCreatedEvent", + ), + "v2.money_management.transaction.updated": ( + "stripe.events._v2_money_management_transaction_updated_event", + "V2MoneyManagementTransactionUpdatedEvent", + ), } @@ -1949,18 +2551,66 @@ def get_v2_event_class(type_: str): "stripe.events._v1_customer_discount_deleted_event", "V1CustomerDiscountDeletedEventNotification", ), + "v1.customer.discount.source_changed": ( + "stripe.events._v1_customer_discount_source_changed_event", + "V1CustomerDiscountSourceChangedEventNotification", + ), "v1.customer.discount.updated": ( "stripe.events._v1_customer_discount_updated_event", "V1CustomerDiscountUpdatedEventNotification", ), + "v1.customer.subscription.active": ( + "stripe.events._v1_customer_subscription_active_event", + "V1CustomerSubscriptionActiveEventNotification", + ), + "v1.customer.subscription.cancel_at_changed": ( + "stripe.events._v1_customer_subscription_cancel_at_changed_event", + "V1CustomerSubscriptionCancelAtChangedEventNotification", + ), "v1.customer.subscription.created": ( "stripe.events._v1_customer_subscription_created_event", "V1CustomerSubscriptionCreatedEventNotification", ), + "v1.customer.subscription.default_payment_method_changed": ( + "stripe.events._v1_customer_subscription_default_payment_method_changed_event", + "V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification", + ), "v1.customer.subscription.deleted": ( "stripe.events._v1_customer_subscription_deleted_event", "V1CustomerSubscriptionDeletedEventNotification", ), + "v1.customer.subscription.incomplete": ( + "stripe.events._v1_customer_subscription_incomplete_event", + "V1CustomerSubscriptionIncompleteEventNotification", + ), + "v1.customer.subscription.incomplete_expired": ( + "stripe.events._v1_customer_subscription_incomplete_expired_event", + "V1CustomerSubscriptionIncompleteExpiredEventNotification", + ), + "v1.customer.subscription.item_added": ( + "stripe.events._v1_customer_subscription_item_added_event", + "V1CustomerSubscriptionItemAddedEventNotification", + ), + "v1.customer.subscription.item_price_changed": ( + "stripe.events._v1_customer_subscription_item_price_changed_event", + "V1CustomerSubscriptionItemPriceChangedEventNotification", + ), + "v1.customer.subscription.item_quantity_changed": ( + "stripe.events._v1_customer_subscription_item_quantity_changed_event", + "V1CustomerSubscriptionItemQuantityChangedEventNotification", + ), + "v1.customer.subscription.item_removed": ( + "stripe.events._v1_customer_subscription_item_removed_event", + "V1CustomerSubscriptionItemRemovedEventNotification", + ), + "v1.customer.subscription.item_tax_rates_changed": ( + "stripe.events._v1_customer_subscription_item_tax_rates_changed_event", + "V1CustomerSubscriptionItemTaxRatesChangedEventNotification", + ), + "v1.customer.subscription.past_due": ( + "stripe.events._v1_customer_subscription_past_due_event", + "V1CustomerSubscriptionPastDueEventNotification", + ), "v1.customer.subscription.paused": ( "stripe.events._v1_customer_subscription_paused_event", "V1CustomerSubscriptionPausedEventNotification", @@ -1977,10 +2627,18 @@ def get_v2_event_class(type_: str): "stripe.events._v1_customer_subscription_resumed_event", "V1CustomerSubscriptionResumedEventNotification", ), + "v1.customer.subscription.trialing": ( + "stripe.events._v1_customer_subscription_trialing_event", + "V1CustomerSubscriptionTrialingEventNotification", + ), "v1.customer.subscription.trial_will_end": ( "stripe.events._v1_customer_subscription_trial_will_end_event", "V1CustomerSubscriptionTrialWillEndEventNotification", ), + "v1.customer.subscription.unpaid": ( + "stripe.events._v1_customer_subscription_unpaid_event", + "V1CustomerSubscriptionUnpaidEventNotification", + ), "v1.customer.subscription.updated": ( "stripe.events._v1_customer_subscription_updated_event", "V1CustomerSubscriptionUpdatedEventNotification", @@ -2001,6 +2659,14 @@ def get_v2_event_class(type_: str): "stripe.events._v1_customer_updated_event", "V1CustomerUpdatedEventNotification", ), + "v1.entitlements.active_entitlement_summary.entitlement_added": ( + "stripe.events._v1_entitlements_active_entitlement_summary_entitlement_added_event", + "V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification", + ), + "v1.entitlements.active_entitlement_summary.entitlement_removed": ( + "stripe.events._v1_entitlements_active_entitlement_summary_entitlement_removed_event", + "V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification", + ), "v1.entitlements.active_entitlement_summary.updated": ( "stripe.events._v1_entitlements_active_entitlement_summary_updated_event", "V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification", @@ -2013,6 +2679,14 @@ def get_v2_event_class(type_: str): "stripe.events._v1_financial_connections_account_account_numbers_updated_event", "V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification", ), + "v1.financial_connections.account.balance_refresh_failed": ( + "stripe.events._v1_financial_connections_account_balance_refresh_failed_event", + "V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification", + ), + "v1.financial_connections.account.balance_refresh_succeeded": ( + "stripe.events._v1_financial_connections_account_balance_refresh_succeeded_event", + "V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification", + ), "v1.financial_connections.account.created": ( "stripe.events._v1_financial_connections_account_created_event", "V1FinancialConnectionsAccountCreatedEventNotification", @@ -2029,6 +2703,22 @@ def get_v2_event_class(type_: str): "stripe.events._v1_financial_connections_account_expected_deactivation_date_updated_event", "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification", ), + "v1.financial_connections.account.inferred_balances_refresh_failed": ( + "stripe.events._v1_financial_connections_account_inferred_balances_refresh_failed_event", + "V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification", + ), + "v1.financial_connections.account.inferred_balances_refresh_succeeded": ( + "stripe.events._v1_financial_connections_account_inferred_balances_refresh_succeeded_event", + "V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification", + ), + "v1.financial_connections.account.ownership_refresh_failed": ( + "stripe.events._v1_financial_connections_account_ownership_refresh_failed_event", + "V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification", + ), + "v1.financial_connections.account.ownership_refresh_succeeded": ( + "stripe.events._v1_financial_connections_account_ownership_refresh_succeeded_event", + "V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification", + ), "v1.financial_connections.account.reactivated": ( "stripe.events._v1_financial_connections_account_reactivated_event", "V1FinancialConnectionsAccountReactivatedEventNotification", @@ -2045,10 +2735,26 @@ def get_v2_event_class(type_: str): "stripe.events._v1_financial_connections_account_refreshed_transactions_event", "V1FinancialConnectionsAccountRefreshedTransactionsEventNotification", ), + "v1.financial_connections.account.risk_intelligence_refresh_failed": ( + "stripe.events._v1_financial_connections_account_risk_intelligence_refresh_failed_event", + "V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification", + ), + "v1.financial_connections.account.risk_intelligence_refresh_succeeded": ( + "stripe.events._v1_financial_connections_account_risk_intelligence_refresh_succeeded_event", + "V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification", + ), "v1.financial_connections.account.supported_payment_method_types_updated": ( "stripe.events._v1_financial_connections_account_supported_payment_method_types_updated_event", "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification", ), + "v1.financial_connections.account.transactions_refresh_failed": ( + "stripe.events._v1_financial_connections_account_transactions_refresh_failed_event", + "V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification", + ), + "v1.financial_connections.account.transactions_refresh_succeeded": ( + "stripe.events._v1_financial_connections_account_transactions_refresh_succeeded_event", + "V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification", + ), "v1.financial_connections.account.upcoming_account_number_expiry": ( "stripe.events._v1_financial_connections_account_upcoming_account_number_expiry_event", "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification", @@ -2089,6 +2795,14 @@ def get_v2_event_class(type_: str): "stripe.events._v1_invoice_deleted_event", "V1InvoiceDeletedEventNotification", ), + "v1.invoice.discount_added": ( + "stripe.events._v1_invoice_discount_added_event", + "V1InvoiceDiscountAddedEventNotification", + ), + "v1.invoice.discount_removed": ( + "stripe.events._v1_invoice_discount_removed_event", + "V1InvoiceDiscountRemovedEventNotification", + ), "v1.invoice.finalization_failed": ( "stripe.events._v1_invoice_finalization_failed_event", "V1InvoiceFinalizationFailedEventNotification", @@ -2097,6 +2811,10 @@ def get_v2_event_class(type_: str): "stripe.events._v1_invoice_finalized_event", "V1InvoiceFinalizedEventNotification", ), + "v1.invoiceitem.amount_changed": ( + "stripe.events._v1_invoiceitem_amount_changed_event", + "V1InvoiceitemAmountChangedEventNotification", + ), "v1.invoiceitem.created": ( "stripe.events._v1_invoiceitem_created_event", "V1InvoiceitemCreatedEventNotification", @@ -2105,6 +2823,30 @@ def get_v2_event_class(type_: str): "stripe.events._v1_invoiceitem_deleted_event", "V1InvoiceitemDeletedEventNotification", ), + "v1.invoiceitem.discount_added": ( + "stripe.events._v1_invoiceitem_discount_added_event", + "V1InvoiceitemDiscountAddedEventNotification", + ), + "v1.invoiceitem.discount_removed": ( + "stripe.events._v1_invoiceitem_discount_removed_event", + "V1InvoiceitemDiscountRemovedEventNotification", + ), + "v1.invoice.line_item_added": ( + "stripe.events._v1_invoice_line_item_added_event", + "V1InvoiceLineItemAddedEventNotification", + ), + "v1.invoice.line_item_pricing_changed": ( + "stripe.events._v1_invoice_line_item_pricing_changed_event", + "V1InvoiceLineItemPricingChangedEventNotification", + ), + "v1.invoice.line_item_quantity_changed": ( + "stripe.events._v1_invoice_line_item_quantity_changed_event", + "V1InvoiceLineItemQuantityChangedEventNotification", + ), + "v1.invoice.line_item_removed": ( + "stripe.events._v1_invoice_line_item_removed_event", + "V1InvoiceLineItemRemovedEventNotification", + ), "v1.invoice.marked_uncollectible": ( "stripe.events._v1_invoice_marked_uncollectible_event", "V1InvoiceMarkedUncollectibleEventNotification", @@ -2129,10 +2871,18 @@ def get_v2_event_class(type_: str): "stripe.events._v1_invoice_payment_attempt_required_event", "V1InvoicePaymentAttemptRequiredEventNotification", ), + "v1.invoice_payment.canceled": ( + "stripe.events._v1_invoice_payment_canceled_event", + "V1InvoicePaymentCanceledEventNotification", + ), "v1.invoice.payment_failed": ( "stripe.events._v1_invoice_payment_failed_event", "V1InvoicePaymentFailedEventNotification", ), + "v1.invoice_payment.open": ( + "stripe.events._v1_invoice_payment_open_event", + "V1InvoicePaymentOpenEventNotification", + ), "v1.invoice_payment.paid": ( "stripe.events._v1_invoice_payment_paid_event", "V1InvoicePaymentPaidEventNotification", @@ -2357,26 +3107,58 @@ def get_v2_event_class(type_: str): "stripe.events._v1_plan_updated_event", "V1PlanUpdatedEventNotification", ), + "v1.price.activated": ( + "stripe.events._v1_price_activated_event", + "V1PriceActivatedEventNotification", + ), "v1.price.created": ( "stripe.events._v1_price_created_event", "V1PriceCreatedEventNotification", ), + "v1.price.deactivated": ( + "stripe.events._v1_price_deactivated_event", + "V1PriceDeactivatedEventNotification", + ), "v1.price.deleted": ( "stripe.events._v1_price_deleted_event", "V1PriceDeletedEventNotification", ), + "v1.price.lookup_key_changed": ( + "stripe.events._v1_price_lookup_key_changed_event", + "V1PriceLookupKeyChangedEventNotification", + ), + "v1.price.tax_behavior_changed": ( + "stripe.events._v1_price_tax_behavior_changed_event", + "V1PriceTaxBehaviorChangedEventNotification", + ), "v1.price.updated": ( "stripe.events._v1_price_updated_event", "V1PriceUpdatedEventNotification", ), + "v1.product.activated": ( + "stripe.events._v1_product_activated_event", + "V1ProductActivatedEventNotification", + ), "v1.product.created": ( "stripe.events._v1_product_created_event", "V1ProductCreatedEventNotification", ), + "v1.product.deactivated": ( + "stripe.events._v1_product_deactivated_event", + "V1ProductDeactivatedEventNotification", + ), + "v1.product.default_price_changed": ( + "stripe.events._v1_product_default_price_changed_event", + "V1ProductDefaultPriceChangedEventNotification", + ), "v1.product.deleted": ( "stripe.events._v1_product_deleted_event", "V1ProductDeletedEventNotification", ), + "v1.product.tax_code_changed": ( + "stripe.events._v1_product_tax_code_changed_event", + "V1ProductTaxCodeChangedEventNotification", + ), "v1.product.updated": ( "stripe.events._v1_product_updated_event", "V1ProductUpdatedEventNotification", @@ -2385,6 +3167,10 @@ def get_v2_event_class(type_: str): "stripe.events._v1_promotion_code_created_event", "V1PromotionCodeCreatedEventNotification", ), + "v1.promotion_code.fully_redeemed": ( + "stripe.events._v1_promotion_code_fully_redeemed_event", + "V1PromotionCodeFullyRedeemedEventNotification", + ), "v1.promotion_code.updated": ( "stripe.events._v1_promotion_code_updated_event", "V1PromotionCodeUpdatedEventNotification", @@ -2493,6 +3279,26 @@ def get_v2_event_class(type_: str): "stripe.events._v1_subscription_schedule_expiring_event", "V1SubscriptionScheduleExpiringEventNotification", ), + "v1.subscription_schedule.phase_added": ( + "stripe.events._v1_subscription_schedule_phase_added_event", + "V1SubscriptionSchedulePhaseAddedEventNotification", + ), + "v1.subscription_schedule.phase_default_tax_rates_changed": ( + "stripe.events._v1_subscription_schedule_phase_default_tax_rates_changed_event", + "V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification", + ), + "v1.subscription_schedule.phase_end_date_changed": ( + "stripe.events._v1_subscription_schedule_phase_end_date_changed_event", + "V1SubscriptionSchedulePhaseEndDateChangedEventNotification", + ), + "v1.subscription_schedule.phase_removed": ( + "stripe.events._v1_subscription_schedule_phase_removed_event", + "V1SubscriptionSchedulePhaseRemovedEventNotification", + ), + "v1.subscription_schedule.phase_trial_end_changed": ( + "stripe.events._v1_subscription_schedule_phase_trial_end_changed_event", + "V1SubscriptionSchedulePhaseTrialEndChangedEventNotification", + ), "v1.subscription_schedule.released": ( "stripe.events._v1_subscription_schedule_released_event", "V1SubscriptionScheduleReleasedEventNotification", @@ -2665,6 +3471,146 @@ def get_v2_event_class(type_: str): "stripe.events._v2_core_event_destination_ping_event", "V2CoreEventDestinationPingEventNotification", ), + "v2.money_management.adjustment.created": ( + "stripe.events._v2_money_management_adjustment_created_event", + "V2MoneyManagementAdjustmentCreatedEventNotification", + ), + "v2.money_management.financial_account.created": ( + "stripe.events._v2_money_management_financial_account_created_event", + "V2MoneyManagementFinancialAccountCreatedEventNotification", + ), + "v2.money_management.financial_account.updated": ( + "stripe.events._v2_money_management_financial_account_updated_event", + "V2MoneyManagementFinancialAccountUpdatedEventNotification", + ), + "v2.money_management.financial_address.activated": ( + "stripe.events._v2_money_management_financial_address_activated_event", + "V2MoneyManagementFinancialAddressActivatedEventNotification", + ), + "v2.money_management.financial_address.failed": ( + "stripe.events._v2_money_management_financial_address_failed_event", + "V2MoneyManagementFinancialAddressFailedEventNotification", + ), + "v2.money_management.inbound_transfer.available": ( + "stripe.events._v2_money_management_inbound_transfer_available_event", + "V2MoneyManagementInboundTransferAvailableEventNotification", + ), + "v2.money_management.inbound_transfer.bank_debit_failed": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_failed_event", + "V2MoneyManagementInboundTransferBankDebitFailedEventNotification", + ), + "v2.money_management.inbound_transfer.bank_debit_processing": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_processing_event", + "V2MoneyManagementInboundTransferBankDebitProcessingEventNotification", + ), + "v2.money_management.inbound_transfer.bank_debit_queued": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_queued_event", + "V2MoneyManagementInboundTransferBankDebitQueuedEventNotification", + ), + "v2.money_management.inbound_transfer.bank_debit_returned": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_returned_event", + "V2MoneyManagementInboundTransferBankDebitReturnedEventNotification", + ), + "v2.money_management.inbound_transfer.bank_debit_succeeded": ( + "stripe.events._v2_money_management_inbound_transfer_bank_debit_succeeded_event", + "V2MoneyManagementInboundTransferBankDebitSucceededEventNotification", + ), + "v2.money_management.outbound_payment.canceled": ( + "stripe.events._v2_money_management_outbound_payment_canceled_event", + "V2MoneyManagementOutboundPaymentCanceledEventNotification", + ), + "v2.money_management.outbound_payment.created": ( + "stripe.events._v2_money_management_outbound_payment_created_event", + "V2MoneyManagementOutboundPaymentCreatedEventNotification", + ), + "v2.money_management.outbound_payment.failed": ( + "stripe.events._v2_money_management_outbound_payment_failed_event", + "V2MoneyManagementOutboundPaymentFailedEventNotification", + ), + "v2.money_management.outbound_payment.posted": ( + "stripe.events._v2_money_management_outbound_payment_posted_event", + "V2MoneyManagementOutboundPaymentPostedEventNotification", + ), + "v2.money_management.outbound_payment.returned": ( + "stripe.events._v2_money_management_outbound_payment_returned_event", + "V2MoneyManagementOutboundPaymentReturnedEventNotification", + ), + "v2.money_management.outbound_payment.under_review": ( + "stripe.events._v2_money_management_outbound_payment_under_review_event", + "V2MoneyManagementOutboundPaymentUnderReviewEventNotification", + ), + "v2.money_management.outbound_payment.updated": ( + "stripe.events._v2_money_management_outbound_payment_updated_event", + "V2MoneyManagementOutboundPaymentUpdatedEventNotification", + ), + "v2.money_management.payout_intent.canceled": ( + "stripe.events._v2_money_management_payout_intent_canceled_event", + "V2MoneyManagementPayoutIntentCanceledEventNotification", + ), + "v2.money_management.payout_intent.created": ( + "stripe.events._v2_money_management_payout_intent_created_event", + "V2MoneyManagementPayoutIntentCreatedEventNotification", + ), + "v2.money_management.payout_intent.pending": ( + "stripe.events._v2_money_management_payout_intent_pending_event", + "V2MoneyManagementPayoutIntentPendingEventNotification", + ), + "v2.money_management.payout_intent.posted": ( + "stripe.events._v2_money_management_payout_intent_posted_event", + "V2MoneyManagementPayoutIntentPostedEventNotification", + ), + "v2.money_management.payout_intent.processing": ( + "stripe.events._v2_money_management_payout_intent_processing_event", + "V2MoneyManagementPayoutIntentProcessingEventNotification", + ), + "v2.money_management.payout_intent.requires_action": ( + "stripe.events._v2_money_management_payout_intent_requires_action_event", + "V2MoneyManagementPayoutIntentRequiresActionEventNotification", + ), + "v2.money_management.payout_intent.updated": ( + "stripe.events._v2_money_management_payout_intent_updated_event", + "V2MoneyManagementPayoutIntentUpdatedEventNotification", + ), + "v2.money_management.payout_method.created": ( + "stripe.events._v2_money_management_payout_method_created_event", + "V2MoneyManagementPayoutMethodCreatedEventNotification", + ), + "v2.money_management.payout_method.updated": ( + "stripe.events._v2_money_management_payout_method_updated_event", + "V2MoneyManagementPayoutMethodUpdatedEventNotification", + ), + "v2.money_management.received_credit.available": ( + "stripe.events._v2_money_management_received_credit_available_event", + "V2MoneyManagementReceivedCreditAvailableEventNotification", + ), + "v2.money_management.received_credit.failed": ( + "stripe.events._v2_money_management_received_credit_failed_event", + "V2MoneyManagementReceivedCreditFailedEventNotification", + ), + "v2.money_management.received_credit.returned": ( + "stripe.events._v2_money_management_received_credit_returned_event", + "V2MoneyManagementReceivedCreditReturnedEventNotification", + ), + "v2.money_management.received_credit.succeeded": ( + "stripe.events._v2_money_management_received_credit_succeeded_event", + "V2MoneyManagementReceivedCreditSucceededEventNotification", + ), + "v2.money_management.recipient_verification.created": ( + "stripe.events._v2_money_management_recipient_verification_created_event", + "V2MoneyManagementRecipientVerificationCreatedEventNotification", + ), + "v2.money_management.recipient_verification.updated": ( + "stripe.events._v2_money_management_recipient_verification_updated_event", + "V2MoneyManagementRecipientVerificationUpdatedEventNotification", + ), + "v2.money_management.transaction.created": ( + "stripe.events._v2_money_management_transaction_created_event", + "V2MoneyManagementTransactionCreatedEventNotification", + ), + "v2.money_management.transaction.updated": ( + "stripe.events._v2_money_management_transaction_updated_event", + "V2MoneyManagementTransactionUpdatedEventNotification", + ), } @@ -2741,31 +3687,57 @@ def get_v2_event_notification_class(type_: str): "V1CustomerDeletedEventNotification", "V1CustomerDiscountCreatedEventNotification", "V1CustomerDiscountDeletedEventNotification", + "V1CustomerDiscountSourceChangedEventNotification", "V1CustomerDiscountUpdatedEventNotification", + "V1CustomerSubscriptionActiveEventNotification", + "V1CustomerSubscriptionCancelAtChangedEventNotification", "V1CustomerSubscriptionCreatedEventNotification", + "V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification", "V1CustomerSubscriptionDeletedEventNotification", + "V1CustomerSubscriptionIncompleteEventNotification", + "V1CustomerSubscriptionIncompleteExpiredEventNotification", + "V1CustomerSubscriptionItemAddedEventNotification", + "V1CustomerSubscriptionItemPriceChangedEventNotification", + "V1CustomerSubscriptionItemQuantityChangedEventNotification", + "V1CustomerSubscriptionItemRemovedEventNotification", + "V1CustomerSubscriptionItemTaxRatesChangedEventNotification", + "V1CustomerSubscriptionPastDueEventNotification", "V1CustomerSubscriptionPausedEventNotification", "V1CustomerSubscriptionPendingUpdateAppliedEventNotification", "V1CustomerSubscriptionPendingUpdateExpiredEventNotification", "V1CustomerSubscriptionResumedEventNotification", + "V1CustomerSubscriptionTrialingEventNotification", "V1CustomerSubscriptionTrialWillEndEventNotification", + "V1CustomerSubscriptionUnpaidEventNotification", "V1CustomerSubscriptionUpdatedEventNotification", "V1CustomerTaxIdCreatedEventNotification", "V1CustomerTaxIdDeletedEventNotification", "V1CustomerTaxIdUpdatedEventNotification", "V1CustomerUpdatedEventNotification", + "V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification", + "V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification", "V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification", "V1FileCreatedEventNotification", "V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification", + "V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification", + "V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification", "V1FinancialConnectionsAccountCreatedEventNotification", "V1FinancialConnectionsAccountDeactivatedEventNotification", "V1FinancialConnectionsAccountDisconnectedEventNotification", "V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification", + "V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification", + "V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification", + "V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification", + "V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification", "V1FinancialConnectionsAccountReactivatedEventNotification", "V1FinancialConnectionsAccountRefreshedBalanceEventNotification", "V1FinancialConnectionsAccountRefreshedOwnershipEventNotification", "V1FinancialConnectionsAccountRefreshedTransactionsEventNotification", + "V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification", + "V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification", "V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification", + "V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification", + "V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification", "V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification", "V1FinancialConnectionsAccountUpcomingDeactivationEventNotification", "V1IdentityVerificationSessionCanceledEventNotification", @@ -2776,17 +3748,28 @@ def get_v2_event_notification_class(type_: str): "V1IdentityVerificationSessionVerifiedEventNotification", "V1InvoiceCreatedEventNotification", "V1InvoiceDeletedEventNotification", + "V1InvoiceDiscountAddedEventNotification", + "V1InvoiceDiscountRemovedEventNotification", "V1InvoiceFinalizationFailedEventNotification", "V1InvoiceFinalizedEventNotification", + "V1InvoiceitemAmountChangedEventNotification", "V1InvoiceitemCreatedEventNotification", "V1InvoiceitemDeletedEventNotification", + "V1InvoiceitemDiscountAddedEventNotification", + "V1InvoiceitemDiscountRemovedEventNotification", + "V1InvoiceLineItemAddedEventNotification", + "V1InvoiceLineItemPricingChangedEventNotification", + "V1InvoiceLineItemQuantityChangedEventNotification", + "V1InvoiceLineItemRemovedEventNotification", "V1InvoiceMarkedUncollectibleEventNotification", "V1InvoiceOverdueEventNotification", "V1InvoiceOverpaidEventNotification", "V1InvoicePaidEventNotification", "V1InvoicePaymentActionRequiredEventNotification", "V1InvoicePaymentAttemptRequiredEventNotification", + "V1InvoicePaymentCanceledEventNotification", "V1InvoicePaymentFailedEventNotification", + "V1InvoicePaymentOpenEventNotification", "V1InvoicePaymentPaidEventNotification", "V1InvoicePaymentSucceededEventNotification", "V1InvoiceSentEventNotification", @@ -2843,13 +3826,22 @@ def get_v2_event_notification_class(type_: str): "V1PlanCreatedEventNotification", "V1PlanDeletedEventNotification", "V1PlanUpdatedEventNotification", + "V1PriceActivatedEventNotification", "V1PriceCreatedEventNotification", + "V1PriceDeactivatedEventNotification", "V1PriceDeletedEventNotification", + "V1PriceLookupKeyChangedEventNotification", + "V1PriceTaxBehaviorChangedEventNotification", "V1PriceUpdatedEventNotification", + "V1ProductActivatedEventNotification", "V1ProductCreatedEventNotification", + "V1ProductDeactivatedEventNotification", + "V1ProductDefaultPriceChangedEventNotification", "V1ProductDeletedEventNotification", + "V1ProductTaxCodeChangedEventNotification", "V1ProductUpdatedEventNotification", "V1PromotionCodeCreatedEventNotification", + "V1PromotionCodeFullyRedeemedEventNotification", "V1PromotionCodeUpdatedEventNotification", "V1QuoteAcceptedEventNotification", "V1QuoteCanceledEventNotification", @@ -2877,6 +3869,11 @@ def get_v2_event_notification_class(type_: str): "V1SubscriptionScheduleCompletedEventNotification", "V1SubscriptionScheduleCreatedEventNotification", "V1SubscriptionScheduleExpiringEventNotification", + "V1SubscriptionSchedulePhaseAddedEventNotification", + "V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification", + "V1SubscriptionSchedulePhaseEndDateChangedEventNotification", + "V1SubscriptionSchedulePhaseRemovedEventNotification", + "V1SubscriptionSchedulePhaseTrialEndChangedEventNotification", "V1SubscriptionScheduleReleasedEventNotification", "V1SubscriptionScheduleUpdatedEventNotification", "V1TaxRateCreatedEventNotification", @@ -2920,4 +3917,39 @@ def get_v2_event_notification_class(type_: str): "V2CoreAccountPersonUpdatedEventNotification", "V2CoreAccountUpdatedEventNotification", "V2CoreEventDestinationPingEventNotification", + "V2MoneyManagementAdjustmentCreatedEventNotification", + "V2MoneyManagementFinancialAccountCreatedEventNotification", + "V2MoneyManagementFinancialAccountUpdatedEventNotification", + "V2MoneyManagementFinancialAddressActivatedEventNotification", + "V2MoneyManagementFinancialAddressFailedEventNotification", + "V2MoneyManagementInboundTransferAvailableEventNotification", + "V2MoneyManagementInboundTransferBankDebitFailedEventNotification", + "V2MoneyManagementInboundTransferBankDebitProcessingEventNotification", + "V2MoneyManagementInboundTransferBankDebitQueuedEventNotification", + "V2MoneyManagementInboundTransferBankDebitReturnedEventNotification", + "V2MoneyManagementInboundTransferBankDebitSucceededEventNotification", + "V2MoneyManagementOutboundPaymentCanceledEventNotification", + "V2MoneyManagementOutboundPaymentCreatedEventNotification", + "V2MoneyManagementOutboundPaymentFailedEventNotification", + "V2MoneyManagementOutboundPaymentPostedEventNotification", + "V2MoneyManagementOutboundPaymentReturnedEventNotification", + "V2MoneyManagementOutboundPaymentUnderReviewEventNotification", + "V2MoneyManagementOutboundPaymentUpdatedEventNotification", + "V2MoneyManagementPayoutIntentCanceledEventNotification", + "V2MoneyManagementPayoutIntentCreatedEventNotification", + "V2MoneyManagementPayoutIntentPendingEventNotification", + "V2MoneyManagementPayoutIntentPostedEventNotification", + "V2MoneyManagementPayoutIntentProcessingEventNotification", + "V2MoneyManagementPayoutIntentRequiresActionEventNotification", + "V2MoneyManagementPayoutIntentUpdatedEventNotification", + "V2MoneyManagementPayoutMethodCreatedEventNotification", + "V2MoneyManagementPayoutMethodUpdatedEventNotification", + "V2MoneyManagementReceivedCreditAvailableEventNotification", + "V2MoneyManagementReceivedCreditFailedEventNotification", + "V2MoneyManagementReceivedCreditReturnedEventNotification", + "V2MoneyManagementReceivedCreditSucceededEventNotification", + "V2MoneyManagementRecipientVerificationCreatedEventNotification", + "V2MoneyManagementRecipientVerificationUpdatedEventNotification", + "V2MoneyManagementTransactionCreatedEventNotification", + "V2MoneyManagementTransactionUpdatedEventNotification", ] diff --git a/stripe/events/_v1_customer_discount_source_changed_event.py b/stripe/events/_v1_customer_discount_source_changed_event.py new file mode 100644 index 000000000..4c838df01 --- /dev/null +++ b/stripe/events/_v1_customer_discount_source_changed_event.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.core._event import Event, EventNotification +from typing import cast +from typing_extensions import Literal, override + + +class V1CustomerDiscountSourceChangedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.discount.source_changed" + type: Literal["v1.customer.discount.source_changed"] + + @override + def fetch_event(self) -> "V1CustomerDiscountSourceChangedEvent": + return cast( + "V1CustomerDiscountSourceChangedEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerDiscountSourceChangedEvent": + return cast( + "V1CustomerDiscountSourceChangedEvent", + await super().fetch_event_async(), + ) + + +class V1CustomerDiscountSourceChangedEvent(Event): + LOOKUP_TYPE = "v1.customer.discount.source_changed" + type: Literal["v1.customer.discount.source_changed"] diff --git a/stripe/events/_v1_customer_subscription_active_event.py b/stripe/events/_v1_customer_subscription_active_event.py new file mode 100644 index 000000000..3081292e2 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_active_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionActiveEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.active" + type: Literal["v1.customer.subscription.active"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionActiveEvent": + return cast( + "V1CustomerSubscriptionActiveEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerSubscriptionActiveEvent": + return cast( + "V1CustomerSubscriptionActiveEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionActiveEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.active" + type: Literal["v1.customer.subscription.active"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_cancel_at_changed_event.py b/stripe/events/_v1_customer_subscription_cancel_at_changed_event.py new file mode 100644 index 000000000..4edeb6704 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_cancel_at_changed_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionCancelAtChangedEventNotification( + EventNotification +): + LOOKUP_TYPE = "v1.customer.subscription.cancel_at_changed" + type: Literal["v1.customer.subscription.cancel_at_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionCancelAtChangedEvent": + return cast( + "V1CustomerSubscriptionCancelAtChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionCancelAtChangedEvent": + return cast( + "V1CustomerSubscriptionCancelAtChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionCancelAtChangedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.cancel_at_changed" + type: Literal["v1.customer.subscription.cancel_at_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_default_payment_method_changed_event.py b/stripe/events/_v1_customer_subscription_default_payment_method_changed_event.py new file mode 100644 index 000000000..105f4dc1c --- /dev/null +++ b/stripe/events/_v1_customer_subscription_default_payment_method_changed_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionDefaultPaymentMethodChangedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.customer.subscription.default_payment_method_changed" + type: Literal["v1.customer.subscription.default_payment_method_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1CustomerSubscriptionDefaultPaymentMethodChangedEvent": + return cast( + "V1CustomerSubscriptionDefaultPaymentMethodChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionDefaultPaymentMethodChangedEvent": + return cast( + "V1CustomerSubscriptionDefaultPaymentMethodChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionDefaultPaymentMethodChangedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.default_payment_method_changed" + type: Literal["v1.customer.subscription.default_payment_method_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_incomplete_event.py b/stripe/events/_v1_customer_subscription_incomplete_event.py new file mode 100644 index 000000000..4167ef608 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_incomplete_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionIncompleteEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.incomplete" + type: Literal["v1.customer.subscription.incomplete"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionIncompleteEvent": + return cast( + "V1CustomerSubscriptionIncompleteEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionIncompleteEvent": + return cast( + "V1CustomerSubscriptionIncompleteEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionIncompleteEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.incomplete" + type: Literal["v1.customer.subscription.incomplete"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_incomplete_expired_event.py b/stripe/events/_v1_customer_subscription_incomplete_expired_event.py new file mode 100644 index 000000000..4f818e94a --- /dev/null +++ b/stripe/events/_v1_customer_subscription_incomplete_expired_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionIncompleteExpiredEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.customer.subscription.incomplete_expired" + type: Literal["v1.customer.subscription.incomplete_expired"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionIncompleteExpiredEvent": + return cast( + "V1CustomerSubscriptionIncompleteExpiredEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionIncompleteExpiredEvent": + return cast( + "V1CustomerSubscriptionIncompleteExpiredEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionIncompleteExpiredEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.incomplete_expired" + type: Literal["v1.customer.subscription.incomplete_expired"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_item_added_event.py b/stripe/events/_v1_customer_subscription_item_added_event.py new file mode 100644 index 000000000..28b8b5fb0 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_item_added_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionItemAddedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.item_added" + type: Literal["v1.customer.subscription.item_added"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionItemAddedEvent": + return cast( + "V1CustomerSubscriptionItemAddedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionItemAddedEvent": + return cast( + "V1CustomerSubscriptionItemAddedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionItemAddedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.item_added" + type: Literal["v1.customer.subscription.item_added"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_item_price_changed_event.py b/stripe/events/_v1_customer_subscription_item_price_changed_event.py new file mode 100644 index 000000000..6346d0c2e --- /dev/null +++ b/stripe/events/_v1_customer_subscription_item_price_changed_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionItemPriceChangedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.customer.subscription.item_price_changed" + type: Literal["v1.customer.subscription.item_price_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionItemPriceChangedEvent": + return cast( + "V1CustomerSubscriptionItemPriceChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionItemPriceChangedEvent": + return cast( + "V1CustomerSubscriptionItemPriceChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionItemPriceChangedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.item_price_changed" + type: Literal["v1.customer.subscription.item_price_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_item_quantity_changed_event.py b/stripe/events/_v1_customer_subscription_item_quantity_changed_event.py new file mode 100644 index 000000000..630e027ce --- /dev/null +++ b/stripe/events/_v1_customer_subscription_item_quantity_changed_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionItemQuantityChangedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.customer.subscription.item_quantity_changed" + type: Literal["v1.customer.subscription.item_quantity_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionItemQuantityChangedEvent": + return cast( + "V1CustomerSubscriptionItemQuantityChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionItemQuantityChangedEvent": + return cast( + "V1CustomerSubscriptionItemQuantityChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionItemQuantityChangedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.item_quantity_changed" + type: Literal["v1.customer.subscription.item_quantity_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_item_removed_event.py b/stripe/events/_v1_customer_subscription_item_removed_event.py new file mode 100644 index 000000000..d32797474 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_item_removed_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionItemRemovedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.item_removed" + type: Literal["v1.customer.subscription.item_removed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionItemRemovedEvent": + return cast( + "V1CustomerSubscriptionItemRemovedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionItemRemovedEvent": + return cast( + "V1CustomerSubscriptionItemRemovedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionItemRemovedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.item_removed" + type: Literal["v1.customer.subscription.item_removed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_item_tax_rates_changed_event.py b/stripe/events/_v1_customer_subscription_item_tax_rates_changed_event.py new file mode 100644 index 000000000..253bf9422 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_item_tax_rates_changed_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionItemTaxRatesChangedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.customer.subscription.item_tax_rates_changed" + type: Literal["v1.customer.subscription.item_tax_rates_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionItemTaxRatesChangedEvent": + return cast( + "V1CustomerSubscriptionItemTaxRatesChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1CustomerSubscriptionItemTaxRatesChangedEvent": + return cast( + "V1CustomerSubscriptionItemTaxRatesChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionItemTaxRatesChangedEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.item_tax_rates_changed" + type: Literal["v1.customer.subscription.item_tax_rates_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_past_due_event.py b/stripe/events/_v1_customer_subscription_past_due_event.py new file mode 100644 index 000000000..e2e7c2acb --- /dev/null +++ b/stripe/events/_v1_customer_subscription_past_due_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionPastDueEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.past_due" + type: Literal["v1.customer.subscription.past_due"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionPastDueEvent": + return cast( + "V1CustomerSubscriptionPastDueEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerSubscriptionPastDueEvent": + return cast( + "V1CustomerSubscriptionPastDueEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionPastDueEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.past_due" + type: Literal["v1.customer.subscription.past_due"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_trialing_event.py b/stripe/events/_v1_customer_subscription_trialing_event.py new file mode 100644 index 000000000..1bfc69b72 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_trialing_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionTrialingEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.trialing" + type: Literal["v1.customer.subscription.trialing"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionTrialingEvent": + return cast( + "V1CustomerSubscriptionTrialingEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerSubscriptionTrialingEvent": + return cast( + "V1CustomerSubscriptionTrialingEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionTrialingEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.trialing" + type: Literal["v1.customer.subscription.trialing"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_customer_subscription_unpaid_event.py b/stripe/events/_v1_customer_subscription_unpaid_event.py new file mode 100644 index 000000000..68b9a4df1 --- /dev/null +++ b/stripe/events/_v1_customer_subscription_unpaid_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription import Subscription + + +class V1CustomerSubscriptionUnpaidEventNotification(EventNotification): + LOOKUP_TYPE = "v1.customer.subscription.unpaid" + type: Literal["v1.customer.subscription.unpaid"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1CustomerSubscriptionUnpaidEvent": + return cast( + "V1CustomerSubscriptionUnpaidEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Subscription": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1CustomerSubscriptionUnpaidEvent": + return cast( + "V1CustomerSubscriptionUnpaidEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Subscription": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Subscription", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1CustomerSubscriptionUnpaidEvent(Event): + LOOKUP_TYPE = "v1.customer.subscription.unpaid" + type: Literal["v1.customer.subscription.unpaid"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Subscription": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Subscription", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_entitlements_active_entitlement_summary_entitlement_added_event.py b/stripe/events/_v1_entitlements_active_entitlement_summary_entitlement_added_event.py new file mode 100644 index 000000000..4144c2d39 --- /dev/null +++ b/stripe/events/_v1_entitlements_active_entitlement_summary_entitlement_added_event.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.core._event import Event, EventNotification +from typing import cast +from typing_extensions import Literal, override + + +class V1EntitlementsActiveEntitlementSummaryEntitlementAddedEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v1.entitlements.active_entitlement_summary.entitlement_added" + ) + type: Literal[ + "v1.entitlements.active_entitlement_summary.entitlement_added" + ] + + @override + def fetch_event( + self, + ) -> "V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent": + return cast( + "V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent": + return cast( + "V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent", + await super().fetch_event_async(), + ) + + +class V1EntitlementsActiveEntitlementSummaryEntitlementAddedEvent(Event): + LOOKUP_TYPE = ( + "v1.entitlements.active_entitlement_summary.entitlement_added" + ) + type: Literal[ + "v1.entitlements.active_entitlement_summary.entitlement_added" + ] diff --git a/stripe/events/_v1_entitlements_active_entitlement_summary_entitlement_removed_event.py b/stripe/events/_v1_entitlements_active_entitlement_summary_entitlement_removed_event.py new file mode 100644 index 000000000..69e29280f --- /dev/null +++ b/stripe/events/_v1_entitlements_active_entitlement_summary_entitlement_removed_event.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2.core._event import Event, EventNotification +from typing import cast +from typing_extensions import Literal, override + + +class V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v1.entitlements.active_entitlement_summary.entitlement_removed" + ) + type: Literal[ + "v1.entitlements.active_entitlement_summary.entitlement_removed" + ] + + @override + def fetch_event( + self, + ) -> "V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent": + return cast( + "V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent", + super().fetch_event(), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent": + return cast( + "V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent", + await super().fetch_event_async(), + ) + + +class V1EntitlementsActiveEntitlementSummaryEntitlementRemovedEvent(Event): + LOOKUP_TYPE = ( + "v1.entitlements.active_entitlement_summary.entitlement_removed" + ) + type: Literal[ + "v1.entitlements.active_entitlement_summary.entitlement_removed" + ] diff --git a/stripe/events/_v1_financial_connections_account_balance_refresh_failed_event.py b/stripe/events/_v1_financial_connections_account_balance_refresh_failed_event.py new file mode 100644 index 000000000..4c9edd925 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_balance_refresh_failed_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountBalanceRefreshFailedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.balance_refresh_failed" + type: Literal["v1.financial_connections.account.balance_refresh_failed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1FinancialConnectionsAccountBalanceRefreshFailedEvent": + return cast( + "V1FinancialConnectionsAccountBalanceRefreshFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountBalanceRefreshFailedEvent": + return cast( + "V1FinancialConnectionsAccountBalanceRefreshFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountBalanceRefreshFailedEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.balance_refresh_failed" + type: Literal["v1.financial_connections.account.balance_refresh_failed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_financial_connections_account_balance_refresh_succeeded_event.py b/stripe/events/_v1_financial_connections_account_balance_refresh_succeeded_event.py new file mode 100644 index 000000000..99c283bf6 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_balance_refresh_succeeded_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountBalanceRefreshSucceededEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.balance_refresh_succeeded" + type: Literal["v1.financial_connections.account.balance_refresh_succeeded"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1FinancialConnectionsAccountBalanceRefreshSucceededEvent": + return cast( + "V1FinancialConnectionsAccountBalanceRefreshSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountBalanceRefreshSucceededEvent": + return cast( + "V1FinancialConnectionsAccountBalanceRefreshSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountBalanceRefreshSucceededEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.balance_refresh_succeeded" + type: Literal["v1.financial_connections.account.balance_refresh_succeeded"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_financial_connections_account_inferred_balances_refresh_failed_event.py b/stripe/events/_v1_financial_connections_account_inferred_balances_refresh_failed_event.py new file mode 100644 index 000000000..4990ef0d9 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_inferred_balances_refresh_failed_event.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountInferredBalancesRefreshFailedEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v1.financial_connections.account.inferred_balances_refresh_failed" + ) + type: Literal[ + "v1.financial_connections.account.inferred_balances_refresh_failed" + ] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent": + return cast( + "V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent": + return cast( + "V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountInferredBalancesRefreshFailedEvent(Event): + LOOKUP_TYPE = ( + "v1.financial_connections.account.inferred_balances_refresh_failed" + ) + type: Literal[ + "v1.financial_connections.account.inferred_balances_refresh_failed" + ] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_financial_connections_account_inferred_balances_refresh_succeeded_event.py b/stripe/events/_v1_financial_connections_account_inferred_balances_refresh_succeeded_event.py new file mode 100644 index 000000000..c1ecc7549 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_inferred_balances_refresh_succeeded_event.py @@ -0,0 +1,129 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v1.financial_connections.account.inferred_balances_refresh_succeeded" + ) + type: Literal[ + "v1.financial_connections.account.inferred_balances_refresh_succeeded" + ] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent": + return cast( + "V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent": + return cast( + "V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountInferredBalancesRefreshSucceededEvent( + Event +): + LOOKUP_TYPE = ( + "v1.financial_connections.account.inferred_balances_refresh_succeeded" + ) + type: Literal[ + "v1.financial_connections.account.inferred_balances_refresh_succeeded" + ] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_financial_connections_account_ownership_refresh_failed_event.py b/stripe/events/_v1_financial_connections_account_ownership_refresh_failed_event.py new file mode 100644 index 000000000..1377d1c8b --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_ownership_refresh_failed_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountOwnershipRefreshFailedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.financial_connections.account.ownership_refresh_failed" + type: Literal["v1.financial_connections.account.ownership_refresh_failed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1FinancialConnectionsAccountOwnershipRefreshFailedEvent": + return cast( + "V1FinancialConnectionsAccountOwnershipRefreshFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountOwnershipRefreshFailedEvent": + return cast( + "V1FinancialConnectionsAccountOwnershipRefreshFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountOwnershipRefreshFailedEvent(Event): + LOOKUP_TYPE = "v1.financial_connections.account.ownership_refresh_failed" + type: Literal["v1.financial_connections.account.ownership_refresh_failed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_financial_connections_account_ownership_refresh_succeeded_event.py b/stripe/events/_v1_financial_connections_account_ownership_refresh_succeeded_event.py new file mode 100644 index 000000000..df908effe --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_ownership_refresh_succeeded_event.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountOwnershipRefreshSucceededEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v1.financial_connections.account.ownership_refresh_succeeded" + ) + type: Literal[ + "v1.financial_connections.account.ownership_refresh_succeeded" + ] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent": + return cast( + "V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent": + return cast( + "V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountOwnershipRefreshSucceededEvent(Event): + LOOKUP_TYPE = ( + "v1.financial_connections.account.ownership_refresh_succeeded" + ) + type: Literal[ + "v1.financial_connections.account.ownership_refresh_succeeded" + ] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_financial_connections_account_risk_intelligence_refresh_failed_event.py b/stripe/events/_v1_financial_connections_account_risk_intelligence_refresh_failed_event.py new file mode 100644 index 000000000..bce01f8d6 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_risk_intelligence_refresh_failed_event.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v1.financial_connections.account.risk_intelligence_refresh_failed" + ) + type: Literal[ + "v1.financial_connections.account.risk_intelligence_refresh_failed" + ] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent": + return cast( + "V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent": + return cast( + "V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountRiskIntelligenceRefreshFailedEvent(Event): + LOOKUP_TYPE = ( + "v1.financial_connections.account.risk_intelligence_refresh_failed" + ) + type: Literal[ + "v1.financial_connections.account.risk_intelligence_refresh_failed" + ] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_financial_connections_account_risk_intelligence_refresh_succeeded_event.py b/stripe/events/_v1_financial_connections_account_risk_intelligence_refresh_succeeded_event.py new file mode 100644 index 000000000..dedab7084 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_risk_intelligence_refresh_succeeded_event.py @@ -0,0 +1,129 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v1.financial_connections.account.risk_intelligence_refresh_succeeded" + ) + type: Literal[ + "v1.financial_connections.account.risk_intelligence_refresh_succeeded" + ] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent": + return cast( + "V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent": + return cast( + "V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountRiskIntelligenceRefreshSucceededEvent( + Event +): + LOOKUP_TYPE = ( + "v1.financial_connections.account.risk_intelligence_refresh_succeeded" + ) + type: Literal[ + "v1.financial_connections.account.risk_intelligence_refresh_succeeded" + ] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_financial_connections_account_transactions_refresh_failed_event.py b/stripe/events/_v1_financial_connections_account_transactions_refresh_failed_event.py new file mode 100644 index 000000000..48e43c371 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_transactions_refresh_failed_event.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountTransactionsRefreshFailedEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v1.financial_connections.account.transactions_refresh_failed" + ) + type: Literal[ + "v1.financial_connections.account.transactions_refresh_failed" + ] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1FinancialConnectionsAccountTransactionsRefreshFailedEvent": + return cast( + "V1FinancialConnectionsAccountTransactionsRefreshFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountTransactionsRefreshFailedEvent": + return cast( + "V1FinancialConnectionsAccountTransactionsRefreshFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountTransactionsRefreshFailedEvent(Event): + LOOKUP_TYPE = ( + "v1.financial_connections.account.transactions_refresh_failed" + ) + type: Literal[ + "v1.financial_connections.account.transactions_refresh_failed" + ] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_financial_connections_account_transactions_refresh_succeeded_event.py b/stripe/events/_v1_financial_connections_account_transactions_refresh_succeeded_event.py new file mode 100644 index 000000000..4c18ca6e3 --- /dev/null +++ b/stripe/events/_v1_financial_connections_account_transactions_refresh_succeeded_event.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.financial_connections._account import Account + + +class V1FinancialConnectionsAccountTransactionsRefreshSucceededEventNotification( + EventNotification, +): + LOOKUP_TYPE = ( + "v1.financial_connections.account.transactions_refresh_succeeded" + ) + type: Literal[ + "v1.financial_connections.account.transactions_refresh_succeeded" + ] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent": + return cast( + "V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Account": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent": + return cast( + "V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Account": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Account", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1FinancialConnectionsAccountTransactionsRefreshSucceededEvent(Event): + LOOKUP_TYPE = ( + "v1.financial_connections.account.transactions_refresh_succeeded" + ) + type: Literal[ + "v1.financial_connections.account.transactions_refresh_succeeded" + ] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Account": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Account", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_invoice_discount_added_event.py b/stripe/events/_v1_invoice_discount_added_event.py new file mode 100644 index 000000000..af3dfe589 --- /dev/null +++ b/stripe/events/_v1_invoice_discount_added_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceDiscountAddedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.discount_added" + type: Literal["v1.invoice.discount_added"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1InvoiceDiscountAddedEvent": + return cast( + "V1InvoiceDiscountAddedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceDiscountAddedEvent": + return cast( + "V1InvoiceDiscountAddedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceDiscountAddedEvent(Event): + LOOKUP_TYPE = "v1.invoice.discount_added" + type: Literal["v1.invoice.discount_added"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_invoice_discount_removed_event.py b/stripe/events/_v1_invoice_discount_removed_event.py new file mode 100644 index 000000000..637ab939b --- /dev/null +++ b/stripe/events/_v1_invoice_discount_removed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceDiscountRemovedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.discount_removed" + type: Literal["v1.invoice.discount_removed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1InvoiceDiscountRemovedEvent": + return cast( + "V1InvoiceDiscountRemovedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceDiscountRemovedEvent": + return cast( + "V1InvoiceDiscountRemovedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceDiscountRemovedEvent(Event): + LOOKUP_TYPE = "v1.invoice.discount_removed" + type: Literal["v1.invoice.discount_removed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_invoice_line_item_added_event.py b/stripe/events/_v1_invoice_line_item_added_event.py new file mode 100644 index 000000000..e4f939530 --- /dev/null +++ b/stripe/events/_v1_invoice_line_item_added_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceLineItemAddedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.line_item_added" + type: Literal["v1.invoice.line_item_added"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1InvoiceLineItemAddedEvent": + return cast( + "V1InvoiceLineItemAddedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceLineItemAddedEvent": + return cast( + "V1InvoiceLineItemAddedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceLineItemAddedEvent(Event): + LOOKUP_TYPE = "v1.invoice.line_item_added" + type: Literal["v1.invoice.line_item_added"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_invoice_line_item_pricing_changed_event.py b/stripe/events/_v1_invoice_line_item_pricing_changed_event.py new file mode 100644 index 000000000..0c4652b04 --- /dev/null +++ b/stripe/events/_v1_invoice_line_item_pricing_changed_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceLineItemPricingChangedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.line_item_pricing_changed" + type: Literal["v1.invoice.line_item_pricing_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1InvoiceLineItemPricingChangedEvent": + return cast( + "V1InvoiceLineItemPricingChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1InvoiceLineItemPricingChangedEvent": + return cast( + "V1InvoiceLineItemPricingChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceLineItemPricingChangedEvent(Event): + LOOKUP_TYPE = "v1.invoice.line_item_pricing_changed" + type: Literal["v1.invoice.line_item_pricing_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_invoice_line_item_quantity_changed_event.py b/stripe/events/_v1_invoice_line_item_quantity_changed_event.py new file mode 100644 index 000000000..71826b56e --- /dev/null +++ b/stripe/events/_v1_invoice_line_item_quantity_changed_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceLineItemQuantityChangedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.line_item_quantity_changed" + type: Literal["v1.invoice.line_item_quantity_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1InvoiceLineItemQuantityChangedEvent": + return cast( + "V1InvoiceLineItemQuantityChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1InvoiceLineItemQuantityChangedEvent": + return cast( + "V1InvoiceLineItemQuantityChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceLineItemQuantityChangedEvent(Event): + LOOKUP_TYPE = "v1.invoice.line_item_quantity_changed" + type: Literal["v1.invoice.line_item_quantity_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_invoice_line_item_removed_event.py b/stripe/events/_v1_invoice_line_item_removed_event.py new file mode 100644 index 000000000..5e4647204 --- /dev/null +++ b/stripe/events/_v1_invoice_line_item_removed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice import Invoice + from stripe._stripe_client import StripeClient + + +class V1InvoiceLineItemRemovedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice.line_item_removed" + type: Literal["v1.invoice.line_item_removed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1InvoiceLineItemRemovedEvent": + return cast( + "V1InvoiceLineItemRemovedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Invoice": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceLineItemRemovedEvent": + return cast( + "V1InvoiceLineItemRemovedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Invoice": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Invoice", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceLineItemRemovedEvent(Event): + LOOKUP_TYPE = "v1.invoice.line_item_removed" + type: Literal["v1.invoice.line_item_removed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Invoice": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Invoice", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_invoice_payment_canceled_event.py b/stripe/events/_v1_invoice_payment_canceled_event.py new file mode 100644 index 000000000..6901315ff --- /dev/null +++ b/stripe/events/_v1_invoice_payment_canceled_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice_payment import InvoicePayment + from stripe._stripe_client import StripeClient + + +class V1InvoicePaymentCanceledEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice_payment.canceled" + type: Literal["v1.invoice_payment.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1InvoicePaymentCanceledEvent": + return cast( + "V1InvoicePaymentCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InvoicePayment": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InvoicePayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoicePaymentCanceledEvent": + return cast( + "V1InvoicePaymentCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InvoicePayment": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InvoicePayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoicePaymentCanceledEvent(Event): + LOOKUP_TYPE = "v1.invoice_payment.canceled" + type: Literal["v1.invoice_payment.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "InvoicePayment": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InvoicePayment", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_invoice_payment_open_event.py b/stripe/events/_v1_invoice_payment_open_event.py new file mode 100644 index 000000000..42e5a0cdd --- /dev/null +++ b/stripe/events/_v1_invoice_payment_open_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice_payment import InvoicePayment + from stripe._stripe_client import StripeClient + + +class V1InvoicePaymentOpenEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoice_payment.open" + type: Literal["v1.invoice_payment.open"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1InvoicePaymentOpenEvent": + return cast( + "V1InvoicePaymentOpenEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InvoicePayment": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InvoicePayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoicePaymentOpenEvent": + return cast( + "V1InvoicePaymentOpenEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InvoicePayment": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InvoicePayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoicePaymentOpenEvent(Event): + LOOKUP_TYPE = "v1.invoice_payment.open" + type: Literal["v1.invoice_payment.open"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "InvoicePayment": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InvoicePayment", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_invoice_upcoming_event.py b/stripe/events/_v1_invoice_upcoming_event.py index 91505066c..6ac670a56 100644 --- a/stripe/events/_v1_invoice_upcoming_event.py +++ b/stripe/events/_v1_invoice_upcoming_event.py @@ -1,8 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import cast -from typing_extensions import Literal, override +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor class V1InvoiceUpcomingEventNotification(EventNotification): @@ -27,3 +33,42 @@ async def fetch_event_async(self) -> "V1InvoiceUpcomingEvent": class V1InvoiceUpcomingEvent(Event): LOOKUP_TYPE = "v1.invoice.upcoming" type: Literal["v1.invoice.upcoming"] + + class V1InvoiceUpcomingEventData(StripeObject): + customer: str + """ + The ID of the customer this upcoming invoice is associated with. + """ + subscription: Optional[str] + """ + The ID of the subscription, if any. + """ + + data: V1InvoiceUpcomingEventData + """ + Data for the v1.invoice.upcoming event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V1InvoiceUpcomingEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V1InvoiceUpcomingEvent.V1InvoiceUpcomingEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt diff --git a/stripe/events/_v1_invoiceitem_amount_changed_event.py b/stripe/events/_v1_invoiceitem_amount_changed_event.py new file mode 100644 index 000000000..7f4102a10 --- /dev/null +++ b/stripe/events/_v1_invoiceitem_amount_changed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice_item import InvoiceItem + from stripe._stripe_client import StripeClient + + +class V1InvoiceitemAmountChangedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoiceitem.amount_changed" + type: Literal["v1.invoiceitem.amount_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1InvoiceitemAmountChangedEvent": + return cast( + "V1InvoiceitemAmountChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InvoiceItem": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InvoiceItem", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceitemAmountChangedEvent": + return cast( + "V1InvoiceitemAmountChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InvoiceItem": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InvoiceItem", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceitemAmountChangedEvent(Event): + LOOKUP_TYPE = "v1.invoiceitem.amount_changed" + type: Literal["v1.invoiceitem.amount_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "InvoiceItem": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InvoiceItem", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_invoiceitem_discount_added_event.py b/stripe/events/_v1_invoiceitem_discount_added_event.py new file mode 100644 index 000000000..28ecf68e3 --- /dev/null +++ b/stripe/events/_v1_invoiceitem_discount_added_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice_item import InvoiceItem + from stripe._stripe_client import StripeClient + + +class V1InvoiceitemDiscountAddedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoiceitem.discount_added" + type: Literal["v1.invoiceitem.discount_added"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1InvoiceitemDiscountAddedEvent": + return cast( + "V1InvoiceitemDiscountAddedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InvoiceItem": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InvoiceItem", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceitemDiscountAddedEvent": + return cast( + "V1InvoiceitemDiscountAddedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InvoiceItem": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InvoiceItem", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceitemDiscountAddedEvent(Event): + LOOKUP_TYPE = "v1.invoiceitem.discount_added" + type: Literal["v1.invoiceitem.discount_added"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "InvoiceItem": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InvoiceItem", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_invoiceitem_discount_removed_event.py b/stripe/events/_v1_invoiceitem_discount_removed_event.py new file mode 100644 index 000000000..50f3e6c58 --- /dev/null +++ b/stripe/events/_v1_invoiceitem_discount_removed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._invoice_item import InvoiceItem + from stripe._stripe_client import StripeClient + + +class V1InvoiceitemDiscountRemovedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.invoiceitem.discount_removed" + type: Literal["v1.invoiceitem.discount_removed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1InvoiceitemDiscountRemovedEvent": + return cast( + "V1InvoiceitemDiscountRemovedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InvoiceItem": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InvoiceItem", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1InvoiceitemDiscountRemovedEvent": + return cast( + "V1InvoiceitemDiscountRemovedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InvoiceItem": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InvoiceItem", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1InvoiceitemDiscountRemovedEvent(Event): + LOOKUP_TYPE = "v1.invoiceitem.discount_removed" + type: Literal["v1.invoiceitem.discount_removed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "InvoiceItem": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InvoiceItem", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_price_activated_event.py b/stripe/events/_v1_price_activated_event.py new file mode 100644 index 000000000..eb14b09f4 --- /dev/null +++ b/stripe/events/_v1_price_activated_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._price import Price + from stripe._stripe_client import StripeClient + + +class V1PriceActivatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.price.activated" + type: Literal["v1.price.activated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1PriceActivatedEvent": + return cast( + "V1PriceActivatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Price": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PriceActivatedEvent": + return cast( + "V1PriceActivatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Price": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PriceActivatedEvent(Event): + LOOKUP_TYPE = "v1.price.activated" + type: Literal["v1.price.activated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Price": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Price", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_price_deactivated_event.py b/stripe/events/_v1_price_deactivated_event.py new file mode 100644 index 000000000..5e43eb50d --- /dev/null +++ b/stripe/events/_v1_price_deactivated_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._price import Price + from stripe._stripe_client import StripeClient + + +class V1PriceDeactivatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.price.deactivated" + type: Literal["v1.price.deactivated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1PriceDeactivatedEvent": + return cast( + "V1PriceDeactivatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Price": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PriceDeactivatedEvent": + return cast( + "V1PriceDeactivatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Price": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PriceDeactivatedEvent(Event): + LOOKUP_TYPE = "v1.price.deactivated" + type: Literal["v1.price.deactivated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Price": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Price", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_price_lookup_key_changed_event.py b/stripe/events/_v1_price_lookup_key_changed_event.py new file mode 100644 index 000000000..3bf71ecc9 --- /dev/null +++ b/stripe/events/_v1_price_lookup_key_changed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._price import Price + from stripe._stripe_client import StripeClient + + +class V1PriceLookupKeyChangedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.price.lookup_key_changed" + type: Literal["v1.price.lookup_key_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1PriceLookupKeyChangedEvent": + return cast( + "V1PriceLookupKeyChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Price": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PriceLookupKeyChangedEvent": + return cast( + "V1PriceLookupKeyChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Price": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PriceLookupKeyChangedEvent(Event): + LOOKUP_TYPE = "v1.price.lookup_key_changed" + type: Literal["v1.price.lookup_key_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Price": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Price", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_price_tax_behavior_changed_event.py b/stripe/events/_v1_price_tax_behavior_changed_event.py new file mode 100644 index 000000000..358723260 --- /dev/null +++ b/stripe/events/_v1_price_tax_behavior_changed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._price import Price + from stripe._stripe_client import StripeClient + + +class V1PriceTaxBehaviorChangedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.price.tax_behavior_changed" + type: Literal["v1.price.tax_behavior_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1PriceTaxBehaviorChangedEvent": + return cast( + "V1PriceTaxBehaviorChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Price": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PriceTaxBehaviorChangedEvent": + return cast( + "V1PriceTaxBehaviorChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Price": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Price", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PriceTaxBehaviorChangedEvent(Event): + LOOKUP_TYPE = "v1.price.tax_behavior_changed" + type: Literal["v1.price.tax_behavior_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Price": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Price", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_product_activated_event.py b/stripe/events/_v1_product_activated_event.py new file mode 100644 index 000000000..444a727a3 --- /dev/null +++ b/stripe/events/_v1_product_activated_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._product import Product + from stripe._stripe_client import StripeClient + + +class V1ProductActivatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.product.activated" + type: Literal["v1.product.activated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1ProductActivatedEvent": + return cast( + "V1ProductActivatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Product": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ProductActivatedEvent": + return cast( + "V1ProductActivatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Product": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ProductActivatedEvent(Event): + LOOKUP_TYPE = "v1.product.activated" + type: Literal["v1.product.activated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Product": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Product", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_product_deactivated_event.py b/stripe/events/_v1_product_deactivated_event.py new file mode 100644 index 000000000..733e23ee3 --- /dev/null +++ b/stripe/events/_v1_product_deactivated_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._product import Product + from stripe._stripe_client import StripeClient + + +class V1ProductDeactivatedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.product.deactivated" + type: Literal["v1.product.deactivated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1ProductDeactivatedEvent": + return cast( + "V1ProductDeactivatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Product": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ProductDeactivatedEvent": + return cast( + "V1ProductDeactivatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Product": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ProductDeactivatedEvent(Event): + LOOKUP_TYPE = "v1.product.deactivated" + type: Literal["v1.product.deactivated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Product": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Product", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_product_default_price_changed_event.py b/stripe/events/_v1_product_default_price_changed_event.py new file mode 100644 index 000000000..2f67e4114 --- /dev/null +++ b/stripe/events/_v1_product_default_price_changed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._product import Product + from stripe._stripe_client import StripeClient + + +class V1ProductDefaultPriceChangedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.product.default_price_changed" + type: Literal["v1.product.default_price_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1ProductDefaultPriceChangedEvent": + return cast( + "V1ProductDefaultPriceChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Product": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ProductDefaultPriceChangedEvent": + return cast( + "V1ProductDefaultPriceChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Product": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ProductDefaultPriceChangedEvent(Event): + LOOKUP_TYPE = "v1.product.default_price_changed" + type: Literal["v1.product.default_price_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Product": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Product", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_product_tax_code_changed_event.py b/stripe/events/_v1_product_tax_code_changed_event.py new file mode 100644 index 000000000..7231a19bb --- /dev/null +++ b/stripe/events/_v1_product_tax_code_changed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._product import Product + from stripe._stripe_client import StripeClient + + +class V1ProductTaxCodeChangedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.product.tax_code_changed" + type: Literal["v1.product.tax_code_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1ProductTaxCodeChangedEvent": + return cast( + "V1ProductTaxCodeChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Product": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1ProductTaxCodeChangedEvent": + return cast( + "V1ProductTaxCodeChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Product": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Product", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1ProductTaxCodeChangedEvent(Event): + LOOKUP_TYPE = "v1.product.tax_code_changed" + type: Literal["v1.product.tax_code_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Product": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Product", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_promotion_code_fully_redeemed_event.py b/stripe/events/_v1_promotion_code_fully_redeemed_event.py new file mode 100644 index 000000000..e582903eb --- /dev/null +++ b/stripe/events/_v1_promotion_code_fully_redeemed_event.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._promotion_code import PromotionCode + from stripe._stripe_client import StripeClient + + +class V1PromotionCodeFullyRedeemedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.promotion_code.fully_redeemed" + type: Literal["v1.promotion_code.fully_redeemed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1PromotionCodeFullyRedeemedEvent": + return cast( + "V1PromotionCodeFullyRedeemedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PromotionCode": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PromotionCode", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async(self) -> "V1PromotionCodeFullyRedeemedEvent": + return cast( + "V1PromotionCodeFullyRedeemedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PromotionCode": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PromotionCode", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1PromotionCodeFullyRedeemedEvent(Event): + LOOKUP_TYPE = "v1.promotion_code.fully_redeemed" + type: Literal["v1.promotion_code.fully_redeemed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "PromotionCode": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PromotionCode", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_subscription_schedule_phase_added_event.py b/stripe/events/_v1_subscription_schedule_phase_added_event.py new file mode 100644 index 000000000..cc20de5bc --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_phase_added_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionSchedulePhaseAddedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.subscription_schedule.phase_added" + type: Literal["v1.subscription_schedule.phase_added"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1SubscriptionSchedulePhaseAddedEvent": + return cast( + "V1SubscriptionSchedulePhaseAddedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1SubscriptionSchedulePhaseAddedEvent": + return cast( + "V1SubscriptionSchedulePhaseAddedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionSchedulePhaseAddedEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.phase_added" + type: Literal["v1.subscription_schedule.phase_added"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_subscription_schedule_phase_default_tax_rates_changed_event.py b/stripe/events/_v1_subscription_schedule_phase_default_tax_rates_changed_event.py new file mode 100644 index 000000000..51dbe50a1 --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_phase_default_tax_rates_changed_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.subscription_schedule.phase_default_tax_rates_changed" + type: Literal["v1.subscription_schedule.phase_default_tax_rates_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent": + return cast( + "V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent": + return cast( + "V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionSchedulePhaseDefaultTaxRatesChangedEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.phase_default_tax_rates_changed" + type: Literal["v1.subscription_schedule.phase_default_tax_rates_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_subscription_schedule_phase_end_date_changed_event.py b/stripe/events/_v1_subscription_schedule_phase_end_date_changed_event.py new file mode 100644 index 000000000..2cdaccea0 --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_phase_end_date_changed_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionSchedulePhaseEndDateChangedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.subscription_schedule.phase_end_date_changed" + type: Literal["v1.subscription_schedule.phase_end_date_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1SubscriptionSchedulePhaseEndDateChangedEvent": + return cast( + "V1SubscriptionSchedulePhaseEndDateChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1SubscriptionSchedulePhaseEndDateChangedEvent": + return cast( + "V1SubscriptionSchedulePhaseEndDateChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionSchedulePhaseEndDateChangedEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.phase_end_date_changed" + type: Literal["v1.subscription_schedule.phase_end_date_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_subscription_schedule_phase_removed_event.py b/stripe/events/_v1_subscription_schedule_phase_removed_event.py new file mode 100644 index 000000000..bb4445e4c --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_phase_removed_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionSchedulePhaseRemovedEventNotification(EventNotification): + LOOKUP_TYPE = "v1.subscription_schedule.phase_removed" + type: Literal["v1.subscription_schedule.phase_removed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1SubscriptionSchedulePhaseRemovedEvent": + return cast( + "V1SubscriptionSchedulePhaseRemovedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1SubscriptionSchedulePhaseRemovedEvent": + return cast( + "V1SubscriptionSchedulePhaseRemovedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionSchedulePhaseRemovedEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.phase_removed" + type: Literal["v1.subscription_schedule.phase_removed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v1_subscription_schedule_phase_trial_end_changed_event.py b/stripe/events/_v1_subscription_schedule_phase_trial_end_changed_event.py new file mode 100644 index 000000000..cced062ee --- /dev/null +++ b/stripe/events/_v1_subscription_schedule_phase_trial_end_changed_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe._subscription_schedule import SubscriptionSchedule + + +class V1SubscriptionSchedulePhaseTrialEndChangedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v1.subscription_schedule.phase_trial_end_changed" + type: Literal["v1.subscription_schedule.phase_trial_end_changed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V1SubscriptionSchedulePhaseTrialEndChangedEvent": + return cast( + "V1SubscriptionSchedulePhaseTrialEndChangedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "SubscriptionSchedule": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V1SubscriptionSchedulePhaseTrialEndChangedEvent": + return cast( + "V1SubscriptionSchedulePhaseTrialEndChangedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "SubscriptionSchedule": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "SubscriptionSchedule", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V1SubscriptionSchedulePhaseTrialEndChangedEvent(Event): + LOOKUP_TYPE = "v1.subscription_schedule.phase_trial_end_changed" + type: Literal["v1.subscription_schedule.phase_trial_end_changed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "SubscriptionSchedule": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "SubscriptionSchedule", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py index c07e367c5..54b1a75cc 100644 --- a/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py @@ -100,7 +100,13 @@ class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventDa ): updated_capability: Union[ Literal[ + "bank_accounts.ach", + "bank_accounts.fedwire", + "bank_accounts.fps", "bank_accounts.local", + "bank_accounts.rtp", + "bank_accounts.sepa", + "bank_accounts.swift", "bank_accounts.wire", "cards", "stripe_balance.payouts", diff --git a/stripe/events/_v2_money_management_adjustment_created_event.py b/stripe/events/_v2_money_management_adjustment_created_event.py new file mode 100644 index 000000000..f893d7a2f --- /dev/null +++ b/stripe/events/_v2_money_management_adjustment_created_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._adjustment import Adjustment + + +class V2MoneyManagementAdjustmentCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.money_management.adjustment.created" + type: Literal["v2.money_management.adjustment.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementAdjustmentCreatedEvent": + return cast( + "V2MoneyManagementAdjustmentCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Adjustment": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Adjustment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementAdjustmentCreatedEvent": + return cast( + "V2MoneyManagementAdjustmentCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Adjustment": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Adjustment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementAdjustmentCreatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.adjustment.created" + type: Literal["v2.money_management.adjustment.created"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Adjustment": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Adjustment", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_financial_account_created_event.py b/stripe/events/_v2_money_management_financial_account_created_event.py new file mode 100644 index 000000000..7e46f8d4d --- /dev/null +++ b/stripe/events/_v2_money_management_financial_account_created_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._financial_account import FinancialAccount + + +class V2MoneyManagementFinancialAccountCreatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.financial_account.created" + type: Literal["v2.money_management.financial_account.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementFinancialAccountCreatedEvent": + return cast( + "V2MoneyManagementFinancialAccountCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "FinancialAccount": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "FinancialAccount", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementFinancialAccountCreatedEvent": + return cast( + "V2MoneyManagementFinancialAccountCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "FinancialAccount": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "FinancialAccount", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementFinancialAccountCreatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.financial_account.created" + type: Literal["v2.money_management.financial_account.created"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "FinancialAccount": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "FinancialAccount", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_financial_account_updated_event.py b/stripe/events/_v2_money_management_financial_account_updated_event.py new file mode 100644 index 000000000..5651dc6bb --- /dev/null +++ b/stripe/events/_v2_money_management_financial_account_updated_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._financial_account import FinancialAccount + + +class V2MoneyManagementFinancialAccountUpdatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.financial_account.updated" + type: Literal["v2.money_management.financial_account.updated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementFinancialAccountUpdatedEvent": + return cast( + "V2MoneyManagementFinancialAccountUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "FinancialAccount": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "FinancialAccount", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementFinancialAccountUpdatedEvent": + return cast( + "V2MoneyManagementFinancialAccountUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "FinancialAccount": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "FinancialAccount", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementFinancialAccountUpdatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.financial_account.updated" + type: Literal["v2.money_management.financial_account.updated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "FinancialAccount": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "FinancialAccount", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_financial_address_activated_event.py b/stripe/events/_v2_money_management_financial_address_activated_event.py new file mode 100644 index 000000000..3d1b4e4dd --- /dev/null +++ b/stripe/events/_v2_money_management_financial_address_activated_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._financial_address import FinancialAddress + + +class V2MoneyManagementFinancialAddressActivatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.financial_address.activated" + type: Literal["v2.money_management.financial_address.activated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementFinancialAddressActivatedEvent": + return cast( + "V2MoneyManagementFinancialAddressActivatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "FinancialAddress": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "FinancialAddress", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementFinancialAddressActivatedEvent": + return cast( + "V2MoneyManagementFinancialAddressActivatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "FinancialAddress": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "FinancialAddress", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementFinancialAddressActivatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.financial_address.activated" + type: Literal["v2.money_management.financial_address.activated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "FinancialAddress": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "FinancialAddress", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_financial_address_failed_event.py b/stripe/events/_v2_money_management_financial_address_failed_event.py new file mode 100644 index 000000000..4e8061943 --- /dev/null +++ b/stripe/events/_v2_money_management_financial_address_failed_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._financial_address import FinancialAddress + + +class V2MoneyManagementFinancialAddressFailedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.financial_address.failed" + type: Literal["v2.money_management.financial_address.failed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementFinancialAddressFailedEvent": + return cast( + "V2MoneyManagementFinancialAddressFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "FinancialAddress": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "FinancialAddress", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementFinancialAddressFailedEvent": + return cast( + "V2MoneyManagementFinancialAddressFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "FinancialAddress": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "FinancialAddress", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementFinancialAddressFailedEvent(Event): + LOOKUP_TYPE = "v2.money_management.financial_address.failed" + type: Literal["v2.money_management.financial_address.failed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "FinancialAddress": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "FinancialAddress", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_inbound_transfer_available_event.py b/stripe/events/_v2_money_management_inbound_transfer_available_event.py new file mode 100644 index 000000000..634f28804 --- /dev/null +++ b/stripe/events/_v2_money_management_inbound_transfer_available_event.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._inbound_transfer import InboundTransfer + + +class V2MoneyManagementInboundTransferAvailableEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.available" + type: Literal["v2.money_management.inbound_transfer.available"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementInboundTransferAvailableEvent": + return cast( + "V2MoneyManagementInboundTransferAvailableEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InboundTransfer": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementInboundTransferAvailableEvent": + return cast( + "V2MoneyManagementInboundTransferAvailableEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InboundTransfer": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementInboundTransferAvailableEvent(Event): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.available" + type: Literal["v2.money_management.inbound_transfer.available"] + + class V2MoneyManagementInboundTransferAvailableEventData(StripeObject): + transaction_id: str + """ + The transaction ID of the received credit. + """ + + data: V2MoneyManagementInboundTransferAvailableEventData + """ + Data for the v2.money_management.inbound_transfer.available event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2MoneyManagementInboundTransferAvailableEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2MoneyManagementInboundTransferAvailableEvent.V2MoneyManagementInboundTransferAvailableEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "InboundTransfer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InboundTransfer", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_failed_event.py b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_failed_event.py new file mode 100644 index 000000000..ce9b59921 --- /dev/null +++ b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_failed_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._inbound_transfer import InboundTransfer + + +class V2MoneyManagementInboundTransferBankDebitFailedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.bank_debit_failed" + type: Literal["v2.money_management.inbound_transfer.bank_debit_failed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2MoneyManagementInboundTransferBankDebitFailedEvent": + return cast( + "V2MoneyManagementInboundTransferBankDebitFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InboundTransfer": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementInboundTransferBankDebitFailedEvent": + return cast( + "V2MoneyManagementInboundTransferBankDebitFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InboundTransfer": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementInboundTransferBankDebitFailedEvent(Event): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.bank_debit_failed" + type: Literal["v2.money_management.inbound_transfer.bank_debit_failed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "InboundTransfer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InboundTransfer", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_processing_event.py b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_processing_event.py new file mode 100644 index 000000000..89af0838d --- /dev/null +++ b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_processing_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._inbound_transfer import InboundTransfer + + +class V2MoneyManagementInboundTransferBankDebitProcessingEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.bank_debit_processing" + type: Literal["v2.money_management.inbound_transfer.bank_debit_processing"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2MoneyManagementInboundTransferBankDebitProcessingEvent": + return cast( + "V2MoneyManagementInboundTransferBankDebitProcessingEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InboundTransfer": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementInboundTransferBankDebitProcessingEvent": + return cast( + "V2MoneyManagementInboundTransferBankDebitProcessingEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InboundTransfer": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementInboundTransferBankDebitProcessingEvent(Event): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.bank_debit_processing" + type: Literal["v2.money_management.inbound_transfer.bank_debit_processing"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "InboundTransfer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InboundTransfer", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_queued_event.py b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_queued_event.py new file mode 100644 index 000000000..89063b7f3 --- /dev/null +++ b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_queued_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._inbound_transfer import InboundTransfer + + +class V2MoneyManagementInboundTransferBankDebitQueuedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.bank_debit_queued" + type: Literal["v2.money_management.inbound_transfer.bank_debit_queued"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2MoneyManagementInboundTransferBankDebitQueuedEvent": + return cast( + "V2MoneyManagementInboundTransferBankDebitQueuedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InboundTransfer": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementInboundTransferBankDebitQueuedEvent": + return cast( + "V2MoneyManagementInboundTransferBankDebitQueuedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InboundTransfer": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementInboundTransferBankDebitQueuedEvent(Event): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.bank_debit_queued" + type: Literal["v2.money_management.inbound_transfer.bank_debit_queued"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "InboundTransfer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InboundTransfer", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_returned_event.py b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_returned_event.py new file mode 100644 index 000000000..021d63798 --- /dev/null +++ b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_returned_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._inbound_transfer import InboundTransfer + + +class V2MoneyManagementInboundTransferBankDebitReturnedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.bank_debit_returned" + type: Literal["v2.money_management.inbound_transfer.bank_debit_returned"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2MoneyManagementInboundTransferBankDebitReturnedEvent": + return cast( + "V2MoneyManagementInboundTransferBankDebitReturnedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InboundTransfer": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementInboundTransferBankDebitReturnedEvent": + return cast( + "V2MoneyManagementInboundTransferBankDebitReturnedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InboundTransfer": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementInboundTransferBankDebitReturnedEvent(Event): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.bank_debit_returned" + type: Literal["v2.money_management.inbound_transfer.bank_debit_returned"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "InboundTransfer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InboundTransfer", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_succeeded_event.py b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_succeeded_event.py new file mode 100644 index 000000000..5647fc852 --- /dev/null +++ b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_succeeded_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._inbound_transfer import InboundTransfer + + +class V2MoneyManagementInboundTransferBankDebitSucceededEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.bank_debit_succeeded" + type: Literal["v2.money_management.inbound_transfer.bank_debit_succeeded"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2MoneyManagementInboundTransferBankDebitSucceededEvent": + return cast( + "V2MoneyManagementInboundTransferBankDebitSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "InboundTransfer": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementInboundTransferBankDebitSucceededEvent": + return cast( + "V2MoneyManagementInboundTransferBankDebitSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "InboundTransfer": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "InboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementInboundTransferBankDebitSucceededEvent(Event): + LOOKUP_TYPE = "v2.money_management.inbound_transfer.bank_debit_succeeded" + type: Literal["v2.money_management.inbound_transfer.bank_debit_succeeded"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "InboundTransfer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "InboundTransfer", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_outbound_payment_canceled_event.py b/stripe/events/_v2_money_management_outbound_payment_canceled_event.py new file mode 100644 index 000000000..915eeee49 --- /dev/null +++ b/stripe/events/_v2_money_management_outbound_payment_canceled_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._outbound_payment import OutboundPayment + + +class V2MoneyManagementOutboundPaymentCanceledEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.outbound_payment.canceled" + type: Literal["v2.money_management.outbound_payment.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementOutboundPaymentCanceledEvent": + return cast( + "V2MoneyManagementOutboundPaymentCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "OutboundPayment": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementOutboundPaymentCanceledEvent": + return cast( + "V2MoneyManagementOutboundPaymentCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "OutboundPayment": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementOutboundPaymentCanceledEvent(Event): + LOOKUP_TYPE = "v2.money_management.outbound_payment.canceled" + type: Literal["v2.money_management.outbound_payment.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "OutboundPayment": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "OutboundPayment", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_outbound_payment_created_event.py b/stripe/events/_v2_money_management_outbound_payment_created_event.py new file mode 100644 index 000000000..e84c6587c --- /dev/null +++ b/stripe/events/_v2_money_management_outbound_payment_created_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._outbound_payment import OutboundPayment + + +class V2MoneyManagementOutboundPaymentCreatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.outbound_payment.created" + type: Literal["v2.money_management.outbound_payment.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementOutboundPaymentCreatedEvent": + return cast( + "V2MoneyManagementOutboundPaymentCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "OutboundPayment": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementOutboundPaymentCreatedEvent": + return cast( + "V2MoneyManagementOutboundPaymentCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "OutboundPayment": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementOutboundPaymentCreatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.outbound_payment.created" + type: Literal["v2.money_management.outbound_payment.created"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "OutboundPayment": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "OutboundPayment", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_outbound_payment_failed_event.py b/stripe/events/_v2_money_management_outbound_payment_failed_event.py new file mode 100644 index 000000000..018ce10d1 --- /dev/null +++ b/stripe/events/_v2_money_management_outbound_payment_failed_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._outbound_payment import OutboundPayment + + +class V2MoneyManagementOutboundPaymentFailedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.outbound_payment.failed" + type: Literal["v2.money_management.outbound_payment.failed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementOutboundPaymentFailedEvent": + return cast( + "V2MoneyManagementOutboundPaymentFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "OutboundPayment": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementOutboundPaymentFailedEvent": + return cast( + "V2MoneyManagementOutboundPaymentFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "OutboundPayment": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementOutboundPaymentFailedEvent(Event): + LOOKUP_TYPE = "v2.money_management.outbound_payment.failed" + type: Literal["v2.money_management.outbound_payment.failed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "OutboundPayment": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "OutboundPayment", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_outbound_payment_posted_event.py b/stripe/events/_v2_money_management_outbound_payment_posted_event.py new file mode 100644 index 000000000..f748ba61b --- /dev/null +++ b/stripe/events/_v2_money_management_outbound_payment_posted_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._outbound_payment import OutboundPayment + + +class V2MoneyManagementOutboundPaymentPostedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.outbound_payment.posted" + type: Literal["v2.money_management.outbound_payment.posted"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementOutboundPaymentPostedEvent": + return cast( + "V2MoneyManagementOutboundPaymentPostedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "OutboundPayment": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementOutboundPaymentPostedEvent": + return cast( + "V2MoneyManagementOutboundPaymentPostedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "OutboundPayment": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementOutboundPaymentPostedEvent(Event): + LOOKUP_TYPE = "v2.money_management.outbound_payment.posted" + type: Literal["v2.money_management.outbound_payment.posted"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "OutboundPayment": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "OutboundPayment", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_outbound_payment_returned_event.py b/stripe/events/_v2_money_management_outbound_payment_returned_event.py new file mode 100644 index 000000000..303d509a1 --- /dev/null +++ b/stripe/events/_v2_money_management_outbound_payment_returned_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._outbound_payment import OutboundPayment + + +class V2MoneyManagementOutboundPaymentReturnedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.outbound_payment.returned" + type: Literal["v2.money_management.outbound_payment.returned"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementOutboundPaymentReturnedEvent": + return cast( + "V2MoneyManagementOutboundPaymentReturnedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "OutboundPayment": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementOutboundPaymentReturnedEvent": + return cast( + "V2MoneyManagementOutboundPaymentReturnedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "OutboundPayment": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementOutboundPaymentReturnedEvent(Event): + LOOKUP_TYPE = "v2.money_management.outbound_payment.returned" + type: Literal["v2.money_management.outbound_payment.returned"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "OutboundPayment": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "OutboundPayment", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_outbound_payment_under_review_event.py b/stripe/events/_v2_money_management_outbound_payment_under_review_event.py new file mode 100644 index 000000000..1f0af70c3 --- /dev/null +++ b/stripe/events/_v2_money_management_outbound_payment_under_review_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._outbound_payment import OutboundPayment + + +class V2MoneyManagementOutboundPaymentUnderReviewEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.outbound_payment.under_review" + type: Literal["v2.money_management.outbound_payment.under_review"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2MoneyManagementOutboundPaymentUnderReviewEvent": + return cast( + "V2MoneyManagementOutboundPaymentUnderReviewEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "OutboundPayment": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementOutboundPaymentUnderReviewEvent": + return cast( + "V2MoneyManagementOutboundPaymentUnderReviewEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "OutboundPayment": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementOutboundPaymentUnderReviewEvent(Event): + LOOKUP_TYPE = "v2.money_management.outbound_payment.under_review" + type: Literal["v2.money_management.outbound_payment.under_review"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "OutboundPayment": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "OutboundPayment", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_outbound_payment_updated_event.py b/stripe/events/_v2_money_management_outbound_payment_updated_event.py new file mode 100644 index 000000000..2635ff9b1 --- /dev/null +++ b/stripe/events/_v2_money_management_outbound_payment_updated_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._outbound_payment import OutboundPayment + + +class V2MoneyManagementOutboundPaymentUpdatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.outbound_payment.updated" + type: Literal["v2.money_management.outbound_payment.updated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementOutboundPaymentUpdatedEvent": + return cast( + "V2MoneyManagementOutboundPaymentUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "OutboundPayment": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementOutboundPaymentUpdatedEvent": + return cast( + "V2MoneyManagementOutboundPaymentUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "OutboundPayment": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "OutboundPayment", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementOutboundPaymentUpdatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.outbound_payment.updated" + type: Literal["v2.money_management.outbound_payment.updated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "OutboundPayment": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "OutboundPayment", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_payout_intent_canceled_event.py b/stripe/events/_v2_money_management_payout_intent_canceled_event.py new file mode 100644 index 000000000..039428181 --- /dev/null +++ b/stripe/events/_v2_money_management_payout_intent_canceled_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._payout_intent import PayoutIntent + + +class V2MoneyManagementPayoutIntentCanceledEventNotification( + EventNotification +): + LOOKUP_TYPE = "v2.money_management.payout_intent.canceled" + type: Literal["v2.money_management.payout_intent.canceled"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementPayoutIntentCanceledEvent": + return cast( + "V2MoneyManagementPayoutIntentCanceledEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PayoutIntent": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementPayoutIntentCanceledEvent": + return cast( + "V2MoneyManagementPayoutIntentCanceledEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PayoutIntent": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementPayoutIntentCanceledEvent(Event): + LOOKUP_TYPE = "v2.money_management.payout_intent.canceled" + type: Literal["v2.money_management.payout_intent.canceled"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "PayoutIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PayoutIntent", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_payout_intent_created_event.py b/stripe/events/_v2_money_management_payout_intent_created_event.py new file mode 100644 index 000000000..066f5ec50 --- /dev/null +++ b/stripe/events/_v2_money_management_payout_intent_created_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._payout_intent import PayoutIntent + + +class V2MoneyManagementPayoutIntentCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.money_management.payout_intent.created" + type: Literal["v2.money_management.payout_intent.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementPayoutIntentCreatedEvent": + return cast( + "V2MoneyManagementPayoutIntentCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PayoutIntent": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementPayoutIntentCreatedEvent": + return cast( + "V2MoneyManagementPayoutIntentCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PayoutIntent": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementPayoutIntentCreatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.payout_intent.created" + type: Literal["v2.money_management.payout_intent.created"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "PayoutIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PayoutIntent", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_payout_intent_pending_event.py b/stripe/events/_v2_money_management_payout_intent_pending_event.py new file mode 100644 index 000000000..c390b8947 --- /dev/null +++ b/stripe/events/_v2_money_management_payout_intent_pending_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._payout_intent import PayoutIntent + + +class V2MoneyManagementPayoutIntentPendingEventNotification(EventNotification): + LOOKUP_TYPE = "v2.money_management.payout_intent.pending" + type: Literal["v2.money_management.payout_intent.pending"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementPayoutIntentPendingEvent": + return cast( + "V2MoneyManagementPayoutIntentPendingEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PayoutIntent": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementPayoutIntentPendingEvent": + return cast( + "V2MoneyManagementPayoutIntentPendingEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PayoutIntent": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementPayoutIntentPendingEvent(Event): + LOOKUP_TYPE = "v2.money_management.payout_intent.pending" + type: Literal["v2.money_management.payout_intent.pending"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "PayoutIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PayoutIntent", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_payout_intent_posted_event.py b/stripe/events/_v2_money_management_payout_intent_posted_event.py new file mode 100644 index 000000000..e9958581f --- /dev/null +++ b/stripe/events/_v2_money_management_payout_intent_posted_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._payout_intent import PayoutIntent + + +class V2MoneyManagementPayoutIntentPostedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.money_management.payout_intent.posted" + type: Literal["v2.money_management.payout_intent.posted"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementPayoutIntentPostedEvent": + return cast( + "V2MoneyManagementPayoutIntentPostedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PayoutIntent": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementPayoutIntentPostedEvent": + return cast( + "V2MoneyManagementPayoutIntentPostedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PayoutIntent": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementPayoutIntentPostedEvent(Event): + LOOKUP_TYPE = "v2.money_management.payout_intent.posted" + type: Literal["v2.money_management.payout_intent.posted"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "PayoutIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PayoutIntent", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_payout_intent_processing_event.py b/stripe/events/_v2_money_management_payout_intent_processing_event.py new file mode 100644 index 000000000..41234d8a9 --- /dev/null +++ b/stripe/events/_v2_money_management_payout_intent_processing_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._payout_intent import PayoutIntent + + +class V2MoneyManagementPayoutIntentProcessingEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.payout_intent.processing" + type: Literal["v2.money_management.payout_intent.processing"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementPayoutIntentProcessingEvent": + return cast( + "V2MoneyManagementPayoutIntentProcessingEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PayoutIntent": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementPayoutIntentProcessingEvent": + return cast( + "V2MoneyManagementPayoutIntentProcessingEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PayoutIntent": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementPayoutIntentProcessingEvent(Event): + LOOKUP_TYPE = "v2.money_management.payout_intent.processing" + type: Literal["v2.money_management.payout_intent.processing"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "PayoutIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PayoutIntent", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_payout_intent_requires_action_event.py b/stripe/events/_v2_money_management_payout_intent_requires_action_event.py new file mode 100644 index 000000000..455d6ea8e --- /dev/null +++ b/stripe/events/_v2_money_management_payout_intent_requires_action_event.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._payout_intent import PayoutIntent + + +class V2MoneyManagementPayoutIntentRequiresActionEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.payout_intent.requires_action" + type: Literal["v2.money_management.payout_intent.requires_action"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2MoneyManagementPayoutIntentRequiresActionEvent": + return cast( + "V2MoneyManagementPayoutIntentRequiresActionEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PayoutIntent": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementPayoutIntentRequiresActionEvent": + return cast( + "V2MoneyManagementPayoutIntentRequiresActionEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PayoutIntent": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementPayoutIntentRequiresActionEvent(Event): + LOOKUP_TYPE = "v2.money_management.payout_intent.requires_action" + type: Literal["v2.money_management.payout_intent.requires_action"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "PayoutIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PayoutIntent", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_payout_intent_updated_event.py b/stripe/events/_v2_money_management_payout_intent_updated_event.py new file mode 100644 index 000000000..3cbc5f2dc --- /dev/null +++ b/stripe/events/_v2_money_management_payout_intent_updated_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._payout_intent import PayoutIntent + + +class V2MoneyManagementPayoutIntentUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.money_management.payout_intent.updated" + type: Literal["v2.money_management.payout_intent.updated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementPayoutIntentUpdatedEvent": + return cast( + "V2MoneyManagementPayoutIntentUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PayoutIntent": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementPayoutIntentUpdatedEvent": + return cast( + "V2MoneyManagementPayoutIntentUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PayoutIntent": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutIntent", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementPayoutIntentUpdatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.payout_intent.updated" + type: Literal["v2.money_management.payout_intent.updated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "PayoutIntent": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PayoutIntent", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_payout_method_created_event.py b/stripe/events/_v2_money_management_payout_method_created_event.py new file mode 100644 index 000000000..2a1656091 --- /dev/null +++ b/stripe/events/_v2_money_management_payout_method_created_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._payout_method import PayoutMethod + + +class V2MoneyManagementPayoutMethodCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.money_management.payout_method.created" + type: Literal["v2.money_management.payout_method.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementPayoutMethodCreatedEvent": + return cast( + "V2MoneyManagementPayoutMethodCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PayoutMethod": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementPayoutMethodCreatedEvent": + return cast( + "V2MoneyManagementPayoutMethodCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PayoutMethod": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementPayoutMethodCreatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.payout_method.created" + type: Literal["v2.money_management.payout_method.created"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "PayoutMethod": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PayoutMethod", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_payout_method_updated_event.py b/stripe/events/_v2_money_management_payout_method_updated_event.py new file mode 100644 index 000000000..205893398 --- /dev/null +++ b/stripe/events/_v2_money_management_payout_method_updated_event.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._payout_method import PayoutMethod + + +class V2MoneyManagementPayoutMethodUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.money_management.payout_method.updated" + type: Literal["v2.money_management.payout_method.updated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementPayoutMethodUpdatedEvent": + return cast( + "V2MoneyManagementPayoutMethodUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "PayoutMethod": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementPayoutMethodUpdatedEvent": + return cast( + "V2MoneyManagementPayoutMethodUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "PayoutMethod": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "PayoutMethod", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementPayoutMethodUpdatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.payout_method.updated" + type: Literal["v2.money_management.payout_method.updated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "PayoutMethod": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "PayoutMethod", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_received_credit_available_event.py b/stripe/events/_v2_money_management_received_credit_available_event.py new file mode 100644 index 000000000..fd8dfd13b --- /dev/null +++ b/stripe/events/_v2_money_management_received_credit_available_event.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._received_credit import ReceivedCredit + + +class V2MoneyManagementReceivedCreditAvailableEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.received_credit.available" + type: Literal["v2.money_management.received_credit.available"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementReceivedCreditAvailableEvent": + return cast( + "V2MoneyManagementReceivedCreditAvailableEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReceivedCredit": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ReceivedCredit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementReceivedCreditAvailableEvent": + return cast( + "V2MoneyManagementReceivedCreditAvailableEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReceivedCredit": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ReceivedCredit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementReceivedCreditAvailableEvent(Event): + LOOKUP_TYPE = "v2.money_management.received_credit.available" + type: Literal["v2.money_management.received_credit.available"] + + class V2MoneyManagementReceivedCreditAvailableEventData(StripeObject): + transaction_id: str + """ + The transaction ID of the received credit. + """ + + data: V2MoneyManagementReceivedCreditAvailableEventData + """ + Data for the v2.money_management.received_credit.available event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2MoneyManagementReceivedCreditAvailableEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2MoneyManagementReceivedCreditAvailableEvent.V2MoneyManagementReceivedCreditAvailableEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ReceivedCredit": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReceivedCredit", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_received_credit_failed_event.py b/stripe/events/_v2_money_management_received_credit_failed_event.py new file mode 100644 index 000000000..ed993ebed --- /dev/null +++ b/stripe/events/_v2_money_management_received_credit_failed_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._received_credit import ReceivedCredit + + +class V2MoneyManagementReceivedCreditFailedEventNotification( + EventNotification +): + LOOKUP_TYPE = "v2.money_management.received_credit.failed" + type: Literal["v2.money_management.received_credit.failed"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementReceivedCreditFailedEvent": + return cast( + "V2MoneyManagementReceivedCreditFailedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReceivedCredit": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ReceivedCredit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementReceivedCreditFailedEvent": + return cast( + "V2MoneyManagementReceivedCreditFailedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReceivedCredit": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ReceivedCredit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementReceivedCreditFailedEvent(Event): + LOOKUP_TYPE = "v2.money_management.received_credit.failed" + type: Literal["v2.money_management.received_credit.failed"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ReceivedCredit": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReceivedCredit", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_received_credit_returned_event.py b/stripe/events/_v2_money_management_received_credit_returned_event.py new file mode 100644 index 000000000..2e301c931 --- /dev/null +++ b/stripe/events/_v2_money_management_received_credit_returned_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._received_credit import ReceivedCredit + + +class V2MoneyManagementReceivedCreditReturnedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.received_credit.returned" + type: Literal["v2.money_management.received_credit.returned"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementReceivedCreditReturnedEvent": + return cast( + "V2MoneyManagementReceivedCreditReturnedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReceivedCredit": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ReceivedCredit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementReceivedCreditReturnedEvent": + return cast( + "V2MoneyManagementReceivedCreditReturnedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReceivedCredit": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ReceivedCredit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementReceivedCreditReturnedEvent(Event): + LOOKUP_TYPE = "v2.money_management.received_credit.returned" + type: Literal["v2.money_management.received_credit.returned"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ReceivedCredit": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReceivedCredit", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_received_credit_succeeded_event.py b/stripe/events/_v2_money_management_received_credit_succeeded_event.py new file mode 100644 index 000000000..238605ccf --- /dev/null +++ b/stripe/events/_v2_money_management_received_credit_succeeded_event.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._received_credit import ReceivedCredit + + +class V2MoneyManagementReceivedCreditSucceededEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.received_credit.succeeded" + type: Literal["v2.money_management.received_credit.succeeded"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementReceivedCreditSucceededEvent": + return cast( + "V2MoneyManagementReceivedCreditSucceededEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "ReceivedCredit": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ReceivedCredit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementReceivedCreditSucceededEvent": + return cast( + "V2MoneyManagementReceivedCreditSucceededEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "ReceivedCredit": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "ReceivedCredit", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementReceivedCreditSucceededEvent(Event): + LOOKUP_TYPE = "v2.money_management.received_credit.succeeded" + type: Literal["v2.money_management.received_credit.succeeded"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "ReceivedCredit": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "ReceivedCredit", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_recipient_verification_created_event.py b/stripe/events/_v2_money_management_recipient_verification_created_event.py new file mode 100644 index 000000000..b2c7bb37f --- /dev/null +++ b/stripe/events/_v2_money_management_recipient_verification_created_event.py @@ -0,0 +1,121 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._recipient_verification import ( + RecipientVerification, + ) + + +class V2MoneyManagementRecipientVerificationCreatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.recipient_verification.created" + type: Literal["v2.money_management.recipient_verification.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2MoneyManagementRecipientVerificationCreatedEvent": + return cast( + "V2MoneyManagementRecipientVerificationCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "RecipientVerification": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "RecipientVerification", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementRecipientVerificationCreatedEvent": + return cast( + "V2MoneyManagementRecipientVerificationCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "RecipientVerification": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "RecipientVerification", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementRecipientVerificationCreatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.recipient_verification.created" + type: Literal["v2.money_management.recipient_verification.created"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "RecipientVerification": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "RecipientVerification", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_recipient_verification_updated_event.py b/stripe/events/_v2_money_management_recipient_verification_updated_event.py new file mode 100644 index 000000000..dc992a997 --- /dev/null +++ b/stripe/events/_v2_money_management_recipient_verification_updated_event.py @@ -0,0 +1,121 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._recipient_verification import ( + RecipientVerification, + ) + + +class V2MoneyManagementRecipientVerificationUpdatedEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.recipient_verification.updated" + type: Literal["v2.money_management.recipient_verification.updated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event( + self, + ) -> "V2MoneyManagementRecipientVerificationUpdatedEvent": + return cast( + "V2MoneyManagementRecipientVerificationUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "RecipientVerification": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "RecipientVerification", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementRecipientVerificationUpdatedEvent": + return cast( + "V2MoneyManagementRecipientVerificationUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "RecipientVerification": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "RecipientVerification", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementRecipientVerificationUpdatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.recipient_verification.updated" + type: Literal["v2.money_management.recipient_verification.updated"] + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "RecipientVerification": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "RecipientVerification", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_transaction_created_event.py b/stripe/events/_v2_money_management_transaction_created_event.py new file mode 100644 index 000000000..dac212315 --- /dev/null +++ b/stripe/events/_v2_money_management_transaction_created_event.py @@ -0,0 +1,157 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._transaction import Transaction + + +class V2MoneyManagementTransactionCreatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.money_management.transaction.created" + type: Literal["v2.money_management.transaction.created"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementTransactionCreatedEvent": + return cast( + "V2MoneyManagementTransactionCreatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Transaction": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Transaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementTransactionCreatedEvent": + return cast( + "V2MoneyManagementTransactionCreatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Transaction": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Transaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementTransactionCreatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.transaction.created" + type: Literal["v2.money_management.transaction.created"] + + class V2MoneyManagementTransactionCreatedEventData(StripeObject): + treasury_transaction: Optional[str] + """ + Id of the v1 Treasury Transaction corresponding to this Transaction. + """ + v1_id: Optional[str] + """ + Id of the v1 Transaction corresponding to this Transaction. + """ + + data: V2MoneyManagementTransactionCreatedEventData + """ + Data for the v2.money_management.transaction.created event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2MoneyManagementTransactionCreatedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2MoneyManagementTransactionCreatedEvent.V2MoneyManagementTransactionCreatedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Transaction": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Transaction", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/events/_v2_money_management_transaction_updated_event.py b/stripe/events/_v2_money_management_transaction_updated_event.py new file mode 100644 index 000000000..c6ec091ed --- /dev/null +++ b/stripe/events/_v2_money_management_transaction_updated_event.py @@ -0,0 +1,153 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_mode import ApiMode +from stripe._stripe_object import StripeObject +from stripe._stripe_response import StripeResponse +from stripe._util import get_api_mode +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from typing import Any, Dict, Optional, cast +from typing_extensions import Literal, TYPE_CHECKING, override + +if TYPE_CHECKING: + from stripe._api_requestor import _APIRequestor + from stripe._stripe_client import StripeClient + from stripe.v2.money_management._transaction import Transaction + + +class V2MoneyManagementTransactionUpdatedEventNotification(EventNotification): + LOOKUP_TYPE = "v2.money_management.transaction.updated" + type: Literal["v2.money_management.transaction.updated"] + related_object: RelatedObject + + def __init__( + self, parsed_body: Dict[str, Any], client: "StripeClient" + ) -> None: + super().__init__( + parsed_body, + client, + ) + self.related_object = RelatedObject(parsed_body["related_object"]) + + @override + def fetch_event(self) -> "V2MoneyManagementTransactionUpdatedEvent": + return cast( + "V2MoneyManagementTransactionUpdatedEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "Transaction": + response = self._client.raw_request( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Transaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementTransactionUpdatedEvent": + return cast( + "V2MoneyManagementTransactionUpdatedEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "Transaction": + response = await self._client.raw_request_async( + "get", + self.related_object.url, + stripe_context=self.context, + headers={"Stripe-Request-Trigger": f"event={self.id}"}, + usage=["fetch_related_object"], + ) + return cast( + "Transaction", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementTransactionUpdatedEvent(Event): + LOOKUP_TYPE = "v2.money_management.transaction.updated" + type: Literal["v2.money_management.transaction.updated"] + + class V2MoneyManagementTransactionUpdatedEventData(StripeObject): + treasury_transaction: Optional[str] + """ + Id of the v1 Treasury Transaction corresponding to this Transaction. + """ + + data: V2MoneyManagementTransactionUpdatedEventData + """ + Data for the v2.money_management.transaction.updated event + """ + + @classmethod + def _construct_from( + cls, + *, + values: Dict[str, Any], + last_response: Optional[StripeResponse] = None, + requestor: "_APIRequestor", + api_mode: ApiMode, + ) -> "V2MoneyManagementTransactionUpdatedEvent": + evt = super()._construct_from( + values=values, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + if hasattr(evt, "data"): + evt.data = V2MoneyManagementTransactionUpdatedEvent.V2MoneyManagementTransactionUpdatedEventData._construct_from( + values=evt.data, + last_response=last_response, + requestor=requestor, + api_mode=api_mode, + ) + return evt + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object relevant to the event. + """ + type: str + """ + Type of the object relevant to the event. + """ + url: str + """ + URL to retrieve the resource. + """ + + related_object: RelatedObject + """ + Object containing the reference to API resource relevant to the event + """ + + def fetch_related_object(self) -> "Transaction": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "Transaction", + self._requestor.request( + "get", + self.related_object.url, + base_address="api", + options={ + "stripe_context": self.context, + "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, + }, + ), + ) diff --git a/stripe/financial_connections/_account.py b/stripe/financial_connections/_account.py index 923af6635..c835305f3 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -244,7 +244,7 @@ class TransactionRefresh(StripeObject): """ ownership: Optional[ExpandableField["AccountOwnership"]] """ - The most recent information about the account's owners. + The ID of the [Financial Connections Account Ownership](https://docs.stripe.com/api/financial_connections/ownership) object associated with this account. """ ownership_refresh: Optional[OwnershipRefresh] """ diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index bb51e994e..a44860927 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -183,6 +183,10 @@ class Customs(StripeObject): """ Additional information that may be required for clearing customs. """ + delivered_at: Optional[int] + """ + The time the card was reported as delivered. Null for undelivered or untracked shipments, or if Stripe has not recorded a delivery time. + """ eta: Optional[int] """ A unix timestamp representing a best estimate of when the card will be delivered. @@ -203,6 +207,10 @@ class Customs(StripeObject): """ Shipment service, such as `standard` or `express`. """ + shipped_at: Optional[int] + """ + The time the card was reported as shipped. Null if Stripe has not recorded a shipment time. + """ status: Optional[ Union[ Literal[ diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 73608233b..68704a43d 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -119,6 +119,7 @@ AccountCreateParamsCapabilitiesUpiPayments as AccountCreateParamsCapabilitiesUpiPayments, AccountCreateParamsCapabilitiesUsBankAccountAchPayments as AccountCreateParamsCapabilitiesUsBankAccountAchPayments, AccountCreateParamsCapabilitiesUsBankTransferPayments as AccountCreateParamsCapabilitiesUsBankTransferPayments, + AccountCreateParamsCapabilitiesWeroPayments as AccountCreateParamsCapabilitiesWeroPayments, AccountCreateParamsCapabilitiesZipPayments as AccountCreateParamsCapabilitiesZipPayments, AccountCreateParamsCard as AccountCreateParamsCard, AccountCreateParamsCardToken as AccountCreateParamsCardToken, @@ -129,6 +130,7 @@ AccountCreateParamsCompanyAdministrativeAddress as AccountCreateParamsCompanyAdministrativeAddress, AccountCreateParamsCompanyDirectorshipDeclaration as AccountCreateParamsCompanyDirectorshipDeclaration, AccountCreateParamsCompanyOwnershipDeclaration as AccountCreateParamsCompanyOwnershipDeclaration, + AccountCreateParamsCompanyPhysicalAddress as AccountCreateParamsCompanyPhysicalAddress, AccountCreateParamsCompanyPrincipalPlaceOfBusiness as AccountCreateParamsCompanyPrincipalPlaceOfBusiness, AccountCreateParamsCompanyRegistrationDate as AccountCreateParamsCompanyRegistrationDate, AccountCreateParamsCompanyRepresentativeDeclaration as AccountCreateParamsCompanyRepresentativeDeclaration, @@ -146,6 +148,7 @@ AccountCreateParamsDocumentsCompanyRegistrationVerification as AccountCreateParamsDocumentsCompanyRegistrationVerification, AccountCreateParamsDocumentsCompanyTaxIdVerification as AccountCreateParamsDocumentsCompanyTaxIdVerification, AccountCreateParamsDocumentsProofOfAddress as AccountCreateParamsDocumentsProofOfAddress, + AccountCreateParamsDocumentsProofOfBusinessPresence as AccountCreateParamsDocumentsProofOfBusinessPresence, AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership as AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership, AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnershipSigner as AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnershipSigner, AccountCreateParamsGroups as AccountCreateParamsGroups, @@ -397,10 +400,16 @@ AccountSessionCreateParamsComponentsPayoutsFeatures as AccountSessionCreateParamsComponentsPayoutsFeatures, AccountSessionCreateParamsComponentsPayoutsList as AccountSessionCreateParamsComponentsPayoutsList, AccountSessionCreateParamsComponentsPayoutsListFeatures as AccountSessionCreateParamsComponentsPayoutsListFeatures, + AccountSessionCreateParamsComponentsReportingChart as AccountSessionCreateParamsComponentsReportingChart, + AccountSessionCreateParamsComponentsReportingChartFeatures as AccountSessionCreateParamsComponentsReportingChartFeatures, AccountSessionCreateParamsComponentsTaxRegistrations as AccountSessionCreateParamsComponentsTaxRegistrations, AccountSessionCreateParamsComponentsTaxRegistrationsFeatures as AccountSessionCreateParamsComponentsTaxRegistrationsFeatures, AccountSessionCreateParamsComponentsTaxSettings as AccountSessionCreateParamsComponentsTaxSettings, AccountSessionCreateParamsComponentsTaxSettingsFeatures as AccountSessionCreateParamsComponentsTaxSettingsFeatures, + AccountSessionCreateParamsComponentsTerminalHardwareOrders as AccountSessionCreateParamsComponentsTerminalHardwareOrders, + AccountSessionCreateParamsComponentsTerminalHardwareOrdersFeatures as AccountSessionCreateParamsComponentsTerminalHardwareOrdersFeatures, + AccountSessionCreateParamsComponentsTerminalHardwareShop as AccountSessionCreateParamsComponentsTerminalHardwareShop, + AccountSessionCreateParamsComponentsTerminalHardwareShopFeatures as AccountSessionCreateParamsComponentsTerminalHardwareShopFeatures, ) from stripe.params._account_unreject_params import ( AccountUnrejectParams as AccountUnrejectParams, @@ -481,6 +490,7 @@ AccountUpdateParamsCapabilitiesUpiPayments as AccountUpdateParamsCapabilitiesUpiPayments, AccountUpdateParamsCapabilitiesUsBankAccountAchPayments as AccountUpdateParamsCapabilitiesUsBankAccountAchPayments, AccountUpdateParamsCapabilitiesUsBankTransferPayments as AccountUpdateParamsCapabilitiesUsBankTransferPayments, + AccountUpdateParamsCapabilitiesWeroPayments as AccountUpdateParamsCapabilitiesWeroPayments, AccountUpdateParamsCapabilitiesZipPayments as AccountUpdateParamsCapabilitiesZipPayments, AccountUpdateParamsCard as AccountUpdateParamsCard, AccountUpdateParamsCardToken as AccountUpdateParamsCardToken, @@ -491,6 +501,7 @@ AccountUpdateParamsCompanyAdministrativeAddress as AccountUpdateParamsCompanyAdministrativeAddress, AccountUpdateParamsCompanyDirectorshipDeclaration as AccountUpdateParamsCompanyDirectorshipDeclaration, AccountUpdateParamsCompanyOwnershipDeclaration as AccountUpdateParamsCompanyOwnershipDeclaration, + AccountUpdateParamsCompanyPhysicalAddress as AccountUpdateParamsCompanyPhysicalAddress, AccountUpdateParamsCompanyPrincipalPlaceOfBusiness as AccountUpdateParamsCompanyPrincipalPlaceOfBusiness, AccountUpdateParamsCompanyRegistrationDate as AccountUpdateParamsCompanyRegistrationDate, AccountUpdateParamsCompanyRepresentativeDeclaration as AccountUpdateParamsCompanyRepresentativeDeclaration, @@ -504,6 +515,7 @@ AccountUpdateParamsDocumentsCompanyRegistrationVerification as AccountUpdateParamsDocumentsCompanyRegistrationVerification, AccountUpdateParamsDocumentsCompanyTaxIdVerification as AccountUpdateParamsDocumentsCompanyTaxIdVerification, AccountUpdateParamsDocumentsProofOfAddress as AccountUpdateParamsDocumentsProofOfAddress, + AccountUpdateParamsDocumentsProofOfBusinessPresence as AccountUpdateParamsDocumentsProofOfBusinessPresence, AccountUpdateParamsDocumentsProofOfRegistration as AccountUpdateParamsDocumentsProofOfRegistration, AccountUpdateParamsDocumentsProofOfRegistrationSigner as AccountUpdateParamsDocumentsProofOfRegistrationSigner, AccountUpdateParamsDocumentsProofOfUltimateBeneficialOwnership as AccountUpdateParamsDocumentsProofOfUltimateBeneficialOwnership, @@ -1035,6 +1047,8 @@ from stripe.params._dispute_modify_params import ( DisputeModifyParams as DisputeModifyParams, DisputeModifyParamsEvidence as DisputeModifyParamsEvidence, + DisputeModifyParamsEvidenceAppeal as DisputeModifyParamsEvidenceAppeal, + DisputeModifyParamsEvidenceAppealCard as DisputeModifyParamsEvidenceAppealCard, DisputeModifyParamsEvidenceEnhancedEvidence as DisputeModifyParamsEvidenceEnhancedEvidence, DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance as DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance, DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3 as DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3, @@ -1050,6 +1064,8 @@ from stripe.params._dispute_update_params import ( DisputeUpdateParams as DisputeUpdateParams, DisputeUpdateParamsEvidence as DisputeUpdateParamsEvidence, + DisputeUpdateParamsEvidenceAppeal as DisputeUpdateParamsEvidenceAppeal, + DisputeUpdateParamsEvidenceAppealCard as DisputeUpdateParamsEvidenceAppealCard, DisputeUpdateParamsEvidenceEnhancedEvidence as DisputeUpdateParamsEvidenceEnhancedEvidence, DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance as DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance, DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3 as DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3, @@ -1185,6 +1201,17 @@ InvoiceCreatePreviewParamsScheduleDetails as InvoiceCreatePreviewParamsScheduleDetails, InvoiceCreatePreviewParamsScheduleDetailsBillingMode as InvoiceCreatePreviewParamsScheduleDetailsBillingMode, InvoiceCreatePreviewParamsScheduleDetailsBillingModeFlexible as InvoiceCreatePreviewParamsScheduleDetailsBillingModeFlexible, + InvoiceCreatePreviewParamsScheduleDetailsPauseSchedule as InvoiceCreatePreviewParamsScheduleDetailsPauseSchedule, + InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePause as InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePause, + InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePausePauseAt as InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePausePauseAt, + InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettings as InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettings, + InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillFor as InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillFor, + InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillForOutstandingUsageThrough as InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillForOutstandingUsageThrough, + InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillForUnusedTimeFrom as InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillForUnusedTimeFrom, + InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResume as InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResume, + InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeResumeAt as InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeResumeAt, + InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeResumeAtDuration as InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeResumeAtDuration, + InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeSettings as InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeSettings, InvoiceCreatePreviewParamsScheduleDetailsPhase as InvoiceCreatePreviewParamsScheduleDetailsPhase, InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem as InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem, InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscount as InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscount, @@ -2222,6 +2249,7 @@ PaymentLinkCreateParamsShippingOption as PaymentLinkCreateParamsShippingOption, PaymentLinkCreateParamsSubscriptionData as PaymentLinkCreateParamsSubscriptionData, PaymentLinkCreateParamsSubscriptionDataInvoiceSettings as PaymentLinkCreateParamsSubscriptionDataInvoiceSettings, + PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsCustomField as PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsCustomField, PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsIssuer as PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsIssuer, PaymentLinkCreateParamsSubscriptionDataTrialSettings as PaymentLinkCreateParamsSubscriptionDataTrialSettings, PaymentLinkCreateParamsSubscriptionDataTrialSettingsEndBehavior as PaymentLinkCreateParamsSubscriptionDataTrialSettingsEndBehavior, @@ -2280,6 +2308,7 @@ PaymentLinkModifyParamsShippingOption as PaymentLinkModifyParamsShippingOption, PaymentLinkModifyParamsSubscriptionData as PaymentLinkModifyParamsSubscriptionData, PaymentLinkModifyParamsSubscriptionDataInvoiceSettings as PaymentLinkModifyParamsSubscriptionDataInvoiceSettings, + PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsCustomField as PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsCustomField, PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsIssuer as PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsIssuer, PaymentLinkModifyParamsSubscriptionDataTrialSettings as PaymentLinkModifyParamsSubscriptionDataTrialSettings, PaymentLinkModifyParamsSubscriptionDataTrialSettingsEndBehavior as PaymentLinkModifyParamsSubscriptionDataTrialSettingsEndBehavior, @@ -2332,6 +2361,7 @@ PaymentLinkUpdateParamsShippingOption as PaymentLinkUpdateParamsShippingOption, PaymentLinkUpdateParamsSubscriptionData as PaymentLinkUpdateParamsSubscriptionData, PaymentLinkUpdateParamsSubscriptionDataInvoiceSettings as PaymentLinkUpdateParamsSubscriptionDataInvoiceSettings, + PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsCustomField as PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsCustomField, PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsIssuer as PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsIssuer, PaymentLinkUpdateParamsSubscriptionDataTrialSettings as PaymentLinkUpdateParamsSubscriptionDataTrialSettings, PaymentLinkUpdateParamsSubscriptionDataTrialSettingsEndBehavior as PaymentLinkUpdateParamsSubscriptionDataTrialSettingsEndBehavior, @@ -4111,6 +4141,7 @@ TokenCreateParamsAccountCompanyAdministrativeAddress as TokenCreateParamsAccountCompanyAdministrativeAddress, TokenCreateParamsAccountCompanyDirectorshipDeclaration as TokenCreateParamsAccountCompanyDirectorshipDeclaration, TokenCreateParamsAccountCompanyOwnershipDeclaration as TokenCreateParamsAccountCompanyOwnershipDeclaration, + TokenCreateParamsAccountCompanyPhysicalAddress as TokenCreateParamsAccountCompanyPhysicalAddress, TokenCreateParamsAccountCompanyPrincipalPlaceOfBusiness as TokenCreateParamsAccountCompanyPrincipalPlaceOfBusiness, TokenCreateParamsAccountCompanyRegistrationDate as TokenCreateParamsAccountCompanyRegistrationDate, TokenCreateParamsAccountCompanyRepresentativeDeclaration as TokenCreateParamsAccountCompanyRepresentativeDeclaration, @@ -4585,6 +4616,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCapabilitiesWeroPayments": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCapabilitiesZipPayments": ( "stripe.params._account_create_params", False, @@ -4622,6 +4657,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsCompanyPhysicalAddress": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsCompanyPrincipalPlaceOfBusiness": ( "stripe.params._account_create_params", False, @@ -4690,6 +4729,10 @@ "stripe.params._account_create_params", False, ), + "AccountCreateParamsDocumentsProofOfBusinessPresence": ( + "stripe.params._account_create_params", + False, + ), "AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership": ( "stripe.params._account_create_params", False, @@ -5428,6 +5471,14 @@ "stripe.params._account_session_create_params", False, ), + "AccountSessionCreateParamsComponentsReportingChart": ( + "stripe.params._account_session_create_params", + False, + ), + "AccountSessionCreateParamsComponentsReportingChartFeatures": ( + "stripe.params._account_session_create_params", + False, + ), "AccountSessionCreateParamsComponentsTaxRegistrations": ( "stripe.params._account_session_create_params", False, @@ -5444,6 +5495,22 @@ "stripe.params._account_session_create_params", False, ), + "AccountSessionCreateParamsComponentsTerminalHardwareOrders": ( + "stripe.params._account_session_create_params", + False, + ), + "AccountSessionCreateParamsComponentsTerminalHardwareOrdersFeatures": ( + "stripe.params._account_session_create_params", + False, + ), + "AccountSessionCreateParamsComponentsTerminalHardwareShop": ( + "stripe.params._account_session_create_params", + False, + ), + "AccountSessionCreateParamsComponentsTerminalHardwareShopFeatures": ( + "stripe.params._account_session_create_params", + False, + ), "AccountUnrejectParams": ("stripe.params._account_unreject_params", False), "AccountUpdateParams": ("stripe.params._account_update_params", False), "AccountUpdateParamsBankAccount": ( @@ -5742,6 +5809,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCapabilitiesWeroPayments": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCapabilitiesZipPayments": ( "stripe.params._account_update_params", False, @@ -5779,6 +5850,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsCompanyPhysicalAddress": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsCompanyPrincipalPlaceOfBusiness": ( "stripe.params._account_update_params", False, @@ -5831,6 +5906,10 @@ "stripe.params._account_update_params", False, ), + "AccountUpdateParamsDocumentsProofOfBusinessPresence": ( + "stripe.params._account_update_params", + False, + ), "AccountUpdateParamsDocumentsProofOfRegistration": ( "stripe.params._account_update_params", False, @@ -7015,6 +7094,14 @@ "stripe.params._dispute_modify_params", False, ), + "DisputeModifyParamsEvidenceAppeal": ( + "stripe.params._dispute_modify_params", + False, + ), + "DisputeModifyParamsEvidenceAppealCard": ( + "stripe.params._dispute_modify_params", + False, + ), "DisputeModifyParamsEvidenceEnhancedEvidence": ( "stripe.params._dispute_modify_params", False, @@ -7053,6 +7140,14 @@ "stripe.params._dispute_update_params", False, ), + "DisputeUpdateParamsEvidenceAppeal": ( + "stripe.params._dispute_update_params", + False, + ), + "DisputeUpdateParamsEvidenceAppealCard": ( + "stripe.params._dispute_update_params", + False, + ), "DisputeUpdateParamsEvidenceEnhancedEvidence": ( "stripe.params._dispute_update_params", False, @@ -7413,6 +7508,50 @@ "stripe.params._invoice_create_preview_params", False, ), + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedule": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePause": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePausePauseAt": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettings": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillFor": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillForOutstandingUsageThrough": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillForUnusedTimeFrom": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResume": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeResumeAt": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeResumeAtDuration": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeSettings": ( + "stripe.params._invoice_create_preview_params", + False, + ), "InvoiceCreatePreviewParamsScheduleDetailsPhase": ( "stripe.params._invoice_create_preview_params", False, @@ -11163,6 +11302,10 @@ "stripe.params._payment_link_create_params", False, ), + "PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsCustomField": ( + "stripe.params._payment_link_create_params", + False, + ), "PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsIssuer": ( "stripe.params._payment_link_create_params", False, @@ -11363,6 +11506,10 @@ "stripe.params._payment_link_modify_params", False, ), + "PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsCustomField": ( + "stripe.params._payment_link_modify_params", + False, + ), "PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsIssuer": ( "stripe.params._payment_link_modify_params", False, @@ -11555,6 +11702,10 @@ "stripe.params._payment_link_update_params", False, ), + "PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsCustomField": ( + "stripe.params._payment_link_update_params", + False, + ), "PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsIssuer": ( "stripe.params._payment_link_update_params", False, @@ -17246,6 +17397,10 @@ "stripe.params._token_create_params", False, ), + "TokenCreateParamsAccountCompanyPhysicalAddress": ( + "stripe.params._token_create_params", + False, + ), "TokenCreateParamsAccountCompanyPrincipalPlaceOfBusiness": ( "stripe.params._token_create_params", False, diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index 67a86174a..ad7986b5a 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -38,7 +38,7 @@ class AccountCreateParams(RequestOptions): """ controller: NotRequired["AccountCreateParamsController"] """ - A hash of configuration describing the account controller's attributes. + Configures the account's Dashboard access, loss liability, requirements collection, and Stripe fee responsibility. """ country: NotRequired[str] """ @@ -592,6 +592,10 @@ class AccountCreateParamsCapabilities(TypedDict): """ The us_bank_transfer_payments capability. """ + wero_payments: NotRequired["AccountCreateParamsCapabilitiesWeroPayments"] + """ + The wero_payments capability. + """ zip_payments: NotRequired["AccountCreateParamsCapabilitiesZipPayments"] """ The zip_payments capability. @@ -1074,6 +1078,13 @@ class AccountCreateParamsCapabilitiesUsBankTransferPayments(TypedDict): """ +class AccountCreateParamsCapabilitiesWeroPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + class AccountCreateParamsCapabilitiesZipPayments(TypedDict): requested: NotRequired[bool] """ @@ -1154,6 +1165,10 @@ class AccountCreateParamsCompany(TypedDict): """ The company's phone number (used for verification). """ + physical_address: NotRequired["AccountCreateParamsCompanyPhysicalAddress"] + """ + A location where the business has a meaningful physical operating presence. + """ principal_place_of_business: NotRequired[ "AccountCreateParamsCompanyPrincipalPlaceOfBusiness" ] @@ -1348,6 +1363,33 @@ class AccountCreateParamsCompanyOwnershipDeclaration(TypedDict): """ +class AccountCreateParamsCompanyPhysicalAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + class AccountCreateParamsCompanyPrincipalPlaceOfBusiness(TypedDict): city: NotRequired[str] """ @@ -1447,14 +1489,14 @@ class AccountCreateParamsController(TypedDict): class AccountCreateParamsControllerFees(TypedDict): payer: NotRequired["Literal['account', 'application']|str"] """ - A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + Controls who pays Stripe fees for direct charges and other pricing-control-eligible Stripe products. Setting `controller.losses.payments=application` requires `controller.fees.payer=application`. For destination charges and separate charges and transfers, Stripe bills the platform regardless of this setting. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior), including application fees and pricing considerations. """ class AccountCreateParamsControllerLosses(TypedDict): payments: NotRequired["Literal['application', 'stripe']|str"] """ - A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. + Controls who is responsible for payment-related negative balances on this account. The platform remains liable for negative balances on its own account. To use Stripe negative balance liability, your integration must meet [Managed Risk requirements](https://docs.stripe.com/connect/risk-management/managed-risk). Defaults to `stripe`. """ @@ -1504,6 +1546,12 @@ class AccountCreateParamsDocuments(TypedDict): """ One or more documents that demonstrate proof of address. """ + proof_of_business_presence: NotRequired[ + "AccountCreateParamsDocumentsProofOfBusinessPresence" + ] + """ + One or more documents that demonstrate proof of business presence. + """ proof_of_ultimate_beneficial_ownership: NotRequired[ "AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership" ] @@ -1561,6 +1609,13 @@ class AccountCreateParamsDocumentsProofOfAddress(TypedDict): """ +class AccountCreateParamsDocumentsProofOfBusinessPresence(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. + """ + + class AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership( TypedDict ): diff --git a/stripe/params/_account_session_create_params.py b/stripe/params/_account_session_create_params.py index 662b94021..11be8ec31 100644 --- a/stripe/params/_account_session_create_params.py +++ b/stripe/params/_account_session_create_params.py @@ -133,6 +133,12 @@ class AccountSessionCreateParamsComponents(TypedDict): """ Configuration for the [payouts list](https://docs.stripe.com/connect/supported-embedded-components/payouts-list/) embedded component. """ + reporting_chart: NotRequired[ + "AccountSessionCreateParamsComponentsReportingChart" + ] + """ + Configuration for the [reporting chart](https://docs.stripe.com/connect/supported-embedded-components/reporting-chart/) embedded component. + """ tax_registrations: NotRequired[ "AccountSessionCreateParamsComponentsTaxRegistrations" ] @@ -145,6 +151,18 @@ class AccountSessionCreateParamsComponents(TypedDict): """ Configuration for the [tax settings](https://docs.stripe.com/connect/supported-embedded-components/tax-settings/) embedded component. """ + terminal_hardware_orders: NotRequired[ + "AccountSessionCreateParamsComponentsTerminalHardwareOrders" + ] + """ + Configuration for the [Terminal hardware orders](https://docs.stripe.com/connect/supported-embedded-components/terminal-hardware-orders/) embedded component. + """ + terminal_hardware_shop: NotRequired[ + "AccountSessionCreateParamsComponentsTerminalHardwareShop" + ] + """ + Configuration for the [Terminal hardware shop](https://docs.stripe.com/connect/supported-embedded-components/terminal-hardware-shop/) embedded component. + """ class AccountSessionCreateParamsComponentsAccountManagement(TypedDict): @@ -698,6 +716,23 @@ class AccountSessionCreateParamsComponentsPayoutsListFeatures(TypedDict): pass +class AccountSessionCreateParamsComponentsReportingChart(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsReportingChartFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsReportingChartFeatures(TypedDict): + pass + + class AccountSessionCreateParamsComponentsTaxRegistrations(TypedDict): enabled: bool """ @@ -730,3 +765,41 @@ class AccountSessionCreateParamsComponentsTaxSettings(TypedDict): class AccountSessionCreateParamsComponentsTaxSettingsFeatures(TypedDict): pass + + +class AccountSessionCreateParamsComponentsTerminalHardwareOrders(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsTerminalHardwareOrdersFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsTerminalHardwareOrdersFeatures( + TypedDict, +): + pass + + +class AccountSessionCreateParamsComponentsTerminalHardwareShop(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsTerminalHardwareShopFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsTerminalHardwareShopFeatures( + TypedDict, +): + pass diff --git a/stripe/params/_account_update_params.py b/stripe/params/_account_update_params.py index 705dbb1f7..2bed1a39b 100644 --- a/stripe/params/_account_update_params.py +++ b/stripe/params/_account_update_params.py @@ -579,6 +579,10 @@ class AccountUpdateParamsCapabilities(TypedDict): """ The us_bank_transfer_payments capability. """ + wero_payments: NotRequired["AccountUpdateParamsCapabilitiesWeroPayments"] + """ + The wero_payments capability. + """ zip_payments: NotRequired["AccountUpdateParamsCapabilitiesZipPayments"] """ The zip_payments capability. @@ -1061,6 +1065,13 @@ class AccountUpdateParamsCapabilitiesUsBankTransferPayments(TypedDict): """ +class AccountUpdateParamsCapabilitiesWeroPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + class AccountUpdateParamsCapabilitiesZipPayments(TypedDict): requested: NotRequired[bool] """ @@ -1141,6 +1152,10 @@ class AccountUpdateParamsCompany(TypedDict): """ The company's phone number (used for verification). """ + physical_address: NotRequired["AccountUpdateParamsCompanyPhysicalAddress"] + """ + A location where the business has a meaningful physical operating presence. + """ principal_place_of_business: NotRequired[ "AccountUpdateParamsCompanyPrincipalPlaceOfBusiness" ] @@ -1332,6 +1347,33 @@ class AccountUpdateParamsCompanyOwnershipDeclaration(TypedDict): """ +class AccountUpdateParamsCompanyPhysicalAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + class AccountUpdateParamsCompanyPrincipalPlaceOfBusiness(TypedDict): city: NotRequired[str] """ @@ -1446,6 +1488,12 @@ class AccountUpdateParamsDocuments(TypedDict): """ One or more documents that demonstrate proof of address. """ + proof_of_business_presence: NotRequired[ + "AccountUpdateParamsDocumentsProofOfBusinessPresence" + ] + """ + One or more documents that demonstrate proof of business presence. + """ proof_of_registration: NotRequired[ "AccountUpdateParamsDocumentsProofOfRegistration" ] @@ -1509,6 +1557,13 @@ class AccountUpdateParamsDocumentsProofOfAddress(TypedDict): """ +class AccountUpdateParamsDocumentsProofOfBusinessPresence(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `account_requirement`. + """ + + class AccountUpdateParamsDocumentsProofOfRegistration(TypedDict): files: NotRequired[List[str]] """ diff --git a/stripe/params/_charge_capture_params.py b/stripe/params/_charge_capture_params.py index 340c3e3db..27cea23bb 100644 --- a/stripe/params/_charge_capture_params.py +++ b/stripe/params/_charge_capture_params.py @@ -24,7 +24,7 @@ class ChargeCaptureParams(RequestOptions): """ receipt_email: NotRequired[str] """ - The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. + The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts are only sent for payments in live mode. """ statement_descriptor: NotRequired[str] """ diff --git a/stripe/params/_charge_create_params.py b/stripe/params/_charge_create_params.py index cfa3e339b..913ad68a5 100644 --- a/stripe/params/_charge_create_params.py +++ b/stripe/params/_charge_create_params.py @@ -53,7 +53,7 @@ class ChargeCreateParams(RequestOptions): """ receipt_email: NotRequired[str] """ - The email address to which this charge's [receipt](https://docs.stripe.com/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://docs.stripe.com/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + The email address to which this charge's [receipt](https://docs.stripe.com/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and receipts are only sent for payments in live mode. If this charge is for a [Customer](https://docs.stripe.com/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). """ shipping: NotRequired["ChargeCreateParamsShipping"] """ diff --git a/stripe/params/_customer_create_params.py b/stripe/params/_customer_create_params.py index 47ee9ecd3..0eac02afd 100644 --- a/stripe/params/_customer_create_params.py +++ b/stripe/params/_customer_create_params.py @@ -250,7 +250,9 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -264,6 +266,7 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "br_cnpj", "br_cpf", "bs_tin", + "bw_vat", "by_tin", "ca_bn", "ca_gst_hst", @@ -274,12 +277,14 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "cd_nif", "ch_uid", "ch_vat", + "ci_vat", "cl_tin", "cm_niu", "cn_tin", "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -289,8 +294,12 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", + "gh_tin", "gi_tin", "gn_nif", "hk_br", @@ -300,6 +309,7 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -315,23 +325,28 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -341,12 +356,15 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -364,7 +382,7 @@ class CustomerCreateParamsTaxIdDatum(TypedDict): str, ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_acn`, `au_arn`, `au_wpn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `bw_vat`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `ci_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `cz_dic`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `fr_siren`, `fr_siret`, `fr_spi`, `gb_vat`, `ge_vat`, `gh_tin`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_kt`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_cf`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mu_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `mz_nuit`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_bn`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `pt_nif`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sm_coe`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tt_bir`, `tt_vat`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_customer_create_tax_id_params.py b/stripe/params/_customer_create_tax_id_params.py index 88b09b1d9..1e2f86aa8 100644 --- a/stripe/params/_customer_create_tax_id_params.py +++ b/stripe/params/_customer_create_tax_id_params.py @@ -19,7 +19,9 @@ class CustomerCreateTaxIdParams(RequestOptions): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -33,6 +35,7 @@ class CustomerCreateTaxIdParams(RequestOptions): "br_cnpj", "br_cpf", "bs_tin", + "bw_vat", "by_tin", "ca_bn", "ca_gst_hst", @@ -43,12 +46,14 @@ class CustomerCreateTaxIdParams(RequestOptions): "cd_nif", "ch_uid", "ch_vat", + "ci_vat", "cl_tin", "cm_niu", "cn_tin", "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -58,8 +63,12 @@ class CustomerCreateTaxIdParams(RequestOptions): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", + "gh_tin", "gi_tin", "gn_nif", "hk_br", @@ -69,6 +78,7 @@ class CustomerCreateTaxIdParams(RequestOptions): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -84,23 +94,28 @@ class CustomerCreateTaxIdParams(RequestOptions): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -110,12 +125,15 @@ class CustomerCreateTaxIdParams(RequestOptions): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -133,7 +151,7 @@ class CustomerCreateTaxIdParams(RequestOptions): str, ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_acn`, `au_arn`, `au_wpn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `bw_vat`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `ci_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `cz_dic`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `fr_siren`, `fr_siret`, `fr_spi`, `gb_vat`, `ge_vat`, `gh_tin`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_kt`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_cf`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mu_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `mz_nuit`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_bn`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `pt_nif`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sm_coe`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tt_bir`, `tt_vat`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_customer_tax_id_create_params.py b/stripe/params/_customer_tax_id_create_params.py index c8b9dd57f..bd6908d06 100644 --- a/stripe/params/_customer_tax_id_create_params.py +++ b/stripe/params/_customer_tax_id_create_params.py @@ -18,7 +18,9 @@ class CustomerTaxIdCreateParams(TypedDict): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -32,6 +34,7 @@ class CustomerTaxIdCreateParams(TypedDict): "br_cnpj", "br_cpf", "bs_tin", + "bw_vat", "by_tin", "ca_bn", "ca_gst_hst", @@ -42,12 +45,14 @@ class CustomerTaxIdCreateParams(TypedDict): "cd_nif", "ch_uid", "ch_vat", + "ci_vat", "cl_tin", "cm_niu", "cn_tin", "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -57,8 +62,12 @@ class CustomerTaxIdCreateParams(TypedDict): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", + "gh_tin", "gi_tin", "gn_nif", "hk_br", @@ -68,6 +77,7 @@ class CustomerTaxIdCreateParams(TypedDict): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -83,23 +93,28 @@ class CustomerTaxIdCreateParams(TypedDict): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -109,12 +124,15 @@ class CustomerTaxIdCreateParams(TypedDict): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -132,7 +150,7 @@ class CustomerTaxIdCreateParams(TypedDict): str, ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_acn`, `au_arn`, `au_wpn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `bw_vat`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `ci_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `cz_dic`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `fr_siren`, `fr_siret`, `fr_spi`, `gb_vat`, `ge_vat`, `gh_tin`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_kt`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_cf`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mu_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `mz_nuit`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_bn`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `pt_nif`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sm_coe`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tt_bir`, `tt_vat`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_dispute_modify_params.py b/stripe/params/_dispute_modify_params.py index f49391878..dca30c049 100644 --- a/stripe/params/_dispute_modify_params.py +++ b/stripe/params/_dispute_modify_params.py @@ -15,6 +15,17 @@ class DisputeModifyParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + intended_submission_method: NotRequired[ + Literal[ + "manual", + "prefer_manual", + "prefer_smart_disputes", + "smart_disputes", + ] + ] + """ + Intended submission method for the dispute. + """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" ] @@ -32,6 +43,10 @@ class DisputeModifyParamsEvidence(TypedDict): """ Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. """ + appeal: NotRequired["Literal['']|DisputeModifyParamsEvidenceAppeal"] + """ + Evidence to submit when appealing a dispute. + """ billing_address: NotRequired[str] """ The billing address provided by the customer. @@ -144,6 +159,24 @@ class DisputeModifyParamsEvidence(TypedDict): """ +class DisputeModifyParamsEvidenceAppeal(TypedDict): + card: NotRequired["Literal['']|DisputeModifyParamsEvidenceAppealCard"] + """ + Evidence for a card dispute appeal. + """ + + +class DisputeModifyParamsEvidenceAppealCard(TypedDict): + reason_for_filing: NotRequired["Literal['']|str"] + """ + An explanation of the reason for filing the appeal. + """ + supporting_files: NotRequired["Literal['']|List[str]"] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `dispute_evidence` to support the appeal. + """ + + class DisputeModifyParamsEvidenceEnhancedEvidence(TypedDict): mastercard_compliance: NotRequired[ "DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance" diff --git a/stripe/params/_dispute_update_params.py b/stripe/params/_dispute_update_params.py index 9e6de06b3..31ec882ea 100644 --- a/stripe/params/_dispute_update_params.py +++ b/stripe/params/_dispute_update_params.py @@ -14,6 +14,17 @@ class DisputeUpdateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ + intended_submission_method: NotRequired[ + Literal[ + "manual", + "prefer_manual", + "prefer_smart_disputes", + "smart_disputes", + ] + ] + """ + Intended submission method for the dispute. + """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" ] @@ -31,6 +42,10 @@ class DisputeUpdateParamsEvidence(TypedDict): """ Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. """ + appeal: NotRequired["Literal['']|DisputeUpdateParamsEvidenceAppeal"] + """ + Evidence to submit when appealing a dispute. + """ billing_address: NotRequired[str] """ The billing address provided by the customer. @@ -143,6 +158,24 @@ class DisputeUpdateParamsEvidence(TypedDict): """ +class DisputeUpdateParamsEvidenceAppeal(TypedDict): + card: NotRequired["Literal['']|DisputeUpdateParamsEvidenceAppealCard"] + """ + Evidence for a card dispute appeal. + """ + + +class DisputeUpdateParamsEvidenceAppealCard(TypedDict): + reason_for_filing: NotRequired["Literal['']|str"] + """ + An explanation of the reason for filing the appeal. + """ + supporting_files: NotRequired["Literal['']|List[str]"] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api#create_file) with a `purpose` value of `dispute_evidence` to support the appeal. + """ + + class DisputeUpdateParamsEvidenceEnhancedEvidence(TypedDict): mastercard_compliance: NotRequired[ "DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance" diff --git a/stripe/params/_invoice_add_lines_params.py b/stripe/params/_invoice_add_lines_params.py index e7cde9cf0..deec9a257 100644 --- a/stripe/params/_invoice_add_lines_params.py +++ b/stripe/params/_invoice_add_lines_params.py @@ -250,7 +250,7 @@ class InvoiceAddLinesParamsLineTaxAmountTaxRateData(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" + "Literal['admissions_tax', 'amusement_tax', 'attendance_tax', 'communications_tax', 'digital_excise_tax', 'entertainment_tax', 'get_fund', 'gross_receipts_tax', 'gst', 'hospitality_tax', 'hst', 'igst', 'jct', 'lease_tax', 'luxury_tax', 'mass_transit_parking_tax', 'nhil', 'parking_tax', 'pst', 'qst', 'resort_tax', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'tourism_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_invoice_create_params.py b/stripe/params/_invoice_create_params.py index ba1653ed9..37df85216 100644 --- a/stripe/params/_invoice_create_params.py +++ b/stripe/params/_invoice_create_params.py @@ -231,7 +231,7 @@ class InvoiceCreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ 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). @@ -548,7 +548,7 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): """ expires_after_seconds: NotRequired[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). """ diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index de5d02ab1..acbff9af4 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -213,7 +213,9 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -227,6 +229,7 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "br_cnpj", "br_cpf", "bs_tin", + "bw_vat", "by_tin", "ca_bn", "ca_gst_hst", @@ -237,12 +240,14 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "cd_nif", "ch_uid", "ch_vat", + "ci_vat", "cl_tin", "cm_niu", "cn_tin", "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -252,8 +257,12 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", + "gh_tin", "gi_tin", "gn_nif", "hk_br", @@ -263,6 +272,7 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -278,23 +288,28 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -304,12 +319,15 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -327,7 +345,7 @@ class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): str, ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_acn`, `au_arn`, `au_wpn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `bw_vat`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `ci_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `cz_dic`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `fr_siren`, `fr_siret`, `fr_spi`, `gb_vat`, `ge_vat`, `gh_tin`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_kt`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_cf`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mu_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `mz_nuit`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_bn`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `pt_nif`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sm_coe`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tt_bir`, `tt_vat`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ @@ -389,11 +407,11 @@ class InvoiceCreatePreviewParamsInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. One of `price` or `price_data` is required. + The ID of the price object. """ price_data: NotRequired["InvoiceCreatePreviewParamsInvoiceItemPriceData"] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. """ quantity: NotRequired[int] """ @@ -500,6 +518,12 @@ class InvoiceCreatePreviewParamsScheduleDetails(TypedDict): """ Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. """ + pause_schedules: NotRequired[ + "Literal['']|List[InvoiceCreatePreviewParamsScheduleDetailsPauseSchedule]" + ] + """ + The subscription's pause behavior and optional resume behavior. You can provide one entry. Include its `key` to update an existing pause schedule. Omit `pause_schedules` to leave the existing schedule unchanged, or pass an empty string (`""`) to clear it. + """ phases: NotRequired[List["InvoiceCreatePreviewParamsScheduleDetailsPhase"]] """ List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. @@ -532,6 +556,179 @@ class InvoiceCreatePreviewParamsScheduleDetailsBillingModeFlexible(TypedDict): """ +class InvoiceCreatePreviewParamsScheduleDetailsPauseSchedule(TypedDict): + key: NotRequired[str] + """ + A unique identifier for this pause schedule entry. + """ + pause: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePause" + ] + """ + Configuration for when and how the subscription pauses. + """ + resume: NotRequired[ + "Literal['']|InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResume" + ] + """ + Configuration for when and how the subscription resumes. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePause(TypedDict): + pause_at: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePausePauseAt" + ] + """ + When to pause the subscription. + """ + settings: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettings" + ] + """ + Settings controlling billing behavior during the pause. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePausePauseAt( + TypedDict, +): + timestamp: NotRequired[int] + """ + The Unix timestamp at which to pause the subscription. Required when `type` is `timestamp`. + """ + type: Union[Literal["now", "timestamp"], str] + """ + When to pause the subscription. Use `now` to pause immediately or `timestamp` to pause at a specific time. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettings( + TypedDict, +): + bill_for: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillFor" + ] + """ + Controls what to bill for when pausing the subscription. + """ + invoicing_behavior: NotRequired[ + "Literal['invoice', 'pending_invoice_item']|str" + ] + """ + Determines whether to generate an invoice for outstanding amounts when pausing. When adding a pause schedule, defaults to `pending_invoice_item`. On updates, the existing value is preserved if not provided. + """ + type: NotRequired["Literal['subscription']|str"] + """ + The pause type. Currently only `subscription` is supported. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillFor( + TypedDict, +): + outstanding_usage_through: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillForOutstandingUsageThrough" + ] + """ + Controls whether to collect metered usage accrued up to the pause date. + """ + unused_time_from: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillForUnusedTimeFrom" + ] + """ + Controls how unused time on subscription items is credited when pausing. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillForOutstandingUsageThrough( + TypedDict, +): + type: NotRequired["Literal['none', 'pause_at']|str"] + """ + Determines whether to collect metered usage accrued up to the pause date. When adding a pause schedule, defaults to `pause_at`. On updates, the existing value is preserved if not provided. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPauseSchedulePauseSettingsBillForUnusedTimeFrom( + TypedDict, +): + type: NotRequired[ + "Literal['item_current_period_start', 'none', 'pause_at']|str" + ] + """ + Determines which point in the billing period unused time is credited from. When adding a pause schedule, defaults to `pause_at`. On updates, the existing value is preserved if not provided. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResume(TypedDict): + resume_at: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeResumeAt" + ] + """ + When to resume the subscription. + """ + settings: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeSettings" + ] + """ + Settings controlling how the subscription resumes. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeResumeAt( + TypedDict, +): + duration: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeResumeAtDuration" + ] + """ + The duration after which to resume the subscription. Required when `type` is `duration`. + """ + timestamp: NotRequired[int] + """ + The Unix timestamp at which to resume the subscription. Required when `type` is `timestamp`. + """ + type: Union[Literal["duration", "now", "timestamp"], str] + """ + When to resume the subscription. Use `now` to resume immediately, `duration` to resume after a set duration, or `timestamp` to resume at a specific time. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeResumeAtDuration( + TypedDict, +): + interval: Union[Literal["day", "month", "week", "year"], str] + """ + The time unit for the resume duration. One of `day`, `week`, `month`, or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals after which the subscription resumes. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPauseScheduleResumeSettings( + TypedDict, +): + billing_cycle_anchor: NotRequired["Literal['resume_at', 'unchanged']|str"] + """ + Controls the billing cycle anchor when the subscription resumes. When adding a pause schedule, defaults to `resume_at`. On updates, the existing value is preserved if not provided. + """ + payment_behavior: NotRequired[ + "Literal['resume_on_payment_attempt', 'resume_on_payment_success']|str" + ] + """ + Controls whether Stripe attempts payment on the resumption invoice and how payment affects the subscription's status. When adding a pause schedule, defaults to `resume_on_payment_success`. On updates, the existing value is preserved if not provided. + """ + proration_behavior: NotRequired[ + "Literal['always_invoice', 'create_prorations', 'none']|str" + ] + """ + Determines how to handle prorations when the subscription resumes. When adding a pause schedule, defaults to `create_prorations`. On updates, the existing value is preserved if not provided. + """ + + class InvoiceCreatePreviewParamsScheduleDetailsPhase(TypedDict): add_invoice_items: NotRequired[ List["InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem"] diff --git a/stripe/params/_invoice_line_item_update_params.py b/stripe/params/_invoice_line_item_update_params.py index a6098e2d6..9f42d76a1 100644 --- a/stripe/params/_invoice_line_item_update_params.py +++ b/stripe/params/_invoice_line_item_update_params.py @@ -234,7 +234,7 @@ class InvoiceLineItemUpdateParamsTaxAmountTaxRateData(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" + "Literal['admissions_tax', 'amusement_tax', 'attendance_tax', 'communications_tax', 'digital_excise_tax', 'entertainment_tax', 'get_fund', 'gross_receipts_tax', 'gst', 'hospitality_tax', 'hst', 'igst', 'jct', 'lease_tax', 'luxury_tax', 'mass_transit_parking_tax', 'nhil', 'parking_tax', 'pst', 'qst', 'resort_tax', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'tourism_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_invoice_modify_params.py b/stripe/params/_invoice_modify_params.py index 264a99804..304f44df2 100644 --- a/stripe/params/_invoice_modify_params.py +++ b/stripe/params/_invoice_modify_params.py @@ -196,7 +196,7 @@ class InvoiceModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ 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). @@ -513,7 +513,7 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): """ expires_after_seconds: NotRequired[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). """ diff --git a/stripe/params/_invoice_update_lines_params.py b/stripe/params/_invoice_update_lines_params.py index 425698693..9e0a0529a 100644 --- a/stripe/params/_invoice_update_lines_params.py +++ b/stripe/params/_invoice_update_lines_params.py @@ -252,7 +252,7 @@ class InvoiceUpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" + "Literal['admissions_tax', 'amusement_tax', 'attendance_tax', 'communications_tax', 'digital_excise_tax', 'entertainment_tax', 'get_fund', 'gross_receipts_tax', 'gst', 'hospitality_tax', 'hst', 'igst', 'jct', 'lease_tax', 'luxury_tax', 'mass_transit_parking_tax', 'nhil', 'parking_tax', 'pst', 'qst', 'resort_tax', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'tourism_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_invoice_update_params.py b/stripe/params/_invoice_update_params.py index 36c819ed2..01ff9e06f 100644 --- a/stripe/params/_invoice_update_params.py +++ b/stripe/params/_invoice_update_params.py @@ -195,7 +195,7 @@ class InvoiceUpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ 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). @@ -512,7 +512,7 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): """ expires_after_seconds: NotRequired[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). """ diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 738a404a7..3a338ce7f 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -177,7 +177,7 @@ class PaymentIntentConfirmParams(RequestOptions): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://docs.stripe.com/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + The ID of a PaymentMethod to attach to this PaymentIntent. If the payment method is attached to a Customer, it must match the [customer](https://docs.stripe.com/api#create_payment_intent-customer) that is set on this PaymentIntent. """ payment_method_data: NotRequired[ @@ -2136,6 +2136,12 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): """ When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -2158,6 +2164,18 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): """ Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. """ + stored_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + + When making an off session payment with a previously saved card (that was saved with a SetupIntent or with a PaymentIntent with `setup_future_usage`), set this parameter to indicate the type of transaction. + + You can set this parameter at any time before or during PaymentIntent confirmation, and confirm this PaymentIntent with `off_session=true`. + + Note that this parameter is currently unsupported with the `setup_future_usage` parameter. + """ three_d_secure: NotRequired[ "PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure" ] @@ -3054,11 +3072,11 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPix(TypedDict): """ expires_after_seconds: NotRequired[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 seconds (4 hours). Mutually exclusive with `expires_at`. """ expires_at: NotRequired[int] """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + The absolute Unix timestamp at which the Pix expires, between 60 and 1209600 seconds from the current time. If neither expiration option is supplied, the Pix expires 14400 seconds (4 hours) after PaymentIntent confirmation. Mutually exclusive with `expires_after_seconds`. """ mandate_options: NotRequired[ "PaymentIntentConfirmParamsPaymentMethodOptionsPixMandateOptions" diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 415047d03..00302cf9c 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -287,7 +287,7 @@ class PaymentIntentCreateParams(RequestOptions): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://docs.stripe.com/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. + The ID of a PaymentMethod to attach to this PaymentIntent. If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. If the payment method is attached to a Customer, you must also provide the ID of that Customer as the [customer](https://docs.stripe.com/api#create_payment_intent-customer) parameter of this PaymentIntent. @@ -2271,6 +2271,12 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCard(TypedDict): """ When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -2293,6 +2299,18 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCard(TypedDict): """ Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. """ + stored_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + + When making an off session payment with a previously saved card (that was saved with a SetupIntent or with a PaymentIntent with `setup_future_usage`), set this parameter to indicate the type of transaction. + + You can set this parameter at any time before or during PaymentIntent confirmation, and confirm this PaymentIntent with `off_session=true`. + + Note that this parameter is currently unsupported with the `setup_future_usage` parameter. + """ three_d_secure: NotRequired[ "PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecure" ] @@ -3185,11 +3203,11 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPix(TypedDict): """ expires_after_seconds: NotRequired[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 seconds (4 hours). Mutually exclusive with `expires_at`. """ expires_at: NotRequired[int] """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + The absolute Unix timestamp at which the Pix expires, between 60 and 1209600 seconds from the current time. If neither expiration option is supplied, the Pix expires 14400 seconds (4 hours) after PaymentIntent confirmation. Mutually exclusive with `expires_after_seconds`. """ mandate_options: NotRequired[ "PaymentIntentCreateParamsPaymentMethodOptionsPixMandateOptions" diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index b6b7a2362..22a6e52d3 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -190,7 +190,7 @@ class PaymentIntentModifyParams(RequestOptions): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://docs.stripe.com/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. To unset this field to null, pass in an empty string. + The ID of a PaymentMethod to attach to this PaymentIntent. To unset this field to null, pass in an empty string. """ payment_method_configuration: NotRequired[str] """ @@ -2101,6 +2101,12 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCard(TypedDict): """ When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -2123,6 +2129,18 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCard(TypedDict): """ Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. """ + stored_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + + When making an off session payment with a previously saved card (that was saved with a SetupIntent or with a PaymentIntent with `setup_future_usage`), set this parameter to indicate the type of transaction. + + You can set this parameter at any time before or during PaymentIntent confirmation, and confirm this PaymentIntent with `off_session=true`. + + Note that this parameter is currently unsupported with the `setup_future_usage` parameter. + """ three_d_secure: NotRequired[ "PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecure" ] @@ -3015,11 +3033,11 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPix(TypedDict): """ expires_after_seconds: NotRequired[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 seconds (4 hours). Mutually exclusive with `expires_at`. """ expires_at: NotRequired[int] """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + The absolute Unix timestamp at which the Pix expires, between 60 and 1209600 seconds from the current time. If neither expiration option is supplied, the Pix expires 14400 seconds (4 hours) after PaymentIntent confirmation. Mutually exclusive with `expires_after_seconds`. """ mandate_options: NotRequired[ "PaymentIntentModifyParamsPaymentMethodOptionsPixMandateOptions" diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 7400f1e0f..d2abce9a1 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -189,7 +189,7 @@ class PaymentIntentUpdateParams(TypedDict): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://docs.stripe.com/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. To unset this field to null, pass in an empty string. + The ID of a PaymentMethod to attach to this PaymentIntent. To unset this field to null, pass in an empty string. """ payment_method_configuration: NotRequired[str] """ @@ -2100,6 +2100,12 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): """ When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -2122,6 +2128,18 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): """ Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. """ + stored_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + + When making an off session payment with a previously saved card (that was saved with a SetupIntent or with a PaymentIntent with `setup_future_usage`), set this parameter to indicate the type of transaction. + + You can set this parameter at any time before or during PaymentIntent confirmation, and confirm this PaymentIntent with `off_session=true`. + + Note that this parameter is currently unsupported with the `setup_future_usage` parameter. + """ three_d_secure: NotRequired[ "PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure" ] @@ -3014,11 +3032,11 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPix(TypedDict): """ expires_after_seconds: NotRequired[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If neither expiration option is supplied, defaults to 14400 seconds (4 hours). Mutually exclusive with `expires_at`. """ expires_at: NotRequired[int] """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + The absolute Unix timestamp at which the Pix expires, between 60 and 1209600 seconds from the current time. If neither expiration option is supplied, the Pix expires 14400 seconds (4 hours) after PaymentIntent confirmation. Mutually exclusive with `expires_after_seconds`. """ mandate_options: NotRequired[ "PaymentIntentUpdateParamsPaymentMethodOptionsPixMandateOptions" diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py index 9498dfbcd..cbc6d18dc 100644 --- a/stripe/params/_payment_link_create_params.py +++ b/stripe/params/_payment_link_create_params.py @@ -150,6 +150,7 @@ class PaymentLinkCreateParams(RequestOptions): "pix", "promptpay", "satispay", + "scalapay", "sepa_debit", "sequra", "sofort", @@ -1119,6 +1120,24 @@ class PaymentLinkCreateParamsSubscriptionData(TypedDict): class PaymentLinkCreateParamsSubscriptionDataInvoiceSettings(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + """ + custom_fields: NotRequired[ + "Literal['']|List[PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired[str] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired[ "PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsIssuer" ] @@ -1127,6 +1146,19 @@ class PaymentLinkCreateParamsSubscriptionDataInvoiceSettings(TypedDict): """ +class PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsCustomField( + TypedDict, +): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ diff --git a/stripe/params/_payment_link_modify_params.py b/stripe/params/_payment_link_modify_params.py index 34851b6c1..06e64635c 100644 --- a/stripe/params/_payment_link_modify_params.py +++ b/stripe/params/_payment_link_modify_params.py @@ -114,7 +114,7 @@ class PaymentLinkModifyParams(RequestOptions): Payment-method-specific configuration. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'satispay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" + "Literal['']|List[Union[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). @@ -961,6 +961,24 @@ class PaymentLinkModifyParamsSubscriptionData(TypedDict): class PaymentLinkModifyParamsSubscriptionDataInvoiceSettings(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + """ + custom_fields: NotRequired[ + "Literal['']|List[PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired[str] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired[ "PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsIssuer" ] @@ -969,6 +987,19 @@ class PaymentLinkModifyParamsSubscriptionDataInvoiceSettings(TypedDict): """ +class PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsCustomField( + TypedDict, +): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ diff --git a/stripe/params/_payment_link_update_params.py b/stripe/params/_payment_link_update_params.py index 0973b6882..180eb23e0 100644 --- a/stripe/params/_payment_link_update_params.py +++ b/stripe/params/_payment_link_update_params.py @@ -113,7 +113,7 @@ class PaymentLinkUpdateParams(TypedDict): Payment-method-specific configuration. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'satispay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" + "Literal['']|List[Union[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). @@ -960,6 +960,24 @@ class PaymentLinkUpdateParamsSubscriptionData(TypedDict): class PaymentLinkUpdateParamsSubscriptionDataInvoiceSettings(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + """ + custom_fields: NotRequired[ + "Literal['']|List[PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired[str] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired[ "PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsIssuer" ] @@ -968,6 +986,19 @@ class PaymentLinkUpdateParamsSubscriptionDataInvoiceSettings(TypedDict): """ +class PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsCustomField( + TypedDict, +): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index 5902d3868..35fe3f036 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -133,7 +133,7 @@ class SetupIntentConfirmParams(RequestOptions): ] payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + The ID of a PaymentMethod to attach to this SetupIntent. """ payment_method_data: NotRequired[ "SetupIntentConfirmParamsPaymentMethodData" @@ -1218,6 +1218,12 @@ class SetupIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): """ 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. If not provided, this value defaults to `automatic`. 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. """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ three_d_secure: NotRequired[ "SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure" ] diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index d8e9299c3..76f73a2a7 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -249,7 +249,7 @@ class SetupIntentCreateParams(RequestOptions): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + The ID of a PaymentMethod to attach to this SetupIntent. """ payment_method_configuration: NotRequired[str] """ @@ -1349,6 +1349,12 @@ class SetupIntentCreateParamsPaymentMethodOptionsCard(TypedDict): """ 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. If not provided, this value defaults to `automatic`. 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. """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ three_d_secure: NotRequired[ "SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecure" ] diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index 08841aee3..ed9657d9c 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -61,7 +61,7 @@ class SetupIntentModifyParams(RequestOptions): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. + The ID of a PaymentMethod to attach to this SetupIntent. To unset this field to null, pass in an empty string. """ payment_method_configuration: NotRequired[str] """ @@ -1085,6 +1085,12 @@ class SetupIntentModifyParamsPaymentMethodOptionsCard(TypedDict): """ 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. If not provided, this value defaults to `automatic`. 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. """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ three_d_secure: NotRequired[ "SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecure" ] diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index 38e8edfa5..d694894da 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -60,7 +60,7 @@ class SetupIntentUpdateParams(TypedDict): """ payment_method: NotRequired[str] """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. + The ID of a PaymentMethod to attach to this SetupIntent. To unset this field to null, pass in an empty string. """ payment_method_configuration: NotRequired[str] """ @@ -1084,6 +1084,12 @@ class SetupIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): """ 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. If not provided, this value defaults to `automatic`. 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. """ + setup_credential_usage: NotRequired[ + "Literal['installment', 'recurring', 'unscheduled']|str" + ] + """ + Set to indicate the future transaction type usage for the card being set up. + """ three_d_secure: NotRequired[ "SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure" ] diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index 70a9f1d36..50ab2af3c 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -598,7 +598,7 @@ class SubscriptionCreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -926,7 +926,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPix( ): expires_after_seconds: NotRequired[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). """ mandate_options: NotRequired[ "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index 9e4d1db5f..0d550a2b1 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -68,7 +68,7 @@ class SubscriptionModifyParams(RequestOptions): """ default_payment_method: NotRequired[str] """ - ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source). + ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source). For subscriptions created by Checkout Sessions with Managed Payments enabled, you can't update this field directly through the API. Customers can update it through the Customer Portal. """ default_source: NotRequired["Literal['']|str"] """ @@ -598,7 +598,7 @@ class SubscriptionModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -926,7 +926,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPix( ): expires_after_seconds: NotRequired[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). """ mandate_options: NotRequired[ "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" diff --git a/stripe/params/_subscription_schedule_modify_params.py b/stripe/params/_subscription_schedule_modify_params.py index 79b216e28..61c3e12e9 100644 --- a/stripe/params/_subscription_schedule_modify_params.py +++ b/stripe/params/_subscription_schedule_modify_params.py @@ -34,7 +34,7 @@ class SubscriptionScheduleModifyParams(RequestOptions): "Literal['']|List[SubscriptionScheduleModifyParamsPauseSchedule]" ] """ - Configures the subscription's pause behavior and, optionally, its resume behavior. Only one entry is supported. Include a key to update an existing entry. Omit to leave an existing pause schedule unchanged, or pass "" to clear it. + The subscription's pause behavior and optional resume behavior. You can provide one entry. Include its `key` to update an existing pause schedule. Omit `pause_schedules` to leave the existing schedule unchanged, or pass an empty string (`""`) to clear it. """ phases: NotRequired[List["SubscriptionScheduleModifyParamsPhase"]] """ diff --git a/stripe/params/_subscription_schedule_update_params.py b/stripe/params/_subscription_schedule_update_params.py index 302ca90b8..da2d97599 100644 --- a/stripe/params/_subscription_schedule_update_params.py +++ b/stripe/params/_subscription_schedule_update_params.py @@ -33,7 +33,7 @@ class SubscriptionScheduleUpdateParams(TypedDict): "Literal['']|List[SubscriptionScheduleUpdateParamsPauseSchedule]" ] """ - Configures the subscription's pause behavior and, optionally, its resume behavior. Only one entry is supported. Include a key to update an existing entry. Omit to leave an existing pause schedule unchanged, or pass "" to clear it. + The subscription's pause behavior and optional resume behavior. You can provide one entry. Include its `key` to update an existing pause schedule. Omit `pause_schedules` to leave the existing schedule unchanged, or pass an empty string (`""`) to clear it. """ phases: NotRequired[List["SubscriptionScheduleUpdateParamsPhase"]] """ diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index 98d103719..387793cea 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -67,7 +67,7 @@ class SubscriptionUpdateParams(TypedDict): """ default_payment_method: NotRequired[str] """ - ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source). + ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source). For subscriptions created by Checkout Sessions with Managed Payments enabled, you can't update this field directly through the API. Customers can update it through the Customer Portal. """ default_source: NotRequired["Literal['']|str"] """ @@ -597,7 +597,7 @@ class SubscriptionUpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration @@ -925,7 +925,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPix( ): expires_after_seconds: NotRequired[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). """ mandate_options: NotRequired[ "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" diff --git a/stripe/params/_tax_id_create_params.py b/stripe/params/_tax_id_create_params.py index d2e45e779..68e653f33 100644 --- a/stripe/params/_tax_id_create_params.py +++ b/stripe/params/_tax_id_create_params.py @@ -23,7 +23,9 @@ class TaxIdCreateParams(RequestOptions): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -37,6 +39,7 @@ class TaxIdCreateParams(RequestOptions): "br_cnpj", "br_cpf", "bs_tin", + "bw_vat", "by_tin", "ca_bn", "ca_gst_hst", @@ -47,12 +50,14 @@ class TaxIdCreateParams(RequestOptions): "cd_nif", "ch_uid", "ch_vat", + "ci_vat", "cl_tin", "cm_niu", "cn_tin", "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -62,8 +67,12 @@ class TaxIdCreateParams(RequestOptions): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", + "gh_tin", "gi_tin", "gn_nif", "hk_br", @@ -73,6 +82,7 @@ class TaxIdCreateParams(RequestOptions): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -88,23 +98,28 @@ class TaxIdCreateParams(RequestOptions): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -114,12 +129,15 @@ class TaxIdCreateParams(RequestOptions): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -137,7 +155,7 @@ class TaxIdCreateParams(RequestOptions): str, ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_acn`, `au_arn`, `au_wpn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `bw_vat`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `ci_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `cz_dic`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `fr_siren`, `fr_siret`, `fr_spi`, `gb_vat`, `ge_vat`, `gh_tin`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_kt`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_cf`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mu_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `mz_nuit`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_bn`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `pt_nif`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sm_coe`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tt_bir`, `tt_vat`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/_tax_rate_create_params.py b/stripe/params/_tax_rate_create_params.py index 2ca0e360c..0b3b2ca6d 100644 --- a/stripe/params/_tax_rate_create_params.py +++ b/stripe/params/_tax_rate_create_params.py @@ -48,7 +48,7 @@ class TaxRateCreateParams(RequestOptions): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" + "Literal['admissions_tax', 'amusement_tax', 'attendance_tax', 'communications_tax', 'digital_excise_tax', 'entertainment_tax', 'get_fund', 'gross_receipts_tax', 'gst', 'hospitality_tax', 'hst', 'igst', 'jct', 'lease_tax', 'luxury_tax', 'mass_transit_parking_tax', 'nhil', 'parking_tax', 'pst', 'qst', 'resort_tax', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'tourism_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_tax_rate_modify_params.py b/stripe/params/_tax_rate_modify_params.py index d31f79dec..a0d8b7ed3 100644 --- a/stripe/params/_tax_rate_modify_params.py +++ b/stripe/params/_tax_rate_modify_params.py @@ -42,7 +42,7 @@ class TaxRateModifyParams(RequestOptions): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" + "Literal['admissions_tax', 'amusement_tax', 'attendance_tax', 'communications_tax', 'digital_excise_tax', 'entertainment_tax', 'get_fund', 'gross_receipts_tax', 'gst', 'hospitality_tax', 'hst', 'igst', 'jct', 'lease_tax', 'luxury_tax', 'mass_transit_parking_tax', 'nhil', 'parking_tax', 'pst', 'qst', 'resort_tax', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'tourism_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_tax_rate_update_params.py b/stripe/params/_tax_rate_update_params.py index 5394fe4e6..61e3be2a4 100644 --- a/stripe/params/_tax_rate_update_params.py +++ b/stripe/params/_tax_rate_update_params.py @@ -41,7 +41,7 @@ class TaxRateUpdateParams(TypedDict): [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. """ tax_type: NotRequired[ - "Literal['amusement_tax', 'communications_tax', 'digital_excise_tax', 'gst', 'hst', 'igst', 'jct', 'lease_tax', 'mass_transit_parking_tax', 'parking_tax', 'pst', 'qst', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'utility_users_tax', 'vat']|str" + "Literal['admissions_tax', 'amusement_tax', 'attendance_tax', 'communications_tax', 'digital_excise_tax', 'entertainment_tax', 'get_fund', 'gross_receipts_tax', 'gst', 'hospitality_tax', 'hst', 'igst', 'jct', 'lease_tax', 'luxury_tax', 'mass_transit_parking_tax', 'nhil', 'parking_tax', 'pst', 'qst', 'resort_tax', 'retail_delivery_fee', 'rst', 'sales_tax', 'service_tax', 'tourism_tax', 'utility_users_tax', 'vat']|str" ] """ The high-level tax type, such as `vat` or `sales_tax`. diff --git a/stripe/params/_token_create_params.py b/stripe/params/_token_create_params.py index 0a541b75a..e93cce808 100644 --- a/stripe/params/_token_create_params.py +++ b/stripe/params/_token_create_params.py @@ -139,6 +139,12 @@ class TokenCreateParamsAccountCompany(TypedDict): """ The company's phone number (used for verification). """ + physical_address: NotRequired[ + "TokenCreateParamsAccountCompanyPhysicalAddress" + ] + """ + A location where the business has a meaningful physical operating presence. + """ principal_place_of_business: NotRequired[ "TokenCreateParamsAccountCompanyPrincipalPlaceOfBusiness" ] @@ -333,6 +339,33 @@ class TokenCreateParamsAccountCompanyOwnershipDeclaration(TypedDict): """ +class TokenCreateParamsAccountCompanyPhysicalAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + line1: NotRequired[str] + """ + Address line 1, such as the street, PO Box, or company name. + """ + line2: NotRequired[str] + """ + Address line 2, such as the apartment, suite, unit, or building. + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + class TokenCreateParamsAccountCompanyPrincipalPlaceOfBusiness(TypedDict): city: NotRequired[str] """ diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py index 70d2f2673..8b9c00017 100644 --- a/stripe/params/_webhook_endpoint_create_params.py +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -137,6 +137,7 @@ class WebhookEndpointCreateParams(RequestOptions): "2026-07-29.dahlia", "2026-08-26.dahlia", "2026-09-30.endive", + "2026-10-28.endive", ] ] """ @@ -383,6 +384,13 @@ class WebhookEndpointCreateParams(RequestOptions): "test_helpers.test_clock.deleted", "test_helpers.test_clock.internal_failure", "test_helpers.test_clock.ready", + "three_d_secure.authentication.canceled", + "three_d_secure.authentication.challenge_started", + "three_d_secure.authentication.errored", + "three_d_secure.authentication.failed", + "three_d_secure.authentication.requires_challenge", + "three_d_secure.authentication.requires_submission", + "three_d_secure.authentication.succeeded", "topup.canceled", "topup.created", "topup.failed", diff --git a/stripe/params/_webhook_endpoint_modify_params.py b/stripe/params/_webhook_endpoint_modify_params.py index d872d71ae..6a2b7af09 100644 --- a/stripe/params/_webhook_endpoint_modify_params.py +++ b/stripe/params/_webhook_endpoint_modify_params.py @@ -249,6 +249,13 @@ class WebhookEndpointModifyParams(RequestOptions): "test_helpers.test_clock.deleted", "test_helpers.test_clock.internal_failure", "test_helpers.test_clock.ready", + "three_d_secure.authentication.canceled", + "three_d_secure.authentication.challenge_started", + "three_d_secure.authentication.errored", + "three_d_secure.authentication.failed", + "three_d_secure.authentication.requires_challenge", + "three_d_secure.authentication.requires_submission", + "three_d_secure.authentication.succeeded", "topup.canceled", "topup.created", "topup.failed", diff --git a/stripe/params/_webhook_endpoint_update_params.py b/stripe/params/_webhook_endpoint_update_params.py index 3c78fac79..a033dcb24 100644 --- a/stripe/params/_webhook_endpoint_update_params.py +++ b/stripe/params/_webhook_endpoint_update_params.py @@ -248,6 +248,13 @@ class WebhookEndpointUpdateParams(TypedDict): "test_helpers.test_clock.deleted", "test_helpers.test_clock.internal_failure", "test_helpers.test_clock.ready", + "three_d_secure.authentication.canceled", + "three_d_secure.authentication.challenge_started", + "three_d_secure.authentication.errored", + "three_d_secure.authentication.failed", + "three_d_secure.authentication.requires_challenge", + "three_d_secure.authentication.requires_submission", + "three_d_secure.authentication.succeeded", "topup.canceled", "topup.created", "topup.failed", diff --git a/stripe/params/apps/_install_create_params.py b/stripe/params/apps/_install_create_params.py index a287a4696..0b029cd72 100644 --- a/stripe/params/apps/_install_create_params.py +++ b/stripe/params/apps/_install_create_params.py @@ -14,7 +14,7 @@ class InstallCreateParams(RequestOptions): "Literal['private_live', 'private_test', 'public', 'testing']|str" ] """ - The distribution channel to install from. Defaults to `public`. A private app must be installed on `private_test` or `private_live`, matching the mode of the API key. + The distribution channel to install from. Defaults to `public`, which only app developers and embedding platforms can use. An account installing its own private app must pass `private_test` or `private_live`, matching the mode of the API key. """ code_challenge: NotRequired[str] """ diff --git a/stripe/params/apps/_install_list_params.py b/stripe/params/apps/_install_list_params.py index 0b17bd1ac..208db0fda 100644 --- a/stripe/params/apps/_install_list_params.py +++ b/stripe/params/apps/_install_list_params.py @@ -8,7 +8,7 @@ class InstallListParams(RequestOptions): account: NotRequired[str] """ - Only return installs made by this account. Only useful to app developers and embedding platforms, whose lists span the accounts that installed their app. + Only return installs made by this account. Only useful to an app developer filtering by its own app with its own key, whose list spans the accounts that installed the app; other lists only accept the authenticated account. """ app: NotRequired[str] """ @@ -52,7 +52,7 @@ class InstallListParams(RequestOptions): "Literal['install_failed', 'installed', 'installing', 'uninstall_failed', 'uninstalling']|str" ] """ - Only return installs with the given status. + Only return installs with the given status: `installed`, `installing`, `install_failed`, `uninstalling`, or `uninstall_failed`. """ diff --git a/stripe/params/billing_portal/__init__.py b/stripe/params/billing_portal/__init__.py index 1fe2f4e00..02b8fed7c 100644 --- a/stripe/params/billing_portal/__init__.py +++ b/stripe/params/billing_portal/__init__.py @@ -13,6 +13,9 @@ ConfigurationCreateParamsFeaturesPaymentMethodUpdate as ConfigurationCreateParamsFeaturesPaymentMethodUpdate, ConfigurationCreateParamsFeaturesSubscriptionCancel as ConfigurationCreateParamsFeaturesSubscriptionCancel, ConfigurationCreateParamsFeaturesSubscriptionCancelCancellationReason as ConfigurationCreateParamsFeaturesSubscriptionCancelCancellationReason, + ConfigurationCreateParamsFeaturesSubscriptionPause as ConfigurationCreateParamsFeaturesSubscriptionPause, + ConfigurationCreateParamsFeaturesSubscriptionPauseDuration as ConfigurationCreateParamsFeaturesSubscriptionPauseDuration, + ConfigurationCreateParamsFeaturesSubscriptionPauseDurationIntervalOption as ConfigurationCreateParamsFeaturesSubscriptionPauseDurationIntervalOption, ConfigurationCreateParamsFeaturesSubscriptionUpdate as ConfigurationCreateParamsFeaturesSubscriptionUpdate, ConfigurationCreateParamsFeaturesSubscriptionUpdateProduct as ConfigurationCreateParamsFeaturesSubscriptionUpdateProduct, ConfigurationCreateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity as ConfigurationCreateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity, @@ -32,6 +35,9 @@ ConfigurationModifyParamsFeaturesPaymentMethodUpdate as ConfigurationModifyParamsFeaturesPaymentMethodUpdate, ConfigurationModifyParamsFeaturesSubscriptionCancel as ConfigurationModifyParamsFeaturesSubscriptionCancel, ConfigurationModifyParamsFeaturesSubscriptionCancelCancellationReason as ConfigurationModifyParamsFeaturesSubscriptionCancelCancellationReason, + ConfigurationModifyParamsFeaturesSubscriptionPause as ConfigurationModifyParamsFeaturesSubscriptionPause, + ConfigurationModifyParamsFeaturesSubscriptionPauseDuration as ConfigurationModifyParamsFeaturesSubscriptionPauseDuration, + ConfigurationModifyParamsFeaturesSubscriptionPauseDurationIntervalOption as ConfigurationModifyParamsFeaturesSubscriptionPauseDurationIntervalOption, ConfigurationModifyParamsFeaturesSubscriptionUpdate as ConfigurationModifyParamsFeaturesSubscriptionUpdate, ConfigurationModifyParamsFeaturesSubscriptionUpdateProduct as ConfigurationModifyParamsFeaturesSubscriptionUpdateProduct, ConfigurationModifyParamsFeaturesSubscriptionUpdateProductAdjustableQuantity as ConfigurationModifyParamsFeaturesSubscriptionUpdateProductAdjustableQuantity, @@ -51,6 +57,9 @@ ConfigurationUpdateParamsFeaturesPaymentMethodUpdate as ConfigurationUpdateParamsFeaturesPaymentMethodUpdate, ConfigurationUpdateParamsFeaturesSubscriptionCancel as ConfigurationUpdateParamsFeaturesSubscriptionCancel, ConfigurationUpdateParamsFeaturesSubscriptionCancelCancellationReason as ConfigurationUpdateParamsFeaturesSubscriptionCancelCancellationReason, + ConfigurationUpdateParamsFeaturesSubscriptionPause as ConfigurationUpdateParamsFeaturesSubscriptionPause, + ConfigurationUpdateParamsFeaturesSubscriptionPauseDuration as ConfigurationUpdateParamsFeaturesSubscriptionPauseDuration, + ConfigurationUpdateParamsFeaturesSubscriptionPauseDurationIntervalOption as ConfigurationUpdateParamsFeaturesSubscriptionPauseDurationIntervalOption, ConfigurationUpdateParamsFeaturesSubscriptionUpdate as ConfigurationUpdateParamsFeaturesSubscriptionUpdate, ConfigurationUpdateParamsFeaturesSubscriptionUpdateProduct as ConfigurationUpdateParamsFeaturesSubscriptionUpdateProduct, ConfigurationUpdateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity as ConfigurationUpdateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity, @@ -60,6 +69,8 @@ ) from stripe.params.billing_portal._session_create_params import ( SessionCreateParams as SessionCreateParams, + SessionCreateParamsAfterExpiration as SessionCreateParamsAfterExpiration, + SessionCreateParamsAfterExpirationCustomerLogin as SessionCreateParamsAfterExpirationCustomerLogin, SessionCreateParamsFlowData as SessionCreateParamsFlowData, SessionCreateParamsFlowDataAfterCompletion as SessionCreateParamsFlowDataAfterCompletion, SessionCreateParamsFlowDataAfterCompletionHostedConfirmation as SessionCreateParamsFlowDataAfterCompletionHostedConfirmation, @@ -67,6 +78,7 @@ SessionCreateParamsFlowDataSubscriptionCancel as SessionCreateParamsFlowDataSubscriptionCancel, SessionCreateParamsFlowDataSubscriptionCancelRetention as SessionCreateParamsFlowDataSubscriptionCancelRetention, SessionCreateParamsFlowDataSubscriptionCancelRetentionCouponOffer as SessionCreateParamsFlowDataSubscriptionCancelRetentionCouponOffer, + SessionCreateParamsFlowDataSubscriptionPause as SessionCreateParamsFlowDataSubscriptionPause, SessionCreateParamsFlowDataSubscriptionUpdate as SessionCreateParamsFlowDataSubscriptionUpdate, SessionCreateParamsFlowDataSubscriptionUpdateConfirm as SessionCreateParamsFlowDataSubscriptionUpdateConfirm, SessionCreateParamsFlowDataSubscriptionUpdateConfirmDiscount as SessionCreateParamsFlowDataSubscriptionUpdateConfirmDiscount, @@ -107,6 +119,18 @@ "stripe.params.billing_portal._configuration_create_params", False, ), + "ConfigurationCreateParamsFeaturesSubscriptionPause": ( + "stripe.params.billing_portal._configuration_create_params", + False, + ), + "ConfigurationCreateParamsFeaturesSubscriptionPauseDuration": ( + "stripe.params.billing_portal._configuration_create_params", + False, + ), + "ConfigurationCreateParamsFeaturesSubscriptionPauseDurationIntervalOption": ( + "stripe.params.billing_portal._configuration_create_params", + False, + ), "ConfigurationCreateParamsFeaturesSubscriptionUpdate": ( "stripe.params.billing_portal._configuration_create_params", False, @@ -167,6 +191,18 @@ "stripe.params.billing_portal._configuration_modify_params", False, ), + "ConfigurationModifyParamsFeaturesSubscriptionPause": ( + "stripe.params.billing_portal._configuration_modify_params", + False, + ), + "ConfigurationModifyParamsFeaturesSubscriptionPauseDuration": ( + "stripe.params.billing_portal._configuration_modify_params", + False, + ), + "ConfigurationModifyParamsFeaturesSubscriptionPauseDurationIntervalOption": ( + "stripe.params.billing_portal._configuration_modify_params", + False, + ), "ConfigurationModifyParamsFeaturesSubscriptionUpdate": ( "stripe.params.billing_portal._configuration_modify_params", False, @@ -227,6 +263,18 @@ "stripe.params.billing_portal._configuration_update_params", False, ), + "ConfigurationUpdateParamsFeaturesSubscriptionPause": ( + "stripe.params.billing_portal._configuration_update_params", + False, + ), + "ConfigurationUpdateParamsFeaturesSubscriptionPauseDuration": ( + "stripe.params.billing_portal._configuration_update_params", + False, + ), + "ConfigurationUpdateParamsFeaturesSubscriptionPauseDurationIntervalOption": ( + "stripe.params.billing_portal._configuration_update_params", + False, + ), "ConfigurationUpdateParamsFeaturesSubscriptionUpdate": ( "stripe.params.billing_portal._configuration_update_params", False, @@ -255,6 +303,14 @@ "stripe.params.billing_portal._session_create_params", False, ), + "SessionCreateParamsAfterExpiration": ( + "stripe.params.billing_portal._session_create_params", + False, + ), + "SessionCreateParamsAfterExpirationCustomerLogin": ( + "stripe.params.billing_portal._session_create_params", + False, + ), "SessionCreateParamsFlowData": ( "stripe.params.billing_portal._session_create_params", False, @@ -283,6 +339,10 @@ "stripe.params.billing_portal._session_create_params", False, ), + "SessionCreateParamsFlowDataSubscriptionPause": ( + "stripe.params.billing_portal._session_create_params", + False, + ), "SessionCreateParamsFlowDataSubscriptionUpdate": ( "stripe.params.billing_portal._session_create_params", False, diff --git a/stripe/params/billing_portal/_configuration_create_params.py b/stripe/params/billing_portal/_configuration_create_params.py index 305b11dc0..ce572f74e 100644 --- a/stripe/params/billing_portal/_configuration_create_params.py +++ b/stripe/params/billing_portal/_configuration_create_params.py @@ -77,6 +77,12 @@ class ConfigurationCreateParamsFeatures(TypedDict): """ Information about canceling subscriptions in the portal. """ + subscription_pause: NotRequired[ + "ConfigurationCreateParamsFeaturesSubscriptionPause" + ] + """ + Information about pausing subscriptions in the portal. + """ subscription_update: NotRequired[ "ConfigurationCreateParamsFeaturesSubscriptionUpdate" ] @@ -173,6 +179,45 @@ class ConfigurationCreateParamsFeaturesSubscriptionCancelCancellationReason( """ +class ConfigurationCreateParamsFeaturesSubscriptionPause(TypedDict): + duration: NotRequired[ + "ConfigurationCreateParamsFeaturesSubscriptionPauseDuration" + ] + """ + Controls how long a subscription can be paused. Defaults to `interval_options` with a single one-month option. + """ + enabled: NotRequired[bool] + """ + Whether the feature is enabled. Customers can only pause subscriptions in the [redesigned customer portal](https://docs.stripe.com/customer-management). + """ + + +class ConfigurationCreateParamsFeaturesSubscriptionPauseDuration(TypedDict): + interval_options: NotRequired[ + "Literal['']|List[ConfigurationCreateParamsFeaturesSubscriptionPauseDurationIntervalOption]" + ] + """ + The preset pause durations customers can choose from. Required when `type` is `interval_options`. + """ + type: Union[Literal["indefinite", "interval_options"], str] + """ + Whether subscriptions can be paused indefinitely or for a preset duration. + """ + + +class ConfigurationCreateParamsFeaturesSubscriptionPauseDurationIntervalOption( + TypedDict, +): + interval: Union[Literal["day", "month", "week", "year"], str] + """ + Specifies the pause duration unit. Either `day`, `week`, `month`, or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals in the pause duration. Defaults to 1. The maximum duration is three years. + """ + + class ConfigurationCreateParamsFeaturesSubscriptionUpdate(TypedDict): billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|str"] """ diff --git a/stripe/params/billing_portal/_configuration_modify_params.py b/stripe/params/billing_portal/_configuration_modify_params.py index 36fed1907..9ecbaa883 100644 --- a/stripe/params/billing_portal/_configuration_modify_params.py +++ b/stripe/params/billing_portal/_configuration_modify_params.py @@ -83,6 +83,12 @@ class ConfigurationModifyParamsFeatures(TypedDict): """ Information about canceling subscriptions in the portal. """ + subscription_pause: NotRequired[ + "ConfigurationModifyParamsFeaturesSubscriptionPause" + ] + """ + Information about pausing subscriptions in the portal. + """ subscription_update: NotRequired[ "ConfigurationModifyParamsFeaturesSubscriptionUpdate" ] @@ -164,6 +170,45 @@ class ConfigurationModifyParamsFeaturesSubscriptionCancelCancellationReason( """ +class ConfigurationModifyParamsFeaturesSubscriptionPause(TypedDict): + duration: NotRequired[ + "ConfigurationModifyParamsFeaturesSubscriptionPauseDuration" + ] + """ + Controls how long a subscription can be paused. Defaults to `interval_options` with a single one-month option. + """ + enabled: NotRequired[bool] + """ + Whether the feature is enabled. Customers can only pause subscriptions in the [redesigned customer portal](https://docs.stripe.com/customer-management). + """ + + +class ConfigurationModifyParamsFeaturesSubscriptionPauseDuration(TypedDict): + interval_options: NotRequired[ + "Literal['']|List[ConfigurationModifyParamsFeaturesSubscriptionPauseDurationIntervalOption]" + ] + """ + The preset pause durations customers can choose from. Required when `type` is `interval_options`. + """ + type: Union[Literal["indefinite", "interval_options"], str] + """ + Whether subscriptions can be paused indefinitely or for a preset duration. + """ + + +class ConfigurationModifyParamsFeaturesSubscriptionPauseDurationIntervalOption( + TypedDict, +): + interval: Union[Literal["day", "month", "week", "year"], str] + """ + Specifies the pause duration unit. Either `day`, `week`, `month`, or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals in the pause duration. Defaults to 1. The maximum duration is three years. + """ + + class ConfigurationModifyParamsFeaturesSubscriptionUpdate(TypedDict): billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|str"] """ diff --git a/stripe/params/billing_portal/_configuration_update_params.py b/stripe/params/billing_portal/_configuration_update_params.py index a0baba565..59675a905 100644 --- a/stripe/params/billing_portal/_configuration_update_params.py +++ b/stripe/params/billing_portal/_configuration_update_params.py @@ -82,6 +82,12 @@ class ConfigurationUpdateParamsFeatures(TypedDict): """ Information about canceling subscriptions in the portal. """ + subscription_pause: NotRequired[ + "ConfigurationUpdateParamsFeaturesSubscriptionPause" + ] + """ + Information about pausing subscriptions in the portal. + """ subscription_update: NotRequired[ "ConfigurationUpdateParamsFeaturesSubscriptionUpdate" ] @@ -163,6 +169,45 @@ class ConfigurationUpdateParamsFeaturesSubscriptionCancelCancellationReason( """ +class ConfigurationUpdateParamsFeaturesSubscriptionPause(TypedDict): + duration: NotRequired[ + "ConfigurationUpdateParamsFeaturesSubscriptionPauseDuration" + ] + """ + Controls how long a subscription can be paused. Defaults to `interval_options` with a single one-month option. + """ + enabled: NotRequired[bool] + """ + Whether the feature is enabled. Customers can only pause subscriptions in the [redesigned customer portal](https://docs.stripe.com/customer-management). + """ + + +class ConfigurationUpdateParamsFeaturesSubscriptionPauseDuration(TypedDict): + interval_options: NotRequired[ + "Literal['']|List[ConfigurationUpdateParamsFeaturesSubscriptionPauseDurationIntervalOption]" + ] + """ + The preset pause durations customers can choose from. Required when `type` is `interval_options`. + """ + type: Union[Literal["indefinite", "interval_options"], str] + """ + Whether subscriptions can be paused indefinitely or for a preset duration. + """ + + +class ConfigurationUpdateParamsFeaturesSubscriptionPauseDurationIntervalOption( + TypedDict, +): + interval: Union[Literal["day", "month", "week", "year"], str] + """ + Specifies the pause duration unit. Either `day`, `week`, `month`, or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals in the pause duration. Defaults to 1. The maximum duration is three years. + """ + + class ConfigurationUpdateParamsFeaturesSubscriptionUpdate(TypedDict): billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|str"] """ diff --git a/stripe/params/billing_portal/_session_create_params.py b/stripe/params/billing_portal/_session_create_params.py index 6e712458a..7b0c97f41 100644 --- a/stripe/params/billing_portal/_session_create_params.py +++ b/stripe/params/billing_portal/_session_create_params.py @@ -6,6 +6,10 @@ class SessionCreateParams(RequestOptions): + after_expiration: NotRequired["SessionCreateParamsAfterExpiration"] + """ + Behavior after the portal session expires. + """ configuration: NotRequired[str] """ The ID of an existing [configuration](https://docs.stripe.com/api/customer_portal/configurations) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. @@ -42,6 +46,26 @@ class SessionCreateParams(RequestOptions): """ +class SessionCreateParamsAfterExpiration(TypedDict): + customer_login: NotRequired[ + "SessionCreateParamsAfterExpirationCustomerLogin" + ] + """ + Configuration for authenticating the customer after the session expires. + """ + type: Union[Literal["customer_login"], str] + """ + The behavior to apply when the session expires. + """ + + +class SessionCreateParamsAfterExpirationCustomerLogin(TypedDict): + expires_at: NotRequired[int] + """ + The Unix timestamp after which the customer can no longer recover this session. Leave unset to allow recovery without a deadline. + """ + + class SessionCreateParamsFlowData(TypedDict): after_completion: NotRequired["SessionCreateParamsFlowDataAfterCompletion"] """ @@ -53,6 +77,12 @@ class SessionCreateParamsFlowData(TypedDict): """ Configuration when `flow_data.type=subscription_cancel`. """ + subscription_pause: NotRequired[ + "SessionCreateParamsFlowDataSubscriptionPause" + ] + """ + Configuration when `flow_data.type=subscription_pause`. + """ subscription_update: NotRequired[ "SessionCreateParamsFlowDataSubscriptionUpdate" ] @@ -70,6 +100,7 @@ class SessionCreateParamsFlowData(TypedDict): "customer_update", "payment_method_update", "subscription_cancel", + "subscription_pause", "subscription_update", "subscription_update_confirm", ], @@ -148,6 +179,13 @@ class SessionCreateParamsFlowDataSubscriptionCancelRetentionCouponOffer( """ +class SessionCreateParamsFlowDataSubscriptionPause(TypedDict): + subscription: str + """ + The ID of the subscription to be paused. + """ + + class SessionCreateParamsFlowDataSubscriptionUpdate(TypedDict): subscription: str """ diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index 79199601b..8a87254b6 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -134,6 +134,7 @@ SessionCreateParamsSubscriptionDataBillingMode as SessionCreateParamsSubscriptionDataBillingMode, SessionCreateParamsSubscriptionDataBillingModeFlexible as SessionCreateParamsSubscriptionDataBillingModeFlexible, SessionCreateParamsSubscriptionDataInvoiceSettings as SessionCreateParamsSubscriptionDataInvoiceSettings, + SessionCreateParamsSubscriptionDataInvoiceSettingsCustomField as SessionCreateParamsSubscriptionDataInvoiceSettingsCustomField, SessionCreateParamsSubscriptionDataInvoiceSettingsIssuer as SessionCreateParamsSubscriptionDataInvoiceSettingsIssuer, SessionCreateParamsSubscriptionDataPendingInvoiceItemInterval as SessionCreateParamsSubscriptionDataPendingInvoiceItemInterval, SessionCreateParamsSubscriptionDataTransferData as SessionCreateParamsSubscriptionDataTransferData, @@ -168,6 +169,7 @@ SessionModifyParamsLineItemPriceDataProductData as SessionModifyParamsLineItemPriceDataProductData, SessionModifyParamsLineItemPriceDataProductDataTaxDetails as SessionModifyParamsLineItemPriceDataProductDataTaxDetails, SessionModifyParamsLineItemPriceDataRecurring as SessionModifyParamsLineItemPriceDataRecurring, + SessionModifyParamsPaymentIntentData as SessionModifyParamsPaymentIntentData, SessionModifyParamsShippingOption as SessionModifyParamsShippingOption, SessionModifyParamsShippingOptionShippingRateData as SessionModifyParamsShippingOptionShippingRateData, SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimate as SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimate, @@ -190,6 +192,7 @@ SessionUpdateParamsLineItemPriceDataProductData as SessionUpdateParamsLineItemPriceDataProductData, SessionUpdateParamsLineItemPriceDataProductDataTaxDetails as SessionUpdateParamsLineItemPriceDataProductDataTaxDetails, SessionUpdateParamsLineItemPriceDataRecurring as SessionUpdateParamsLineItemPriceDataRecurring, + SessionUpdateParamsPaymentIntentData as SessionUpdateParamsPaymentIntentData, SessionUpdateParamsShippingOption as SessionUpdateParamsShippingOption, SessionUpdateParamsShippingOptionShippingRateData as SessionUpdateParamsShippingOptionShippingRateData, SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimate as SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimate, @@ -717,6 +720,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsSubscriptionDataInvoiceSettingsCustomField": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsSubscriptionDataInvoiceSettingsIssuer": ( "stripe.params.checkout._session_create_params", False, @@ -813,6 +820,10 @@ "stripe.params.checkout._session_modify_params", False, ), + "SessionModifyParamsPaymentIntentData": ( + "stripe.params.checkout._session_modify_params", + False, + ), "SessionModifyParamsShippingOption": ( "stripe.params.checkout._session_modify_params", False, @@ -885,6 +896,10 @@ "stripe.params.checkout._session_update_params", False, ), + "SessionUpdateParamsPaymentIntentData": ( + "stripe.params.checkout._session_update_params", + False, + ), "SessionUpdateParamsShippingOption": ( "stripe.params.checkout._session_update_params", False, diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index 25f5ad922..a10812211 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -120,7 +120,7 @@ class SessionCreateParams(RequestOptions): """ currency: NotRequired[str] """ - 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). Required in `setup` mode when `payment_method_types` is not set. + 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). Required in `setup` mode when `allowed_payment_method_types` is not set. """ custom_fields: NotRequired[List["SessionCreateParamsCustomField"]] """ @@ -268,7 +268,7 @@ class SessionCreateParams(RequestOptions): For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. """ locale: NotRequired[ - "Literal['auto', 'bg', 'cs', 'da', 'de', 'el', 'en', 'en-GB', 'es', 'es-419', 'et', 'fi', 'fil', 'fr', 'fr-CA', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'ms', 'mt', 'nb', 'nl', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'sv', 'th', 'tr', 'vi', 'zh', 'zh-HK', 'zh-TW']|str" + "Literal['auto', 'bg', 'cs', 'da', 'de', 'el', 'en', 'en-GB', 'es', 'es-419', 'et', 'fi', 'fil', 'fr', 'fr-CA', 'hi-IN', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'ms', 'mt', 'nb', 'nl', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'sv', 'th', 'tr', 'vi', 'zh', 'zh-HK', 'zh-TW']|str" ] """ The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. @@ -842,7 +842,7 @@ class SessionCreateParamsLineItem(TypedDict): """ price_data: NotRequired["SessionCreateParamsLineItemPriceData"] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline, for [dynamic pricing](https://docs.stripe.com/products-prices/how-products-and-prices-work#inline-pricing) when the amount isn't known ahead of time. One of `price` or `price_data` is required when creating a new line item. """ quantity: NotRequired[int] """ @@ -2268,7 +2268,7 @@ class SessionCreateParamsPaymentMethodOptionsPix(TypedDict): """ expires_after_seconds: NotRequired[int] """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + The number of seconds after PaymentIntent confirmation when the Pix expires (between 60 and 1209600, inclusive). If unspecified, defaults to 14400 seconds (4 hours). """ mandate_options: NotRequired[ "SessionCreateParamsPaymentMethodOptionsPixMandateOptions" @@ -3121,6 +3121,24 @@ class SessionCreateParamsSubscriptionDataBillingModeFlexible(TypedDict): class SessionCreateParamsSubscriptionDataInvoiceSettings(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + """ + custom_fields: NotRequired[ + "Literal['']|List[SessionCreateParamsSubscriptionDataInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired[str] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired[ "SessionCreateParamsSubscriptionDataInvoiceSettingsIssuer" ] @@ -3129,6 +3147,17 @@ class SessionCreateParamsSubscriptionDataInvoiceSettings(TypedDict): """ +class SessionCreateParamsSubscriptionDataInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + class SessionCreateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ diff --git a/stripe/params/checkout/_session_modify_params.py b/stripe/params/checkout/_session_modify_params.py index fa0dc6ba4..bcdc74966 100644 --- a/stripe/params/checkout/_session_modify_params.py +++ b/stripe/params/checkout/_session_modify_params.py @@ -40,6 +40,12 @@ class SessionModifyParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ + payment_intent_data: NotRequired["SessionModifyParamsPaymentIntentData"] + """ + A subset of parameters to apply to the PaymentIntent for Checkout Sessions in `payment` mode. + + You can only update these parameters when `ui_mode` is `elements` and while the session is active. If the PaymentIntent requires customer action or confirmation, updating these parameters abandons the current payment attempt and returns the PaymentIntent to `requires_payment_method`. You can't update these parameters after the PaymentIntent begins processing, requires capture, succeeds, or is canceled. + """ shipping_options: NotRequired[ "Literal['']|List[SessionModifyParamsShippingOption]" ] @@ -118,7 +124,7 @@ class SessionModifyParamsLineItem(TypedDict): """ price_data: NotRequired["SessionModifyParamsLineItemPriceData"] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required when creating a new line item. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline, for [dynamic pricing](https://docs.stripe.com/products-prices/how-products-and-prices-work#inline-pricing) when the amount isn't known ahead of time. One of `price` or `price_data` is required when creating a new line item. """ quantity: NotRequired[int] """ @@ -235,6 +241,50 @@ class SessionModifyParamsLineItemPriceDataRecurring(TypedDict): """ +class SessionModifyParamsPaymentIntentData(TypedDict): + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. Pass an empty string to clear a previously configured value. + """ + metadata: NotRequired[ + "Literal['']|Dict[str, str]|UntypedStripeObject[str]" + ] + """ + Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['off_session', 'on_session']|str" + ] + """ + Indicates that you intend to [make future payments](https://docs.stripe.com/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. + + When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. + + When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. + + If a Customer has been provided or Checkout creates a new Customer, Checkout will attach the payment method to the Customer. + + If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + + When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + + You must wrap any Checkout Session update that mutates `setup_future_usage` in [`runServerUpdate`](https://docs.stripe.com/js/custom_checkout/run_server_update) and await it before continuing with the payment. + Pass an empty string to remove a previously supplied configuration. + """ + statement_descriptor: NotRequired["Literal['']|str"] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + Pass an empty string to clear a previously configured value. + """ + statement_descriptor_suffix: NotRequired["Literal['']|str"] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Pass an empty string to clear a previously configured value. + """ + + class SessionModifyParamsShippingOption(TypedDict): shipping_rate: NotRequired[str] """ diff --git a/stripe/params/checkout/_session_update_params.py b/stripe/params/checkout/_session_update_params.py index 17b2c7f9e..18d6e8a59 100644 --- a/stripe/params/checkout/_session_update_params.py +++ b/stripe/params/checkout/_session_update_params.py @@ -39,6 +39,12 @@ class SessionUpdateParams(TypedDict): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ + payment_intent_data: NotRequired["SessionUpdateParamsPaymentIntentData"] + """ + A subset of parameters to apply to the PaymentIntent for Checkout Sessions in `payment` mode. + + You can only update these parameters when `ui_mode` is `elements` and while the session is active. If the PaymentIntent requires customer action or confirmation, updating these parameters abandons the current payment attempt and returns the PaymentIntent to `requires_payment_method`. You can't update these parameters after the PaymentIntent begins processing, requires capture, succeeds, or is canceled. + """ shipping_options: NotRequired[ "Literal['']|List[SessionUpdateParamsShippingOption]" ] @@ -117,7 +123,7 @@ class SessionUpdateParamsLineItem(TypedDict): """ price_data: NotRequired["SessionUpdateParamsLineItemPriceData"] """ - Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required when creating a new line item. + Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline, for [dynamic pricing](https://docs.stripe.com/products-prices/how-products-and-prices-work#inline-pricing) when the amount isn't known ahead of time. One of `price` or `price_data` is required when creating a new line item. """ quantity: NotRequired[int] """ @@ -234,6 +240,50 @@ class SessionUpdateParamsLineItemPriceDataRecurring(TypedDict): """ +class SessionUpdateParamsPaymentIntentData(TypedDict): + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. Pass an empty string to clear a previously configured value. + """ + metadata: NotRequired[ + "Literal['']|Dict[str, str]|UntypedStripeObject[str]" + ] + """ + Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['off_session', 'on_session']|str" + ] + """ + Indicates that you intend to [make future payments](https://docs.stripe.com/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. + + When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. + + When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. + + If a Customer has been provided or Checkout creates a new Customer, Checkout will attach the payment method to the Customer. + + If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + + When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + + You must wrap any Checkout Session update that mutates `setup_future_usage` in [`runServerUpdate`](https://docs.stripe.com/js/custom_checkout/run_server_update) and await it before continuing with the payment. + Pass an empty string to remove a previously supplied configuration. + """ + statement_descriptor: NotRequired["Literal['']|str"] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + Pass an empty string to clear a previously configured value. + """ + statement_descriptor_suffix: NotRequired["Literal['']|str"] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + Pass an empty string to clear a previously configured value. + """ + + class SessionUpdateParamsShippingOption(TypedDict): shipping_rate: NotRequired[str] """ diff --git a/stripe/params/issuing/_card_modify_params.py b/stripe/params/issuing/_card_modify_params.py index 83b4f4caf..4c1590052 100644 --- a/stripe/params/issuing/_card_modify_params.py +++ b/stripe/params/issuing/_card_modify_params.py @@ -15,6 +15,10 @@ class CardModifyParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + financial_account: NotRequired[str] + """ + The new financial account ID the card will be associated with. This field allows a card to be reassigned to a different financial account. + """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" ] diff --git a/stripe/params/issuing/_card_update_params.py b/stripe/params/issuing/_card_update_params.py index 82e82f003..371d0d49b 100644 --- a/stripe/params/issuing/_card_update_params.py +++ b/stripe/params/issuing/_card_update_params.py @@ -14,6 +14,10 @@ class CardUpdateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ + financial_account: NotRequired[str] + """ + The new financial account ID the card will be associated with. This field allows a card to be reassigned to a different financial account. + """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" ] diff --git a/stripe/params/tax/__init__.py b/stripe/params/tax/__init__.py index 4eec90bd0..5000a07c1 100644 --- a/stripe/params/tax/__init__.py +++ b/stripe/params/tax/__init__.py @@ -70,6 +70,7 @@ RegistrationCreateParamsCountryOptionsBj as RegistrationCreateParamsCountryOptionsBj, RegistrationCreateParamsCountryOptionsBs as RegistrationCreateParamsCountryOptionsBs, RegistrationCreateParamsCountryOptionsBsStandard as RegistrationCreateParamsCountryOptionsBsStandard, + RegistrationCreateParamsCountryOptionsBw as RegistrationCreateParamsCountryOptionsBw, RegistrationCreateParamsCountryOptionsBy as RegistrationCreateParamsCountryOptionsBy, RegistrationCreateParamsCountryOptionsCa as RegistrationCreateParamsCountryOptionsCa, RegistrationCreateParamsCountryOptionsCaProvinceStandard as RegistrationCreateParamsCountryOptionsCaProvinceStandard, @@ -77,6 +78,7 @@ RegistrationCreateParamsCountryOptionsCdStandard as RegistrationCreateParamsCountryOptionsCdStandard, RegistrationCreateParamsCountryOptionsCh as RegistrationCreateParamsCountryOptionsCh, RegistrationCreateParamsCountryOptionsChStandard as RegistrationCreateParamsCountryOptionsChStandard, + RegistrationCreateParamsCountryOptionsCi as RegistrationCreateParamsCountryOptionsCi, RegistrationCreateParamsCountryOptionsCl as RegistrationCreateParamsCountryOptionsCl, RegistrationCreateParamsCountryOptionsCm as RegistrationCreateParamsCountryOptionsCm, RegistrationCreateParamsCountryOptionsCo as RegistrationCreateParamsCountryOptionsCo, @@ -105,6 +107,7 @@ RegistrationCreateParamsCountryOptionsGb as RegistrationCreateParamsCountryOptionsGb, RegistrationCreateParamsCountryOptionsGbStandard as RegistrationCreateParamsCountryOptionsGbStandard, RegistrationCreateParamsCountryOptionsGe as RegistrationCreateParamsCountryOptionsGe, + RegistrationCreateParamsCountryOptionsGh as RegistrationCreateParamsCountryOptionsGh, RegistrationCreateParamsCountryOptionsGn as RegistrationCreateParamsCountryOptionsGn, RegistrationCreateParamsCountryOptionsGnStandard as RegistrationCreateParamsCountryOptionsGnStandard, RegistrationCreateParamsCountryOptionsGr as RegistrationCreateParamsCountryOptionsGr, @@ -146,6 +149,7 @@ RegistrationCreateParamsCountryOptionsMrStandard as RegistrationCreateParamsCountryOptionsMrStandard, RegistrationCreateParamsCountryOptionsMt as RegistrationCreateParamsCountryOptionsMt, RegistrationCreateParamsCountryOptionsMtStandard as RegistrationCreateParamsCountryOptionsMtStandard, + RegistrationCreateParamsCountryOptionsMu as RegistrationCreateParamsCountryOptionsMu, RegistrationCreateParamsCountryOptionsMx as RegistrationCreateParamsCountryOptionsMx, RegistrationCreateParamsCountryOptionsMy as RegistrationCreateParamsCountryOptionsMy, RegistrationCreateParamsCountryOptionsNg as RegistrationCreateParamsCountryOptionsNg, @@ -203,6 +207,7 @@ RegistrationCreateParamsCountryOptionsUsStateSalesTax as RegistrationCreateParamsCountryOptionsUsStateSalesTax, RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection as RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection, RegistrationCreateParamsCountryOptionsUsTourismTax as RegistrationCreateParamsCountryOptionsUsTourismTax, + RegistrationCreateParamsCountryOptionsUsUtilityUsersTax as RegistrationCreateParamsCountryOptionsUsUtilityUsersTax, RegistrationCreateParamsCountryOptionsUy as RegistrationCreateParamsCountryOptionsUy, RegistrationCreateParamsCountryOptionsUyStandard as RegistrationCreateParamsCountryOptionsUyStandard, RegistrationCreateParamsCountryOptionsUz as RegistrationCreateParamsCountryOptionsUz, @@ -453,6 +458,10 @@ "stripe.params.tax._registration_create_params", False, ), + "RegistrationCreateParamsCountryOptionsBw": ( + "stripe.params.tax._registration_create_params", + False, + ), "RegistrationCreateParamsCountryOptionsBy": ( "stripe.params.tax._registration_create_params", False, @@ -481,6 +490,10 @@ "stripe.params.tax._registration_create_params", False, ), + "RegistrationCreateParamsCountryOptionsCi": ( + "stripe.params.tax._registration_create_params", + False, + ), "RegistrationCreateParamsCountryOptionsCl": ( "stripe.params.tax._registration_create_params", False, @@ -593,6 +606,10 @@ "stripe.params.tax._registration_create_params", False, ), + "RegistrationCreateParamsCountryOptionsGh": ( + "stripe.params.tax._registration_create_params", + False, + ), "RegistrationCreateParamsCountryOptionsGn": ( "stripe.params.tax._registration_create_params", False, @@ -757,6 +774,10 @@ "stripe.params.tax._registration_create_params", False, ), + "RegistrationCreateParamsCountryOptionsMu": ( + "stripe.params.tax._registration_create_params", + False, + ), "RegistrationCreateParamsCountryOptionsMx": ( "stripe.params.tax._registration_create_params", False, @@ -985,6 +1006,10 @@ "stripe.params.tax._registration_create_params", False, ), + "RegistrationCreateParamsCountryOptionsUsUtilityUsersTax": ( + "stripe.params.tax._registration_create_params", + False, + ), "RegistrationCreateParamsCountryOptionsUy": ( "stripe.params.tax._registration_create_params", False, diff --git a/stripe/params/tax/_calculation_create_params.py b/stripe/params/tax/_calculation_create_params.py index 44ea1631e..121a9bbc8 100644 --- a/stripe/params/tax/_calculation_create_params.py +++ b/stripe/params/tax/_calculation_create_params.py @@ -103,7 +103,9 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -117,6 +119,7 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "br_cnpj", "br_cpf", "bs_tin", + "bw_vat", "by_tin", "ca_bn", "ca_gst_hst", @@ -127,12 +130,14 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "cd_nif", "ch_uid", "ch_vat", + "ci_vat", "cl_tin", "cm_niu", "cn_tin", "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -142,8 +147,12 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", + "gh_tin", "gi_tin", "gn_nif", "hk_br", @@ -153,6 +162,7 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -168,23 +178,28 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -194,12 +209,15 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -217,7 +235,7 @@ class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): str, ] """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `gb_vat`, `ge_vat`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_acn`, `au_arn`, `au_wpn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `bw_vat`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `ci_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `cz_dic`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `fo_vat`, `fr_siren`, `fr_siret`, `fr_spi`, `gb_vat`, `ge_vat`, `gh_tin`, `gi_tin`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `ic_nif`, `id_npwp`, `il_vat`, `in_gst`, `is_kt`, `is_vat`, `it_cf`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `lk_vat`, `ma_vat`, `md_cf`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mu_vat`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `mz_nuit`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_bn`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `pl_nip`, `pt_nif`, `py_ruc`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sm_coe`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tt_bir`, `tt_vat`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` """ value: str """ diff --git a/stripe/params/tax/_registration_create_params.py b/stripe/params/tax/_registration_create_params.py index 38f814bfa..ceab9df22 100644 --- a/stripe/params/tax/_registration_create_params.py +++ b/stripe/params/tax/_registration_create_params.py @@ -108,6 +108,10 @@ class RegistrationCreateParamsCountryOptions( """ Options for the registration in BS. """ + bw: NotRequired["RegistrationCreateParamsCountryOptionsBw"] + """ + Options for the registration in BW. + """ by: NotRequired["RegistrationCreateParamsCountryOptionsBy"] """ Options for the registration in BY. @@ -124,6 +128,10 @@ class RegistrationCreateParamsCountryOptions( """ Options for the registration in CH. """ + ci: NotRequired["RegistrationCreateParamsCountryOptionsCi"] + """ + Options for the registration in CI. + """ cl: NotRequired["RegistrationCreateParamsCountryOptionsCl"] """ Options for the registration in CL. @@ -196,6 +204,10 @@ class RegistrationCreateParamsCountryOptions( """ Options for the registration in GE. """ + gh: NotRequired["RegistrationCreateParamsCountryOptionsGh"] + """ + Options for the registration in GH. + """ gn: NotRequired["RegistrationCreateParamsCountryOptionsGn"] """ Options for the registration in GN. @@ -292,6 +304,10 @@ class RegistrationCreateParamsCountryOptions( """ Options for the registration in MT. """ + mu: NotRequired["RegistrationCreateParamsCountryOptionsMu"] + """ + Options for the registration in MU. + """ mx: NotRequired["RegistrationCreateParamsCountryOptionsMx"] """ Options for the registration in MX. @@ -739,6 +755,13 @@ class RegistrationCreateParamsCountryOptionsBsStandard(TypedDict): """ +class RegistrationCreateParamsCountryOptionsBw(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + class RegistrationCreateParamsCountryOptionsBy(TypedDict): type: Literal["simplified"] """ @@ -806,6 +829,13 @@ class RegistrationCreateParamsCountryOptionsChStandard(TypedDict): """ +class RegistrationCreateParamsCountryOptionsCi(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + class RegistrationCreateParamsCountryOptionsCl(TypedDict): type: Literal["simplified"] """ @@ -1062,6 +1092,13 @@ class RegistrationCreateParamsCountryOptionsGe(TypedDict): """ +class RegistrationCreateParamsCountryOptionsGh(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + class RegistrationCreateParamsCountryOptionsGn(TypedDict): standard: NotRequired["RegistrationCreateParamsCountryOptionsGnStandard"] """ @@ -1439,6 +1476,13 @@ class RegistrationCreateParamsCountryOptionsMtStandard(TypedDict): """ +class RegistrationCreateParamsCountryOptionsMu(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + class RegistrationCreateParamsCountryOptionsMx(TypedDict): type: Literal["simplified"] """ @@ -1898,6 +1942,7 @@ class RegistrationCreateParamsCountryOptionsUs(TypedDict): Literal[ "admissions_tax", "attendance_tax", + "digital_excise_tax", "entertainment_tax", "gross_receipts_tax", "hospitality_tax", @@ -1911,12 +1956,19 @@ class RegistrationCreateParamsCountryOptionsUs(TypedDict): "state_retail_delivery_fee", "state_sales_tax", "tourism_tax", + "utility_users_tax", ], str, ] """ Type of registration to be created in the US. """ + utility_users_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsUtilityUsersTax" + ] + """ + Options for the utility users tax registration. + """ class RegistrationCreateParamsCountryOptionsUsAdmissionsTax(TypedDict): @@ -2008,7 +2060,7 @@ class RegistrationCreateParamsCountryOptionsUsStateSalesTax(TypedDict): class RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict): jurisdiction: NotRequired[str] """ - A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City). + A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. """ type: Union[ Literal[ @@ -2030,6 +2082,13 @@ class RegistrationCreateParamsCountryOptionsUsTourismTax(TypedDict): """ +class RegistrationCreateParamsCountryOptionsUsUtilityUsersTax(TypedDict): + jurisdiction: str + """ + A jurisdiction code representing the [local jurisdiction](https://docs.stripe.com/tax/registering?type=utility_users_tax#registration-types). + """ + + class RegistrationCreateParamsCountryOptionsUy(TypedDict): standard: NotRequired["RegistrationCreateParamsCountryOptionsUyStandard"] """ diff --git a/stripe/params/terminal/__init__.py b/stripe/params/terminal/__init__.py index a6b541217..ff89bdd40 100644 --- a/stripe/params/terminal/__init__.py +++ b/stripe/params/terminal/__init__.py @@ -10,9 +10,11 @@ ConfigurationCreateParamsBbposWiseposE as ConfigurationCreateParamsBbposWiseposE, ConfigurationCreateParamsCellular as ConfigurationCreateParamsCellular, ConfigurationCreateParamsOffline as ConfigurationCreateParamsOffline, + ConfigurationCreateParamsReaderSecurity as ConfigurationCreateParamsReaderSecurity, ConfigurationCreateParamsRebootWindow as ConfigurationCreateParamsRebootWindow, ConfigurationCreateParamsStripeS700 as ConfigurationCreateParamsStripeS700, ConfigurationCreateParamsStripeS710 as ConfigurationCreateParamsStripeS710, + ConfigurationCreateParamsStripeT600 as ConfigurationCreateParamsStripeT600, ConfigurationCreateParamsTipping as ConfigurationCreateParamsTipping, ConfigurationCreateParamsTippingAed as ConfigurationCreateParamsTippingAed, ConfigurationCreateParamsTippingAud as ConfigurationCreateParamsTippingAud, @@ -57,9 +59,11 @@ ConfigurationModifyParamsBbposWiseposE as ConfigurationModifyParamsBbposWiseposE, ConfigurationModifyParamsCellular as ConfigurationModifyParamsCellular, ConfigurationModifyParamsOffline as ConfigurationModifyParamsOffline, + ConfigurationModifyParamsReaderSecurity as ConfigurationModifyParamsReaderSecurity, ConfigurationModifyParamsRebootWindow as ConfigurationModifyParamsRebootWindow, ConfigurationModifyParamsStripeS700 as ConfigurationModifyParamsStripeS700, ConfigurationModifyParamsStripeS710 as ConfigurationModifyParamsStripeS710, + ConfigurationModifyParamsStripeT600 as ConfigurationModifyParamsStripeT600, ConfigurationModifyParamsTipping as ConfigurationModifyParamsTipping, ConfigurationModifyParamsTippingAed as ConfigurationModifyParamsTippingAed, ConfigurationModifyParamsTippingAud as ConfigurationModifyParamsTippingAud, @@ -101,9 +105,11 @@ ConfigurationUpdateParamsBbposWiseposE as ConfigurationUpdateParamsBbposWiseposE, ConfigurationUpdateParamsCellular as ConfigurationUpdateParamsCellular, ConfigurationUpdateParamsOffline as ConfigurationUpdateParamsOffline, + ConfigurationUpdateParamsReaderSecurity as ConfigurationUpdateParamsReaderSecurity, ConfigurationUpdateParamsRebootWindow as ConfigurationUpdateParamsRebootWindow, ConfigurationUpdateParamsStripeS700 as ConfigurationUpdateParamsStripeS700, ConfigurationUpdateParamsStripeS710 as ConfigurationUpdateParamsStripeS710, + ConfigurationUpdateParamsStripeT600 as ConfigurationUpdateParamsStripeT600, ConfigurationUpdateParamsTipping as ConfigurationUpdateParamsTipping, ConfigurationUpdateParamsTippingAed as ConfigurationUpdateParamsTippingAed, ConfigurationUpdateParamsTippingAud as ConfigurationUpdateParamsTippingAud, @@ -262,6 +268,10 @@ "stripe.params.terminal._configuration_create_params", False, ), + "ConfigurationCreateParamsReaderSecurity": ( + "stripe.params.terminal._configuration_create_params", + False, + ), "ConfigurationCreateParamsRebootWindow": ( "stripe.params.terminal._configuration_create_params", False, @@ -274,6 +284,10 @@ "stripe.params.terminal._configuration_create_params", False, ), + "ConfigurationCreateParamsStripeT600": ( + "stripe.params.terminal._configuration_create_params", + False, + ), "ConfigurationCreateParamsTipping": ( "stripe.params.terminal._configuration_create_params", False, @@ -426,6 +440,10 @@ "stripe.params.terminal._configuration_modify_params", False, ), + "ConfigurationModifyParamsReaderSecurity": ( + "stripe.params.terminal._configuration_modify_params", + False, + ), "ConfigurationModifyParamsRebootWindow": ( "stripe.params.terminal._configuration_modify_params", False, @@ -438,6 +456,10 @@ "stripe.params.terminal._configuration_modify_params", False, ), + "ConfigurationModifyParamsStripeT600": ( + "stripe.params.terminal._configuration_modify_params", + False, + ), "ConfigurationModifyParamsTipping": ( "stripe.params.terminal._configuration_modify_params", False, @@ -586,6 +608,10 @@ "stripe.params.terminal._configuration_update_params", False, ), + "ConfigurationUpdateParamsReaderSecurity": ( + "stripe.params.terminal._configuration_update_params", + False, + ), "ConfigurationUpdateParamsRebootWindow": ( "stripe.params.terminal._configuration_update_params", False, @@ -598,6 +624,10 @@ "stripe.params.terminal._configuration_update_params", False, ), + "ConfigurationUpdateParamsStripeT600": ( + "stripe.params.terminal._configuration_update_params", + False, + ), "ConfigurationUpdateParamsTipping": ( "stripe.params.terminal._configuration_update_params", False, diff --git a/stripe/params/terminal/_configuration_create_params.py b/stripe/params/terminal/_configuration_create_params.py index ab98b3b3a..91ec44484 100644 --- a/stripe/params/terminal/_configuration_create_params.py +++ b/stripe/params/terminal/_configuration_create_params.py @@ -30,6 +30,12 @@ class ConfigurationCreateParams(RequestOptions): """ Configurations for collecting transactions offline. """ + reader_security: NotRequired[ + "Literal['']|ConfigurationCreateParamsReaderSecurity" + ] + """ + Configurations for reader security settings. + """ reboot_window: NotRequired["ConfigurationCreateParamsRebootWindow"] """ Reboot time settings for readers. that support customized reboot time configuration. @@ -42,6 +48,10 @@ class ConfigurationCreateParams(RequestOptions): """ An object containing device type specific settings for Stripe S710 readers. """ + stripe_t600: NotRequired["ConfigurationCreateParamsStripeT600"] + """ + An object containing device type specific settings for Stripe T600 readers. + """ tipping: NotRequired["Literal['']|ConfigurationCreateParamsTipping"] """ Tipping configurations for readers that support on-reader tips. @@ -100,6 +110,13 @@ class ConfigurationCreateParamsOffline(TypedDict): """ +class ConfigurationCreateParamsReaderSecurity(TypedDict): + admin_menu_passcode: NotRequired["Literal['']|str"] + """ + Passcode used to access a reader's admin menu. + """ + + class ConfigurationCreateParamsRebootWindow(TypedDict): end_hour: int """ @@ -125,6 +142,13 @@ class ConfigurationCreateParamsStripeS710(TypedDict): """ +class ConfigurationCreateParamsStripeT600(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you want to display on the reader. + """ + + class ConfigurationCreateParamsTipping(TypedDict): aed: NotRequired["ConfigurationCreateParamsTippingAed"] """ diff --git a/stripe/params/terminal/_configuration_modify_params.py b/stripe/params/terminal/_configuration_modify_params.py index 5e1566b42..9809dd44d 100644 --- a/stripe/params/terminal/_configuration_modify_params.py +++ b/stripe/params/terminal/_configuration_modify_params.py @@ -34,6 +34,12 @@ class ConfigurationModifyParams(RequestOptions): """ Configurations for collecting transactions offline. """ + reader_security: NotRequired[ + "Literal['']|ConfigurationModifyParamsReaderSecurity" + ] + """ + Configurations for reader security settings. + """ reboot_window: NotRequired[ "Literal['']|ConfigurationModifyParamsRebootWindow" ] @@ -48,6 +54,10 @@ class ConfigurationModifyParams(RequestOptions): """ An object containing device type specific settings for Stripe S710 readers. """ + stripe_t600: NotRequired["Literal['']|ConfigurationModifyParamsStripeT600"] + """ + An object containing device type specific settings for Stripe T600 readers. + """ tipping: NotRequired["Literal['']|ConfigurationModifyParamsTipping"] """ Tipping configurations for readers that support on-reader tips. @@ -116,6 +126,13 @@ class ConfigurationModifyParamsOffline(TypedDict): """ +class ConfigurationModifyParamsReaderSecurity(TypedDict): + admin_menu_passcode: NotRequired["Literal['']|str"] + """ + Passcode used to access a reader's admin menu. + """ + + class ConfigurationModifyParamsRebootWindow(TypedDict): end_hour: int """ @@ -141,6 +158,13 @@ class ConfigurationModifyParamsStripeS710(TypedDict): """ +class ConfigurationModifyParamsStripeT600(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you want to display on the reader. + """ + + class ConfigurationModifyParamsTipping(TypedDict): aed: NotRequired["ConfigurationModifyParamsTippingAed"] """ diff --git a/stripe/params/terminal/_configuration_update_params.py b/stripe/params/terminal/_configuration_update_params.py index bb627189b..46a416a48 100644 --- a/stripe/params/terminal/_configuration_update_params.py +++ b/stripe/params/terminal/_configuration_update_params.py @@ -33,6 +33,12 @@ class ConfigurationUpdateParams(TypedDict): """ Configurations for collecting transactions offline. """ + reader_security: NotRequired[ + "Literal['']|ConfigurationUpdateParamsReaderSecurity" + ] + """ + Configurations for reader security settings. + """ reboot_window: NotRequired[ "Literal['']|ConfigurationUpdateParamsRebootWindow" ] @@ -47,6 +53,10 @@ class ConfigurationUpdateParams(TypedDict): """ An object containing device type specific settings for Stripe S710 readers. """ + stripe_t600: NotRequired["Literal['']|ConfigurationUpdateParamsStripeT600"] + """ + An object containing device type specific settings for Stripe T600 readers. + """ tipping: NotRequired["Literal['']|ConfigurationUpdateParamsTipping"] """ Tipping configurations for readers that support on-reader tips. @@ -115,6 +125,13 @@ class ConfigurationUpdateParamsOffline(TypedDict): """ +class ConfigurationUpdateParamsReaderSecurity(TypedDict): + admin_menu_passcode: NotRequired["Literal['']|str"] + """ + Passcode used to access a reader's admin menu. + """ + + class ConfigurationUpdateParamsRebootWindow(TypedDict): end_hour: int """ @@ -140,6 +157,13 @@ class ConfigurationUpdateParamsStripeS710(TypedDict): """ +class ConfigurationUpdateParamsStripeT600(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you want to display on the reader. + """ + + class ConfigurationUpdateParamsTipping(TypedDict): aed: NotRequired["ConfigurationUpdateParamsTippingAed"] """ diff --git a/stripe/params/terminal/_reader_list_params.py b/stripe/params/terminal/_reader_list_params.py index becba0d89..caeaa5c8f 100644 --- a/stripe/params/terminal/_reader_list_params.py +++ b/stripe/params/terminal/_reader_list_params.py @@ -7,7 +7,7 @@ class ReaderListParams(RequestOptions): device_type: NotRequired[ - "Literal['bbpos_chipper2x', 'bbpos_wisepad3', 'bbpos_wisepos_e', 'mobile_phone_reader', 'simulated_stripe_s700', 'simulated_stripe_s710', 'simulated_verifone_m425', 'simulated_verifone_p630', 'simulated_verifone_ux700', 'simulated_verifone_v660p', 'simulated_wisepos_e', 'stripe_m2', 'stripe_s700', 'stripe_s710', 'verifone_P400', 'verifone_m425', 'verifone_p630', 'verifone_ux700', 'verifone_v660p']|str" + "Literal['bbpos_chipper2x', 'bbpos_wisepad3', 'bbpos_wisepos_e', 'mobile_phone_reader', 'simulated_stripe_s700', 'simulated_stripe_s710', 'simulated_stripe_t600', 'simulated_verifone_m425', 'simulated_verifone_p630', 'simulated_verifone_ux700', 'simulated_verifone_v660p', 'simulated_wisepos_e', 'stripe_m2', 'stripe_s700', 'stripe_s710', 'stripe_t600', 'verifone_P400', 'verifone_m425', 'verifone_p630', 'verifone_ux700', 'verifone_v660p']|str" ] """ Filters readers by device type diff --git a/stripe/params/v2/__init__.py b/stripe/params/v2/__init__.py index 73f3c99bd..e7d4a7938 100644 --- a/stripe/params/v2/__init__.py +++ b/stripe/params/v2/__init__.py @@ -4,12 +4,19 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: - from stripe.params.v2 import billing as billing, core as core + from stripe.params.v2 import ( + billing as billing, + core as core, + money_management as money_management, + test_helpers as test_helpers, + ) # name -> (import_target, is_submodule) _import_map = { "billing": ("stripe.params.v2.billing", True), "core": ("stripe.params.v2.core", True), + "money_management": ("stripe.params.v2.money_management", True), + "test_helpers": ("stripe.params.v2.test_helpers", True), } if not TYPE_CHECKING: diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py index 9b4442e5a..600364265 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -4,7 +4,7 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: - from stripe.params.v2.core import accounts as accounts + from stripe.params.v2.core import accounts as accounts, vault as vault from stripe.params.v2.core._account_close_params import ( AccountCloseParams as AccountCloseParams, ) @@ -87,6 +87,15 @@ AccountCreateParamsConfigurationMerchantSupportAddress as AccountCreateParamsConfigurationMerchantSupportAddress, AccountCreateParamsConfigurationRecipient as AccountCreateParamsConfigurationRecipient, AccountCreateParamsConfigurationRecipientCapabilities as AccountCreateParamsConfigurationRecipientCapabilities, + AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts, + AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsAch as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsAch, + AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsFedwire as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsFedwire, + AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsFps as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsFps, + AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal, + AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsRtp as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsRtp, + AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSepa as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSepa, + AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwift as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwift, + AccountCreateParamsConfigurationRecipientCapabilitiesCards as AccountCreateParamsConfigurationRecipientCapabilitiesCards, AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance as AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance, AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers as AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers, AccountCreateParamsDefaults as AccountCreateParamsDefaults, @@ -304,6 +313,15 @@ AccountUpdateParamsConfigurationMerchantSupportAddress as AccountUpdateParamsConfigurationMerchantSupportAddress, AccountUpdateParamsConfigurationRecipient as AccountUpdateParamsConfigurationRecipient, AccountUpdateParamsConfigurationRecipientCapabilities as AccountUpdateParamsConfigurationRecipientCapabilities, + AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts, + AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsAch as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsAch, + AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsFedwire as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsFedwire, + AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsFps as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsFps, + AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal, + AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsRtp as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsRtp, + AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSepa as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSepa, + AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwift as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwift, + AccountUpdateParamsConfigurationRecipientCapabilitiesCards as AccountUpdateParamsConfigurationRecipientCapabilitiesCards, AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance as AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance, AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers as AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers, AccountUpdateParamsDefaults as AccountUpdateParamsDefaults, @@ -407,6 +425,7 @@ # name -> (import_target, is_submodule) _import_map = { "accounts": ("stripe.params.v2.core.accounts", True), + "vault": ("stripe.params.v2.core.vault", True), "AccountCloseParams": ( "stripe.params.v2.core._account_close_params", False, @@ -723,6 +742,42 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsAch": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsFedwire": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsFps": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsRtp": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSepa": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwift": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesCards": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance": ( "stripe.params.v2.core._account_create_params", False, @@ -1540,6 +1595,42 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsAch": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsFedwire": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsFps": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsRtp": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSepa": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwift": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesCards": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance": ( "stripe.params.v2.core._account_update_params", False, diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py index 525c75a53..9756754ae 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -310,11 +310,11 @@ class AccountCreateParamsConfigurationMerchantBacsDebitPayments(TypedDict): class AccountCreateParamsConfigurationMerchantBranding(TypedDict): icon: NotRequired[str] """ - ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): An icon for the merchant. Must be square and at least 128px x 128px. + ID of a [file upload](https://docs.stripe.com/api/files/create): An icon for the merchant. Must be square and at least 128px x 128px. """ logo: NotRequired[str] """ - ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px. + ID of a [file upload](https://docs.stripe.com/api/files/create): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px. """ primary_color: NotRequired[str] """ @@ -1233,6 +1233,18 @@ class AccountCreateParamsConfigurationRecipient(TypedDict): class AccountCreateParamsConfigurationRecipientCapabilities(TypedDict): + bank_accounts: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts" + ] + """ + Capabilities that enable OutboundPayments to a bank account linked to this Account. + """ + cards: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesCards" + ] + """ + Capabilities that enable OutboundPayments to a card linked to this Account. + """ stripe_balance: NotRequired[ "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance" ] @@ -1241,6 +1253,123 @@ class AccountCreateParamsConfigurationRecipientCapabilities(TypedDict): """ +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts( + TypedDict, +): + ach: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsAch" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over ACH rails. + """ + fedwire: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsFedwire" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over Fedwire or CHIPS. + """ + fps: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsFps" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over FPS rails. + """ + local: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over local networks. + """ + rtp: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsRtp" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over RTP rails. + """ + sepa: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSepa" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over SEPA rails. + """ + swift: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwift" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsAch( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsFedwire( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsFps( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsRtp( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSepa( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsSwift( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesCards(TypedDict): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance( TypedDict, ): @@ -1538,7 +1667,7 @@ class AccountCreateParamsIdentityAttestationsTermsOfService(TypedDict): "AccountCreateParamsIdentityAttestationsTermsOfServiceAccount" ] """ - Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). + Details on the Account's acceptance of the Stripe Services Agreement. """ @@ -1775,7 +1904,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVer ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1788,7 +1917,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense( ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1801,7 +1930,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAsso ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1814,7 +1943,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecre ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1827,7 +1956,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVeri ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1840,7 +1969,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerificatio ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1853,7 +1982,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerification( ): front_back: "AccountCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -1866,11 +1995,11 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFron ): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: str """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -1879,7 +2008,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfAddress( ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1892,7 +2021,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration( ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ signer: NotRequired[ "AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistrationSigner" @@ -1920,7 +2049,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBenefici ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ signer: NotRequired[ "AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSigner" @@ -2430,7 +2559,7 @@ class AccountCreateParamsIdentityIndividualDocumentsCompanyAuthorization( ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -2441,7 +2570,7 @@ class AccountCreateParamsIdentityIndividualDocumentsCompanyAuthorization( class AccountCreateParamsIdentityIndividualDocumentsPassport(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -2454,7 +2583,7 @@ class AccountCreateParamsIdentityIndividualDocumentsPrimaryVerification( ): front_back: "AccountCreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -2467,11 +2596,11 @@ class AccountCreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack ): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: str """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -2480,7 +2609,7 @@ class AccountCreateParamsIdentityIndividualDocumentsSecondaryVerification( ): front_back: "AccountCreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -2493,18 +2622,18 @@ class AccountCreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBa ): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: str """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class AccountCreateParamsIdentityIndividualDocumentsVisa(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ diff --git a/stripe/params/v2/core/_account_list_params.py b/stripe/params/v2/core/_account_list_params.py index 39ee29c71..de568cee2 100644 --- a/stripe/params/v2/core/_account_list_params.py +++ b/stripe/params/v2/core/_account_list_params.py @@ -17,5 +17,5 @@ class AccountListParams(TypedDict): """ limit: NotRequired[int] """ - The upper limit on the number of accounts returned by the List Account request. + The maximum number of items returned by the list request. """ diff --git a/stripe/params/v2/core/_account_token_create_params.py b/stripe/params/v2/core/_account_token_create_params.py index b7fc2b86c..5efd755c8 100644 --- a/stripe/params/v2/core/_account_token_create_params.py +++ b/stripe/params/v2/core/_account_token_create_params.py @@ -375,7 +375,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnersh ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -388,7 +388,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense( ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -401,7 +401,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumO ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -414,7 +414,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterial ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -427,7 +427,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyRegistratio ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -440,7 +440,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerifi ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -453,7 +453,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificatio ): front_back: "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -466,11 +466,11 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificatio ): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -479,7 +479,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfAddress( ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -492,7 +492,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistratio ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ signer: NotRequired[ "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistrationSigner" @@ -520,7 +520,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBen ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ signer: NotRequired[ "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSigner" @@ -1046,7 +1046,7 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsCompanyAuthorization( ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1057,7 +1057,7 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsCompanyAuthorization( class AccountTokenCreateParamsIdentityIndividualDocumentsPassport(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1070,7 +1070,7 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerification( ): front_back: "AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -1083,11 +1083,11 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerificationFron ): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -1096,7 +1096,7 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerification( ): front_back: "AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -1109,18 +1109,18 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerificationFr ): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class AccountTokenCreateParamsIdentityIndividualDocumentsVisa(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index bd88a2ef1..721bfe448 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -310,7 +310,7 @@ class AccountUpdateParamsConfigurationMerchant(TypedDict): "AccountUpdateParamsConfigurationMerchantStatementDescriptor" ] """ - Settings for the default [statement descriptor](https://docs.stripe.com/connect/statement-descriptors) text. + Settings for the default statement descriptor text. """ support: NotRequired["AccountUpdateParamsConfigurationMerchantSupport"] """ @@ -328,11 +328,11 @@ class AccountUpdateParamsConfigurationMerchantBacsDebitPayments(TypedDict): class AccountUpdateParamsConfigurationMerchantBranding(TypedDict): icon: NotRequired[str] """ - ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): An icon for the merchant. Must be square and at least 128px x 128px. + ID of a [file upload](https://docs.stripe.com/api/files/create): An icon for the merchant. Must be square and at least 128px x 128px. """ logo: NotRequired[str] """ - ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px. + ID of a [file upload](https://docs.stripe.com/api/files/create): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px. """ primary_color: NotRequired[str] """ @@ -1255,6 +1255,18 @@ class AccountUpdateParamsConfigurationRecipient(TypedDict): class AccountUpdateParamsConfigurationRecipientCapabilities(TypedDict): + bank_accounts: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts" + ] + """ + Capabilities that enable OutboundPayments to a bank account linked to this Account. + """ + cards: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesCards" + ] + """ + Capability that enable OutboundPayments to a debit card linked to this Account. + """ stripe_balance: NotRequired[ "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance" ] @@ -1263,6 +1275,123 @@ class AccountUpdateParamsConfigurationRecipientCapabilities(TypedDict): """ +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts( + TypedDict, +): + ach: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsAch" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over ACH rails. + """ + fedwire: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsFedwire" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over Fedwire or CHIPS. + """ + fps: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsFps" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over FPS rails. + """ + local: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over local networks. + """ + rtp: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsRtp" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over RTP rails. + """ + sepa: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSepa" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over SEPA rails. + """ + swift: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwift" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsAch( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsFedwire( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsFps( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsRtp( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSepa( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsSwift( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesCards(TypedDict): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance( TypedDict, ): @@ -1384,6 +1513,10 @@ class AccountUpdateParamsDefaults(TypedDict): """ The Account's preferred locales (languages), ordered by preference. """ + payout_methods: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + """ + Default payout methods per currency. Keys are three-letter [ISO currency codes](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Values are v2 Payout Method IDs. + """ profile: NotRequired["AccountUpdateParamsDefaultsProfile"] """ Account profile information. @@ -1560,7 +1693,7 @@ class AccountUpdateParamsIdentityAttestationsTermsOfService(TypedDict): "AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount" ] """ - Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). + Details on the Account's acceptance of the Stripe Services Agreement. """ crypto_money_manager: NotRequired[ "AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager" @@ -1843,7 +1976,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVer ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1856,7 +1989,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyLicense( ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1869,7 +2002,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAsso ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1882,7 +2015,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecre ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1895,7 +2028,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVeri ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1908,7 +2041,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerificatio ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1921,7 +2054,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerification( ): front_back: "AccountUpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -1934,11 +2067,11 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFron ): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -1947,7 +2080,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfAddress( ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -1960,7 +2093,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfRegistration( ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ signer: NotRequired[ "AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfRegistrationSigner" @@ -1988,7 +2121,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBenefici ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ signer: NotRequired[ "AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnershipSigner" @@ -2500,7 +2633,7 @@ class AccountUpdateParamsIdentityIndividualDocumentsCompanyAuthorization( ): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -2511,7 +2644,7 @@ class AccountUpdateParamsIdentityIndividualDocumentsCompanyAuthorization( class AccountUpdateParamsIdentityIndividualDocumentsPassport(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -2524,7 +2657,7 @@ class AccountUpdateParamsIdentityIndividualDocumentsPrimaryVerification( ): front_back: "AccountUpdateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -2537,11 +2670,11 @@ class AccountUpdateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack ): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -2550,7 +2683,7 @@ class AccountUpdateParamsIdentityIndividualDocumentsSecondaryVerification( ): front_back: "AccountUpdateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -2563,18 +2696,18 @@ class AccountUpdateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBa ): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class AccountUpdateParamsIdentityIndividualDocumentsVisa(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ diff --git a/stripe/params/v2/core/accounts/_person_create_params.py b/stripe/params/v2/core/accounts/_person_create_params.py index 74e36cf35..cdf34a26d 100644 --- a/stripe/params/v2/core/accounts/_person_create_params.py +++ b/stripe/params/v2/core/accounts/_person_create_params.py @@ -243,7 +243,7 @@ class PersonCreateParamsDocuments(TypedDict): class PersonCreateParamsDocumentsCompanyAuthorization(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -254,7 +254,7 @@ class PersonCreateParamsDocumentsCompanyAuthorization(TypedDict): class PersonCreateParamsDocumentsPassport(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -265,7 +265,7 @@ class PersonCreateParamsDocumentsPassport(TypedDict): class PersonCreateParamsDocumentsPrimaryVerification(TypedDict): front_back: "PersonCreateParamsDocumentsPrimaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -276,18 +276,18 @@ class PersonCreateParamsDocumentsPrimaryVerification(TypedDict): class PersonCreateParamsDocumentsPrimaryVerificationFrontBack(TypedDict): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: str """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class PersonCreateParamsDocumentsSecondaryVerification(TypedDict): front_back: "PersonCreateParamsDocumentsSecondaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -298,18 +298,18 @@ class PersonCreateParamsDocumentsSecondaryVerification(TypedDict): class PersonCreateParamsDocumentsSecondaryVerificationFrontBack(TypedDict): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: str """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class PersonCreateParamsDocumentsVisa(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ diff --git a/stripe/params/v2/core/accounts/_person_list_params.py b/stripe/params/v2/core/accounts/_person_list_params.py index 3c881ec02..7f981eff0 100644 --- a/stripe/params/v2/core/accounts/_person_list_params.py +++ b/stripe/params/v2/core/accounts/_person_list_params.py @@ -6,5 +6,5 @@ class PersonListParams(TypedDict): limit: NotRequired[int] """ - The upper limit on the number of accounts returned by the List Account request. + The maximum number of items returned by the list request. """ diff --git a/stripe/params/v2/core/accounts/_person_token_create_params.py b/stripe/params/v2/core/accounts/_person_token_create_params.py index 3b1b8fc23..0857f5d2a 100644 --- a/stripe/params/v2/core/accounts/_person_token_create_params.py +++ b/stripe/params/v2/core/accounts/_person_token_create_params.py @@ -237,7 +237,7 @@ class PersonTokenCreateParamsDocuments(TypedDict): class PersonTokenCreateParamsDocumentsCompanyAuthorization(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -248,7 +248,7 @@ class PersonTokenCreateParamsDocumentsCompanyAuthorization(TypedDict): class PersonTokenCreateParamsDocumentsPassport(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -259,7 +259,7 @@ class PersonTokenCreateParamsDocumentsPassport(TypedDict): class PersonTokenCreateParamsDocumentsPrimaryVerification(TypedDict): front_back: "PersonTokenCreateParamsDocumentsPrimaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -270,11 +270,11 @@ class PersonTokenCreateParamsDocumentsPrimaryVerification(TypedDict): class PersonTokenCreateParamsDocumentsPrimaryVerificationFrontBack(TypedDict): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ @@ -283,7 +283,7 @@ class PersonTokenCreateParamsDocumentsSecondaryVerification(TypedDict): "PersonTokenCreateParamsDocumentsSecondaryVerificationFrontBack" ) """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -296,18 +296,18 @@ class PersonTokenCreateParamsDocumentsSecondaryVerificationFrontBack( ): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class PersonTokenCreateParamsDocumentsVisa(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ diff --git a/stripe/params/v2/core/accounts/_person_update_params.py b/stripe/params/v2/core/accounts/_person_update_params.py index 2318e45f2..b3812e8d9 100644 --- a/stripe/params/v2/core/accounts/_person_update_params.py +++ b/stripe/params/v2/core/accounts/_person_update_params.py @@ -245,7 +245,7 @@ class PersonUpdateParamsDocuments(TypedDict): class PersonUpdateParamsDocumentsCompanyAuthorization(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -256,7 +256,7 @@ class PersonUpdateParamsDocumentsCompanyAuthorization(TypedDict): class PersonUpdateParamsDocumentsPassport(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -267,7 +267,7 @@ class PersonUpdateParamsDocumentsPassport(TypedDict): class PersonUpdateParamsDocumentsPrimaryVerification(TypedDict): front_back: "PersonUpdateParamsDocumentsPrimaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -278,18 +278,18 @@ class PersonUpdateParamsDocumentsPrimaryVerification(TypedDict): class PersonUpdateParamsDocumentsPrimaryVerificationFrontBack(TypedDict): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class PersonUpdateParamsDocumentsSecondaryVerification(TypedDict): front_back: "PersonUpdateParamsDocumentsSecondaryVerificationFrontBack" """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + The [file upload](https://docs.stripe.com/api/files/create) tokens referring to each side of the document. """ type: Union[Literal["front_back"], str] """ @@ -300,18 +300,18 @@ class PersonUpdateParamsDocumentsSecondaryVerification(TypedDict): class PersonUpdateParamsDocumentsSecondaryVerificationFrontBack(TypedDict): back: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: NotRequired[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ class PersonUpdateParamsDocumentsVisa(TypedDict): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ diff --git a/stripe/params/v2/core/vault/__init__.py b/stripe/params/v2/core/vault/__init__.py new file mode 100644 index 000000000..fb5db8ae4 --- /dev/null +++ b/stripe/params/v2/core/vault/__init__.py @@ -0,0 +1,116 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.core.vault._gb_bank_account_archive_params import ( + GbBankAccountArchiveParams as GbBankAccountArchiveParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_create_params import ( + GbBankAccountCreateParams as GbBankAccountCreateParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_list_params import ( + GbBankAccountListParams as GbBankAccountListParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_retrieve_params import ( + GbBankAccountRetrieveParams as GbBankAccountRetrieveParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_unarchive_params import ( + GbBankAccountUnarchiveParams as GbBankAccountUnarchiveParams, + ) + from stripe.params.v2.core.vault._us_bank_account_archive_params import ( + UsBankAccountArchiveParams as UsBankAccountArchiveParams, + ) + from stripe.params.v2.core.vault._us_bank_account_confirm_microdeposits_params import ( + UsBankAccountConfirmMicrodepositsParams as UsBankAccountConfirmMicrodepositsParams, + ) + from stripe.params.v2.core.vault._us_bank_account_create_params import ( + UsBankAccountCreateParams as UsBankAccountCreateParams, + ) + from stripe.params.v2.core.vault._us_bank_account_list_params import ( + UsBankAccountListParams as UsBankAccountListParams, + ) + from stripe.params.v2.core.vault._us_bank_account_retrieve_params import ( + UsBankAccountRetrieveParams as UsBankAccountRetrieveParams, + ) + from stripe.params.v2.core.vault._us_bank_account_send_microdeposits_params import ( + UsBankAccountSendMicrodepositsParams as UsBankAccountSendMicrodepositsParams, + ) + from stripe.params.v2.core.vault._us_bank_account_unarchive_params import ( + UsBankAccountUnarchiveParams as UsBankAccountUnarchiveParams, + ) + from stripe.params.v2.core.vault._us_bank_account_update_params import ( + UsBankAccountUpdateParams as UsBankAccountUpdateParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "GbBankAccountArchiveParams": ( + "stripe.params.v2.core.vault._gb_bank_account_archive_params", + False, + ), + "GbBankAccountCreateParams": ( + "stripe.params.v2.core.vault._gb_bank_account_create_params", + False, + ), + "GbBankAccountListParams": ( + "stripe.params.v2.core.vault._gb_bank_account_list_params", + False, + ), + "GbBankAccountRetrieveParams": ( + "stripe.params.v2.core.vault._gb_bank_account_retrieve_params", + False, + ), + "GbBankAccountUnarchiveParams": ( + "stripe.params.v2.core.vault._gb_bank_account_unarchive_params", + False, + ), + "UsBankAccountArchiveParams": ( + "stripe.params.v2.core.vault._us_bank_account_archive_params", + False, + ), + "UsBankAccountConfirmMicrodepositsParams": ( + "stripe.params.v2.core.vault._us_bank_account_confirm_microdeposits_params", + False, + ), + "UsBankAccountCreateParams": ( + "stripe.params.v2.core.vault._us_bank_account_create_params", + False, + ), + "UsBankAccountListParams": ( + "stripe.params.v2.core.vault._us_bank_account_list_params", + False, + ), + "UsBankAccountRetrieveParams": ( + "stripe.params.v2.core.vault._us_bank_account_retrieve_params", + False, + ), + "UsBankAccountSendMicrodepositsParams": ( + "stripe.params.v2.core.vault._us_bank_account_send_microdeposits_params", + False, + ), + "UsBankAccountUnarchiveParams": ( + "stripe.params.v2.core.vault._us_bank_account_unarchive_params", + False, + ), + "UsBankAccountUpdateParams": ( + "stripe.params.v2.core.vault._us_bank_account_update_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/core/vault/_gb_bank_account_archive_params.py b/stripe/params/v2/core/vault/_gb_bank_account_archive_params.py new file mode 100644 index 000000000..e9edefe83 --- /dev/null +++ b/stripe/params/v2/core/vault/_gb_bank_account_archive_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class GbBankAccountArchiveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_gb_bank_account_create_params.py b/stripe/params/v2/core/vault/_gb_bank_account_create_params.py new file mode 100644 index 000000000..39b4dcc41 --- /dev/null +++ b/stripe/params/v2/core/vault/_gb_bank_account_create_params.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class GbBankAccountCreateParams(TypedDict): + account_number: NotRequired[str] + """ + The Account Number of the bank account. + """ + bank_account_type: NotRequired[Literal["checking", "savings"]] + """ + Closed Enum. The type of the bank account (checking or savings). + """ + currency: str + """ + The currency of the bank account. + """ + iban: NotRequired[str] + """ + The IBAN of the bank account. + """ + sort_code: NotRequired[str] + """ + The Sort Code of the bank account. + """ diff --git a/stripe/params/v2/core/vault/_gb_bank_account_list_params.py b/stripe/params/v2/core/vault/_gb_bank_account_list_params.py new file mode 100644 index 000000000..9d7f61736 --- /dev/null +++ b/stripe/params/v2/core/vault/_gb_bank_account_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class GbBankAccountListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 10. + """ diff --git a/stripe/params/v2/core/vault/_gb_bank_account_retrieve_params.py b/stripe/params/v2/core/vault/_gb_bank_account_retrieve_params.py new file mode 100644 index 000000000..a3289ca98 --- /dev/null +++ b/stripe/params/v2/core/vault/_gb_bank_account_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class GbBankAccountRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_gb_bank_account_unarchive_params.py b/stripe/params/v2/core/vault/_gb_bank_account_unarchive_params.py new file mode 100644 index 000000000..983667e88 --- /dev/null +++ b/stripe/params/v2/core/vault/_gb_bank_account_unarchive_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class GbBankAccountUnarchiveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_us_bank_account_archive_params.py b/stripe/params/v2/core/vault/_us_bank_account_archive_params.py new file mode 100644 index 000000000..d67268aca --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_archive_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class UsBankAccountArchiveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_us_bank_account_confirm_microdeposits_params.py b/stripe/params/v2/core/vault/_us_bank_account_confirm_microdeposits_params.py new file mode 100644 index 000000000..89622c350 --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_confirm_microdeposits_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class UsBankAccountConfirmMicrodepositsParams(TypedDict): + amounts: NotRequired[List[int]] + """ + Two amounts received through Send Microdeposits must match the input to Confirm Microdeposits to verify US Bank Account. + """ + descriptor_code: NotRequired[str] + """ + Descriptor code received through Send Microdeposits must match the input to Confirm Microdeposits to verify US Bank Account. + """ diff --git a/stripe/params/v2/core/vault/_us_bank_account_create_params.py b/stripe/params/v2/core/vault/_us_bank_account_create_params.py new file mode 100644 index 000000000..2f9137510 --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_create_params.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class UsBankAccountCreateParams(TypedDict): + account_number: str + """ + The account number of the bank account. + """ + bank_account_type: NotRequired[Literal["checking", "savings"]] + """ + Closed Enum. The type of the bank account (checking or savings). + """ + currency: str + """ + The currency of the bank account. + """ + fedwire_routing_number: NotRequired[str] + """ + The fedwire routing number of the bank account. Note that certain banks have the same ACH and wire routing number. + """ + routing_number: NotRequired[str] + """ + The ACH routing number of the bank account. Note that certain banks have the same ACH and wire routing number. + """ diff --git a/stripe/params/v2/core/vault/_us_bank_account_list_params.py b/stripe/params/v2/core/vault/_us_bank_account_list_params.py new file mode 100644 index 000000000..ae6fb2bde --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_list_params.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class UsBankAccountListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 10. + """ + verification_status: NotRequired[ + Literal[ + "awaiting_verification", + "unverified", + "verification_failed", + "verified", + ] + ] + """ + Closed Enum. Optionally filter by verification status. + """ diff --git a/stripe/params/v2/core/vault/_us_bank_account_retrieve_params.py b/stripe/params/v2/core/vault/_us_bank_account_retrieve_params.py new file mode 100644 index 000000000..05b62c9c4 --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class UsBankAccountRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_us_bank_account_send_microdeposits_params.py b/stripe/params/v2/core/vault/_us_bank_account_send_microdeposits_params.py new file mode 100644 index 000000000..e16ba1f63 --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_send_microdeposits_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class UsBankAccountSendMicrodepositsParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_us_bank_account_unarchive_params.py b/stripe/params/v2/core/vault/_us_bank_account_unarchive_params.py new file mode 100644 index 000000000..2ef65c248 --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_unarchive_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class UsBankAccountUnarchiveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_us_bank_account_update_params.py b/stripe/params/v2/core/vault/_us_bank_account_update_params.py new file mode 100644 index 000000000..4f3efc16a --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_update_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class UsBankAccountUpdateParams(TypedDict): + fedwire_routing_number: NotRequired[str] + """ + The bank account's Fedwire routing number can be provided for update if it was empty previously. + """ + routing_number: NotRequired[str] + """ + The bank account's ACH routing number can be provided for update if it was empty previously. + """ diff --git a/stripe/params/v2/money_management/__init__.py b/stripe/params/v2/money_management/__init__.py new file mode 100644 index 000000000..a330a1139 --- /dev/null +++ b/stripe/params/v2/money_management/__init__.py @@ -0,0 +1,515 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.money_management import test_helpers as test_helpers + from stripe.params.v2.money_management._adjustment_list_params import ( + AdjustmentListParams as AdjustmentListParams, + AdjustmentListParamsCreated as AdjustmentListParamsCreated, + ) + from stripe.params.v2.money_management._adjustment_retrieve_params import ( + AdjustmentRetrieveParams as AdjustmentRetrieveParams, + ) + from stripe.params.v2.money_management._financial_account_list_params import ( + FinancialAccountListParams as FinancialAccountListParams, + ) + from stripe.params.v2.money_management._financial_account_retrieve_params import ( + FinancialAccountRetrieveParams as FinancialAccountRetrieveParams, + ) + from stripe.params.v2.money_management._financial_account_update_params import ( + FinancialAccountUpdateParams as FinancialAccountUpdateParams, + ) + from stripe.params.v2.money_management._financial_address_create_params import ( + FinancialAddressCreateParams as FinancialAddressCreateParams, + FinancialAddressCreateParamsBankAccount as FinancialAddressCreateParamsBankAccount, + ) + from stripe.params.v2.money_management._financial_address_list_params import ( + FinancialAddressListParams as FinancialAddressListParams, + ) + from stripe.params.v2.money_management._financial_address_retrieve_params import ( + FinancialAddressRetrieveParams as FinancialAddressRetrieveParams, + ) + from stripe.params.v2.money_management._inbound_transfer_create_params import ( + InboundTransferCreateParams as InboundTransferCreateParams, + InboundTransferCreateParamsFrom as InboundTransferCreateParamsFrom, + InboundTransferCreateParamsTo as InboundTransferCreateParamsTo, + ) + from stripe.params.v2.money_management._inbound_transfer_list_params import ( + InboundTransferListParams as InboundTransferListParams, + InboundTransferListParamsCreated as InboundTransferListParamsCreated, + ) + from stripe.params.v2.money_management._inbound_transfer_retrieve_params import ( + InboundTransferRetrieveParams as InboundTransferRetrieveParams, + ) + from stripe.params.v2.money_management._outbound_payment_cancel_params import ( + OutboundPaymentCancelParams as OutboundPaymentCancelParams, + ) + from stripe.params.v2.money_management._outbound_payment_create_params import ( + OutboundPaymentCreateParams as OutboundPaymentCreateParams, + OutboundPaymentCreateParamsFrom as OutboundPaymentCreateParamsFrom, + OutboundPaymentCreateParamsRecipientNotification as OutboundPaymentCreateParamsRecipientNotification, + OutboundPaymentCreateParamsTo as OutboundPaymentCreateParamsTo, + OutboundPaymentCreateParamsToPayoutMethodOptions as OutboundPaymentCreateParamsToPayoutMethodOptions, + OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccount as OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccount, + OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions as OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions, + OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch as OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch, + ) + from stripe.params.v2.money_management._outbound_payment_list_params import ( + OutboundPaymentListParams as OutboundPaymentListParams, + OutboundPaymentListParamsCreated as OutboundPaymentListParamsCreated, + ) + from stripe.params.v2.money_management._outbound_payment_retrieve_params import ( + OutboundPaymentRetrieveParams as OutboundPaymentRetrieveParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_cancel_params import ( + OutboundSetupIntentCancelParams as OutboundSetupIntentCancelParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_create_params import ( + OutboundSetupIntentCreateParams as OutboundSetupIntentCreateParams, + OutboundSetupIntentCreateParamsPayoutMethodData as OutboundSetupIntentCreateParamsPayoutMethodData, + OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount as OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount, + ) + from stripe.params.v2.money_management._outbound_setup_intent_list_params import ( + OutboundSetupIntentListParams as OutboundSetupIntentListParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_retrieve_params import ( + OutboundSetupIntentRetrieveParams as OutboundSetupIntentRetrieveParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_update_params import ( + OutboundSetupIntentUpdateParams as OutboundSetupIntentUpdateParams, + OutboundSetupIntentUpdateParamsPayoutMethodData as OutboundSetupIntentUpdateParamsPayoutMethodData, + OutboundSetupIntentUpdateParamsPayoutMethodDataBankAccount as OutboundSetupIntentUpdateParamsPayoutMethodDataBankAccount, + ) + from stripe.params.v2.money_management._payout_intent_cancel_params import ( + PayoutIntentCancelParams as PayoutIntentCancelParams, + ) + from stripe.params.v2.money_management._payout_intent_confirm_params import ( + PayoutIntentConfirmParams as PayoutIntentConfirmParams, + ) + from stripe.params.v2.money_management._payout_intent_create_params import ( + PayoutIntentCreateParams as PayoutIntentCreateParams, + PayoutIntentCreateParamsFrom as PayoutIntentCreateParamsFrom, + PayoutIntentCreateParamsRecipientNotification as PayoutIntentCreateParamsRecipientNotification, + PayoutIntentCreateParamsScheduleOptions as PayoutIntentCreateParamsScheduleOptions, + PayoutIntentCreateParamsTo as PayoutIntentCreateParamsTo, + PayoutIntentCreateParamsToPayoutMethodOptions as PayoutIntentCreateParamsToPayoutMethodOptions, + PayoutIntentCreateParamsToPayoutMethodOptionsBankAccount as PayoutIntentCreateParamsToPayoutMethodOptionsBankAccount, + PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions as PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions, + PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch as PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch, + ) + from stripe.params.v2.money_management._payout_intent_list_params import ( + PayoutIntentListParams as PayoutIntentListParams, + ) + from stripe.params.v2.money_management._payout_intent_refresh_fx_quote_params import ( + PayoutIntentRefreshFxQuoteParams as PayoutIntentRefreshFxQuoteParams, + ) + from stripe.params.v2.money_management._payout_intent_refresh_recipient_verification_params import ( + PayoutIntentRefreshRecipientVerificationParams as PayoutIntentRefreshRecipientVerificationParams, + ) + from stripe.params.v2.money_management._payout_intent_retrieve_params import ( + PayoutIntentRetrieveParams as PayoutIntentRetrieveParams, + ) + from stripe.params.v2.money_management._payout_intent_update_params import ( + PayoutIntentUpdateParams as PayoutIntentUpdateParams, + PayoutIntentUpdateParamsRecipientNotification as PayoutIntentUpdateParamsRecipientNotification, + PayoutIntentUpdateParamsScheduleOptions as PayoutIntentUpdateParamsScheduleOptions, + PayoutIntentUpdateParamsTo as PayoutIntentUpdateParamsTo, + PayoutIntentUpdateParamsToPayoutMethodOptions as PayoutIntentUpdateParamsToPayoutMethodOptions, + PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccount as PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccount, + PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions as PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions, + PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch as PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch, + ) + from stripe.params.v2.money_management._payout_method_archive_params import ( + PayoutMethodArchiveParams as PayoutMethodArchiveParams, + ) + from stripe.params.v2.money_management._payout_method_list_params import ( + PayoutMethodListParams as PayoutMethodListParams, + PayoutMethodListParamsUsageStatus as PayoutMethodListParamsUsageStatus, + ) + from stripe.params.v2.money_management._payout_method_retrieve_params import ( + PayoutMethodRetrieveParams as PayoutMethodRetrieveParams, + ) + from stripe.params.v2.money_management._payout_method_unarchive_params import ( + PayoutMethodUnarchiveParams as PayoutMethodUnarchiveParams, + ) + from stripe.params.v2.money_management._payout_methods_bank_account_spec_retrieve_params import ( + PayoutMethodsBankAccountSpecRetrieveParams as PayoutMethodsBankAccountSpecRetrieveParams, + ) + from stripe.params.v2.money_management._received_credit_list_params import ( + ReceivedCreditListParams as ReceivedCreditListParams, + ReceivedCreditListParamsCreated as ReceivedCreditListParamsCreated, + ) + from stripe.params.v2.money_management._received_credit_retrieve_params import ( + ReceivedCreditRetrieveParams as ReceivedCreditRetrieveParams, + ) + from stripe.params.v2.money_management._recipient_verification_acknowledge_params import ( + RecipientVerificationAcknowledgeParams as RecipientVerificationAcknowledgeParams, + ) + from stripe.params.v2.money_management._recipient_verification_create_params import ( + RecipientVerificationCreateParams as RecipientVerificationCreateParams, + ) + from stripe.params.v2.money_management._recipient_verification_retrieve_params import ( + RecipientVerificationRetrieveParams as RecipientVerificationRetrieveParams, + ) + from stripe.params.v2.money_management._transaction_entry_list_params import ( + TransactionEntryListParams as TransactionEntryListParams, + TransactionEntryListParamsCreated as TransactionEntryListParamsCreated, + ) + from stripe.params.v2.money_management._transaction_entry_retrieve_params import ( + TransactionEntryRetrieveParams as TransactionEntryRetrieveParams, + ) + from stripe.params.v2.money_management._transaction_list_params import ( + TransactionListParams as TransactionListParams, + TransactionListParamsCreated as TransactionListParamsCreated, + ) + from stripe.params.v2.money_management._transaction_refresh_regulatory_receipt_params import ( + TransactionRefreshRegulatoryReceiptParams as TransactionRefreshRegulatoryReceiptParams, + ) + from stripe.params.v2.money_management._transaction_retrieve_params import ( + TransactionRetrieveParams as TransactionRetrieveParams, + ) + from stripe.params.v2.money_management._transaction_update_params import ( + TransactionUpdateParams as TransactionUpdateParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "test_helpers": ("stripe.params.v2.money_management.test_helpers", True), + "AdjustmentListParams": ( + "stripe.params.v2.money_management._adjustment_list_params", + False, + ), + "AdjustmentListParamsCreated": ( + "stripe.params.v2.money_management._adjustment_list_params", + False, + ), + "AdjustmentRetrieveParams": ( + "stripe.params.v2.money_management._adjustment_retrieve_params", + False, + ), + "FinancialAccountListParams": ( + "stripe.params.v2.money_management._financial_account_list_params", + False, + ), + "FinancialAccountRetrieveParams": ( + "stripe.params.v2.money_management._financial_account_retrieve_params", + False, + ), + "FinancialAccountUpdateParams": ( + "stripe.params.v2.money_management._financial_account_update_params", + False, + ), + "FinancialAddressCreateParams": ( + "stripe.params.v2.money_management._financial_address_create_params", + False, + ), + "FinancialAddressCreateParamsBankAccount": ( + "stripe.params.v2.money_management._financial_address_create_params", + False, + ), + "FinancialAddressListParams": ( + "stripe.params.v2.money_management._financial_address_list_params", + False, + ), + "FinancialAddressRetrieveParams": ( + "stripe.params.v2.money_management._financial_address_retrieve_params", + False, + ), + "InboundTransferCreateParams": ( + "stripe.params.v2.money_management._inbound_transfer_create_params", + False, + ), + "InboundTransferCreateParamsFrom": ( + "stripe.params.v2.money_management._inbound_transfer_create_params", + False, + ), + "InboundTransferCreateParamsTo": ( + "stripe.params.v2.money_management._inbound_transfer_create_params", + False, + ), + "InboundTransferListParams": ( + "stripe.params.v2.money_management._inbound_transfer_list_params", + False, + ), + "InboundTransferListParamsCreated": ( + "stripe.params.v2.money_management._inbound_transfer_list_params", + False, + ), + "InboundTransferRetrieveParams": ( + "stripe.params.v2.money_management._inbound_transfer_retrieve_params", + False, + ), + "OutboundPaymentCancelParams": ( + "stripe.params.v2.money_management._outbound_payment_cancel_params", + False, + ), + "OutboundPaymentCreateParams": ( + "stripe.params.v2.money_management._outbound_payment_create_params", + False, + ), + "OutboundPaymentCreateParamsFrom": ( + "stripe.params.v2.money_management._outbound_payment_create_params", + False, + ), + "OutboundPaymentCreateParamsRecipientNotification": ( + "stripe.params.v2.money_management._outbound_payment_create_params", + False, + ), + "OutboundPaymentCreateParamsTo": ( + "stripe.params.v2.money_management._outbound_payment_create_params", + False, + ), + "OutboundPaymentCreateParamsToPayoutMethodOptions": ( + "stripe.params.v2.money_management._outbound_payment_create_params", + False, + ), + "OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccount": ( + "stripe.params.v2.money_management._outbound_payment_create_params", + False, + ), + "OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions": ( + "stripe.params.v2.money_management._outbound_payment_create_params", + False, + ), + "OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch": ( + "stripe.params.v2.money_management._outbound_payment_create_params", + False, + ), + "OutboundPaymentListParams": ( + "stripe.params.v2.money_management._outbound_payment_list_params", + False, + ), + "OutboundPaymentListParamsCreated": ( + "stripe.params.v2.money_management._outbound_payment_list_params", + False, + ), + "OutboundPaymentRetrieveParams": ( + "stripe.params.v2.money_management._outbound_payment_retrieve_params", + False, + ), + "OutboundSetupIntentCancelParams": ( + "stripe.params.v2.money_management._outbound_setup_intent_cancel_params", + False, + ), + "OutboundSetupIntentCreateParams": ( + "stripe.params.v2.money_management._outbound_setup_intent_create_params", + False, + ), + "OutboundSetupIntentCreateParamsPayoutMethodData": ( + "stripe.params.v2.money_management._outbound_setup_intent_create_params", + False, + ), + "OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount": ( + "stripe.params.v2.money_management._outbound_setup_intent_create_params", + False, + ), + "OutboundSetupIntentListParams": ( + "stripe.params.v2.money_management._outbound_setup_intent_list_params", + False, + ), + "OutboundSetupIntentRetrieveParams": ( + "stripe.params.v2.money_management._outbound_setup_intent_retrieve_params", + False, + ), + "OutboundSetupIntentUpdateParams": ( + "stripe.params.v2.money_management._outbound_setup_intent_update_params", + False, + ), + "OutboundSetupIntentUpdateParamsPayoutMethodData": ( + "stripe.params.v2.money_management._outbound_setup_intent_update_params", + False, + ), + "OutboundSetupIntentUpdateParamsPayoutMethodDataBankAccount": ( + "stripe.params.v2.money_management._outbound_setup_intent_update_params", + False, + ), + "PayoutIntentCancelParams": ( + "stripe.params.v2.money_management._payout_intent_cancel_params", + False, + ), + "PayoutIntentConfirmParams": ( + "stripe.params.v2.money_management._payout_intent_confirm_params", + False, + ), + "PayoutIntentCreateParams": ( + "stripe.params.v2.money_management._payout_intent_create_params", + False, + ), + "PayoutIntentCreateParamsFrom": ( + "stripe.params.v2.money_management._payout_intent_create_params", + False, + ), + "PayoutIntentCreateParamsRecipientNotification": ( + "stripe.params.v2.money_management._payout_intent_create_params", + False, + ), + "PayoutIntentCreateParamsScheduleOptions": ( + "stripe.params.v2.money_management._payout_intent_create_params", + False, + ), + "PayoutIntentCreateParamsTo": ( + "stripe.params.v2.money_management._payout_intent_create_params", + False, + ), + "PayoutIntentCreateParamsToPayoutMethodOptions": ( + "stripe.params.v2.money_management._payout_intent_create_params", + False, + ), + "PayoutIntentCreateParamsToPayoutMethodOptionsBankAccount": ( + "stripe.params.v2.money_management._payout_intent_create_params", + False, + ), + "PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions": ( + "stripe.params.v2.money_management._payout_intent_create_params", + False, + ), + "PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch": ( + "stripe.params.v2.money_management._payout_intent_create_params", + False, + ), + "PayoutIntentListParams": ( + "stripe.params.v2.money_management._payout_intent_list_params", + False, + ), + "PayoutIntentRefreshFxQuoteParams": ( + "stripe.params.v2.money_management._payout_intent_refresh_fx_quote_params", + False, + ), + "PayoutIntentRefreshRecipientVerificationParams": ( + "stripe.params.v2.money_management._payout_intent_refresh_recipient_verification_params", + False, + ), + "PayoutIntentRetrieveParams": ( + "stripe.params.v2.money_management._payout_intent_retrieve_params", + False, + ), + "PayoutIntentUpdateParams": ( + "stripe.params.v2.money_management._payout_intent_update_params", + False, + ), + "PayoutIntentUpdateParamsRecipientNotification": ( + "stripe.params.v2.money_management._payout_intent_update_params", + False, + ), + "PayoutIntentUpdateParamsScheduleOptions": ( + "stripe.params.v2.money_management._payout_intent_update_params", + False, + ), + "PayoutIntentUpdateParamsTo": ( + "stripe.params.v2.money_management._payout_intent_update_params", + False, + ), + "PayoutIntentUpdateParamsToPayoutMethodOptions": ( + "stripe.params.v2.money_management._payout_intent_update_params", + False, + ), + "PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccount": ( + "stripe.params.v2.money_management._payout_intent_update_params", + False, + ), + "PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions": ( + "stripe.params.v2.money_management._payout_intent_update_params", + False, + ), + "PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch": ( + "stripe.params.v2.money_management._payout_intent_update_params", + False, + ), + "PayoutMethodArchiveParams": ( + "stripe.params.v2.money_management._payout_method_archive_params", + False, + ), + "PayoutMethodListParams": ( + "stripe.params.v2.money_management._payout_method_list_params", + False, + ), + "PayoutMethodListParamsUsageStatus": ( + "stripe.params.v2.money_management._payout_method_list_params", + False, + ), + "PayoutMethodRetrieveParams": ( + "stripe.params.v2.money_management._payout_method_retrieve_params", + False, + ), + "PayoutMethodUnarchiveParams": ( + "stripe.params.v2.money_management._payout_method_unarchive_params", + False, + ), + "PayoutMethodsBankAccountSpecRetrieveParams": ( + "stripe.params.v2.money_management._payout_methods_bank_account_spec_retrieve_params", + False, + ), + "ReceivedCreditListParams": ( + "stripe.params.v2.money_management._received_credit_list_params", + False, + ), + "ReceivedCreditListParamsCreated": ( + "stripe.params.v2.money_management._received_credit_list_params", + False, + ), + "ReceivedCreditRetrieveParams": ( + "stripe.params.v2.money_management._received_credit_retrieve_params", + False, + ), + "RecipientVerificationAcknowledgeParams": ( + "stripe.params.v2.money_management._recipient_verification_acknowledge_params", + False, + ), + "RecipientVerificationCreateParams": ( + "stripe.params.v2.money_management._recipient_verification_create_params", + False, + ), + "RecipientVerificationRetrieveParams": ( + "stripe.params.v2.money_management._recipient_verification_retrieve_params", + False, + ), + "TransactionEntryListParams": ( + "stripe.params.v2.money_management._transaction_entry_list_params", + False, + ), + "TransactionEntryListParamsCreated": ( + "stripe.params.v2.money_management._transaction_entry_list_params", + False, + ), + "TransactionEntryRetrieveParams": ( + "stripe.params.v2.money_management._transaction_entry_retrieve_params", + False, + ), + "TransactionListParams": ( + "stripe.params.v2.money_management._transaction_list_params", + False, + ), + "TransactionListParamsCreated": ( + "stripe.params.v2.money_management._transaction_list_params", + False, + ), + "TransactionRefreshRegulatoryReceiptParams": ( + "stripe.params.v2.money_management._transaction_refresh_regulatory_receipt_params", + False, + ), + "TransactionRetrieveParams": ( + "stripe.params.v2.money_management._transaction_retrieve_params", + False, + ), + "TransactionUpdateParams": ( + "stripe.params.v2.money_management._transaction_update_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/money_management/_adjustment_list_params.py b/stripe/params/v2/money_management/_adjustment_list_params.py new file mode 100644 index 000000000..306742986 --- /dev/null +++ b/stripe/params/v2/money_management/_adjustment_list_params.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class AdjustmentListParams(TypedDict): + adjusted_flow: NotRequired[str] + """ + Filter for Adjustments linked to a specific flow object. This filter only supports filtering by + the flow object's ID, such as `ibt_123` for an InboundTransfer. + """ + created: NotRequired["AdjustmentListParamsCreated"] + """ + Filter for Adjustments by their creation time using `gt`, `gte`, `lt`, or `lte`. + """ + limit: NotRequired[int] + """ + The page limit. + """ + + +class AdjustmentListParamsCreated(TypedDict): + gt: NotRequired[str] + """ + Filter for Adjustments created after the specified timestamp. + The timestamp must be in RFC 3339 format, for example `2022-09-18T13:22:00Z`. + """ + gte: NotRequired[str] + """ + Filter for Adjustments created on or after the specified timestamp. + The timestamp must be in RFC 3339 format, for example `2022-09-18T13:22:00Z`. + """ + lt: NotRequired[str] + """ + Filter for Adjustments created before the specified timestamp. + The timestamp must be in RFC 3339 format, for example `2022-09-18T13:22:00Z`. + """ + lte: NotRequired[str] + """ + Filter for Adjustments created on or before the specified timestamp. + The timestamp must be in RFC 3339 format, for example `2022-09-18T13:22:00Z`. + """ diff --git a/stripe/params/v2/money_management/_adjustment_retrieve_params.py b/stripe/params/v2/money_management/_adjustment_retrieve_params.py new file mode 100644 index 000000000..7c2480a4f --- /dev/null +++ b/stripe/params/v2/money_management/_adjustment_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AdjustmentRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_financial_account_list_params.py b/stripe/params/v2/money_management/_financial_account_list_params.py new file mode 100644 index 000000000..8d6a12796 --- /dev/null +++ b/stripe/params/v2/money_management/_financial_account_list_params.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAccountListParams(TypedDict): + include: NotRequired[ + List[Literal["storage.deposit_insurance_eligibility"]] + ] + """ + Additional fields to include in the response. + """ + limit: NotRequired[int] + """ + The page limit. + """ + statuses: NotRequired[List[Literal["closed", "open", "pending"]]] + """ + Return FinancialAccounts whose `status` matches any of the provided values. + If omitted, closed FinancialAccounts are not returned. + """ diff --git a/stripe/params/v2/money_management/_financial_account_retrieve_params.py b/stripe/params/v2/money_management/_financial_account_retrieve_params.py new file mode 100644 index 000000000..a478f7772 --- /dev/null +++ b/stripe/params/v2/money_management/_financial_account_retrieve_params.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAccountRetrieveParams(TypedDict): + include: NotRequired[ + List[Literal["storage.deposit_insurance_eligibility"]] + ] + """ + Additional fields to include in the response. + """ diff --git a/stripe/params/v2/money_management/_financial_account_update_params.py b/stripe/params/v2/money_management/_financial_account_update_params.py new file mode 100644 index 000000000..66a07388e --- /dev/null +++ b/stripe/params/v2/money_management/_financial_account_update_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import UntypedStripeObject +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class FinancialAccountUpdateParams(TypedDict): + display_name: NotRequired[str] + """ + A descriptive name for the FinancialAccount, up to 50 characters long. This name appears in the Stripe Dashboard and embedded components. + """ + metadata: NotRequired[ + "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" + ] + """ + Set of key-value pairs that you can attach to the FinancialAccount. Individual keys can be unset by posting + null to them. + """ diff --git a/stripe/params/v2/money_management/_financial_address_create_params.py b/stripe/params/v2/money_management/_financial_address_create_params.py new file mode 100644 index 000000000..138ab0f7a --- /dev/null +++ b/stripe/params/v2/money_management/_financial_address_create_params.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAddressCreateParams(TypedDict): + bank_account: NotRequired["FinancialAddressCreateParamsBankAccount"] + """ + Properties for creating a bank account FinancialAddress. + """ + financial_account: str + """ + The ID of the FinancialAccount the new FinancialAddress should be associated with. + """ + type: Union[Literal["bank_account"], str] + """ + The type of FinancialAddress to create. Must agree with which branch of financial_address_type_properties is set. + """ + + +class FinancialAddressCreateParamsBankAccount(TypedDict): + country: NotRequired[str] + """ + The country for the bank account. Used to select the appropriate rails (e.g. for SEPA). + """ + currency: Union[Literal["eur", "gbp", "usd"], str] + """ + The currency of the bank account to provision. Available currencies depend on your account's enabled features and rollout access; `eur` requires the Financial Address Global Payouts EU preview. + """ diff --git a/stripe/params/v2/money_management/_financial_address_list_params.py b/stripe/params/v2/money_management/_financial_address_list_params.py new file mode 100644 index 000000000..f0599762b --- /dev/null +++ b/stripe/params/v2/money_management/_financial_address_list_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class FinancialAddressListParams(TypedDict): + financial_account: NotRequired[str] + """ + The ID of the FinancialAccount for which FinancialAddresses are to be returned. + """ + limit: NotRequired[int] + """ + The page limit. + """ diff --git a/stripe/params/v2/money_management/_financial_address_retrieve_params.py b/stripe/params/v2/money_management/_financial_address_retrieve_params.py new file mode 100644 index 000000000..43f14693e --- /dev/null +++ b/stripe/params/v2/money_management/_financial_address_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class FinancialAddressRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_inbound_transfer_create_params.py b/stripe/params/v2/money_management/_inbound_transfer_create_params.py new file mode 100644 index 000000000..ebbcac1f2 --- /dev/null +++ b/stripe/params/v2/money_management/_inbound_transfer_create_params.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing_extensions import NotRequired, TypedDict + +_InboundTransferCreateParamsBase = TypedDict( + "InboundTransferCreateParams", + {"from": "InboundTransferCreateParamsFrom"}, +) + + +class InboundTransferCreateParams(_InboundTransferCreateParamsBase): + amount: AmountParam + """ + The amount and currency to credit to the FinancialAccount. + """ + description: NotRequired[str] + """ + An optional, freeform description field intended to store metadata. + """ + to: "InboundTransferCreateParamsTo" + """ + The FinancialAccount and currency to credit with the transferred funds. + """ + + +class InboundTransferCreateParamsFrom(TypedDict): + currency: NotRequired[str] + """ + An optional currency field used to specify which currency is debited from the Payment Method. + Since many Payment Methods support only one currency, this field is optional. + """ + payment_method: str + """ + ID of the verified bank account credential to debit for this InboundTransfer (for example, `usba_`), not a Payments API `pm_` PaymentMethod. + """ + + +class InboundTransferCreateParamsTo(TypedDict): + currency: str + """ + The currency to credit to the FinancialAccount. + """ + financial_account: str + """ + The FinancialAccount that receives the funds. + """ diff --git a/stripe/params/v2/money_management/_inbound_transfer_list_params.py b/stripe/params/v2/money_management/_inbound_transfer_list_params.py new file mode 100644 index 000000000..42a4e77b9 --- /dev/null +++ b/stripe/params/v2/money_management/_inbound_transfer_list_params.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class InboundTransferListParams(TypedDict): + created: NotRequired["InboundTransferListParamsCreated"] + """ + Hash of options for filtering on creation time. + """ + limit: NotRequired[int] + """ + The page limit. + """ + + +class InboundTransferListParamsCreated(TypedDict): + gt: NotRequired[str] + """ + Filter for objects created after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + gte: NotRequired[str] + """ + Filter for objects created on or after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + lt: NotRequired[str] + """ + Filter for objects created before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + lte: NotRequired[str] + """ + Filter for objects created on or before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ diff --git a/stripe/params/v2/money_management/_inbound_transfer_retrieve_params.py b/stripe/params/v2/money_management/_inbound_transfer_retrieve_params.py new file mode 100644 index 000000000..541671578 --- /dev/null +++ b/stripe/params/v2/money_management/_inbound_transfer_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class InboundTransferRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_payment_cancel_params.py b/stripe/params/v2/money_management/_outbound_payment_cancel_params.py new file mode 100644 index 000000000..dda6b31b3 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_payment_cancel_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OutboundPaymentCancelParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_payment_create_params.py b/stripe/params/v2/money_management/_outbound_payment_create_params.py new file mode 100644 index 000000000..728b95d46 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_payment_create_params.py @@ -0,0 +1,142 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import UntypedStripeObject +from stripe.v2._amount import AmountParam +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + +_OutboundPaymentCreateParamsBase = TypedDict( + "OutboundPaymentCreateParams", + {"from": "OutboundPaymentCreateParamsFrom"}, +) + + +class OutboundPaymentCreateParams(_OutboundPaymentCreateParamsBase): + amount: AmountParam + """ + The requested amount and currency for the OutboundPayment. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the OutboundPayment. Often useful for displaying to users. + """ + metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + recipient_notification: NotRequired[ + "OutboundPaymentCreateParamsRecipientNotification" + ] + """ + Details about the notification settings for the OutboundPayment recipient. + """ + recipient_verification: NotRequired[str] + """ + The ID of the RecipientVerification for this OutboundPayment. Required where recipient-name verification is mandated before creating an OutboundPayment. + """ + statement_descriptor: NotRequired[str] + """ + The description that appears on the receiving end for an OutboundPayment (for example, on a bank statement). Must be between 3 and 22 characters long for most destinations (500 for FinancialAccount destinations), and not contain profanity. + """ + to: "OutboundPaymentCreateParamsTo" + """ + To which payout method to send the OutboundPayment. + """ + + +class OutboundPaymentCreateParamsFrom(TypedDict): + currency: str + """ + Describes the FinancialAmount's currency drawn from. + """ + financial_account: str + """ + The FinancialAccount that funds were pulled from. + """ + + +class OutboundPaymentCreateParamsRecipientNotification(TypedDict): + setting: Literal["configured", "none"] + """ + Closed Enum. Configuration option to enable or disable notifications to recipients. + Do not send notifications when `setting` is `none`. Use the account setting when `setting` is `configured` or omitted. + """ + + +class OutboundPaymentCreateParamsTo(TypedDict): + currency: NotRequired[str] + """ + Describes the currency to send to the recipient. + If included, this currency must match a currency supported by the destination. + Can be omitted in the following cases: + - destination only supports one currency + - destination supports multiple currencies and one matches `from.currency` + - destination supports multiple currencies and one matches `amount.currency` + When both `from.currency` and `amount.currency` are supported, Stripe selects `from.currency` to minimize currency conversion. + """ + payout_method: NotRequired[str] + """ + The payout method which the OutboundPayment uses to send payout. + """ + payout_method_options: NotRequired[ + "OutboundPaymentCreateParamsToPayoutMethodOptions" + ] + """ + Payout method options for the OutboundPayment. + """ + recipient: str + """ + To which account the OutboundPayment is sent. + """ + + +class OutboundPaymentCreateParamsToPayoutMethodOptions(TypedDict): + bank_account: NotRequired[ + "OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccount" + ] + """ + Options for bank account payout methods. + """ + + +class OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccount(TypedDict): + preferred_network_options: NotRequired[ + "OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions" + ] + """ + Per-network configuration options. + """ + preferred_networks: NotRequired[ + List[ + Union[ + Literal["ach", "fedwire", "fps", "rtp", "sepa", "swift"], str + ] + ] + ] + """ + The preferred networks to use for this OutboundPayment. + """ + + +class OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions( + TypedDict, +): + ach: NotRequired[ + "OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch" + ] + """ + ACH-specific network options. + """ + + +class OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch( + TypedDict, +): + submission: NotRequired["Literal['next_day', 'same_day']|str"] + """ + Open Enum. ACH submission timing. + """ + transaction_purpose: NotRequired["Literal['payroll']|str"] + """ + The transaction purpose for this ACH payment. + """ diff --git a/stripe/params/v2/money_management/_outbound_payment_list_params.py b/stripe/params/v2/money_management/_outbound_payment_list_params.py new file mode 100644 index 000000000..d55783452 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_payment_list_params.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundPaymentListParams(TypedDict): + created: NotRequired["OutboundPaymentListParamsCreated"] + """ + Filter OutboundPayments by their creation time. + """ + limit: NotRequired[int] + """ + The maximum number of results to return. + """ + recipient: NotRequired[str] + """ + Only return OutboundPayments sent to this recipient. + """ + status: NotRequired[ + List[Literal["canceled", "failed", "posted", "processing", "returned"]] + ] + """ + Closed Enum. Only return OutboundPayments with this status. + """ + + +class OutboundPaymentListParamsCreated(TypedDict): + gt: NotRequired[str] + """ + Filter for objects created after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + gte: NotRequired[str] + """ + Filter for objects created on or after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + lt: NotRequired[str] + """ + Filter for objects created before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + lte: NotRequired[str] + """ + Filter for objects created on or before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ diff --git a/stripe/params/v2/money_management/_outbound_payment_retrieve_params.py b/stripe/params/v2/money_management/_outbound_payment_retrieve_params.py new file mode 100644 index 000000000..bb7d9ff1c --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_payment_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OutboundPaymentRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_cancel_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_cancel_params.py new file mode 100644 index 000000000..14014f778 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_setup_intent_cancel_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OutboundSetupIntentCancelParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py new file mode 100644 index 000000000..999c672fa --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundSetupIntentCreateParams(TypedDict): + payout_method: NotRequired[str] + """ + If provided, the existing payout method resource to link to this setup intent. + Any payout_method_data provided is used to update information on this linked payout method resource. + """ + payout_method_data: NotRequired[ + "OutboundSetupIntentCreateParamsPayoutMethodData" + ] + """ + If no payout_method provided, used to create the underlying credential that is set up for outbound money movement. + If a payout_method provided, used to update data on the credential linked to this setup intent. + """ + usage_intent: NotRequired[Literal["payment", "transfer"]] + """ + Specify which type of outbound money movement this credential should be set up for (payment | transfer). + If not provided, defaults to payment. + """ + + +class OutboundSetupIntentCreateParamsPayoutMethodData(TypedDict): + bank_account: NotRequired[ + "OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount" + ] + """ + The type specific details of the bank account payout method. + """ + type: Union[Literal["bank_account", "card"], str] + """ + Open Enum. The type of payout method to be created. + """ + + +class OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount(TypedDict): + account_number: str + """ + The account number or IBAN of the bank account. + """ + bank_account_type: NotRequired[ + Literal["checking", "futsu", "savings", "toza"] + ] + """ + Closed Enum. The type of the bank account (checking or savings). + """ + branch_number: NotRequired[str] + """ + The branch number of the bank account, if present. + """ + country: str + """ + The country code of the bank account. + """ + currency: str + """ + The currency of the bank account. + """ + routing_number: NotRequired[str] + """ + The routing number of the bank account, if present. + """ + swift_code: NotRequired[str] + """ + The swift code of the bank account, if present. + """ diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_list_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_list_params.py new file mode 100644 index 000000000..a33979a61 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_setup_intent_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class OutboundSetupIntentListParams(TypedDict): + limit: NotRequired[int] + """ + The page size. + """ diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_retrieve_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_retrieve_params.py new file mode 100644 index 000000000..e3bb1a65f --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_setup_intent_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OutboundSetupIntentRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py new file mode 100644 index 000000000..7b222fe8c --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundSetupIntentUpdateParams(TypedDict): + payout_method: NotRequired[str] + """ + If provided, the existing payout method resource to link to this outbound setup intent. + """ + payout_method_data: NotRequired[ + "OutboundSetupIntentUpdateParamsPayoutMethodData" + ] + """ + If no payout_method provided, used to create the underlying credential that is set up for outbound money movement. + If a payout_method provided, used to update data on the credential linked to this setup intent. + Only card expiry (exp_month, exp_year) can be updated in the case where payout_method is provided. + """ + + +class OutboundSetupIntentUpdateParamsPayoutMethodData(TypedDict): + bank_account: NotRequired[ + "OutboundSetupIntentUpdateParamsPayoutMethodDataBankAccount" + ] + """ + The type specific details of the bank account payout method. + """ + type: Union[Literal["bank_account", "card"], str] + """ + Open Enum. The type of payout method to be created/updated. + """ + + +class OutboundSetupIntentUpdateParamsPayoutMethodDataBankAccount(TypedDict): + account_number: str + """ + The account number or IBAN of the bank account. + """ + bank_account_type: NotRequired[ + Literal["checking", "futsu", "savings", "toza"] + ] + """ + Closed Enum. The type of the bank account (checking or savings). + """ + branch_number: NotRequired[str] + """ + The branch number of the bank account, if present. + """ + country: str + """ + The country code of the bank account. + """ + currency: str + """ + The currency of the bank account. + """ + routing_number: NotRequired[str] + """ + The routing number of the bank account, if present. + """ + swift_code: NotRequired[str] + """ + The swift code of the bank account, if present. + """ diff --git a/stripe/params/v2/money_management/_payout_intent_cancel_params.py b/stripe/params/v2/money_management/_payout_intent_cancel_params.py new file mode 100644 index 000000000..88333dcf8 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_intent_cancel_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PayoutIntentCancelParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_intent_confirm_params.py b/stripe/params/v2/money_management/_payout_intent_confirm_params.py new file mode 100644 index 000000000..44c0b9e9b --- /dev/null +++ b/stripe/params/v2/money_management/_payout_intent_confirm_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PayoutIntentConfirmParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_intent_create_params.py b/stripe/params/v2/money_management/_payout_intent_create_params.py new file mode 100644 index 000000000..007f25764 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_intent_create_params.py @@ -0,0 +1,147 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import UntypedStripeObject +from stripe.v2._amount import AmountParam +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + +_PayoutIntentCreateParamsBase = TypedDict( + "PayoutIntentCreateParams", + {"from": "PayoutIntentCreateParamsFrom"}, +) + + +class PayoutIntentCreateParams(_PayoutIntentCreateParamsBase): + amount: AmountParam + """ + The monetary amount to be sent. + """ + confirmation_method: NotRequired["Literal['automatic', 'manual']|str"] + """ + Controls whether the PayoutIntent requires explicit confirmation before transitioning to `pending`. Defaults to `automatic`, but regulatory requirements may still require confirmation. See [Send money with Global Payouts](https://docs.stripe.com/global-payouts/send-money) for details. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the PayoutIntent. Often useful for displaying to users. + """ + metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + recipient_notification: NotRequired[ + "PayoutIntentCreateParamsRecipientNotification" + ] + """ + Recipient notification settings for the PayoutIntent. Only applicable when the PayoutIntent creates an OutboundPayment. + """ + schedule_options: NotRequired["PayoutIntentCreateParamsScheduleOptions"] + """ + Scheduling options for the payout. If omitted, the payout is scheduled for immediate execution. + """ + statement_descriptor: NotRequired[str] + """ + The description that appears on the receiving end for the payout (for example, on a bank statement). + """ + to: "PayoutIntentCreateParamsTo" + """ + To which payout method the payout is sent. + """ + + +class PayoutIntentCreateParamsFrom(TypedDict): + currency: str + """ + The currency of the financial account. + """ + financial_account: str + """ + The FinancialAccount that funds are pulled from. + """ + + +class PayoutIntentCreateParamsRecipientNotification(TypedDict): + setting: Literal["configured", "none"] + """ + Closed Enum. Configuration option to enable or disable notifications to recipients. + Do not send notifications when `setting` is `none`. Use the account setting when `setting` is `configured` or omitted. + """ + + +class PayoutIntentCreateParamsScheduleOptions(TypedDict): + execute_on: NotRequired[str] + """ + The date when the payout should be executed, in YYYY-MM-DD format. + """ + + +class PayoutIntentCreateParamsTo(TypedDict): + currency: NotRequired[str] + """ + The currency to send to the recipient. + """ + payout_method: NotRequired[str] + """ + The payout method ID for the PayoutIntent. Optional when the PayoutIntent creates an OutboundPayment and the recipient has a default payout method. Required when the PayoutIntent creates an OutboundTransfer. + """ + payout_method_options: NotRequired[ + "PayoutIntentCreateParamsToPayoutMethodOptions" + ] + """ + Payout method options for the PayoutIntent. + """ + recipient: NotRequired[str] + """ + The recipient ID for the PayoutIntent. + """ + + +class PayoutIntentCreateParamsToPayoutMethodOptions(TypedDict): + bank_account: NotRequired[ + "PayoutIntentCreateParamsToPayoutMethodOptionsBankAccount" + ] + """ + Options for bank account payout methods. + """ + + +class PayoutIntentCreateParamsToPayoutMethodOptionsBankAccount(TypedDict): + preferred_network_options: NotRequired[ + "PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions" + ] + """ + Per-network configuration options. + """ + preferred_networks: NotRequired[ + List[ + Union[ + Literal["ach", "fedwire", "fps", "rtp", "sepa", "swift"], str + ] + ] + ] + """ + The preferred networks to use for this PayoutIntent. + """ + + +class PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions( + TypedDict, +): + ach: NotRequired[ + "PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch" + ] + """ + ACH-specific network options. + """ + + +class PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch( + TypedDict, +): + submission: NotRequired["Literal['next_day', 'same_day']|str"] + """ + Open Enum. ACH submission timing. + """ + transaction_purpose: NotRequired["Literal['payroll']|str"] + """ + The transaction purpose for this ACH payment. + """ diff --git a/stripe/params/v2/money_management/_payout_intent_list_params.py b/stripe/params/v2/money_management/_payout_intent_list_params.py new file mode 100644 index 000000000..a8e04bab6 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_intent_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class PayoutIntentListParams(TypedDict): + limit: NotRequired[int] + """ + Maximum number of objects to return. Defaults to 10. Maximum is 100. + """ diff --git a/stripe/params/v2/money_management/_payout_intent_refresh_fx_quote_params.py b/stripe/params/v2/money_management/_payout_intent_refresh_fx_quote_params.py new file mode 100644 index 000000000..1a674d352 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_intent_refresh_fx_quote_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PayoutIntentRefreshFxQuoteParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_intent_refresh_recipient_verification_params.py b/stripe/params/v2/money_management/_payout_intent_refresh_recipient_verification_params.py new file mode 100644 index 000000000..9751b9c6c --- /dev/null +++ b/stripe/params/v2/money_management/_payout_intent_refresh_recipient_verification_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PayoutIntentRefreshRecipientVerificationParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_intent_retrieve_params.py b/stripe/params/v2/money_management/_payout_intent_retrieve_params.py new file mode 100644 index 000000000..5b4656563 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_intent_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PayoutIntentRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_intent_update_params.py b/stripe/params/v2/money_management/_payout_intent_update_params.py new file mode 100644 index 000000000..652d4227e --- /dev/null +++ b/stripe/params/v2/money_management/_payout_intent_update_params.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import UntypedStripeObject +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PayoutIntentUpdateParams(TypedDict): + description: NotRequired[str] + """ + An arbitrary string attached to the PayoutIntent. Often useful for displaying to users. + """ + metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + recipient_notification: NotRequired[ + "PayoutIntentUpdateParamsRecipientNotification" + ] + """ + Recipient notification settings for the PayoutIntent. Only applicable when the PayoutIntent creates an OutboundPayment. + """ + schedule_options: NotRequired["PayoutIntentUpdateParamsScheduleOptions"] + """ + Scheduling options for the payout. If omitted, the payout is scheduled for immediate execution. + """ + statement_descriptor: NotRequired[str] + """ + The description that appears on the receiving end for the payout (for example, on a bank statement). + """ + to: NotRequired["PayoutIntentUpdateParamsTo"] + """ + To which payout method the payout is sent. + """ + + +class PayoutIntentUpdateParamsRecipientNotification(TypedDict): + setting: Literal["configured", "none"] + """ + Closed Enum. Configuration option to enable or disable notifications to recipients. + Do not send notifications when `setting` is `none`. Use the account setting when `setting` is `configured` or omitted. + """ + + +class PayoutIntentUpdateParamsScheduleOptions(TypedDict): + execute_on: NotRequired[str] + """ + The date when the payout should be executed, in YYYY-MM-DD format. + """ + + +class PayoutIntentUpdateParamsTo(TypedDict): + currency: NotRequired[str] + """ + The currency to send to the recipient. + """ + payout_method: NotRequired[str] + """ + The payout method ID for the PayoutIntent. Optional when the PayoutIntent creates an OutboundPayment and the recipient has a default payout method. Required when the PayoutIntent creates an OutboundTransfer. + """ + payout_method_options: NotRequired[ + "PayoutIntentUpdateParamsToPayoutMethodOptions" + ] + """ + Payout method options for the PayoutIntent. + """ + recipient: NotRequired[str] + """ + The recipient ID for the PayoutIntent. + """ + + +class PayoutIntentUpdateParamsToPayoutMethodOptions(TypedDict): + bank_account: NotRequired[ + "PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccount" + ] + """ + Options for bank account payout methods. + """ + + +class PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccount(TypedDict): + preferred_network_options: NotRequired[ + "PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions" + ] + """ + Per-network configuration options. + """ + preferred_networks: NotRequired[ + List[ + Union[ + Literal["ach", "fedwire", "fps", "rtp", "sepa", "swift"], str + ] + ] + ] + """ + The preferred networks to use for this PayoutIntent. + """ + + +class PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptions( + TypedDict, +): + ach: NotRequired[ + "PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch" + ] + """ + ACH-specific network options. + """ + + +class PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch( + TypedDict, +): + submission: NotRequired["Literal['next_day', 'same_day']|str"] + """ + Open Enum. ACH submission timing. + """ + transaction_purpose: NotRequired["Literal['payroll']|str"] + """ + The transaction purpose for this ACH payment. + """ diff --git a/stripe/params/v2/money_management/_payout_method_archive_params.py b/stripe/params/v2/money_management/_payout_method_archive_params.py new file mode 100644 index 000000000..18c1af2a7 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_method_archive_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PayoutMethodArchiveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_method_list_params.py b/stripe/params/v2/money_management/_payout_method_list_params.py new file mode 100644 index 000000000..693f83887 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_method_list_params.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PayoutMethodListParams(TypedDict): + limit: NotRequired[int] + """ + The page size. + """ + usage_status: NotRequired["PayoutMethodListParamsUsageStatus"] + """ + Usage status filter. + """ + + +class PayoutMethodListParamsUsageStatus(TypedDict): + payments: NotRequired[ + List[ + Literal[ + "disabled", + "eligible", + "ineligible", + "invalid", + "requires_action", + ] + ] + ] + """ + List of payments status to filter by. + """ + transfers: NotRequired[ + List[ + Literal[ + "disabled", + "eligible", + "ineligible", + "invalid", + "requires_action", + ] + ] + ] + """ + List of transfers status to filter by. + """ diff --git a/stripe/params/v2/money_management/_payout_method_retrieve_params.py b/stripe/params/v2/money_management/_payout_method_retrieve_params.py new file mode 100644 index 000000000..27b86fb68 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_method_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PayoutMethodRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_method_unarchive_params.py b/stripe/params/v2/money_management/_payout_method_unarchive_params.py new file mode 100644 index 000000000..8b9cca601 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_method_unarchive_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PayoutMethodUnarchiveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_methods_bank_account_spec_retrieve_params.py b/stripe/params/v2/money_management/_payout_methods_bank_account_spec_retrieve_params.py new file mode 100644 index 000000000..c7f24039c --- /dev/null +++ b/stripe/params/v2/money_management/_payout_methods_bank_account_spec_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class PayoutMethodsBankAccountSpecRetrieveParams(TypedDict): + countries: NotRequired[List[str]] + """ + The countries to fetch the bank account spec for. + """ diff --git a/stripe/params/v2/money_management/_received_credit_list_params.py b/stripe/params/v2/money_management/_received_credit_list_params.py new file mode 100644 index 000000000..5ffdc71cf --- /dev/null +++ b/stripe/params/v2/money_management/_received_credit_list_params.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class ReceivedCreditListParams(TypedDict): + created: NotRequired["ReceivedCreditListParamsCreated"] + """ + Hash of options for filtering on creation time. + """ + limit: NotRequired[int] + """ + The page limit. + """ + + +class ReceivedCreditListParamsCreated(TypedDict): + gt: NotRequired[str] + """ + Filter for objects created after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + gte: NotRequired[str] + """ + Filter for objects created on or after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + lt: NotRequired[str] + """ + Filter for objects created before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + lte: NotRequired[str] + """ + Filter for objects created on or before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ diff --git a/stripe/params/v2/money_management/_received_credit_retrieve_params.py b/stripe/params/v2/money_management/_received_credit_retrieve_params.py new file mode 100644 index 000000000..cb73914a7 --- /dev/null +++ b/stripe/params/v2/money_management/_received_credit_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ReceivedCreditRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_recipient_verification_acknowledge_params.py b/stripe/params/v2/money_management/_recipient_verification_acknowledge_params.py new file mode 100644 index 000000000..1ab6dd220 --- /dev/null +++ b/stripe/params/v2/money_management/_recipient_verification_acknowledge_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class RecipientVerificationAcknowledgeParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_recipient_verification_create_params.py b/stripe/params/v2/money_management/_recipient_verification_create_params.py new file mode 100644 index 000000000..b08fca1e4 --- /dev/null +++ b/stripe/params/v2/money_management/_recipient_verification_create_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class RecipientVerificationCreateParams(TypedDict): + payout_method: str + """ + ID of the payout method. + """ + recipient: NotRequired[str] + """ + ID of the recipient account. Required if the recipient is different from the sender. Omit for payouts to your own account. + """ diff --git a/stripe/params/v2/money_management/_recipient_verification_retrieve_params.py b/stripe/params/v2/money_management/_recipient_verification_retrieve_params.py new file mode 100644 index 000000000..9f4e4cfba --- /dev/null +++ b/stripe/params/v2/money_management/_recipient_verification_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class RecipientVerificationRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_transaction_entry_list_params.py b/stripe/params/v2/money_management/_transaction_entry_list_params.py new file mode 100644 index 000000000..e969ae234 --- /dev/null +++ b/stripe/params/v2/money_management/_transaction_entry_list_params.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class TransactionEntryListParams(TypedDict): + created: NotRequired["TransactionEntryListParamsCreated"] + """ + Filter for TransactionEntries created within a specified time range. + """ + limit: NotRequired[int] + """ + The page limit. + """ + transaction: NotRequired[str] + """ + Filter for TransactionEntries belonging to a specific Transaction. This filter only supports + filtering by a Transaction ID, which appears in each TransactionEntry's `transaction` field. + """ + + +class TransactionEntryListParamsCreated(TypedDict): + gt: NotRequired[str] + """ + Filter for objects created after the specified timestamp. + """ + gte: NotRequired[str] + """ + Filter for objects created at or after the specified timestamp. + """ + lt: NotRequired[str] + """ + Filter for objects created before the specified timestamp. + """ + lte: NotRequired[str] + """ + Filter for objects created at or before the specified timestamp. + """ diff --git a/stripe/params/v2/money_management/_transaction_entry_retrieve_params.py b/stripe/params/v2/money_management/_transaction_entry_retrieve_params.py new file mode 100644 index 000000000..3a13c9d20 --- /dev/null +++ b/stripe/params/v2/money_management/_transaction_entry_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class TransactionEntryRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_transaction_list_params.py b/stripe/params/v2/money_management/_transaction_list_params.py new file mode 100644 index 000000000..d3f5e9052 --- /dev/null +++ b/stripe/params/v2/money_management/_transaction_list_params.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class TransactionListParams(TypedDict): + created: NotRequired["TransactionListParamsCreated"] + """ + Filter for Transactions created within a specified time range. + """ + financial_account: NotRequired[str] + """ + Filter for Transactions belonging to a specific FinancialAccount. This filter only supports filtering by the FinancialAccount's ID. + """ + flow: NotRequired[str] + """ + Filter for Transactions created by a specific flow object. This filter only supports filtering by + the flow object's ID, such as `ibt_123` for an InboundTransfer. A value that doesn't match a flow ID + returns an empty list. + """ + limit: NotRequired[int] + """ + The page limit. + """ + + +class TransactionListParamsCreated(TypedDict): + gt: NotRequired[str] + """ + Filter for objects created after the specified timestamp. + """ + gte: NotRequired[str] + """ + Filter for objects created at or after the specified timestamp. + """ + lt: NotRequired[str] + """ + Filter for objects created before the specified timestamp. + """ + lte: NotRequired[str] + """ + Filter for objects created at or before the specified timestamp. + """ diff --git a/stripe/params/v2/money_management/_transaction_refresh_regulatory_receipt_params.py b/stripe/params/v2/money_management/_transaction_refresh_regulatory_receipt_params.py new file mode 100644 index 000000000..677744618 --- /dev/null +++ b/stripe/params/v2/money_management/_transaction_refresh_regulatory_receipt_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class TransactionRefreshRegulatoryReceiptParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_transaction_retrieve_params.py b/stripe/params/v2/money_management/_transaction_retrieve_params.py new file mode 100644 index 000000000..e12e85e70 --- /dev/null +++ b/stripe/params/v2/money_management/_transaction_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class TransactionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_transaction_update_params.py b/stripe/params/v2/money_management/_transaction_update_params.py new file mode 100644 index 000000000..80ab1d9ce --- /dev/null +++ b/stripe/params/v2/money_management/_transaction_update_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import UntypedStripeObject +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class TransactionUpdateParams(TypedDict): + description: NotRequired[str] + """ + A description of the Transaction, up to 100 characters. Pass `null` to clear the description, + or omit this parameter to leave it unchanged. + """ + metadata: NotRequired[ + "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]" + ] + """ + Set of key-value pairs that you can attach to the Transaction. Individual keys can be unset by posting + null to them. + """ diff --git a/stripe/params/v2/money_management/test_helpers/__init__.py b/stripe/params/v2/money_management/test_helpers/__init__.py new file mode 100644 index 000000000..fce7636b2 --- /dev/null +++ b/stripe/params/v2/money_management/test_helpers/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.money_management.test_helpers._financial_address_credit_params import ( + FinancialAddressCreditParams as FinancialAddressCreditParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "FinancialAddressCreditParams": ( + "stripe.params.v2.money_management.test_helpers._financial_address_credit_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/money_management/test_helpers/_financial_address_credit_params.py b/stripe/params/v2/money_management/test_helpers/_financial_address_credit_params.py new file mode 100644 index 000000000..ea0814f3d --- /dev/null +++ b/stripe/params/v2/money_management/test_helpers/_financial_address_credit_params.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing import Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAddressCreditParams(TypedDict): + amount: AmountParam + """ + Object containing the amount value and currency to credit. + """ + network: Union[ + Literal["ach", "chaps", "fedwire", "fps", "rtp", "sepa"], str + ] + """ + Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit. + """ + statement_descriptor: NotRequired[str] + """ + String explaining funds flow. Use this field to populate the statement descriptor of the ReceivedCredit created as an eventual result of this simulation. + """ diff --git a/stripe/params/v2/test_helpers/__init__.py b/stripe/params/v2/test_helpers/__init__.py new file mode 100644 index 000000000..c998edf88 --- /dev/null +++ b/stripe/params/v2/test_helpers/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.test_helpers._money_management_recipient_verifications_params import ( + MoneyManagementRecipientVerificationsParams as MoneyManagementRecipientVerificationsParams, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "MoneyManagementRecipientVerificationsParams": ( + "stripe.params.v2.test_helpers._money_management_recipient_verifications_params", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/params/v2/test_helpers/_money_management_recipient_verifications_params.py b/stripe/params/v2/test_helpers/_money_management_recipient_verifications_params.py new file mode 100644 index 000000000..ad5240781 --- /dev/null +++ b/stripe/params/v2/test_helpers/_money_management_recipient_verifications_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class MoneyManagementRecipientVerificationsParams(TypedDict): + match_result: Literal["close_match", "match", "no_match", "unavailable"] + """ + Expected match level of the RecipientVerification to be created: `match`, `close_match`, `no_match`, `unavailable`. + For `close_match`, the simulated response appends "close_match" to the provided name in match_result_details.matched_name. + """ + payout_method: str + """ + ID of the payout method. + """ + recipient: NotRequired[str] + """ + ID of the recipient account. Required if the recipient is different from the sender. Omit for payouts to your own account. + """ diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index 3ae2e6d53..78b93c94b 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -66,7 +66,9 @@ class TaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -80,6 +82,7 @@ class TaxId(StripeObject): "br_cnpj", "br_cpf", "bs_tin", + "bw_vat", "by_tin", "ca_bn", "ca_gst_hst", @@ -90,12 +93,14 @@ class TaxId(StripeObject): "cd_nif", "ch_uid", "ch_vat", + "ci_vat", "cl_tin", "cm_niu", "cn_tin", "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -105,8 +110,12 @@ class TaxId(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", + "gh_tin", "gi_tin", "gn_nif", "hk_br", @@ -116,6 +125,7 @@ class TaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -131,23 +141,28 @@ class TaxId(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -157,12 +172,15 @@ class TaxId(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -181,7 +199,7 @@ class TaxId(StripeObject): str, ] """ - 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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_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`, `ic_nif`, or `unknown` + 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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_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`, `au_acn`, `nz_bn`, `pt_nif`, `cz_dic`, `fr_siret`, `fr_siren`, `fr_spi`, `sm_coe`, `tt_vat`, `tt_bir`, `mu_vat`, `mz_nuit`, `au_wpn`, `md_cf`, `is_kt`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, `ic_nif`, `gh_tin`, `bw_vat`, `ci_vat`, or `unknown` """ value: str """ @@ -282,6 +300,7 @@ class TaxRateDetails(StripeObject): "communications_tax", "digital_excise_tax", "entertainment_tax", + "get_fund", "gross_receipts_tax", "gst", "hospitality_tax", @@ -291,6 +310,7 @@ class TaxRateDetails(StripeObject): "lease_tax", "luxury_tax", "mass_transit_parking_tax", + "nhil", "parking_tax", "pst", "qst", @@ -426,6 +446,7 @@ class FlatAmount(StripeObject): "communications_tax", "digital_excise_tax", "entertainment_tax", + "get_fund", "gross_receipts_tax", "gst", "hospitality_tax", @@ -435,6 +456,7 @@ class FlatAmount(StripeObject): "lease_tax", "luxury_tax", "mass_transit_parking_tax", + "nhil", "parking_tax", "pst", "qst", diff --git a/stripe/tax/_calculation_line_item.py b/stripe/tax/_calculation_line_item.py index 6057ba080..86f118107 100644 --- a/stripe/tax/_calculation_line_item.py +++ b/stripe/tax/_calculation_line_item.py @@ -52,6 +52,7 @@ class TaxRateDetails(StripeObject): "communications_tax", "digital_excise_tax", "entertainment_tax", + "get_fund", "gross_receipts_tax", "gst", "hospitality_tax", @@ -61,6 +62,7 @@ class TaxRateDetails(StripeObject): "lease_tax", "luxury_tax", "mass_transit_parking_tax", + "nhil", "parking_tax", "pst", "qst", diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index 02dc41a87..2f9b36286 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -198,6 +198,12 @@ class Bs(StripeObject): Type of registration in `country`. """ + class Bw(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class By(StripeObject): type: Literal["simplified"] """ @@ -242,6 +248,12 @@ class Standard(StripeObject): """ _inner_class_types = {"standard": Standard} + class Ci(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Cl(StripeObject): type: Literal["simplified"] """ @@ -456,6 +468,12 @@ class Ge(StripeObject): Type of registration in `country`. """ + class Gh(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Gn(StripeObject): type: Literal["standard"] """ @@ -730,6 +748,12 @@ class Standard(StripeObject): """ _inner_class_types = {"standard": Standard} + class Mu(StripeObject): + type: Literal["simplified"] + """ + Type of registration in `country`. + """ + class Mx(StripeObject): type: Literal["simplified"] """ @@ -1115,6 +1139,12 @@ class TourismTax(StripeObject): A [jurisdiction code](https://docs.stripe.com/tax/registering?type=tourism_tax#registration-types) representing the local jurisdiction. """ + class UtilityUsersTax(StripeObject): + jurisdiction: str + """ + A [jurisdiction code](https://docs.stripe.com/tax/registering?type=utility_users_tax#registration-types) representing the local jurisdiction. + """ + admissions_tax: Optional[AdmissionsTax] attendance_tax: Optional[AttendanceTax] entertainment_tax: Optional[EntertainmentTax] @@ -1136,6 +1166,7 @@ class TourismTax(StripeObject): Literal[ "admissions_tax", "attendance_tax", + "digital_excise_tax", "entertainment_tax", "gross_receipts_tax", "hospitality_tax", @@ -1149,12 +1180,14 @@ class TourismTax(StripeObject): "state_retail_delivery_fee", "state_sales_tax", "tourism_tax", + "utility_users_tax", ], str, ] """ Type of registration in the US. """ + utility_users_tax: Optional[UtilityUsersTax] _inner_class_types = { "admissions_tax": AdmissionsTax, "attendance_tax": AttendanceTax, @@ -1169,6 +1202,7 @@ class TourismTax(StripeObject): "resort_tax": ResortTax, "state_sales_tax": StateSalesTax, "tourism_tax": TourismTax, + "utility_users_tax": UtilityUsersTax, } class Uy(StripeObject): @@ -1224,10 +1258,12 @@ class Zw(StripeObject): bh: Optional[Bh] bj: Optional[Bj] bs: Optional[Bs] + bw: Optional[Bw] by: Optional[By] ca: Optional[Ca] cd: Optional[Cd] ch: Optional[Ch] + ci: Optional[Ci] cl: Optional[Cl] cm: Optional[Cm] co: Optional[Co] @@ -1246,6 +1282,7 @@ class Zw(StripeObject): fr: Optional[Fr] gb: Optional[Gb] ge: Optional[Ge] + gh: Optional[Gh] gn: Optional[Gn] gr: Optional[Gr] hr: Optional[Hr] @@ -1272,6 +1309,7 @@ class Zw(StripeObject): mk: Optional[Mk] mr: Optional[Mr] mt: Optional[Mt] + mu: Optional[Mu] mx: Optional[Mx] my: Optional[My] ng: Optional[Ng] @@ -1326,10 +1364,12 @@ class Zw(StripeObject): "bh": Bh, "bj": Bj, "bs": Bs, + "bw": Bw, "by": By, "ca": Ca, "cd": Cd, "ch": Ch, + "ci": Ci, "cl": Cl, "cm": Cm, "co": Co, @@ -1348,6 +1388,7 @@ class Zw(StripeObject): "fr": Fr, "gb": Gb, "ge": Ge, + "gh": Gh, "gn": Gn, "gr": Gr, "hr": Hr, @@ -1374,6 +1415,7 @@ class Zw(StripeObject): "mk": Mk, "mr": Mr, "mt": Mt, + "mu": Mu, "mx": Mx, "my": My, "ng": Ng, diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index 46c0aa69e..5f1642525 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -69,7 +69,9 @@ class TaxId(StripeObject): "ao_tin", "ar_cuit", "au_abn", + "au_acn", "au_arn", + "au_wpn", "aw_tin", "az_tin", "ba_tin", @@ -83,6 +85,7 @@ class TaxId(StripeObject): "br_cnpj", "br_cpf", "bs_tin", + "bw_vat", "by_tin", "ca_bn", "ca_gst_hst", @@ -93,12 +96,14 @@ class TaxId(StripeObject): "cd_nif", "ch_uid", "ch_vat", + "ci_vat", "cl_tin", "cm_niu", "cn_tin", "co_nit", "cr_tin", "cv_nif", + "cz_dic", "de_stn", "do_rcn", "ec_ruc", @@ -108,8 +113,12 @@ class TaxId(StripeObject): "eu_oss_vat", "eu_vat", "fo_vat", + "fr_siren", + "fr_siret", + "fr_spi", "gb_vat", "ge_vat", + "gh_tin", "gi_tin", "gn_nif", "hk_br", @@ -119,6 +128,7 @@ class TaxId(StripeObject): "id_npwp", "il_vat", "in_gst", + "is_kt", "is_vat", "it_cf", "jp_cn", @@ -134,23 +144,28 @@ class TaxId(StripeObject): "li_vat", "lk_vat", "ma_vat", + "md_cf", "md_vat", "me_pib", "mk_vat", "mr_nif", + "mu_vat", "mx_rfc", "my_frp", "my_itn", "my_sst", + "mz_nuit", "ng_tin", "no_vat", "no_voec", "np_pan", + "nz_bn", "nz_gst", "om_vat", "pe_ruc", "ph_tin", "pl_nip", + "pt_nif", "py_ruc", "ro_tin", "rs_pib", @@ -160,12 +175,15 @@ class TaxId(StripeObject): "sg_gst", "sg_uen", "si_tin", + "sm_coe", "sn_ninea", "sr_fin", "sv_nit", "th_vat", "tj_tin", "tr_tin", + "tt_bir", + "tt_vat", "tw_vat", "tz_vat", "ua_vat", @@ -184,7 +202,7 @@ class TaxId(StripeObject): str, ] """ - 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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_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`, `ic_nif`, or `unknown` + 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`, `pl_nip`, `it_cf`, `fo_vat`, `gi_tin`, `py_ruc`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `lk_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`, `au_acn`, `nz_bn`, `pt_nif`, `cz_dic`, `fr_siret`, `fr_siren`, `fr_spi`, `sm_coe`, `tt_vat`, `tt_bir`, `mu_vat`, `mz_nuit`, `au_wpn`, `md_cf`, `is_kt`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, `ic_nif`, `gh_tin`, `bw_vat`, `ci_vat`, or `unknown` """ value: str """ @@ -291,6 +309,7 @@ class TaxRateDetails(StripeObject): "communications_tax", "digital_excise_tax", "entertainment_tax", + "get_fund", "gross_receipts_tax", "gst", "hospitality_tax", @@ -300,6 +319,7 @@ class TaxRateDetails(StripeObject): "lease_tax", "luxury_tax", "mass_transit_parking_tax", + "nhil", "parking_tax", "pst", "qst", diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index ecd41f324..9ca2569b6 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -69,6 +69,12 @@ class Offline(StripeObject): Determines whether to allow transactions to be collected while reader is offline. Defaults to false. """ + class ReaderSecurity(StripeObject): + admin_menu_passcode: str + """ + Passcode used to access a reader's admin menu. + """ + class RebootWindow(StripeObject): end_hour: int """ @@ -91,6 +97,12 @@ class StripeS710(StripeObject): A File ID representing an image to display on the reader """ + class StripeT600(StripeObject): + splashscreen: Optional[ExpandableField["File"]] + """ + A File ID representing an image to display on the reader + """ + class Tipping(StripeObject): class Aed(StripeObject): fixed_amounts: Optional[List[int]] @@ -558,9 +570,11 @@ class PersonalPsk(StripeObject): String representing the object's type. Objects of the same type share the same value. """ offline: Optional[Offline] + reader_security: Optional[ReaderSecurity] reboot_window: Optional[RebootWindow] stripe_s700: Optional[StripeS700] stripe_s710: Optional[StripeS710] + stripe_t600: Optional[StripeT600] tipping: Optional[Tipping] verifone_m425: Optional[VerifoneM425] verifone_p400: Optional[VerifoneP400] @@ -800,9 +814,11 @@ async def retrieve_async( "bbpos_wisepos_e": BbposWiseposE, "cellular": Cellular, "offline": Offline, + "reader_security": ReaderSecurity, "reboot_window": RebootWindow, "stripe_s700": StripeS700, "stripe_s710": StripeS710, + "stripe_t600": StripeT600, "tipping": Tipping, "verifone_m425": VerifoneM425, "verifone_p400": VerifoneP400, diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index c7787092a..a66b1089d 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -274,11 +274,13 @@ class ApiError(StripeObject): "shipping_calculation_failed", "siret_invalid", "sku_inactive", + "smart_disputes_not_available", "state_unsupported", "status_transition_invalid", "storer_capability_missing", "storer_capability_not_active", "stripe_tax_inactive", + "subscription_update_trial_after_billing_cycle_anchor", "tax_id_invalid", "tax_id_prohibited", "taxes_calculation_failed", @@ -290,6 +292,8 @@ class ApiError(StripeObject): "terminal_reader_offline", "terminal_reader_timeout", "testmode_charges_only", + "three_d_secure_authentication_not_supported", + "three_d_secure_authentication_upstream_error", "tls_version_unsupported", "token_already_used", "token_card_network_invalid", @@ -907,6 +911,7 @@ class LineItem(StripeObject): "mobile_phone_reader", "simulated_stripe_s700", "simulated_stripe_s710", + "simulated_stripe_t600", "simulated_verifone_m425", "simulated_verifone_p630", "simulated_verifone_ux700", @@ -915,6 +920,7 @@ class LineItem(StripeObject): "stripe_m2", "stripe_s700", "stripe_s710", + "stripe_t600", "verifone_P400", "verifone_m425", "verifone_p630", diff --git a/stripe/test_helpers/_customer_service.py b/stripe/test_helpers/_customer_service.py index e6b651ff3..2b1c58fcd 100644 --- a/stripe/test_helpers/_customer_service.py +++ b/stripe/test_helpers/_customer_service.py @@ -24,7 +24,7 @@ def fund_cash_balance( options: Optional["RequestOptions"] = None, ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", @@ -47,7 +47,7 @@ async def fund_cash_balance_async( options: Optional["RequestOptions"] = None, ) -> "CustomerCashBalanceTransaction": """ - Create an incoming testmode bank transfer + Create a test incoming bank transfer """ return cast( "CustomerCashBalanceTransaction", diff --git a/stripe/treasury/_credit_reversal.py b/stripe/treasury/_credit_reversal.py index 3fe46f7f1..1fd053e1a 100644 --- a/stripe/treasury/_credit_reversal.py +++ b/stripe/treasury/_credit_reversal.py @@ -26,6 +26,8 @@ class CreditReversal( ListableAPIResource["CreditReversal"], ): """ + Legacy CreditReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ diff --git a/stripe/treasury/_debit_reversal.py b/stripe/treasury/_debit_reversal.py index 379541f5e..3632edeb9 100644 --- a/stripe/treasury/_debit_reversal.py +++ b/stripe/treasury/_debit_reversal.py @@ -26,6 +26,8 @@ class DebitReversal( ListableAPIResource["DebitReversal"], ): """ + Legacy DebitReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). + You can reverse some [ReceivedDebits](https://docs.stripe.com/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. """ diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 33ce64cb7..0940ed9f2 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -42,6 +42,8 @@ class FinancialAccount( UpdateableAPIResource["FinancialAccount"], ): """ + Legacy FinancialAccounts are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Financial Accounts](https://docs.stripe.com/api/v2/money-management/financial-accounts) instead of building a new v1 integration. + Stripe Treasury for Platforms provides users with a container for money called a FinancialAccount that is separate from their Payments balance. FinancialAccounts serve as the source and destination of Treasury for Platform's money movement APIs. """ diff --git a/stripe/treasury/_inbound_transfer.py b/stripe/treasury/_inbound_transfer.py index 40f845dee..b2861a4d6 100644 --- a/stripe/treasury/_inbound_transfer.py +++ b/stripe/treasury/_inbound_transfer.py @@ -41,6 +41,8 @@ class InboundTransfer( ListableAPIResource["InboundTransfer"], ): """ + Legacy InboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Inbound Transfers](https://docs.stripe.com/api/v2/money-management/inbound-transfers) instead of building a new v1 integration. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://docs.stripe.com/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index 28d557491..6808978f5 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -44,6 +44,8 @@ class OutboundPayment( ListableAPIResource["OutboundPayment"], ): """ + Legacy OutboundPayments are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Payments](https://docs.stripe.com/api/v2/money-management/outbound-payments) instead of building a new v1 integration. + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py index 890c7b689..d84dba8ef 100644 --- a/stripe/treasury/_outbound_transfer.py +++ b/stripe/treasury/_outbound_transfer.py @@ -44,6 +44,8 @@ class OutboundTransfer( ListableAPIResource["OutboundTransfer"], ): """ + Legacy OutboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Transfers](https://docs.stripe.com/api/v2/money-management/outbound-transfers?api-version=preview) instead of building a new v1 integration. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. diff --git a/stripe/treasury/_received_credit.py b/stripe/treasury/_received_credit.py index ecdda797d..4bc8dbdf7 100644 --- a/stripe/treasury/_received_credit.py +++ b/stripe/treasury/_received_credit.py @@ -27,6 +27,8 @@ class ReceivedCredit(ListableAPIResource["ReceivedCredit"]): """ + Legacy ReceivedCredits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + ReceivedCredits represent funds sent to a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. """ @@ -131,10 +133,14 @@ class LinkedFlows(StripeObject): class SourceFlowDetails(StripeObject): credit_reversal: Optional["CreditReversal"] """ + Legacy CreditReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ outbound_payment: Optional["OutboundPayment"] """ + Legacy OutboundPayments are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Payments](https://docs.stripe.com/api/v2/money-management/outbound-payments) instead of building a new v1 integration. + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. @@ -143,6 +149,8 @@ class SourceFlowDetails(StripeObject): """ outbound_transfer: Optional["OutboundTransfer"] """ + Legacy OutboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Transfers](https://docs.stripe.com/api/v2/money-management/outbound-transfers?api-version=preview) instead of building a new v1 integration. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. diff --git a/stripe/treasury/_received_debit.py b/stripe/treasury/_received_debit.py index 64d1ecf02..ef4e98888 100644 --- a/stripe/treasury/_received_debit.py +++ b/stripe/treasury/_received_debit.py @@ -23,6 +23,8 @@ class ReceivedDebit(ListableAPIResource["ReceivedDebit"]): """ + Legacy ReceivedDebits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Debits](https://docs.stripe.com/api/v2/money-management/received-debits?api-version=preview) instead of building a new v1 integration. + ReceivedDebits represent funds pulled from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts). These are not initiated from the FinancialAccount. """ diff --git a/stripe/treasury/_transaction.py b/stripe/treasury/_transaction.py index b6e0602f2..b383cb3d0 100644 --- a/stripe/treasury/_transaction.py +++ b/stripe/treasury/_transaction.py @@ -26,6 +26,8 @@ class Transaction(ListableAPIResource["Transaction"]): """ + Legacy Transactions are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Transactions](https://docs.stripe.com/api/v2/money-management/transactions) instead of building a new v1 integration. + Transactions represent changes to a [FinancialAccount's](https://docs.stripe.com/api#financial_accounts) balance. """ @@ -50,14 +52,20 @@ class BalanceImpact(StripeObject): class FlowDetails(StripeObject): credit_reversal: Optional["CreditReversal"] """ + Legacy CreditReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ debit_reversal: Optional["DebitReversal"] """ + Legacy DebitReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). + You can reverse some [ReceivedDebits](https://docs.stripe.com/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. """ inbound_transfer: Optional["InboundTransfer"] """ + Legacy InboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Inbound Transfers](https://docs.stripe.com/api/v2/money-management/inbound-transfers) instead of building a new v1 integration. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://docs.stripe.com/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) @@ -72,6 +80,8 @@ class FlowDetails(StripeObject): """ outbound_payment: Optional["OutboundPayment"] """ + Legacy OutboundPayments are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Payments](https://docs.stripe.com/api/v2/money-management/outbound-payments) instead of building a new v1 integration. + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. @@ -80,6 +90,8 @@ class FlowDetails(StripeObject): """ outbound_transfer: Optional["OutboundTransfer"] """ + Legacy OutboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Transfers](https://docs.stripe.com/api/v2/money-management/outbound-transfers?api-version=preview) instead of building a new v1 integration. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. @@ -88,10 +100,14 @@ class FlowDetails(StripeObject): """ received_credit: Optional["ReceivedCredit"] """ + Legacy ReceivedCredits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + ReceivedCredits represent funds sent to a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. """ received_debit: Optional["ReceivedDebit"] """ + Legacy ReceivedDebits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Debits](https://docs.stripe.com/api/v2/money-management/received-debits?api-version=preview) instead of building a new v1 integration. + ReceivedDebits represent funds pulled from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts). These are not initiated from the FinancialAccount. """ type: Union[ diff --git a/stripe/treasury/_transaction_entry.py b/stripe/treasury/_transaction_entry.py index 11bef2a3a..1ac4d9068 100644 --- a/stripe/treasury/_transaction_entry.py +++ b/stripe/treasury/_transaction_entry.py @@ -27,6 +27,8 @@ class TransactionEntry(ListableAPIResource["TransactionEntry"]): """ + Legacy TransactionEntries are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Transaction Entries](https://docs.stripe.com/api/v2/money-management/transaction-entries) instead of building a new v1 integration. + TransactionEntries represent individual units of money movements within a single [Transaction](https://docs.stripe.com/api#transactions). """ @@ -51,14 +53,20 @@ class BalanceImpact(StripeObject): class FlowDetails(StripeObject): credit_reversal: Optional["CreditReversal"] """ + Legacy CreditReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + You can reverse some [ReceivedCredits](https://docs.stripe.com/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. """ debit_reversal: Optional["DebitReversal"] """ + Legacy DebitReversals are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). + You can reverse some [ReceivedDebits](https://docs.stripe.com/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. """ inbound_transfer: Optional["InboundTransfer"] """ + Legacy InboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Inbound Transfers](https://docs.stripe.com/api/v2/money-management/inbound-transfers) instead of building a new v1 integration. + Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://docs.stripe.com/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) @@ -73,6 +81,8 @@ class FlowDetails(StripeObject): """ outbound_payment: Optional["OutboundPayment"] """ + Legacy OutboundPayments are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Payments](https://docs.stripe.com/api/v2/money-management/outbound-payments) instead of building a new v1 integration. + Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://docs.stripe.com/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://docs.stripe.com/api#outbound_transfers). Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. @@ -81,6 +91,8 @@ class FlowDetails(StripeObject): """ outbound_transfer: Optional["OutboundTransfer"] """ + Legacy OutboundTransfers are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Outbound Transfers](https://docs.stripe.com/api/v2/money-management/outbound-transfers?api-version=preview) instead of building a new v1 integration. + Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://docs.stripe.com/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. @@ -89,10 +101,14 @@ class FlowDetails(StripeObject): """ received_credit: Optional["ReceivedCredit"] """ + Legacy ReceivedCredits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Credits](https://docs.stripe.com/api/v2/money-management/received-credits?api-version=preview) instead of building a new v1 integration. + ReceivedCredits represent funds sent to a [FinancialAccount](https://docs.stripe.com/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. """ received_debit: Optional["ReceivedDebit"] """ + Legacy ReceivedDebits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in [Treasury for platforms v2](https://docs.stripe.com/treasury/connect). Use [Received Debits](https://docs.stripe.com/api/v2/money-management/received-debits?api-version=preview) instead of building a new v1 integration. + ReceivedDebits represent funds pulled from a [FinancialAccount](https://docs.stripe.com/api#financial_accounts). These are not initiated from the FinancialAccount. """ type: Union[ diff --git a/stripe/v2/__init__.py b/stripe/v2/__init__.py index 68ab3737f..0ea295493 100644 --- a/stripe/v2/__init__.py +++ b/stripe/v2/__init__.py @@ -14,21 +14,33 @@ billing as billing, commerce as commerce, core as core, + money_management as money_management, + test_helpers as test_helpers, ) from stripe.v2._billing_service import BillingService as BillingService from stripe.v2._commerce_service import CommerceService as CommerceService from stripe.v2._core_service import CoreService as CoreService from stripe.v2._deleted_object import DeletedObject as DeletedObject + from stripe.v2._money_management_service import ( + MoneyManagementService as MoneyManagementService, + ) + from stripe.v2._test_helper_service import ( + TestHelperService as TestHelperService, + ) # name -> (import_target, is_submodule) _import_map = { "billing": ("stripe.v2.billing", True), "commerce": ("stripe.v2.commerce", True), "core": ("stripe.v2.core", True), + "money_management": ("stripe.v2.money_management", True), + "test_helpers": ("stripe.v2.test_helpers", True), "BillingService": ("stripe.v2._billing_service", False), "CommerceService": ("stripe.v2._commerce_service", False), "CoreService": ("stripe.v2._core_service", False), "DeletedObject": ("stripe.v2._deleted_object", False), + "MoneyManagementService": ("stripe.v2._money_management_service", False), + "TestHelperService": ("stripe.v2._test_helper_service", False), } if not TYPE_CHECKING: diff --git a/stripe/v2/_core_service.py b/stripe/v2/_core_service.py index 6d95f80e3..35a600637 100644 --- a/stripe/v2/_core_service.py +++ b/stripe/v2/_core_service.py @@ -12,6 +12,7 @@ EventDestinationService, ) from stripe.v2.core._event_service import EventService + from stripe.v2.core._vault_service import VaultService _subservices = { "accounts": ["stripe.v2.core._account_service", "AccountService"], @@ -28,6 +29,7 @@ "stripe.v2.core._event_destination_service", "EventDestinationService", ], + "vault": ["stripe.v2.core._vault_service", "VaultService"], } @@ -37,6 +39,7 @@ class CoreService(StripeService): account_tokens: "AccountTokenService" events: "EventService" event_destinations: "EventDestinationService" + vault: "VaultService" def __init__(self, requestor): super().__init__(requestor) diff --git a/stripe/v2/_money_management_service.py b/stripe/v2/_money_management_service.py new file mode 100644 index 000000000..8460edc4c --- /dev/null +++ b/stripe/v2/_money_management_service.py @@ -0,0 +1,144 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.money_management._adjustment_service import ( + AdjustmentService, + ) + from stripe.v2.money_management._financial_account_service import ( + FinancialAccountService, + ) + from stripe.v2.money_management._financial_address_service import ( + FinancialAddressService, + ) + from stripe.v2.money_management._inbound_transfer_service import ( + InboundTransferService, + ) + from stripe.v2.money_management._outbound_payment_service import ( + OutboundPaymentService, + ) + from stripe.v2.money_management._outbound_setup_intent_service import ( + OutboundSetupIntentService, + ) + from stripe.v2.money_management._payout_intent_service import ( + PayoutIntentService, + ) + from stripe.v2.money_management._payout_method_service import ( + PayoutMethodService, + ) + from stripe.v2.money_management._payout_methods_bank_account_spec_service import ( + PayoutMethodsBankAccountSpecService, + ) + from stripe.v2.money_management._received_credit_service import ( + ReceivedCreditService, + ) + from stripe.v2.money_management._recipient_verification_service import ( + RecipientVerificationService, + ) + from stripe.v2.money_management._test_helpers_service import ( + TestHelpersService, + ) + from stripe.v2.money_management._transaction_entry_service import ( + TransactionEntryService, + ) + from stripe.v2.money_management._transaction_service import ( + TransactionService, + ) + +_subservices = { + "adjustments": [ + "stripe.v2.money_management._adjustment_service", + "AdjustmentService", + ], + "financial_accounts": [ + "stripe.v2.money_management._financial_account_service", + "FinancialAccountService", + ], + "financial_addresses": [ + "stripe.v2.money_management._financial_address_service", + "FinancialAddressService", + ], + "inbound_transfers": [ + "stripe.v2.money_management._inbound_transfer_service", + "InboundTransferService", + ], + "outbound_payments": [ + "stripe.v2.money_management._outbound_payment_service", + "OutboundPaymentService", + ], + "outbound_setup_intents": [ + "stripe.v2.money_management._outbound_setup_intent_service", + "OutboundSetupIntentService", + ], + "payout_intents": [ + "stripe.v2.money_management._payout_intent_service", + "PayoutIntentService", + ], + "payout_methods": [ + "stripe.v2.money_management._payout_method_service", + "PayoutMethodService", + ], + "payout_methods_bank_account_spec": [ + "stripe.v2.money_management._payout_methods_bank_account_spec_service", + "PayoutMethodsBankAccountSpecService", + ], + "received_credits": [ + "stripe.v2.money_management._received_credit_service", + "ReceivedCreditService", + ], + "recipient_verifications": [ + "stripe.v2.money_management._recipient_verification_service", + "RecipientVerificationService", + ], + "test_helpers": [ + "stripe.v2.money_management._test_helpers_service", + "TestHelpersService", + ], + "transactions": [ + "stripe.v2.money_management._transaction_service", + "TransactionService", + ], + "transaction_entries": [ + "stripe.v2.money_management._transaction_entry_service", + "TransactionEntryService", + ], +} + + +class MoneyManagementService(StripeService): + adjustments: "AdjustmentService" + financial_accounts: "FinancialAccountService" + financial_addresses: "FinancialAddressService" + inbound_transfers: "InboundTransferService" + outbound_payments: "OutboundPaymentService" + outbound_setup_intents: "OutboundSetupIntentService" + payout_intents: "PayoutIntentService" + payout_methods: "PayoutMethodService" + payout_methods_bank_account_spec: "PayoutMethodsBankAccountSpecService" + received_credits: "ReceivedCreditService" + recipient_verifications: "RecipientVerificationService" + test_helpers: "TestHelpersService" + transactions: "TransactionService" + transaction_entries: "TransactionEntryService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/_test_helper_service.py b/stripe/v2/_test_helper_service.py new file mode 100644 index 000000000..f2868cf08 --- /dev/null +++ b/stripe/v2/_test_helper_service.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.test_helpers._money_management_service import ( + MoneyManagementService, + ) + +_subservices = { + "money_management": [ + "stripe.v2.test_helpers._money_management_service", + "MoneyManagementService", + ], +} + + +class TestHelperService(StripeService): + money_management: "MoneyManagementService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/core/__init__.py b/stripe/v2/core/__init__.py index 4a5b9ff11..b84e7015f 100644 --- a/stripe/v2/core/__init__.py +++ b/stripe/v2/core/__init__.py @@ -13,7 +13,7 @@ from importlib import import_module if TYPE_CHECKING: - from stripe.v2.core import accounts as accounts + from stripe.v2.core import accounts as accounts, vault as vault from stripe.v2.core._account import Account as Account from stripe.v2.core._account_link import AccountLink as AccountLink from stripe.v2.core._account_link_service import ( @@ -38,10 +38,12 @@ EventDestinationService as EventDestinationService, ) from stripe.v2.core._event_service import EventService as EventService + from stripe.v2.core._vault_service import VaultService as VaultService # name -> (import_target, is_submodule) _import_map = { "accounts": ("stripe.v2.core.accounts", True), + "vault": ("stripe.v2.core.vault", True), "Account": ("stripe.v2.core._account", False), "AccountLink": ("stripe.v2.core._account_link", False), "AccountLinkService": ("stripe.v2.core._account_link_service", False), @@ -57,6 +59,7 @@ False, ), "EventService": ("stripe.v2.core._event_service", False), + "VaultService": ("stripe.v2.core._vault_service", False), } if not TYPE_CHECKING: diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index dfdd584ad..9f5c0091f 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -252,11 +252,11 @@ class BacsDebitPayments(StripeObject): class Branding(StripeObject): icon: Optional[str] """ - ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): An icon for the merchant. Must be square and at least 128px x 128px. + ID of a [file upload](https://docs.stripe.com/api/files/create): An icon for the merchant. Must be square and at least 128px x 128px. """ logo: Optional[str] """ - ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px. + ID of a [file upload](https://docs.stripe.com/api/files/create): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px. """ primary_color: Optional[str] """ @@ -2933,6 +2933,419 @@ class Address(StripeObject): class Recipient(StripeObject): class Capabilities(StripeObject): + class BankAccounts(StripeObject): + class Ach(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = {"status_details": StatusDetail} + + class Fedwire(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = {"status_details": StatusDetail} + + class Fps(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = {"status_details": StatusDetail} + + class Local(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = {"status_details": StatusDetail} + + class Rtp(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = {"status_details": StatusDetail} + + class Sepa(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = {"status_details": StatusDetail} + + class Swift(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", + "no_resolution", + "provide_info", + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = {"status_details": StatusDetail} + + ach: Optional[Ach] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over ACH rails. + """ + fedwire: Optional[Fedwire] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over Fedwire or CHIPS. + """ + fps: Optional[Fps] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over FPS rails. + """ + local: Optional[Local] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over local networks. + """ + rtp: Optional[Rtp] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over RTP rails. + """ + sepa: Optional[Sepa] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over SEPA rails. + """ + swift: Optional[Swift] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over SWIFT. + """ + _inner_class_types = { + "ach": Ach, + "fedwire": Fedwire, + "fps": Fps, + "local": Local, + "rtp": Rtp, + "sepa": Sepa, + "swift": Swift, + } + + class Cards(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "rejected_fraud", + "rejected_incomplete_verification", + "rejected_listed", + "rejected_other", + "rejected_platform_fraud", + "rejected_platform_other", + "rejected_platform_terms_of_service", + "rejected_terms_of_service", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + status: Literal[ + "active", + "pending", + "rejected", + "restricted", + "unsupported", + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = {"status_details": StatusDetail} + class StripeBalance(StripeObject): class Payouts(StripeObject): class StatusDetail(StripeObject): @@ -3041,11 +3454,23 @@ class StatusDetail(StripeObject): "stripe_transfers": StripeTransfers, } + bank_accounts: Optional[BankAccounts] + """ + Capabilities that enable OutboundPayments to a bank account linked to this Account. + """ + cards: Optional[Cards] + """ + Enables this Account to receive OutboundPayments to a linked debit card. + """ stripe_balance: Optional[StripeBalance] """ Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). """ - _inner_class_types = {"stripe_balance": StripeBalance} + _inner_class_types = { + "bank_accounts": BankAccounts, + "cards": Cards, + "stripe_balance": StripeBalance, + } applied: bool """ @@ -3211,6 +3636,10 @@ class Responsibilities(StripeObject): """ The Account's preferred locales (languages), ordered by preference. """ + payout_methods: Optional[UntypedStripeObject[str]] + """ + Default payout methods per currency. Keys are three-letter [ISO currency codes](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Values are v2 Payout Method IDs. + """ profile: Optional[Profile] """ Account profile information. @@ -3225,6 +3654,206 @@ class Responsibilities(StripeObject): } class FutureRequirements(StripeObject): + class Alternative(StripeObject): + class Option(StripeObject): + class Entry(StripeObject): + class Error(StripeObject): + code: Union[ + Literal[ + "invalid_address_city_state_postal_code", + "invalid_address_cmra_address", + "invalid_address_highway_contract_box", + "invalid_address_private_mailbox", + "invalid_address_registered_agent_address", + "invalid_business_profile_name", + "invalid_business_profile_name_denylisted", + "invalid_company_name_denylisted", + "invalid_dob_age_over_maximum", + "invalid_dob_age_under_18", + "invalid_dob_age_under_minimum", + "invalid_product_description_length", + "invalid_product_description_url_match", + "invalid_representative_country", + "invalid_statement_descriptor_business_mismatch", + "invalid_statement_descriptor_denylisted", + "invalid_statement_descriptor_length", + "invalid_statement_descriptor_prefix_denylisted", + "invalid_statement_descriptor_prefix_mismatch", + "invalid_street_address", + "invalid_tax_id", + "invalid_tax_id_format", + "invalid_tos_acceptance", + "invalid_url_denylisted", + "invalid_url_format", + "invalid_url_website_business_information_mismatch", + "invalid_url_website_empty", + "invalid_url_website_inaccessible", + "invalid_url_website_inaccessible_geoblocked", + "invalid_url_website_inaccessible_password_protected", + "invalid_url_website_incomplete", + "invalid_url_website_incomplete_cancellation_policy", + "invalid_url_website_incomplete_customer_service_details", + "invalid_url_website_incomplete_legal_restrictions", + "invalid_url_website_incomplete_refund_policy", + "invalid_url_website_incomplete_return_policy", + "invalid_url_website_incomplete_terms_and_conditions", + "invalid_url_website_incomplete_under_construction", + "invalid_url_website_other", + "invalid_url_web_presence_detected", + "invalid_value_other", + "unresolvable_ip_address", + "unresolvable_postal_code", + "verification_directors_mismatch", + "verification_document_address_mismatch", + "verification_document_address_missing", + "verification_document_corrupt", + "verification_document_country_not_supported", + "verification_document_directors_mismatch", + "verification_document_dob_mismatch", + "verification_document_duplicate_type", + "verification_document_expired", + "verification_document_failed_copy", + "verification_document_failed_greyscale", + "verification_document_failed_other", + "verification_document_failed_test_mode", + "verification_document_fraudulent", + "verification_document_id_number_mismatch", + "verification_document_id_number_missing", + "verification_document_incomplete", + "verification_document_invalid", + "verification_document_issue_or_expiry_date_missing", + "verification_document_manipulated", + "verification_document_missing_back", + "verification_document_missing_front", + "verification_document_name_mismatch", + "verification_document_name_missing", + "verification_document_nationality_mismatch", + "verification_document_not_readable", + "verification_document_not_signed", + "verification_document_not_uploaded", + "verification_document_photo_mismatch", + "verification_document_too_large", + "verification_document_type_not_supported", + "verification_extraneous_directors", + "verification_failed_address_match", + "verification_failed_business_iec_number", + "verification_failed_document_match", + "verification_failed_id_number_match", + "verification_failed_keyed_identity", + "verification_failed_keyed_match", + "verification_failed_name_match", + "verification_failed_other", + "verification_failed_representative_authority", + "verification_failed_residential_address", + "verification_failed_tax_id_match", + "verification_failed_tax_id_not_issued", + "verification_missing_directors", + "verification_missing_executives", + "verification_missing_owners", + "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", + "verification_selfie_document_missing_photo", + "verification_selfie_face_mismatch", + "verification_selfie_manipulated", + "verification_selfie_unverified_other", + "verification_supportability", + "verification_token_stale", + ], + str, + ] + """ + Machine-readable code describing the error. + """ + description: str + """ + Human-readable description of the error. + """ + + class Reference(StripeObject): + inquiry: Optional[str] + """ + If `inquiry` is the type, the inquiry token. + """ + resource: Optional[str] + """ + If `resource` is the type, the resource token. + """ + type: Union[ + Literal["inquiry", "payment_method", "person"], str + ] + """ + The type of the reference. If the type is "inquiry", the inquiry token can be found in the "inquiry" field. + Otherwise the type is an API resource, the token for which can be found in the "resource" field. + """ + + awaiting_action_from: Literal["stripe", "user"] + """ + Indicates whether the user or Stripe is currently responsible for taking action on the requirement. Value can be `user` or `stripe`. + """ + description: str + """ + Machine-readable string describing the requirement. + """ + errors: List[Error] + """ + Descriptions of why the requirement must be collected, or why the collected information isn't satisfactory to Stripe. + """ + reference: Optional[Reference] + """ + A reference to the location of the requirement. + """ + _inner_class_types = { + "errors": Error, + "reference": Reference, + } + + entries: List[Entry] + """ + The requirements that must all be provided to satisfy this option. + """ + _inner_class_types = {"entries": Entry} + + class OriginalEntry(StripeObject): + class Reference(StripeObject): + inquiry: Optional[str] + """ + If `inquiry` is the type, the inquiry token. + """ + resource: Optional[str] + """ + If `resource` is the type, the resource token. + """ + type: Union[ + Literal["inquiry", "payment_method", "person"], str + ] + """ + The type of the reference. If the type is "inquiry", the inquiry token can be found in the "inquiry" field. + Otherwise the type is an API resource, the token for which can be found in the "resource" field. + """ + + description: str + """ + Machine-readable string describing the requirement. + """ + reference: Optional[Reference] + """ + A reference to the location of the requirement. + """ + _inner_class_types = {"reference": Reference} + + options: List[Option] + """ + The alternative sets of requirements that can be provided. Providing every entry in any one of these options resolves all of the requirements in `original_entries`. + """ + original_entries: List[OriginalEntry] + """ + The requirements that can be satisfied either directly, or by providing every entry in any one of `options`. + """ + _inner_class_types = { + "options": Option, + "original_entries": OriginalEntry, + } + class Entry(StripeObject): class Error(StripeObject): code: Union[ @@ -3360,7 +3989,13 @@ class Deadline(StripeObject): "au_becs_debit_payments", "bacs_debit_payments", "bancontact_payments", + "bank_accounts.ach", + "bank_accounts.fedwire", + "bank_accounts.fps", "bank_accounts.local", + "bank_accounts.rtp", + "bank_accounts.sepa", + "bank_accounts.swift", "bank_accounts.wire", "blik_payments", "blik_recurring_payments", @@ -3459,7 +4094,7 @@ class RequestedReason(StripeObject): awaiting_action_from: Literal["stripe", "user"] """ - Indicates whether the platform or Stripe is currently responsible for taking action on the requirement. Value can be `user` or `stripe`. + Indicates whether the user or Stripe is currently responsible for taking action on the requirement. Value can be `user` or `stripe`. """ description: str """ @@ -3510,6 +4145,10 @@ class MinimumDeadline(StripeObject): """ _inner_class_types = {"minimum_deadline": MinimumDeadline} + alternatives: Optional[List[Alternative]] + """ + A list of alternative sets of requirements that can be provided in lieu of requirements in `entries`. + """ entries: Optional[List[Entry]] """ A list of requirements for the Account. @@ -3522,7 +4161,11 @@ class MinimumDeadline(StripeObject): """ An object containing an overview of requirements for the Account. """ - _inner_class_types = {"entries": Entry, "summary": Summary} + _inner_class_types = { + "alternatives": Alternative, + "entries": Entry, + "summary": Summary, + } class Identity(StripeObject): class Attestations(StripeObject): @@ -3608,7 +4251,7 @@ class Account(StripeObject): account: Optional[Account] """ - Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). + Details on the Account's acceptance of the Stripe Services Agreement. """ _inner_class_types = {"account": Account} @@ -3721,7 +4364,7 @@ class Documents(StripeObject): class BankAccountOwnershipVerification(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -3731,7 +4374,7 @@ class BankAccountOwnershipVerification(StripeObject): class CompanyLicense(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -3741,7 +4384,7 @@ class CompanyLicense(StripeObject): class CompanyMemorandumOfAssociation(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -3751,7 +4394,7 @@ class CompanyMemorandumOfAssociation(StripeObject): class CompanyMinisterialDecree(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -3761,7 +4404,7 @@ class CompanyMinisterialDecree(StripeObject): class CompanyRegistrationVerification(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -3771,7 +4414,7 @@ class CompanyRegistrationVerification(StripeObject): class CompanyTaxIdVerification(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -3782,16 +4425,16 @@ class PrimaryVerification(StripeObject): class FrontBack(StripeObject): back: Optional[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: str """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front_back: FrontBack """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens for the front and back of the verification document. + The [file upload](https://docs.stripe.com/api/files/create) tokens for the front and back of the verification document. """ type: Union[Literal["front_back"], str] """ @@ -3802,7 +4445,7 @@ class FrontBack(StripeObject): class ProofOfAddress(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -3818,7 +4461,7 @@ class Signer(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ signer: Optional[Signer] """ @@ -3839,7 +4482,7 @@ class Signer(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ signer: Optional[Signer] """ @@ -4374,7 +5017,7 @@ class Documents(StripeObject): class CompanyAuthorization(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -4384,7 +5027,7 @@ class CompanyAuthorization(StripeObject): class Passport(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -4395,16 +5038,16 @@ class PrimaryVerification(StripeObject): class FrontBack(StripeObject): back: Optional[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: str """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front_back: FrontBack """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens for the front and back of the verification document. + The [file upload](https://docs.stripe.com/api/files/create) tokens for the front and back of the verification document. """ type: Union[Literal["front_back"], str] """ @@ -4416,16 +5059,16 @@ class SecondaryVerification(StripeObject): class FrontBack(StripeObject): back: Optional[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: str """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front_back: FrontBack """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens for the front and back of the verification document. + The [file upload](https://docs.stripe.com/api/files/create) tokens for the front and back of the verification document. """ type: Union[Literal["front_back"], str] """ @@ -4436,7 +5079,7 @@ class FrontBack(StripeObject): class Visa(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -4836,6 +5479,206 @@ class Kanji(StripeObject): } class Requirements(StripeObject): + class Alternative(StripeObject): + class Option(StripeObject): + class Entry(StripeObject): + class Error(StripeObject): + code: Union[ + Literal[ + "invalid_address_city_state_postal_code", + "invalid_address_cmra_address", + "invalid_address_highway_contract_box", + "invalid_address_private_mailbox", + "invalid_address_registered_agent_address", + "invalid_business_profile_name", + "invalid_business_profile_name_denylisted", + "invalid_company_name_denylisted", + "invalid_dob_age_over_maximum", + "invalid_dob_age_under_18", + "invalid_dob_age_under_minimum", + "invalid_product_description_length", + "invalid_product_description_url_match", + "invalid_representative_country", + "invalid_statement_descriptor_business_mismatch", + "invalid_statement_descriptor_denylisted", + "invalid_statement_descriptor_length", + "invalid_statement_descriptor_prefix_denylisted", + "invalid_statement_descriptor_prefix_mismatch", + "invalid_street_address", + "invalid_tax_id", + "invalid_tax_id_format", + "invalid_tos_acceptance", + "invalid_url_denylisted", + "invalid_url_format", + "invalid_url_website_business_information_mismatch", + "invalid_url_website_empty", + "invalid_url_website_inaccessible", + "invalid_url_website_inaccessible_geoblocked", + "invalid_url_website_inaccessible_password_protected", + "invalid_url_website_incomplete", + "invalid_url_website_incomplete_cancellation_policy", + "invalid_url_website_incomplete_customer_service_details", + "invalid_url_website_incomplete_legal_restrictions", + "invalid_url_website_incomplete_refund_policy", + "invalid_url_website_incomplete_return_policy", + "invalid_url_website_incomplete_terms_and_conditions", + "invalid_url_website_incomplete_under_construction", + "invalid_url_website_other", + "invalid_url_web_presence_detected", + "invalid_value_other", + "unresolvable_ip_address", + "unresolvable_postal_code", + "verification_directors_mismatch", + "verification_document_address_mismatch", + "verification_document_address_missing", + "verification_document_corrupt", + "verification_document_country_not_supported", + "verification_document_directors_mismatch", + "verification_document_dob_mismatch", + "verification_document_duplicate_type", + "verification_document_expired", + "verification_document_failed_copy", + "verification_document_failed_greyscale", + "verification_document_failed_other", + "verification_document_failed_test_mode", + "verification_document_fraudulent", + "verification_document_id_number_mismatch", + "verification_document_id_number_missing", + "verification_document_incomplete", + "verification_document_invalid", + "verification_document_issue_or_expiry_date_missing", + "verification_document_manipulated", + "verification_document_missing_back", + "verification_document_missing_front", + "verification_document_name_mismatch", + "verification_document_name_missing", + "verification_document_nationality_mismatch", + "verification_document_not_readable", + "verification_document_not_signed", + "verification_document_not_uploaded", + "verification_document_photo_mismatch", + "verification_document_too_large", + "verification_document_type_not_supported", + "verification_extraneous_directors", + "verification_failed_address_match", + "verification_failed_business_iec_number", + "verification_failed_document_match", + "verification_failed_id_number_match", + "verification_failed_keyed_identity", + "verification_failed_keyed_match", + "verification_failed_name_match", + "verification_failed_other", + "verification_failed_representative_authority", + "verification_failed_residential_address", + "verification_failed_tax_id_match", + "verification_failed_tax_id_not_issued", + "verification_missing_directors", + "verification_missing_executives", + "verification_missing_owners", + "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", + "verification_selfie_document_missing_photo", + "verification_selfie_face_mismatch", + "verification_selfie_manipulated", + "verification_selfie_unverified_other", + "verification_supportability", + "verification_token_stale", + ], + str, + ] + """ + Machine-readable code describing the error. + """ + description: str + """ + Human-readable description of the error. + """ + + class Reference(StripeObject): + inquiry: Optional[str] + """ + If `inquiry` is the type, the inquiry token. + """ + resource: Optional[str] + """ + If `resource` is the type, the resource token. + """ + type: Union[ + Literal["inquiry", "payment_method", "person"], str + ] + """ + The type of the reference. If the type is "inquiry", the inquiry token can be found in the "inquiry" field. + Otherwise the type is an API resource, the token for which can be found in the "resource" field. + """ + + awaiting_action_from: Literal["stripe", "user"] + """ + Indicates whether the user or Stripe is currently responsible for taking action on the requirement. Value can be `user` or `stripe`. + """ + description: str + """ + Machine-readable string describing the requirement. + """ + errors: List[Error] + """ + Descriptions of why the requirement must be collected, or why the collected information isn't satisfactory to Stripe. + """ + reference: Optional[Reference] + """ + A reference to the location of the requirement. + """ + _inner_class_types = { + "errors": Error, + "reference": Reference, + } + + entries: List[Entry] + """ + The requirements that must all be provided to satisfy this option. + """ + _inner_class_types = {"entries": Entry} + + class OriginalEntry(StripeObject): + class Reference(StripeObject): + inquiry: Optional[str] + """ + If `inquiry` is the type, the inquiry token. + """ + resource: Optional[str] + """ + If `resource` is the type, the resource token. + """ + type: Union[ + Literal["inquiry", "payment_method", "person"], str + ] + """ + The type of the reference. If the type is "inquiry", the inquiry token can be found in the "inquiry" field. + Otherwise the type is an API resource, the token for which can be found in the "resource" field. + """ + + description: str + """ + Machine-readable string describing the requirement. + """ + reference: Optional[Reference] + """ + A reference to the location of the requirement. + """ + _inner_class_types = {"reference": Reference} + + options: List[Option] + """ + The alternative sets of requirements that can be provided. Providing every entry in any one of these options resolves all of the requirements in `original_entries`. + """ + original_entries: List[OriginalEntry] + """ + The requirements that can be satisfied either directly, or by providing every entry in any one of `options`. + """ + _inner_class_types = { + "options": Option, + "original_entries": OriginalEntry, + } + class Entry(StripeObject): class Error(StripeObject): code: Union[ @@ -4971,7 +5814,13 @@ class Deadline(StripeObject): "au_becs_debit_payments", "bacs_debit_payments", "bancontact_payments", + "bank_accounts.ach", + "bank_accounts.fedwire", + "bank_accounts.fps", "bank_accounts.local", + "bank_accounts.rtp", + "bank_accounts.sepa", + "bank_accounts.swift", "bank_accounts.wire", "blik_payments", "blik_recurring_payments", @@ -5070,7 +5919,7 @@ class RequestedReason(StripeObject): awaiting_action_from: Literal["stripe", "user"] """ - Indicates whether the platform or Stripe is currently responsible for taking action on the requirement. Value can be `user` or `stripe`. + Indicates whether the user or Stripe is currently responsible for taking action on the requirement. Value can be `user` or `stripe`. """ description: str """ @@ -5121,6 +5970,10 @@ class MinimumDeadline(StripeObject): """ _inner_class_types = {"minimum_deadline": MinimumDeadline} + alternatives: Optional[List[Alternative]] + """ + A list of alternative sets of requirements that can be provided in lieu of requirements in `entries`. + """ entries: Optional[List[Entry]] """ A list of requirements for the Account. @@ -5129,7 +5982,11 @@ class MinimumDeadline(StripeObject): """ An object containing an overview of requirements for the Account. """ - _inner_class_types = {"entries": Entry, "summary": Summary} + _inner_class_types = { + "alternatives": Alternative, + "entries": Entry, + "summary": Summary, + } applied_configurations: List[Literal["customer", "merchant", "recipient"]] """ diff --git a/stripe/v2/core/_account_person.py b/stripe/v2/core/_account_person.py index e1c4a1608..7f4bada74 100644 --- a/stripe/v2/core/_account_person.py +++ b/stripe/v2/core/_account_person.py @@ -136,7 +136,7 @@ class Documents(StripeObject): class CompanyAuthorization(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -146,7 +146,7 @@ class CompanyAuthorization(StripeObject): class Passport(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ @@ -157,16 +157,16 @@ class PrimaryVerification(StripeObject): class FrontBack(StripeObject): back: Optional[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: str """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front_back: FrontBack """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens for the front and back of the verification document. + The [file upload](https://docs.stripe.com/api/files/create) tokens for the front and back of the verification document. """ type: Union[Literal["front_back"], str] """ @@ -178,16 +178,16 @@ class SecondaryVerification(StripeObject): class FrontBack(StripeObject): back: Optional[str] """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front: str """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + A [file upload](https://docs.stripe.com/api/files/create) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. """ front_back: FrontBack """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens for the front and back of the verification document. + The [file upload](https://docs.stripe.com/api/files/create) tokens for the front and back of the verification document. """ type: Union[Literal["front_back"], str] """ @@ -198,7 +198,7 @@ class FrontBack(StripeObject): class Visa(StripeObject): files: List[str] """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/files/create) with a purpose value of `account_requirement`. """ type: Union[Literal["files"], str] """ diff --git a/stripe/v2/core/_event.py b/stripe/v2/core/_event.py index 4c4920c6d..f437abc9e 100644 --- a/stripe/v2/core/_event.py +++ b/stripe/v2/core/_event.py @@ -76,7 +76,7 @@ class Request(StripeObject): """ snapshot_event: Optional[str] """ - For interop events, this is the snapshot event ID. + For thin events with a corresponding snapshot event, this is the snapshot event ID. """ type: str """ diff --git a/stripe/v2/core/_event_destination.py b/stripe/v2/core/_event_destination.py index 7066be9e8..1ad0377b9 100644 --- a/stripe/v2/core/_event_destination.py +++ b/stripe/v2/core/_event_destination.py @@ -138,7 +138,7 @@ class WebhookEndpoint(StripeObject): """ snapshot_api_version: Optional[str] """ - For snapshot events only, the Stripe API version used to render event objects. Thin events are not pinned to an API version. + For snapshot events only, the Stripe API version used to render event objects. You can't change this value after you create the event destination. Thin events are not pinned to an API version. """ status: Literal["disabled", "enabled"] """ diff --git a/stripe/v2/core/_vault_service.py b/stripe/v2/core/_vault_service.py new file mode 100644 index 000000000..5bb8b0cd8 --- /dev/null +++ b/stripe/v2/core/_vault_service.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.core.vault._gb_bank_account_service import ( + GbBankAccountService, + ) + from stripe.v2.core.vault._us_bank_account_service import ( + UsBankAccountService, + ) + +_subservices = { + "gb_bank_accounts": [ + "stripe.v2.core.vault._gb_bank_account_service", + "GbBankAccountService", + ], + "us_bank_accounts": [ + "stripe.v2.core.vault._us_bank_account_service", + "UsBankAccountService", + ], +} + + +class VaultService(StripeService): + gb_bank_accounts: "GbBankAccountService" + us_bank_accounts: "UsBankAccountService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/core/vault/__init__.py b/stripe/v2/core/vault/__init__.py new file mode 100644 index 000000000..63de1389d --- /dev/null +++ b/stripe/v2/core/vault/__init__.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.core.vault._gb_bank_account import ( + GbBankAccount as GbBankAccount, + ) + from stripe.v2.core.vault._gb_bank_account_service import ( + GbBankAccountService as GbBankAccountService, + ) + from stripe.v2.core.vault._us_bank_account import ( + UsBankAccount as UsBankAccount, + ) + from stripe.v2.core.vault._us_bank_account_service import ( + UsBankAccountService as UsBankAccountService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "GbBankAccount": ("stripe.v2.core.vault._gb_bank_account", False), + "GbBankAccountService": ( + "stripe.v2.core.vault._gb_bank_account_service", + False, + ), + "UsBankAccount": ("stripe.v2.core.vault._us_bank_account", False), + "UsBankAccountService": ( + "stripe.v2.core.vault._us_bank_account_service", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/core/vault/_gb_bank_account.py b/stripe/v2/core/vault/_gb_bank_account.py new file mode 100644 index 000000000..f3cd17489 --- /dev/null +++ b/stripe/v2/core/vault/_gb_bank_account.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional +from typing_extensions import Literal + + +class GbBankAccount(StripeObject): + """ + Use the GBBankAccounts API to create and manage GB bank account objects + """ + + OBJECT_NAME: ClassVar[Literal["v2.core.vault.gb_bank_account"]] = ( + "v2.core.vault.gb_bank_account" + ) + archived: bool + """ + Whether this bank account object was archived. Bank account objects can be archived through + the /archive API, and they will not be automatically archived by Stripe. Archived bank account objects + cannot be used as outbound destinations and will not appear in the outbound destination list. + """ + bank_account_type: Literal["checking", "savings"] + """ + Closed Enum. The type of the bank account (checking or savings). + """ + bank_name: str + """ + The name of the bank. + """ + created: str + """ + Creation time. + """ + id: str + """ + The ID of the GBBankAccount object. + """ + last4: str + """ + The last 4 digits of the account number or IBAN. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.core.vault.gb_bank_account"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + restricted: bool + """ + Whether the GB Bank Account is currently unusable for money movement, despite potentially being correctly set up. Please reach out to Stripe Support for more information. + """ + sort_code: Optional[str] + """ + The Sort Code of the bank account. + """ + supported_currencies: List[str] + """ + The list of currencies supported by this bank account. + """ diff --git a/stripe/v2/core/vault/_gb_bank_account_service.py b/stripe/v2/core/vault/_gb_bank_account_service.py new file mode 100644 index 000000000..a352feaa9 --- /dev/null +++ b/stripe/v2/core/vault/_gb_bank_account_service.py @@ -0,0 +1,244 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.core.vault._gb_bank_account_archive_params import ( + GbBankAccountArchiveParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_create_params import ( + GbBankAccountCreateParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_list_params import ( + GbBankAccountListParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_retrieve_params import ( + GbBankAccountRetrieveParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_unarchive_params import ( + GbBankAccountUnarchiveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.core.vault._gb_bank_account import GbBankAccount + + +class GbBankAccountService(StripeService): + def list( + self, + params: Optional["GbBankAccountListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[GbBankAccount]": + """ + List objects that can be used as destinations for outbound money movement via OutboundPayment. + """ + return cast( + "ListObject[GbBankAccount]", + self._request( + "get", + "/v2/core/vault/gb_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["GbBankAccountListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[GbBankAccount]": + """ + List objects that can be used as destinations for outbound money movement via OutboundPayment. + """ + return cast( + "ListObject[GbBankAccount]", + await self._request_async( + "get", + "/v2/core/vault/gb_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "GbBankAccountCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "GbBankAccount": + """ + Create a GB bank account. + """ + return cast( + "GbBankAccount", + self._request( + "post", + "/v2/core/vault/gb_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "GbBankAccountCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "GbBankAccount": + """ + Create a GB bank account. + """ + return cast( + "GbBankAccount", + await self._request_async( + "post", + "/v2/core/vault/gb_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["GbBankAccountRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GbBankAccount": + """ + Retrieve a GB bank account. + """ + return cast( + "GbBankAccount", + self._request( + "get", + "/v2/core/vault/gb_bank_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["GbBankAccountRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GbBankAccount": + """ + Retrieve a GB bank account. + """ + return cast( + "GbBankAccount", + await self._request_async( + "get", + "/v2/core/vault/gb_bank_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def archive( + self, + id: str, + /, + params: Optional["GbBankAccountArchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GbBankAccount": + """ + Archive a GBBankAccount object. Archived GBBankAccount objects cannot be used as outbound destinations + and will not appear in the outbound destination list. + """ + return cast( + "GbBankAccount", + self._request( + "post", + "/v2/core/vault/gb_bank_accounts/{id}/archive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def archive_async( + self, + id: str, + /, + params: Optional["GbBankAccountArchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GbBankAccount": + """ + Archive a GBBankAccount object. Archived GBBankAccount objects cannot be used as outbound destinations + and will not appear in the outbound destination list. + """ + return cast( + "GbBankAccount", + await self._request_async( + "post", + "/v2/core/vault/gb_bank_accounts/{id}/archive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def unarchive( + self, + id: str, + /, + params: Optional["GbBankAccountUnarchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GbBankAccount": + """ + Unarchive a GBBankAccount object. + """ + return cast( + "GbBankAccount", + self._request( + "post", + "/v2/core/vault/gb_bank_accounts/{id}/unarchive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def unarchive_async( + self, + id: str, + /, + params: Optional["GbBankAccountUnarchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "GbBankAccount": + """ + Unarchive a GBBankAccount object. + """ + return cast( + "GbBankAccount", + await self._request_async( + "post", + "/v2/core/vault/gb_bank_accounts/{id}/unarchive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/core/vault/_us_bank_account.py b/stripe/v2/core/vault/_us_bank_account.py new file mode 100644 index 000000000..21ccd2bbe --- /dev/null +++ b/stripe/v2/core/vault/_us_bank_account.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional +from typing_extensions import Literal + + +class UsBankAccount(StripeObject): + """ + Use the USBankAccounts API to create and manage US bank accounts objects that you can use to receive funds. Note that these are not interchangeable with v1 Tokens. + """ + + OBJECT_NAME: ClassVar[Literal["v2.core.vault.us_bank_account"]] = ( + "v2.core.vault.us_bank_account" + ) + + class Verification(StripeObject): + class MicrodepositVerificationDetails(StripeObject): + expires: str + """ + Time when microdeposits will expire and have to be re-sent. + """ + microdeposit_type: Literal["amounts", "descriptor_code"] + """ + Microdeposit type can be amounts or descriptor_type. + """ + sent: str + """ + Time when microdeposits were sent. + """ + + microdeposit_verification_details: Optional[ + MicrodepositVerificationDetails + ] + """ + The microdeposit verification details if the status is awaiting verification. + """ + status: Literal[ + "awaiting_verification", + "unverified", + "verification_failed", + "verified", + ] + """ + The bank account verification status. + """ + _inner_class_types = { + "microdeposit_verification_details": MicrodepositVerificationDetails, + } + + archived: bool + """ + Whether this USBankAccount object was archived. + """ + bank_account_type: Literal["checking", "savings"] + """ + Closed Enum. The type of bank account (checking or savings). + """ + bank_name: str + """ + The name of the bank this bank account belongs to. This field is populated automatically by Stripe based on the routing number. + """ + created: str + """ + Creation time of the object. + """ + fedwire_routing_number: Optional[str] + """ + The fedwire routing number of the bank account. + """ + financial_connections_account: Optional[str] + """ + The ID of the Financial Connections Account used to create the bank account. + """ + id: str + """ + The ID of the USBankAccount object. + """ + last4: str + """ + The last 4 digits of the account number. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.core.vault.us_bank_account"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + restricted: bool + """ + Whether the US Bank Account is currently unusable for money movement, despite potentially being correctly set up. Please reach out to Stripe Support for more information. + """ + routing_number: Optional[str] + """ + The ACH routing number of the bank account. + """ + supported_currencies: List[str] + """ + The list of currencies supported by this bank account. + """ + verification: Verification + """ + The bank account verification details. + """ + _inner_class_types = {"verification": Verification} diff --git a/stripe/v2/core/vault/_us_bank_account_service.py b/stripe/v2/core/vault/_us_bank_account_service.py new file mode 100644 index 000000000..d54967d27 --- /dev/null +++ b/stripe/v2/core/vault/_us_bank_account_service.py @@ -0,0 +1,393 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.core.vault._us_bank_account_archive_params import ( + UsBankAccountArchiveParams, + ) + from stripe.params.v2.core.vault._us_bank_account_confirm_microdeposits_params import ( + UsBankAccountConfirmMicrodepositsParams, + ) + from stripe.params.v2.core.vault._us_bank_account_create_params import ( + UsBankAccountCreateParams, + ) + from stripe.params.v2.core.vault._us_bank_account_list_params import ( + UsBankAccountListParams, + ) + from stripe.params.v2.core.vault._us_bank_account_retrieve_params import ( + UsBankAccountRetrieveParams, + ) + from stripe.params.v2.core.vault._us_bank_account_send_microdeposits_params import ( + UsBankAccountSendMicrodepositsParams, + ) + from stripe.params.v2.core.vault._us_bank_account_unarchive_params import ( + UsBankAccountUnarchiveParams, + ) + from stripe.params.v2.core.vault._us_bank_account_update_params import ( + UsBankAccountUpdateParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.core.vault._us_bank_account import UsBankAccount + + +class UsBankAccountService(StripeService): + def list( + self, + params: Optional["UsBankAccountListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[UsBankAccount]": + """ + List USBankAccount objects. Optionally filter by verification status. + """ + return cast( + "ListObject[UsBankAccount]", + self._request( + "get", + "/v2/core/vault/us_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["UsBankAccountListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[UsBankAccount]": + """ + List USBankAccount objects. Optionally filter by verification status. + """ + return cast( + "ListObject[UsBankAccount]", + await self._request_async( + "get", + "/v2/core/vault/us_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "UsBankAccountCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Create a USBankAccount object. + """ + return cast( + "UsBankAccount", + self._request( + "post", + "/v2/core/vault/us_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "UsBankAccountCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Create a USBankAccount object. + """ + return cast( + "UsBankAccount", + await self._request_async( + "post", + "/v2/core/vault/us_bank_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["UsBankAccountRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Retrieve a USBankAccount object. + """ + return cast( + "UsBankAccount", + self._request( + "get", + "/v2/core/vault/us_bank_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["UsBankAccountRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Retrieve a USBankAccount object. + """ + return cast( + "UsBankAccount", + await self._request_async( + "get", + "/v2/core/vault/us_bank_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + /, + params: Optional["UsBankAccountUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Update a USBankAccount object. This is limited to supplying a previously empty routing_number field. + """ + return cast( + "UsBankAccount", + self._request( + "post", + "/v2/core/vault/us_bank_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + /, + params: Optional["UsBankAccountUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Update a USBankAccount object. This is limited to supplying a previously empty routing_number field. + """ + return cast( + "UsBankAccount", + await self._request_async( + "post", + "/v2/core/vault/us_bank_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def archive( + self, + id: str, + /, + params: Optional["UsBankAccountArchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Archive a USBankAccount object. USBankAccount objects will not be automatically archived by Stripe. + Archived USBankAccount objects cannot be used as outbound destinations + and will not appear in the outbound destination list. + """ + return cast( + "UsBankAccount", + self._request( + "post", + "/v2/core/vault/us_bank_accounts/{id}/archive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def archive_async( + self, + id: str, + /, + params: Optional["UsBankAccountArchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Archive a USBankAccount object. USBankAccount objects will not be automatically archived by Stripe. + Archived USBankAccount objects cannot be used as outbound destinations + and will not appear in the outbound destination list. + """ + return cast( + "UsBankAccount", + await self._request_async( + "post", + "/v2/core/vault/us_bank_accounts/{id}/archive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def confirm_microdeposits( + self, + id: str, + /, + params: Optional["UsBankAccountConfirmMicrodepositsParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Confirm microdeposits amounts or descriptor code that you have received from the Send Microdeposits request. Once you correctly confirm this, this US Bank Account will be verified and eligible to transfer funds with. + """ + return cast( + "UsBankAccount", + self._request( + "post", + "/v2/core/vault/us_bank_accounts/{id}/confirm_microdeposits".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def confirm_microdeposits_async( + self, + id: str, + /, + params: Optional["UsBankAccountConfirmMicrodepositsParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Confirm microdeposits amounts or descriptor code that you have received from the Send Microdeposits request. Once you correctly confirm this, this US Bank Account will be verified and eligible to transfer funds with. + """ + return cast( + "UsBankAccount", + await self._request_async( + "post", + "/v2/core/vault/us_bank_accounts/{id}/confirm_microdeposits".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def send_microdeposits( + self, + id: str, + /, + params: Optional["UsBankAccountSendMicrodepositsParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Send microdeposits in order to verify your US Bank Account so it is eligible to transfer funds. This will start the verification process and you must Confirm Microdeposits to successfully verify your US Bank Account. + """ + return cast( + "UsBankAccount", + self._request( + "post", + "/v2/core/vault/us_bank_accounts/{id}/send_microdeposits".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def send_microdeposits_async( + self, + id: str, + /, + params: Optional["UsBankAccountSendMicrodepositsParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Send microdeposits in order to verify your US Bank Account so it is eligible to transfer funds. This will start the verification process and you must Confirm Microdeposits to successfully verify your US Bank Account. + """ + return cast( + "UsBankAccount", + await self._request_async( + "post", + "/v2/core/vault/us_bank_accounts/{id}/send_microdeposits".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def unarchive( + self, + id: str, + /, + params: Optional["UsBankAccountUnarchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Unarchive a USBankAccount object. + """ + return cast( + "UsBankAccount", + self._request( + "post", + "/v2/core/vault/us_bank_accounts/{id}/unarchive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def unarchive_async( + self, + id: str, + /, + params: Optional["UsBankAccountUnarchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "UsBankAccount": + """ + Unarchive a USBankAccount object. + """ + return cast( + "UsBankAccount", + await self._request_async( + "post", + "/v2/core/vault/us_bank_accounts/{id}/unarchive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/__init__.py b/stripe/v2/money_management/__init__.py new file mode 100644 index 000000000..fcdb78a3e --- /dev/null +++ b/stripe/v2/money_management/__init__.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.money_management import test_helpers as test_helpers + from stripe.v2.money_management._adjustment import Adjustment as Adjustment + from stripe.v2.money_management._adjustment_service import ( + AdjustmentService as AdjustmentService, + ) + from stripe.v2.money_management._financial_account import ( + FinancialAccount as FinancialAccount, + ) + from stripe.v2.money_management._financial_account_service import ( + FinancialAccountService as FinancialAccountService, + ) + from stripe.v2.money_management._financial_address import ( + FinancialAddress as FinancialAddress, + ) + from stripe.v2.money_management._financial_address_credit_simulation import ( + FinancialAddressCreditSimulation as FinancialAddressCreditSimulation, + ) + from stripe.v2.money_management._financial_address_service import ( + FinancialAddressService as FinancialAddressService, + ) + from stripe.v2.money_management._inbound_transfer import ( + InboundTransfer as InboundTransfer, + ) + from stripe.v2.money_management._inbound_transfer_service import ( + InboundTransferService as InboundTransferService, + ) + from stripe.v2.money_management._outbound_payment import ( + OutboundPayment as OutboundPayment, + ) + from stripe.v2.money_management._outbound_payment_service import ( + OutboundPaymentService as OutboundPaymentService, + ) + from stripe.v2.money_management._outbound_setup_intent import ( + OutboundSetupIntent as OutboundSetupIntent, + ) + from stripe.v2.money_management._outbound_setup_intent_service import ( + OutboundSetupIntentService as OutboundSetupIntentService, + ) + from stripe.v2.money_management._payout_intent import ( + PayoutIntent as PayoutIntent, + ) + from stripe.v2.money_management._payout_intent_service import ( + PayoutIntentService as PayoutIntentService, + ) + from stripe.v2.money_management._payout_method import ( + PayoutMethod as PayoutMethod, + ) + from stripe.v2.money_management._payout_method_service import ( + PayoutMethodService as PayoutMethodService, + ) + from stripe.v2.money_management._payout_methods_bank_account_spec import ( + PayoutMethodsBankAccountSpec as PayoutMethodsBankAccountSpec, + ) + from stripe.v2.money_management._payout_methods_bank_account_spec_service import ( + PayoutMethodsBankAccountSpecService as PayoutMethodsBankAccountSpecService, + ) + from stripe.v2.money_management._received_credit import ( + ReceivedCredit as ReceivedCredit, + ) + from stripe.v2.money_management._received_credit_service import ( + ReceivedCreditService as ReceivedCreditService, + ) + from stripe.v2.money_management._recipient_verification import ( + RecipientVerification as RecipientVerification, + ) + from stripe.v2.money_management._recipient_verification_service import ( + RecipientVerificationService as RecipientVerificationService, + ) + from stripe.v2.money_management._test_helpers_service import ( + TestHelpersService as TestHelpersService, + ) + from stripe.v2.money_management._transaction import ( + Transaction as Transaction, + ) + from stripe.v2.money_management._transaction_entry import ( + TransactionEntry as TransactionEntry, + ) + from stripe.v2.money_management._transaction_entry_service import ( + TransactionEntryService as TransactionEntryService, + ) + from stripe.v2.money_management._transaction_service import ( + TransactionService as TransactionService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "test_helpers": ("stripe.v2.money_management.test_helpers", True), + "Adjustment": ("stripe.v2.money_management._adjustment", False), + "AdjustmentService": ( + "stripe.v2.money_management._adjustment_service", + False, + ), + "FinancialAccount": ( + "stripe.v2.money_management._financial_account", + False, + ), + "FinancialAccountService": ( + "stripe.v2.money_management._financial_account_service", + False, + ), + "FinancialAddress": ( + "stripe.v2.money_management._financial_address", + False, + ), + "FinancialAddressCreditSimulation": ( + "stripe.v2.money_management._financial_address_credit_simulation", + False, + ), + "FinancialAddressService": ( + "stripe.v2.money_management._financial_address_service", + False, + ), + "InboundTransfer": ("stripe.v2.money_management._inbound_transfer", False), + "InboundTransferService": ( + "stripe.v2.money_management._inbound_transfer_service", + False, + ), + "OutboundPayment": ("stripe.v2.money_management._outbound_payment", False), + "OutboundPaymentService": ( + "stripe.v2.money_management._outbound_payment_service", + False, + ), + "OutboundSetupIntent": ( + "stripe.v2.money_management._outbound_setup_intent", + False, + ), + "OutboundSetupIntentService": ( + "stripe.v2.money_management._outbound_setup_intent_service", + False, + ), + "PayoutIntent": ("stripe.v2.money_management._payout_intent", False), + "PayoutIntentService": ( + "stripe.v2.money_management._payout_intent_service", + False, + ), + "PayoutMethod": ("stripe.v2.money_management._payout_method", False), + "PayoutMethodService": ( + "stripe.v2.money_management._payout_method_service", + False, + ), + "PayoutMethodsBankAccountSpec": ( + "stripe.v2.money_management._payout_methods_bank_account_spec", + False, + ), + "PayoutMethodsBankAccountSpecService": ( + "stripe.v2.money_management._payout_methods_bank_account_spec_service", + False, + ), + "ReceivedCredit": ("stripe.v2.money_management._received_credit", False), + "ReceivedCreditService": ( + "stripe.v2.money_management._received_credit_service", + False, + ), + "RecipientVerification": ( + "stripe.v2.money_management._recipient_verification", + False, + ), + "RecipientVerificationService": ( + "stripe.v2.money_management._recipient_verification_service", + False, + ), + "TestHelpersService": ( + "stripe.v2.money_management._test_helpers_service", + False, + ), + "Transaction": ("stripe.v2.money_management._transaction", False), + "TransactionEntry": ( + "stripe.v2.money_management._transaction_entry", + False, + ), + "TransactionEntryService": ( + "stripe.v2.money_management._transaction_entry_service", + False, + ), + "TransactionService": ( + "stripe.v2.money_management._transaction_service", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/money_management/_adjustment.py b/stripe/v2/money_management/_adjustment.py new file mode 100644 index 000000000..ce5f4a447 --- /dev/null +++ b/stripe/v2/money_management/_adjustment.py @@ -0,0 +1,95 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount +from typing import ClassVar, Optional, Union +from typing_extensions import Literal + + +class Adjustment(StripeObject): + """ + An Adjustment records a credit or debit that Stripe makes to your Financial Account balance, + for example to correct technical or operational errors. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.adjustment"]] = ( + "v2.money_management.adjustment" + ) + + class AdjustedFlow(StripeObject): + adjustment: Optional[str] + """ + If applicable, the ID of the original Adjustment linked to this Adjustment. + """ + inbound_transfer: Optional[str] + """ + If applicable, the ID of the InboundTransfer linked to this Adjustment. + """ + outbound_payment: Optional[str] + """ + If applicable, the ID of the OutboundPayment linked to this Adjustment. + """ + outbound_transfer: Optional[str] + """ + If applicable, the ID of the OutboundTransfer linked to this Adjustment. + """ + received_credit: Optional[str] + """ + If applicable, the ID of the ReceivedCredit linked to this Adjustment. + """ + received_debit: Optional[str] + """ + If applicable, the ID of the ReceivedDebit linked to this Adjustment. + """ + type: Union[ + Literal[ + "adjustment", + "inbound_transfer", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit", + ], + str, + ] + """ + Open Enum. If applicable, the type of flow linked to this Adjustment. The field matching this value will contain the ID of the flow. + """ + + adjusted_flow: Optional[AdjustedFlow] + """ + Details about the original flow object linked to this Adjustment, if applicable. + `adjusted_flow.type` identifies the kind of object. The corresponding field contains its ID: + for an InboundTransfer, `adjusted_flow.inbound_transfer` contains the InboundTransfer's ID. + Pass that ID to the `adjusted_flow` parameter on List Adjustments. + """ + amount: Amount + """ + The amount of the Adjustment. + """ + created: str + """ + Time at which the object was created. Represented as an RFC 3339 timestamp in UTC with millisecond precision, + for example `2022-09-18T13:22:18.123Z`. + """ + description: Optional[str] + """ + A description of the Adjustment and its purpose. + """ + financial_account: str + """ + The ID of the FinancialAccount whose balance this Adjustment affects. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.money_management.adjustment"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + _inner_class_types = {"adjusted_flow": AdjustedFlow} diff --git a/stripe/v2/money_management/_adjustment_service.py b/stripe/v2/money_management/_adjustment_service.py new file mode 100644 index 000000000..73bacd817 --- /dev/null +++ b/stripe/v2/money_management/_adjustment_service.py @@ -0,0 +1,103 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._adjustment_list_params import ( + AdjustmentListParams, + ) + from stripe.params.v2.money_management._adjustment_retrieve_params import ( + AdjustmentRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._adjustment import Adjustment + + +class AdjustmentService(StripeService): + def list( + self, + params: Optional["AdjustmentListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Adjustment]": + """ + Returns a list of Adjustments that match the provided filters. + """ + return cast( + "ListObject[Adjustment]", + self._request( + "get", + "/v2/money_management/adjustments", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["AdjustmentListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Adjustment]": + """ + Returns a list of Adjustments that match the provided filters. + """ + return cast( + "ListObject[Adjustment]", + await self._request_async( + "get", + "/v2/money_management/adjustments", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["AdjustmentRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Adjustment": + """ + Retrieves the details of an Adjustment by ID. + """ + return cast( + "Adjustment", + self._request( + "get", + "/v2/money_management/adjustments/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["AdjustmentRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Adjustment": + """ + Retrieves the details of an Adjustment by ID. + """ + return cast( + "Adjustment", + await self._request_async( + "get", + "/v2/money_management/adjustments/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_financial_account.py b/stripe/v2/money_management/_financial_account.py new file mode 100644 index 000000000..e2f3475ac --- /dev/null +++ b/stripe/v2/money_management/_financial_account.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from stripe.v2._amount import Amount +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class FinancialAccount(StripeObject): + """ + A FinancialAccount represents a balance and can be the source or destination of money movement. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.financial_account"]] = ( + "v2.money_management.financial_account" + ) + + class Balance(StripeObject): + available: UntypedStripeObject[Amount] + """ + Balance available for money movement. + """ + inbound_pending: UntypedStripeObject[Amount] + """ + Balance of inbound funds that aren't yet available for money movement and will later move to the `available` balance. + """ + outbound_pending: UntypedStripeObject[Amount] + """ + Balance of funds being used for pending outbound money movements. + """ + + class Other(StripeObject): + type: str + """ + The FinancialAccount's actual type, represented as a string. + Upgrade your API version to see this value in `financial_account.type`. + """ + + class Storage(StripeObject): + class DepositInsuranceEligibility(StripeObject): + bank_name: Union[Literal["fifth_third"], str] + """ + The bank where funds are stored. + """ + currencies: List[str] + """ + Currencies eligible for deposit insurance at this bank under this scheme. + """ + type: Union[Literal["fdic", "fdic_passthrough"], str] + """ + The deposit insurance scheme. + """ + + deposit_insurance_eligibility: Optional[ + List[DepositInsuranceEligibility] + ] + """ + Array of eligibility objects, segmented by bank name and deposit insurance scheme. + """ + holds_currencies: List[str] + """ + The currencies that this FinancialAccount can hold. + """ + _inner_class_types = { + "deposit_insurance_eligibility": DepositInsuranceEligibility, + } + + balance: Balance + """ + The FinancialAccount's balance, split into `available`, `inbound_pending`, and `outbound_pending` balances. + Each balance is a hash keyed by lowercase currency codes, with an amount for each currency. + """ + country: str + """ + Open Enum. The country where the LegalEntity associated with the FinancialAccount is based, represented as a two-letter country code. + """ + created: str + """ + Time at which the object was created. Represented as an RFC 3339 timestamp in UTC with millisecond precision, for example `2022-09-18T13:22:18.123Z`. + """ + display_name: Optional[str] + """ + A descriptive name for the FinancialAccount, up to 50 characters long. This name appears in the Stripe Dashboard and embedded components. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + metadata: Optional[UntypedStripeObject[str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information + about the object in a structured format. + """ + object: Literal["v2.money_management.financial_account"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + other: Optional[Other] + """ + If the FinancialAccount's `type` is `other`, this hash identifies its actual type. + Upgrade your API version to see that type in `type`. + """ + status: Literal["closed", "open", "pending"] + """ + Closed Enum. An enum representing the status of the FinancialAccount. This indicates whether or not the FinancialAccount can be used for any money movement flows. + """ + storage: Optional[Storage] + """ + If the FinancialAccount's `type` is `storage`, this hash contains details specific to that type. + """ + type: Literal["other", "storage"] + """ + Closed Enum. The type of the FinancialAccount. Details specific to the type appear in the matching hash. + For example, a `storage` FinancialAccount includes a `storage` hash. + """ + _inner_class_types = { + "balance": Balance, + "other": Other, + "storage": Storage, + } diff --git a/stripe/v2/money_management/_financial_account_service.py b/stripe/v2/money_management/_financial_account_service.py new file mode 100644 index 000000000..d362656ee --- /dev/null +++ b/stripe/v2/money_management/_financial_account_service.py @@ -0,0 +1,152 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._financial_account_list_params import ( + FinancialAccountListParams, + ) + from stripe.params.v2.money_management._financial_account_retrieve_params import ( + FinancialAccountRetrieveParams, + ) + from stripe.params.v2.money_management._financial_account_update_params import ( + FinancialAccountUpdateParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._financial_account import FinancialAccount + + +class FinancialAccountService(StripeService): + def list( + self, + params: Optional["FinancialAccountListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[FinancialAccount]": + """ + Returns a list of FinancialAccounts in your account that match the provided filters. + """ + return cast( + "ListObject[FinancialAccount]", + self._request( + "get", + "/v2/money_management/financial_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["FinancialAccountListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[FinancialAccount]": + """ + Returns a list of FinancialAccounts in your account that match the provided filters. + """ + return cast( + "ListObject[FinancialAccount]", + await self._request_async( + "get", + "/v2/money_management/financial_accounts", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["FinancialAccountRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "FinancialAccount": + """ + Retrieves the details of an existing FinancialAccount. + """ + return cast( + "FinancialAccount", + self._request( + "get", + "/v2/money_management/financial_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["FinancialAccountRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "FinancialAccount": + """ + Retrieves the details of an existing FinancialAccount. + """ + return cast( + "FinancialAccount", + await self._request_async( + "get", + "/v2/money_management/financial_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + /, + params: Optional["FinancialAccountUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "FinancialAccount": + """ + Updates an existing FinancialAccount using the provided parameters. + """ + return cast( + "FinancialAccount", + self._request( + "post", + "/v2/money_management/financial_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + /, + params: Optional["FinancialAccountUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "FinancialAccount": + """ + Updates an existing FinancialAccount using the provided parameters. + """ + return cast( + "FinancialAccount", + await self._request_async( + "post", + "/v2/money_management/financial_accounts/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_financial_address.py b/stripe/v2/money_management/_financial_address.py new file mode 100644 index 000000000..e1f847a36 --- /dev/null +++ b/stripe/v2/money_management/_financial_address.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional, Union +from typing_extensions import Literal + + +class FinancialAddress(StripeObject): + """ + A FinancialAddress contains information needed to transfer money to a Financial Account. A Financial Account can have more than one Financial Address. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.financial_address"]] = ( + "v2.money_management.financial_address" + ) + + class BankAccount(StripeObject): + class Aba(StripeObject): + class Address(StripeObject): + city: str + """ + City. + """ + country: str + """ + Country. + """ + line1: str + """ + Address line 1. + """ + line2: str + """ + Address line 2. + """ + postal_code: str + """ + Postal code. + """ + state: str + """ + State or province. + """ + town: str + """ + Town or suburb. + """ + + account_holder_name: Optional[str] + """ + The name of the account holder. + """ + account_number: str + """ + The full account number. Empty while the bank account is pending allocation. + """ + address: Optional[Address] + """ + The address of the account holder. + """ + bank_name: Optional[str] + """ + The name of the bank. + """ + routing_number: str + """ + The ABA routing number. + """ + _inner_class_types = {"address": Address} + + class Iban(StripeObject): + account_holder_name: str + """ + The name of the account holder. + """ + bank_name: str + """ + The name of the bank. + """ + iban: str + """ + The full IBAN. Empty while the bank account is pending allocation. + """ + + class SortCode(StripeObject): + account_holder_name: str + """ + The name of the account holder. + """ + account_number: str + """ + The full account number. Empty while the bank account is pending allocation. + """ + sort_code: str + """ + The sort code. + """ + + aba: Optional[Aba] + """ + ABA bank account details (US). + """ + country: Optional[str] + """ + The country of the bank account. Always included in the response, but null while the bank + account is pending and its country is not yet known. + """ + currency: str + """ + Open Enum. The currency of the bank account. + """ + iban: Optional[Iban] + """ + IBAN bank account details. + """ + sort_code: Optional[SortCode] + """ + Sort code bank account details (UK). + """ + type: Union[Literal["aba", "iban", "sort_code"], str] + """ + Open Enum. The type of bank account details. + """ + _inner_class_types = {"aba": Aba, "iban": Iban, "sort_code": SortCode} + + bank_account: Optional[BankAccount] + """ + Bank account details for this FinancialAddress. + """ + created: str + """ + The creation timestamp of the FinancialAddress. + """ + financial_account: str + """ + The ID of the FinancialAccount this FinancialAddress corresponds to. + """ + id: str + """ + The ID of the FinancialAddress. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.money_management.financial_address"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + settlement_currency: str + status: Literal["active", "archived", "failed", "pending"] + """ + Closed Enum. The status of the FinancialAddress. + """ + type: Union[Literal["bank_account"], str] + """ + Open Enum. The type of FinancialAddress. + """ + _inner_class_types = {"bank_account": BankAccount} diff --git a/stripe/v2/money_management/_financial_address_credit_simulation.py b/stripe/v2/money_management/_financial_address_credit_simulation.py new file mode 100644 index 000000000..06bd0c7d3 --- /dev/null +++ b/stripe/v2/money_management/_financial_address_credit_simulation.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar +from typing_extensions import Literal + + +class FinancialAddressCreditSimulation(StripeObject): + """ + Credit Simulations represent simulated credit transactions applied to financial addresses for testing purposes. + """ + + OBJECT_NAME: ClassVar[ + Literal["v2.money_management.financial_address_credit_simulation"] + ] = "v2.money_management.financial_address_credit_simulation" + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.money_management.financial_address_credit_simulation"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + status: str + """ + The status of the request, signifying whether a simulated credit was initiated. + """ diff --git a/stripe/v2/money_management/_financial_address_service.py b/stripe/v2/money_management/_financial_address_service.py new file mode 100644 index 000000000..846e7e413 --- /dev/null +++ b/stripe/v2/money_management/_financial_address_service.py @@ -0,0 +1,144 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._financial_address_create_params import ( + FinancialAddressCreateParams, + ) + from stripe.params.v2.money_management._financial_address_list_params import ( + FinancialAddressListParams, + ) + from stripe.params.v2.money_management._financial_address_retrieve_params import ( + FinancialAddressRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._financial_address import FinancialAddress + + +class FinancialAddressService(StripeService): + def list( + self, + params: Optional["FinancialAddressListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[FinancialAddress]": + """ + List all FinancialAddresses for a FinancialAccount (V2 shape). + """ + return cast( + "ListObject[FinancialAddress]", + self._request( + "get", + "/v2/money_management/financial_addresses", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["FinancialAddressListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[FinancialAddress]": + """ + List all FinancialAddresses for a FinancialAccount (V2 shape). + """ + return cast( + "ListObject[FinancialAddress]", + await self._request_async( + "get", + "/v2/money_management/financial_addresses", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "FinancialAddressCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "FinancialAddress": + """ + Create a new FinancialAddress for a FinancialAccount (V2 shape). + """ + return cast( + "FinancialAddress", + self._request( + "post", + "/v2/money_management/financial_addresses", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "FinancialAddressCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "FinancialAddress": + """ + Create a new FinancialAddress for a FinancialAccount (V2 shape). + """ + return cast( + "FinancialAddress", + await self._request_async( + "post", + "/v2/money_management/financial_addresses", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["FinancialAddressRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "FinancialAddress": + """ + Retrieve a FinancialAddress (V2 shape). + """ + return cast( + "FinancialAddress", + self._request( + "get", + "/v2/money_management/financial_addresses/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["FinancialAddressRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "FinancialAddress": + """ + Retrieve a FinancialAddress (V2 shape). + """ + return cast( + "FinancialAddress", + await self._request_async( + "get", + "/v2/money_management/financial_addresses/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py new file mode 100644 index 000000000..85eab79bd --- /dev/null +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -0,0 +1,184 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class InboundTransfer(StripeObject): + """ + An InboundTransfer object, representing a money movement from a + user owned PaymentMethod to a FinancialAccount belonging to the same user. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.inbound_transfer"]] = ( + "v2.money_management.inbound_transfer" + ) + + class From(StripeObject): + class PaymentMethod(StripeObject): + type: str + """ + The type of PaymentMethod used to create the InboundTransfer. Clients should tolerate future values. + """ + us_bank_account: Optional[str] + """ + The destination US bank account identifier. eg "usba_***". + """ + + debited: Amount + """ + The amount in specified currency that was debited from the Payment Method. + """ + payment_method: PaymentMethod + """ + The bank account credential used to fund the InboundTransfer (for example, a US bank account), not a Payments API `pm_` PaymentMethod. + """ + _inner_class_types = {"payment_method": PaymentMethod} + + class To(StripeObject): + credited: Amount + """ + The amount by which the FinancialAccount balance is credited. + """ + financial_account: str + """ + The FinancialAccount that funds will land in. + """ + + class TransferHistory(StripeObject): + class BankDebitFailed(StripeObject): + failure_reason: Union[ + Literal[ + "bank_account_closed", + "bank_account_not_found", + "bank_debit_could_not_be_processed", + "bank_debit_not_authorized", + "insufficient_funds", + ], + str, + ] + """ + Open Enum. The return reason for the failed InboundTransfer. + """ + + class BankDebitProcessing(StripeObject): + pass + + class BankDebitQueued(StripeObject): + pass + + class BankDebitReturned(StripeObject): + return_reason: Union[ + Literal[ + "bank_account_closed", + "bank_account_not_found", + "bank_debit_could_not_be_processed", + "bank_debit_not_authorized", + "insufficient_funds", + ], + str, + ] + """ + Open Enum. The return reason for the returned InboundTransfer. + """ + + class BankDebitSucceeded(StripeObject): + pass + + bank_debit_failed: Optional[BankDebitFailed] + """ + The InboundTransfer failed. See `failure_reason` for more details. + """ + bank_debit_processing: Optional[BankDebitProcessing] + """ + The InboundTransfer was submitted to the scheme for processing. The debit is still in progress and can later succeed or fail. + """ + bank_debit_queued: Optional[BankDebitQueued] + """ + The InboundTransfer was created and is waiting to be submitted to the scheme for processing. + """ + bank_debit_returned: Optional[BankDebitReturned] + """ + The InboundTransfer was returned. The original transaction has been reversed. + """ + bank_debit_succeeded: Optional[BankDebitSucceeded] + """ + The InboundTransfer succeeded. Funds might not yet be available; check the associated Transaction for availability. + """ + created: str + """ + Creation time of the HistoryEntry in RFC 3339 format and UTC. + """ + effective_at: str + """ + Effective at time of the HistoryEntry in RFC 3339 format and UTC. + """ + id: str + """ + A unique ID for the HistoryEntry. + """ + type: Union[ + Literal[ + "bank_debit_failed", + "bank_debit_processing", + "bank_debit_queued", + "bank_debit_returned", + "bank_debit_succeeded", + ], + str, + ] + """ + Open Enum. The type of the HistoryEntry. + """ + _inner_class_types = { + "bank_debit_failed": BankDebitFailed, + "bank_debit_processing": BankDebitProcessing, + "bank_debit_queued": BankDebitQueued, + "bank_debit_returned": BankDebitReturned, + "bank_debit_succeeded": BankDebitSucceeded, + } + + amount: Amount + """ + The amount in specified currency that will land in the FinancialAccount balance. + """ + created: str + """ + Creation time of the InboundTransfer. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + description: str + """ + A freeform text field provided by user, containing metadata. + """ + from_: From + """ + A nested object containing information about the origin of the InboundTransfer. + """ + id: str + """ + Unique identifier for the InboundTransfer. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.money_management.inbound_transfer"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + to: To + """ + A nested object containing information about the destination of the InboundTransfer. + """ + transfer_history: List[TransferHistory] + """ + A list of history objects, representing changes in the state of the InboundTransfer. The most recent entry's type indicates the current status of the InboundTransfer. + """ + _inner_class_types = { + "from": From, + "to": To, + "transfer_history": TransferHistory, + } + _field_remappings = {"from_": "from"} diff --git a/stripe/v2/money_management/_inbound_transfer_service.py b/stripe/v2/money_management/_inbound_transfer_service.py new file mode 100644 index 000000000..55f3a6bbe --- /dev/null +++ b/stripe/v2/money_management/_inbound_transfer_service.py @@ -0,0 +1,144 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._inbound_transfer_create_params import ( + InboundTransferCreateParams, + ) + from stripe.params.v2.money_management._inbound_transfer_list_params import ( + InboundTransferListParams, + ) + from stripe.params.v2.money_management._inbound_transfer_retrieve_params import ( + InboundTransferRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._inbound_transfer import InboundTransfer + + +class InboundTransferService(StripeService): + def list( + self, + params: Optional["InboundTransferListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[InboundTransfer]": + """ + Retrieves a list of InboundTransfers. + """ + return cast( + "ListObject[InboundTransfer]", + self._request( + "get", + "/v2/money_management/inbound_transfers", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["InboundTransferListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[InboundTransfer]": + """ + Retrieves a list of InboundTransfers. + """ + return cast( + "ListObject[InboundTransfer]", + await self._request_async( + "get", + "/v2/money_management/inbound_transfers", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "InboundTransferCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "InboundTransfer": + """ + Creates an InboundTransfer to pull funds from a bank account into a financial account. Per-transfer and rolling weekly limits vary by account and payment rail. See [transfer limits](https://docs.stripe.com/treasury/add-funds#transfer-limits). + """ + return cast( + "InboundTransfer", + self._request( + "post", + "/v2/money_management/inbound_transfers", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "InboundTransferCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "InboundTransfer": + """ + Creates an InboundTransfer to pull funds from a bank account into a financial account. Per-transfer and rolling weekly limits vary by account and payment rail. See [transfer limits](https://docs.stripe.com/treasury/add-funds#transfer-limits). + """ + return cast( + "InboundTransfer", + await self._request_async( + "post", + "/v2/money_management/inbound_transfers", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["InboundTransferRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "InboundTransfer": + """ + Retrieve an InboundTransfer by ID. + """ + return cast( + "InboundTransfer", + self._request( + "get", + "/v2/money_management/inbound_transfers/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["InboundTransferRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "InboundTransfer": + """ + Retrieve an InboundTransfer by ID. + """ + return cast( + "InboundTransfer", + await self._request_async( + "get", + "/v2/money_management/inbound_transfers/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_outbound_payment.py b/stripe/v2/money_management/_outbound_payment.py new file mode 100644 index 000000000..4d7840e35 --- /dev/null +++ b/stripe/v2/money_management/_outbound_payment.py @@ -0,0 +1,310 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from stripe.v2._amount import Amount +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class OutboundPayment(StripeObject): + """ + OutboundPayment represents a single money movement from one FinancialAccount you own to a payout method someone else owns. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.outbound_payment"]] = ( + "v2.money_management.outbound_payment" + ) + + class From(StripeObject): + debited: Amount + """ + The monetary amount debited from the sender, only set on responses. + """ + financial_account: str + """ + The FinancialAccount that funds were pulled from. + """ + + class RecipientNotification(StripeObject): + setting: Literal["configured", "none"] + """ + Closed Enum. Configuration option to enable or disable notifications to recipients. + Do not send notifications when `setting` is `none`. Use the account setting when `setting` is `configured` or omitted. + """ + + class StatusDetails(StripeObject): + class Failed(StripeObject): + reason: Union[ + Literal[ + "fx_rate_drift_exceeded_after_review", + "payout_method_amount_limit_exceeded", + "payout_method_declined", + "payout_method_does_not_exist", + "payout_method_expired", + "payout_method_unsupported", + "payout_method_usage_frequency_limit_exceeded", + "review_rejected", + "unknown_failure", + ], + str, + ] + """ + Open Enum. The `failed` status reason. + """ + + class Processing(StripeObject): + reason: Union[Literal["under_review"], str] + """ + Open Enum. The `processing` status reason. + """ + + class Returned(StripeObject): + reason: Union[ + Literal[ + "payout_method_canceled_by_customer", + "payout_method_closed", + "payout_method_currency_unsupported", + "payout_method_does_not_exist", + "payout_method_holder_address_incorrect", + "payout_method_holder_details_incorrect", + "payout_method_holder_name_incorrect", + "payout_method_invalid_account_number", + "payout_method_restricted", + "recalled", + "unknown_failure", + ], + str, + ] + """ + Open Enum. The `returned` status reason. + """ + + failed: Optional[Failed] + """ + The `failed` status reason. + """ + processing: Optional[Processing] + """ + The `processing` status details. + """ + returned: Optional[Returned] + """ + The `returned` status reason. + """ + _inner_class_types = { + "failed": Failed, + "processing": Processing, + "returned": Returned, + } + + class StatusTransitions(StripeObject): + canceled_at: Optional[str] + """ + Timestamp describing when an OutboundPayment changed status to `canceled`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + failed_at: Optional[str] + """ + Timestamp describing when an OutboundPayment changed status to `failed`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + posted_at: Optional[str] + """ + Timestamp describing when an OutboundPayment changed status to `posted`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + returned_at: Optional[str] + """ + Timestamp describing when an OutboundPayment changed status to `returned`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + + class To(StripeObject): + class PayoutMethodOptions(StripeObject): + class BankAccount(StripeObject): + class PreferredNetworkOptions(StripeObject): + class Ach(StripeObject): + submission: Optional[ + Union[Literal["next_day", "same_day"], str] + ] + """ + Open Enum. ACH submission timing. + """ + transaction_purpose: Optional[ + Union[Literal["payroll"], str] + ] + """ + The transaction purpose for this ACH payment. + """ + + ach: Optional[Ach] + """ + ACH-specific network options. + """ + _inner_class_types = {"ach": Ach} + + preferred_network_options: Optional[PreferredNetworkOptions] + """ + Per-network configuration options. + """ + preferred_networks: Optional[ + List[ + Union[ + Literal[ + "ach", "fedwire", "fps", "rtp", "sepa", "swift" + ], + str, + ] + ] + ] + """ + The preferred networks to use for this OutboundPayment. + """ + _inner_class_types = { + "preferred_network_options": PreferredNetworkOptions, + } + + bank_account: Optional[BankAccount] + """ + Options for bank account payout methods. + """ + _inner_class_types = {"bank_account": BankAccount} + + credited: Amount + """ + The monetary amount being credited to the destination. + """ + payout_method: Optional[str] + """ + The payout method which the OutboundPayment uses to send payout. + """ + payout_method_options: Optional[PayoutMethodOptions] + """ + Payout method options for the OutboundPayment. + """ + recipient: str + """ + To which account the OutboundPayment is sent. + """ + _inner_class_types = {"payout_method_options": PayoutMethodOptions} + + class TrackingDetails(StripeObject): + class BankAccount(StripeObject): + trace_id: Optional[str] + """ + A unique identifier that can be used to track this OutboundPayment with the recipient bank. Banks might call this a “reference number” or something similar. + """ + + class Card(StripeObject): + retrieval_reference: Optional[str] + """ + A unique identifier that can be used to track this OutboundPayment with the recipient card. + """ + + bank_account: Optional[BankAccount] + """ + Bank account tracking details. + """ + card: Optional[Card] + """ + Card tracking details. + """ + status: Union[Literal["pending", "supported", "unsupported"], str] + """ + The status of the tracking details for this OutboundPayment. + """ + type: Union[Literal["bank_account", "card"], str] + """ + The type of tracking details for this OutboundPayment. + """ + _inner_class_types = {"bank_account": BankAccount, "card": Card} + + amount: Amount + """ + The amount and currency requested for this OutboundPayment. + """ + cancelable: bool + """ + Returns true if the OutboundPayment can be canceled, and false otherwise. + """ + created: str + """ + Time at which the OutboundPayment was created. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + description: Optional[str] + """ + An arbitrary string attached to the OutboundPayment. Often useful for displaying to users. + """ + expected_arrival_date: Optional[str] + """ + The date when funds are expected to arrive in the payout method. This field is not set if the payout method is in a `failed`, `canceled`, or `returned` state. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + from_: From + """ + The FinancialAccount that funds were pulled from. + """ + id: str + """ + Unique identifier for the OutboundPayment. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + metadata: Optional[UntypedStripeObject[str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + object: Literal["v2.money_management.outbound_payment"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + payout_intent: Optional[str] + """ + The PayoutIntent ID that triggered this OutboundPayment. + """ + recipient_notification: RecipientNotification + """ + Details about the OutboundPayment notification settings for recipient. + """ + recipient_verification: Optional[str] + """ + The ID of the RecipientVerification for this OutboundPayment. Required where recipient-name verification is mandated before creating an OutboundPayment. + """ + statement_descriptor: str + """ + The description that appears on the receiving end of an OutboundPayment (for example, on a bank statement). Defaults to `STRIPE` if not configured in the account settings. + """ + status: Literal["canceled", "failed", "posted", "processing", "returned"] + """ + Current status of the OutboundPayment. + An OutboundPayment is `processing` after creation. It becomes `posted` when funds leave the account, + `failed` if it cannot be sent, `canceled` if canceled before posting, or `returned` if the funds are returned. + """ + status_details: Optional[StatusDetails] + """ + Status details for an OutboundPayment in a `processing`, `failed`, or `returned` state. + """ + status_transitions: Optional[StatusTransitions] + """ + Hash containing timestamps of when the object transitioned to a particular status. + """ + to: To + """ + To which payout method the OutboundPayment was sent. + """ + tracking_details: Optional[TrackingDetails] + """ + Information to track this OutboundPayment with the recipient bank. + """ + _inner_class_types = { + "from": From, + "recipient_notification": RecipientNotification, + "status_details": StatusDetails, + "status_transitions": StatusTransitions, + "to": To, + "tracking_details": TrackingDetails, + } + _field_remappings = {"from_": "from"} diff --git a/stripe/v2/money_management/_outbound_payment_service.py b/stripe/v2/money_management/_outbound_payment_service.py new file mode 100644 index 000000000..bf850aed1 --- /dev/null +++ b/stripe/v2/money_management/_outbound_payment_service.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._outbound_payment_cancel_params import ( + OutboundPaymentCancelParams, + ) + from stripe.params.v2.money_management._outbound_payment_create_params import ( + OutboundPaymentCreateParams, + ) + from stripe.params.v2.money_management._outbound_payment_list_params import ( + OutboundPaymentListParams, + ) + from stripe.params.v2.money_management._outbound_payment_retrieve_params import ( + OutboundPaymentRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._outbound_payment import OutboundPayment + + +class OutboundPaymentService(StripeService): + def list( + self, + params: Optional["OutboundPaymentListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[OutboundPayment]": + """ + Returns a list of OutboundPayments that match the provided filters. + """ + return cast( + "ListObject[OutboundPayment]", + self._request( + "get", + "/v2/money_management/outbound_payments", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["OutboundPaymentListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[OutboundPayment]": + """ + Returns a list of OutboundPayments that match the provided filters. + """ + return cast( + "ListObject[OutboundPayment]", + await self._request_async( + "get", + "/v2/money_management/outbound_payments", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "OutboundPaymentCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "OutboundPayment": + """ + Creates an OutboundPayment. + """ + return cast( + "OutboundPayment", + self._request( + "post", + "/v2/money_management/outbound_payments", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "OutboundPaymentCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "OutboundPayment": + """ + Creates an OutboundPayment. + """ + return cast( + "OutboundPayment", + await self._request_async( + "post", + "/v2/money_management/outbound_payments", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["OutboundPaymentRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundPayment": + """ + Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment create or list response. + """ + return cast( + "OutboundPayment", + self._request( + "get", + "/v2/money_management/outbound_payments/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["OutboundPaymentRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundPayment": + """ + Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment create or list response. + """ + return cast( + "OutboundPayment", + await self._request_async( + "get", + "/v2/money_management/outbound_payments/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def cancel( + self, + id: str, + /, + params: Optional["OutboundPaymentCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundPayment": + """ + Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. + """ + return cast( + "OutboundPayment", + self._request( + "post", + "/v2/money_management/outbound_payments/{id}/cancel".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def cancel_async( + self, + id: str, + /, + params: Optional["OutboundPaymentCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundPayment": + """ + Cancels an OutboundPayment. Only processing OutboundPayments can be canceled. + """ + return cast( + "OutboundPayment", + await self._request_async( + "post", + "/v2/money_management/outbound_payments/{id}/cancel".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_outbound_setup_intent.py b/stripe/v2/money_management/_outbound_setup_intent.py new file mode 100644 index 000000000..136b989c0 --- /dev/null +++ b/stripe/v2/money_management/_outbound_setup_intent.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.money_management._payout_method import PayoutMethod + + +class OutboundSetupIntent(StripeObject): + """ + Use the OutboundSetupIntent API to create and setup usable payout methods. + """ + + OBJECT_NAME: ClassVar[ + Literal["v2.money_management.outbound_setup_intent"] + ] = "v2.money_management.outbound_setup_intent" + created: str + """ + Created timestamp. + """ + id: str + """ + ID of the outbound setup intent. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.money_management.outbound_setup_intent"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + payout_method: Optional["PayoutMethod"] + """ + Use the PayoutMethods API to list and interact with PayoutMethod objects. + """ + status: Literal[ + "canceled", "requires_action", "requires_payout_method", "succeeded" + ] + """ + Closed Enum. Status of the outbound setup intent. + """ + usage_intent: Literal["payment", "transfer"] + """ + The intended money movement flow this payout method should be set up for, specified in params. + """ diff --git a/stripe/v2/money_management/_outbound_setup_intent_service.py b/stripe/v2/money_management/_outbound_setup_intent_service.py new file mode 100644 index 000000000..0cf5ac81a --- /dev/null +++ b/stripe/v2/money_management/_outbound_setup_intent_service.py @@ -0,0 +1,244 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._outbound_setup_intent_cancel_params import ( + OutboundSetupIntentCancelParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_create_params import ( + OutboundSetupIntentCreateParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_list_params import ( + OutboundSetupIntentListParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_retrieve_params import ( + OutboundSetupIntentRetrieveParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_update_params import ( + OutboundSetupIntentUpdateParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._outbound_setup_intent import ( + OutboundSetupIntent, + ) + + +class OutboundSetupIntentService(StripeService): + def list( + self, + params: Optional["OutboundSetupIntentListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[OutboundSetupIntent]": + """ + List the OutboundSetupIntent objects. + """ + return cast( + "ListObject[OutboundSetupIntent]", + self._request( + "get", + "/v2/money_management/outbound_setup_intents", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["OutboundSetupIntentListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[OutboundSetupIntent]": + """ + List the OutboundSetupIntent objects. + """ + return cast( + "ListObject[OutboundSetupIntent]", + await self._request_async( + "get", + "/v2/money_management/outbound_setup_intents", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: Optional["OutboundSetupIntentCreateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundSetupIntent": + """ + Create an OutboundSetupIntent object. + """ + return cast( + "OutboundSetupIntent", + self._request( + "post", + "/v2/money_management/outbound_setup_intents", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: Optional["OutboundSetupIntentCreateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundSetupIntent": + """ + Create an OutboundSetupIntent object. + """ + return cast( + "OutboundSetupIntent", + await self._request_async( + "post", + "/v2/money_management/outbound_setup_intents", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["OutboundSetupIntentRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundSetupIntent": + """ + Retrieve an OutboundSetupIntent object. + """ + return cast( + "OutboundSetupIntent", + self._request( + "get", + "/v2/money_management/outbound_setup_intents/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["OutboundSetupIntentRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundSetupIntent": + """ + Retrieve an OutboundSetupIntent object. + """ + return cast( + "OutboundSetupIntent", + await self._request_async( + "get", + "/v2/money_management/outbound_setup_intents/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + /, + params: Optional["OutboundSetupIntentUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundSetupIntent": + """ + Update an OutboundSetupIntent object. + """ + return cast( + "OutboundSetupIntent", + self._request( + "post", + "/v2/money_management/outbound_setup_intents/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + /, + params: Optional["OutboundSetupIntentUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundSetupIntent": + """ + Update an OutboundSetupIntent object. + """ + return cast( + "OutboundSetupIntent", + await self._request_async( + "post", + "/v2/money_management/outbound_setup_intents/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def cancel( + self, + id: str, + /, + params: Optional["OutboundSetupIntentCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundSetupIntent": + """ + Cancel an OutboundSetupIntent object. + """ + return cast( + "OutboundSetupIntent", + self._request( + "post", + "/v2/money_management/outbound_setup_intents/{id}/cancel".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def cancel_async( + self, + id: str, + /, + params: Optional["OutboundSetupIntentCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "OutboundSetupIntent": + """ + Cancel an OutboundSetupIntent object. + """ + return cast( + "OutboundSetupIntent", + await self._request_async( + "post", + "/v2/money_management/outbound_setup_intents/{id}/cancel".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_payout_intent.py b/stripe/v2/money_management/_payout_intent.py new file mode 100644 index 000000000..6862f2f55 --- /dev/null +++ b/stripe/v2/money_management/_payout_intent.py @@ -0,0 +1,468 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from stripe.v2._amount import Amount +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class PayoutIntent(StripeObject): + """ + PayoutIntent represents an intent to send funds from a Financial Account to a payout method. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.payout_intent"]] = ( + "v2.money_management.payout_intent" + ) + + class EstimatedFee(StripeObject): + class NetworkFeeDetails(StripeObject): + class NetworkOptions(StripeObject): + class Ach(StripeObject): + submission: Optional[ + Union[Literal["next_day", "same_day"], str] + ] + """ + Open Enum. ACH submission timing. + """ + + ach: Optional[Ach] + """ + ACH-specific network fee options. + """ + _inner_class_types = {"ach": Ach} + + network: Union[ + Literal[ + "ach", "fedwire", "fps", "local", "rtp", "sepa", "swift" + ], + str, + ] + """ + The network associated with the fee. + """ + network_options: NetworkOptions + """ + Per-network options that affect the fee. + """ + _inner_class_types = {"network_options": NetworkOptions} + + class TaxAmount(StripeObject): + currency: str + """ + Currency code. + """ + value_decimal: str + """ + Tax amount value represented as a decimal string in major units. + """ + + amount: Amount + """ + The fee amount. + """ + network_fee_details: Optional[NetworkFeeDetails] + """ + Details about the network and options associated with this fee. Present when `type` is `network_fee`. + """ + tax_amount: Optional[TaxAmount] + """ + Tax charged for this fee, if applicable. Value expressed as a decimal string in major units. + """ + type: Union[ + Literal[ + "cross_border_fee", + "foreign_exchange_fee", + "instant_card_payout_fee", + "network_fee", + "next_day_payout_fee", + "real_time_payout_fee", + "standard_payout_fee", + "wire_payout_fee", + ], + str, + ] + """ + Open Enum. The type of fee. + """ + _inner_class_types = { + "network_fee_details": NetworkFeeDetails, + "tax_amount": TaxAmount, + } + + class From(StripeObject): + currency: str + """ + The currency of the financial account. + """ + debited: Optional[Amount] + """ + Estimated amount to be debited from the financial account. + """ + financial_account: str + """ + The FinancialAccount that funds are pulled from. + """ + + class FxQuote(StripeObject): + class Rates(StripeObject): + exchange_rate: str + """ + The exchange rate from the source currency to `to_currency`, represented as a decimal string + (for example, `1.1520`) to preserve the full precision of the rate. + """ + + lock_duration: Union[Literal["five_minutes", "none"], str] + """ + Open Enum. Duration of the FX rate lock. + """ + lock_expires_at: Optional[str] + """ + Timestamp when the rate lock expires. Null when rate locking is not supported. + """ + lock_status: Union[Literal["active", "expired", "none"], str] + """ + Open Enum. Lock status of the FX rate. + """ + rates: UntypedStripeObject[Rates] + """ + Maps each source currency to its exchange rate into `to_currency`. + """ + to_currency: str + """ + The destination currency. + """ + _inner_class_types = {"rates": Rates} + _inner_class_dicts = ["rates"] + + class LatestPayout(StripeObject): + outbound_payment: Optional[str] + """ + The ID of the OutboundPayment, if applicable. + """ + outbound_transfer: Optional[str] + """ + The ID of the OutboundTransfer, if applicable. + """ + type: Union[Literal["outbound_payment", "outbound_transfer"], str] + """ + The type of payout. + """ + + class NextAction(StripeObject): + class Confirm(StripeObject): + fields_to_review: Optional[ + List[ + Union[ + Literal[ + "estimated_fees", + "fx_quote", + "recipient_verification", + ], + str, + ] + ] + ] + """ + The PayoutIntent fields that must be reviewed before confirmation. + """ + reason: Union[ + Literal["automatically_required", "manually_requested"], str + ] + """ + Open Enum. The reason the PayoutIntent requires confirmation. + """ + + class HandleFailure(StripeObject): + failure_reason: Union[ + Literal[ + "account_not_configured_as_recipient", + "fx_rate_drift_exceeded_after_review", + "insufficient_funds", + "payout_method_account_type_incorrect", + "payout_method_amount_limit_exceeded", + "payout_method_canceled_by_customer", + "payout_method_closed", + "payout_method_currency_unsupported", + "payout_method_declined", + "payout_method_does_not_exist", + "payout_method_expired", + "payout_method_holder_address_incorrect", + "payout_method_holder_details_incorrect", + "payout_method_holder_name_incorrect", + "payout_method_invalid", + "payout_method_invalid_account_number", + "payout_method_restricted", + "payout_method_unsupported", + "payout_method_usage_frequency_limit_exceeded", + "recalled", + "recipient_capability_not_active", + "review_rejected", + "unknown_failure", + ], + str, + ] + """ + Open Enum. The reason for the failure. + """ + + confirm: Optional[Confirm] + """ + Details about a confirmation required. Populated when `type` is `confirm`. + """ + handle_failure: Optional[HandleFailure] + """ + Details about a failure that requires user action. Populated when `type` is `handle_failure`. + """ + type: Union[Literal["confirm", "handle_failure"], str] + """ + Open Enum. The type of next action required. + """ + _inner_class_types = { + "confirm": Confirm, + "handle_failure": HandleFailure, + } + + class RecipientNotification(StripeObject): + setting: Literal["configured", "none"] + """ + Closed Enum. Configuration option to enable or disable notifications to recipients. + Do not send notifications when `setting` is `none`. Use the account setting when `setting` is `configured` or omitted. + """ + + class RecipientVerification(StripeObject): + class MatchResultDetails(StripeObject): + matched_business_type: Optional[Literal["business", "personal"]] + """ + The business type returned by the recipient-verification provider. + """ + matched_name: Optional[str] + """ + The account name returned by the recipient-verification provider. + """ + message: str + """ + A message describing the match result. + """ + provided_business_type: Optional[Literal["business", "personal"]] + """ + The business type provided for recipient verification. + """ + provided_name: str + """ + The name associated with the provided recipient. + """ + + match_result: Literal[ + "close_match", "match", "no_match", "unavailable" + ] + """ + Closed Enum. The recipient-verification provider's match result. + """ + match_result_details: MatchResultDetails + """ + Details associated with the match result. + """ + _inner_class_types = {"match_result_details": MatchResultDetails} + + class ScheduleOptions(StripeObject): + execute_on: Optional[str] + """ + The date when the payout should be executed, in YYYY-MM-DD format. + """ + + class StatusTransitions(StripeObject): + canceled_at: Optional[str] + """ + Timestamp describing when a PayoutIntent changed status to `canceled`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + posted_at: Optional[str] + """ + Timestamp describing when a PayoutIntent changed status to `posted`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + processing_at: Optional[str] + """ + Timestamp describing when a PayoutIntent changed status to `processing`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + requires_action_at: Optional[str] + """ + Timestamp describing when a PayoutIntent changed status to `requires_action`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + + class To(StripeObject): + class PayoutMethodOptions(StripeObject): + class BankAccount(StripeObject): + class PreferredNetworkOptions(StripeObject): + class Ach(StripeObject): + submission: Optional[ + Union[Literal["next_day", "same_day"], str] + ] + """ + Open Enum. ACH submission timing. + """ + transaction_purpose: Optional[ + Union[Literal["payroll"], str] + ] + """ + The transaction purpose for this ACH payment. + """ + + ach: Optional[Ach] + """ + ACH-specific network options. + """ + _inner_class_types = {"ach": Ach} + + preferred_network_options: Optional[PreferredNetworkOptions] + """ + Per-network configuration options. + """ + preferred_networks: Optional[ + List[ + Union[ + Literal[ + "ach", "fedwire", "fps", "rtp", "sepa", "swift" + ], + str, + ] + ] + ] + """ + The preferred networks to use for this PayoutIntent. + """ + _inner_class_types = { + "preferred_network_options": PreferredNetworkOptions, + } + + bank_account: Optional[BankAccount] + """ + Options for bank account payout methods. + """ + _inner_class_types = {"bank_account": BankAccount} + + credited: Optional[Amount] + """ + Estimated amount to be credited to the recipient in the destination currency. + """ + currency: Optional[str] + """ + The currency to send to the recipient. + """ + payout_method: Optional[str] + """ + The payout method ID for the PayoutIntent. Optional when the PayoutIntent creates an OutboundPayment and the recipient has a default payout method. Required when the PayoutIntent creates an OutboundTransfer. + """ + payout_method_options: Optional[PayoutMethodOptions] + """ + Payout method options for the PayoutIntent. + """ + recipient: Optional[str] + """ + The recipient ID for the PayoutIntent. + """ + _inner_class_types = {"payout_method_options": PayoutMethodOptions} + + amount: Amount + """ + The monetary amount to be sent. + """ + confirmation_method: Union[Literal["automatic", "manual"], str] + """ + Controls whether the PayoutIntent requires explicit confirmation before transitioning to `pending`. + Even when `automatic`, regulatory requirements may require confirmation. See [Send money with Global Payouts](https://docs.stripe.com/global-payouts/send-money) for details. + """ + created: str + """ + Time at which the PayoutIntent was created. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + description: Optional[str] + """ + An arbitrary string attached to the PayoutIntent. Often useful for displaying to users. + """ + estimated_fees: Optional[List[EstimatedFee]] + """ + Estimated fees and taxes. + """ + from_: From + """ + The FinancialAccount that funds are pulled from. + """ + fx_quote: Optional[FxQuote] + """ + FX rate information for fee transparency. + """ + id: str + """ + Unique identifier for the PayoutIntent. + """ + latest_payout: Optional[LatestPayout] + """ + Details about the latest payout associated with this PayoutIntent. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + metadata: Optional[UntypedStripeObject[str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + next_action: Optional[NextAction] + """ + Next action required for a PayoutIntent in the `requires_action` state. Populated when `status` is `requires_action`. + """ + object: Literal["v2.money_management.payout_intent"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + recipient_notification: Optional[RecipientNotification] + """ + Recipient notification settings for the PayoutIntent. Only applicable when the PayoutIntent creates an OutboundPayment. + """ + recipient_verification: Optional[RecipientVerification] + """ + Recipient verification details for this PayoutIntent. + """ + schedule_options: Optional[ScheduleOptions] + """ + Scheduling options for the payout. If omitted, the payout is scheduled for immediate execution. + """ + statement_descriptor: Optional[str] + """ + The description that appears on the receiving end for the payout (for example, on a bank statement). + """ + status: Union[ + Literal[ + "canceled", "pending", "posted", "processing", "requires_action" + ], + str, + ] + """ + Current status of the PayoutIntent. + """ + status_transitions: Optional[StatusTransitions] + """ + Hash containing timestamps of when transitioned to a particular status. + """ + to: To + """ + To which payout method the payout is sent. + """ + _inner_class_types = { + "estimated_fees": EstimatedFee, + "from": From, + "fx_quote": FxQuote, + "latest_payout": LatestPayout, + "next_action": NextAction, + "recipient_notification": RecipientNotification, + "recipient_verification": RecipientVerification, + "schedule_options": ScheduleOptions, + "status_transitions": StatusTransitions, + "to": To, + } + _field_remappings = {"from_": "from"} diff --git a/stripe/v2/money_management/_payout_intent_service.py b/stripe/v2/money_management/_payout_intent_service.py new file mode 100644 index 000000000..236142715 --- /dev/null +++ b/stripe/v2/money_management/_payout_intent_service.py @@ -0,0 +1,393 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._payout_intent_cancel_params import ( + PayoutIntentCancelParams, + ) + from stripe.params.v2.money_management._payout_intent_confirm_params import ( + PayoutIntentConfirmParams, + ) + from stripe.params.v2.money_management._payout_intent_create_params import ( + PayoutIntentCreateParams, + ) + from stripe.params.v2.money_management._payout_intent_list_params import ( + PayoutIntentListParams, + ) + from stripe.params.v2.money_management._payout_intent_refresh_fx_quote_params import ( + PayoutIntentRefreshFxQuoteParams, + ) + from stripe.params.v2.money_management._payout_intent_refresh_recipient_verification_params import ( + PayoutIntentRefreshRecipientVerificationParams, + ) + from stripe.params.v2.money_management._payout_intent_retrieve_params import ( + PayoutIntentRetrieveParams, + ) + from stripe.params.v2.money_management._payout_intent_update_params import ( + PayoutIntentUpdateParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._payout_intent import PayoutIntent + + +class PayoutIntentService(StripeService): + def list( + self, + params: Optional["PayoutIntentListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[PayoutIntent]": + """ + Returns a list of PayoutIntents. + """ + return cast( + "ListObject[PayoutIntent]", + self._request( + "get", + "/v2/money_management/payout_intents", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["PayoutIntentListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[PayoutIntent]": + """ + Returns a list of PayoutIntents. + """ + return cast( + "ListObject[PayoutIntent]", + await self._request_async( + "get", + "/v2/money_management/payout_intents", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "PayoutIntentCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Creates a PayoutIntent. + """ + return cast( + "PayoutIntent", + self._request( + "post", + "/v2/money_management/payout_intents", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "PayoutIntentCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Creates a PayoutIntent. + """ + return cast( + "PayoutIntent", + await self._request_async( + "post", + "/v2/money_management/payout_intents", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["PayoutIntentRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Retrieves the details of an existing PayoutIntent by passing the unique PayoutIntent ID. + """ + return cast( + "PayoutIntent", + self._request( + "get", + "/v2/money_management/payout_intents/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["PayoutIntentRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Retrieves the details of an existing PayoutIntent by passing the unique PayoutIntent ID. + """ + return cast( + "PayoutIntent", + await self._request_async( + "get", + "/v2/money_management/payout_intents/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + /, + params: Optional["PayoutIntentUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Updates an editable PayoutIntent in the `pending` or `requires_action` state. + """ + return cast( + "PayoutIntent", + self._request( + "post", + "/v2/money_management/payout_intents/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + /, + params: Optional["PayoutIntentUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Updates an editable PayoutIntent in the `pending` or `requires_action` state. + """ + return cast( + "PayoutIntent", + await self._request_async( + "post", + "/v2/money_management/payout_intents/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def cancel( + self, + id: str, + /, + params: Optional["PayoutIntentCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Cancels a PayoutIntent in the `pending` or `requires_action` state, or a `processing` PayoutIntent with a cancelable OutboundPayment. + """ + return cast( + "PayoutIntent", + self._request( + "post", + "/v2/money_management/payout_intents/{id}/cancel".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def cancel_async( + self, + id: str, + /, + params: Optional["PayoutIntentCancelParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Cancels a PayoutIntent in the `pending` or `requires_action` state, or a `processing` PayoutIntent with a cancelable OutboundPayment. + """ + return cast( + "PayoutIntent", + await self._request_async( + "post", + "/v2/money_management/payout_intents/{id}/cancel".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def confirm( + self, + id: str, + /, + params: Optional["PayoutIntentConfirmParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Confirms a PayoutIntent in the `requires_action` state, transitioning it to `pending`. + """ + return cast( + "PayoutIntent", + self._request( + "post", + "/v2/money_management/payout_intents/{id}/confirm".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def confirm_async( + self, + id: str, + /, + params: Optional["PayoutIntentConfirmParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Confirms a PayoutIntent in the `requires_action` state, transitioning it to `pending`. + """ + return cast( + "PayoutIntent", + await self._request_async( + "post", + "/v2/money_management/payout_intents/{id}/confirm".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def refresh_fx_quote( + self, + id: str, + /, + params: Optional["PayoutIntentRefreshFxQuoteParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Refreshes the FX quote for a PayoutIntent. + """ + return cast( + "PayoutIntent", + self._request( + "post", + "/v2/money_management/payout_intents/{id}/refresh_fx_quote".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def refresh_fx_quote_async( + self, + id: str, + /, + params: Optional["PayoutIntentRefreshFxQuoteParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Refreshes the FX quote for a PayoutIntent. + """ + return cast( + "PayoutIntent", + await self._request_async( + "post", + "/v2/money_management/payout_intents/{id}/refresh_fx_quote".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def refresh_recipient_verification( + self, + id: str, + /, + params: Optional[ + "PayoutIntentRefreshRecipientVerificationParams" + ] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Refreshes the recipient verification for a PayoutIntent. + """ + return cast( + "PayoutIntent", + self._request( + "post", + "/v2/money_management/payout_intents/{id}/refresh_recipient_verification".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def refresh_recipient_verification_async( + self, + id: str, + /, + params: Optional[ + "PayoutIntentRefreshRecipientVerificationParams" + ] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutIntent": + """ + Refreshes the recipient verification for a PayoutIntent. + """ + return cast( + "PayoutIntent", + await self._request_async( + "post", + "/v2/money_management/payout_intents/{id}/refresh_recipient_verification".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_payout_method.py b/stripe/v2/money_management/_payout_method.py new file mode 100644 index 000000000..ae53efa68 --- /dev/null +++ b/stripe/v2/money_management/_payout_method.py @@ -0,0 +1,145 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional, Union +from typing_extensions import Literal + + +class PayoutMethod(StripeObject): + """ + Use the PayoutMethods API to list and interact with PayoutMethod objects. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.payout_method"]] = ( + "v2.money_management.payout_method" + ) + + class BankAccount(StripeObject): + bank_account_type: Literal["checking", "futsu", "savings", "toza"] + """ + The type of bank account (checking or savings). + """ + bank_name: str + """ + The name of the bank this bank account is in. This field is populated automatically by Stripe. + """ + branch_number: Optional[str] + """ + The branch number of the bank account, if present. + """ + country: str + """ + The country code of the bank account. + """ + financial_connections_account: Optional[str] + """ + The ID of the Financial Connections Account used to create the bank account. + """ + last4: str + """ + The last 4 digits of the account number. + """ + routing_number: Optional[str] + """ + The routing number of the bank account, if present. + """ + supported_currencies: List[str] + """ + The list of currencies supported by this bank account. + """ + swift_code: Optional[str] + """ + The swift code of the bank or financial institution. + """ + + class Card(StripeObject): + exp_month: str + """ + The month the card expires. + """ + exp_year: str + """ + The year the card expires. + """ + fingerprint: str + """ + Uniquely identifies this particular card number. You can use this attribute to check whether two + recipients who've signed up with you are using the same card number, for example. + """ + last4: str + """ + The last 4 digits of the card number. + """ + supported_currencies: List[str] + """ + The list of currencies supported by this bank account. + """ + + class UsageStatus(StripeObject): + payments: Literal[ + "disabled", "eligible", "ineligible", "invalid", "requires_action" + ] + """ + Payments status - used when sending OutboundPayments (sending funds to recipients). + If disabled, enable the payout method by creating an OutboundSetupIntent using [`POST /v2/money_management/outbound_setup_intents`](https://docs.stripe.com/api/v2/money-management/outbound-setup-intents/create). + """ + transfers: Literal[ + "disabled", "eligible", "ineligible", "invalid", "requires_action" + ] + """ + Transfers status - used when making an OutboundTransfer (sending funds to yourself). + If disabled, enable the payout method by creating an OutboundSetupIntent using [`POST /v2/money_management/outbound_setup_intents`](https://docs.stripe.com/api/v2/money-management/outbound-setup-intents/create). + """ + + archived: bool + """ + Whether the payout method was archived. Payout methods can be archived through the /archive API, + and they will not be automatically archived by Stripe. Archived payout methods cannot be used + for outbound money movement. + """ + bank_account: Optional[BankAccount] + """ + The PayoutMethodBankAccount object details. + """ + card: Optional[Card] + """ + The PayoutMethodCard object details. + """ + created: str + """ + Created timestamp. + """ + id: str + """ + ID of the PayoutMethod object. + """ + latest_outbound_setup_intent: Optional[str] + """ + ID of the underlying active OutboundSetupIntent object, if any. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.money_management.payout_method"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + restricted: bool + """ + Whether the Payout Method is currently unusable for money movement, despite potentially being correctly set up. + Please reach out to Stripe Support for more information. + """ + type: Union[Literal["bank_account", "card"], str] + """ + Open Enum. The type of payout method. + """ + usage_status: UsageStatus + """ + Indicates whether the payout method has met the necessary requirements for outbound money movement. + """ + _inner_class_types = { + "bank_account": BankAccount, + "card": Card, + "usage_status": UsageStatus, + } diff --git a/stripe/v2/money_management/_payout_method_service.py b/stripe/v2/money_management/_payout_method_service.py new file mode 100644 index 000000000..bce413331 --- /dev/null +++ b/stripe/v2/money_management/_payout_method_service.py @@ -0,0 +1,207 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._payout_method_archive_params import ( + PayoutMethodArchiveParams, + ) + from stripe.params.v2.money_management._payout_method_list_params import ( + PayoutMethodListParams, + ) + from stripe.params.v2.money_management._payout_method_retrieve_params import ( + PayoutMethodRetrieveParams, + ) + from stripe.params.v2.money_management._payout_method_unarchive_params import ( + PayoutMethodUnarchiveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._payout_method import PayoutMethod + + +class PayoutMethodService(StripeService): + def list( + self, + params: Optional["PayoutMethodListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[PayoutMethod]": + """ + List objects that adhere to the PayoutMethod interface. + """ + return cast( + "ListObject[PayoutMethod]", + self._request( + "get", + "/v2/money_management/payout_methods", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["PayoutMethodListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[PayoutMethod]": + """ + List objects that adhere to the PayoutMethod interface. + """ + return cast( + "ListObject[PayoutMethod]", + await self._request_async( + "get", + "/v2/money_management/payout_methods", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["PayoutMethodRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutMethod": + """ + Retrieve a PayoutMethod object. + """ + return cast( + "PayoutMethod", + self._request( + "get", + "/v2/money_management/payout_methods/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["PayoutMethodRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutMethod": + """ + Retrieve a PayoutMethod object. + """ + return cast( + "PayoutMethod", + await self._request_async( + "get", + "/v2/money_management/payout_methods/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def archive( + self, + id: str, + /, + params: Optional["PayoutMethodArchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutMethod": + """ + Archive a `PayoutMethod`. Archiving prevents the Payout Method from being used for outbound payments + or transfers and omits it from normal list results. To restore list visibility, use the + [unarchive endpoint](https://docs.stripe.com/api/v2/money-management/payout-methods/unarchive). + """ + return cast( + "PayoutMethod", + self._request( + "post", + "/v2/money_management/payout_methods/{id}/archive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def archive_async( + self, + id: str, + /, + params: Optional["PayoutMethodArchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutMethod": + """ + Archive a `PayoutMethod`. Archiving prevents the Payout Method from being used for outbound payments + or transfers and omits it from normal list results. To restore list visibility, use the + [unarchive endpoint](https://docs.stripe.com/api/v2/money-management/payout-methods/unarchive). + """ + return cast( + "PayoutMethod", + await self._request_async( + "post", + "/v2/money_management/payout_methods/{id}/archive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def unarchive( + self, + id: str, + /, + params: Optional["PayoutMethodUnarchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutMethod": + """ + Unarchive a `PayoutMethod`. Unarchiving restores the Payout Method to normal list results and clears + only its archived state. It doesn't guarantee that the Payout Method can be used. + """ + return cast( + "PayoutMethod", + self._request( + "post", + "/v2/money_management/payout_methods/{id}/unarchive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def unarchive_async( + self, + id: str, + /, + params: Optional["PayoutMethodUnarchiveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutMethod": + """ + Unarchive a `PayoutMethod`. Unarchiving restores the Payout Method to normal list results and clears + only its archived state. It doesn't guarantee that the Payout Method can be used. + """ + return cast( + "PayoutMethod", + await self._request_async( + "post", + "/v2/money_management/payout_methods/{id}/unarchive".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_payout_methods_bank_account_spec.py b/stripe/v2/money_management/_payout_methods_bank_account_spec.py new file mode 100644 index 000000000..de2f373e4 --- /dev/null +++ b/stripe/v2/money_management/_payout_methods_bank_account_spec.py @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from typing import ClassVar, List, Optional +from typing_extensions import Literal + + +class PayoutMethodsBankAccountSpec(StripeObject): + """ + The PayoutMethodsBankAccountSpec object. + """ + + OBJECT_NAME: ClassVar[ + Literal["v2.money_management.payout_methods_bank_account_spec"] + ] = "v2.money_management.payout_methods_bank_account_spec" + + class Countries(StripeObject): + class Field(StripeObject): + class LocalNameHuman(StripeObject): + content: str + """ + The default content of the localizable string. + """ + localization_key: str + """ + A unique key representing the instance of this localizable string. + """ + + currencies: Optional[List[str]] + """ + The currencies supported by the corresponding credentials for bank accounts in the specified country. + """ + local_name: str + """ + The local name of the field. + """ + local_name_human: LocalNameHuman + """ + The human readable local name of the field. + """ + max_length: int + """ + The maximum length of the field. + """ + min_length: int + """ + THe minimum length of the field. + """ + placeholder: str + """ + The placeholder value of the field. + """ + stripe_name: str + """ + The stripe name of the field. + """ + validation_regex: str + """ + The validation regex of the field. + """ + _inner_class_types = {"local_name_human": LocalNameHuman} + + fields: List[Field] + """ + The list of fields for a country, along with associated information. + """ + _inner_class_types = {"fields": Field} + + countries: UntypedStripeObject[Countries] + """ + The list of specs by country. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.money_management.payout_methods_bank_account_spec"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + _inner_class_types = {"countries": Countries} diff --git a/stripe/v2/money_management/_payout_methods_bank_account_spec_service.py b/stripe/v2/money_management/_payout_methods_bank_account_spec_service.py new file mode 100644 index 000000000..bf85f5d04 --- /dev/null +++ b/stripe/v2/money_management/_payout_methods_bank_account_spec_service.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._payout_methods_bank_account_spec_retrieve_params import ( + PayoutMethodsBankAccountSpecRetrieveParams, + ) + from stripe.v2.money_management._payout_methods_bank_account_spec import ( + PayoutMethodsBankAccountSpec, + ) + + +class PayoutMethodsBankAccountSpecService(StripeService): + def retrieve( + self, + params: Optional["PayoutMethodsBankAccountSpecRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutMethodsBankAccountSpec": + """ + Fetch the specifications for a set of countries to know which + credential fields are required, the validations for each fields, and how to translate these + country-specific fields to the generic fields in the PayoutMethodBankAccount type. + """ + return cast( + "PayoutMethodsBankAccountSpec", + self._request( + "get", + "/v2/money_management/payout_methods_bank_account_spec", + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + params: Optional["PayoutMethodsBankAccountSpecRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "PayoutMethodsBankAccountSpec": + """ + Fetch the specifications for a set of countries to know which + credential fields are required, the validations for each fields, and how to translate these + country-specific fields to the generic fields in the PayoutMethodBankAccount type. + """ + return cast( + "PayoutMethodsBankAccountSpec", + await self._request_async( + "get", + "/v2/money_management/payout_methods_bank_account_spec", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_received_credit.py b/stripe/v2/money_management/_received_credit.py new file mode 100644 index 000000000..ad1812473 --- /dev/null +++ b/stripe/v2/money_management/_received_credit.py @@ -0,0 +1,266 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount +from typing import ClassVar, Optional, Union +from typing_extensions import Literal + + +class ReceivedCredit(StripeObject): + """ + Use ReceivedCredits API to retrieve information on when, where, and how funds are sent into your FinancialAccount. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.received_credit"]] = ( + "v2.money_management.received_credit" + ) + + class BalanceTransfer(StripeObject): + from_account: Optional[str] + """ + The ID of the account that owns the source object originated the ReceivedCredit. + """ + outbound_payment: Optional[str] + """ + The ID of the outbound payment object that originated the ReceivedCredit. + """ + outbound_transfer: Optional[str] + """ + The ID of the outbound transfer object that originated the ReceivedCredit. + """ + payout: Optional[str] + """ + The ID of the payout object that originated the ReceivedCredit. + """ + transfer: Optional[str] + """ + The ID of the v1 transfer object that originated the ReceivedCredit. + """ + type: Union[ + Literal[ + "outbound_payment", "outbound_transfer", "payout", "transfer" + ], + str, + ] + """ + Open Enum. The type of Stripe Money Movement that originated the ReceivedCredit. + """ + + class BankTransfer(StripeObject): + class OriginatingBankAccount(StripeObject): + class Aba(StripeObject): + account_holder_name: Optional[str] + """ + The name of the account holder that sent the payment. + """ + bank_name: Optional[str] + """ + The bank name the transfer was received from. + """ + last4: Optional[str] + """ + The last 4 digits of the account number that originated the transfer. + """ + routing_number: Optional[str] + """ + The routing number of the account that originated the transfer. + """ + + class Iban(StripeObject): + account_holder_name: Optional[str] + """ + The account holder name of the bank account the transfer was received from. + """ + bank_name: Optional[str] + """ + The bank name the transfer was received from. + """ + bic: Optional[str] + """ + The BIC/SWIFT code of the account that originated the transfer. + """ + country: Optional[str] + """ + The origination country of the bank transfer. + """ + iban: Optional[str] + """ + The IBAN that originated the transfer. + """ + + class SortCode(StripeObject): + account_holder_name: Optional[str] + """ + The account holder name of the bank account the transfer was received from. + """ + bank_name: Optional[str] + """ + The bank name the transfer was received from. + """ + last4: Optional[str] + """ + The last 4 digits of the account number that originated the transfer. + """ + sort_code: Optional[str] + """ + The sort code of the account that originated the transfer. + """ + + aba: Optional[Aba] + """ + Hash containing the transaction bank details. Present if `type` field value is `aba`. + """ + iban: Optional[Iban] + """ + Hash containing the transaction bank details. Present if `type` field value is `iban`. + """ + sort_code: Optional[SortCode] + """ + Hash containing the transaction bank details. Present if `type` field value is `sort_code`. + """ + type: Union[Literal["aba", "iban", "sort_code"], str] + """ + Open Enum. The type of bank transfer that originated this ReceivedCredit. + """ + _inner_class_types = { + "aba": Aba, + "iban": Iban, + "sort_code": SortCode, + } + + financial_address: str + """ + Financial Address on which funds for ReceivedCredit were received. + """ + network: Union[ + Literal[ + "ach", "chaps", "fedwire", "fps", "rtp", "sepa", "sepa_instant" + ], + str, + ] + """ + The money transmission network used to send funds for this ReceivedCredit. + """ + originating_bank_account: OriginatingBankAccount + """ + Hash containing the originating bank account details and type for this bank transfer. + """ + statement_descriptor: Optional[str] + """ + Freeform string set by originator of the external ReceivedCredit. + """ + _inner_class_types = { + "originating_bank_account": OriginatingBankAccount, + } + + class StatusDetails(StripeObject): + class Failed(StripeObject): + reason: Union[ + Literal[ + "capability_inactive", + "currency_unsupported_on_financial_address", + "financial_address_inactive", + "stripe_rejected", + ], + str, + ] + """ + Open Enum. The `failed` status reason. + """ + + class Returned(StripeObject): + reason: Union[Literal["originator_initiated_reversal"], str] + """ + Open Enum. The `returned` status reason. + """ + + failed: Optional[Failed] + """ + Hash that provides additional information regarding the reason behind a `failed` ReceivedCredit status. It is only present when the ReceivedCredit status is `failed`. + """ + returned: Optional[Returned] + """ + Hash that provides additional information regarding the reason behind a `returned` ReceivedCredit status. It is only present when the ReceivedCredit status is `returned`. + """ + _inner_class_types = {"failed": Failed, "returned": Returned} + + class StatusTransitions(StripeObject): + failed_at: Optional[str] + """ + Timestamp describing when the ReceivedCredit was marked as `failed`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + returned_at: Optional[str] + """ + Timestamp describing when the ReceivedCredit changed status to `returned`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + succeeded_at: Optional[str] + """ + Timestamp describing when the ReceivedCredit was marked as `succeeded`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + + amount: Amount + """ + The amount and currency credited to the FinancialAccount. + """ + amount_received: Amount + """ + The amount and currency Stripe received from the external source, before any conversion or fees. + """ + balance_transfer: Optional[BalanceTransfer] + """ + This object stores details about the originating Stripe transaction that resulted in the ReceivedCredit. Present if `type` field value is `balance_transfer`. + """ + bank_transfer: Optional[BankTransfer] + """ + This object stores details about the originating banking transaction that resulted in the ReceivedCredit. Present if `type` field value is `bank_transfer`. + """ + created: str + """ + Time at which the ReceivedCredit was created. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + description: Optional[str] + """ + Freeform string set by originator of the ReceivedCredit. + """ + financial_account: str + """ + Financial Account ID on which funds for ReceivedCredit were received. + """ + id: str + """ + Unique identifier for the ReceivedCredit. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.money_management.received_credit"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + status: Union[Literal["failed", "pending", "returned", "succeeded"], str] + """ + Open Enum. The status of the ReceivedCredit. + """ + status_details: Optional[StatusDetails] + """ + This hash contains detailed information that elaborates on the specific status of the ReceivedCredit. e.g the reason behind a failure if the status is marked as `failed`. + """ + status_transitions: Optional[StatusTransitions] + """ + Hash containing timestamps of when the object transitioned to a particular status. + """ + type: Union[Literal["balance_transfer", "bank_transfer"], str] + """ + Open Enum. The type of flow that caused the ReceivedCredit. + """ + _inner_class_types = { + "balance_transfer": BalanceTransfer, + "bank_transfer": BankTransfer, + "status_details": StatusDetails, + "status_transitions": StatusTransitions, + } diff --git a/stripe/v2/money_management/_received_credit_service.py b/stripe/v2/money_management/_received_credit_service.py new file mode 100644 index 000000000..3ecd4402b --- /dev/null +++ b/stripe/v2/money_management/_received_credit_service.py @@ -0,0 +1,103 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._received_credit_list_params import ( + ReceivedCreditListParams, + ) + from stripe.params.v2.money_management._received_credit_retrieve_params import ( + ReceivedCreditRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._received_credit import ReceivedCredit + + +class ReceivedCreditService(StripeService): + def list( + self, + params: Optional["ReceivedCreditListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[ReceivedCredit]": + """ + Retrieves a list of ReceivedCredits. + """ + return cast( + "ListObject[ReceivedCredit]", + self._request( + "get", + "/v2/money_management/received_credits", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["ReceivedCreditListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[ReceivedCredit]": + """ + Retrieves a list of ReceivedCredits. + """ + return cast( + "ListObject[ReceivedCredit]", + await self._request_async( + "get", + "/v2/money_management/received_credits", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["ReceivedCreditRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ReceivedCredit": + """ + Retrieve a ReceivedCredit by ID. + """ + return cast( + "ReceivedCredit", + self._request( + "get", + "/v2/money_management/received_credits/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["ReceivedCreditRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ReceivedCredit": + """ + Retrieve a ReceivedCredit by ID. + """ + return cast( + "ReceivedCredit", + await self._request_async( + "get", + "/v2/money_management/received_credits/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_recipient_verification.py b/stripe/v2/money_management/_recipient_verification.py new file mode 100644 index 000000000..27ba25de0 --- /dev/null +++ b/stripe/v2/money_management/_recipient_verification.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional, Union +from typing_extensions import Literal + + +class RecipientVerification(StripeObject): + """ + RecipientVerification represents a verification of recipient you intend to send funds to. + """ + + OBJECT_NAME: ClassVar[ + Literal["v2.money_management.recipient_verification"] + ] = "v2.money_management.recipient_verification" + + class ConsumedBy(StripeObject): + outbound_payment: Optional[str] + """ + The ID of the OutboundPayment that consumed the RecipientVerification. + """ + type: Union[Literal["outbound_payment"], str] + """ + The type of resource that consumed the RecipientVerification. + """ + + class MatchResultDetails(StripeObject): + matched_business_type: Optional[Literal["business", "personal"]] + """ + The business type matched by the provider. Only present for Confirmation of Payee (CoP) verifications. + """ + matched_name: Optional[str] + """ + The account name associated with the bank account as provided by the VoP provider, only present if there is a match or close match. + """ + message: str + """ + A message describing the match result. + """ + provided_business_type: Optional[Literal["business", "personal"]] + """ + The business type provided by the user. Only present for Confirmation of Payee (CoP) verifications. + """ + provided_name: str + """ + The name associated with the provided recipient. + """ + + class StatusTransitions(StripeObject): + acknowledged_at: Optional[str] + """ + Timestamp describing when a RecipientVerification changed status to `acknowledged`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + consumed_at: Optional[str] + """ + Timestamp describing when a RecipientVerification changed status to `consumed`. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + + consumed_by: Optional[ConsumedBy] + """ + The resource that consumed this verification. + """ + created: str + """ + Time at which the RecipientVerification was created. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + expires_at: Optional[str] + """ + Time at which the RecipientVerification expires, 5 minutes after the creation. Only applicable for Verification of Payee (VoP) verifications. + Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + id: str + """ + The ID of the RecipientVerification. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + match_result: Literal["close_match", "match", "no_match", "unavailable"] + """ + Closed Enum. Match level of the RecipientVerification: `match`, `close_match`, `no_match`, `unavailable`. + """ + match_result_details: MatchResultDetails + """ + Details for the match result. + """ + object: Literal["v2.money_management.recipient_verification"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + payout_method: str + """ + ID of the payout method that was verified. + """ + recipient: Optional[str] + """ + ID of the recipient account. Omitted for same-entity payouts. + """ + status: Literal[ + "acknowledged", + "awaiting_acknowledgement", + "consumed", + "expired", + "verified", + ] + """ + Current status of the recipient verification. + """ + status_transitions: Optional[StatusTransitions] + """ + Hash containing timestamps of when the object transitioned to a particular status. + """ + verification_type: Union[ + Literal["confirmation_of_payee", "verification_of_payee"], str + ] + """ + Open Enum. The type of verification performed: `verification_of_payee`, `confirmation_of_payee`. + """ + _inner_class_types = { + "consumed_by": ConsumedBy, + "match_result_details": MatchResultDetails, + "status_transitions": StatusTransitions, + } diff --git a/stripe/v2/money_management/_recipient_verification_service.py b/stripe/v2/money_management/_recipient_verification_service.py new file mode 100644 index 000000000..b8ddc0119 --- /dev/null +++ b/stripe/v2/money_management/_recipient_verification_service.py @@ -0,0 +1,153 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._recipient_verification_acknowledge_params import ( + RecipientVerificationAcknowledgeParams, + ) + from stripe.params.v2.money_management._recipient_verification_create_params import ( + RecipientVerificationCreateParams, + ) + from stripe.params.v2.money_management._recipient_verification_retrieve_params import ( + RecipientVerificationRetrieveParams, + ) + from stripe.v2.money_management._recipient_verification import ( + RecipientVerification, + ) + + +class RecipientVerificationService(StripeService): + def create( + self, + params: "RecipientVerificationCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "RecipientVerification": + """ + Creates a RecipientVerification to verify the recipient you intend to send funds to. + """ + return cast( + "RecipientVerification", + self._request( + "post", + "/v2/money_management/recipient_verifications", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "RecipientVerificationCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "RecipientVerification": + """ + Creates a RecipientVerification to verify the recipient you intend to send funds to. + """ + return cast( + "RecipientVerification", + await self._request_async( + "post", + "/v2/money_management/recipient_verifications", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["RecipientVerificationRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "RecipientVerification": + """ + Retrieves the details of an existing RecipientVerification by passing the unique RecipientVerification ID. + """ + return cast( + "RecipientVerification", + self._request( + "get", + "/v2/money_management/recipient_verifications/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["RecipientVerificationRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "RecipientVerification": + """ + Retrieves the details of an existing RecipientVerification by passing the unique RecipientVerification ID. + """ + return cast( + "RecipientVerification", + await self._request_async( + "get", + "/v2/money_management/recipient_verifications/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def acknowledge( + self, + id: str, + /, + params: Optional["RecipientVerificationAcknowledgeParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "RecipientVerification": + """ + Acknowledges an existing RecipientVerification in the `awaiting_acknowledgement` state. + """ + return cast( + "RecipientVerification", + self._request( + "post", + "/v2/money_management/recipient_verifications/{id}/acknowledge".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def acknowledge_async( + self, + id: str, + /, + params: Optional["RecipientVerificationAcknowledgeParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "RecipientVerification": + """ + Acknowledges an existing RecipientVerification in the `awaiting_acknowledgement` state. + """ + return cast( + "RecipientVerification", + await self._request_async( + "post", + "/v2/money_management/recipient_verifications/{id}/acknowledge".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_test_helpers_service.py b/stripe/v2/money_management/_test_helpers_service.py new file mode 100644 index 000000000..d5fa4a9cb --- /dev/null +++ b/stripe/v2/money_management/_test_helpers_service.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.money_management.test_helpers._financial_address_service import ( + FinancialAddressService, + ) + +_subservices = { + "financial_addresses": [ + "stripe.v2.money_management.test_helpers._financial_address_service", + "FinancialAddressService", + ], +} + + +class TestHelpersService(StripeService): + financial_addresses: "FinancialAddressService" + + def __init__(self, requestor): + super().__init__(requestor) + + def __getattr__(self, name): + try: + import_from, service = _subservices[name] + service_class = getattr( + import_module(import_from), + service, + ) + setattr( + self, + name, + service_class(self._requestor), + ) + return getattr(self, name) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/money_management/_transaction.py b/stripe/v2/money_management/_transaction.py new file mode 100644 index 000000000..80e9cbe57 --- /dev/null +++ b/stripe/v2/money_management/_transaction.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject, UntypedStripeObject +from stripe.v2._amount import Amount +from typing import ClassVar, Optional, Union +from typing_extensions import Literal + + +class Transaction(StripeObject): + """ + A Transaction records how a money movement flow affects your FinancialAccount balance. + A flow can create one or more Transactions. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.transaction"]] = ( + "v2.money_management.transaction" + ) + + class BalanceImpact(StripeObject): + available: Amount + """ + The change to the available balance. + """ + inbound_pending: Amount + """ + The change to the `inbound_pending` balance. + """ + outbound_pending: Amount + """ + The change to the `outbound_pending` balance. + """ + + class Counterparty(StripeObject): + name: Optional[str] + """ + Name of the counterparty. + """ + + class Flow(StripeObject): + adjustment: Optional[str] + """ + If applicable, the ID of the Adjustment that created this Transaction. + """ + currency_conversion: Optional[str] + """ + When available, the ID of the CurrencyConversion that created this Transaction. + """ + fee_batch: Optional[str] + """ + If applicable, the ID of the FeeBatch that created this Transaction. + """ + inbound_transfer: Optional[str] + """ + If applicable, the ID of the InboundTransfer that created this Transaction. + """ + outbound_payment: Optional[str] + """ + If applicable, the ID of the OutboundPayment that created this Transaction. + """ + outbound_transfer: Optional[str] + """ + If applicable, the ID of the OutboundTransfer that created this Transaction. + """ + received_credit: Optional[str] + """ + If applicable, the ID of the ReceivedCredit that created this Transaction. + """ + received_debit: Optional[str] + """ + If applicable, the ID of the ReceivedDebit that created this Transaction. + """ + type: Union[ + Literal[ + "adjustment", + "currency_conversion", + "fee_batch", + "inbound_transfer", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit", + ], + str, + ] + """ + Open Enum. The type of flow that created the Transaction. When available, the flow's ID is provided in the corresponding field. + """ + + class RegulatoryReceipt(StripeObject): + status: Literal[ + "available", "not_applicable", "pending", "url_expired" + ] + """ + Current availability of the regulatory receipt. + """ + url: Optional[str] + """ + Hosted URL for the receipt. + """ + url_expires_at: Optional[str] + """ + Time until which `url` is valid. + """ + + class StatusTransitions(StripeObject): + posted_at: Optional[str] + """ + The time at which the Transaction became `posted`. Only present when `status` is `posted`. + """ + void_at: Optional[str] + """ + The time at which the Transaction became `void`. Only present when `status` is `void`. + """ + + amount: Amount + """ + The amount of the Transaction. + """ + balance_impact: BalanceImpact + """ + The change to the FinancialAccount's balance. This is the sum of the balance impacts of this Transaction's + TransactionEntries with `effective_at` timestamps in the past. + """ + category: Union[ + Literal[ + "adjustment", + "currency_conversion", + "inbound_transfer", + "inbound_transfer_reversal", + "outbound_payment", + "outbound_payment_reversal", + "outbound_transfer", + "outbound_transfer_reversal", + "received_credit", + "received_credit_reversal", + "received_debit", + "received_debit_reversal", + "stripe_fee", + "stripe_fee_tax", + ], + str, + ] + """ + Open Enum. A category used to classify the Transaction. + """ + counterparty: Optional[Counterparty] + """ + Details about the counterparty to this Transaction. + """ + created: str + """ + Time at which the object was created. Represented as an RFC 3339 timestamp in UTC with millisecond precision, for example `2022-09-18T13:22:18.123Z`. + """ + description: Optional[str] + """ + A description of the Transaction. When applicable, the description is copied from the flow object when + the Transaction is created. You can update it using the Update Transaction endpoint. + """ + financial_account: str + """ + The ID of the FinancialAccount affected by this Transaction. + """ + flow: Optional[Flow] + """ + Details about the flow object that created the Transaction, such as an InboundTransfer or OutboundPayment. + `flow.type` identifies the kind of object. The corresponding field contains its ID, when available: + for an InboundTransfer, `flow.inbound_transfer` contains the InboundTransfer's ID. Pass that ID to + the `flow` parameter on List Transactions. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + metadata: Optional[UntypedStripeObject[str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information + about the object in a structured format. + """ + object: Literal["v2.money_management.transaction"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + regulatory_receipt: RegulatoryReceipt + """ + Hosted transaction receipt that is provided when money movement is considered regulated under Stripe's money transmission licenses. If not applicable, `regulatory_receipt.status` will be `not_applicable` and no URL will be provided unless you opt in by calling `/refresh_regulatory_receipt`. + """ + status: Literal["pending", "posted", "void"] + """ + Closed Enum. The current status of the Transaction. + A Transaction is `pending` if either `balance_impact.inbound_pending` or `balance_impact.outbound_pending` is non-zero. + A Transaction is `posted` if only `balance_impact.available` is non-zero. + A Transaction is `void` if there is no balance impact. + `posted` and `void` are terminal states, and no additional TransactionEntries will be added to the Transaction. + """ + status_transitions: StatusTransitions + """ + Timestamps for when the Transaction transitioned to each status. + """ + _inner_class_types = { + "balance_impact": BalanceImpact, + "counterparty": Counterparty, + "flow": Flow, + "regulatory_receipt": RegulatoryReceipt, + "status_transitions": StatusTransitions, + } diff --git a/stripe/v2/money_management/_transaction_entry.py b/stripe/v2/money_management/_transaction_entry.py new file mode 100644 index 000000000..e5b50dd37 --- /dev/null +++ b/stripe/v2/money_management/_transaction_entry.py @@ -0,0 +1,155 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount +from typing import ClassVar, Optional, Union +from typing_extensions import Literal + + +class TransactionEntry(StripeObject): + """ + TransactionEntries model funds moving between availability states for a given Transaction. + """ + + OBJECT_NAME: ClassVar[Literal["v2.money_management.transaction_entry"]] = ( + "v2.money_management.transaction_entry" + ) + + class BalanceImpact(StripeObject): + available: Amount + """ + The change to the available balance. + """ + inbound_pending: Amount + """ + The change to the `inbound_pending` balance. + """ + outbound_pending: Amount + """ + The change to the `outbound_pending` balance. + """ + + class TransactionDetails(StripeObject): + class Flow(StripeObject): + adjustment: Optional[str] + """ + If applicable, the ID of the Adjustment that created this Transaction. + """ + currency_conversion: Optional[str] + """ + When available, the ID of the CurrencyConversion that created this Transaction. + """ + fee_batch: Optional[str] + """ + If applicable, the ID of the FeeBatch that created this Transaction. + """ + inbound_transfer: Optional[str] + """ + If applicable, the ID of the InboundTransfer that created this Transaction. + """ + outbound_payment: Optional[str] + """ + If applicable, the ID of the OutboundPayment that created this Transaction. + """ + outbound_transfer: Optional[str] + """ + If applicable, the ID of the OutboundTransfer that created this Transaction. + """ + received_credit: Optional[str] + """ + If applicable, the ID of the ReceivedCredit that created this Transaction. + """ + received_debit: Optional[str] + """ + If applicable, the ID of the ReceivedDebit that created this Transaction. + """ + type: Union[ + Literal[ + "adjustment", + "currency_conversion", + "fee_batch", + "inbound_transfer", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit", + ], + str, + ] + """ + Open Enum. The type of flow that created the Transaction. When available, the flow's ID is provided in the corresponding field. + """ + + category: Union[ + Literal[ + "adjustment", + "currency_conversion", + "inbound_transfer", + "inbound_transfer_reversal", + "outbound_payment", + "outbound_payment_reversal", + "outbound_transfer", + "outbound_transfer_reversal", + "received_credit", + "received_credit_reversal", + "received_debit", + "received_debit_reversal", + "stripe_fee", + "stripe_fee_tax", + ], + str, + ] + """ + Open Enum. The category of this TransactionEntry's parent Transaction. + """ + financial_account: str + """ + The ID of the FinancialAccount affected by this Transaction. + """ + flow: Optional[Flow] + """ + Details about the flow object that created the Transaction this entry belongs to, such as an + InboundTransfer or OutboundPayment. `transaction_details.flow.type` identifies the kind of object. + The corresponding field contains its ID, when available: for an InboundTransfer, + `transaction_details.flow.inbound_transfer` contains the InboundTransfer's ID. To list entries for + the parent Transaction, pass the TransactionEntry's `transaction` ID to the `transaction` parameter + on List Transaction Entries. + """ + _inner_class_types = {"flow": Flow} + + balance_impact: BalanceImpact + """ + The change to the FinancialAccount's balance that takes effect at this TransactionEntry's `effective_at` timestamp. + """ + created: str + """ + Time at which the object was created. Represented as an RFC 3339 timestamp in UTC with millisecond precision, for example `2022-09-18T13:22:18.123Z`. + """ + effective_at: str + """ + Time at which the TransactionEntry affects the FinancialAccount balance. This can be in the past or future. + """ + id: str + """ + Unique identifier for the object. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.money_management.transaction_entry"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + transaction: str + """ + The ID of the Transaction that this TransactionEntry belongs to. + """ + transaction_details: TransactionDetails + """ + Details copied from the Transaction that this TransactionEntry belongs to. + """ + _inner_class_types = { + "balance_impact": BalanceImpact, + "transaction_details": TransactionDetails, + } diff --git a/stripe/v2/money_management/_transaction_entry_service.py b/stripe/v2/money_management/_transaction_entry_service.py new file mode 100644 index 000000000..f95b0e6ee --- /dev/null +++ b/stripe/v2/money_management/_transaction_entry_service.py @@ -0,0 +1,103 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._transaction_entry_list_params import ( + TransactionEntryListParams, + ) + from stripe.params.v2.money_management._transaction_entry_retrieve_params import ( + TransactionEntryRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._transaction_entry import TransactionEntry + + +class TransactionEntryService(StripeService): + def list( + self, + params: Optional["TransactionEntryListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[TransactionEntry]": + """ + Returns a list of TransactionEntries that match the provided filters. + """ + return cast( + "ListObject[TransactionEntry]", + self._request( + "get", + "/v2/money_management/transaction_entries", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["TransactionEntryListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[TransactionEntry]": + """ + Returns a list of TransactionEntries that match the provided filters. + """ + return cast( + "ListObject[TransactionEntry]", + await self._request_async( + "get", + "/v2/money_management/transaction_entries", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["TransactionEntryRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "TransactionEntry": + """ + Retrieves the details of a TransactionEntry by ID. + """ + return cast( + "TransactionEntry", + self._request( + "get", + "/v2/money_management/transaction_entries/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["TransactionEntryRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "TransactionEntry": + """ + Retrieves the details of a TransactionEntry by ID. + """ + return cast( + "TransactionEntry", + await self._request_async( + "get", + "/v2/money_management/transaction_entries/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_transaction_service.py b/stripe/v2/money_management/_transaction_service.py new file mode 100644 index 000000000..678e9a3da --- /dev/null +++ b/stripe/v2/money_management/_transaction_service.py @@ -0,0 +1,201 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management._transaction_list_params import ( + TransactionListParams, + ) + from stripe.params.v2.money_management._transaction_refresh_regulatory_receipt_params import ( + TransactionRefreshRegulatoryReceiptParams, + ) + from stripe.params.v2.money_management._transaction_retrieve_params import ( + TransactionRetrieveParams, + ) + from stripe.params.v2.money_management._transaction_update_params import ( + TransactionUpdateParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._transaction import Transaction + + +class TransactionService(StripeService): + def list( + self, + params: Optional["TransactionListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Transaction]": + """ + Returns a list of Transactions that match the provided filters. + """ + return cast( + "ListObject[Transaction]", + self._request( + "get", + "/v2/money_management/transactions", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["TransactionListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[Transaction]": + """ + Returns a list of Transactions that match the provided filters. + """ + return cast( + "ListObject[Transaction]", + await self._request_async( + "get", + "/v2/money_management/transactions", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + /, + params: Optional["TransactionRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Transaction": + """ + Retrieves the details of a Transaction by ID. + """ + return cast( + "Transaction", + self._request( + "get", + "/v2/money_management/transactions/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + /, + params: Optional["TransactionRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Transaction": + """ + Retrieves the details of a Transaction by ID. + """ + return cast( + "Transaction", + await self._request_async( + "get", + "/v2/money_management/transactions/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def update( + self, + id: str, + /, + params: Optional["TransactionUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Transaction": + """ + Updates an existing Transaction. You can update its description and metadata. + """ + return cast( + "Transaction", + self._request( + "post", + "/v2/money_management/transactions/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def update_async( + self, + id: str, + /, + params: Optional["TransactionUpdateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Transaction": + """ + Updates an existing Transaction. You can update its description and metadata. + """ + return cast( + "Transaction", + await self._request_async( + "post", + "/v2/money_management/transactions/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def refresh_regulatory_receipt( + self, + id: str, + /, + params: Optional["TransactionRefreshRegulatoryReceiptParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Transaction": + """ + Creates a fresh hosted URL for a Transaction's regulatory receipt. + """ + return cast( + "Transaction", + self._request( + "post", + "/v2/money_management/transactions/{id}/refresh_regulatory_receipt".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def refresh_regulatory_receipt_async( + self, + id: str, + /, + params: Optional["TransactionRefreshRegulatoryReceiptParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "Transaction": + """ + Creates a fresh hosted URL for a Transaction's regulatory receipt. + """ + return cast( + "Transaction", + await self._request_async( + "post", + "/v2/money_management/transactions/{id}/refresh_regulatory_receipt".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/test_helpers/__init__.py b/stripe/v2/money_management/test_helpers/__init__.py new file mode 100644 index 000000000..c70164cfb --- /dev/null +++ b/stripe/v2/money_management/test_helpers/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.money_management.test_helpers._financial_address_service import ( + FinancialAddressService as FinancialAddressService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "FinancialAddressService": ( + "stripe.v2.money_management.test_helpers._financial_address_service", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/money_management/test_helpers/_financial_address_service.py b/stripe/v2/money_management/test_helpers/_financial_address_service.py new file mode 100644 index 000000000..2e690503f --- /dev/null +++ b/stripe/v2/money_management/test_helpers/_financial_address_service.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.money_management.test_helpers._financial_address_credit_params import ( + FinancialAddressCreditParams, + ) + from stripe.v2.money_management._financial_address_credit_simulation import ( + FinancialAddressCreditSimulation, + ) + + +class FinancialAddressService(StripeService): + def credit( + self, + id: str, + /, + params: "FinancialAddressCreditParams", + options: Optional["RequestOptions"] = None, + ) -> "FinancialAddressCreditSimulation": + """ + Simulate crediting a FinancialAddress in a Sandbox environment. This can be used to add virtual funds and increase your balance for testing. + """ + return cast( + "FinancialAddressCreditSimulation", + self._request( + "post", + "/v2/money_management/test_helpers/financial_addresses/{id}/credit".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def credit_async( + self, + id: str, + /, + params: "FinancialAddressCreditParams", + options: Optional["RequestOptions"] = None, + ) -> "FinancialAddressCreditSimulation": + """ + Simulate crediting a FinancialAddress in a Sandbox environment. This can be used to add virtual funds and increase your balance for testing. + """ + return cast( + "FinancialAddressCreditSimulation", + await self._request_async( + "post", + "/v2/money_management/test_helpers/financial_addresses/{id}/credit".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/test_helpers/__init__.py b/stripe/v2/test_helpers/__init__.py new file mode 100644 index 000000000..7c3d0ecad --- /dev/null +++ b/stripe/v2/test_helpers/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from importlib import import_module +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.v2.test_helpers._money_management_service import ( + MoneyManagementService as MoneyManagementService, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "MoneyManagementService": ( + "stripe.v2.test_helpers._money_management_service", + False, + ), +} +if not TYPE_CHECKING: + + def __getattr__(name): + try: + target, is_submodule = _import_map[name] + module = import_module(target) + if is_submodule: + return module + + return getattr( + module, + name, + ) + except KeyError: + raise AttributeError() diff --git a/stripe/v2/test_helpers/_money_management_service.py b/stripe/v2/test_helpers/_money_management_service.py new file mode 100644 index 000000000..a9788072d --- /dev/null +++ b/stripe/v2/test_helpers/_money_management_service.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.v2.test_helpers._money_management_recipient_verifications_params import ( + MoneyManagementRecipientVerificationsParams, + ) + from stripe.v2.money_management._recipient_verification import ( + RecipientVerification, + ) + + +class MoneyManagementService(StripeService): + def recipient_verifications( + self, + params: "MoneyManagementRecipientVerificationsParams", + options: Optional["RequestOptions"] = None, + ) -> "RecipientVerification": + """ + Creates a RecipientVerification with a specified match result for testing purposes in a Sandbox environment. + """ + return cast( + "RecipientVerification", + self._request( + "post", + "/v2/test_helpers/money_management/recipient_verifications", + base_address="api", + params=params, + options=options, + ), + ) + + async def recipient_verifications_async( + self, + params: "MoneyManagementRecipientVerificationsParams", + options: Optional["RequestOptions"] = None, + ) -> "RecipientVerification": + """ + Creates a RecipientVerification with a specified match result for testing purposes in a Sandbox environment. + """ + return cast( + "RecipientVerification", + await self._request_async( + "post", + "/v2/test_helpers/money_management/recipient_verifications", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index ab7cd849c..0884cc636 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -44218,6 +44218,1747 @@ def test_v2_core_event_destination_post_5_service( is_json=True, ) + def test_v2_core_vault_gb_bank_account_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/core/vault/gb_bank_accounts", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.gb_bank_accounts.list() + http_client_mock.assert_requested( + "get", + path="/v2/core/vault/gb_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_core_vault_gb_bank_account_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/gb_bank_accounts", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.gb_bank_accounts.create({"currency": "usd"}) + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/gb_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + post_data='{"currency":"usd"}', + is_json=True, + ) + + def test_v2_core_vault_gb_bank_account_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/core/vault/gb_bank_accounts/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.gb_bank_accounts.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/core/vault/gb_bank_accounts/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_core_vault_gb_bank_account_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/gb_bank_accounts/id_123/archive", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.gb_bank_accounts.archive("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/gb_bank_accounts/id_123/archive", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_core_vault_gb_bank_account_post_3_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/gb_bank_accounts/id_123/unarchive", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.gb_bank_accounts.unarchive("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/gb_bank_accounts/id_123/unarchive", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_core_vault_us_bank_account_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/core/vault/us_bank_accounts", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.list() + http_client_mock.assert_requested( + "get", + path="/v2/core/vault/us_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_core_vault_us_bank_account_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.create( + { + "account_number": "account_number", + "currency": "usd", + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + post_data='{"account_number":"account_number","currency":"usd"}', + is_json=True, + ) + + def test_v2_core_vault_us_bank_account_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/core/vault/us_bank_accounts/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/core/vault/us_bank_accounts/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_core_vault_us_bank_account_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.update("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_core_vault_us_bank_account_post_3_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/archive", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.archive("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/archive", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_core_vault_us_bank_account_post_4_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.confirm_microdeposits("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_core_vault_us_bank_account_post_5_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.send_microdeposits("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/send_microdeposits", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_core_vault_us_bank_account_post_6_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/unarchive", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.vault.us_bank_accounts.unarchive("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/unarchive", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_adjustment_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/adjustments", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.adjustments.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/adjustments", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_adjustment_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/adjustments/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.adjustments.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/adjustments/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_financial_account_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/financial_accounts", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.financial_accounts.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/financial_accounts", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_financial_account_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/financial_accounts/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.financial_accounts.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/financial_accounts/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_financial_account_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/financial_accounts/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.financial_accounts.update("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/financial_accounts/id_123", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_financial_address_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/financial_addresses", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.financial_addresses.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/financial_addresses", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_financial_address_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/financial_addresses", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.financial_addresses.create( + { + "financial_account": "financial_account", + "type": "bank_account", + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/financial_addresses", + query_string="", + api_base="https://api.stripe.com", + post_data='{"financial_account":"financial_account","type":"bank_account"}', + is_json=True, + ) + + def test_v2_money_management_financial_address_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/financial_addresses/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.financial_addresses.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/financial_addresses/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_inbound_transfer_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/inbound_transfers", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.inbound_transfers.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/inbound_transfers", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_inbound_transfer_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/inbound_transfers", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.inbound_transfers.create( + { + "amount": {"currency": "USD", "value": 96}, + "from": { + "currency": "usd", + "payment_method": "payment_method", + }, + "to": { + "currency": "usd", + "financial_account": "financial_account", + }, + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/inbound_transfers", + query_string="", + api_base="https://api.stripe.com", + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","payment_method":"payment_method"},"to":{"currency":"usd","financial_account":"financial_account"}}', + is_json=True, + ) + + def test_v2_money_management_inbound_transfer_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/inbound_transfers/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.inbound_transfers.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/inbound_transfers/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_outbound_payment_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/outbound_payments", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.outbound_payments.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/outbound_payments", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_outbound_payment_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_payments", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.outbound_payments.create( + { + "amount": {"currency": "USD", "value": 96}, + "from": { + "currency": "usd", + "financial_account": "financial_account", + }, + "to": { + "currency": "usd", + "payout_method": "payout_method", + "payout_method_options": { + "bank_account": { + "preferred_network_options": { + "ach": { + "submission": "next_day", + "transaction_purpose": "payroll", + }, + }, + "preferred_networks": ["rtp"], + }, + }, + "recipient": "recipient", + }, + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/outbound_payments", + query_string="", + api_base="https://api.stripe.com", + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","payout_method_options":{"bank_account":{"preferred_network_options":{"ach":{"submission":"next_day","transaction_purpose":"payroll"}},"preferred_networks":["rtp"]}},"recipient":"recipient"}}', + is_json=True, + ) + + def test_v2_money_management_outbound_payment_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/outbound_payments/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.outbound_payments.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/outbound_payments/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_outbound_payment_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_payments/id_123/cancel", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.outbound_payments.cancel("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/outbound_payments/id_123/cancel", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_outbound_setup_intent_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/outbound_setup_intents", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.outbound_setup_intents.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/outbound_setup_intents", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_outbound_setup_intent_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_setup_intents", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.outbound_setup_intents.create() + http_client_mock.assert_requested( + "post", + path="/v2/money_management/outbound_setup_intents", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_outbound_setup_intent_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/outbound_setup_intents/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.outbound_setup_intents.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/outbound_setup_intents/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_outbound_setup_intent_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_setup_intents/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.outbound_setup_intents.update("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/outbound_setup_intents/id_123", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_outbound_setup_intent_post_3_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_setup_intents/id_123/cancel", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.outbound_setup_intents.cancel("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/outbound_setup_intents/id_123/cancel", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_payout_intent_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/payout_intents", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_intents.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/payout_intents", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_payout_intent_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/payout_intents", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_intents.create( + { + "amount": {"currency": "USD", "value": 96}, + "from": { + "currency": "usd", + "financial_account": "financial_account", + }, + "to": { + "currency": "usd", + "payout_method": "payout_method", + "payout_method_options": { + "bank_account": { + "preferred_network_options": { + "ach": { + "submission": "next_day", + "transaction_purpose": "payroll", + }, + }, + "preferred_networks": ["rtp"], + }, + }, + "recipient": "recipient", + }, + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/payout_intents", + query_string="", + api_base="https://api.stripe.com", + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","payout_method_options":{"bank_account":{"preferred_network_options":{"ach":{"submission":"next_day","transaction_purpose":"payroll"}},"preferred_networks":["rtp"]}},"recipient":"recipient"}}', + is_json=True, + ) + + def test_v2_money_management_payout_intent_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/payout_intents/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_intents.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/payout_intents/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_payout_intent_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/payout_intents/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_intents.update("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/payout_intents/id_123", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_payout_intent_post_3_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/payout_intents/id_123/cancel", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_intents.cancel("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/payout_intents/id_123/cancel", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_payout_intent_post_4_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/payout_intents/id_123/confirm", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_intents.confirm("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/payout_intents/id_123/confirm", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_payout_intent_post_5_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/payout_intents/id_123/refresh_fx_quote", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_intents.refresh_fx_quote("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/payout_intents/id_123/refresh_fx_quote", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_payout_intent_post_6_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/payout_intents/id_123/refresh_recipient_verification", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_intents.refresh_recipient_verification( + "id_123" + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/payout_intents/id_123/refresh_recipient_verification", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_payout_method_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/payout_methods", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_methods.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/payout_methods", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_payout_method_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/payout_methods/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_methods.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/payout_methods/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_payout_method_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/payout_methods/id_123/archive", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_methods.archive("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/payout_methods/id_123/archive", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_payout_method_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/payout_methods/id_123/unarchive", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_methods.unarchive("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/payout_methods/id_123/unarchive", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_payout_methods_bank_account_spec_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/payout_methods_bank_account_spec", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.payout_methods_bank_account_spec.retrieve() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/payout_methods_bank_account_spec", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_received_credit_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/received_credits", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.received_credits.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/received_credits", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_received_credit_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/received_credits/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.received_credits.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/received_credits/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_recipient_verification_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/recipient_verifications", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.recipient_verifications.create( + { + "payout_method": "payout_method", + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/recipient_verifications", + query_string="", + api_base="https://api.stripe.com", + post_data='{"payout_method":"payout_method"}', + is_json=True, + ) + + def test_v2_money_management_recipient_verification_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/recipient_verifications/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.recipient_verifications.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/recipient_verifications/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_recipient_verification_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/recipient_verifications/id_123/acknowledge", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.recipient_verifications.acknowledge( + "id_123" + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/recipient_verifications/id_123/acknowledge", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_test_helpers_financial_address_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/test_helpers/financial_addresses/id_123/credit", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.test_helpers.financial_addresses.credit( + "id_123", + {"amount": {"currency": "USD", "value": 96}, "network": "fedwire"}, + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/test_helpers/financial_addresses/id_123/credit", + query_string="", + api_base="https://api.stripe.com", + post_data='{"amount":{"currency":"USD","value":96},"network":"fedwire"}', + is_json=True, + ) + + def test_v2_money_management_transaction_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/transactions", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.transactions.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/transactions", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_transaction_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/transactions/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.transactions.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/transactions/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_transaction_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/transactions/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.transactions.update("id_123") + http_client_mock.assert_requested( + "post", + path="/v2/money_management/transactions/id_123", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_transaction_post_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/transactions/id_123/refresh_regulatory_receipt", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.transactions.refresh_regulatory_receipt( + "id_123", + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/transactions/id_123/refresh_regulatory_receipt", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_money_management_transaction_entry_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/transaction_entries", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.transaction_entries.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/transaction_entries", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_transaction_entry_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/transaction_entries/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.transaction_entries.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/transaction_entries/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_test_helpers_money_management_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/test_helpers/money_management/recipient_verifications", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.test_helpers.money_management.recipient_verifications( + { + "match_result": "unavailable", + "payout_method": "payout_method", + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/test_helpers/money_management/recipient_verifications", + query_string="", + api_base="https://api.stripe.com", + post_data='{"match_result":"unavailable","payout_method":"payout_method"}', + is_json=True, + ) + + def test_already_canceled_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_payments/id_123/cancel", + rbody='{"error":{"type":"already_canceled","code":"outbound_payment_already_canceled"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.money_management.outbound_payments.cancel("id_123") + except _error.AlreadyCanceledError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/money_management/outbound_payments/id_123/cancel", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_blocked_by_stripe_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/gb_bank_accounts", + rbody='{"error":{"type":"blocked_by_stripe","code":"blocked_gb_bank_account"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.gb_bank_accounts.create({"currency": "usd"}) + except _error.BlockedByStripeError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/gb_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + post_data='{"currency":"usd"}', + is_json=True, + ) + + def test_cannot_proceed_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/gb_bank_accounts", + rbody='{"error":{"type":"cannot_proceed","code":"default_gb_bank_account_cannot_be_archived"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.gb_bank_accounts.create({"currency": "usd"}) + except _error.CannotProceedError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/gb_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + post_data='{"currency":"usd"}', + is_json=True, + ) + + def test_capability_not_enabled_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_payments", + rbody='{"error":{"type":"capability_not_enabled","code":"outbound_flow_from_closed_financial_account_not_supported"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.money_management.outbound_payments.create( + { + "amount": {"currency": "USD", "value": 96}, + "from": { + "currency": "usd", + "financial_account": "financial_account", + }, + "to": {"recipient": "recipient"}, + } + ) + except _error.CapabilityNotEnabledError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/money_management/outbound_payments", + query_string="", + api_base="https://api.stripe.com", + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', + is_json=True, + ) + + def test_controlled_by_alternate_resource_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/gb_bank_accounts/id_123/archive", + rbody='{"error":{"type":"controlled_by_alternate_resource","code":"gb_bank_account_cannot_be_archived"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.gb_bank_accounts.archive("id_123") + except _error.ControlledByAlternateResourceError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/gb_bank_accounts/id_123/archive", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_feature_not_enabled_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/financial_addresses", + rbody='{"error":{"type":"feature_not_enabled","code":"recipient_feature_not_active"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.money_management.financial_addresses.create( + { + "financial_account": "financial_account", + "type": "bank_account", + } + ) + except _error.FeatureNotEnabledError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/money_management/financial_addresses", + query_string="", + api_base="https://api.stripe.com", + post_data='{"financial_account":"financial_account","type":"bank_account"}', + is_json=True, + ) + + def test_financial_account_not_open_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/financial_addresses", + rbody='{"error":{"type":"financial_account_not_open","code":"financial_account_not_in_open_status"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.money_management.financial_addresses.create( + { + "financial_account": "financial_account", + "type": "bank_account", + } + ) + except _error.FinancialAccountNotOpenError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/money_management/financial_addresses", + query_string="", + api_base="https://api.stripe.com", + post_data='{"financial_account":"financial_account","type":"bank_account"}', + is_json=True, + ) + + def test_fx_quote_needs_refresh_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/payout_intents/id_123/confirm", + rbody='{"error":{"type":"fx_quote_needs_refresh","code":"payout_intent_fx_quote_expired"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.money_management.payout_intents.confirm("id_123") + except _error.FxQuoteNeedsRefreshError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/money_management/payout_intents/id_123/confirm", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_insufficient_funds_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_payments", + rbody='{"error":{"type":"insufficient_funds","code":"insufficient_funds"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.money_management.outbound_payments.create( + { + "amount": {"currency": "USD", "value": 96}, + "from": { + "currency": "usd", + "financial_account": "financial_account", + }, + "to": {"recipient": "recipient"}, + } + ) + except _error.InsufficientFundsError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/money_management/outbound_payments", + query_string="", + api_base="https://api.stripe.com", + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', + is_json=True, + ) + + def test_invalid_payment_method_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts", + rbody='{"error":{"type":"invalid_payment_method","code":"invalid_us_bank_account"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.us_bank_accounts.create( + { + "account_number": "account_number", + "currency": "usd", + } + ) + except _error.InvalidPaymentMethodError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + post_data='{"account_number":"account_number","currency":"usd"}', + is_json=True, + ) + + def test_invalid_payout_method_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_setup_intents", + rbody='{"error":{"type":"invalid_payout_method","code":"invalid_payout_method"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.money_management.outbound_setup_intents.create() + except _error.InvalidPayoutMethodError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/money_management/outbound_setup_intents", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_invalid_vaulted_credential_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/gb_bank_accounts", + rbody='{"error":{"type":"invalid_vaulted_credential","code":"invalid_gb_bank_account"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.gb_bank_accounts.create({"currency": "usd"}) + except _error.InvalidVaultedCredentialError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/gb_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + post_data='{"currency":"usd"}', + is_json=True, + ) + + def test_not_cancelable_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_payments/id_123/cancel", + rbody='{"error":{"type":"not_cancelable","code":"outbound_payment_not_cancelable"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.money_management.outbound_payments.cancel("id_123") + except _error.NotCancelableError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/money_management/outbound_payments/id_123/cancel", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_quota_exceeded_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/gb_bank_accounts", + rbody='{"error":{"type":"quota_exceeded","code":"limit_gb_bank_account"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.gb_bank_accounts.create({"currency": "usd"}) + except _error.QuotaExceededError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/gb_bank_accounts", + query_string="", + api_base="https://api.stripe.com", + post_data='{"currency":"usd"}', + is_json=True, + ) + def test_rate_limit_error_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -44243,6 +45984,42 @@ def test_rate_limit_error_service( api_base="https://api.stripe.com", ) + def test_recipient_not_notifiable_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/outbound_payments", + rbody='{"error":{"type":"recipient_not_notifiable","code":"recipient_email_does_not_exist"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.money_management.outbound_payments.create( + { + "amount": {"currency": "USD", "value": 96}, + "from": { + "currency": "usd", + "financial_account": "financial_account", + }, + "to": {"recipient": "recipient"}, + } + ) + except _error.RecipientNotNotifiableError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/money_management/outbound_payments", + query_string="", + api_base="https://api.stripe.com", + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', + is_json=True, + ) + def test_temporary_session_expired_error_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -44278,3 +46055,90 @@ def test_temporary_session_expired_error_service( post_data='{"events":[{"event_name":"event_name","payload":{"key":"payload"}}]}', is_json=True, ) + + def test_verification_attempt_failed_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + rbody='{"error":{"type":"verification_attempt_failed","code":"us_bank_account_confirm_microdeposits_failure"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.us_bank_accounts.confirm_microdeposits( + "id_123" + ) + except _error.VerificationAttemptFailedError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_verification_expired_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + rbody='{"error":{"type":"verification_expired","code":"us_bank_account_microdeposits_timed_out"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.us_bank_accounts.confirm_microdeposits( + "id_123" + ) + except _error.VerificationExpiredError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_verification_not_initiated_error_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + rbody='{"error":{"type":"verification_not_initiated","code":"us_bank_account_microdeposits_not_sent_before_confirming"}}', + rcode=400, + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + try: + client.v2.core.vault.us_bank_accounts.confirm_microdeposits( + "id_123" + ) + except _error.VerificationNotInitiatedError: + pass + http_client_mock.assert_requested( + "post", + path="/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + )