diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 312540b61..4e1cbb2de 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -9,3 +9,15 @@ List out the key changes made in this PR, e.g. ### See Also + +## Changelog + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f99a88e5..30e06bc18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,8 +32,8 @@ jobs: - name: Set up Python 3 uses: actions/setup-python@v4 with: - python-version: "3.10" - - name: check examples w/ mypy (against python@3.10) + python-version: "3.13" + - name: check examples w/ mypy (against python@3.13) run: just typecheck-examples # skip deps on all these since mypy installed everything - name: check linting @@ -42,13 +42,11 @@ jobs: run: just --no-deps format-check # pyright depends on node, which it handles and installs for itself as needed # we _could_ run setup-node to make it available for it if we're having reliability problems - - name: check types (all Python versions) - run: | - set -eox - - for minor in {6..12}; do - just --no-deps typecheck $minor - done + - name: check types + # only check against a modern version- unit tests will catch syntax errors on older versions + # this isn't user facing, this is just checking that our code is internally consistent + # e.g. a bug here wouldn't cause user CI to fail since the issue is internal to our codebase + run: just --no-deps typecheck build: name: Build @@ -75,10 +73,7 @@ jobs: path: dist/ test: - # Specific ubuntu version to support python 3.7 testing - # see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877 for list of supported versions - # move to ubuntu-latest when we drop 3.7 - runs-on: ubuntu-22.04 + runs-on: "ubuntu-24.04" permissions: contents: read strategy: diff --git a/CHANGELOG.md b/CHANGELOG.md index aad11c893..de647c3f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,64 @@ This release changes the pinned API version to 2026-05-27.private. * Add support for new value `chaps` on enum `v2.FinancialAddressCreditSimulationCreditParams.network` * Add support for error codes `payment_method_microdeposit_processing_error` and `siret_invalid` on `QuotePreviewInvoice.LastFinalizationError` +## 15.2.1 - 2026-06-12 +* [#1825](https://github.com/stripe/stripe-python/pull/1825) Add "source" field to user-agent header + +## 15.2.0 - 2026-05-27 +This release changes the pinned API version to 2026-05-27.dahlia. + +* [#1816](https://github.com/stripe/stripe-python/pull/1816) Update generated code + * Add support for new resource `v2.commerce.ProductCatalogImport` + * Add support for `create` and `retrieve` methods on resource `v2.commerce.ProductCatalogImport` + * Add support for `bizum_payments` and `scalapay_payments` on `Account.Capability`, `AccountCreateParamsCapability`, and `AccountModifyParamsCapability` + * Add support for `automatic_transfer_rules_by_currency` on `BalanceSettings.Payment.Payout` and `BalanceSettingsModifyParamsPaymentPayout` + * Add support for `start_of_day` on `BalanceSettings.Payment.SettlementTiming` and `BalanceSettingsModifyParamsPaymentSettlementTiming` + * Add support for `description` on `ChargeCreateParamsTransferDatum`, `PaymentIntent.TransferDatum`, `PaymentIntentCreateParamsTransferDatum`, and `PaymentIntentModifyParamsTransferDatum` + * Add support for `bizum` on `Charge.PaymentMethodDetail`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenCreateParamsPaymentMethodDatum`, `PaymentAttemptRecord.PaymentMethodDetail`, `PaymentIntent.PaymentMethodOption`, `PaymentIntentConfirmParamsPaymentMethodDatum`, `PaymentIntentConfirmParamsPaymentMethodOption`, `PaymentIntentCreateParamsPaymentMethodDatum`, `PaymentIntentCreateParamsPaymentMethodOption`, `PaymentIntentModifyParamsPaymentMethodDatum`, `PaymentIntentModifyParamsPaymentMethodOption`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationModifyParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetail`, `SetupIntent.PaymentMethodOption`, `SetupIntentConfirmParamsPaymentMethodDatum`, `SetupIntentConfirmParamsPaymentMethodOption`, `SetupIntentCreateParamsPaymentMethodDatum`, `SetupIntentCreateParamsPaymentMethodOption`, `SetupIntentModifyParamsPaymentMethodDatum`, and `SetupIntentModifyParamsPaymentMethodOption` + * Add support for `scalapay` on `Charge.PaymentMethodDetail`, `Checkout.Session.PaymentMethodOption`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenCreateParamsPaymentMethodDatum`, `PaymentAttemptRecord.PaymentMethodDetail`, `PaymentIntent.PaymentMethodOption`, `PaymentIntentConfirmParamsPaymentMethodDatum`, `PaymentIntentConfirmParamsPaymentMethodOption`, `PaymentIntentCreateParamsPaymentMethodDatum`, `PaymentIntentCreateParamsPaymentMethodOption`, `PaymentIntentModifyParamsPaymentMethodDatum`, `PaymentIntentModifyParamsPaymentMethodOption`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationModifyParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetail`, `Refund.DestinationDetail`, `SetupIntentConfirmParamsPaymentMethodDatum`, `SetupIntentCreateParamsPaymentMethodDatum`, `SetupIntentModifyParamsPaymentMethodDatum`, and `checkout.SessionCreateParamsPaymentMethodOption` + * Add support for `mandate` on `Charge.PaymentMethodDetail.Twint`, `PaymentAttemptRecord.PaymentMethodDetail.Twint`, and `PaymentRecord.PaymentMethodDetail.Twint` + * Add support for new values `bizum` and `scalapay` on enums `PaymentIntentConfirmParams.excluded_payment_method_types`, `PaymentIntentCreateParams.excluded_payment_method_types`, `PaymentIntentModifyParams.excluded_payment_method_types`, `SetupIntentCreateParams.excluded_payment_method_types`, `SetupIntentModifyParams.excluded_payment_method_types`, and `checkout.SessionCreateParams.excluded_payment_method_types` + * Change type of `PaymentIntentConfirmParamsPaymentMethodOptionTwint.setup_future_usage`, `PaymentIntentCreateParamsPaymentMethodOptionTwint.setup_future_usage`, `PaymentIntentModifyParamsPaymentMethodOptionTwint.setup_future_usage`, and `checkout.SessionCreateParamsPaymentMethodOptionTwint.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` + * Add support for new values `bizum` and `scalapay` on enum `checkout.SessionCreateParams.payment_method_types` + * ⚠️ Change type of `Checkout.Session.PaymentMethodOption.Twint.setup_future_usage` and `PaymentIntent.PaymentMethodOption.Twint.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')` + * Add support for new values `bizum` and `scalapay` on enums `ConfirmationTokenCreateParamsPaymentMethodDatum.type`, `PaymentIntentConfirmParamsPaymentMethodDatum.type`, `PaymentIntentCreateParamsPaymentMethodDatum.type`, `PaymentIntentModifyParamsPaymentMethodDatum.type`, `SetupIntentConfirmParamsPaymentMethodDatum.type`, `SetupIntentCreateParamsPaymentMethodDatum.type`, and `SetupIntentModifyParamsPaymentMethodDatum.type` + * ⚠️ Add support for new values `bizum` and `scalapay` on enums `ConfirmationToken.PaymentMethodPreview.type` and `PaymentMethod.type` + * Add support for new values `bizum` and `scalapay` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type` + * Add support for `credited_items` on `InvoiceItem.ProrationDetail` + * Add support for new value `twint` on enums `InvoiceCreateParamsPaymentSetting.payment_method_types`, `InvoiceModifyParamsPaymentSetting.payment_method_types`, `SubscriptionCreateParamsPaymentSetting.payment_method_types`, and `SubscriptionModifyParamsPaymentSetting.payment_method_types` + * Add support for `discountable` on `InvoiceCreatePreviewParamsScheduleDetailPhaseAddInvoiceItem`, `SubscriptionCreateParamsAddInvoiceItem`, `SubscriptionModifyParamsAddInvoiceItem`, `SubscriptionSchedule.Phase.AddInvoiceItem`, `SubscriptionScheduleCreateParamsPhaseAddInvoiceItem`, and `SubscriptionScheduleModifyParamsPhaseAddInvoiceItem` + * Add support for `billing_schedules` on `InvoiceCreatePreviewParamsSubscriptionDetail`, `SubscriptionCreateParams`, `SubscriptionModifyParams`, and `Subscription` + * Add support for new value `max_billed_until` on enums `InvoiceCreatePreviewParamsSubscriptionDetail.cancel_at`, `SubscriptionCreateParams.cancel_at`, and `SubscriptionModifyParams.cancel_at` + * Add support for `amount_paid_off_stripe` on `Invoice` + * ⚠️ Add support for new value `twint` on enums `Invoice.PaymentSetting.payment_method_types` and `Subscription.PaymentSetting.payment_method_types` + * Add support for `twint` on `Mandate.PaymentMethodDetail` and `SetupAttempt.PaymentMethodDetail` + * Add support for `metadata` on `PaymentIntent.TransferDatum`, `PaymentIntentCreateParamsTransferDatum`, `PaymentIntentModifyParamsTransferDatum`, and `Subscription.PendingUpdate` + * Add support for `payment_data` on `PaymentIntent.TransferDatum`, `PaymentIntentCreateParamsTransferDatum`, and `PaymentIntentModifyParamsTransferDatum` + * ⚠️ Add support for new values `bizum` and `scalapay` on enums `PaymentIntent.excluded_payment_method_types` and `SetupIntent.excluded_payment_method_types` + * Add support for `blik_authorize` on `PaymentIntent.NextAction` and `SetupIntent.NextAction` + * Add support for `payment_method_options` on `PaymentLinkCreateParams`, `PaymentLinkModifyParams`, and `PaymentLink` + * Add support for new value `bizum` on enums `PaymentLinkCreateParams.payment_method_types` and `PaymentLinkModifyParams.payment_method_types` + * ⚠️ Add support for new value `bizum` on enum `PaymentLink.payment_method_types` + * Add support for `active` on `PaymentMethodConfigurationListParams` + * Add support for `billed_until` on `SubscriptionItem` + * Add support for `discount` and `discounts` on `Subscription.PendingUpdate` + * Add support for `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on `Terminal.Configuration`, `terminal.ConfigurationCreateParams`, and `terminal.ConfigurationModifyParams` + * Add support for new values `simulated_verifone_m425`, `simulated_verifone_p630`, `simulated_verifone_ux700`, `simulated_verifone_v660p`, `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on enum `terminal.ReaderListParams.device_type` + * Add support for `api_error` and `print_content` on `Terminal.Reader.Action` + * ⚠️ Add support for new value `print_content` on enum `Terminal.Reader.Action.type` + * ⚠️ Add support for new values `simulated_verifone_m425`, `simulated_verifone_p630`, `simulated_verifone_ux700`, `simulated_verifone_v660p`, `verifone_m425`, `verifone_p630`, `verifone_ux700`, and `verifone_v660p` on enum `Terminal.Reader.device_type` + * Add support for `customer` on `test_helpers.TestClockCreateParams` + * Add support for new value `2026-05-27.dahlia` on enum `WebhookEndpointCreateParams.api_version` + * Add support for `signer` on `V2.Core.Account.Identity.BusinessDetail.Document.ProofOfRegistration`, `V2.Core.Account.Identity.BusinessDetail.Document.ProofOfUltimateBeneficialOwnership`, `v2.core.AccountCreateParamsIdentityBusinessDetailDocumentProofOfRegistration`, `v2.core.AccountCreateParamsIdentityBusinessDetailDocumentProofOfUltimateBeneficialOwnership`, `v2.core.AccountModifyParamsIdentityBusinessDetailDocumentProofOfRegistration`, `v2.core.AccountModifyParamsIdentityBusinessDetailDocumentProofOfUltimateBeneficialOwnership`, `v2.core.AccountTokenCreateParamsIdentityBusinessDetailDocumentProofOfRegistration`, and `v2.core.AccountTokenCreateParamsIdentityBusinessDetailDocumentProofOfUltimateBeneficialOwnership` + * Add support for `azure_event_grid` on `V2.Core.EventDestination` and `v2.core.EventDestinationCreateParams` + * ⚠️ Add support for new value `no_azure_partner_topic_exists` on enum `V2.Core.EventDestination.StatusDetail.Disabled.reason` + * ⚠️ Add support for new value `azure_event_grid` on enum `V2.Core.EventDestination.type` + * Add support for new value `azure_event_grid` on enum `v2.core.EventDestinationCreateParams.type` + * ⚠️ Add support for new value `meter_event_value_too_many_digits` on enums `EventsV1BillingMeterErrorReportTriggeredEvent.Reason.ErrorType.code` and `EventsV1BillingMeterNoMeterFoundEvent.Reason.ErrorType.code` + * Add support for event notifications `V2CommerceProductCatalogImportsFailedEvent`, `V2CommerceProductCatalogImportsProcessingEvent`, `V2CommerceProductCatalogImportsSucceededEvent`, and `V2CommerceProductCatalogImportsSucceededWithErrorsEvent` with related object `v2.commerce.ProductCatalogImport` + * Add support for error codes `payment_method_microdeposit_processing_error` and `siret_invalid` on `Invoice.LastFinalizationError`, `PaymentIntent.LastPaymentError`, `SetupAttempt.SetupError`, `SetupIntent.LastSetupError`, and `StripeError` +* [#1813](https://github.com/stripe/stripe-python/pull/1813) Emit warning when `stripe-notify` header is present in response + ## 15.2.0b2 - 2026-04-24 * [#1797](https://github.com/stripe/stripe-python/pull/1797) Update generated code for beta * Add support for new resources `v2.commerce.ProductCatalogImport`, `v2.data.reporting.QueryRun`, `v2.extend.WorkflowRun`, `v2.extend.Workflow`, `v2.iam.ActivityLog`, `v2.network.BusinessProfile`, and `v2.orchestrated_commerce.Agreement` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 6fae6735a..983636f7b 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -d59a1f4bdea3032b8e282d40badc032cb021fc60 \ No newline at end of file +6012b623b1c09ad54d466947da04511a042ee45a \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 30723023b..83c68c9d1 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2277 \ No newline at end of file +v2324 \ No newline at end of file diff --git a/README.md b/README.md index ab1ba4ce0..0f2b8c940 100644 --- a/README.md +++ b/README.md @@ -280,7 +280,7 @@ stripe.add_beta_version("feature_beta", "v3") ### Private Preview SDKs -Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `aX` suffix like `12.2.0a2`. These are invite-only features. Once invited, you can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-python?tab=readme-ov-file#public-preview-sdks) above and replacing the suffix `b` with `a` in package versions. +Stripe has features in the [private preview phase](https://docs.stripe.com/release-phases) that can be accessed via versions of this package that have the `aX` suffix like `12.2.0a2`. You can install the private preview SDKs by following the same instructions as for the [public preview SDKs](https://github.com/stripe/stripe-python?tab=readme-ov-file#public-preview-sdks) above and replacing the suffix `b` with `a` in package versions. Note that access to specific private preview API features may require separate approval. ### Custom requests @@ -354,6 +354,9 @@ New features and bug fixes are released on the latest major version of the Strip ## Development +> [!WARNING] +> External contributions to this repo from first-time contributors are currently on hiatus. If you'd like to see a change made to the package, please open an issue. + [Contribution guidelines for this project](CONTRIBUTING.md) The test suite depends on [stripe-mock], so make sure to fetch and run it from a diff --git a/justfile b/justfile index 24ae601b1..330172ff0 100644 --- a/justfile +++ b/justfile @@ -27,10 +27,10 @@ test-one test_name: install-test-deps lint: install-dev-deps python -m flake8 --show-source stripe tests -# verify types. optional argument to test as of a specific minor python version (e.g. `8` to test `python 3.8`); otherwise uses current version -typecheck minor_py_version="": install-test-deps install-dev-deps +# verify types using current python version +typecheck: install-test-deps install-dev-deps # suppress version update warnings - PYRIGHT_PYTHON_IGNORE_WARNINGS=1 pyright {{ if minor_py_version == "" { "" } else { "--pythonversion 3." + minor_py_version } }} + PYRIGHT_PYTHON_IGNORE_WARNINGS=1 pyright # ⭐ format all code format: install-dev-deps diff --git a/stripe/_api_requestor.py b/stripe/_api_requestor.py index b6612986b..3d0ceb641 100644 --- a/stripe/_api_requestor.py +++ b/stripe/_api_requestor.py @@ -1,7 +1,10 @@ from io import BytesIO, IOBase +import functools +import hashlib import json import os import platform +import socket from typing import ( Any, AsyncIterable, @@ -72,6 +75,19 @@ _default_proxy: Optional[str] = None +@functools.lru_cache(maxsize=None) +def _get_uname_hash() -> Optional[str]: + try: + parts: List[str] = list(platform.uname()) + try: + parts.append(socket.gethostname()) + except Exception: + pass + return hashlib.md5(" ".join(parts).encode()).hexdigest() + except Exception: + return None + + def _maybe_emit_stripe_notice(rheaders: Mapping[str, str]) -> None: notice = rheaders.get("Stripe-Notice") if notice: @@ -561,6 +577,9 @@ def request_headers( "lang": "python", "httplib": self._get_http_client().name, } + uname_hash = _get_uname_hash() + if uname_hash is not None: + ua["source"] = uname_hash attr_funcs: List[Tuple[str, Callable[[], str]]] = [ ("lang_version", platform.python_version), ] diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 61b0acc08..bb5cecada 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2026-05-27.preview" + CURRENT = "2026-06-24.preview" diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py index 2dc1b438d..dc731baa6 100644 --- a/stripe/_balance_transaction.py +++ b/stripe/_balance_transaction.py @@ -195,6 +195,7 @@ class FeeDetail(StripeObject): "stripe_fee", "stripe_fx_fee", "tax_fee", + "tax_fund", "topup", "topup_reversal", "transfer", @@ -203,7 +204,7 @@ class FeeDetail(StripeObject): "transfer_refund", ] """ - Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + Transaction type: `tax_fund`, `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. """ @classmethod @@ -211,9 +212,9 @@ def list( cls, **params: Unpack["BalanceTransactionListParams"] ) -> ListObject["BalanceTransaction"]: """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ result = cls._static_request( "get", @@ -233,9 +234,9 @@ async def list_async( cls, **params: Unpack["BalanceTransactionListParams"] ) -> ListObject["BalanceTransaction"]: """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ result = await cls._static_request_async( "get", diff --git a/stripe/_balance_transaction_service.py b/stripe/_balance_transaction_service.py index 35023fd93..2166a14fc 100644 --- a/stripe/_balance_transaction_service.py +++ b/stripe/_balance_transaction_service.py @@ -24,9 +24,9 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[BalanceTransaction]": """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ return cast( "ListObject[BalanceTransaction]", @@ -45,9 +45,9 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[BalanceTransaction]": """ - Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + Returns a list of transactions that have contributed to the Stripe account balance (for example, charges, transfers, and so on). The transactions return in sorted order, with the most recent transactions appearing first. - Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + The previous name of this endpoint was “Balance history,” and it used the path /v1/balance/history. """ return cast( "ListObject[BalanceTransaction]", diff --git a/stripe/_card.py b/stripe/_card.py index 4968d9741..35469de76 100644 --- a/stripe/_card.py +++ b/stripe/_card.py @@ -33,6 +33,12 @@ class Networks(StripeObject): The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. """ + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + account: Optional[ExpandableField["Account"]] address_city: Optional[str] """ @@ -161,6 +167,10 @@ class Networks(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ + redaction: Optional[Redaction] + """ + Redaction status of this card. If not null, this card is associated to a redaction job. + """ regulated_status: Optional[Literal["regulated", "unregulated"]] """ Status of a card based on the card issuer. @@ -325,4 +335,4 @@ def retrieve(cls, id, **params): "(see https://stripe.com/docs/api/external_account_cards/retrieve)." ) - _inner_class_types = {"networks": Networks} + _inner_class_types = {"networks": Networks, "redaction": Redaction} diff --git a/stripe/_charge.py b/stripe/_charge.py index cd50852cd..0141314a3 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -461,6 +461,10 @@ class Billie(StripeObject): """ class Bizum(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ transaction_id: Optional[str] """ The Bizum transaction ID associated with this payment. @@ -929,6 +933,10 @@ class ShippingAddress(StripeObject): """ Populated if this transaction used 3D Secure authentication. """ + transaction_link_id: Optional[str] + """ + Transaction Link ID (TLID) is a unique identifier for a transaction. This is used by some card networks, such as Mastercard, for transaction linking, in addition to Network Transaction IDs. This value will be present if it is returned by the financial network in the authorization response, and null otherwise. + """ wallet: Optional[Wallet] """ If this Card is part of a card wallet, this contains the details of the card wallet. @@ -1147,13 +1155,17 @@ class Crypto(StripeObject): The wallet address of the customer. """ network: Optional[ - Literal["base", "ethereum", "polygon", "solana", "tempo"] + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + Literal[ + "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + ] ] """ The token currency that the transaction was sent with. @@ -1928,6 +1940,10 @@ class Pix(StripeObject): """ Unique transaction id generated by BCB """ + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ mandate: Optional[str] """ ID of the multi use Mandate generated by the PaymentIntent @@ -2369,6 +2385,12 @@ class RadarOptions(StripeObject): A [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. """ + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Shipping(StripeObject): class Address(StripeObject): city: Optional[str] @@ -2562,6 +2584,10 @@ class TransferData(StripeObject): """ This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. """ + redaction: Optional[Redaction] + """ + Redaction status of this charge. If not null, this charge is associated to a redaction job. + """ refunded: bool """ Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. @@ -3025,6 +3051,7 @@ async def list_refunds_async( "payment_method_details": PaymentMethodDetails, "presentment_details": PresentmentDetails, "radar_options": RadarOptions, + "redaction": Redaction, "shipping": Shipping, "transfer_data": TransferData, } diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 0d69a52b1..0fe288ec9 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -223,10 +223,16 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ class Blik(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique and immutable identifier assigned by BLIK to every buyer. + """ class Boleto(StripeObject): tax_id: str @@ -1303,7 +1309,10 @@ class Payto(StripeObject): """ class Pix(StripeObject): - pass + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ class Promptpay(StripeObject): pass diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index 41bd06f9b..d13ef0f2b 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -388,6 +388,8 @@ def create( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", @@ -416,6 +418,8 @@ async def create_async( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", diff --git a/stripe/_credit_note_service.py b/stripe/_credit_note_service.py index 4d716f4ce..ab9ea98e9 100644 --- a/stripe/_credit_note_service.py +++ b/stripe/_credit_note_service.py @@ -119,6 +119,8 @@ def create( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", @@ -150,6 +152,8 @@ async def create_async( You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. + + For invoices that also have refunds created through the [Refund API](https://docs.stripe.com/docs/api/refunds), the credit note API subtracts those refund amounts from the maximum creditable amount. This prevents the combined credit notes and refunds from exceeding the invoice amount. If you use both, ensure the combined total does not exceed the invoice's paid amount. """ return cast( "CreditNote", diff --git a/stripe/_customer.py b/stripe/_customer.py index 88604ee3a..c65b5220b 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -200,6 +200,12 @@ class RenderingOptions(StripeObject): "rendering_options": RenderingOptions, } + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Shipping(StripeObject): class Address(StripeObject): city: Optional[str] @@ -391,6 +397,10 @@ class Location(StripeObject): """ The customer's preferred locales (languages), ordered by preference. """ + redaction: Optional[Redaction] + """ + Redaction status of this customer. If not null, this customer is associated to a redaction job. + """ shipping: Optional[Shipping] """ Mailing and shipping address for the customer. Appears on invoices emailed to this customer. @@ -1985,6 +1995,7 @@ def test_helpers(self): _inner_class_types = { "address": Address, "invoice_settings": InvoiceSettings, + "redaction": Redaction, "shipping": Shipping, "tax": Tax, } diff --git a/stripe/_dispute.py b/stripe/_dispute.py index 8eb9b2396..1a4035872 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -35,6 +35,12 @@ class Dispute( class Evidence(StripeObject): class EnhancedEvidence(StripeObject): + class MastercardCompliance(StripeObject): + fee_acknowledged: bool + """ + A field acknowledging the fee incurred when countering a Mastercard compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. + """ + class VisaCompellingEvidence3(StripeObject): class DisputedTransaction(StripeObject): class ShippingAddress(StripeObject): @@ -179,9 +185,11 @@ class VisaCompliance(StripeObject): A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. """ + mastercard_compliance: Optional[MastercardCompliance] visa_compelling_evidence_3: Optional[VisaCompellingEvidence3] visa_compliance: Optional[VisaCompliance] _inner_class_types = { + "mastercard_compliance": MastercardCompliance, "visa_compelling_evidence_3": VisaCompellingEvidence3, "visa_compliance": VisaCompliance, } @@ -299,6 +307,14 @@ class VisaCompliance(StripeObject): class EvidenceDetails(StripeObject): class EnhancedEligibility(StripeObject): + class MastercardCompliance(StripeObject): + status: Literal[ + "fee_acknowledged", "requires_fee_acknowledgement" + ] + """ + Mastercard compliance eligibility status. + """ + class VisaCompellingEvidence3(StripeObject): required_actions: List[ Literal[ @@ -327,9 +343,11 @@ class VisaCompliance(StripeObject): Visa compliance eligibility status. """ + mastercard_compliance: Optional[MastercardCompliance] visa_compelling_evidence_3: Optional[VisaCompellingEvidence3] visa_compliance: Optional[VisaCompliance] _inner_class_types = { + "mastercard_compliance": MastercardCompliance, "visa_compelling_evidence_3": VisaCompellingEvidence3, "visa_compliance": VisaCompliance, } @@ -450,7 +468,11 @@ class SmartDisputes(StripeObject): 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). """ enhanced_eligibility_types: List[ - Literal["visa_compelling_evidence_3", "visa_compliance"] + Literal[ + "mastercard_compliance", + "visa_compelling_evidence_3", + "visa_compliance", + ] ] """ List of eligibility types that are included in `enhanced_evidence`. diff --git a/stripe/_event.py b/stripe/_event.py index 21e30a313..8d9fd0cde 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -156,7 +156,13 @@ class Request(StripeObject): "balance.available", "balance_settings.updated", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -267,6 +273,7 @@ class Request(StripeObject): "invoice.updated", "invoice.voided", "invoice.will_be_due", + "invoice_payment.detached", "invoice_payment.paid", "invoiceitem.created", "invoiceitem.deleted", @@ -435,13 +442,6 @@ class Request(StripeObject): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoice_payment.detached", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] """ Description of the event (for example, `invoice.created` or `charge.refunded`). diff --git a/stripe/_event_notification_handler.py b/stripe/_event_notification_handler.py index 1ff1e9abc..34d8bcce1 100644 --- a/stripe/_event_notification_handler.py +++ b/stripe/_event_notification_handler.py @@ -48,18 +48,18 @@ from stripe.events._v2_core_account_including_configuration_merchant_updated_event import ( V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification, ) + from stripe.events._v2_core_account_including_configuration_money_manager_capability_status_updated_event import ( + V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification, + ) + from stripe.events._v2_core_account_including_configuration_money_manager_updated_event import ( + V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification, + ) from stripe.events._v2_core_account_including_configuration_recipient_capability_status_updated_event import ( V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification, ) from stripe.events._v2_core_account_including_configuration_recipient_updated_event import ( V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification, ) - from stripe.events._v2_core_account_including_configuration_storer_capability_status_updated_event import ( - V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification, - ) - from stripe.events._v2_core_account_including_configuration_storer_updated_event import ( - V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification, - ) from stripe.events._v2_core_account_including_defaults_updated_event import ( V2CoreAccountIncludingDefaultsUpdatedEventNotification, ) @@ -192,6 +192,9 @@ 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, ) @@ -210,6 +213,9 @@ from stripe.events._v2_money_management_outbound_transfer_returned_event import ( V2MoneyManagementOutboundTransferReturnedEventNotification, ) + from stripe.events._v2_money_management_outbound_transfer_under_review_event import ( + V2MoneyManagementOutboundTransferUnderReviewEventNotification, + ) from stripe.events._v2_money_management_outbound_transfer_updated_event import ( V2MoneyManagementOutboundTransferUpdatedEventNotification, ) @@ -516,54 +522,54 @@ def on_v2_core_account_including_configuration_merchant_updated( ) return func - def on_v2_core_account_including_configuration_recipient_capability_status_updated( + def on_v2_core_account_including_configuration_money_manager_capability_status_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification, StripeClient], None]", ): """ - Registers a callback for the `V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent` (`v2.core.account[configuration.recipient].capability_status_updated`) event notification. + Registers a callback for the `V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent` (`v2.core.account[configuration.money_manager].capability_status_updated`) event notification. """ self._register( - "v2.core.account[configuration.recipient].capability_status_updated", + "v2.core.account[configuration.money_manager].capability_status_updated", func, ) return func - def on_v2_core_account_including_configuration_recipient_updated( + def on_v2_core_account_including_configuration_money_manager_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification, StripeClient], None]", ): """ - Registers a callback for the `V2CoreAccountIncludingConfigurationRecipientUpdatedEvent` (`v2.core.account[configuration.recipient].updated`) event notification. + Registers a callback for the `V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent` (`v2.core.account[configuration.money_manager].updated`) event notification. """ self._register( - "v2.core.account[configuration.recipient].updated", + "v2.core.account[configuration.money_manager].updated", func, ) return func - def on_v2_core_account_including_configuration_storer_capability_status_updated( + def on_v2_core_account_including_configuration_recipient_capability_status_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification, StripeClient], None]", ): """ - Registers a callback for the `V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent` (`v2.core.account[configuration.storer].capability_status_updated`) event notification. + Registers a callback for the `V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent` (`v2.core.account[configuration.recipient].capability_status_updated`) event notification. """ self._register( - "v2.core.account[configuration.storer].capability_status_updated", + "v2.core.account[configuration.recipient].capability_status_updated", func, ) return func - def on_v2_core_account_including_configuration_storer_updated( + def on_v2_core_account_including_configuration_recipient_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification, StripeClient], None]", ): """ - Registers a callback for the `V2CoreAccountIncludingConfigurationStorerUpdatedEvent` (`v2.core.account[configuration.storer].updated`) event notification. + Registers a callback for the `V2CoreAccountIncludingConfigurationRecipientUpdatedEvent` (`v2.core.account[configuration.recipient].updated`) event notification. """ self._register( - "v2.core.account[configuration.storer].updated", + "v2.core.account[configuration.recipient].updated", func, ) return func @@ -1140,6 +1146,19 @@ def on_v2_money_management_outbound_payment_returned( ) return func + def on_v2_money_management_outbound_payment_under_review( + self, + func: "Callable[[V2MoneyManagementOutboundPaymentUnderReviewEventNotification, StripeClient], None]", + ): + """ + 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], None]", @@ -1218,6 +1237,19 @@ def on_v2_money_management_outbound_transfer_returned( ) return func + def on_v2_money_management_outbound_transfer_under_review( + self, + func: "Callable[[V2MoneyManagementOutboundTransferUnderReviewEventNotification, StripeClient], None]", + ): + """ + Registers a callback for the `V2MoneyManagementOutboundTransferUnderReviewEvent` (`v2.money_management.outbound_transfer.under_review`) event notification. + """ + self._register( + "v2.money_management.outbound_transfer.under_review", + func, + ) + return func + def on_v2_money_management_outbound_transfer_updated( self, func: "Callable[[V2MoneyManagementOutboundTransferUpdatedEventNotification, StripeClient], None]", diff --git a/stripe/_http_client.py b/stripe/_http_client.py index 4fb246523..b09b4984f 100644 --- a/stripe/_http_client.py +++ b/stripe/_http_client.py @@ -149,7 +149,7 @@ def __init__( self._verify_ssl_certs = verify_ssl_certs if proxy: if isinstance(proxy, str): - proxy = {"http": proxy, "https": proxy} + proxy = HTTPClient._Proxy(http=proxy, https=proxy) if not isinstance(proxy, dict): # pyright: ignore[reportUnnecessaryIsInstance] raise ValueError( "Proxy(ies) must be specified as either a string " @@ -899,11 +899,6 @@ def close(self): pass -class _Proxy(TypedDict): - http: Optional["ParseResult"] - https: Optional["ParseResult"] - - class PycurlClient(HTTPClient): class _ParsedProxy(TypedDict, total=False): http: Optional["ParseResult"] diff --git a/stripe/_invoice.py b/stripe/_invoice.py index f0cb7520d..5c9b38c47 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -465,6 +465,7 @@ class LastFinalizationError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -504,6 +505,10 @@ class LastFinalizationError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", @@ -1105,6 +1110,7 @@ class Filters(StripeObject): "pix", "promptpay", "revolut_pay", + "satispay", "sepa_credit_transfer", "sepa_debit", "sofort", diff --git a/stripe/_order.py b/stripe/_order.py index 0d720c607..b0a49b20a 100644 --- a/stripe/_order.py +++ b/stripe/_order.py @@ -511,7 +511,7 @@ class Sofort(StripeObject): class WechatPay(StripeObject): app_id: Optional[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: Optional[Literal["android", "ios", "web"]] """ diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 6937bec5e..1ad5ab548 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -421,6 +421,10 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ transaction_id: Optional[str] """ The Bizum transaction ID associated with this payment. @@ -680,12 +684,6 @@ class GooglePay(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[ - Literal["recurring", "unscheduled"] - ] - """ - 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. @@ -902,13 +900,17 @@ class Crypto(StripeObject): The wallet address of the customer. """ network: Optional[ - Literal["base", "ethereum", "polygon", "solana", "tempo"] + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + Literal[ + "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + ] ] """ The token currency that the transaction was sent with. diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index cf338c745..09ee9b67d 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -254,6 +254,7 @@ class LastPaymentError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -293,6 +294,10 @@ class LastPaymentError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", @@ -3980,6 +3985,18 @@ class Satispay(StripeObject): """ Controls when the funds will be captured from the customer's account. """ + setup_future_usage: Optional[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class Scalapay(StripeObject): capture_method: Optional[Literal["manual"]] @@ -4055,6 +4072,22 @@ class StripeBalance(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + class Sunbit(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + class Swish(StripeObject): reference: Optional[str] """ @@ -4196,7 +4229,7 @@ class MandateOptions(StripeObject): class WechatPay(StripeObject): app_id: Optional[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: Optional[Literal["android", "ios", "web"]] """ @@ -4281,6 +4314,7 @@ class Zip(StripeObject): shopeepay: Optional[Shopeepay] sofort: Optional[Sofort] stripe_balance: Optional[StripeBalance] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] upi: Optional[Upi] @@ -4344,6 +4378,7 @@ class Zip(StripeObject): "shopeepay": Shopeepay, "sofort": Sofort, "stripe_balance": StripeBalance, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, @@ -4386,6 +4421,12 @@ class CustomerNotification(StripeObject): """ _inner_class_types = {"card": Card} + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Shipping(StripeObject): class Address(StripeObject): city: Optional[str] @@ -4692,6 +4733,10 @@ class PaymentData(StripeObject): """ Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). """ + redaction: Optional[Redaction] + """ + Redaction status of this PaymentIntent. If the PaymentIntent isn't redacted, this field is null. + """ review: Optional[ExpandableField["Review"]] """ ID of the review associated with this PaymentIntent, if any. @@ -6530,6 +6575,7 @@ async def list_amount_details_line_items_async( "payment_method_options": PaymentMethodOptions, "presentment_details": PresentmentDetails, "processing": Processing, + "redaction": Redaction, "shipping": Shipping, "transfer_data": TransferData, } diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 6e7f06ece..89a49d087 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -175,10 +175,16 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ class Blik(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique and immutable identifier assigned by BLIK to every buyer. + """ class Boleto(StripeObject): tax_id: str @@ -1273,7 +1279,10 @@ class Payto(StripeObject): """ class Pix(StripeObject): - pass + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ class Promptpay(StripeObject): pass @@ -1305,6 +1314,12 @@ class Dob(StripeObject): dob: Optional[Dob] _inner_class_types = {"dob": Dob} + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class RevolutPay(StripeObject): pass @@ -1572,6 +1587,10 @@ class Zip(StripeObject): Options to configure Radar. See [Radar Session](https://docs.stripe.com/radar/radar-session) for more information. """ rechnung: Optional[Rechnung] + redaction: Optional[Redaction] + """ + Redaction status of this PaymentMethod. If the PaymentMethod is not redacted, this field will be null. + """ revolut_pay: Optional[RevolutPay] samsung_pay: Optional[SamsungPay] satispay: Optional[Satispay] @@ -2161,6 +2180,7 @@ async def retrieve_async( "qris": Qris, "radar_options": RadarOptions, "rechnung": Rechnung, + "redaction": Redaction, "revolut_pay": RevolutPay, "samsung_pay": SamsungPay, "satispay": Satispay, diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 7b633f355..375b29ac8 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -437,6 +437,10 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ transaction_id: Optional[str] """ The Bizum transaction ID associated with this payment. @@ -696,12 +700,6 @@ class GooglePay(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[ - Literal["recurring", "unscheduled"] - ] - """ - 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. @@ -918,13 +916,17 @@ class Crypto(StripeObject): The wallet address of the customer. """ network: Optional[ - Literal["base", "ethereum", "polygon", "solana", "tempo"] + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal["phantom_cash", "usdc", "usdg", "usdp", "usdt"] + Literal[ + "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + ] ] """ The token currency that the transaction was sent with. diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index 9df6bcd02..f772ec06b 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -421,6 +421,7 @@ class LastFinalizationError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -460,6 +461,10 @@ class LastFinalizationError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", @@ -1061,6 +1066,7 @@ class Filters(StripeObject): "pix", "promptpay", "revolut_pay", + "satispay", "sepa_credit_transfer", "sepa_debit", "sofort", diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index d9ffd0c43..c0a376304 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -383,11 +383,17 @@ class Payto(StripeObject): pass class Pix(StripeObject): - pass + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ class RevolutPay(StripeObject): pass + class Satispay(StripeObject): + pass + class SepaDebit(StripeObject): pass @@ -460,6 +466,7 @@ class UsBankAccount(StripeObject): payto: Optional[Payto] pix: Optional[Pix] revolut_pay: Optional[RevolutPay] + satispay: Optional[Satispay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] stripe_balance: Optional[StripeBalance] @@ -492,6 +499,7 @@ class UsBankAccount(StripeObject): "payto": Payto, "pix": Pix, "revolut_pay": RevolutPay, + "satispay": Satispay, "sepa_debit": SepaDebit, "sofort": Sofort, "stripe_balance": StripeBalance, @@ -523,6 +531,7 @@ class SetupError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -562,6 +571,10 @@ class SetupError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index d3ec60ea9..b8382ed92 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -108,6 +108,7 @@ class LastSetupError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -147,6 +148,10 @@ class LastSetupError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", @@ -935,6 +940,12 @@ class MandateOptions(StripeObject): "us_bank_account": UsBankAccount, } + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + application: Optional[ExpandableField["Application"]] """ ID of the Connect application that created the SetupIntent. @@ -1111,6 +1122,10 @@ class MandateOptions(StripeObject): """ The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). """ + redaction: Optional[Redaction] + """ + Redaction status of this SetupIntent. If the SetupIntent isn't redacted, this field is null. + """ single_use_mandate: Optional[ExpandableField["Mandate"]] """ ID of the single_use Mandate generated by the SetupIntent. @@ -1736,4 +1751,5 @@ async def verify_microdeposits_async( # pyright: ignore[reportGeneralTypeIssues "next_action": NextAction, "payment_method_configuration_details": PaymentMethodConfigurationDetails, "payment_method_options": PaymentMethodOptions, + "redaction": Redaction, } diff --git a/stripe/_source.py b/stripe/_source.py index af3fdc3ff..a2ed66cf7 100644 --- a/stripe/_source.py +++ b/stripe/_source.py @@ -330,6 +330,12 @@ class Receiver(StripeObject): Type of refund attribute status, one of `missing`, `requested`, or `available`. """ + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Redirect(StripeObject): failure_reason: Optional[str] """ @@ -564,6 +570,10 @@ class Wechat(StripeObject): p24: Optional[P24] paypal: Optional[Paypal] receiver: Optional[Receiver] + redaction: Optional[Redaction] + """ + Redaction status of this source. If not null, this source is associated to a redaction job. + """ redirect: Optional[Redirect] sepa_credit_transfer: Optional[SepaCreditTransfer] sepa_debit: Optional[SepaDebit] @@ -960,6 +970,7 @@ def detach(self, **params) -> "Source": "p24": P24, "paypal": Paypal, "receiver": Receiver, + "redaction": Redaction, "redirect": Redirect, "sepa_credit_transfer": SepaCreditTransfer, "sepa_debit": SepaDebit, diff --git a/stripe/_subscription.py b/stripe/_subscription.py index a898be2bf..9dbeaf30f 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -249,6 +249,16 @@ class CancellationDetails(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"]] """ @@ -263,8 +273,20 @@ class Issuer(StripeObject): """ 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 LastPriceMigrationError(StripeObject): class FailedTransition(StripeObject): @@ -667,6 +689,7 @@ class Filters(StripeObject): "pix", "promptpay", "revolut_pay", + "satispay", "sepa_credit_transfer", "sepa_debit", "sofort", @@ -1051,7 +1074,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 true. + 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. 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. """ @@ -1077,7 +1100,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 true. + 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. 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. """ @@ -1090,7 +1113,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 true. + 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. 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. """ @@ -1103,7 +1126,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] """ 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 true. + 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. 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. """ @@ -1127,7 +1150,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 true. + 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. 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. """ @@ -1153,7 +1176,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 true. + 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. 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. """ @@ -1166,7 +1189,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 true. + 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. 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. """ @@ -1179,7 +1202,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] """ 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 true. + 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. 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_service.py b/stripe/_subscription_service.py index 256390d2b..347ccb292 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -54,7 +54,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 true. + 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. 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. """ @@ -82,7 +82,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 true. + 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. 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/_token.py b/stripe/_token.py index d316f43f5..064d03e84 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource +from stripe._stripe_object import StripeObject from typing import ClassVar, Optional, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING @@ -36,6 +37,13 @@ class Token(CreateableAPIResource["Token"]): """ OBJECT_NAME: ClassVar[Literal["token"]] = "token" + + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + bank_account: Optional["BankAccount"] """ These bank accounts are payment methods on `Customer` objects. @@ -74,6 +82,10 @@ class Token(CreateableAPIResource["Token"]): """ String representing the object's type. Objects of the same type share the same value. """ + redaction: Optional[Redaction] + """ + Redaction status of this token. If not null, this token is associated to a redaction job. + """ type: str """ Type of the token: `account`, `bank_account`, `card`, or `pii`. @@ -136,3 +148,5 @@ async def retrieve_async( instance = cls(id, **params) await instance.refresh_async() return instance + + _inner_class_types = {"redaction": Redaction} diff --git a/stripe/capital/_financing_offer.py b/stripe/capital/_financing_offer.py index b33283e23..7913d35f1 100644 --- a/stripe/capital/_financing_offer.py +++ b/stripe/capital/_financing_offer.py @@ -102,6 +102,19 @@ class OfferedTerms(StripeObject): """ Time at which the offer was created. Given in seconds since unix epoch. """ + disclaimer_variant: Optional[ + Literal[ + "celtic_us_loan", + "fundbox_au_financing", + "youlend_de_financing", + "youlend_fr_financing", + "youlend_uk_mca", + "youlend_us_mca", + ] + ] + """ + The type of disclaimer to use for a financing offer in user-facing surfaces. The corresponding disclaimer text to use for each disclaimer_variant value can be found in the [marketing docs](https://docs.stripe.com/capital/marketing). + """ expires_after: float """ Time at which the offer expires. Given in seconds since unix epoch. diff --git a/stripe/capital/_financing_summary.py b/stripe/capital/_financing_summary.py index 69e9fa7ef..85bbc1ec6 100644 --- a/stripe/capital/_financing_summary.py +++ b/stripe/capital/_financing_summary.py @@ -54,6 +54,19 @@ class CurrentRepaymentInterval(StripeObject): """ The chronologically current repayment interval for the financing offer. """ + disclaimer_variant: Optional[ + Literal[ + "celtic_us_loan", + "fundbox_au_financing", + "youlend_de_financing", + "youlend_fr_financing", + "youlend_uk_mca", + "youlend_us_mca", + ] + ] + """ + The type of disclaimer to use for a financing offer in user-facing surfaces. The corresponding disclaimer text to use for each disclaimer_variant value can be found in the [regulatory compliance docs](https://docs.stripe.com/capital/regulatory-compliance). + """ fee_amount: int """ Fixed fee amount, in minor units. For example, 100 USD is represented as 10000. diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 74471ed4e..cbd6c8d71 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1738,6 +1738,22 @@ class Sofort(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). """ + class Sunbit(StripeObject): + capture_method: Optional[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: Optional[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + class Swish(StripeObject): reference: Optional[str] """ @@ -1872,6 +1888,26 @@ class ManualEntry(StripeObject): "financial_connections": FinancialConnections } + class WechatPay(StripeObject): + app_id: Optional[str] + """ + The app ID registered with WeChat Pay. Only required when client is iOS or Android. + """ + client: Optional[Literal["android", "ios", "web"]] + """ + The client type that the end customer will pay from + """ + setup_future_usage: Optional[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + acss_debit: Optional[AcssDebit] affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] @@ -1912,10 +1948,12 @@ class ManualEntry(StripeObject): scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] + sunbit: Optional[Sunbit] swish: Optional[Swish] twint: Optional[Twint] upi: Optional[Upi] us_bank_account: Optional[UsBankAccount] + wechat_pay: Optional[WechatPay] _inner_class_types = { "acss_debit": AcssDebit, "affirm": Affirm, @@ -1957,10 +1995,12 @@ class ManualEntry(StripeObject): "scalapay": Scalapay, "sepa_debit": SepaDebit, "sofort": Sofort, + "sunbit": Sunbit, "swish": Swish, "twint": Twint, "upi": Upi, "us_bank_account": UsBankAccount, + "wechat_pay": WechatPay, } class Permissions(StripeObject): @@ -2022,6 +2062,12 @@ class PresentmentDetails(StripeObject): Currency presented to the customer during payment. """ + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class SavedPaymentMethodOptions(StripeObject): allow_redisplay_filters: Optional[ List[Literal["always", "limited", "unspecified"]] @@ -2706,6 +2752,10 @@ class Link(StripeObject): """ The ID of the original expired Checkout Session that triggered the recovery flow. """ + redaction: Optional[Redaction] + """ + The redaction status of the Checkout Session. If the Session is not redacted, this field is null. + """ redirect_on_completion: Optional[Literal["always", "if_required", "never"]] """ This parameter applies to `ui_mode: embedded_page`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. @@ -3162,6 +3212,7 @@ async def retrieve_async( "permissions": Permissions, "phone_number_collection": PhoneNumberCollection, "presentment_details": PresentmentDetails, + "redaction": Redaction, "saved_payment_method_options": SavedPaymentMethodOptions, "shipping_address_collection": ShippingAddressCollection, "shipping_cost": ShippingCost, diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py index 9237614f6..081db688a 100644 --- a/stripe/events/__init__.py +++ b/stripe/events/__init__.py @@ -63,6 +63,14 @@ V2CoreAccountIncludingConfigurationMerchantUpdatedEvent as V2CoreAccountIncludingConfigurationMerchantUpdatedEvent, V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification as V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification, ) + from stripe.events._v2_core_account_including_configuration_money_manager_capability_status_updated_event import ( + V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent as V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent, + V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification as V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification, + ) + from stripe.events._v2_core_account_including_configuration_money_manager_updated_event import ( + V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent as V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent, + V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification as V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification, + ) from stripe.events._v2_core_account_including_configuration_recipient_capability_status_updated_event import ( V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent as V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent, V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification as V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification, @@ -71,14 +79,6 @@ V2CoreAccountIncludingConfigurationRecipientUpdatedEvent as V2CoreAccountIncludingConfigurationRecipientUpdatedEvent, V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification as V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification, ) - from stripe.events._v2_core_account_including_configuration_storer_capability_status_updated_event import ( - V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent as V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent, - V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification as V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification, - ) - from stripe.events._v2_core_account_including_configuration_storer_updated_event import ( - V2CoreAccountIncludingConfigurationStorerUpdatedEvent as V2CoreAccountIncludingConfigurationStorerUpdatedEvent, - V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification as V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification, - ) from stripe.events._v2_core_account_including_defaults_updated_event import ( V2CoreAccountIncludingDefaultsUpdatedEvent as V2CoreAccountIncludingDefaultsUpdatedEvent, V2CoreAccountIncludingDefaultsUpdatedEventNotification as V2CoreAccountIncludingDefaultsUpdatedEventNotification, @@ -255,6 +255,10 @@ 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, @@ -279,6 +283,10 @@ V2MoneyManagementOutboundTransferReturnedEvent as V2MoneyManagementOutboundTransferReturnedEvent, V2MoneyManagementOutboundTransferReturnedEventNotification as V2MoneyManagementOutboundTransferReturnedEventNotification, ) + from stripe.events._v2_money_management_outbound_transfer_under_review_event import ( + V2MoneyManagementOutboundTransferUnderReviewEvent as V2MoneyManagementOutboundTransferUnderReviewEvent, + V2MoneyManagementOutboundTransferUnderReviewEventNotification as V2MoneyManagementOutboundTransferUnderReviewEventNotification, + ) from stripe.events._v2_money_management_outbound_transfer_updated_event import ( V2MoneyManagementOutboundTransferUpdatedEvent as V2MoneyManagementOutboundTransferUpdatedEvent, V2MoneyManagementOutboundTransferUpdatedEventNotification as V2MoneyManagementOutboundTransferUpdatedEventNotification, @@ -451,36 +459,36 @@ "stripe.events._v2_core_account_including_configuration_merchant_updated_event", False, ), - "V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent": ( - "stripe.events._v2_core_account_including_configuration_recipient_capability_status_updated_event", + "V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent": ( + "stripe.events._v2_core_account_including_configuration_money_manager_capability_status_updated_event", False, ), - "V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification": ( - "stripe.events._v2_core_account_including_configuration_recipient_capability_status_updated_event", + "V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification": ( + "stripe.events._v2_core_account_including_configuration_money_manager_capability_status_updated_event", False, ), - "V2CoreAccountIncludingConfigurationRecipientUpdatedEvent": ( - "stripe.events._v2_core_account_including_configuration_recipient_updated_event", + "V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent": ( + "stripe.events._v2_core_account_including_configuration_money_manager_updated_event", False, ), - "V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification": ( - "stripe.events._v2_core_account_including_configuration_recipient_updated_event", + "V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification": ( + "stripe.events._v2_core_account_including_configuration_money_manager_updated_event", False, ), - "V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent": ( - "stripe.events._v2_core_account_including_configuration_storer_capability_status_updated_event", + "V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent": ( + "stripe.events._v2_core_account_including_configuration_recipient_capability_status_updated_event", False, ), - "V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification": ( - "stripe.events._v2_core_account_including_configuration_storer_capability_status_updated_event", + "V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification": ( + "stripe.events._v2_core_account_including_configuration_recipient_capability_status_updated_event", False, ), - "V2CoreAccountIncludingConfigurationStorerUpdatedEvent": ( - "stripe.events._v2_core_account_including_configuration_storer_updated_event", + "V2CoreAccountIncludingConfigurationRecipientUpdatedEvent": ( + "stripe.events._v2_core_account_including_configuration_recipient_updated_event", False, ), - "V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification": ( - "stripe.events._v2_core_account_including_configuration_storer_updated_event", + "V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification": ( + "stripe.events._v2_core_account_including_configuration_recipient_updated_event", False, ), "V2CoreAccountIncludingDefaultsUpdatedEvent": ( @@ -835,6 +843,14 @@ "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, @@ -883,6 +899,14 @@ "stripe.events._v2_money_management_outbound_transfer_returned_event", False, ), + "V2MoneyManagementOutboundTransferUnderReviewEvent": ( + "stripe.events._v2_money_management_outbound_transfer_under_review_event", + False, + ), + "V2MoneyManagementOutboundTransferUnderReviewEventNotification": ( + "stripe.events._v2_money_management_outbound_transfer_under_review_event", + False, + ), "V2MoneyManagementOutboundTransferUpdatedEvent": ( "stripe.events._v2_money_management_outbound_transfer_updated_event", False, diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py index f54d6ee4e..8b879f757 100644 --- a/stripe/events/_event_classes.py +++ b/stripe/events/_event_classes.py @@ -43,18 +43,18 @@ from stripe.events._v2_core_account_including_configuration_merchant_updated_event import ( V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification, ) + from stripe.events._v2_core_account_including_configuration_money_manager_capability_status_updated_event import ( + V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification, + ) + from stripe.events._v2_core_account_including_configuration_money_manager_updated_event import ( + V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification, + ) from stripe.events._v2_core_account_including_configuration_recipient_capability_status_updated_event import ( V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification, ) from stripe.events._v2_core_account_including_configuration_recipient_updated_event import ( V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification, ) - from stripe.events._v2_core_account_including_configuration_storer_capability_status_updated_event import ( - V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification, - ) - from stripe.events._v2_core_account_including_configuration_storer_updated_event import ( - V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification, - ) from stripe.events._v2_core_account_including_defaults_updated_event import ( V2CoreAccountIncludingDefaultsUpdatedEventNotification, ) @@ -187,6 +187,9 @@ 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, ) @@ -205,6 +208,9 @@ from stripe.events._v2_money_management_outbound_transfer_returned_event import ( V2MoneyManagementOutboundTransferReturnedEventNotification, ) + from stripe.events._v2_money_management_outbound_transfer_under_review_event import ( + V2MoneyManagementOutboundTransferUnderReviewEventNotification, + ) from stripe.events._v2_money_management_outbound_transfer_updated_event import ( V2MoneyManagementOutboundTransferUpdatedEventNotification, ) @@ -310,6 +316,14 @@ "stripe.events._v2_core_account_including_configuration_merchant_updated_event", "V2CoreAccountIncludingConfigurationMerchantUpdatedEvent", ), + "v2.core.account[configuration.money_manager].capability_status_updated": ( + "stripe.events._v2_core_account_including_configuration_money_manager_capability_status_updated_event", + "V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent", + ), + "v2.core.account[configuration.money_manager].updated": ( + "stripe.events._v2_core_account_including_configuration_money_manager_updated_event", + "V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent", + ), "v2.core.account[configuration.recipient].capability_status_updated": ( "stripe.events._v2_core_account_including_configuration_recipient_capability_status_updated_event", "V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent", @@ -318,14 +332,6 @@ "stripe.events._v2_core_account_including_configuration_recipient_updated_event", "V2CoreAccountIncludingConfigurationRecipientUpdatedEvent", ), - "v2.core.account[configuration.storer].capability_status_updated": ( - "stripe.events._v2_core_account_including_configuration_storer_capability_status_updated_event", - "V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent", - ), - "v2.core.account[configuration.storer].updated": ( - "stripe.events._v2_core_account_including_configuration_storer_updated_event", - "V2CoreAccountIncludingConfigurationStorerUpdatedEvent", - ), "v2.core.account[defaults].updated": ( "stripe.events._v2_core_account_including_defaults_updated_event", "V2CoreAccountIncludingDefaultsUpdatedEvent", @@ -502,6 +508,10 @@ "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", @@ -526,6 +536,10 @@ "stripe.events._v2_money_management_outbound_transfer_returned_event", "V2MoneyManagementOutboundTransferReturnedEvent", ), + "v2.money_management.outbound_transfer.under_review": ( + "stripe.events._v2_money_management_outbound_transfer_under_review_event", + "V2MoneyManagementOutboundTransferUnderReviewEvent", + ), "v2.money_management.outbound_transfer.updated": ( "stripe.events._v2_money_management_outbound_transfer_updated_event", "V2MoneyManagementOutboundTransferUpdatedEvent", @@ -661,6 +675,14 @@ def get_v2_event_class(type_: str): "stripe.events._v2_core_account_including_configuration_merchant_updated_event", "V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification", ), + "v2.core.account[configuration.money_manager].capability_status_updated": ( + "stripe.events._v2_core_account_including_configuration_money_manager_capability_status_updated_event", + "V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification", + ), + "v2.core.account[configuration.money_manager].updated": ( + "stripe.events._v2_core_account_including_configuration_money_manager_updated_event", + "V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification", + ), "v2.core.account[configuration.recipient].capability_status_updated": ( "stripe.events._v2_core_account_including_configuration_recipient_capability_status_updated_event", "V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification", @@ -669,14 +691,6 @@ def get_v2_event_class(type_: str): "stripe.events._v2_core_account_including_configuration_recipient_updated_event", "V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification", ), - "v2.core.account[configuration.storer].capability_status_updated": ( - "stripe.events._v2_core_account_including_configuration_storer_capability_status_updated_event", - "V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification", - ), - "v2.core.account[configuration.storer].updated": ( - "stripe.events._v2_core_account_including_configuration_storer_updated_event", - "V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification", - ), "v2.core.account[defaults].updated": ( "stripe.events._v2_core_account_including_defaults_updated_event", "V2CoreAccountIncludingDefaultsUpdatedEventNotification", @@ -853,6 +867,10 @@ def get_v2_event_class(type_: str): "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", @@ -877,6 +895,10 @@ def get_v2_event_class(type_: str): "stripe.events._v2_money_management_outbound_transfer_returned_event", "V2MoneyManagementOutboundTransferReturnedEventNotification", ), + "v2.money_management.outbound_transfer.under_review": ( + "stripe.events._v2_money_management_outbound_transfer_under_review_event", + "V2MoneyManagementOutboundTransferUnderReviewEventNotification", + ), "v2.money_management.outbound_transfer.updated": ( "stripe.events._v2_money_management_outbound_transfer_updated_event", "V2MoneyManagementOutboundTransferUpdatedEventNotification", @@ -976,10 +998,10 @@ def get_v2_event_notification_class(type_: str): "V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification", "V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification", "V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification", + "V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification", + "V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification", "V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification", "V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification", - "V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification", - "V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification", "V2CoreAccountIncludingDefaultsUpdatedEventNotification", "V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification", "V2CoreAccountIncludingIdentityUpdatedEventNotification", @@ -1024,12 +1046,14 @@ def get_v2_event_notification_class(type_: str): "V2MoneyManagementOutboundPaymentFailedEventNotification", "V2MoneyManagementOutboundPaymentPostedEventNotification", "V2MoneyManagementOutboundPaymentReturnedEventNotification", + "V2MoneyManagementOutboundPaymentUnderReviewEventNotification", "V2MoneyManagementOutboundPaymentUpdatedEventNotification", "V2MoneyManagementOutboundTransferCanceledEventNotification", "V2MoneyManagementOutboundTransferCreatedEventNotification", "V2MoneyManagementOutboundTransferFailedEventNotification", "V2MoneyManagementOutboundTransferPostedEventNotification", "V2MoneyManagementOutboundTransferReturnedEventNotification", + "V2MoneyManagementOutboundTransferUnderReviewEventNotification", "V2MoneyManagementOutboundTransferUpdatedEventNotification", "V2MoneyManagementPayoutMethodCreatedEventNotification", "V2MoneyManagementPayoutMethodUpdatedEventNotification", diff --git a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py index e49fce024..94aeb5f40 100644 --- a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py @@ -140,6 +140,7 @@ class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventDat "samsung_pay_payments", "sepa_bank_transfer_payments", "sepa_debit_payments", + "sunbit_payments", "swish_payments", "twint_payments", "us_bank_transfer_payments", diff --git a/stripe/events/_v2_core_account_including_configuration_storer_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py similarity index 69% rename from stripe/events/_v2_core_account_including_configuration_storer_capability_status_updated_event.py rename to stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py index 2b2ee4ef5..b76ea3f17 100644 --- a/stripe/events/_v2_core_account_including_configuration_storer_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py @@ -14,14 +14,12 @@ from stripe.v2.core._account import Account -class V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification( +class V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification( EventNotification, ): - LOOKUP_TYPE = ( - "v2.core.account[configuration.storer].capability_status_updated" - ) + LOOKUP_TYPE = "v2.core.account[configuration.money_manager].capability_status_updated" type: Literal[ - "v2.core.account[configuration.storer].capability_status_updated" + "v2.core.account[configuration.money_manager].capability_status_updated" ] related_object: RelatedObject @@ -37,11 +35,9 @@ def __init__( @override def fetch_event( self, - ) -> ( - "V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent" - ): + ) -> "V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent": return cast( - "V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent", + "V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent", super().fetch_event(), ) @@ -64,11 +60,9 @@ def fetch_related_object(self) -> "Account": @override async def fetch_event_async( self, - ) -> ( - "V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent" - ): + ) -> "V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent": return cast( - "V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent", + "V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent", await super().fetch_event_async(), ) @@ -89,26 +83,26 @@ async def fetch_related_object_async(self) -> "Account": ) -class V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent( +class V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent( Event, ): - LOOKUP_TYPE = ( - "v2.core.account[configuration.storer].capability_status_updated" - ) + LOOKUP_TYPE = "v2.core.account[configuration.money_manager].capability_status_updated" type: Literal[ - "v2.core.account[configuration.storer].capability_status_updated" + "v2.core.account[configuration.money_manager].capability_status_updated" ] - class V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventData( + class V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventData( StripeObject, ): updated_capability: Literal[ - "financial_addressses.bank_accounts", - "financial_addressses.crypto_wallets", - "holds_currencies.eur", - "holds_currencies.gbp", - "holds_currencies.usd", - "holds_currencies.usdc", + "business_storage.inbound.eur", + "business_storage.inbound.gbp", + "business_storage.inbound.usd", + "business_storage.inbound.usdc", + "business_storage.outbound.eur", + "business_storage.outbound.gbp", + "business_storage.outbound.usd", + "business_storage.outbound.usdc", "inbound_transfers.bank_accounts", "outbound_payments.bank_accounts", "outbound_payments.cards", @@ -117,14 +111,17 @@ class V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventData( "outbound_transfers.bank_accounts", "outbound_transfers.crypto_wallets", "outbound_transfers.financial_accounts", + "received_credits.bank_accounts", + "received_credits.crypto_wallets", + "received_debits.bank_accounts", ] """ Open Enum. The capability which had its status updated. """ - data: V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventData + data: V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventData """ - Data for the v2.core.account[configuration.storer].capability_status_updated event + Data for the v2.core.account[configuration.money_manager].capability_status_updated event """ @classmethod @@ -135,9 +132,7 @@ def _construct_from( last_response: Optional[StripeResponse] = None, requestor: "_APIRequestor", api_mode: ApiMode, - ) -> ( - "V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent" - ): + ) -> "V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent": evt = super()._construct_from( values=values, last_response=last_response, @@ -145,7 +140,7 @@ def _construct_from( api_mode=api_mode, ) if hasattr(evt, "data"): - evt.data = V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventData._construct_from( + evt.data = V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent.V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventData._construct_from( values=evt.data, last_response=last_response, requestor=requestor, diff --git a/stripe/events/_v2_core_account_including_configuration_storer_updated_event.py b/stripe/events/_v2_core_account_including_configuration_money_manager_updated_event.py similarity index 80% rename from stripe/events/_v2_core_account_including_configuration_storer_updated_event.py rename to stripe/events/_v2_core_account_including_configuration_money_manager_updated_event.py index 8d860ddc5..83d847050 100644 --- a/stripe/events/_v2_core_account_including_configuration_storer_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_money_manager_updated_event.py @@ -11,11 +11,11 @@ from stripe.v2.core._account import Account -class V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification( +class V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification( EventNotification, ): - LOOKUP_TYPE = "v2.core.account[configuration.storer].updated" - type: Literal["v2.core.account[configuration.storer].updated"] + LOOKUP_TYPE = "v2.core.account[configuration.money_manager].updated" + type: Literal["v2.core.account[configuration.money_manager].updated"] related_object: RelatedObject def __init__( @@ -30,9 +30,9 @@ def __init__( @override def fetch_event( self, - ) -> "V2CoreAccountIncludingConfigurationStorerUpdatedEvent": + ) -> "V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent": return cast( - "V2CoreAccountIncludingConfigurationStorerUpdatedEvent", + "V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent", super().fetch_event(), ) @@ -55,9 +55,9 @@ def fetch_related_object(self) -> "Account": @override async def fetch_event_async( self, - ) -> "V2CoreAccountIncludingConfigurationStorerUpdatedEvent": + ) -> "V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent": return cast( - "V2CoreAccountIncludingConfigurationStorerUpdatedEvent", + "V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent", await super().fetch_event_async(), ) @@ -78,9 +78,9 @@ async def fetch_related_object_async(self) -> "Account": ) -class V2CoreAccountIncludingConfigurationStorerUpdatedEvent(Event): - LOOKUP_TYPE = "v2.core.account[configuration.storer].updated" - type: Literal["v2.core.account[configuration.storer].updated"] +class V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent(Event): + LOOKUP_TYPE = "v2.core.account[configuration.money_manager].updated" + type: Literal["v2.core.account[configuration.money_manager].updated"] class RelatedObject(StripeObject): id: str diff --git a/stripe/events/_v2_core_account_link_returned_event.py b/stripe/events/_v2_core_account_link_returned_event.py index adc23900b..c1caac18f 100644 --- a/stripe/events/_v2_core_account_link_returned_event.py +++ b/stripe/events/_v2_core_account_link_returned_event.py @@ -40,7 +40,9 @@ class V2CoreAccountLinkReturnedEventData(StripeObject): The ID of the v2 account. """ configurations: List[ - Literal["customer", "merchant", "recipient", "storer"] + Literal[ + "customer", "merchant", "money_manager", "recipient", "storer" + ] ] """ Configurations on the Account that was onboarded via the account link. 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_transfer_under_review_event.py b/stripe/events/_v2_money_management_outbound_transfer_under_review_event.py new file mode 100644 index 000000000..f2b7645eb --- /dev/null +++ b/stripe/events/_v2_money_management_outbound_transfer_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_transfer import OutboundTransfer + + +class V2MoneyManagementOutboundTransferUnderReviewEventNotification( + EventNotification, +): + LOOKUP_TYPE = "v2.money_management.outbound_transfer.under_review" + type: Literal["v2.money_management.outbound_transfer.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, + ) -> "V2MoneyManagementOutboundTransferUnderReviewEvent": + return cast( + "V2MoneyManagementOutboundTransferUnderReviewEvent", + super().fetch_event(), + ) + + def fetch_related_object(self) -> "OutboundTransfer": + 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( + "OutboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + @override + async def fetch_event_async( + self, + ) -> "V2MoneyManagementOutboundTransferUnderReviewEvent": + return cast( + "V2MoneyManagementOutboundTransferUnderReviewEvent", + await super().fetch_event_async(), + ) + + async def fetch_related_object_async(self) -> "OutboundTransfer": + 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( + "OutboundTransfer", + self._client.deserialize( + response, + api_mode=get_api_mode(self.related_object.url), + ), + ) + + +class V2MoneyManagementOutboundTransferUnderReviewEvent(Event): + LOOKUP_TYPE = "v2.money_management.outbound_transfer.under_review" + type: Literal["v2.money_management.outbound_transfer.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) -> "OutboundTransfer": + """ + Retrieves the related object from the API. Makes an API request on every call. + """ + return cast( + "OutboundTransfer", + 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 129892ee1..268cd5cda 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -173,6 +173,22 @@ class OwnershipRefresh(StripeObject): """ class StatusDetails(StripeObject): + class Active(StripeObject): + action: Literal["none", "relink_required"] + """ + The action (if any) to proactively relink the Account. + """ + cause: Literal[ + "access_expired", "institution_requirement", "unspecified" + ] + """ + The underlying cause of the Account becoming inactive. + """ + expected_deactivation_date: int + """ + When the Account is expected to become inactive, if applicable. + """ + class Inactive(StripeObject): action: Literal["none", "relink_required"] """ @@ -183,14 +199,16 @@ class Inactive(StripeObject): "access_expired", "account_closed", "account_unavailable", + "institution_requirement", "unspecified", ] """ The underlying cause of the Account being inactive. """ + active: Optional[Active] inactive: Optional[Inactive] - _inner_class_types = {"inactive": Inactive} + _inner_class_types = {"active": Active, "inactive": Inactive} class TransactionRefresh(StripeObject): id: str diff --git a/stripe/financial_connections/_authorization.py b/stripe/financial_connections/_authorization.py index 91fd54099..df52e264c 100644 --- a/stripe/financial_connections/_authorization.py +++ b/stripe/financial_connections/_authorization.py @@ -40,14 +40,25 @@ class AccountHolder(StripeObject): """ class StatusDetails(StripeObject): + class Active(StripeObject): + action: Literal["none", "relink_required"] + """ + The action (if any) to proactively relink the Authorization. + """ + expected_deactivation_date: int + """ + When the Authorization is expected to become inactive, if applicable. + """ + class Inactive(StripeObject): action: Literal["none", "relink_required"] """ The action (if any) to relink the inactive Authorization. """ + active: Optional[Active] inactive: Optional[Inactive] - _inner_class_types = {"inactive": Inactive} + _inner_class_types = {"active": Active, "inactive": Inactive} account_holder: Optional[AccountHolder] """ diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index 6a3136202..25216c5aa 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -157,7 +157,7 @@ class ProvidedDetails(StripeObject): """ class Redaction(StripeObject): - status: Literal["processing", "redacted"] + status: Literal["processing", "redacted", "validated"] """ Indicates whether this object and its related objects have been redacted or not. """ diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index f6f4e1159..e1672ed14 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -348,6 +348,12 @@ class AmountDetails(StripeObject): """ _inner_class_types = {"amount_details": AmountDetails} + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class RequestHistory(StripeObject): class AmountDetails(StripeObject): atm_fee: Optional[int] @@ -585,6 +591,10 @@ class ThreeDSecure(StripeObject): """ The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. """ + redaction: Optional[Redaction] + """ + Redaction status of this authorization. If the authorization is not redacted, this field will be null. + """ request_history: List[RequestHistory] """ History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. @@ -1706,6 +1716,7 @@ def test_helpers(self): "merchant_data": MerchantData, "network_data": NetworkData, "pending_request": PendingRequest, + "redaction": Redaction, "request_history": RequestHistory, "treasury": Treasury, "verification_data": VerificationData, diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index 9746878b4..e9ac6ec5d 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -69,6 +69,12 @@ class CancelAfter(StripeObject): cancel_after: CancelAfter _inner_class_types = {"cancel_after": CancelAfter} + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Shipping(StripeObject): class Address(StripeObject): city: Optional[str] @@ -1295,6 +1301,10 @@ class GooglePay(StripeObject): """ The personalization design object belonging to this card. """ + redaction: Optional[Redaction] + """ + Redaction status of this card. If not null, this card is associated to a redaction job. + """ replaced_by: Optional[ExpandableField["Card"]] """ The latest card that replaces this card, if any. @@ -2009,6 +2019,7 @@ def test_helpers(self): _inner_class_types = { "latest_fraud_warning": LatestFraudWarning, "lifecycle_controls": LifecycleControls, + "redaction": Redaction, "shipping": Shipping, "spending_controls": SpendingControls, "wallets": Wallets, diff --git a/stripe/issuing/_cardholder.py b/stripe/issuing/_cardholder.py index c0ccce0e5..194679934 100644 --- a/stripe/issuing/_cardholder.py +++ b/stripe/issuing/_cardholder.py @@ -154,6 +154,12 @@ class Document(StripeObject): "verification": Verification, } + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Requirements(StripeObject): disabled_reason: Optional[ Literal[ @@ -1191,6 +1197,10 @@ class SpendingLimit(StripeObject): The cardholder's preferred locales (languages), ordered by preference. Locales can be `da`, `de`, `en`, `es`, `fr`, `it`, `pl`, or `sv`. This changes the language of the [3D Secure flow](https://docs.stripe.com/issuing/3d-secure) and one-time password messages sent to the cardholder. """ + redaction: Optional[Redaction] + """ + Redaction status of this cardholder. If the cardholder is not redacted, this field will be null. + """ requirements: Requirements spending_controls: Optional[SpendingControls] """ @@ -1337,6 +1347,7 @@ async def retrieve_async( "billing": Billing, "company": Company, "individual": Individual, + "redaction": Redaction, "requirements": Requirements, "spending_controls": SpendingControls, } diff --git a/stripe/issuing/_dispute.py b/stripe/issuing/_dispute.py index ecf081c47..4bd830ea1 100644 --- a/stripe/issuing/_dispute.py +++ b/stripe/issuing/_dispute.py @@ -251,6 +251,12 @@ class ServiceNotAsDescribed(StripeObject): "service_not_as_described": ServiceNotAsDescribed, } + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Treasury(StripeObject): debit_reversal: Optional[str] """ @@ -321,6 +327,10 @@ class Treasury(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ + redaction: Optional[Redaction] + """ + Redaction status of this dispute. If the dispute is not redacted, this field will be null. + """ status: Literal["expired", "lost", "submitted", "unsubmitted", "won"] """ Current status of the dispute. @@ -568,4 +578,8 @@ async def submit_async( # pyright: ignore[reportGeneralTypeIssues] ), ) - _inner_class_types = {"evidence": Evidence, "treasury": Treasury} + _inner_class_types = { + "evidence": Evidence, + "redaction": Redaction, + "treasury": Treasury, + } diff --git a/stripe/issuing/_transaction.py b/stripe/issuing/_transaction.py index f9c1e68bc..1f2ae7435 100644 --- a/stripe/issuing/_transaction.py +++ b/stripe/issuing/_transaction.py @@ -356,6 +356,12 @@ class Receipt(StripeObject): "receipt": Receipt, } + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + class Treasury(StripeObject): received_credit: Optional[str] """ @@ -435,6 +441,10 @@ class Treasury(StripeObject): """ Additional purchase information that is optionally provided by the merchant. """ + redaction: Optional[Redaction] + """ + Redaction status of this transaction. If the transaction is not redacted, this field will be null. + """ settlement: Optional[ExpandableField["Settlement"]] """ The ID of the [settlement](https://docs.stripe.com/api/issuing/settlements) to which this transaction belongs. @@ -738,6 +748,7 @@ def test_helpers(self): "merchant_data": MerchantData, "network_data": NetworkData, "purchase_details": PurchaseDetails, + "redaction": Redaction, "treasury": Treasury, } diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index b1ea65423..2f2e2875f 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -1320,6 +1320,7 @@ DisputeModifyParams as DisputeModifyParams, DisputeModifyParamsEvidence as DisputeModifyParamsEvidence, DisputeModifyParamsEvidenceEnhancedEvidence as DisputeModifyParamsEvidenceEnhancedEvidence, + DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance as DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance, DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3 as DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3, DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction as DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction, DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress as DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress, @@ -1334,6 +1335,7 @@ DisputeUpdateParams as DisputeUpdateParams, DisputeUpdateParamsEvidence as DisputeUpdateParamsEvidence, DisputeUpdateParamsEvidenceEnhancedEvidence as DisputeUpdateParamsEvidenceEnhancedEvidence, + DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance as DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance, DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3 as DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3, DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction as DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction, DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress as DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress, @@ -1585,6 +1587,10 @@ InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEndDuration as InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEndDuration, InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceData as InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceData, InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring as InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring, + InvoiceCreatePreviewParamsSubscriptionDetailsPause as InvoiceCreatePreviewParamsSubscriptionDetailsPause, + InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor as InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor, + InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough as InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough, + InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom as InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom, InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling as InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling, ) from stripe.params._invoice_delete_params import ( @@ -2469,6 +2475,7 @@ PaymentIntentConfirmParamsPaymentMethodOptionsShopeepay as PaymentIntentConfirmParamsPaymentMethodOptionsShopeepay, PaymentIntentConfirmParamsPaymentMethodOptionsSofort as PaymentIntentConfirmParamsPaymentMethodOptionsSofort, PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalance as PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalance, + PaymentIntentConfirmParamsPaymentMethodOptionsSunbit as PaymentIntentConfirmParamsPaymentMethodOptionsSunbit, PaymentIntentConfirmParamsPaymentMethodOptionsSwish as PaymentIntentConfirmParamsPaymentMethodOptionsSwish, PaymentIntentConfirmParamsPaymentMethodOptionsTwint as PaymentIntentConfirmParamsPaymentMethodOptionsTwint, PaymentIntentConfirmParamsPaymentMethodOptionsUpi as PaymentIntentConfirmParamsPaymentMethodOptionsUpi, @@ -2757,6 +2764,7 @@ PaymentIntentCreateParamsPaymentMethodOptionsShopeepay as PaymentIntentCreateParamsPaymentMethodOptionsShopeepay, PaymentIntentCreateParamsPaymentMethodOptionsSofort as PaymentIntentCreateParamsPaymentMethodOptionsSofort, PaymentIntentCreateParamsPaymentMethodOptionsStripeBalance as PaymentIntentCreateParamsPaymentMethodOptionsStripeBalance, + PaymentIntentCreateParamsPaymentMethodOptionsSunbit as PaymentIntentCreateParamsPaymentMethodOptionsSunbit, PaymentIntentCreateParamsPaymentMethodOptionsSwish as PaymentIntentCreateParamsPaymentMethodOptionsSwish, PaymentIntentCreateParamsPaymentMethodOptionsTwint as PaymentIntentCreateParamsPaymentMethodOptionsTwint, PaymentIntentCreateParamsPaymentMethodOptionsUpi as PaymentIntentCreateParamsPaymentMethodOptionsUpi, @@ -3092,6 +3100,7 @@ PaymentIntentModifyParamsPaymentMethodOptionsShopeepay as PaymentIntentModifyParamsPaymentMethodOptionsShopeepay, PaymentIntentModifyParamsPaymentMethodOptionsSofort as PaymentIntentModifyParamsPaymentMethodOptionsSofort, PaymentIntentModifyParamsPaymentMethodOptionsStripeBalance as PaymentIntentModifyParamsPaymentMethodOptionsStripeBalance, + PaymentIntentModifyParamsPaymentMethodOptionsSunbit as PaymentIntentModifyParamsPaymentMethodOptionsSunbit, PaymentIntentModifyParamsPaymentMethodOptionsSwish as PaymentIntentModifyParamsPaymentMethodOptionsSwish, PaymentIntentModifyParamsPaymentMethodOptionsTwint as PaymentIntentModifyParamsPaymentMethodOptionsTwint, PaymentIntentModifyParamsPaymentMethodOptionsUpi as PaymentIntentModifyParamsPaymentMethodOptionsUpi, @@ -3389,6 +3398,7 @@ PaymentIntentUpdateParamsPaymentMethodOptionsShopeepay as PaymentIntentUpdateParamsPaymentMethodOptionsShopeepay, PaymentIntentUpdateParamsPaymentMethodOptionsSofort as PaymentIntentUpdateParamsPaymentMethodOptionsSofort, PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalance as PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalance, + PaymentIntentUpdateParamsPaymentMethodOptionsSunbit as PaymentIntentUpdateParamsPaymentMethodOptionsSunbit, PaymentIntentUpdateParamsPaymentMethodOptionsSwish as PaymentIntentUpdateParamsPaymentMethodOptionsSwish, PaymentIntentUpdateParamsPaymentMethodOptionsTwint as PaymentIntentUpdateParamsPaymentMethodOptionsTwint, PaymentIntentUpdateParamsPaymentMethodOptionsUpi as PaymentIntentUpdateParamsPaymentMethodOptionsUpi, @@ -5142,6 +5152,7 @@ SubscriptionCreateParamsDiscountDiscountEnd as SubscriptionCreateParamsDiscountDiscountEnd, SubscriptionCreateParamsDiscountDiscountEndDuration as SubscriptionCreateParamsDiscountDiscountEndDuration, SubscriptionCreateParamsInvoiceSettings as SubscriptionCreateParamsInvoiceSettings, + SubscriptionCreateParamsInvoiceSettingsCustomField as SubscriptionCreateParamsInvoiceSettingsCustomField, SubscriptionCreateParamsInvoiceSettingsIssuer as SubscriptionCreateParamsInvoiceSettingsIssuer, SubscriptionCreateParamsItem as SubscriptionCreateParamsItem, SubscriptionCreateParamsItemBillingThresholds as SubscriptionCreateParamsItemBillingThresholds, @@ -5259,6 +5270,7 @@ SubscriptionModifyParamsDiscountDiscountEnd as SubscriptionModifyParamsDiscountDiscountEnd, SubscriptionModifyParamsDiscountDiscountEndDuration as SubscriptionModifyParamsDiscountDiscountEndDuration, SubscriptionModifyParamsInvoiceSettings as SubscriptionModifyParamsInvoiceSettings, + SubscriptionModifyParamsInvoiceSettingsCustomField as SubscriptionModifyParamsInvoiceSettingsCustomField, SubscriptionModifyParamsInvoiceSettingsIssuer as SubscriptionModifyParamsInvoiceSettingsIssuer, SubscriptionModifyParamsItem as SubscriptionModifyParamsItem, SubscriptionModifyParamsItemBillingThresholds as SubscriptionModifyParamsItemBillingThresholds, @@ -5516,6 +5528,7 @@ SubscriptionUpdateParamsDiscountDiscountEnd as SubscriptionUpdateParamsDiscountDiscountEnd, SubscriptionUpdateParamsDiscountDiscountEndDuration as SubscriptionUpdateParamsDiscountDiscountEndDuration, SubscriptionUpdateParamsInvoiceSettings as SubscriptionUpdateParamsInvoiceSettings, + SubscriptionUpdateParamsInvoiceSettingsCustomField as SubscriptionUpdateParamsInvoiceSettingsCustomField, SubscriptionUpdateParamsInvoiceSettingsIssuer as SubscriptionUpdateParamsInvoiceSettingsIssuer, SubscriptionUpdateParamsItem as SubscriptionUpdateParamsItem, SubscriptionUpdateParamsItemBillingThresholds as SubscriptionUpdateParamsItemBillingThresholds, @@ -5648,6 +5661,8 @@ ) from stripe.params._topup_create_params import ( TopupCreateParams as TopupCreateParams, + TopupCreateParamsPaymentMethodOptions as TopupCreateParamsPaymentMethodOptions, + TopupCreateParamsPaymentMethodOptionsUsBankAccount as TopupCreateParamsPaymentMethodOptionsUsBankAccount, ) from stripe.params._topup_list_params import ( TopupListParams as TopupListParams, @@ -9609,6 +9624,10 @@ "stripe.params._dispute_modify_params", False, ), + "DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance": ( + "stripe.params._dispute_modify_params", + False, + ), "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3": ( "stripe.params._dispute_modify_params", False, @@ -9643,6 +9662,10 @@ "stripe.params._dispute_update_params", False, ), + "DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance": ( + "stripe.params._dispute_update_params", + False, + ), "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3": ( "stripe.params._dispute_update_params", False, @@ -10397,6 +10420,22 @@ "stripe.params._invoice_create_preview_params", False, ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPause": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough": ( + "stripe.params._invoice_create_preview_params", + False, + ), + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom": ( + "stripe.params._invoice_create_preview_params", + False, + ), "InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling": ( "stripe.params._invoice_create_preview_params", False, @@ -13448,6 +13487,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_confirm_params", False, @@ -14592,6 +14635,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_create_params", False, @@ -15892,6 +15939,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_modify_params", False, @@ -17048,6 +17099,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsSunbit": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsSwish": ( "stripe.params._payment_intent_update_params", False, @@ -22789,6 +22844,10 @@ "stripe.params._subscription_create_params", False, ), + "SubscriptionCreateParamsInvoiceSettingsCustomField": ( + "stripe.params._subscription_create_params", + False, + ), "SubscriptionCreateParamsInvoiceSettingsIssuer": ( "stripe.params._subscription_create_params", False, @@ -23177,6 +23236,10 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsInvoiceSettingsCustomField": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsInvoiceSettingsIssuer": ( "stripe.params._subscription_modify_params", False, @@ -24101,6 +24164,10 @@ "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsInvoiceSettingsCustomField": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsInvoiceSettingsIssuer": ( "stripe.params._subscription_update_params", False, @@ -24449,6 +24516,14 @@ "TokenRetrieveParams": ("stripe.params._token_retrieve_params", False), "TopupCancelParams": ("stripe.params._topup_cancel_params", False), "TopupCreateParams": ("stripe.params._topup_create_params", False), + "TopupCreateParamsPaymentMethodOptions": ( + "stripe.params._topup_create_params", + False, + ), + "TopupCreateParamsPaymentMethodOptionsUsBankAccount": ( + "stripe.params._topup_create_params", + False, + ), "TopupListParams": ("stripe.params._topup_list_params", False), "TopupListParamsAmount": ("stripe.params._topup_list_params", False), "TopupListParamsCreated": ("stripe.params._topup_list_params", False), diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index 96412e0c6..61686a5c1 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -1569,7 +1569,7 @@ class AccountCreateParamsDocuments(TypedDict): "AccountCreateParamsDocumentsCompanyMemorandumOfAssociation" ] """ - One or more documents showing the company's Memorandum of Association. + One or more documents showing the company's governing document (for example, a memorandum of association, constitution, or articles of association). """ company_ministerial_decree: NotRequired[ "AccountCreateParamsDocumentsCompanyMinisterialDecree" diff --git a/stripe/params/_account_update_params.py b/stripe/params/_account_update_params.py index 406e8a4e8..fb3f68754 100644 --- a/stripe/params/_account_update_params.py +++ b/stripe/params/_account_update_params.py @@ -1481,7 +1481,7 @@ class AccountUpdateParamsDocuments(TypedDict): "AccountUpdateParamsDocumentsCompanyMemorandumOfAssociation" ] """ - One or more documents showing the company's Memorandum of Association. + One or more documents showing the company's governing document (for example, a memorandum of association, constitution, or articles of association). """ company_ministerial_decree: NotRequired[ "AccountUpdateParamsDocumentsCompanyMinisterialDecree" diff --git a/stripe/params/_balance_transaction_list_params.py b/stripe/params/_balance_transaction_list_params.py index 9f636474c..04d0554ca 100644 --- a/stripe/params/_balance_transaction_list_params.py +++ b/stripe/params/_balance_transaction_list_params.py @@ -40,7 +40,7 @@ class BalanceTransactionListParams(RequestOptions): """ type: NotRequired[str] """ - Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. + Only returns transactions of the given type. One of: `tax_fund`, `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `inbound_transfer`, `inbound_transfer_reversal`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `reserve_hold`, `reserve_release`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, `transfer_refund`, or `fee_credit_funding`. """ diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py index addf1865e..bb0993943 100644 --- a/stripe/params/_confirmation_token_create_params.py +++ b/stripe/params/_confirmation_token_create_params.py @@ -344,7 +344,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_credit_note_create_params.py b/stripe/params/_credit_note_create_params.py index 6299dba8e..5ce43d56b 100644 --- a/stripe/params/_credit_note_create_params.py +++ b/stripe/params/_credit_note_create_params.py @@ -95,7 +95,7 @@ class CreditNoteCreateParamsLine(TypedDict): "Literal['']|List[CreditNoteCreateParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_credit_note_preview_lines_list_params.py b/stripe/params/_credit_note_preview_lines_list_params.py index 140b25522..e14ea097f 100644 --- a/stripe/params/_credit_note_preview_lines_list_params.py +++ b/stripe/params/_credit_note_preview_lines_list_params.py @@ -106,7 +106,7 @@ class CreditNotePreviewLinesListParamsLine(TypedDict): "Literal['']|List[CreditNotePreviewLinesListParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_credit_note_preview_lines_params.py b/stripe/params/_credit_note_preview_lines_params.py index 54102dd77..d8974086f 100644 --- a/stripe/params/_credit_note_preview_lines_params.py +++ b/stripe/params/_credit_note_preview_lines_params.py @@ -107,7 +107,7 @@ class CreditNotePreviewLinesParamsLine(TypedDict): "Literal['']|List[CreditNotePreviewLinesParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_credit_note_preview_params.py b/stripe/params/_credit_note_preview_params.py index 4987dd467..ec7be34e9 100644 --- a/stripe/params/_credit_note_preview_params.py +++ b/stripe/params/_credit_note_preview_params.py @@ -95,7 +95,7 @@ class CreditNotePreviewParamsLine(TypedDict): "Literal['']|List[CreditNotePreviewParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. + A list of up to 20 tax amounts for the credit note line item. Not valid when `tax_rates` is used or if invoice is set up with `automatic_tax[enabled]=true`. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_dispute_modify_params.py b/stripe/params/_dispute_modify_params.py index d696de6cf..9c139f1a7 100644 --- a/stripe/params/_dispute_modify_params.py +++ b/stripe/params/_dispute_modify_params.py @@ -156,6 +156,12 @@ class DisputeModifyParamsEvidence(TypedDict): class DisputeModifyParamsEvidenceEnhancedEvidence(TypedDict): + mastercard_compliance: NotRequired[ + "DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance" + ] + """ + Evidence provided for Mastercard compliance evidence submission. + """ visa_compelling_evidence_3: NotRequired[ "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" ] @@ -170,6 +176,15 @@ class DisputeModifyParamsEvidenceEnhancedEvidence(TypedDict): """ +class DisputeModifyParamsEvidenceEnhancedEvidenceMastercardCompliance( + TypedDict, +): + fee_acknowledged: NotRequired[bool] + """ + A field acknowledging the fee incurred when countering a Mastercard compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. + """ + + class DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( TypedDict, ): diff --git a/stripe/params/_dispute_update_params.py b/stripe/params/_dispute_update_params.py index 469aaea8a..c327fbb56 100644 --- a/stripe/params/_dispute_update_params.py +++ b/stripe/params/_dispute_update_params.py @@ -155,6 +155,12 @@ class DisputeUpdateParamsEvidence(TypedDict): class DisputeUpdateParamsEvidenceEnhancedEvidence(TypedDict): + mastercard_compliance: NotRequired[ + "DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance" + ] + """ + Evidence provided for Mastercard compliance evidence submission. + """ visa_compelling_evidence_3: NotRequired[ "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" ] @@ -169,6 +175,15 @@ class DisputeUpdateParamsEvidenceEnhancedEvidence(TypedDict): """ +class DisputeUpdateParamsEvidenceEnhancedEvidenceMastercardCompliance( + TypedDict, +): + fee_acknowledged: NotRequired[bool] + """ + A field acknowledging the fee incurred when countering a Mastercard compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. + """ + + class DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( TypedDict, ): diff --git a/stripe/params/_invoice_add_lines_params.py b/stripe/params/_invoice_add_lines_params.py index 7d2383574..a358afa03 100644 --- a/stripe/params/_invoice_add_lines_params.py +++ b/stripe/params/_invoice_add_lines_params.py @@ -81,7 +81,7 @@ class InvoiceAddLinesParamsLine(TypedDict): "Literal['']|List[InvoiceAddLinesParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + A list of up to 20 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_invoice_create_params.py b/stripe/params/_invoice_create_params.py index 4d639ad55..4965245b7 100644 --- a/stripe/params/_invoice_create_params.py +++ b/stripe/params/_invoice_create_params.py @@ -286,7 +286,7 @@ class InvoiceCreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', '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', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ 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). diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index 5428d35c8..4b99f07be 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -1911,6 +1911,14 @@ class InvoiceCreatePreviewParamsSubscriptionDetails(TypedDict): """ A list of up to 20 subscription items, each with an attached price. """ + pause: NotRequired["InvoiceCreatePreviewParamsSubscriptionDetailsPause"] + """ + Previews the invoice that would be generated when pausing the subscription. Passing an empty hash won't preview pausing and instead returns the next invoice. + + To receive a preview invoice, set `invoicing_behavior` to `invoice`. A preview isn't available if the `bill_for` options produce no billable amounts. + + `pending_invoice_item` never has a preview available because pausing wouldn't generate an invoice, and paused subscriptions don't generate invoices either. + """ prebilling: NotRequired[ "InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling" ] @@ -2058,7 +2066,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItem(TypedDict): """ id: NotRequired[str] """ - Subscription item to update. + Subscription item to update. If you omit `id`, the API adds a new subscription item rather than updating the existing one. See [Changing a subscription's price](https://docs.stripe.com/billing/subscriptions/change-price#changing). """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" @@ -2205,6 +2213,56 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring( """ +class InvoiceCreatePreviewParamsSubscriptionDetailsPause(TypedDict): + bill_for: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor" + ] + """ + Controls what to bill for when pausing the subscription. + """ + invoicing_behavior: NotRequired[Literal["invoice", "pending_invoice_item"]] + """ + Determines how to handle debits and credits when pausing. Defaults to `pending_invoice_item`. + """ + type: NotRequired[Literal["subscription"]] + """ + The type of pause to apply. Defaults to `subscription`. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillFor(TypedDict): + outstanding_usage_through: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough" + ] + """ + Controls when to bill for metered usage in the current period. Defaults to `{ type: "now" }`. + """ + unused_time_from: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom" + ] + """ + Controls when to credit for unused time on licensed items. Defaults to `{ type: "now" }`. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForOutstandingUsageThrough( + TypedDict, +): + type: Literal["none", "now"] + """ + When to bill metered usage in the current period. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsPauseBillForUnusedTimeFrom( + TypedDict, +): + type: Literal["item_current_period_start", "none", "now"] + """ + When to credit for unused time. + """ + + class InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling(TypedDict): iterations: int """ diff --git a/stripe/params/_invoice_line_item_update_params.py b/stripe/params/_invoice_line_item_update_params.py index 0a1dcdfd3..ce15ea30f 100644 --- a/stripe/params/_invoice_line_item_update_params.py +++ b/stripe/params/_invoice_line_item_update_params.py @@ -63,7 +63,7 @@ class InvoiceLineItemUpdateParams(TypedDict): "Literal['']|List[InvoiceLineItemUpdateParamsTaxAmount]" ] """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + A list of up to 20 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_invoice_modify_params.py b/stripe/params/_invoice_modify_params.py index 9fdfad81f..93825ae43 100644 --- a/stripe/params/_invoice_modify_params.py +++ b/stripe/params/_invoice_modify_params.py @@ -253,7 +253,7 @@ class InvoiceModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', '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', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ 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). diff --git a/stripe/params/_invoice_update_lines_params.py b/stripe/params/_invoice_update_lines_params.py index e38537e74..aa685c50a 100644 --- a/stripe/params/_invoice_update_lines_params.py +++ b/stripe/params/_invoice_update_lines_params.py @@ -81,7 +81,7 @@ class InvoiceUpdateLinesParamsLine(TypedDict): "Literal['']|List[InvoiceUpdateLinesParamsLineTaxAmount]" ] """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + A list of up to 20 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing). Pass an empty string to remove previously defined tax amounts. """ tax_rates: NotRequired["Literal['']|List[str]"] """ diff --git a/stripe/params/_invoice_update_params.py b/stripe/params/_invoice_update_params.py index 5be145d5e..ded567d9d 100644 --- a/stripe/params/_invoice_update_params.py +++ b/stripe/params/_invoice_update_params.py @@ -252,7 +252,7 @@ class InvoiceUpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', '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', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ 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). diff --git a/stripe/params/_order_create_params.py b/stripe/params/_order_create_params.py index a26321218..f91dcb7b2 100644 --- a/stripe/params/_order_create_params.py +++ b/stripe/params/_order_create_params.py @@ -2173,7 +2173,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): class OrderCreateParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: NotRequired[Literal["android", "ios", "web"]] """ diff --git a/stripe/params/_order_modify_params.py b/stripe/params/_order_modify_params.py index 02a3605da..2183251c2 100644 --- a/stripe/params/_order_modify_params.py +++ b/stripe/params/_order_modify_params.py @@ -2183,7 +2183,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): class OrderModifyParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: NotRequired[Literal["android", "ios", "web"]] """ diff --git a/stripe/params/_order_update_params.py b/stripe/params/_order_update_params.py index c13bc157f..6f033a506 100644 --- a/stripe/params/_order_update_params.py +++ b/stripe/params/_order_update_params.py @@ -2182,7 +2182,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: NotRequired[Literal["android", "ios", "web"]] """ diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 895413bac..f4bfee469 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -2523,7 +2523,7 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSwish"] """ @@ -3537,6 +3537,12 @@ class PaymentIntentConfirmParamsPaymentMethodOptions(TypedDict): """ If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSwish" ] @@ -6317,6 +6323,18 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsSatispay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentConfirmParamsPaymentMethodOptionsScalapay(TypedDict): @@ -6421,6 +6439,27 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalance(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodOptionsSunbit(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentConfirmParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -6621,7 +6660,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: NotRequired[Literal["android", "ios", "web"]] """ diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 5f1b9740f..cb4d9b093 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -2644,7 +2644,7 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSwish"] """ @@ -3658,6 +3658,12 @@ class PaymentIntentCreateParamsPaymentMethodOptions(TypedDict): """ If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSwish" ] @@ -6432,6 +6438,18 @@ class PaymentIntentCreateParamsPaymentMethodOptionsSatispay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentCreateParamsPaymentMethodOptionsScalapay(TypedDict): @@ -6536,6 +6554,27 @@ class PaymentIntentCreateParamsPaymentMethodOptionsStripeBalance(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodOptionsSunbit(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentCreateParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -6736,7 +6775,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentCreateParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: NotRequired[Literal["android", "ios", "web"]] """ diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index 07222fa8b..49fa1c91c 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -2500,7 +2500,7 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSwish"] """ @@ -3514,6 +3514,12 @@ class PaymentIntentModifyParamsPaymentMethodOptions(TypedDict): """ If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSwish" ] @@ -6288,6 +6294,18 @@ class PaymentIntentModifyParamsPaymentMethodOptionsSatispay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentModifyParamsPaymentMethodOptionsScalapay(TypedDict): @@ -6392,6 +6410,27 @@ class PaymentIntentModifyParamsPaymentMethodOptionsStripeBalance(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodOptionsSunbit(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentModifyParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -6592,7 +6631,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentModifyParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: NotRequired[Literal["android", "ios", "web"]] """ diff --git a/stripe/params/_payment_intent_search_params.py b/stripe/params/_payment_intent_search_params.py index 516352aec..37f7a2dff 100644 --- a/stripe/params/_payment_intent_search_params.py +++ b/stripe/params/_payment_intent_search_params.py @@ -20,5 +20,5 @@ class PaymentIntentSearchParams(RequestOptions): """ query: str """ - The search query string. See [search query language](https://docs.stripe.com/search#search-query-language) and the list of supported [query fields for payment intents](https://docs.stripe.com/search#query-fields-for-payment-intents). + The search query string. See [search query language](https://docs.stripe.com/search#search-query-language) and the list of supported [query fields for payment intents](https://docs.stripe.com/search#query-fields-for-paymentintents). """ diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 465504713..96ac8850d 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -2499,7 +2499,7 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSwish"] """ @@ -3513,6 +3513,12 @@ class PaymentIntentUpdateParamsPaymentMethodOptions(TypedDict): """ If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. """ + sunbit: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSunbit" + ] + """ + If this is a `sunbit` PaymentMethod, this sub-hash contains details about the Sunbit payment method options. + """ swish: NotRequired[ "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSwish" ] @@ -6287,6 +6293,18 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsSatispay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ class PaymentIntentUpdateParamsPaymentMethodOptionsScalapay(TypedDict): @@ -6391,6 +6409,27 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalance(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodOptionsSunbit(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + class PaymentIntentUpdateParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired["Literal['']|str"] """ @@ -6591,7 +6630,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountNetworks( class PaymentIntentUpdateParamsPaymentMethodOptionsWechatPay(TypedDict): app_id: NotRequired[str] """ - The app ID registered with WeChat Pay. Only required when client is ios or android. + The app ID registered with WeChat Pay. Only required when client is ios, android, or mini_program. """ client: NotRequired[Literal["android", "ios", "web"]] """ diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py index 6e33186f0..2937e0a0e 100644 --- a/stripe/params/_payment_link_create_params.py +++ b/stripe/params/_payment_link_create_params.py @@ -107,6 +107,9 @@ class PaymentLinkCreateParams(RequestOptions): payment_method_options: NotRequired[ "PaymentLinkCreateParamsPaymentMethodOptions" ] + """ + Payment-method-specific configuration. + """ payment_method_types: NotRequired[ List[ Literal[ diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index 92abfade4..e9b5ea5b0 100644 --- a/stripe/params/_payment_method_create_params.py +++ b/stripe/params/_payment_method_create_params.py @@ -261,7 +261,7 @@ class PaymentMethodCreateParams(RequestOptions): """ sunbit: NotRequired["PaymentMethodCreateParamsSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["PaymentMethodCreateParamsSwish"] """ diff --git a/stripe/params/_payment_record_report_refund_params.py b/stripe/params/_payment_record_report_refund_params.py index a2eacdfe2..c18df94b6 100644 --- a/stripe/params/_payment_record_report_refund_params.py +++ b/stripe/params/_payment_record_report_refund_params.py @@ -33,7 +33,7 @@ class PaymentRecordReportRefundParams(RequestOptions): """ Processor information for this refund. """ - refunded: "PaymentRecordReportRefundParamsRefunded" + refunded: NotRequired["PaymentRecordReportRefundParamsRefunded"] """ Information about the payment attempt refund. """ diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index 4086ae73c..a3ef5fd5a 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -377,7 +377,7 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 3df403a72..4dddce679 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -514,7 +514,7 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentCreateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index 9d93460ba..3986cee22 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -353,7 +353,7 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentModifyParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentModifyParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index 52cd0d9bf..226de9585 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -352,7 +352,7 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index d51dc2f3d..cdd0ac4bb 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -511,12 +511,37 @@ class SubscriptionCreateParamsInvoiceSettings(TypedDict): """ The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionCreateParamsInvoiceSettingsCustomField]" + ] + """ + 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["SubscriptionCreateParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class SubscriptionCreateParamsInvoiceSettingsCustomField(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 SubscriptionCreateParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ @@ -699,7 +724,7 @@ class SubscriptionCreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', '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', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ 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 diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index 61e520062..978b95166 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -471,12 +471,37 @@ class SubscriptionModifyParamsInvoiceSettings(TypedDict): """ The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionModifyParamsInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired["SubscriptionModifyParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class SubscriptionModifyParamsInvoiceSettingsCustomField(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 SubscriptionModifyParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ @@ -515,7 +540,7 @@ class SubscriptionModifyParamsItem(TypedDict): """ id: NotRequired[str] """ - Subscription item to update. + Subscription item to update. If you omit `id`, the API adds a new subscription item rather than updating the existing one. See [Changing a subscription's price](https://docs.stripe.com/billing/subscriptions/change-price#changing). """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" @@ -669,7 +694,7 @@ class SubscriptionModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', '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', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ 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 diff --git a/stripe/params/_subscription_pause_params.py b/stripe/params/_subscription_pause_params.py index 454b7f268..a3e38e44d 100644 --- a/stripe/params/_subscription_pause_params.py +++ b/stripe/params/_subscription_pause_params.py @@ -16,7 +16,7 @@ class SubscriptionPauseParams(RequestOptions): """ invoicing_behavior: NotRequired[Literal["invoice", "pending_invoice_item"]] """ - Determines how to handle debits and credits when pausing. The default is `pending_invoice_item`. + Determines how to handle debits and credits when pausing. Defaults to `pending_invoice_item`. """ type: NotRequired[Literal["subscription"]] """ diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index 4db1aeec9..bd3c5e076 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -470,12 +470,37 @@ class SubscriptionUpdateParamsInvoiceSettings(TypedDict): """ The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. """ + custom_fields: NotRequired[ + "Literal['']|List[SubscriptionUpdateParamsInvoiceSettingsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired["Literal['']|str"] + """ + Footer to be displayed on the invoice. + """ issuer: NotRequired["SubscriptionUpdateParamsInvoiceSettingsIssuer"] """ The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. """ +class SubscriptionUpdateParamsInvoiceSettingsCustomField(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 SubscriptionUpdateParamsInvoiceSettingsIssuer(TypedDict): account: NotRequired[str] """ @@ -514,7 +539,7 @@ class SubscriptionUpdateParamsItem(TypedDict): """ id: NotRequired[str] """ - Subscription item to update. + Subscription item to update. If you omit `id`, the API adds a new subscription item rather than updating the existing one. See [Changing a subscription's price](https://docs.stripe.com/billing/subscriptions/change-price#changing). """ metadata: NotRequired[ "Literal['']|Dict[str, str]|UntypedStripeObject[str]" @@ -668,7 +693,7 @@ class SubscriptionUpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', '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', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" ] """ 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 diff --git a/stripe/params/_topup_create_params.py b/stripe/params/_topup_create_params.py index 6203536e8..930c37cd3 100644 --- a/stripe/params/_topup_create_params.py +++ b/stripe/params/_topup_create_params.py @@ -3,7 +3,7 @@ from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject from typing import Dict, List -from typing_extensions import Literal, NotRequired +from typing_extensions import Literal, NotRequired, TypedDict class TopupCreateParams(RequestOptions): @@ -29,6 +29,16 @@ class TopupCreateParams(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_method: NotRequired[str] + """ + The ID of a PaymentMethod representing the payment method to be used for the top-up. A PaymentMethod of type `us_bank_account` can be used. + """ + payment_method_options: NotRequired[ + "TopupCreateParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this top-up. + """ source: NotRequired[str] """ The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://docs.stripe.com/connect/testing#testing-top-ups)). @@ -41,3 +51,13 @@ class TopupCreateParams(RequestOptions): """ A string that identifies this top-up as part of a group. """ + + +class TopupCreateParamsPaymentMethodOptions(TypedDict): + us_bank_account: NotRequired[ + "TopupCreateParamsPaymentMethodOptionsUsBankAccount" + ] + + +class TopupCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): + network: Literal["ach"] diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py index 937b98bf6..09bf60a22 100644 --- a/stripe/params/_webhook_endpoint_create_params.py +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -133,6 +133,7 @@ class WebhookEndpointCreateParams(RequestOptions): "2026-03-25.dahlia", "2026-04-22.dahlia", "2026-05-27.dahlia", + "2026-06-24.dahlia", ] ] """ @@ -163,7 +164,13 @@ class WebhookEndpointCreateParams(RequestOptions): "balance.available", "balance_settings.updated", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -442,13 +449,6 @@ class WebhookEndpointCreateParams(RequestOptions): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoice_payment.detached", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] ] """ diff --git a/stripe/params/_webhook_endpoint_modify_params.py b/stripe/params/_webhook_endpoint_modify_params.py index 6f6b5ee0b..c2afba709 100644 --- a/stripe/params/_webhook_endpoint_modify_params.py +++ b/stripe/params/_webhook_endpoint_modify_params.py @@ -33,7 +33,13 @@ class WebhookEndpointModifyParams(RequestOptions): "balance.available", "balance_settings.updated", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -312,13 +318,6 @@ class WebhookEndpointModifyParams(RequestOptions): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoice_payment.detached", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] ] ] diff --git a/stripe/params/_webhook_endpoint_update_params.py b/stripe/params/_webhook_endpoint_update_params.py index 64584f04e..2d75f4cb5 100644 --- a/stripe/params/_webhook_endpoint_update_params.py +++ b/stripe/params/_webhook_endpoint_update_params.py @@ -32,7 +32,13 @@ class WebhookEndpointUpdateParams(TypedDict): "balance.available", "balance_settings.updated", "billing.alert.triggered", + "billing.credit_balance_transaction.created", "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -311,13 +317,6 @@ class WebhookEndpointUpdateParams(TypedDict): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoice_payment.detached", - "billing.credit_balance_transaction.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", ] ] ] diff --git a/stripe/params/billing/_credit_balance_summary_retrieve_params.py b/stripe/params/billing/_credit_balance_summary_retrieve_params.py index a5ea1a65a..aa72845f2 100644 --- a/stripe/params/billing/_credit_balance_summary_retrieve_params.py +++ b/stripe/params/billing/_credit_balance_summary_retrieve_params.py @@ -50,7 +50,7 @@ class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope(TypedDict): List["CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice"] ] """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. + A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. Limit 20 prices. """ diff --git a/stripe/params/billing/_credit_grant_create_params.py b/stripe/params/billing/_credit_grant_create_params.py index aade53e43..2161be55c 100644 --- a/stripe/params/billing/_credit_grant_create_params.py +++ b/stripe/params/billing/_credit_grant_create_params.py @@ -91,7 +91,7 @@ class CreditGrantCreateParamsApplicabilityConfigScope(TypedDict): List["CreditGrantCreateParamsApplicabilityConfigScopePrice"] ] """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. + A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. Limit 20 prices. """ diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py index 9c82515b3..3741ed560 100644 --- a/stripe/params/checkout/__init__.py +++ b/stripe/params/checkout/__init__.py @@ -109,6 +109,7 @@ SessionCreateParamsPaymentMethodOptionsSepaDebit as SessionCreateParamsPaymentMethodOptionsSepaDebit, SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions as SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions, SessionCreateParamsPaymentMethodOptionsSofort as SessionCreateParamsPaymentMethodOptionsSofort, + SessionCreateParamsPaymentMethodOptionsSunbit as SessionCreateParamsPaymentMethodOptionsSunbit, SessionCreateParamsPaymentMethodOptionsSwish as SessionCreateParamsPaymentMethodOptionsSwish, SessionCreateParamsPaymentMethodOptionsTwint as SessionCreateParamsPaymentMethodOptionsTwint, SessionCreateParamsPaymentMethodOptionsUpi as SessionCreateParamsPaymentMethodOptionsUpi, @@ -130,6 +131,7 @@ SessionCreateParamsShippingOptionShippingRateDataFixedAmount as SessionCreateParamsShippingOptionShippingRateDataFixedAmount, SessionCreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions as SessionCreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions, SessionCreateParamsSubscriptionData as SessionCreateParamsSubscriptionData, + SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig as SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig, SessionCreateParamsSubscriptionDataBillingMode as SessionCreateParamsSubscriptionDataBillingMode, SessionCreateParamsSubscriptionDataBillingModeFlexible as SessionCreateParamsSubscriptionDataBillingModeFlexible, SessionCreateParamsSubscriptionDataInvoiceSettings as SessionCreateParamsSubscriptionDataInvoiceSettings, @@ -638,6 +640,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsPaymentMethodOptionsSunbit": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsPaymentMethodOptionsSwish": ( "stripe.params.checkout._session_create_params", False, @@ -722,6 +728,10 @@ "stripe.params.checkout._session_create_params", False, ), + "SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig": ( + "stripe.params.checkout._session_create_params", + False, + ), "SessionCreateParamsSubscriptionDataBillingMode": ( "stripe.params.checkout._session_create_params", False, diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index 8d2f9786c..da04377bd 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -262,8 +262,6 @@ class SessionCreateParams(RequestOptions): You can configure Checkout to collect your customers' business names, individual names, or both. Each name field can be either required or optional. If a [Customer](https://docs.stripe.com/api/customers) is created or provided, the names can be saved to the Customer object as well. - - You can't set this parameter if `ui_mode` is `custom`. """ optional_items: NotRequired[List["SessionCreateParamsOptionalItem"]] """ @@ -1457,6 +1455,10 @@ class SessionCreateParamsPaymentMethodOptions(TypedDict): """ contains details about the Sofort payment method options. """ + sunbit: NotRequired["SessionCreateParamsPaymentMethodOptionsSunbit"] + """ + contains details about the Sunbit payment method options. + """ swish: NotRequired["SessionCreateParamsPaymentMethodOptionsSwish"] """ contains details about the Swish payment method options. @@ -2493,6 +2495,23 @@ class SessionCreateParamsPaymentMethodOptionsSofort(TypedDict): """ +class SessionCreateParamsPaymentMethodOptionsSunbit(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + class SessionCreateParamsPaymentMethodOptionsSwish(TypedDict): reference: NotRequired[str] """ @@ -3085,6 +3104,12 @@ class SessionCreateParamsSubscriptionData(TypedDict): """ A future timestamp to anchor the subscription's billing cycle for new subscriptions. You can't set this parameter if `ui_mode` is `elements`. """ + billing_cycle_anchor_config: NotRequired[ + "SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig" + ] + """ + Configures when the subscription schedule's billing cycle anchors to a specific day of the week or month. + """ billing_mode: NotRequired["SessionCreateParamsSubscriptionDataBillingMode"] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. @@ -3147,6 +3172,29 @@ class SessionCreateParamsSubscriptionData(TypedDict): """ +class SessionCreateParamsSubscriptionDataBillingCycleAnchorConfig(TypedDict): + day_of_month: int + """ + The day of the month the anchor should be. Ranges from 1 to 31. + """ + hour: NotRequired[int] + """ + The hour of the day the anchor should be. Ranges from 0 to 23. + """ + minute: NotRequired[int] + """ + The minute of the hour the anchor should be. Ranges from 0 to 59. + """ + month: NotRequired[int] + """ + The month to start full cycle periods. Ranges from 1 to 12. + """ + second: NotRequired[int] + """ + The second of the minute the anchor should be. Ranges from 0 to 59. + """ + + class SessionCreateParamsSubscriptionDataBillingMode(TypedDict): flexible: NotRequired[ "SessionCreateParamsSubscriptionDataBillingModeFlexible" diff --git a/stripe/params/financial_connections/_session_create_params.py b/stripe/params/financial_connections/_session_create_params.py index a827b236b..7f9130e06 100644 --- a/stripe/params/financial_connections/_session_create_params.py +++ b/stripe/params/financial_connections/_session_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -114,9 +114,9 @@ class SessionCreateParamsHosted(TypedDict): class SessionCreateParamsLimits(TypedDict): - accounts: int + accounts: Union[Literal[""], int] """ - The number of accounts that can be linked in this Session. + The number of accounts that can be linked in this Session. Pass an empty value to allow any number of accounts. """ diff --git a/stripe/params/test_helpers/_confirmation_token_create_params.py b/stripe/params/test_helpers/_confirmation_token_create_params.py index 6d4a488df..77e3dd098 100644 --- a/stripe/params/test_helpers/_confirmation_token_create_params.py +++ b/stripe/params/test_helpers/_confirmation_token_create_params.py @@ -343,7 +343,7 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ sunbit: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSunbit"] """ - If this is a Sunbit PaymentMethod, this hash contains details about the Sunbit payment method. + If this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method. """ swish: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSwish"] """ diff --git a/stripe/params/v2/commerce/product_catalog/_import_create_params.py b/stripe/params/v2/commerce/product_catalog/_import_create_params.py index 8549de060..a84306f92 100644 --- a/stripe/params/v2/commerce/product_catalog/_import_create_params.py +++ b/stripe/params/v2/commerce/product_catalog/_import_create_params.py @@ -6,7 +6,7 @@ class ImportCreateParams(TypedDict): - feed_type: Literal["inventory", "pricing", "product"] + feed_type: Literal["inventory", "pricing", "product", "promotion"] """ The type of catalog data to import. """ diff --git a/stripe/params/v2/commerce/product_catalog/_import_list_params.py b/stripe/params/v2/commerce/product_catalog/_import_list_params.py index fecbc23da..5833fd5e4 100644 --- a/stripe/params/v2/commerce/product_catalog/_import_list_params.py +++ b/stripe/params/v2/commerce/product_catalog/_import_list_params.py @@ -29,7 +29,9 @@ class ImportListParams(TypedDict): 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. """ - feed_type: NotRequired[Literal["inventory", "pricing", "product"]] + feed_type: NotRequired[ + Literal["inventory", "pricing", "product", "promotion"] + ] """ Filter by the type of feed data being imported. """ diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py index d2a12f622..8ce24832e 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -65,6 +65,7 @@ AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments, AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments, AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments as AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments, AccountCreateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments as AccountCreateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments, @@ -82,6 +83,34 @@ AccountCreateParamsConfigurationMerchantStatementDescriptor as AccountCreateParamsConfigurationMerchantStatementDescriptor, AccountCreateParamsConfigurationMerchantSupport as AccountCreateParamsConfigurationMerchantSupport, AccountCreateParamsConfigurationMerchantSupportAddress as AccountCreateParamsConfigurationMerchantSupportAddress, + AccountCreateParamsConfigurationMoneyManager as AccountCreateParamsConfigurationMoneyManager, + AccountCreateParamsConfigurationMoneyManagerCapabilities as AccountCreateParamsConfigurationMoneyManagerCapabilities, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutbound as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutbound, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundAud as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundAud, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd as AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesInboundTransfers as AccountCreateParamsConfigurationMoneyManagerCapabilitiesInboundTransfers, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesInboundTransfersBankAccounts as AccountCreateParamsConfigurationMoneyManagerCapabilitiesInboundTransfersBankAccounts, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPayments as AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPayments, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsBankAccounts as AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsBankAccounts, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsCards as AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsCards, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsFinancialAccounts as AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsFinancialAccounts, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfers as AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfers, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersBankAccounts as AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersBankAccounts, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersFinancialAccounts as AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersFinancialAccounts, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedCredits as AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedCredits, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedCreditsBankAccounts as AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedCreditsBankAccounts, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedDebits as AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedDebits, + AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedDebitsBankAccounts as AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedDebitsBankAccounts, AccountCreateParamsConfigurationRecipient as AccountCreateParamsConfigurationRecipient, AccountCreateParamsConfigurationRecipientCapabilities as AccountCreateParamsConfigurationRecipientCapabilities, AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts as AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts, @@ -90,23 +119,6 @@ AccountCreateParamsConfigurationRecipientCapabilitiesCards as AccountCreateParamsConfigurationRecipientCapabilitiesCards, AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance as AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance, AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers as AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers, - AccountCreateParamsConfigurationStorer as AccountCreateParamsConfigurationStorer, - AccountCreateParamsConfigurationStorerCapabilities as AccountCreateParamsConfigurationStorerCapabilities, - AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddresses as AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddresses, - AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts as AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts, - AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies, - AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur, - AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp, - AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd, - AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfers as AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfers, - AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts as AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts, - AccountCreateParamsConfigurationStorerCapabilitiesOutboundPayments as AccountCreateParamsConfigurationStorerCapabilitiesOutboundPayments, - AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts as AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts, - AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards as AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards, - AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts as AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts, - AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfers as AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfers, - AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts as AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts, - AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts as AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts, AccountCreateParamsDefaults as AccountCreateParamsDefaults, AccountCreateParamsDefaultsProfile as AccountCreateParamsDefaultsProfile, AccountCreateParamsDefaultsResponsibilities as AccountCreateParamsDefaultsResponsibilities, @@ -118,7 +130,7 @@ AccountCreateParamsIdentityAttestationsRepresentativeDeclaration as AccountCreateParamsIdentityAttestationsRepresentativeDeclaration, AccountCreateParamsIdentityAttestationsTermsOfService as AccountCreateParamsIdentityAttestationsTermsOfService, AccountCreateParamsIdentityAttestationsTermsOfServiceAccount as AccountCreateParamsIdentityAttestationsTermsOfServiceAccount, - AccountCreateParamsIdentityAttestationsTermsOfServiceStorer as AccountCreateParamsIdentityAttestationsTermsOfServiceStorer, + AccountCreateParamsIdentityAttestationsTermsOfServiceMoneyManager as AccountCreateParamsIdentityAttestationsTermsOfServiceMoneyManager, AccountCreateParamsIdentityBusinessDetails as AccountCreateParamsIdentityBusinessDetails, AccountCreateParamsIdentityBusinessDetailsAddress as AccountCreateParamsIdentityBusinessDetailsAddress, AccountCreateParamsIdentityBusinessDetailsAnnualRevenue as AccountCreateParamsIdentityBusinessDetailsAnnualRevenue, @@ -191,7 +203,7 @@ AccountTokenCreateParamsIdentityAttestationsRepresentativeDeclaration as AccountTokenCreateParamsIdentityAttestationsRepresentativeDeclaration, AccountTokenCreateParamsIdentityAttestationsTermsOfService as AccountTokenCreateParamsIdentityAttestationsTermsOfService, AccountTokenCreateParamsIdentityAttestationsTermsOfServiceAccount as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceAccount, - AccountTokenCreateParamsIdentityAttestationsTermsOfServiceStorer as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceStorer, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceMoneyManager as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceMoneyManager, AccountTokenCreateParamsIdentityBusinessDetails as AccountTokenCreateParamsIdentityBusinessDetails, AccountTokenCreateParamsIdentityBusinessDetailsAddress as AccountTokenCreateParamsIdentityBusinessDetailsAddress, AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue as AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue, @@ -300,6 +312,7 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments, @@ -317,6 +330,34 @@ AccountUpdateParamsConfigurationMerchantStatementDescriptor as AccountUpdateParamsConfigurationMerchantStatementDescriptor, AccountUpdateParamsConfigurationMerchantSupport as AccountUpdateParamsConfigurationMerchantSupport, AccountUpdateParamsConfigurationMerchantSupportAddress as AccountUpdateParamsConfigurationMerchantSupportAddress, + AccountUpdateParamsConfigurationMoneyManager as AccountUpdateParamsConfigurationMoneyManager, + AccountUpdateParamsConfigurationMoneyManagerCapabilities as AccountUpdateParamsConfigurationMoneyManagerCapabilities, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutbound as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutbound, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundAud as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundAud, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesInboundTransfers as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesInboundTransfers, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesInboundTransfersBankAccounts as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesInboundTransfersBankAccounts, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPayments as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPayments, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsBankAccounts as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsBankAccounts, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsCards as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsCards, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsFinancialAccounts as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsFinancialAccounts, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfers as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfers, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersBankAccounts as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersBankAccounts, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersFinancialAccounts as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersFinancialAccounts, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedCredits as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedCredits, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedCreditsBankAccounts as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedCreditsBankAccounts, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedDebits as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedDebits, + AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedDebitsBankAccounts as AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedDebitsBankAccounts, AccountUpdateParamsConfigurationRecipient as AccountUpdateParamsConfigurationRecipient, AccountUpdateParamsConfigurationRecipientCapabilities as AccountUpdateParamsConfigurationRecipientCapabilities, AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts as AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts, @@ -325,23 +366,6 @@ AccountUpdateParamsConfigurationRecipientCapabilitiesCards as AccountUpdateParamsConfigurationRecipientCapabilitiesCards, AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance as AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance, AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers as AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers, - AccountUpdateParamsConfigurationStorer as AccountUpdateParamsConfigurationStorer, - AccountUpdateParamsConfigurationStorerCapabilities as AccountUpdateParamsConfigurationStorerCapabilities, - AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddresses as AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddresses, - AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts as AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts, - AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies, - AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur, - AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp, - AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd, - AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfers as AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfers, - AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts as AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts, - AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPayments as AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPayments, - AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts as AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts, - AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards as AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards, - AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts as AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts, - AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfers as AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfers, - AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts as AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts, - AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts as AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts, AccountUpdateParamsDefaults as AccountUpdateParamsDefaults, AccountUpdateParamsDefaultsProfile as AccountUpdateParamsDefaultsProfile, AccountUpdateParamsDefaultsResponsibilities as AccountUpdateParamsDefaultsResponsibilities, @@ -353,8 +377,8 @@ AccountUpdateParamsIdentityAttestationsRepresentativeDeclaration as AccountUpdateParamsIdentityAttestationsRepresentativeDeclaration, AccountUpdateParamsIdentityAttestationsTermsOfService as AccountUpdateParamsIdentityAttestationsTermsOfService, AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount as AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount, - AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer as AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer, - AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer as AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer, + AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager as AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager, + AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager as AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager, AccountUpdateParamsIdentityBusinessDetails as AccountUpdateParamsIdentityBusinessDetails, AccountUpdateParamsIdentityBusinessDetailsAddress as AccountUpdateParamsIdentityBusinessDetailsAddress, AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue as AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue, @@ -682,6 +706,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -750,103 +778,147 @@ "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationRecipient": ( + "AccountCreateParamsConfigurationMoneyManager": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationRecipientCapabilities": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilities": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsWire": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationRecipientCapabilitiesCards": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutbound": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundAud": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorer": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilities": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddresses": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesInboundTransfers": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesInboundTransfersBankAccounts": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPayments": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsBankAccounts": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsCards": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsFinancialAccounts": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfers": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfers": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersBankAccounts": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPayments": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersFinancialAccounts": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedCredits": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedCreditsBankAccounts": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedDebits": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfers": ( + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedDebitsBankAccounts": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts": ( + "AccountCreateParamsConfigurationRecipient": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilities": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal": ( "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts": ( + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsWire": ( + "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, + ), + "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers": ( "stripe.params.v2.core._account_create_params", False, ), @@ -894,7 +966,7 @@ "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsIdentityAttestationsTermsOfServiceStorer": ( + "AccountCreateParamsIdentityAttestationsTermsOfServiceMoneyManager": ( "stripe.params.v2.core._account_create_params", False, ), @@ -1151,7 +1223,7 @@ "stripe.params.v2.core._account_token_create_params", False, ), - "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceStorer": ( + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceMoneyManager": ( "stripe.params.v2.core._account_token_create_params", False, ), @@ -1571,6 +1643,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments": ( "stripe.params.v2.core._account_update_params", False, @@ -1639,103 +1715,147 @@ "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationRecipient": ( + "AccountUpdateParamsConfigurationMoneyManager": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationRecipientCapabilities": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilities": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsWire": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationRecipientCapabilitiesCards": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutbound": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundAud": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorer": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilities": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddresses": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesInboundTransfers": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesInboundTransfersBankAccounts": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPayments": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsBankAccounts": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsCards": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsFinancialAccounts": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfers": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfers": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersBankAccounts": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPayments": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersFinancialAccounts": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedCredits": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedCreditsBankAccounts": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedDebits": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfers": ( + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedDebitsBankAccounts": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts": ( + "AccountUpdateParamsConfigurationRecipient": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilities": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts": ( + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsWire": ( + "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, + ), + "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers": ( "stripe.params.v2.core._account_update_params", False, ), @@ -1783,11 +1903,11 @@ "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer": ( + "AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager": ( "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer": ( + "AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager": ( "stripe.params.v2.core._account_update_params", False, ), diff --git a/stripe/params/v2/core/_account_close_params.py b/stripe/params/v2/core/_account_close_params.py index d9c94dae4..572509b0a 100644 --- a/stripe/params/v2/core/_account_close_params.py +++ b/stripe/params/v2/core/_account_close_params.py @@ -6,7 +6,7 @@ class AccountCloseParams(TypedDict): applied_configurations: NotRequired[ - List[Literal["customer", "merchant", "recipient", "storer"]] + List[Literal["customer", "merchant", "recipient", "money_manager"]] ] """ Configurations on the Account to be closed. All configurations on the Account must be passed in for this request to succeed. diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py index 423705d5a..342ad3f96 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -46,7 +46,7 @@ class AccountCreateParams(TypedDict): "configuration.customer", "configuration.merchant", "configuration.recipient", - "configuration.storer", + "configuration.money_manager", "defaults", "future_requirements", "identity", @@ -72,13 +72,13 @@ class AccountCreateParamsConfiguration(TypedDict): """ Enables the Account to act as a connected account and collect payments facilitated by a Connect platform. You must onboard your platform to Connect before you can add this configuration to your connected accounts. Utilize this configuration when the Account will be the Merchant of Record, like with Direct charges or Destination Charges with on_behalf_of set. """ - recipient: NotRequired["AccountCreateParamsConfigurationRecipient"] + money_manager: NotRequired["AccountCreateParamsConfigurationMoneyManager"] """ - The Recipient Configuration allows the Account to receive funds. Utilize this configuration if the Account will not be the Merchant of Record, like with Separate Charges & Transfers, or Destination Charges without on_behalf_of set. + The Money Manager Configuration allows the Account to store and move funds using FinancialAccounts. """ - storer: NotRequired["AccountCreateParamsConfigurationStorer"] + recipient: NotRequired["AccountCreateParamsConfigurationRecipient"] """ - The Storer Configuration allows the Account to store and move funds using stored-value FinancialAccounts. + The Recipient Configuration allows the Account to receive funds. Utilize this configuration if the Account will not be the Merchant of Record, like with Separate Charges & Transfers, or Destination Charges without on_behalf_of set. """ @@ -583,6 +583,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process SEPA Direct Debit payments. """ + sunbit_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments" + ] + """ + Allow the merchant to process Sunbit payments. + """ swish_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments" ] @@ -969,6 +975,15 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments( """ +class AccountCreateParamsConfigurationMerchantCapabilitiesSunbitPayments( + 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 AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments( TypedDict, ): @@ -1190,63 +1205,107 @@ class AccountCreateParamsConfigurationMerchantSupportAddress(TypedDict): """ -class AccountCreateParamsConfigurationRecipient(TypedDict): +class AccountCreateParamsConfigurationMoneyManager(TypedDict): capabilities: NotRequired[ - "AccountCreateParamsConfigurationRecipientCapabilities" + "AccountCreateParamsConfigurationMoneyManagerCapabilities" ] """ - Capabilities to be requested on the Recipient Configuration. + Capabilities to request on the Money Manager Configuration. """ -class AccountCreateParamsConfigurationRecipientCapabilities(TypedDict): - bank_accounts: NotRequired[ - "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts" +class AccountCreateParamsConfigurationMoneyManagerCapabilities(TypedDict): + business_storage: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage" ] """ - Capabilities that enable OutboundPayments to a bank account linked to this Account. + Can send or receive business storage-type funds on Stripe. """ - cards: NotRequired[ - "AccountCreateParamsConfigurationRecipientCapabilitiesCards" + inbound_transfers: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesInboundTransfers" ] """ - Capabilities that enable OutboundPayments to a card linked to this Account. + Can pull funds from an external source, owned by yourself, to a FinancialAccount. """ - stripe_balance: NotRequired[ - "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance" + outbound_payments: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPayments" ] """ - Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). + Can send funds from a FinancialAccount to a destination owned by someone else. + """ + outbound_transfers: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfers" + ] + """ + Can send funds from a FinancialAccount to a destination owned by yourself. + """ + received_credits: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedCredits" + ] + """ + Can receive funds into a FinancialAccount. + """ + received_debits: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedDebits" + ] + """ + Can receive debits to a FinancialAccount. """ -class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage( TypedDict, ): - local: NotRequired[ - "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal" + inbound: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound" ] """ - Enables this Account to receive OutboundPayments to linked bank accounts over local networks. + Can receive business storage-type funds on Stripe. """ - wire: NotRequired[ - "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsWire" + outbound: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutbound" ] """ - Enables this Account to receive OutboundPayments to linked bank accounts over wire. + Can send business storage-type funds on Stripe. """ -class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound( TypedDict, ): - requested: bool + aud: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud" + ] """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + Can receive business storage-type funds on Stripe in AUD. + """ + cad: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad" + ] + """ + Can receive business storage-type funds on Stripe in CAD. + """ + eur: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur" + ] + """ + Can receive business storage-type funds on Stripe in EUR. + """ + gbp: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp" + ] + """ + Can receive business storage-type funds on Stripe in GBP. + """ + usd: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd" + ] + """ + Can receive business storage-type funds on Stripe in USD. """ -class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsWire( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud( TypedDict, ): requested: bool @@ -1255,25 +1314,25 @@ class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsWire( """ -class AccountCreateParamsConfigurationRecipientCapabilitiesCards(TypedDict): +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad( + 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( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur( TypedDict, ): - stripe_transfers: NotRequired[ - "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers" - ] + requested: bool """ - Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. """ -class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp( TypedDict, ): requested: bool @@ -1282,60 +1341,51 @@ class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTr """ -class AccountCreateParamsConfigurationStorer(TypedDict): - capabilities: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilities" - ] +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd( + TypedDict, +): + requested: bool """ - Capabilities to request on the Storer Configuration. + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. """ -class AccountCreateParamsConfigurationStorerCapabilities(TypedDict): - financial_addresses: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddresses" +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutbound( + TypedDict, +): + aud: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundAud" ] """ - Can provision a financial address to credit/debit a FinancialAccount. + Can send business storage-type funds on Stripe in AUD. """ - holds_currencies: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies" + cad: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad" ] """ - Can hold storage-type funds on Stripe. - """ - inbound_transfers: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfers" - ] + Can send business storage-type funds on Stripe in CAD. """ - Can pull funds from an external source, owned by yourself, to a FinancialAccount. - """ - outbound_payments: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPayments" + eur: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur" ] """ - Can send funds from a FinancialAccount to a destination owned by someone else. + Can send business storage-type funds on Stripe in EUR. """ - outbound_transfers: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfers" + gbp: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp" ] """ - Can send funds from a FinancialAccount to a destination owned by yourself. + Can send business storage-type funds on Stripe in GBP. """ - - -class AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddresses( - TypedDict, -): - bank_accounts: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts" + usd: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd" ] """ - Can provision a bank-account-like financial address (VBAN) to credit/debit a FinancialAccount. + Can send business storage-type funds on Stripe in USD. """ -class AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundAud( TypedDict, ): requested: bool @@ -1344,30 +1394,16 @@ class AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAc """ -class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad( TypedDict, ): - eur: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur" - ] - """ - Can hold storage-type funds on Stripe in EUR. - """ - gbp: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp" - ] - """ - Can hold storage-type funds on Stripe in GBP. - """ - usd: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd" - ] + requested: bool """ - Can hold storage-type funds on Stripe in USD. + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. """ -class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur( TypedDict, ): requested: bool @@ -1376,7 +1412,7 @@ class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur( """ -class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp( TypedDict, ): requested: bool @@ -1385,7 +1421,7 @@ class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( """ -class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd( TypedDict, ): requested: bool @@ -1394,18 +1430,18 @@ class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd( """ -class AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfers( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesInboundTransfers( TypedDict, ): bank_accounts: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts" + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesInboundTransfersBankAccounts" ] """ Can pull funds from an external bank account owned by yourself to a FinancialAccount. """ -class AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesInboundTransfersBankAccounts( TypedDict, ): requested: bool @@ -1414,30 +1450,30 @@ class AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAcco """ -class AccountCreateParamsConfigurationStorerCapabilitiesOutboundPayments( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPayments( TypedDict, ): bank_accounts: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts" + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsBankAccounts" ] """ Can send funds from a FinancialAccount to a bank account owned by someone else. """ cards: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards" + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsCards" ] """ Can send funds from a FinancialAccount to a debit card owned by someone else. """ financial_accounts: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts" + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsFinancialAccounts" ] """ Can send funds from a FinancialAccount to another FinancialAccount owned by someone else. """ -class AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsBankAccounts( TypedDict, ): requested: bool @@ -1446,7 +1482,7 @@ class AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAcco """ -class AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsCards( TypedDict, ): requested: bool @@ -1455,7 +1491,7 @@ class AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards( """ -class AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsFinancialAccounts( TypedDict, ): requested: bool @@ -1464,24 +1500,129 @@ class AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancia """ -class AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfers( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfers( TypedDict, ): bank_accounts: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts" + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersBankAccounts" ] """ Can send funds from a FinancialAccount to a bank account owned by yourself. """ financial_accounts: NotRequired[ - "AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts" + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersFinancialAccounts" ] """ Can send funds from a FinancialAccount to another FinancialAccount owned by yourself. """ -class AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts( +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersBankAccounts( + 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 AccountCreateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersFinancialAccounts( + 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 AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedCredits( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedCreditsBankAccounts" + ] + """ + Can receive funds on a bank-account-like financial address (VBAN) to credit a FinancialAccount. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedCreditsBankAccounts( + 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 AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedDebits( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedDebitsBankAccounts" + ] + """ + Can receive debits to a FinancialAccount from a bank account. + """ + + +class AccountCreateParamsConfigurationMoneyManagerCapabilitiesReceivedDebitsBankAccounts( + 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 AccountCreateParamsConfigurationRecipient(TypedDict): + capabilities: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilities" + ] + """ + Capabilities to be requested on the Recipient Configuration. + """ + + +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" + ] + """ + Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts( + TypedDict, +): + local: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over local networks. + """ + wire: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsWire" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over wire. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal( TypedDict, ): requested: bool @@ -1490,7 +1631,34 @@ class AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAcc """ -class AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts( +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsWire( + 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, +): + stripe_transfers: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers" + ] + """ + Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers( TypedDict, ): requested: bool @@ -1779,8 +1947,8 @@ class AccountCreateParamsIdentityAttestationsTermsOfService(TypedDict): """ Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). """ - storer: NotRequired[ - "AccountCreateParamsIdentityAttestationsTermsOfServiceStorer" + money_manager: NotRequired[ + "AccountCreateParamsIdentityAttestationsTermsOfServiceMoneyManager" ] """ Details on the Account's acceptance of Treasury-specific terms of service. @@ -1802,7 +1970,9 @@ class AccountCreateParamsIdentityAttestationsTermsOfServiceAccount(TypedDict): """ -class AccountCreateParamsIdentityAttestationsTermsOfServiceStorer(TypedDict): +class AccountCreateParamsIdentityAttestationsTermsOfServiceMoneyManager( + TypedDict, +): date: str """ The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. diff --git a/stripe/params/v2/core/_account_link_create_params.py b/stripe/params/v2/core/_account_link_create_params.py index 88569189d..5ebc5bd16 100644 --- a/stripe/params/v2/core/_account_link_create_params.py +++ b/stripe/params/v2/core/_account_link_create_params.py @@ -40,7 +40,7 @@ class AccountLinkCreateParamsUseCaseAccountOnboarding(TypedDict): Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ configurations: List[ - Literal["customer", "merchant", "recipient", "storer"] + Literal["customer", "merchant", "money_manager", "recipient", "storer"] ] """ Open Enum. A v2/core/account can be configured to enable certain functionality. The configuration param targets the v2/core/account_link to collect information for the specified v2/core/account configuration/s. @@ -76,7 +76,7 @@ class AccountLinkCreateParamsUseCaseAccountUpdate(TypedDict): Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ configurations: List[ - Literal["customer", "merchant", "recipient", "storer"] + Literal["customer", "merchant", "money_manager", "recipient", "storer"] ] """ Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. diff --git a/stripe/params/v2/core/_account_list_params.py b/stripe/params/v2/core/_account_list_params.py index c09a1326b..371e7a0e8 100644 --- a/stripe/params/v2/core/_account_list_params.py +++ b/stripe/params/v2/core/_account_list_params.py @@ -6,7 +6,7 @@ class AccountListParams(TypedDict): applied_configurations: NotRequired[ - List[Literal["customer", "merchant", "recipient", "storer"]] + List[Literal["customer", "merchant", "recipient", "money_manager"]] ] """ Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have. diff --git a/stripe/params/v2/core/_account_retrieve_params.py b/stripe/params/v2/core/_account_retrieve_params.py index 69080103a..786216c28 100644 --- a/stripe/params/v2/core/_account_retrieve_params.py +++ b/stripe/params/v2/core/_account_retrieve_params.py @@ -11,7 +11,7 @@ class AccountRetrieveParams(TypedDict): "configuration.customer", "configuration.merchant", "configuration.recipient", - "configuration.storer", + "configuration.money_manager", "defaults", "future_requirements", "identity", diff --git a/stripe/params/v2/core/_account_token_create_params.py b/stripe/params/v2/core/_account_token_create_params.py index 08417d922..c1f8b6767 100644 --- a/stripe/params/v2/core/_account_token_create_params.py +++ b/stripe/params/v2/core/_account_token_create_params.py @@ -140,8 +140,8 @@ class AccountTokenCreateParamsIdentityAttestationsTermsOfService(TypedDict): """ Details on the Account's acceptance of the [Stripe Services Agreement]; IP, date, and User Agent are expanded by Stripe. """ - storer: NotRequired[ - "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceStorer" + money_manager: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceMoneyManager" ] """ Details on the Account's acceptance of Treasury-specific terms of service; IP, date, and User Agent are expanded by Stripe. @@ -157,7 +157,7 @@ class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceAccount( """ -class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceStorer( +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceMoneyManager( TypedDict, ): shown_and_accepted: NotRequired[bool] diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index df6fc991c..59c4a01d9 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -46,7 +46,7 @@ class AccountUpdateParams(TypedDict): "configuration.customer", "configuration.merchant", "configuration.recipient", - "configuration.storer", + "configuration.money_manager", "defaults", "future_requirements", "identity", @@ -74,13 +74,13 @@ class AccountUpdateParamsConfiguration(TypedDict): """ Enables the Account to act as a connected account and collect payments facilitated by a Connect platform. You must onboard your platform to Connect before you can add this configuration to your connected accounts. Utilize this configuration when the Account will be the Merchant of Record, like with Direct charges or Destination Charges with on_behalf_of set. """ - recipient: NotRequired["AccountUpdateParamsConfigurationRecipient"] + money_manager: NotRequired["AccountUpdateParamsConfigurationMoneyManager"] """ - The Recipient Configuration allows the Account to receive funds. Utilize this configuration if the Account will not be the Merchant of Record, like with Separate Charges & Transfers, or Destination Charges without on_behalf_of set. + The Money Manager Configuration allows the Account to store and move funds using FinancialAccounts. """ - storer: NotRequired["AccountUpdateParamsConfigurationStorer"] + recipient: NotRequired["AccountUpdateParamsConfigurationRecipient"] """ - The Storer Configuration allows the Account to store and move funds using stored-value FinancialAccounts. + The Recipient Configuration allows the Account to receive funds. Utilize this configuration if the Account will not be the Merchant of Record, like with Separate Charges & Transfers, or Destination Charges without on_behalf_of set. """ @@ -601,6 +601,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process SEPA Direct Debit payments. """ + sunbit_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments" + ] + """ + Allow the merchant to process Sunbit payments. + """ swish_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments" ] @@ -987,6 +993,15 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments( """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesSunbitPayments( + 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 AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments( TypedDict, ): @@ -1208,71 +1223,111 @@ class AccountUpdateParamsConfigurationMerchantSupportAddress(TypedDict): """ -class AccountUpdateParamsConfigurationRecipient(TypedDict): +class AccountUpdateParamsConfigurationMoneyManager(TypedDict): applied: NotRequired[bool] """ Represents the state of the configuration, and can be updated to deactivate or re-apply a configuration. """ capabilities: NotRequired[ - "AccountUpdateParamsConfigurationRecipientCapabilities" + "AccountUpdateParamsConfigurationMoneyManagerCapabilities" ] """ - Capabilities to request on the Recipient Configuration. - """ - default_outbound_destination: NotRequired[str] - """ - The payout method id to be used as a default outbound destination. This will allow the PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via dashboard. Can also be explicitly set to `null` to clear the existing default outbound destination. For further details about creating an Outbound Destination, see [Collect recipient's payment details](https://docs.stripe.com/global-payouts-private-preview/quickstart?dashboard-or-api=api#collect-bank-account-details). + Capabilities to request on the Money Manager Configuration. """ -class AccountUpdateParamsConfigurationRecipientCapabilities(TypedDict): - bank_accounts: NotRequired[ - "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts" +class AccountUpdateParamsConfigurationMoneyManagerCapabilities(TypedDict): + business_storage: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage" ] """ - Capabilities that enable OutboundPayments to a bank account linked to this Account. + Can send or receive business storage-type funds on Stripe. """ - cards: NotRequired[ - "AccountUpdateParamsConfigurationRecipientCapabilitiesCards" + inbound_transfers: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesInboundTransfers" ] """ - Capability that enable OutboundPayments to a debit card linked to this Account. + Can pull funds from an external source, owned by yourself, to a FinancialAccount. """ - stripe_balance: NotRequired[ - "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance" + outbound_payments: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPayments" ] """ - Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). + Can send funds from a FinancialAccount to a destination owned by someone else. + """ + outbound_transfers: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfers" + ] + """ + Can send funds from a FinancialAccount to a destination owned by yourself. + """ + received_credits: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedCredits" + ] + """ + Can receive funds on a financial address to credit a FinancialAccount. + """ + received_debits: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedDebits" + ] + """ + Can receive debits to a FinancialAccount. """ -class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorage( TypedDict, ): - local: NotRequired[ - "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal" + inbound: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound" ] """ - Enables this Account to receive OutboundPayments to linked bank accounts over local networks. + Can receive business storage-type funds on Stripe. """ - wire: NotRequired[ - "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsWire" + outbound: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutbound" ] """ - Enables this Account to receive OutboundPayments to linked bank accounts over wire. + Can send business storage-type funds on Stripe. """ -class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInbound( TypedDict, ): - requested: NotRequired[bool] + aud: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud" + ] """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + Can receive business storage-type funds on Stripe in AUD. + """ + cad: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad" + ] + """ + Can receive business storage-type funds on Stripe in CAD. + """ + eur: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur" + ] + """ + Can receive business storage-type funds on Stripe in EUR. + """ + gbp: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp" + ] + """ + Can receive business storage-type funds on Stripe in GBP. + """ + usd: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd" + ] + """ + Can receive business storage-type funds on Stripe in USD. """ -class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsWire( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundAud( TypedDict, ): requested: NotRequired[bool] @@ -1281,25 +1336,25 @@ class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsWire( """ -class AccountUpdateParamsConfigurationRecipientCapabilitiesCards(TypedDict): +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundCad( + 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( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundEur( TypedDict, ): - stripe_transfers: NotRequired[ - "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers" - ] + requested: NotRequired[bool] """ - Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. """ -class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundGbp( TypedDict, ): requested: NotRequired[bool] @@ -1308,64 +1363,51 @@ class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTr """ -class AccountUpdateParamsConfigurationStorer(TypedDict): - applied: NotRequired[bool] - """ - Represents the state of the configuration, and can be updated to deactivate or re-apply a configuration. - """ - capabilities: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilities" - ] +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageInboundUsd( + TypedDict, +): + requested: NotRequired[bool] """ - Capabilities to request on the Storer Configuration. + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. """ -class AccountUpdateParamsConfigurationStorerCapabilities(TypedDict): - financial_addresses: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddresses" - ] - """ - Can provision a financial address to credit/debit a FinancialAccount. - """ - holds_currencies: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies" +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutbound( + TypedDict, +): + aud: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundAud" ] """ - Can hold storage-type funds on Stripe. + Can send business storage-type funds on Stripe in AUD. """ - inbound_transfers: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfers" + cad: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad" ] """ - Can pull funds from an external source, owned by yourself, to a FinancialAccount. + Can send business storage-type funds on Stripe in CAD. """ - outbound_payments: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPayments" + eur: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur" ] """ - Can send funds from a FinancialAccount to a destination owned by someone else. + Can send business storage-type funds on Stripe in EUR. """ - outbound_transfers: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfers" + gbp: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp" ] """ - Can send funds from a FinancialAccount to a destination owned by yourself. + Can send business storage-type funds on Stripe in GBP. """ - - -class AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddresses( - TypedDict, -): - bank_accounts: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts" + usd: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd" ] """ - Can provision a bank-account-like financial address (VBAN) to credit/debit a FinancialAccount. + Can send business storage-type funds on Stripe in USD. """ -class AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundAud( TypedDict, ): requested: NotRequired[bool] @@ -1374,30 +1416,16 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAc """ -class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundCad( TypedDict, ): - eur: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur" - ] - """ - Can hold storage-type funds on Stripe in EUR. - """ - gbp: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp" - ] - """ - Can hold storage-type funds on Stripe in GBP. - """ - usd: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd" - ] + requested: NotRequired[bool] """ - Can hold storage-type funds on Stripe in USD. + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. """ -class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundEur( TypedDict, ): requested: NotRequired[bool] @@ -1406,7 +1434,7 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur( """ -class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundGbp( TypedDict, ): requested: NotRequired[bool] @@ -1415,7 +1443,7 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( """ -class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesBusinessStorageOutboundUsd( TypedDict, ): requested: NotRequired[bool] @@ -1424,18 +1452,18 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd( """ -class AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfers( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesInboundTransfers( TypedDict, ): bank_accounts: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts" + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesInboundTransfersBankAccounts" ] """ Can pull funds from an external bank account owned by yourself to a FinancialAccount. """ -class AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesInboundTransfersBankAccounts( TypedDict, ): requested: NotRequired[bool] @@ -1444,30 +1472,30 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAcco """ -class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPayments( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPayments( TypedDict, ): bank_accounts: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts" + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsBankAccounts" ] """ Can send funds from a FinancialAccount to a bank account owned by someone else. """ cards: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards" + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsCards" ] """ Can send funds from a FinancialAccount to a debit card owned by someone else. """ financial_accounts: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts" + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsFinancialAccounts" ] """ Can send funds from a FinancialAccount to another FinancialAccount owned by someone else. """ -class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsBankAccounts( TypedDict, ): requested: NotRequired[bool] @@ -1476,7 +1504,7 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAcco """ -class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsCards( TypedDict, ): requested: NotRequired[bool] @@ -1485,7 +1513,7 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards( """ -class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundPaymentsFinancialAccounts( TypedDict, ): requested: NotRequired[bool] @@ -1494,33 +1522,173 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancia """ -class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfers( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfers( TypedDict, ): bank_accounts: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts" + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersBankAccounts" ] """ Can send funds from a FinancialAccount to a bank account owned by yourself. """ financial_accounts: NotRequired[ - "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts" + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersFinancialAccounts" ] """ Can send funds from a FinancialAccount to another FinancialAccount owned by yourself. """ -class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts( +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersBankAccounts( + 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 AccountUpdateParamsConfigurationMoneyManagerCapabilitiesOutboundTransfersFinancialAccounts( + 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 AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedCredits( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedCreditsBankAccounts" + ] + """ + Can receive funds on a bank-account-like financial address (VBAN) to credit a FinancialAccount. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedCreditsBankAccounts( + 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 AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedDebits( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedDebitsBankAccounts" + ] + """ + Can receive debits to a FinancialAccount from a bank account. + """ + + +class AccountUpdateParamsConfigurationMoneyManagerCapabilitiesReceivedDebitsBankAccounts( + 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 AccountUpdateParamsConfigurationRecipient(TypedDict): + applied: NotRequired[bool] + """ + Represents the state of the configuration, and can be updated to deactivate or re-apply a configuration. + """ + capabilities: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilities" + ] + """ + Capabilities to request on the Recipient Configuration. + """ + default_outbound_destination: NotRequired[str] + """ + The payout method id to be used as a default outbound destination. This will allow the PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via dashboard. Can also be explicitly set to `null` to clear the existing default outbound destination. For further details about creating an Outbound Destination, see [Collect recipient's payment details](https://docs.stripe.com/global-payouts-private-preview/quickstart?dashboard-or-api=api#collect-bank-account-details). + """ + + +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" + ] + """ + Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts( TypedDict, ): + local: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over local networks. + """ + wire: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsWire" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over wire. + """ + + +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 AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsWire( + 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 AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts( +class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance( + TypedDict, +): + stripe_transfers: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers" + ] + """ + Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers( TypedDict, ): requested: NotRequired[bool] @@ -1809,14 +1977,14 @@ class AccountUpdateParamsIdentityAttestationsTermsOfService(TypedDict): """ Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). """ - crypto_storer: NotRequired[ - "AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer" + crypto_money_manager: NotRequired[ + "AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager" ] """ - Details on the Account's acceptance of Crypto-storer-specific terms of service. + Details on the Account's acceptance of Crypto-specific terms of service. """ - storer: NotRequired[ - "AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer" + money_manager: NotRequired[ + "AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager" ] """ Details on the Account's acceptance of Treasury-specific terms of service. @@ -1838,7 +2006,7 @@ class AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount(TypedDict): """ -class AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer( +class AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoMoneyManager( TypedDict, ): date: NotRequired[str] @@ -1855,7 +2023,9 @@ class AccountUpdateParamsIdentityAttestationsTermsOfServiceCryptoStorer( """ -class AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer(TypedDict): +class AccountUpdateParamsIdentityAttestationsTermsOfServiceMoneyManager( + TypedDict, +): date: NotRequired[str] """ The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. diff --git a/stripe/params/v2/core/_batch_job_create_params.py b/stripe/params/v2/core/_batch_job_create_params.py index 98cdefc57..69a84dd5a 100644 --- a/stripe/params/v2/core/_batch_job_create_params.py +++ b/stripe/params/v2/core/_batch_job_create_params.py @@ -10,12 +10,7 @@ class BatchJobCreateParams(TypedDict): """ The endpoint configuration for the batch job. """ - maximum_rps: NotRequired[int] - """ - Optional field that allows the user to control how fast they want this batch job to run. - Gives them a control over the number of webhooks they receive. - """ - metadata: "Dict[str, str]|UntypedStripeObject[str]" + metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"] """ The metadata of the `batch_job`. """ diff --git a/stripe/params/v2/money_management/_financial_account_list_params.py b/stripe/params/v2/money_management/_financial_account_list_params.py index 95949bc87..0048fea1e 100644 --- a/stripe/params/v2/money_management/_financial_account_list_params.py +++ b/stripe/params/v2/money_management/_financial_account_list_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from typing import List from typing_extensions import Literal, NotRequired, TypedDict @@ -8,7 +9,7 @@ class FinancialAccountListParams(TypedDict): """ The page limit. """ - status: NotRequired[Literal["closed", "open", "pending"]] + statuses: NotRequired[List[Literal["closed", "open", "pending"]]] """ - The status of the FinancialAccount to filter by. By default, closed FinancialAccounts are not returned. + Filter for FinancialAccount `status`. By default, closed FinancialAccounts are not returned. """ diff --git a/stripe/radar/_value_list_item.py b/stripe/radar/_value_list_item.py index b9010a26c..4821c9740 100644 --- a/stripe/radar/_value_list_item.py +++ b/stripe/radar/_value_list_item.py @@ -4,6 +4,7 @@ from stripe._deletable_api_resource import DeletableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource +from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Optional, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING @@ -37,6 +38,13 @@ class ValueListItem( OBJECT_NAME: ClassVar[Literal["radar.value_list_item"]] = ( "radar.value_list_item" ) + + class Redaction(StripeObject): + status: Literal["processing", "redacted", "validated"] + """ + Indicates whether this object and its related objects have been redacted or not. + """ + created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -61,6 +69,10 @@ class ValueListItem( """ String representing the object's type. Objects of the same type share the same value. """ + redaction: Optional[Redaction] + """ + Redaction status of this item. If not null, this item is associated to a redaction job. + """ value: str """ The value of the item. @@ -261,3 +273,5 @@ async def retrieve_async( instance = cls(id, **params) await instance.refresh_async() return instance + + _inner_class_types = {"redaction": Redaction} diff --git a/stripe/reserve/_hold.py b/stripe/reserve/_hold.py index 40e2ab1bc..eab3c0731 100644 --- a/stripe/reserve/_hold.py +++ b/stripe/reserve/_hold.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional +from typing import ClassVar, List, Optional from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -21,6 +21,16 @@ class Hold(ListableAPIResource["Hold"]): OBJECT_NAME: ClassVar[Literal["reserve.hold"]] = "reserve.hold" + class ReleaseDetail(StripeObject): + amount: int + """ + The amount released by the ReserveRelease from this ReserveHold. A positive integer representing how much is released in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + """ + reserve_release: str + """ + The ReserveRelease which released funds from this ReserveHold (e.g., resrel_123). + """ + class ReleaseSchedule(StripeObject): release_after: Optional[int] """ @@ -75,6 +85,10 @@ class ReleaseSchedule(StripeObject): """ The reason for the ReserveHold. """ + release_details: Optional[List[ReleaseDetail]] + """ + List of ReserveReleases and the amounts released from this ReserveHold. + """ release_schedule: ReleaseSchedule reserve_plan: Optional[ExpandableField["Plan"]] """ @@ -149,4 +163,7 @@ async def retrieve_async( await instance.refresh_async() return instance - _inner_class_types = {"release_schedule": ReleaseSchedule} + _inner_class_types = { + "release_details": ReleaseDetail, + "release_schedule": ReleaseSchedule, + } diff --git a/stripe/shared_payment/_granted_token.py b/stripe/shared_payment/_granted_token.py index 77adb8ae5..8a22727c1 100644 --- a/stripe/shared_payment/_granted_token.py +++ b/stripe/shared_payment/_granted_token.py @@ -164,10 +164,16 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class Bizum(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique identifier for the buyer as determined by the local payment processor. + """ class Blik(StripeObject): - pass + buyer_id: Optional[str] + """ + A unique and immutable identifier assigned by BLIK to every buyer. + """ class Boleto(StripeObject): tax_id: str @@ -1014,7 +1020,10 @@ class Payto(StripeObject): """ class Pix(StripeObject): - pass + fingerprint: Optional[str] + """ + Uniquely identifies this particular Pix account. You can use this attribute to check whether two Pix accounts are the same. + """ class Promptpay(StripeObject): pass diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 7867ebaaa..37ee9ca21 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -103,6 +103,7 @@ class ApiError(StripeObject): "alipay_upgrade_required", "amount_too_large", "amount_too_small", + "anomalous_money_movement_request", "api_key_expired", "application_fees_not_allowed", "approval_required", @@ -142,6 +143,10 @@ class ApiError(StripeObject): "debit_not_authorized", "email_invalid", "expired_card", + "failed_tax_calculation", + "financial_account_balance_does_not_support_currency", + "financial_account_capability_not_enabled", + "financial_account_capability_restricted", "financial_connections_account_inactive", "financial_connections_account_pending_account_numbers", "financial_connections_account_unavailable_account_numbers", diff --git a/stripe/v2/commerce/_product_catalog_import.py b/stripe/v2/commerce/_product_catalog_import.py index 3e48b840e..3f4229c32 100644 --- a/stripe/v2/commerce/_product_catalog_import.py +++ b/stripe/v2/commerce/_product_catalog_import.py @@ -167,7 +167,7 @@ class Sample(StripeObject): """ The time this ProductCatalogImport was created. """ - feed_type: Literal["inventory", "pricing", "product"] + feed_type: Literal["inventory", "pricing", "product", "promotion"] """ The type of feed data being imported into the product catalog. """ @@ -183,6 +183,10 @@ class Sample(StripeObject): """ Additional information about the object in a structured format. """ + mode: Literal["replace", "upsert"] + """ + The import strategy for handling existing catalog data. + """ object: Literal["v2.commerce.product_catalog_import"] """ String representing the object's type. Objects of the same type share the same value of the object field. diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index 16d793aa6..05c79d0c0 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -1618,6 +1618,39 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"payouts": Payouts} + class SunbitPayments(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", "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 SwishPayments(StripeObject): class StatusDetail(StripeObject): code: Literal[ @@ -1914,6 +1947,10 @@ class StatusDetail(StripeObject): """ Capabilities that enable the merchant to manage their Stripe Balance (/v1/balance). """ + sunbit_payments: Optional[SunbitPayments] + """ + Allow the merchant to process Sunbit payments. + """ swish_payments: Optional[SwishPayments] """ Allow the merchant to process Swish payments. @@ -1972,6 +2009,7 @@ class StatusDetail(StripeObject): "sepa_bank_transfer_payments": SepaBankTransferPayments, "sepa_debit_payments": SepaDebitPayments, "stripe_balance": StripeBalance, + "sunbit_payments": SunbitPayments, "swish_payments": SwishPayments, "twint_payments": TwintPayments, "us_bank_transfer_payments": UsBankTransferPayments, @@ -2201,10 +2239,482 @@ class Address(StripeObject): "support": Support, } - class Recipient(StripeObject): + class MoneyManager(StripeObject): class Capabilities(StripeObject): - class BankAccounts(StripeObject): - class Local(StripeObject): + class BusinessStorage(StripeObject): + class Inbound(StripeObject): + class Aud(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", + "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 Cad(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", + "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 Eur(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", + "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 Gbp(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", + "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 Usd(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", + "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, + } + + aud: Optional[Aud] + """ + Can receive business storage-type funds on Stripe in AUD. + """ + cad: Optional[Cad] + """ + Can receive business storage-type funds on Stripe in CAD. + """ + eur: Optional[Eur] + """ + Can receive business storage-type funds on Stripe in EUR. + """ + gbp: Optional[Gbp] + """ + Can receive business storage-type funds on Stripe in GBP. + """ + usd: Optional[Usd] + """ + Can receive business storage-type funds on Stripe in USD. + """ + _inner_class_types = { + "aud": Aud, + "cad": Cad, + "eur": Eur, + "gbp": Gbp, + "usd": Usd, + } + + class Outbound(StripeObject): + class Aud(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", + "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 Cad(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", + "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 Eur(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", + "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 Gbp(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", + "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 Usd(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", + "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, + } + + aud: Optional[Aud] + """ + Can send business storage-type funds on Stripe in AUD. + """ + cad: Optional[Cad] + """ + Can send business storage-type funds on Stripe in CAD. + """ + eur: Optional[Eur] + """ + Can send business storage-type funds on Stripe in EUR. + """ + gbp: Optional[Gbp] + """ + Can send business storage-type funds on Stripe in GBP. + """ + usd: Optional[Usd] + """ + Can send business storage-type funds on Stripe in USD. + """ + _inner_class_types = { + "aud": Aud, + "cad": Cad, + "eur": Eur, + "gbp": Gbp, + "usd": Usd, + } + + inbound: Optional[Inbound] + """ + Can receive business storage-type funds on Stripe. + """ + outbound: Optional[Outbound] + """ + Can send business storage-type funds on Stripe. + """ + _inner_class_types = { + "inbound": Inbound, + "outbound": Outbound, + } + + class InboundTransfers(StripeObject): + class BankAccounts(StripeObject): class StatusDetail(StripeObject): code: Literal[ "determining_status", @@ -2239,7 +2749,14 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"status_details": StatusDetail} - class Wire(StripeObject): + bank_accounts: Optional[BankAccounts] + """ + Can pull funds into a FinancialAccount from an external bank account owned by the user. + """ + _inner_class_types = {"bank_accounts": BankAccounts} + + class OutboundPayments(StripeObject): + class BankAccounts(StripeObject): class StatusDetail(StripeObject): code: Literal[ "determining_status", @@ -2274,51 +2791,96 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"status_details": StatusDetail} - local: Optional[Local] - """ - Enables this Account to receive OutboundPayments to linked bank accounts over local networks. - """ - wire: Optional[Wire] - """ - Enables this Account to receive OutboundPayments to linked bank accounts over wire. - """ - _inner_class_types = {"local": Local, "wire": Wire} + class Cards(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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. + """ - class Cards(StripeObject): - class StatusDetail(StripeObject): - code: Literal[ - "determining_status", - "requirements_past_due", - "requirements_pending_verification", - "restricted_other", - "unsupported_business", - "unsupported_country", - "unsupported_entity_type", + status: Literal[ + "active", "pending", "restricted", "unsupported" ] """ - Machine-readable code explaining the reason for the Capability to be in its current status. + The status of the Capability. """ - resolution: Literal[ - "contact_stripe", "no_resolution", "provide_info" + 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 FinancialAccounts(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", "restricted", "unsupported" ] """ - Machine-readable code explaining how to make the Capability active. + 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} - status: Literal[ - "active", "pending", "restricted", "unsupported" - ] + bank_accounts: Optional[BankAccounts] """ - The status of the Capability. + Can send funds from a FinancialAccount to a bank account owned by a different entity. """ - status_details: List[StatusDetail] + cards: Optional[Cards] """ - Additional details about the capability's status. This value is empty when `status` is `active`. + Can send funds from a FinancialAccount to a debit card owned by a different entity. """ - _inner_class_types = {"status_details": StatusDetail} + financial_accounts: Optional[FinancialAccounts] + """ + Can send funds from a FinancialAccount to a FinancialAccount owned by a different entity. + """ + _inner_class_types = { + "bank_accounts": BankAccounts, + "cards": Cards, + "financial_accounts": FinancialAccounts, + } - class StripeBalance(StripeObject): - class Payouts(StripeObject): + class OutboundTransfers(StripeObject): + class BankAccounts(StripeObject): class StatusDetail(StripeObject): code: Literal[ "determining_status", @@ -2353,7 +2915,7 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"status_details": StatusDetail} - class StripeTransfers(StripeObject): + class FinancialAccounts(StripeObject): class StatusDetail(StripeObject): code: Literal[ "determining_status", @@ -2388,194 +2950,20 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"status_details": StatusDetail} - payouts: Optional[Payouts] + bank_accounts: Optional[BankAccounts] """ - Enables this Account to complete payouts from their Stripe Balance (/v1/balance). + Can send funds from a FinancialAccount to a bank account belonging to the same user. """ - stripe_transfers: Optional[StripeTransfers] + financial_accounts: Optional[FinancialAccounts] """ - Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). + Can send funds from a FinancialAccount to another FinancialAccount belonging to the same user. """ _inner_class_types = { - "payouts": Payouts, - "stripe_transfers": StripeTransfers, + "bank_accounts": BankAccounts, + "financial_accounts": FinancialAccounts, } - 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 = { - "bank_accounts": BankAccounts, - "cards": Cards, - "stripe_balance": StripeBalance, - } - - class DefaultOutboundDestination(StripeObject): - id: str - """ - The payout method ID of the default outbound destination. - """ - type: Literal[ - "ae_bank_account", - "ag_bank_account", - "al_bank_account", - "am_bank_account", - "ao_bank_account", - "ar_bank_account", - "at_bank_account", - "au_bank_account", - "az_bank_account", - "ba_bank_account", - "bd_bank_account", - "be_bank_account", - "bg_bank_account", - "bh_bank_account", - "bj_bank_account", - "bn_bank_account", - "bo_bank_account", - "br_bank_account", - "bs_bank_account", - "bt_bank_account", - "bw_bank_account", - "card", - "ca_bank_account", - "ch_bank_account", - "ci_bank_account", - "cl_bank_account", - "cn_bank_account", - "co_bank_account", - "crypto_wallet", - "cr_bank_account", - "cy_bank_account", - "cz_bank_account", - "de_bank_account", - "dk_bank_account", - "do_bank_account", - "dz_bank_account", - "ec_bank_account", - "ee_bank_account", - "eg_bank_account", - "es_bank_account", - "et_bank_account", - "fi_bank_account", - "fr_bank_account", - "ga_bank_account", - "gb_bank_account", - "gh_bank_account", - "gi_bank_account", - "gm_bank_account", - "gr_bank_account", - "gt_bank_account", - "gy_bank_account", - "hk_bank_account", - "hn_bank_account", - "hr_bank_account", - "hu_bank_account", - "id_bank_account", - "ie_bank_account", - "il_bank_account", - "in_bank_account", - "is_bank_account", - "it_bank_account", - "jm_bank_account", - "jo_bank_account", - "jp_bank_account", - "ke_bank_account", - "kh_bank_account", - "kr_bank_account", - "kw_bank_account", - "kz_bank_account", - "la_bank_account", - "lc_bank_account", - "li_bank_account", - "lk_bank_account", - "lt_bank_account", - "lu_bank_account", - "lv_bank_account", - "ma_bank_account", - "mc_bank_account", - "md_bank_account", - "mg_bank_account", - "mk_bank_account", - "mn_bank_account", - "mo_bank_account", - "mt_bank_account", - "mu_bank_account", - "mx_bank_account", - "my_bank_account", - "mz_bank_account", - "na_bank_account", - "ne_bank_account", - "ng_bank_account", - "ni_bank_account", - "nl_bank_account", - "no_bank_account", - "nz_bank_account", - "om_bank_account", - "pa_bank_account", - "pe_bank_account", - "ph_bank_account", - "pk_bank_account", - "pl_bank_account", - "pt_bank_account", - "py_bank_account", - "qa_bank_account", - "ro_bank_account", - "rs_bank_account", - "rw_bank_account", - "sa_bank_account", - "se_bank_account", - "sg_bank_account", - "si_bank_account", - "sk_bank_account", - "sm_bank_account", - "sn_bank_account", - "sv_bank_account", - "th_bank_account", - "tn_bank_account", - "tr_bank_account", - "tt_bank_account", - "tw_bank_account", - "tz_bank_account", - "us_bank_account", - "uy_bank_account", - "uz_bank_account", - "vn_bank_account", - "za_bank_account", - ] - """ - Closed Enum. The payout method type of the default outbound destination. - """ - - applied: bool - """ - Indicates whether the recipient configuration is active. You can deactivate or reactivate the recipient configuration by updating this property. Deactivating the configuration by setting this value to false unrequest all capabilities within the configuration. It will not delete any of the configuration's other properties. - """ - capabilities: Optional[Capabilities] - """ - Capabilities that have been requested on the Recipient Configuration. - """ - default_outbound_destination: Optional[DefaultOutboundDestination] - """ - The payout method to be used as a default outbound destination. This will allow the PayoutMethod to be omitted on OutboundPayments made through the dashboard or APIs. - """ - _inner_class_types = { - "capabilities": Capabilities, - "default_outbound_destination": DefaultOutboundDestination, - } - - class Storer(StripeObject): - class Capabilities(StripeObject): - class FinancialAddresses(StripeObject): + class ReceivedCredits(StripeObject): class BankAccounts(StripeObject): class StatusDetail(StripeObject): code: Literal[ @@ -2613,131 +3001,11 @@ class StatusDetail(StripeObject): bank_accounts: Optional[BankAccounts] """ - Can provision a bank-account like financial address (VBAN) to credit/debit a FinancialAccount. + Can receive credits to a bank-account like financial address to credit a FinancialAccount. """ _inner_class_types = {"bank_accounts": BankAccounts} - class HoldsCurrencies(StripeObject): - class Eur(StripeObject): - class StatusDetail(StripeObject): - code: Literal[ - "determining_status", - "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", "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 Gbp(StripeObject): - class StatusDetail(StripeObject): - code: Literal[ - "determining_status", - "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", "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 Usd(StripeObject): - class StatusDetail(StripeObject): - code: Literal[ - "determining_status", - "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", "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} - - eur: Optional[Eur] - """ - Can hold storage-type funds on Stripe in EUR. - """ - gbp: Optional[Gbp] - """ - Can hold storage-type funds on Stripe in GBP. - """ - usd: Optional[Usd] - """ - Can hold storage-type funds on Stripe in USD. - """ - _inner_class_types = {"eur": Eur, "gbp": Gbp, "usd": Usd} - - class InboundTransfers(StripeObject): + class ReceivedDebits(StripeObject): class BankAccounts(StripeObject): class StatusDetail(StripeObject): code: Literal[ @@ -2775,47 +3043,57 @@ class StatusDetail(StripeObject): bank_accounts: Optional[BankAccounts] """ - Can pull funds into a FinancialAccount from an external bank account owned by the user. + Can receive debits to a FinancialAccount from a bank account. """ _inner_class_types = {"bank_accounts": BankAccounts} - class OutboundPayments(StripeObject): - class BankAccounts(StripeObject): - class StatusDetail(StripeObject): - code: Literal[ - "determining_status", - "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", "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} + business_storage: Optional[BusinessStorage] + """ + Can send or receive business storage-type funds on Stripe. + """ + inbound_transfers: Optional[InboundTransfers] + """ + Hash containing capabilities related to InboundTransfers. + """ + outbound_payments: Optional[OutboundPayments] + """ + Hash containing capabilities related to [OutboundPayments](https://docs.stripe.com/api/treasury/outbound_payments?api-version=preview). + """ + outbound_transfers: Optional[OutboundTransfers] + """ + Hash containing capabilities related to [OutboundTransfers](https://docs.stripe.com/api/treasury/outbound_transfers?api-version=preview). + """ + received_credits: Optional[ReceivedCredits] + """ + Hash containing capabilities related to ReceivedCredits. + """ + received_debits: Optional[ReceivedDebits] + """ + Hash containing capabilities related to ReceivedDebits. + """ + _inner_class_types = { + "business_storage": BusinessStorage, + "inbound_transfers": InboundTransfers, + "outbound_payments": OutboundPayments, + "outbound_transfers": OutboundTransfers, + "received_credits": ReceivedCredits, + "received_debits": ReceivedDebits, + } - class Cards(StripeObject): + applied: bool + """ + Indicates whether the money manager configuration is active. You cannot deactivate (or reactivate) the money manager configuration by updating this property. + """ + capabilities: Optional[Capabilities] + """ + Capabilities that have been requested on the Money Manager Configuration. + """ + _inner_class_types = {"capabilities": Capabilities} + + class Recipient(StripeObject): + class Capabilities(StripeObject): + class BankAccounts(StripeObject): + class Local(StripeObject): class StatusDetail(StripeObject): code: Literal[ "determining_status", @@ -2850,7 +3128,7 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"status_details": StatusDetail} - class FinancialAccounts(StripeObject): + class Wire(StripeObject): class StatusDetail(StripeObject): code: Literal[ "determining_status", @@ -2885,26 +3163,51 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"status_details": StatusDetail} - bank_accounts: Optional[BankAccounts] + local: Optional[Local] """ - Can send funds from a FinancialAccount to a bank account owned by a different entity. + Enables this Account to receive OutboundPayments to linked bank accounts over local networks. """ - cards: Optional[Cards] + wire: Optional[Wire] """ - Can send funds from a FinancialAccount to a debit card owned by a different entity. + Enables this Account to receive OutboundPayments to linked bank accounts over wire. """ - financial_accounts: Optional[FinancialAccounts] + _inner_class_types = {"local": Local, "wire": Wire} + + class Cards(StripeObject): + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "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", "restricted", "unsupported" + ] """ - Can send funds from a FinancialAccount to a FinancialAccount owned by a different entity. + The status of the Capability. """ - _inner_class_types = { - "bank_accounts": BankAccounts, - "cards": Cards, - "financial_accounts": FinancialAccounts, - } + 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 OutboundTransfers(StripeObject): - class BankAccounts(StripeObject): + class StripeBalance(StripeObject): + class Payouts(StripeObject): class StatusDetail(StripeObject): code: Literal[ "determining_status", @@ -2939,7 +3242,7 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"status_details": StatusDetail} - class FinancialAccounts(StripeObject): + class StripeTransfers(StripeObject): class StatusDetail(StripeObject): code: Literal[ "determining_status", @@ -2974,56 +3277,190 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"status_details": StatusDetail} - bank_accounts: Optional[BankAccounts] + payouts: Optional[Payouts] """ - Can send funds from a FinancialAccount to a bank account belonging to the same user. + Enables this Account to complete payouts from their Stripe Balance (/v1/balance). """ - financial_accounts: Optional[FinancialAccounts] + stripe_transfers: Optional[StripeTransfers] """ - Can send funds from a FinancialAccount to another FinancialAccount belonging to the same user. + Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). """ _inner_class_types = { - "bank_accounts": BankAccounts, - "financial_accounts": FinancialAccounts, + "payouts": Payouts, + "stripe_transfers": StripeTransfers, } - financial_addresses: Optional[FinancialAddresses] + bank_accounts: Optional[BankAccounts] """ - Can provision a financial address to credit/debit a FinancialAccount. + Capabilities that enable OutboundPayments to a bank account linked to this Account. """ - holds_currencies: Optional[HoldsCurrencies] + cards: Optional[Cards] """ - Can hold storage-type funds on Stripe. + Enables this Account to receive OutboundPayments to a linked debit card. """ - inbound_transfers: Optional[InboundTransfers] + stripe_balance: Optional[StripeBalance] """ - Hash containing capabilities related to InboundTransfers. + Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). """ - outbound_payments: Optional[OutboundPayments] + _inner_class_types = { + "bank_accounts": BankAccounts, + "cards": Cards, + "stripe_balance": StripeBalance, + } + + class DefaultOutboundDestination(StripeObject): + id: str """ - Hash containing capabilities related to [OutboundPayments](https://docs.stripe.com/api/treasury/outbound_payments?api-version=preview). + The payout method ID of the default outbound destination. """ - outbound_transfers: Optional[OutboundTransfers] + type: Literal[ + "ae_bank_account", + "ag_bank_account", + "al_bank_account", + "am_bank_account", + "ao_bank_account", + "ar_bank_account", + "at_bank_account", + "au_bank_account", + "az_bank_account", + "ba_bank_account", + "bd_bank_account", + "be_bank_account", + "bg_bank_account", + "bh_bank_account", + "bj_bank_account", + "bn_bank_account", + "bo_bank_account", + "br_bank_account", + "bs_bank_account", + "bt_bank_account", + "bw_bank_account", + "card", + "ca_bank_account", + "ch_bank_account", + "ci_bank_account", + "cl_bank_account", + "cn_bank_account", + "co_bank_account", + "crypto_wallet", + "cr_bank_account", + "cy_bank_account", + "cz_bank_account", + "de_bank_account", + "dk_bank_account", + "do_bank_account", + "dz_bank_account", + "ec_bank_account", + "ee_bank_account", + "eg_bank_account", + "es_bank_account", + "et_bank_account", + "fi_bank_account", + "fr_bank_account", + "ga_bank_account", + "gb_bank_account", + "gh_bank_account", + "gi_bank_account", + "gm_bank_account", + "gr_bank_account", + "gt_bank_account", + "gy_bank_account", + "hk_bank_account", + "hn_bank_account", + "hr_bank_account", + "hu_bank_account", + "id_bank_account", + "ie_bank_account", + "il_bank_account", + "in_bank_account", + "is_bank_account", + "it_bank_account", + "jm_bank_account", + "jo_bank_account", + "jp_bank_account", + "ke_bank_account", + "kh_bank_account", + "kr_bank_account", + "kw_bank_account", + "kz_bank_account", + "la_bank_account", + "lc_bank_account", + "li_bank_account", + "lk_bank_account", + "lt_bank_account", + "lu_bank_account", + "lv_bank_account", + "ma_bank_account", + "mc_bank_account", + "md_bank_account", + "mg_bank_account", + "mk_bank_account", + "mn_bank_account", + "mo_bank_account", + "mt_bank_account", + "mu_bank_account", + "mx_bank_account", + "my_bank_account", + "mz_bank_account", + "na_bank_account", + "ne_bank_account", + "ng_bank_account", + "ni_bank_account", + "nl_bank_account", + "no_bank_account", + "nz_bank_account", + "om_bank_account", + "pa_bank_account", + "pe_bank_account", + "ph_bank_account", + "pk_bank_account", + "pl_bank_account", + "pt_bank_account", + "py_bank_account", + "qa_bank_account", + "ro_bank_account", + "rs_bank_account", + "rw_bank_account", + "sa_bank_account", + "se_bank_account", + "sg_bank_account", + "si_bank_account", + "sk_bank_account", + "sm_bank_account", + "sn_bank_account", + "sv_bank_account", + "th_bank_account", + "tn_bank_account", + "tr_bank_account", + "tt_bank_account", + "tw_bank_account", + "tz_bank_account", + "us_bank_account", + "uy_bank_account", + "uz_bank_account", + "vn_bank_account", + "za_bank_account", + ] """ - Hash containing capabilities related to [OutboundTransfers](https://docs.stripe.com/api/treasury/outbound_transfers?api-version=preview). + Closed Enum. The payout method type of the default outbound destination. """ - _inner_class_types = { - "financial_addresses": FinancialAddresses, - "holds_currencies": HoldsCurrencies, - "inbound_transfers": InboundTransfers, - "outbound_payments": OutboundPayments, - "outbound_transfers": OutboundTransfers, - } applied: bool """ - Indicates whether the storer configuration is active. You cannot deactivate (or reactivate) the storer configuration by updating this property. + Indicates whether the recipient configuration is active. You can deactivate or reactivate the recipient configuration by updating this property. Deactivating the configuration by setting this value to false unrequest all capabilities within the configuration. It will not delete any of the configuration's other properties. """ capabilities: Optional[Capabilities] """ - Capabilities that have been requested on the Storer Configuration. + Capabilities that have been requested on the Recipient Configuration. + """ + default_outbound_destination: Optional[DefaultOutboundDestination] """ - _inner_class_types = {"capabilities": Capabilities} + The payout method to be used as a default outbound destination. This will allow the PayoutMethod to be omitted on OutboundPayments made through the dashboard or APIs. + """ + _inner_class_types = { + "capabilities": Capabilities, + "default_outbound_destination": DefaultOutboundDestination, + } customer: Optional[Customer] """ @@ -3033,19 +3470,19 @@ class StatusDetail(StripeObject): """ Enables the Account to act as a connected account and collect payments facilitated by a Connect platform. You must onboard your platform to Connect before you can add this configuration to your connected accounts. Utilize this configuration when the Account will be the Merchant of Record, like with Direct charges or Destination Charges with on_behalf_of set. """ - recipient: Optional[Recipient] + money_manager: Optional[MoneyManager] """ - The Recipient Configuration allows the Account to receive funds. Utilize this configuration if the Account will not be the Merchant of Record, like with Separate Charges & Transfers, or Destination Charges without on_behalf_of set. + The Money Manager Configuration allows the Account to store and move funds using FinancialAccounts. """ - storer: Optional[Storer] + recipient: Optional[Recipient] """ - The Storer Configuration allows the Account to store and move funds using stored-value FinancialAccounts. + The Recipient Configuration allows the Account to receive funds. Utilize this configuration if the Account will not be the Merchant of Record, like with Separate Charges & Transfers, or Destination Charges without on_behalf_of set. """ _inner_class_types = { "customer": Customer, "merchant": Merchant, + "money_manager": MoneyManager, "recipient": Recipient, - "storer": Storer, } class Defaults(StripeObject): @@ -3077,7 +3514,7 @@ class Responsibilities(StripeObject): """ losses_collector: Optional[Literal["application", "stripe"]] """ - A value indicating responsibility for collecting requirements on this account. + A value indicating the responsibility for losses on this account. """ requirements_collector: Literal["application", "stripe"] """ @@ -3332,6 +3769,12 @@ class Deadline(StripeObject): "bank_accounts.wire", "blik_payments", "boleto_payments", + "business_storage.inbound.eur", + "business_storage.inbound.gbp", + "business_storage.inbound.usd", + "business_storage.outbound.eur", + "business_storage.outbound.gbp", + "business_storage.outbound.usd", "cards", "card_payments", "cartes_bancaires_payments", @@ -3368,6 +3811,8 @@ class Deadline(StripeObject): "paynow_payments", "pay_by_bank_payments", "promptpay_payments", + "received_credits.bank_accounts", + "received_debits.bank_accounts", "revolut_pay_payments", "samsung_pay_payments", "sepa_bank_transfer_payments", @@ -3383,7 +3828,11 @@ class Deadline(StripeObject): The name of the Capability which will be restricted. """ configuration: Literal[ - "customer", "merchant", "recipient", "storer" + "customer", + "merchant", + "money_manager", + "recipient", + "storer", ] """ The configuration which specifies the Capability which will be restricted. @@ -3578,7 +4027,7 @@ class Account(StripeObject): The user agent of the browser from which the Account's representative accepted the terms of service. """ - class Storer(StripeObject): + class MoneyManager(StripeObject): date: Optional[str] """ The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. @@ -3596,11 +4045,14 @@ class Storer(StripeObject): """ Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). """ - storer: Optional[Storer] + money_manager: Optional[MoneyManager] """ Details on the Account's acceptance of Treasury-specific terms of service. """ - _inner_class_types = {"account": Account, "storer": Storer} + _inner_class_types = { + "account": Account, + "money_manager": MoneyManager, + } directorship_declaration: Optional[DirectorshipDeclaration] """ @@ -4902,6 +5354,12 @@ class Deadline(StripeObject): "bank_accounts.wire", "blik_payments", "boleto_payments", + "business_storage.inbound.eur", + "business_storage.inbound.gbp", + "business_storage.inbound.usd", + "business_storage.outbound.eur", + "business_storage.outbound.gbp", + "business_storage.outbound.usd", "cards", "card_payments", "cartes_bancaires_payments", @@ -4938,6 +5396,8 @@ class Deadline(StripeObject): "paynow_payments", "pay_by_bank_payments", "promptpay_payments", + "received_credits.bank_accounts", + "received_debits.bank_accounts", "revolut_pay_payments", "samsung_pay_payments", "sepa_bank_transfer_payments", @@ -4953,7 +5413,11 @@ class Deadline(StripeObject): The name of the Capability which will be restricted. """ configuration: Literal[ - "customer", "merchant", "recipient", "storer" + "customer", + "merchant", + "money_manager", + "recipient", + "storer", ] """ The configuration which specifies the Capability which will be restricted. @@ -5063,7 +5527,7 @@ class MinimumDeadline(StripeObject): _inner_class_types = {"entries": Entry, "summary": Summary} applied_configurations: List[ - Literal["customer", "merchant", "recipient", "storer"] + Literal["customer", "merchant", "recipient", "money_manager"] ] """ The configurations that have been applied to this account. diff --git a/stripe/v2/core/_account_link.py b/stripe/v2/core/_account_link.py index c0d2a2e0e..4f6511f97 100644 --- a/stripe/v2/core/_account_link.py +++ b/stripe/v2/core/_account_link.py @@ -31,7 +31,13 @@ class CollectionOptions(StripeObject): Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ configurations: List[ - Literal["customer", "merchant", "recipient", "storer"] + Literal[ + "customer", + "merchant", + "money_manager", + "recipient", + "storer", + ] ] """ Open Enum. A v2/core/account can be configured to enable certain functionality. The configuration param targets the v2/core/account_link to collect information for the specified v2/core/account configuration/s. @@ -62,7 +68,13 @@ class CollectionOptions(StripeObject): Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ configurations: List[ - Literal["customer", "merchant", "recipient", "storer"] + Literal[ + "customer", + "merchant", + "money_manager", + "recipient", + "storer", + ] ] """ Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. diff --git a/stripe/v2/core/_batch_job.py b/stripe/v2/core/_batch_job.py index 5ad626ad4..135950dcd 100644 --- a/stripe/v2/core/_batch_job.py +++ b/stripe/v2/core/_batch_job.py @@ -293,10 +293,6 @@ class DownloadUrl(StripeObject): """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. """ - maximum_rps: int - """ - The maximum requests per second defined for the `batch_job`. - """ metadata: UntypedStripeObject[str] """ The metadata of the `batch_job`. diff --git a/stripe/v2/money_management/_financial_address.py b/stripe/v2/money_management/_financial_address.py index 798a7bfd3..3a82b5597 100644 --- a/stripe/v2/money_management/_financial_address.py +++ b/stripe/v2/money_management/_financial_address.py @@ -108,6 +108,10 @@ class AccountHolderAddress(StripeObject): """ The name of the Bank. """ + bic: Optional[str] + """ + The BIC of the bank or financial institution. + """ last4: str """ The last four digits of the US Bank Account number. This will always be returned. @@ -117,10 +121,6 @@ class AccountHolderAddress(StripeObject): """ The routing number of the US Bank Account. """ - swift_code: Optional[str] - """ - The swift code of the bank or financial institution. - """ _inner_class_types = { "account_holder_address": AccountHolderAddress, } diff --git a/stripe/v2/money_management/_outbound_payment.py b/stripe/v2/money_management/_outbound_payment.py index dce40050d..3f14d7274 100644 --- a/stripe/v2/money_management/_outbound_payment.py +++ b/stripe/v2/money_management/_outbound_payment.py @@ -41,17 +41,26 @@ class RecipientNotification(StripeObject): class StatusDetails(StripeObject): class Failed(StripeObject): reason: 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", ] """ Open Enum. The `failed` status reason. """ + class Processing(StripeObject): + reason: Literal["under_review"] + """ + Open Enum. The `processing` status reason. + """ + class Returned(StripeObject): reason: Literal[ "payout_method_canceled_by_customer", @@ -74,11 +83,19 @@ class Returned(StripeObject): """ The `failed` status reason. """ + processing: Optional[Processing] + """ + The `processing` status details. + """ returned: Optional[Returned] """ The `returned` status reason. """ - _inner_class_types = {"failed": Failed, "returned": Returned} + _inner_class_types = { + "failed": Failed, + "processing": Processing, + "returned": Returned, + } class StatusTransitions(StripeObject): canceled_at: Optional[str] @@ -204,7 +221,7 @@ class TraceId(StripeObject): """ status_details: Optional[StatusDetails] """ - Status details for an OutboundPayment in a `failed` or `returned` state. + Status details for an OutboundPayment in a `processing`, `failed`, or `returned` state. """ status_transitions: Optional[StatusTransitions] """ diff --git a/stripe/v2/money_management/_outbound_transfer.py b/stripe/v2/money_management/_outbound_transfer.py index 9164b7bcc..8232ff2ee 100644 --- a/stripe/v2/money_management/_outbound_transfer.py +++ b/stripe/v2/money_management/_outbound_transfer.py @@ -34,18 +34,26 @@ class From(StripeObject): class StatusDetails(StripeObject): class Failed(StripeObject): reason: 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", ] """ Open Enum. The `failed` status reason. """ + class Processing(StripeObject): + reason: Literal["under_review"] + """ + Open Enum. The `processing` status reason. + """ + class Returned(StripeObject): reason: Literal[ "payout_method_canceled_by_customer", @@ -68,11 +76,19 @@ class Returned(StripeObject): """ The `failed` status reason. """ + processing: Optional[Processing] + """ + The `processing` status details. + """ returned: Optional[Returned] """ The `returned` status reason. """ - _inner_class_types = {"failed": Failed, "returned": Returned} + _inner_class_types = { + "failed": Failed, + "processing": Processing, + "returned": Returned, + } class StatusTransitions(StripeObject): canceled_at: Optional[str] @@ -182,7 +198,7 @@ class TraceId(StripeObject): """ status_details: Optional[StatusDetails] """ - Status details for an OutboundTransfer in a `failed` or `returned` state. + Status details for an OutboundTransfer in a `processing`, `failed`, or `returned` state. """ status_transitions: Optional[StatusTransitions] """ diff --git a/stripe/v2/money_management/_received_credit.py b/stripe/v2/money_management/_received_credit.py index c219c929c..438e5e388 100644 --- a/stripe/v2/money_management/_received_credit.py +++ b/stripe/v2/money_management/_received_credit.py @@ -93,6 +93,10 @@ class SepaBankAccount(StripeObject): """ class UsBankAccount(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. diff --git a/stripe/v2/money_management/_received_debit.py b/stripe/v2/money_management/_received_debit.py index b50f6b432..b07f47384 100644 --- a/stripe/v2/money_management/_received_debit.py +++ b/stripe/v2/money_management/_received_debit.py @@ -51,6 +51,7 @@ class UsBankAccount(StripeObject): class StatusDetails(StripeObject): class Failed(StripeObject): reason: Literal[ + "capability_inactive", "financial_address_inactive", "insufficient_funds", "stripe_rejected", diff --git a/tests/api_resources/billing_portal/test_configuration.py b/tests/api_resources/billing_portal/test_configuration.py deleted file mode 100644 index 691a1e43f..000000000 --- a/tests/api_resources/billing_portal/test_configuration.py +++ /dev/null @@ -1,53 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "bpc_123" - - -class TestConfiguration(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.billing_portal.Configuration.create( - business_profile={ - "privacy_policy_url": "https://example.com/privacy", - "terms_of_service_url": "https://example.com/tos", - }, - features={ - "customer_update": { - "allowed_updates": ["address"], - "enabled": True, - } - }, - ) - http_client_mock.assert_requested( - "post", - path="/v1/billing_portal/configurations", - post_data="business_profile[privacy_policy_url]=https://example.com/privacy&business_profile[terms_of_service_url]=https://example.com/tos&features[customer_update][allowed_updates][0]=address&features[customer_update][enabled]=true", - ) - assert isinstance(resource, stripe.billing_portal.Configuration) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.billing_portal.Configuration.retrieve( - TEST_RESOURCE_ID - ) - http_client_mock.assert_requested( - "get", - path="/v1/billing_portal/configurations/%s" % (TEST_RESOURCE_ID), - ) - assert isinstance(resource, stripe.billing_portal.Configuration) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.billing_portal.Configuration.modify(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", - path="/v1/billing_portal/configurations/%s" % (TEST_RESOURCE_ID), - ) - assert isinstance(resource, stripe.billing_portal.Configuration) - - def test_is_listable(self, http_client_mock): - resource = stripe.billing_portal.Configuration.list() - http_client_mock.assert_requested( - "get", path="/v1/billing_portal/configurations" - ) - assert isinstance( - resource.data[0], stripe.billing_portal.Configuration - ) diff --git a/tests/api_resources/billing_portal/test_session.py b/tests/api_resources/billing_portal/test_session.py deleted file mode 100644 index b1d61a1d1..000000000 --- a/tests/api_resources/billing_portal/test_session.py +++ /dev/null @@ -1,17 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "pts_123" - - -class TestSession(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.billing_portal.Session.create( - customer="cus_123", return_url="https://stripe.com/return" - ) - http_client_mock.assert_requested( - "post", - path="/v1/billing_portal/sessions", - post_data="customer=cus_123&return_url=https://stripe.com/return", - ) - assert isinstance(resource, stripe.billing_portal.Session) diff --git a/tests/api_resources/checkout/test_session.py b/tests/api_resources/checkout/test_session.py deleted file mode 100644 index d49ad902a..000000000 --- a/tests/api_resources/checkout/test_session.py +++ /dev/null @@ -1,49 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "cs_123" - - -class TestSession(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.checkout.Session.create( - cancel_url="https://stripe.com/cancel", - client_reference_id="1234", - line_items=[ - { - "amount": 123, - "currency": "usd", - "description": "item 1", - "images": ["https://stripe.com/img1"], - "name": "name", - "quantity": 2, - } - ], - payment_intent_data={"receipt_email": "test@stripe.com"}, - payment_method_types=["card"], - success_url="https://stripe.com/success", - ) - http_client_mock.assert_requested( - "post", - path="/v1/checkout/sessions", - post_data="cancel_url=https://stripe.com/cancel&client_reference_id=1234&line_items[0][amount]=123&line_items[0][currency]=usd&line_items[0][description]=item+1&line_items[0][images][0]=https://stripe.com/img1&line_items[0][name]=name&line_items[0][quantity]=2&payment_intent_data[receipt_email]=test@stripe.com&payment_method_types[0]=card&success_url=https://stripe.com/success", - ) - assert isinstance(resource, stripe.checkout.Session) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.checkout.Session.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/checkout/sessions/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.checkout.Session) - - -class TestSessionLineItems(object): - def test_is_listable(self, http_client_mock): - resources = stripe.checkout.Session.list_line_items(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", - path="/v1/checkout/sessions/%s/line_items" % TEST_RESOURCE_ID, - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.LineItem) diff --git a/tests/api_resources/identity/test_verification_report.py b/tests/api_resources/identity/test_verification_report.py deleted file mode 100644 index ddec8d142..000000000 --- a/tests/api_resources/identity/test_verification_report.py +++ /dev/null @@ -1,26 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "vs_123" - - -class TestVerificationReport(object): - def test_is_listable(self, http_client_mock): - resources = stripe.identity.VerificationReport.list() - http_client_mock.assert_requested( - "get", path="/v1/identity/verification_reports" - ) - assert isinstance(resources.data, list) - assert isinstance( - resources.data[0], stripe.identity.VerificationReport - ) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.identity.VerificationReport.retrieve( - TEST_RESOURCE_ID - ) - http_client_mock.assert_requested( - "get", - path="/v1/identity/verification_reports/%s" % TEST_RESOURCE_ID, - ) - assert isinstance(resource, stripe.identity.VerificationReport) diff --git a/tests/api_resources/identity/test_verification_session.py b/tests/api_resources/identity/test_verification_session.py deleted file mode 100644 index ad7b8163d..000000000 --- a/tests/api_resources/identity/test_verification_session.py +++ /dev/null @@ -1,108 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "vs_123" - - -class TestVerificationSession(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.identity.VerificationSession.create(type="id_number") - http_client_mock.assert_requested( - "post", - path="/v1/identity/verification_sessions", - post_data="type=id_number", - ) - assert isinstance(resource, stripe.identity.VerificationSession) - - def test_is_listable(self, http_client_mock): - resources = stripe.identity.VerificationSession.list() - http_client_mock.assert_requested( - "get", path="/v1/identity/verification_sessions" - ) - assert isinstance(resources.data, list) - assert isinstance( - resources.data[0], stripe.identity.VerificationSession - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.identity.VerificationSession.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/identity/verification_sessions/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.identity.VerificationSession) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.identity.VerificationSession.retrieve( - TEST_RESOURCE_ID - ) - http_client_mock.assert_requested( - "get", - path="/v1/identity/verification_sessions/%s" % TEST_RESOURCE_ID, - ) - assert isinstance(resource, stripe.identity.VerificationSession) - - def test_is_saveable(self, http_client_mock): - resource = stripe.identity.VerificationSession.retrieve( - TEST_RESOURCE_ID - ) - resource.metadata["key"] = "value" - verification_session = resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/identity/verification_sessions/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.identity.VerificationSession) - assert resource is verification_session - - def test_can_cancel(self, http_client_mock): - resource = stripe.identity.VerificationSession.retrieve( - TEST_RESOURCE_ID - ) - verification_session = resource.cancel() - http_client_mock.assert_requested( - "post", - path="/v1/identity/verification_sessions/%s/cancel" - % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.identity.VerificationSession) - assert resource is verification_session - - def test_can_cancel_classmethod(self, http_client_mock): - resource = stripe.identity.VerificationSession.cancel(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", - path="/v1/identity/verification_sessions/%s/cancel" - % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.identity.VerificationSession) - - def test_can_redact(self, http_client_mock): - resource = stripe.identity.VerificationSession.retrieve( - TEST_RESOURCE_ID - ) - verification_session = resource.redact() - http_client_mock.assert_requested( - "post", - path="/v1/identity/verification_sessions/%s/redact" - % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.identity.VerificationSession) - assert resource is verification_session - - def test_can_redact_classmethod(self, http_client_mock): - resource = stripe.identity.VerificationSession.redact(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", - path="/v1/identity/verification_sessions/%s/redact" - % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.identity.VerificationSession) diff --git a/tests/api_resources/issuing/test_authorization.py b/tests/api_resources/issuing/test_authorization.py deleted file mode 100644 index c3f07d3e8..000000000 --- a/tests/api_resources/issuing/test_authorization.py +++ /dev/null @@ -1,84 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "iauth_123" - - -class TestAuthorization(object): - def test_is_listable(self, http_client_mock): - resources = stripe.issuing.Authorization.list() - http_client_mock.assert_requested( - "get", path="/v1/issuing/authorizations" - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.issuing.Authorization) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.issuing.Authorization.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/issuing/authorizations/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.issuing.Authorization) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.issuing.Authorization.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/issuing/authorizations/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.issuing.Authorization) - - def test_is_saveable(self, http_client_mock): - resource = stripe.issuing.Authorization.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - authorization = resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/issuing/authorizations/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.issuing.Authorization) - assert resource is authorization - - def test_can_approve(self, http_client_mock): - resource = stripe.issuing.Authorization.retrieve(TEST_RESOURCE_ID) - authorization = resource.approve() - http_client_mock.assert_requested( - "post", - path="/v1/issuing/authorizations/%s/approve" % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.issuing.Authorization) - assert resource is authorization - - def test_can_approve_classmethod(self, http_client_mock): - resource = stripe.issuing.Authorization.approve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", - path="/v1/issuing/authorizations/%s/approve" % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.issuing.Authorization) - - def test_can_decline(self, http_client_mock): - resource = stripe.issuing.Authorization.retrieve(TEST_RESOURCE_ID) - authorization = resource.decline() - http_client_mock.assert_requested( - "post", - path="/v1/issuing/authorizations/%s/decline" % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.issuing.Authorization) - assert resource is authorization - - def test_can_decline_classmethod(self, http_client_mock): - resource = stripe.issuing.Authorization.decline(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", - path="/v1/issuing/authorizations/%s/decline" % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.issuing.Authorization) diff --git a/tests/api_resources/issuing/test_card.py b/tests/api_resources/issuing/test_card.py deleted file mode 100644 index b9a27fe79..000000000 --- a/tests/api_resources/issuing/test_card.py +++ /dev/null @@ -1,51 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "ic_123" - - -class TestCard(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.issuing.Card.create(currency="usd", type="physical") - http_client_mock.assert_requested( - "post", - path="/v1/issuing/cards", - post_data="currency=usd&type=physical", - ) - assert isinstance(resource, stripe.issuing.Card) - - def test_is_listable(self, http_client_mock): - resources = stripe.issuing.Card.list() - http_client_mock.assert_requested("get", path="/v1/issuing/cards") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.issuing.Card) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.issuing.Card.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/issuing/cards/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.issuing.Card) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.issuing.Card.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/issuing/cards/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.issuing.Card) - - def test_is_saveable(self, http_client_mock): - resource = stripe.issuing.Card.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - card = resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/issuing/cards/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.issuing.Card) - assert resource is card diff --git a/tests/api_resources/issuing/test_cardholder.py b/tests/api_resources/issuing/test_cardholder.py deleted file mode 100644 index 26577aa25..000000000 --- a/tests/api_resources/issuing/test_cardholder.py +++ /dev/null @@ -1,64 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "ich_123" - - -class TestCardholder(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.issuing.Cardholder.create( - billing={ - "address": { - "city": "city", - "country": "US", - "line1": "line1", - "postal_code": "postal_code", - } - }, - name="Jenny Rosen", - type="individual", - ) - http_client_mock.assert_requested( - "post", - path="/v1/issuing/cardholders", - post_data="billing[address][city]=city&billing[address][country]=US&billing[address][line1]=line1&billing[address][postal_code]=postal_code&name=Jenny+Rosen&type=individual", - ) - assert isinstance(resource, stripe.issuing.Cardholder) - - def test_is_listable(self, http_client_mock): - resources = stripe.issuing.Cardholder.list() - http_client_mock.assert_requested( - "get", path="/v1/issuing/cardholders" - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.issuing.Cardholder) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.issuing.Cardholder.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/issuing/cardholders/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.issuing.Cardholder) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.issuing.Cardholder.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/issuing/cardholders/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.issuing.Cardholder) - - def test_is_saveable(self, http_client_mock): - resource = stripe.issuing.Cardholder.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - cardholder = resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/issuing/cardholders/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.issuing.Cardholder) - assert resource is cardholder diff --git a/tests/api_resources/issuing/test_dispute.py b/tests/api_resources/issuing/test_dispute.py deleted file mode 100644 index 2e6259ff2..000000000 --- a/tests/api_resources/issuing/test_dispute.py +++ /dev/null @@ -1,46 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "idp_123" - - -class TestDispute(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.issuing.Dispute.create(transaction="ipi_123") - http_client_mock.assert_requested( - "post", - path="/v1/issuing/disputes", - post_data="transaction=ipi_123", - ) - assert isinstance(resource, stripe.issuing.Dispute) - - def test_is_listable(self, http_client_mock): - resources = stripe.issuing.Dispute.list() - http_client_mock.assert_requested("get", path="/v1/issuing/disputes") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.issuing.Dispute) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.issuing.Dispute.modify(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", - path="/v1/issuing/disputes/%s" % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.issuing.Dispute) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.issuing.Dispute.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/issuing/disputes/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.issuing.Dispute) - - def test_is_submittable(self, http_client_mock): - resource = stripe.issuing.Dispute.submit(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", - path="/v1/issuing/disputes/%s/submit" % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.issuing.Dispute) diff --git a/tests/api_resources/issuing/test_transaction.py b/tests/api_resources/issuing/test_transaction.py deleted file mode 100644 index 5dfe319bb..000000000 --- a/tests/api_resources/issuing/test_transaction.py +++ /dev/null @@ -1,44 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "ipi_123" - - -class TestTransaction(object): - def test_is_listable(self, http_client_mock): - resources = stripe.issuing.Transaction.list() - http_client_mock.assert_requested( - "get", path="/v1/issuing/transactions" - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.issuing.Transaction) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.issuing.Transaction.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/issuing/transactions/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.issuing.Transaction) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.issuing.Transaction.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/issuing/transactions/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.issuing.Transaction) - - def test_is_saveable(self, http_client_mock): - resource = stripe.issuing.Transaction.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - transaction = resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/issuing/transactions/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.issuing.Transaction) - assert resource is transaction diff --git a/tests/api_resources/radar/test_early_fraud_warning.py b/tests/api_resources/radar/test_early_fraud_warning.py deleted file mode 100644 index cf36e06cd..000000000 --- a/tests/api_resources/radar/test_early_fraud_warning.py +++ /dev/null @@ -1,21 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "issfr_123" - - -class TestEarlyFraudWarning(object): - def test_is_listable(self, http_client_mock): - resources = stripe.radar.EarlyFraudWarning.list() - http_client_mock.assert_requested( - "get", path="/v1/radar/early_fraud_warnings" - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.radar.EarlyFraudWarning) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.radar.EarlyFraudWarning.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/radar/early_fraud_warnings/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.radar.EarlyFraudWarning) diff --git a/tests/api_resources/radar/test_value_list.py b/tests/api_resources/radar/test_value_list.py deleted file mode 100644 index 75dca7fe2..000000000 --- a/tests/api_resources/radar/test_value_list.py +++ /dev/null @@ -1,64 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "rsl_123" - - -class TestValueList(object): - def test_is_listable(self, http_client_mock): - resources = stripe.radar.ValueList.list() - http_client_mock.assert_requested("get", path="/v1/radar/value_lists") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.radar.ValueList) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.radar.ValueList.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/radar/value_lists/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.radar.ValueList) - - def test_is_creatable(self, http_client_mock): - resource = stripe.radar.ValueList.create(alias="alias", name="name") - http_client_mock.assert_requested( - "post", - path="/v1/radar/value_lists", - post_data="alias=alias&name=name", - ) - assert isinstance(resource, stripe.radar.ValueList) - - def test_is_saveable(self, http_client_mock): - resource = stripe.radar.ValueList.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/radar/value_lists/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.radar.ValueList.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/radar/value_lists/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.radar.ValueList) - - def test_is_deletable(self, http_client_mock): - resource = stripe.radar.ValueList.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/radar/value_lists/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_can_delete(self, http_client_mock): - resource = stripe.radar.ValueList.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/radar/value_lists/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True diff --git a/tests/api_resources/radar/test_value_list_item.py b/tests/api_resources/radar/test_value_list_item.py deleted file mode 100644 index 5ccc64511..000000000 --- a/tests/api_resources/radar/test_value_list_item.py +++ /dev/null @@ -1,47 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "rsli_123" - - -class TestValueListItem(object): - def test_is_listable(self, http_client_mock): - resources = stripe.radar.ValueListItem.list(value_list="rsl_123") - http_client_mock.assert_requested( - "get", path="/v1/radar/value_list_items" - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.radar.ValueListItem) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.radar.ValueListItem.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/radar/value_list_items/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.radar.ValueListItem) - - def test_is_creatable(self, http_client_mock): - resource = stripe.radar.ValueListItem.create( - value_list="rsl_123", value="value" - ) - http_client_mock.assert_requested( - "post", - path="/v1/radar/value_list_items", - post_data="value_list=rsl_123&value=value", - ) - assert isinstance(resource, stripe.radar.ValueListItem) - - def test_is_deletable(self, http_client_mock): - resource = stripe.radar.ValueListItem.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/radar/value_list_items/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_can_delete(self, http_client_mock): - resource = stripe.radar.ValueListItem.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/radar/value_list_items/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True diff --git a/tests/api_resources/reporting/test_report_run.py b/tests/api_resources/reporting/test_report_run.py deleted file mode 100644 index 0634e9fa9..000000000 --- a/tests/api_resources/reporting/test_report_run.py +++ /dev/null @@ -1,33 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "frr_123" - - -class TestReportRun(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.reporting.ReportRun.create( - parameters={"connected_account": "acct_123"}, - report_type="activity.summary.1", - ) - http_client_mock.assert_requested( - "post", - path="/v1/reporting/report_runs", - post_data="parameters[connected_account]=acct_123&report_type=activity.summary.1", - ) - assert isinstance(resource, stripe.reporting.ReportRun) - - def test_is_listable(self, http_client_mock): - resources = stripe.reporting.ReportRun.list() - http_client_mock.assert_requested( - "get", path="/v1/reporting/report_runs" - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.reporting.ReportRun) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.reporting.ReportRun.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/reporting/report_runs/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.reporting.ReportRun) diff --git a/tests/api_resources/reporting/test_report_type.py b/tests/api_resources/reporting/test_report_type.py deleted file mode 100644 index e71396538..000000000 --- a/tests/api_resources/reporting/test_report_type.py +++ /dev/null @@ -1,21 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "activity.summary.1" - - -class TestReportType(object): - def test_is_listable(self, http_client_mock): - resources = stripe.reporting.ReportType.list() - http_client_mock.assert_requested( - "get", path="/v1/reporting/report_types" - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.reporting.ReportType) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.reporting.ReportType.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/reporting/report_types/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.reporting.ReportType) diff --git a/tests/api_resources/sigma/test_scheduled_query_run.py b/tests/api_resources/sigma/test_scheduled_query_run.py deleted file mode 100644 index 4b18d4f79..000000000 --- a/tests/api_resources/sigma/test_scheduled_query_run.py +++ /dev/null @@ -1,21 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "sqr_123" - - -class TestTransaction(object): - def test_is_listable(self, http_client_mock): - resources = stripe.sigma.ScheduledQueryRun.list() - http_client_mock.assert_requested( - "get", path="/v1/sigma/scheduled_query_runs" - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.sigma.ScheduledQueryRun) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.sigma.ScheduledQueryRun.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/sigma/scheduled_query_runs/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.sigma.ScheduledQueryRun) diff --git a/tests/api_resources/terminal/test_connection_token.py b/tests/api_resources/terminal/test_connection_token.py deleted file mode 100644 index 3925d0354..000000000 --- a/tests/api_resources/terminal/test_connection_token.py +++ /dev/null @@ -1,13 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "rdr_123" - - -class TestConnectionToken(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.terminal.ConnectionToken.create() - http_client_mock.assert_requested( - "post", path="/v1/terminal/connection_tokens", post_data="" - ) - assert isinstance(resource, stripe.terminal.ConnectionToken) diff --git a/tests/api_resources/terminal/test_location.py b/tests/api_resources/terminal/test_location.py deleted file mode 100644 index 1d33fa60d..000000000 --- a/tests/api_resources/terminal/test_location.py +++ /dev/null @@ -1,75 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "loc_123" - - -class TestLocation(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.terminal.Location.create( - display_name="name", - address={ - "line1": "line1", - "country": "US", - "state": "CA", - "postal_code": "12345", - "city": "San Francisco", - }, - ) - http_client_mock.assert_requested( - "post", - path="/v1/terminal/locations", - post_data="display_name=name&address[city]=San+Francisco&address[country]=US&address[line1]=line1&address[postal_code]=12345&address[state]=CA", - ) - assert isinstance(resource, stripe.terminal.Location) - - def test_is_listable(self, http_client_mock): - resources = stripe.terminal.Location.list() - http_client_mock.assert_requested("get", path="/v1/terminal/locations") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.terminal.Location) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.terminal.Location.modify( - TEST_RESOURCE_ID, display_name="new-name" - ) - http_client_mock.assert_requested( - "post", - path="/v1/terminal/locations/%s" % TEST_RESOURCE_ID, - post_data="display_name=new-name", - ) - assert isinstance(resource, stripe.terminal.Location) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.terminal.Location.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/terminal/locations/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.terminal.Location) - - def test_is_saveable(self, http_client_mock): - resource = stripe.terminal.Location.retrieve(TEST_RESOURCE_ID) - resource.display_name = "new-name" - location = resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/terminal/locations/%s" % TEST_RESOURCE_ID, - post_data="display_name=new-name", - ) - assert isinstance(resource, stripe.terminal.Location) - assert resource is location - - def test_is_deletable(self, http_client_mock): - resource = stripe.terminal.Location.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/terminal/locations/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_can_delete(self, http_client_mock): - resource = stripe.terminal.Location.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/terminal/locations/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True diff --git a/tests/api_resources/terminal/test_reader.py b/tests/api_resources/terminal/test_reader.py deleted file mode 100644 index 486ba38e0..000000000 --- a/tests/api_resources/terminal/test_reader.py +++ /dev/null @@ -1,80 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "rdr_123" - - -class TestReader(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.terminal.Reader.create( - registration_code="a-b-c", label="name" - ) - http_client_mock.assert_requested( - "post", - path="/v1/terminal/readers", - post_data="label=name®istration_code=a-b-c", - ) - assert isinstance(resource, stripe.terminal.Reader) - - def test_is_listable(self, http_client_mock): - resources = stripe.terminal.Reader.list() - http_client_mock.assert_requested("get", path="/v1/terminal/readers") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.terminal.Reader) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.terminal.Reader.modify( - TEST_RESOURCE_ID, label="new-name" - ) - http_client_mock.assert_requested( - "post", - path="/v1/terminal/readers/%s" % TEST_RESOURCE_ID, - post_data="label=new-name", - ) - assert isinstance(resource, stripe.terminal.Reader) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.terminal.Reader.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/terminal/readers/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.terminal.Reader) - - def test_is_saveable(self, http_client_mock): - resource = stripe.terminal.Reader.retrieve(TEST_RESOURCE_ID) - resource.label = "new-name" - reader = resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/terminal/readers/%s" % TEST_RESOURCE_ID, - post_data="label=new-name", - ) - assert isinstance(resource, stripe.terminal.Reader) - assert resource is reader - - def test_is_deletable(self, http_client_mock): - resource = stripe.terminal.Reader.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/terminal/readers/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_can_delete(self, http_client_mock): - resource = stripe.terminal.Reader.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/terminal/readers/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_can_present_payment_method(self, http_client_mock): - resource = stripe.terminal.Reader.TestHelpers.present_payment_method( - TEST_RESOURCE_ID - ) - http_client_mock.assert_requested( - "post", - path="/v1/test_helpers/terminal/readers/%s/present_payment_method" - % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.terminal.Reader) diff --git a/tests/api_resources/test_account_link.py b/tests/api_resources/test_account_link.py deleted file mode 100644 index fdb97925e..000000000 --- a/tests/api_resources/test_account_link.py +++ /dev/null @@ -1,13 +0,0 @@ -import stripe - - -class TestAccountLink(object): - def test_is_creatable(self, http_client_mock): - resource = stripe.AccountLink.create( - account="acct_123", - refresh_url="https://stripe.com/failure", - return_url="https://stripe.com/success", - type="account_onboarding", - ) - http_client_mock.assert_requested("post", path="/v1/account_links") - assert isinstance(resource, stripe.AccountLink) diff --git a/tests/api_resources/test_apple_pay_domain.py b/tests/api_resources/test_apple_pay_domain.py deleted file mode 100644 index 1996e2f8d..000000000 --- a/tests/api_resources/test_apple_pay_domain.py +++ /dev/null @@ -1,39 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "apwc_123" - - -class TestApplePayDomain(object): - def test_is_listable(self, http_client_mock): - resources = stripe.ApplePayDomain.list() - http_client_mock.assert_requested("get", path="/v1/apple_pay/domains") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.ApplePayDomain) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.ApplePayDomain.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/apple_pay/domains/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.ApplePayDomain) - - def test_is_creatable(self, http_client_mock): - resource = stripe.ApplePayDomain.create(domain_name="test.com") - http_client_mock.assert_requested("post", path="/v1/apple_pay/domains") - assert isinstance(resource, stripe.ApplePayDomain) - - def test_is_deletable(self, http_client_mock): - resource = stripe.ApplePayDomain.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/apple_pay/domains/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_can_delete(self, http_client_mock): - resource = stripe.ApplePayDomain.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/apple_pay/domains/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True diff --git a/tests/api_resources/test_application_fee.py b/tests/api_resources/test_application_fee.py deleted file mode 100644 index 01492c6ec..000000000 --- a/tests/api_resources/test_application_fee.py +++ /dev/null @@ -1,54 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "fee_123" -TEST_FEEREFUND_ID = "fr_123" - - -class TestApplicationFee(object): - def test_is_listable(self, http_client_mock): - resources = stripe.ApplicationFee.list() - http_client_mock.assert_requested("get", path="/v1/application_fees") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.ApplicationFee) - - -class TestApplicationFeeRefunds(object): - def test_is_listable(self, http_client_mock): - resources = stripe.ApplicationFee.list_refunds(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/application_fees/%s/refunds" % TEST_RESOURCE_ID - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.ApplicationFeeRefund) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.ApplicationFee.retrieve_refund( - TEST_RESOURCE_ID, TEST_FEEREFUND_ID - ) - http_client_mock.assert_requested( - "get", - path="/v1/application_fees/%s/refunds/%s" - % (TEST_RESOURCE_ID, TEST_FEEREFUND_ID), - ) - assert isinstance(resource, stripe.ApplicationFeeRefund) - - def test_is_creatable(self, http_client_mock): - resource = stripe.ApplicationFee.create_refund( - TEST_RESOURCE_ID, amount=100 - ) - http_client_mock.assert_requested( - "post", path="/v1/application_fees/%s/refunds" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.ApplicationFeeRefund) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.ApplicationFee.modify_refund( - TEST_RESOURCE_ID, TEST_FEEREFUND_ID, metadata={"foo": "bar"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/application_fees/%s/refunds/%s" - % (TEST_RESOURCE_ID, TEST_FEEREFUND_ID), - ) - assert isinstance(resource, stripe.ApplicationFeeRefund) diff --git a/tests/api_resources/test_balance.py b/tests/api_resources/test_balance.py deleted file mode 100644 index f56dc3a87..000000000 --- a/tests/api_resources/test_balance.py +++ /dev/null @@ -1,8 +0,0 @@ -import stripe - - -class TestBalance(object): - def test_is_retrievable(self, http_client_mock): - resource = stripe.Balance.retrieve() - http_client_mock.assert_requested("get", path="/v1/balance") - assert isinstance(resource, stripe.Balance) diff --git a/tests/api_resources/test_balance_transaction.py b/tests/api_resources/test_balance_transaction.py deleted file mode 100644 index 46e1ca7df..000000000 --- a/tests/api_resources/test_balance_transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "txn_123" - - -class TestBalanceTransaction(object): - def test_is_listable(self, http_client_mock): - resources = stripe.BalanceTransaction.list() - http_client_mock.assert_requested( - "get", path="/v1/balance_transactions" - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.BalanceTransaction) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.BalanceTransaction.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/balance_transactions/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.BalanceTransaction) diff --git a/tests/api_resources/test_country_spec.py b/tests/api_resources/test_country_spec.py deleted file mode 100644 index 314034d19..000000000 --- a/tests/api_resources/test_country_spec.py +++ /dev/null @@ -1,19 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "US" - - -class TestCountrySpec(object): - def test_is_listable(self, http_client_mock): - resources = stripe.CountrySpec.list() - http_client_mock.assert_requested("get", path="/v1/country_specs") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.CountrySpec) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.CountrySpec.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/country_specs/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.CountrySpec) diff --git a/tests/api_resources/test_coupon.py b/tests/api_resources/test_coupon.py deleted file mode 100644 index 99e18eae1..000000000 --- a/tests/api_resources/test_coupon.py +++ /dev/null @@ -1,67 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "250FF" - - -class TestCoupon(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Coupon.list() - http_client_mock.assert_requested("get", path="/v1/coupons") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Coupon) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Coupon.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/coupons/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Coupon) - - def test_is_creatable(self, http_client_mock): - resource = stripe.Coupon.create( - percent_off=25, - duration="repeating", - duration_in_months=3, - id="250FF", - ) - http_client_mock.assert_requested( - "post", - path="/v1/coupons", - post_data="duration=repeating&duration_in_months=3&id=250FF&percent_off=25", - ) - assert isinstance(resource, stripe.Coupon) - - def test_is_saveable(self, http_client_mock): - resource = stripe.Coupon.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/coupons/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.Coupon.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", path="/v1/coupons/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Coupon) - - def test_is_deletable(self, http_client_mock): - resource = stripe.Coupon.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/coupons/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_can_delete(self, http_client_mock): - resource = stripe.Coupon.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/coupons/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True diff --git a/tests/api_resources/test_credit_note.py b/tests/api_resources/test_credit_note.py deleted file mode 100644 index c4ee7df8b..000000000 --- a/tests/api_resources/test_credit_note.py +++ /dev/null @@ -1,79 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "cn_123" - - -class TestCreditNote(object): - def test_is_listable(self, http_client_mock): - resources = stripe.CreditNote.list() - http_client_mock.assert_requested("get", path="/v1/credit_notes") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.CreditNote) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.CreditNote.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/credit_notes/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.CreditNote) - - def test_is_creatable(self, http_client_mock): - resource = stripe.CreditNote.create( - amount=100, invoice="in_123", reason="duplicate" - ) - http_client_mock.assert_requested( - "post", - path="/v1/credit_notes", - post_data="amount=100&invoice=in_123&reason=duplicate", - ) - assert isinstance(resource, stripe.CreditNote) - - def test_is_saveable(self, http_client_mock): - resource = stripe.CreditNote.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/credit_notes/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.CreditNote.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/credit_notes/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.CreditNote) - - def test_can_preview(self, http_client_mock): - resource = stripe.CreditNote.preview(invoice="in_123", amount=500) - http_client_mock.assert_requested( - "get", - path="/v1/credit_notes/preview", - query_string="amount=500&invoice=in_123", - ) - assert isinstance(resource, stripe.CreditNote) - - def test_can_void_credit_note(self, http_client_mock): - resource = stripe.CreditNote.retrieve(TEST_RESOURCE_ID) - resource = resource.void_credit_note() - http_client_mock.assert_requested( - "post", - path="/v1/credit_notes/%s/void" % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.CreditNote) - - def test_can_void_credit_note_classmethod(self, http_client_mock): - resource = stripe.CreditNote.void_credit_note(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", - path="/v1/credit_notes/%s/void" % TEST_RESOURCE_ID, - post_data="", - ) - assert isinstance(resource, stripe.CreditNote) diff --git a/tests/api_resources/test_dispute.py b/tests/api_resources/test_dispute.py deleted file mode 100644 index 9c1e66e43..000000000 --- a/tests/api_resources/test_dispute.py +++ /dev/null @@ -1,55 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "dp_123" - - -class TestDispute(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Dispute.list() - http_client_mock.assert_requested("get", path="/v1/disputes") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Dispute) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Dispute.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/disputes/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Dispute) - - def test_is_saveable(self, http_client_mock): - resource = stripe.Dispute.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/disputes/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.Dispute.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/disputes/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.Dispute) - - def test_can_close(self, http_client_mock): - resource = stripe.Dispute.retrieve(TEST_RESOURCE_ID) - resource.close() - http_client_mock.assert_requested( - "post", path="/v1/disputes/%s/close" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Dispute) - - def test_can_close_classmethod(self, http_client_mock): - resource = stripe.Dispute.close(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", path="/v1/disputes/%s/close" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Dispute) diff --git a/tests/api_resources/test_event.py b/tests/api_resources/test_event.py deleted file mode 100644 index d82763840..000000000 --- a/tests/api_resources/test_event.py +++ /dev/null @@ -1,19 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "evt_123" - - -class TestEvent(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Event.list() - http_client_mock.assert_requested("get", path="/v1/events") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Event) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Event.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/events/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Event) diff --git a/tests/api_resources/test_exchange_rate.py b/tests/api_resources/test_exchange_rate.py deleted file mode 100644 index 77133648d..000000000 --- a/tests/api_resources/test_exchange_rate.py +++ /dev/null @@ -1,19 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "usd" - - -class TestExchangeRate(object): - def test_is_listable(self, http_client_mock): - resources = stripe.ExchangeRate.list() - http_client_mock.assert_requested("get", path="/v1/exchange_rates") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.ExchangeRate) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.ExchangeRate.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/exchange_rates/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.ExchangeRate) diff --git a/tests/api_resources/test_file_link.py b/tests/api_resources/test_file_link.py deleted file mode 100644 index 1644b799c..000000000 --- a/tests/api_resources/test_file_link.py +++ /dev/null @@ -1,45 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "link_123" - - -class TestFileLink(object): - def test_is_listable(self, http_client_mock): - resources = stripe.FileLink.list() - http_client_mock.assert_requested("get", path="/v1/file_links") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.FileLink) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.FileLink.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/file_links/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.FileLink) - - def test_is_creatable(self, http_client_mock): - resource = stripe.FileLink.create(file="file_123") - http_client_mock.assert_requested("post", path="/v1/file_links") - assert isinstance(resource, stripe.FileLink) - - def test_is_saveable(self, http_client_mock): - resource = stripe.FileLink.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/file_links/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.FileLink.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/file_links/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.FileLink) diff --git a/tests/api_resources/test_invoice_item.py b/tests/api_resources/test_invoice_item.py deleted file mode 100644 index 0ffb1f0a1..000000000 --- a/tests/api_resources/test_invoice_item.py +++ /dev/null @@ -1,66 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "ii_123" - - -class TestInvoiceItem(object): - def test_is_listable(self, http_client_mock): - resources = stripe.InvoiceItem.list() - http_client_mock.assert_requested("get", path="/v1/invoiceitems") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.InvoiceItem) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.InvoiceItem.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/invoiceitems/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.InvoiceItem) - - def test_is_creatable(self, http_client_mock): - resource = stripe.InvoiceItem.create( - customer="cus_123", amount=123, currency="usd" - ) - http_client_mock.assert_requested( - "post", - path="/v1/invoiceitems", - post_data="customer=cus_123&amount=123¤cy=usd", - ) - assert isinstance(resource, stripe.InvoiceItem) - - def test_is_saveable(self, http_client_mock): - resource = stripe.InvoiceItem.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/invoiceitems/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_can_delete(self, http_client_mock): - resource = stripe.InvoiceItem.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/invoiceitems/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_is_modifiable(self, http_client_mock): - resource = stripe.InvoiceItem.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/invoiceitems/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.InvoiceItem) - - def test_is_deletable(self, http_client_mock): - resource = stripe.InvoiceItem.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/invoiceitems/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True diff --git a/tests/api_resources/test_mandate.py b/tests/api_resources/test_mandate.py deleted file mode 100644 index f7a7f6146..000000000 --- a/tests/api_resources/test_mandate.py +++ /dev/null @@ -1,13 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "mandate_123" - - -class TestMandateSchedule(object): - def test_is_retrievable(self, http_client_mock): - resource = stripe.Mandate.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/mandates/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Mandate) diff --git a/tests/api_resources/test_payment_intent.py b/tests/api_resources/test_payment_intent.py deleted file mode 100644 index 38493b698..000000000 --- a/tests/api_resources/test_payment_intent.py +++ /dev/null @@ -1,98 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "pi_123" - - -class TestPaymentIntent(object): - def test_is_listable(self, http_client_mock): - resources = stripe.PaymentIntent.list() - http_client_mock.assert_requested("get", path="/v1/payment_intents") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.PaymentIntent) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.PaymentIntent.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/payment_intents/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.PaymentIntent) - - def test_is_creatable(self, http_client_mock): - resource = stripe.PaymentIntent.create( - amount="1234", currency="amount", payment_method_types=["card"] - ) - http_client_mock.assert_requested( - "post", - path="/v1/payment_intents", - post_data="amount=1234¤cy=amount&payment_method_types[0]=card", - ) - assert isinstance(resource, stripe.PaymentIntent) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.PaymentIntent.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/payment_intents/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.PaymentIntent) - - def test_is_saveable(self, http_client_mock): - resource = stripe.PaymentIntent.retrieve(TEST_RESOURCE_ID) - - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/payment_intents/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.PaymentIntent) - - def test_can_cancel(self, http_client_mock): - resource = stripe.PaymentIntent.retrieve(TEST_RESOURCE_ID) - resource.cancel() - http_client_mock.assert_requested( - "post", path="/v1/payment_intents/%s/cancel" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.PaymentIntent) - - def test_can_cancel_classmethod(self, http_client_mock): - resource = stripe.PaymentIntent.cancel(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", path="/v1/payment_intents/%s/cancel" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.PaymentIntent) - - def test_can_capture(self, http_client_mock): - resource = stripe.PaymentIntent.retrieve(TEST_RESOURCE_ID) - resource.capture() - http_client_mock.assert_requested( - "post", path="/v1/payment_intents/%s/capture" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.PaymentIntent) - - def test_can_capture_classmethod(self, http_client_mock): - resource = stripe.PaymentIntent.capture(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", path="/v1/payment_intents/%s/capture" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.PaymentIntent) - - def test_can_confirm(self, http_client_mock): - resource = stripe.PaymentIntent.retrieve(TEST_RESOURCE_ID) - resource.confirm() - http_client_mock.assert_requested( - "post", path="/v1/payment_intents/%s/confirm" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.PaymentIntent) - - def test_can_confirm_classmethod(self, http_client_mock): - resource = stripe.PaymentIntent.confirm(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", path="/v1/payment_intents/%s/confirm" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.PaymentIntent) diff --git a/tests/api_resources/test_payment_method.py b/tests/api_resources/test_payment_method.py deleted file mode 100644 index 12efe3c83..000000000 --- a/tests/api_resources/test_payment_method.py +++ /dev/null @@ -1,87 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "pm_123" - - -class TestPaymentMethod(object): - def test_is_listable(self, http_client_mock): - resources = stripe.PaymentMethod.list(customer="cus_123", type="card") - http_client_mock.assert_requested("get", path="/v1/payment_methods") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.PaymentMethod) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.PaymentMethod.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/payment_methods/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.PaymentMethod) - - def test_is_creatable(self, http_client_mock): - resource = stripe.PaymentMethod.create( - type="card", card={"token": "tok_123"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/payment_methods", - post_data="type=card&card[token]=tok_123", - ) - assert isinstance(resource, stripe.PaymentMethod) - - def test_is_saveable(self, http_client_mock): - resource = stripe.PaymentMethod.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/payment_methods/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.PaymentMethod.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/payment_methods/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.PaymentMethod) - - def test_can_attach(self, http_client_mock): - resource = stripe.PaymentMethod.retrieve(TEST_RESOURCE_ID) - resource = resource.attach(customer="cus_123") - http_client_mock.assert_requested( - "post", - path="/v1/payment_methods/%s/attach" % TEST_RESOURCE_ID, - post_data="customer=cus_123", - ) - assert isinstance(resource, stripe.PaymentMethod) - - def test_can_attach_classmethod(self, http_client_mock): - resource = stripe.PaymentMethod.attach( - TEST_RESOURCE_ID, customer="cus_123" - ) - http_client_mock.assert_requested( - "post", - path="/v1/payment_methods/%s/attach" % TEST_RESOURCE_ID, - post_data="customer=cus_123", - ) - assert isinstance(resource, stripe.PaymentMethod) - - def test_can_detach(self, http_client_mock): - resource = stripe.PaymentMethod.retrieve(TEST_RESOURCE_ID) - resource = resource.detach() - http_client_mock.assert_requested( - "post", path="/v1/payment_methods/%s/detach" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.PaymentMethod) - - def test_can_detach_classmethod(self, http_client_mock): - resource = stripe.PaymentMethod.detach(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", path="/v1/payment_methods/%s/detach" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.PaymentMethod) diff --git a/tests/api_resources/test_payout.py b/tests/api_resources/test_payout.py deleted file mode 100644 index 95e4f415f..000000000 --- a/tests/api_resources/test_payout.py +++ /dev/null @@ -1,77 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "po_123" - - -class TestPayout(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Payout.list() - http_client_mock.assert_requested("get", path="/v1/payouts") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Payout) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Payout.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/payouts/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Payout) - - def test_is_creatable(self, http_client_mock): - resource = stripe.Payout.create(amount=100, currency="usd") - http_client_mock.assert_requested( - "post", path="/v1/payouts", post_data="amount=100¤cy=usd" - ) - assert isinstance(resource, stripe.Payout) - - def test_is_saveable(self, http_client_mock): - resource = stripe.Payout.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/payouts/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.Payout.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/payouts/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.Payout) - - def test_can_cancel(self, http_client_mock): - payout = stripe.Payout.retrieve(TEST_RESOURCE_ID) - resource = payout.cancel() - http_client_mock.assert_requested( - "post", path="/v1/payouts/%s/cancel" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Payout) - - def test_can_cancel_classmethod(self, http_client_mock): - resource = stripe.Payout.cancel(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", path="/v1/payouts/%s/cancel" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Payout) - - def test_can_reverse(self, http_client_mock): - payout = stripe.Payout.retrieve(TEST_RESOURCE_ID) - resource = payout.reverse() - http_client_mock.assert_requested( - "post", path="/v1/payouts/%s/reverse" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Payout) - - def test_can_reverse_classmethod(self, http_client_mock): - resource = stripe.Payout.reverse(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", path="/v1/payouts/%s/reverse" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Payout) diff --git a/tests/api_resources/test_plan.py b/tests/api_resources/test_plan.py deleted file mode 100644 index 58039deb2..000000000 --- a/tests/api_resources/test_plan.py +++ /dev/null @@ -1,70 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "250FF" - - -class TestPlan(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Plan.list() - http_client_mock.assert_requested("get", path="/v1/plans") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Plan) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Plan.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/plans/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Plan) - - def test_is_creatable(self, http_client_mock): - resource = stripe.Plan.create( - amount=100, - currency="usd", - id="plan_id", - interval="month", - nickname="plan_nickname", - ) - http_client_mock.assert_requested( - "post", - path="/v1/plans", - post_data="amount=100¤cy=usd&id=plan_id&interval=month&nickname=plan_nickname", - ) - assert isinstance(resource, stripe.Plan) - - def test_is_saveable(self, http_client_mock): - resource = stripe.Plan.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/plans/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.Plan.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/plans/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.Plan) - - def test_is_deletable(self, http_client_mock): - resource = stripe.Plan.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/plans/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_can_delete(self, http_client_mock): - resource = stripe.Plan.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/plans/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True diff --git a/tests/api_resources/test_price.py b/tests/api_resources/test_price.py deleted file mode 100644 index a0c35fc8f..000000000 --- a/tests/api_resources/test_price.py +++ /dev/null @@ -1,54 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "price_123" - - -class TestPrice(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Price.list() - http_client_mock.assert_requested("get", path="/v1/prices") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Price) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Price.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/prices/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Price) - - def test_is_creatable(self, http_client_mock): - resource = stripe.Price.create( - unit_amount=1000, - currency="usd", - recurring={"interval": "month"}, - product_data={"name": "price_nickname"}, - ) - http_client_mock.assert_requested( - "post", - path="/v1/prices", - post_data="unit_amount=1000¤cy=usd&recurring[interval]=month&product_data[name]=price_nickname", - ) - assert isinstance(resource, stripe.Price) - - def test_is_saveable(self, http_client_mock): - resource = stripe.Price.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/prices/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.Price.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/prices/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.Price) diff --git a/tests/api_resources/test_product.py b/tests/api_resources/test_product.py deleted file mode 100644 index 071b33c53..000000000 --- a/tests/api_resources/test_product.py +++ /dev/null @@ -1,62 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "prod_123" - - -class TestProduct(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Product.list() - http_client_mock.assert_requested("get", path="/v1/products") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Product) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Product.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/products/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Product) - - def test_is_creatable(self, http_client_mock): - resource = stripe.Product.create(name="NAME") - http_client_mock.assert_requested( - "post", path="/v1/products", post_data="name=NAME" - ) - assert isinstance(resource, stripe.Product) - - def test_is_saveable(self, http_client_mock): - resource = stripe.Product.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/products/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.Product.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/products/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.Product) - - def test_is_deletable(self, http_client_mock): - resource = stripe.Product.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/products/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_can_delete(self, http_client_mock): - resource = stripe.Product.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/products/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True diff --git a/tests/api_resources/test_refund.py b/tests/api_resources/test_refund.py deleted file mode 100644 index 179dcb577..000000000 --- a/tests/api_resources/test_refund.py +++ /dev/null @@ -1,47 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "re_123" - - -class TestRefund(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Refund.list() - http_client_mock.assert_requested("get", path="/v1/refunds") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Refund) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Refund.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/refunds/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Refund) - - def test_is_creatable(self, http_client_mock): - resource = stripe.Refund.create(charge="ch_123") - http_client_mock.assert_requested( - "post", path="/v1/refunds", post_data="charge=ch_123" - ) - assert isinstance(resource, stripe.Refund) - - def test_is_saveable(self, http_client_mock): - resource = stripe.Refund.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/refunds/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.Refund.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/refunds/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.Refund) diff --git a/tests/api_resources/test_review.py b/tests/api_resources/test_review.py deleted file mode 100644 index e7b46257d..000000000 --- a/tests/api_resources/test_review.py +++ /dev/null @@ -1,34 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "prv_123" - - -class TestReview(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Review.list() - http_client_mock.assert_requested("get", path="/v1/reviews") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Review) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Review.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/reviews/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Review) - - def test_can_approve(self, http_client_mock): - resource = stripe.Review.retrieve(TEST_RESOURCE_ID) - resource.approve() - http_client_mock.assert_requested( - "post", path="/v1/reviews/%s/approve" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Review) - - def test_can_approve_classmethod(self, http_client_mock): - resource = stripe.Review.approve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", path="/v1/reviews/%s/approve" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Review) diff --git a/tests/api_resources/test_setup_attempt.py b/tests/api_resources/test_setup_attempt.py deleted file mode 100644 index 3c4261f88..000000000 --- a/tests/api_resources/test_setup_attempt.py +++ /dev/null @@ -1,13 +0,0 @@ -import stripe - - -class TestSetupAttempt(object): - def test_is_listable(self, http_client_mock): - resources = stripe.SetupAttempt.list(setup_intent="seti_123") - http_client_mock.assert_requested( - "get", - path="/v1/setup_attempts", - query_string="setup_intent=seti_123", - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.SetupAttempt) diff --git a/tests/api_resources/test_setup_intent.py b/tests/api_resources/test_setup_intent.py deleted file mode 100644 index 3b13ac3f9..000000000 --- a/tests/api_resources/test_setup_intent.py +++ /dev/null @@ -1,81 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "seti_123" - - -class TestSetupIntent(object): - def test_is_listable(self, http_client_mock): - resources = stripe.SetupIntent.list() - http_client_mock.assert_requested("get", path="/v1/setup_intents") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.SetupIntent) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.SetupIntent.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/setup_intents/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.SetupIntent) - - def test_is_creatable(self, http_client_mock): - resource = stripe.SetupIntent.create(payment_method_types=["card"]) - http_client_mock.assert_requested( - "post", - path="/v1/setup_intents", - post_data="payment_method_types[0]=card", - ) - assert isinstance(resource, stripe.SetupIntent) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.SetupIntent.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/setup_intents/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.SetupIntent) - - def test_is_saveable(self, http_client_mock): - resource = stripe.SetupIntent.retrieve(TEST_RESOURCE_ID) - - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/setup_intents/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.SetupIntent) - - def test_can_cancel(self, http_client_mock): - resource = stripe.SetupIntent.retrieve(TEST_RESOURCE_ID) - resource.cancel() - http_client_mock.assert_requested( - "post", path="/v1/setup_intents/%s/cancel" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.SetupIntent) - - def test_can_cancel_classmethod(self, http_client_mock): - resource = stripe.SetupIntent.cancel(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", path="/v1/setup_intents/%s/cancel" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.SetupIntent) - - def test_can_confirm(self, http_client_mock): - resource = stripe.SetupIntent.retrieve(TEST_RESOURCE_ID) - resource.confirm() - http_client_mock.assert_requested( - "post", path="/v1/setup_intents/%s/confirm" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.SetupIntent) - - def test_can_confirm_classmethod(self, http_client_mock): - resource = stripe.SetupIntent.confirm(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", path="/v1/setup_intents/%s/confirm" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.SetupIntent) diff --git a/tests/api_resources/test_source_transaction.py b/tests/api_resources/test_source_transaction.py deleted file mode 100644 index 5191c061b..000000000 --- a/tests/api_resources/test_source_transaction.py +++ /dev/null @@ -1,16 +0,0 @@ -import stripe - - -class TestSourceTransaction(object): - def test_is_listable(self, http_client_mock): - source = stripe.Source.construct_from( - {"id": "src_123", "object": "source"}, stripe.api_key - ) - source_transactions = source.list_source_transactions() - http_client_mock.assert_requested( - "get", path="/v1/sources/src_123/source_transactions" - ) - assert isinstance(source_transactions.data, list) - assert isinstance( - source_transactions.data[0], stripe.SourceTransaction - ) diff --git a/tests/api_resources/test_subscription.py b/tests/api_resources/test_subscription.py deleted file mode 100644 index e178e75cc..000000000 --- a/tests/api_resources/test_subscription.py +++ /dev/null @@ -1,75 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "sub_123" - - -class TestSubscription(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Subscription.list() - http_client_mock.assert_requested("get", path="/v1/subscriptions") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Subscription) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Subscription.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/subscriptions/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Subscription) - - def test_is_creatable(self, http_client_mock): - resource = stripe.Subscription.create(customer="cus_123") - http_client_mock.assert_requested( - "post", path="/v1/subscriptions", post_data="customer=cus_123" - ) - assert isinstance(resource, stripe.Subscription) - - def test_is_saveable(self, http_client_mock): - resource = stripe.Subscription.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/subscriptions/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.Subscription.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/subscriptions/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.Subscription) - - def test_is_deletable(self, http_client_mock): - resource = stripe.Subscription.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/subscriptions/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Subscription) - - def test_can_delete(self, http_client_mock): - resource = stripe.Subscription.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/subscriptions/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Subscription) - - def test_can_delete_discount(self, http_client_mock): - sub = stripe.Subscription.retrieve(TEST_RESOURCE_ID) - sub.delete_discount() - http_client_mock.assert_requested( - "delete", path="/v1/subscriptions/%s/discount" % sub.id - ) - - def test_can_delete_discount_classmethod(self, http_client_mock): - stripe.Subscription.delete_discount(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/subscriptions/%s/discount" % TEST_RESOURCE_ID - ) diff --git a/tests/api_resources/test_subscription_item.py b/tests/api_resources/test_subscription_item.py deleted file mode 100644 index 0f96c02db..000000000 --- a/tests/api_resources/test_subscription_item.py +++ /dev/null @@ -1,70 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "si_123" - - -class TestSubscriptionItem(object): - def test_is_listable(self, http_client_mock): - resources = stripe.SubscriptionItem.list(subscription="sub_123") - http_client_mock.assert_requested( - "get", - path="/v1/subscription_items", - query_string="subscription=sub_123", - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.SubscriptionItem) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.SubscriptionItem.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/subscription_items/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.SubscriptionItem) - - def test_is_creatable(self, http_client_mock): - resource = stripe.SubscriptionItem.create( - price="price_123", subscription="sub_123" - ) - http_client_mock.assert_requested( - "post", - path="/v1/subscription_items", - post_data="price=price_123&subscription=sub_123", - ) - assert isinstance(resource, stripe.SubscriptionItem) - - def test_is_saveable(self, http_client_mock): - resource = stripe.SubscriptionItem.retrieve(TEST_RESOURCE_ID) - resource.price = "price_123" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/subscription_items/%s" % TEST_RESOURCE_ID, - post_data="price=price_123", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.SubscriptionItem.modify( - TEST_RESOURCE_ID, price="price_123" - ) - http_client_mock.assert_requested( - "post", - path="/v1/subscription_items/%s" % TEST_RESOURCE_ID, - post_data="price=price_123", - ) - assert isinstance(resource, stripe.SubscriptionItem) - - def test_is_deletable(self, http_client_mock): - resource = stripe.SubscriptionItem.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/subscription_items/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_can_delete(self, http_client_mock): - resource = stripe.SubscriptionItem.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/subscription_items/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True diff --git a/tests/api_resources/test_subscription_schedule.py b/tests/api_resources/test_subscription_schedule.py deleted file mode 100644 index 20268bc26..000000000 --- a/tests/api_resources/test_subscription_schedule.py +++ /dev/null @@ -1,85 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "sub_sched_123" - - -class TestSubscriptionScheduleSchedule(object): - def test_is_listable(self, http_client_mock): - resources = stripe.SubscriptionSchedule.list() - http_client_mock.assert_requested( - "get", path="/v1/subscription_schedules" - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.SubscriptionSchedule) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.SubscriptionSchedule.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/subscription_schedules/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.SubscriptionSchedule) - - def test_is_creatable(self, http_client_mock): - resource = stripe.SubscriptionSchedule.create(customer="cus_123") - http_client_mock.assert_requested( - "post", - path="/v1/subscription_schedules", - post_data="customer=cus_123", - ) - assert isinstance(resource, stripe.SubscriptionSchedule) - - def test_is_saveable(self, http_client_mock): - resource = stripe.SubscriptionSchedule.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/subscription_schedules/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.SubscriptionSchedule.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/subscription_schedules/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.SubscriptionSchedule) - - def test_can_cancel(self, http_client_mock): - resource = stripe.SubscriptionSchedule.retrieve(TEST_RESOURCE_ID) - resource = resource.cancel() - http_client_mock.assert_requested( - "post", - path="/v1/subscription_schedules/%s/cancel" % TEST_RESOURCE_ID, - ) - assert isinstance(resource, stripe.SubscriptionSchedule) - - def test_can_cancel_classmethod(self, http_client_mock): - resource = stripe.SubscriptionSchedule.cancel(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", - path="/v1/subscription_schedules/%s/cancel" % TEST_RESOURCE_ID, - ) - assert isinstance(resource, stripe.SubscriptionSchedule) - - def test_can_release(self, http_client_mock): - resource = stripe.SubscriptionSchedule.retrieve(TEST_RESOURCE_ID) - resource = resource.release() - http_client_mock.assert_requested( - "post", - path="/v1/subscription_schedules/%s/release" % TEST_RESOURCE_ID, - ) - assert isinstance(resource, stripe.SubscriptionSchedule) - - def test_can_release_classmethod(self, http_client_mock): - resource = stripe.SubscriptionSchedule.release(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", - path="/v1/subscription_schedules/%s/release" % TEST_RESOURCE_ID, - ) - assert isinstance(resource, stripe.SubscriptionSchedule) diff --git a/tests/api_resources/test_tax_code.py b/tests/api_resources/test_tax_code.py deleted file mode 100644 index b267001b4..000000000 --- a/tests/api_resources/test_tax_code.py +++ /dev/null @@ -1,19 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "txcd_123" - - -class TestTaxCode(object): - def test_is_listable(self, http_client_mock): - resources = stripe.TaxCode.list() - http_client_mock.assert_requested("get", path="/v1/tax_codes") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.TaxCode) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.TaxCode.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/tax_codes/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.TaxCode) diff --git a/tests/api_resources/test_tax_rate.py b/tests/api_resources/test_tax_rate.py deleted file mode 100644 index c8113078d..000000000 --- a/tests/api_resources/test_tax_rate.py +++ /dev/null @@ -1,51 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "txr_123" - - -class TestTaxRate(object): - def test_is_listable(self, http_client_mock): - resources = stripe.TaxRate.list() - http_client_mock.assert_requested("get", path="/v1/tax_rates") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.TaxRate) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.TaxRate.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/tax_rates/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.TaxRate) - - def test_is_creatable(self, http_client_mock): - resource = stripe.TaxRate.create( - display_name="name", inclusive=False, percentage=10.15 - ) - http_client_mock.assert_requested( - "post", - path="/v1/tax_rates", - post_data="display_name=name&inclusive=false&percentage=10.15", - ) - assert isinstance(resource, stripe.TaxRate) - - def test_is_saveable(self, http_client_mock): - resource = stripe.TaxRate.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/tax_rates/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.TaxRate.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/tax_rates/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.TaxRate) diff --git a/tests/api_resources/test_topup.py b/tests/api_resources/test_topup.py deleted file mode 100644 index 10938d232..000000000 --- a/tests/api_resources/test_topup.py +++ /dev/null @@ -1,70 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "tu_123" - - -class TestTopup(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Topup.list() - http_client_mock.assert_requested("get", path="/v1/topups") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Topup) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Topup.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/topups/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Topup) - - def test_is_creatable(self, http_client_mock): - resource = stripe.Topup.create( - amount=100, - currency="usd", - source="src_123", - description="description", - statement_descriptor="statement descriptor", - ) - http_client_mock.assert_requested( - "post", - path="/v1/topups", - post_data="amount=100¤cy=usd&description=description&source=src_123&statement_descriptor=statement+descriptor", - ) - assert isinstance(resource, stripe.Topup) - - def test_is_saveable(self, http_client_mock): - resource = stripe.Topup.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/topups/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.Topup.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/topups/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.Topup) - - def test_can_cancel(self, http_client_mock): - resource = stripe.Topup.retrieve(TEST_RESOURCE_ID) - resource = resource.cancel() - http_client_mock.assert_requested( - "post", path="/v1/topups/%s/cancel" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Topup) - - def test_can_cancel_classmethod(self, http_client_mock): - resource = stripe.Topup.cancel(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "post", path="/v1/topups/%s/cancel" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Topup) diff --git a/tests/api_resources/test_transfer.py b/tests/api_resources/test_transfer.py deleted file mode 100644 index 9883b04b9..000000000 --- a/tests/api_resources/test_transfer.py +++ /dev/null @@ -1,96 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "tr_123" -TEST_REVERSAL_ID = "trr_123" - - -class TestTransfer(object): - def test_is_listable(self, http_client_mock): - resources = stripe.Transfer.list() - http_client_mock.assert_requested("get", path="/v1/transfers") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Transfer) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Transfer.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/transfers/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.Transfer) - - def test_is_creatable(self, http_client_mock): - resource = stripe.Transfer.create( - amount=100, currency="usd", destination="acct_123" - ) - http_client_mock.assert_requested( - "post", - path="/v1/transfers", - post_data="amount=100¤cy=usd&destination=acct_123", - ) - assert isinstance(resource, stripe.Transfer) - - def test_is_saveable(self, http_client_mock): - resource = stripe.Transfer.retrieve(TEST_RESOURCE_ID) - resource.metadata["key"] = "value" - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/transfers/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.Transfer.modify( - TEST_RESOURCE_ID, metadata={"key": "value"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/transfers/%s" % TEST_RESOURCE_ID, - post_data="metadata[key]=value", - ) - assert isinstance(resource, stripe.Transfer) - - -class TestTransferReversals: - def test_is_listable(self, http_client_mock): - resources = stripe.Transfer.list_reversals(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/transfers/%s/reversals" % TEST_RESOURCE_ID - ) - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.Reversal) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.Transfer.retrieve_reversal( - TEST_RESOURCE_ID, TEST_REVERSAL_ID - ) - http_client_mock.assert_requested( - "get", - path="/v1/transfers/%s/reversals/%s" - % (TEST_RESOURCE_ID, TEST_REVERSAL_ID), - ) - assert isinstance(resource, stripe.Reversal) - - def test_is_creatable(self, http_client_mock): - resource = stripe.Transfer.create_reversal( - TEST_RESOURCE_ID, amount=100 - ) - http_client_mock.assert_requested( - "post", - path="/v1/transfers/%s/reversals" % TEST_RESOURCE_ID, - post_data="amount=100", - ) - assert isinstance(resource, stripe.Reversal) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.Transfer.modify_reversal( - TEST_RESOURCE_ID, TEST_REVERSAL_ID, metadata={"foo": "bar"} - ) - http_client_mock.assert_requested( - "post", - path="/v1/transfers/%s/reversals/%s" - % (TEST_RESOURCE_ID, TEST_REVERSAL_ID), - post_data="metadata[foo]=bar", - ) - assert isinstance(resource, stripe.Reversal) diff --git a/tests/api_resources/test_webhook_endpoint.py b/tests/api_resources/test_webhook_endpoint.py deleted file mode 100644 index 05749a023..000000000 --- a/tests/api_resources/test_webhook_endpoint.py +++ /dev/null @@ -1,68 +0,0 @@ -import stripe - - -TEST_RESOURCE_ID = "we_123" - - -class TestWebhookEndpoint(object): - def test_is_listable(self, http_client_mock): - resources = stripe.WebhookEndpoint.list() - http_client_mock.assert_requested("get", path="/v1/webhook_endpoints") - assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.WebhookEndpoint) - - def test_is_retrievable(self, http_client_mock): - resource = stripe.WebhookEndpoint.retrieve(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "get", path="/v1/webhook_endpoints/%s" % TEST_RESOURCE_ID - ) - assert isinstance(resource, stripe.WebhookEndpoint) - - def test_is_creatable(self, http_client_mock): - resource = stripe.WebhookEndpoint.create( - enabled_events=["charge.succeeded"], url="https://stripe.com" - ) - http_client_mock.assert_requested( - "post", - path="/v1/webhook_endpoints", - post_data="enabled_events[0]=charge.succeeded&url=https://stripe.com", - ) - assert isinstance(resource, stripe.WebhookEndpoint) - - def test_is_saveable(self, http_client_mock): - resource = stripe.WebhookEndpoint.retrieve(TEST_RESOURCE_ID) - resource.enabled_events = ["charge.succeeded"] - resource.save() - http_client_mock.assert_requested( - "post", - path="/v1/webhook_endpoints/%s" % TEST_RESOURCE_ID, - post_data="enabled_events[0]=charge.succeeded", - ) - - def test_is_modifiable(self, http_client_mock): - resource = stripe.WebhookEndpoint.modify( - TEST_RESOURCE_ID, - enabled_events=["charge.succeeded"], - url="https://stripe.com", - ) - http_client_mock.assert_requested( - "post", - path="/v1/webhook_endpoints/%s" % TEST_RESOURCE_ID, - post_data="enabled_events[0]=charge.succeeded&url=https://stripe.com", - ) - assert isinstance(resource, stripe.WebhookEndpoint) - - def test_is_deletable(self, http_client_mock): - resource = stripe.WebhookEndpoint.retrieve(TEST_RESOURCE_ID) - resource.delete() - http_client_mock.assert_requested( - "delete", path="/v1/webhook_endpoints/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True - - def test_can_delete(self, http_client_mock): - resource = stripe.WebhookEndpoint.delete(TEST_RESOURCE_ID) - http_client_mock.assert_requested( - "delete", path="/v1/webhook_endpoints/%s" % TEST_RESOURCE_ID - ) - assert resource.deleted is True diff --git a/tests/test_api_requestor.py b/tests/test_api_requestor.py index fdec9846d..0b0e4b51c 100644 --- a/tests/test_api_requestor.py +++ b/tests/test_api_requestor.py @@ -1,5 +1,6 @@ import datetime import json +import re import tempfile import uuid from collections import OrderedDict @@ -812,6 +813,36 @@ def fail(): last_call.get_raw_header("X-Stripe-Client-User-Agent") ) + def test_source_field_is_md5_hex(self, requestor, http_client_mock): + http_client_mock.stub_request( + "get", path=self.v1_path, rbody="{}", rcode=200 + ) + requestor.request("get", self.v1_path, {}, base_address="api") + + last_call = http_client_mock.get_last_call() + client_ua = json.loads( + last_call.get_raw_header("X-Stripe-Client-User-Agent") + ) + assert "source" in client_ua + assert re.fullmatch(r"[0-9a-f]{32}", client_ua["source"]) + + def test_source_field_absent_when_uname_fails( + self, requestor, mocker, http_client_mock + ): + http_client_mock.stub_request( + "get", path=self.v1_path, rbody="{}", rcode=200 + ) + mocker.patch( + "stripe._api_requestor._get_uname_hash", return_value=None + ) + requestor.request("get", self.v1_path, {}, base_address="api") + + last_call = http_client_mock.get_last_call() + client_ua = json.loads( + last_call.get_raw_header("X-Stripe-Client-User-Agent") + ) + assert "source" not in client_ua + def test_uses_given_idempotency_key(self, requestor, http_client_mock): method = "post" http_client_mock.stub_request( diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 7b0474211..739554ef2 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -44594,7 +44594,7 @@ def test_v2_core_account_link_post_service( "fields": "eventually_due", "future_requirements": "include", }, - "configurations": ["storer"], + "configurations": ["merchant"], "refresh_url": "refresh_url", "return_url": "return_url", }, @@ -44603,7 +44603,7 @@ def test_v2_core_account_link_post_service( "fields": "eventually_due", "future_requirements": "include", }, - "configurations": ["storer"], + "configurations": ["merchant"], "refresh_url": "refresh_url", "return_url": "return_url", }, @@ -44616,7 +44616,7 @@ def test_v2_core_account_link_post_service( path="/v2/core/account_links", query_string="", api_base="https://api.stripe.com", - post_data='{"account":"account","use_case":{"account_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["storer"],"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["storer"],"refresh_url":"refresh_url","return_url":"return_url"},"type":"account_onboarding"}}', + post_data='{"account":"account","use_case":{"account_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["merchant"],"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["merchant"],"refresh_url":"refresh_url","return_url":"return_url"},"type":"account_onboarding"}}', is_json=True, ) @@ -44680,7 +44680,6 @@ def test_v2_core_batch_job_post_service( "http_method": "delete", "path": "/v1/subscriptions/:subscription_exposed_id", }, - "metadata": {"key": "metadata"}, "skip_validation": True, } ) @@ -44689,7 +44688,7 @@ def test_v2_core_batch_job_post_service( path="/v2/core/batch_jobs", query_string="", api_base="https://api.stripe.com", - post_data='{"endpoint":{"http_method":"delete","path":"/v1/subscriptions/:subscription_exposed_id"},"metadata":{"key":"metadata"},"skip_validation":true}', + post_data='{"endpoint":{"http_method":"delete","path":"/v1/subscriptions/:subscription_exposed_id"},"skip_validation":true}', is_json=True, ) @@ -46638,7 +46637,7 @@ def test_cannot_proceed_error_service( ) -> None: http_client_mock.stub_request( "post", - "/v2/extend/workflows/id_123/invoke", + "/v2/core/vault/us_bank_accounts/id_123/archive", rbody='{"error":{"type":"cannot_proceed","code":"default_payout_method_cannot_be_archived"}}', rcode=400, ) @@ -46648,30 +46647,15 @@ def test_cannot_proceed_error_service( ) try: - client.v2.extend.workflows.invoke( - "id_123", - { - "input_parameters": { - "int_key": 123, - "string_key": "value", - "boolean_key": True, - "object_key": { - "object_int_key": 123, - "object_string_key": "value", - "object_boolean_key": True, - }, - "array_key": [1, 2, 3], - }, - }, - ) + client.v2.core.vault.us_bank_accounts.archive("id_123") except _error.CannotProceedError: pass http_client_mock.assert_requested( "post", - path="/v2/extend/workflows/id_123/invoke", + path="/v2/core/vault/us_bank_accounts/id_123/archive", query_string="", api_base="https://api.stripe.com", - post_data='{"input_parameters":{"int_key":123,"string_key":"value","boolean_key":true,"object_key":{"object_int_key":123,"object_string_key":"value","object_boolean_key":true},"array_key":[1,2,3]}}', + post_data="{}", is_json=True, )