diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 308945cbf..d48c9e4d1 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -baff58c9d515cdd5f5c3231d101989d588788c6f \ No newline at end of file +a048e64d0832201fc86c45de6f10db62ee780bef \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 28d67d2bf..02d7b3616 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2442 \ No newline at end of file +v2458 \ No newline at end of file diff --git a/stripe/_discount.py b/stripe/_discount.py index d62b10208..3f034e979 100644 --- a/stripe/_discount.py +++ b/stripe/_discount.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -26,7 +26,7 @@ class Source(StripeObject): """ The coupon that was redeemed to create this discount. """ - type: Literal["coupon"] + type: Union[Literal["coupon"], str] """ The source type of the discount. """ diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 4b0aca536..1df8dcc20 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -276,7 +276,7 @@ class Card(StripeObject): """ card: Optional[Card] - type: Optional[Literal["card"]] + type: Optional[Union[Literal["card"], str]] """ funding type of the underlying payment method. """ @@ -1703,7 +1703,7 @@ class Card(StripeObject): """ card: Optional[Card] - type: Optional[Literal["card"]] + type: Optional[Union[Literal["card"], str]] """ Funding type of the underlying payment method. """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index dcaa81981..009d3750b 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -2853,7 +2853,7 @@ class WechatPay(StripeObject): """ The client type that the end customer will pay from """ - setup_future_usage: Optional[Literal["none"]] + setup_future_usage: Optional[Union[Literal["none"], str]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 3a226e282..6f30a316f 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -296,7 +296,7 @@ class Card(StripeObject): """ card: Optional[Card] - type: Optional[Literal["card"]] + type: Optional[Union[Literal["card"], str]] """ funding type of the underlying payment method. """ @@ -1723,7 +1723,7 @@ class Card(StripeObject): """ card: Optional[Card] - type: Optional[Literal["card"]] + type: Optional[Union[Literal["card"], str]] """ Funding type of the underlying payment method. """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index eeda495c4..5afcf36b4 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -872,7 +872,7 @@ class AfterpayClearpay(StripeObject): """ class Alipay(StripeObject): - setup_future_usage: Optional[Literal["none"]] + setup_future_usage: Optional[Union[Literal["none"], str]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1817,7 +1817,7 @@ class WechatPay(StripeObject): """ The client type that the end customer will pay from """ - setup_future_usage: Optional[Literal["none"]] + setup_future_usage: Optional[Union[Literal["none"], str]] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/stripe/events/_v2_core_account_including_configuration_customer_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_customer_capability_status_updated_event.py index e15b8704b..ebb479694 100644 --- a/stripe/events/_v2_core_account_including_configuration_customer_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_customer_capability_status_updated_event.py @@ -5,7 +5,7 @@ from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, Optional, cast +from typing import Any, Dict, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -98,7 +98,7 @@ class V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent( class V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventData( StripeObject, ): - updated_capability: Literal["automatic_indirect_tax"] + updated_capability: Union[Literal["automatic_indirect_tax"], str] """ Open Enum. The capability which had its status updated. """ diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 34ad18d3a..205d04608 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -3365,7 +3365,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): """ The client type that the end customer will pay from """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired["Literal['none']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 551cc20aa..d01c33822 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -3494,7 +3494,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsWechatPay(TypedDict): """ The client type that the end customer will pay from """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired["Literal['none']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index a245fb194..c9e793236 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -3326,7 +3326,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsWechatPay(TypedDict): """ The client type that the end customer will pay from """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired["Literal['none']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index cd3c5cf6e..ee8e3693d 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -3325,7 +3325,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsWechatPay(TypedDict): """ The client type that the end customer will pay from """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired["Literal['none']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index bb1904127..1d54e48f7 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -1477,7 +1477,7 @@ class SessionCreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): class SessionCreateParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired["Literal['none']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2508,7 +2508,7 @@ class SessionCreateParamsPaymentMethodOptionsWechatPay(TypedDict): """ The client type that the end customer will pay from """ - setup_future_usage: NotRequired[Literal["none"]] + setup_future_usage: NotRequired["Literal['none']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/stripe/params/tax/_registration_create_params.py b/stripe/params/tax/_registration_create_params.py index 54501d240..aaee80a77 100644 --- a/stripe/params/tax/_registration_create_params.py +++ b/stripe/params/tax/_registration_create_params.py @@ -2060,7 +2060,7 @@ class RegistrationCreateParamsCountryOptionsSrStandard(TypedDict): class RegistrationCreateParamsCountryOptionsTh(TypedDict): - type: Literal["simplified"] + type: Union[Literal["simplified"], str] """ Type of registration to be created in `country`. """ diff --git a/stripe/params/v2/billing/_meter_event_adjustment_create_params.py b/stripe/params/v2/billing/_meter_event_adjustment_create_params.py index b39cc81f2..2de4e99d4 100644 --- a/stripe/params/v2/billing/_meter_event_adjustment_create_params.py +++ b/stripe/params/v2/billing/_meter_event_adjustment_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from typing import Union from typing_extensions import Literal, TypedDict @@ -12,7 +13,7 @@ class MeterEventAdjustmentCreateParams(TypedDict): """ The name of the meter event. Corresponds with the `event_name` field on a meter. """ - type: Literal["cancel"] + type: Union[Literal["cancel"], str] """ Specifies the type of cancellation. Currently supports canceling a single event. """ diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py index 2b3a9ed70..e15f9ad42 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -1719,7 +1719,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVer """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1732,7 +1732,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense( """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1745,7 +1745,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAsso """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1758,7 +1758,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecre """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1771,7 +1771,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVeri """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1784,7 +1784,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerificatio """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1797,7 +1797,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerification( """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -1823,7 +1823,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfAddress( """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1842,7 +1842,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration( """ Person that is signing the document. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1870,7 +1870,7 @@ class AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBenefici """ Person that is signing the document. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -2374,7 +2374,7 @@ class AccountCreateParamsIdentityIndividualDocumentsCompanyAuthorization( """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -2385,7 +2385,7 @@ class AccountCreateParamsIdentityIndividualDocumentsPassport(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -2398,7 +2398,7 @@ class AccountCreateParamsIdentityIndividualDocumentsPrimaryVerification( """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -2424,7 +2424,7 @@ class AccountCreateParamsIdentityIndividualDocumentsSecondaryVerification( """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -2448,7 +2448,7 @@ class AccountCreateParamsIdentityIndividualDocumentsVisa(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ diff --git a/stripe/params/v2/core/_account_token_create_params.py b/stripe/params/v2/core/_account_token_create_params.py index 35b792af6..b7fc2b86c 100644 --- a/stripe/params/v2/core/_account_token_create_params.py +++ b/stripe/params/v2/core/_account_token_create_params.py @@ -377,7 +377,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnersh """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -390,7 +390,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense( """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -403,7 +403,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumO """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -416,7 +416,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterial """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -429,7 +429,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyRegistratio """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -442,7 +442,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerifi """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -455,7 +455,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificatio """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -481,7 +481,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfAddress( """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -500,7 +500,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistratio """ Person that is signing the document. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -528,7 +528,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBen """ Person that is signing the document. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1048,7 +1048,7 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsCompanyAuthorization( """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1059,7 +1059,7 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsPassport(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1072,7 +1072,7 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerification( """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -1098,7 +1098,7 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerification( """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -1122,7 +1122,7 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsVisa(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index 7d0c4b91e..81d7c8dc6 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -1787,7 +1787,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVer """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1800,7 +1800,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyLicense( """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1813,7 +1813,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAsso """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1826,7 +1826,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecre """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1839,7 +1839,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVeri """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1852,7 +1852,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerificatio """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1865,7 +1865,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerification( """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -1891,7 +1891,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfAddress( """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1910,7 +1910,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfRegistration( """ Person that is signing the document. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -1938,7 +1938,7 @@ class AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBenefici """ Person that is signing the document. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -2444,7 +2444,7 @@ class AccountUpdateParamsIdentityIndividualDocumentsCompanyAuthorization( """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -2455,7 +2455,7 @@ class AccountUpdateParamsIdentityIndividualDocumentsPassport(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -2468,7 +2468,7 @@ class AccountUpdateParamsIdentityIndividualDocumentsPrimaryVerification( """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -2494,7 +2494,7 @@ class AccountUpdateParamsIdentityIndividualDocumentsSecondaryVerification( """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -2518,7 +2518,7 @@ class AccountUpdateParamsIdentityIndividualDocumentsVisa(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ diff --git a/stripe/params/v2/core/_event_destination_list_params.py b/stripe/params/v2/core/_event_destination_list_params.py index c0320468a..d0cd324a3 100644 --- a/stripe/params/v2/core/_event_destination_list_params.py +++ b/stripe/params/v2/core/_event_destination_list_params.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class EventDestinationListParams(TypedDict): - include: NotRequired[List[Literal["webhook_endpoint.url"]]] + include: NotRequired[List[Union[Literal["webhook_endpoint.url"], str]]] """ Additional fields to include in the response. Currently supports `webhook_endpoint.url`. """ diff --git a/stripe/params/v2/core/_event_destination_retrieve_params.py b/stripe/params/v2/core/_event_destination_retrieve_params.py index d43606b1d..ad0200416 100644 --- a/stripe/params/v2/core/_event_destination_retrieve_params.py +++ b/stripe/params/v2/core/_event_destination_retrieve_params.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class EventDestinationRetrieveParams(TypedDict): - include: NotRequired[List[Literal["webhook_endpoint.url"]]] + include: NotRequired[List[Union[Literal["webhook_endpoint.url"], str]]] """ Additional fields to include in the response. """ diff --git a/stripe/params/v2/core/_event_destination_update_params.py b/stripe/params/v2/core/_event_destination_update_params.py index bc0feb0b8..b9b59ba83 100644 --- a/stripe/params/v2/core/_event_destination_update_params.py +++ b/stripe/params/v2/core/_event_destination_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List, Optional +from typing import Dict, List, Optional, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -14,7 +14,7 @@ class EventDestinationUpdateParams(TypedDict): """ The list of events to enable for this endpoint. """ - include: NotRequired[List[Literal["webhook_endpoint.url"]]] + include: NotRequired[List[Union[Literal["webhook_endpoint.url"], str]]] """ Additional fields to include in the response. Currently supports `webhook_endpoint.url`. """ diff --git a/stripe/params/v2/core/accounts/_person_create_params.py b/stripe/params/v2/core/accounts/_person_create_params.py index 4e7b02531..74e36cf35 100644 --- a/stripe/params/v2/core/accounts/_person_create_params.py +++ b/stripe/params/v2/core/accounts/_person_create_params.py @@ -245,7 +245,7 @@ class PersonCreateParamsDocumentsCompanyAuthorization(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -256,7 +256,7 @@ class PersonCreateParamsDocumentsPassport(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -267,7 +267,7 @@ class PersonCreateParamsDocumentsPrimaryVerification(TypedDict): """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -289,7 +289,7 @@ class PersonCreateParamsDocumentsSecondaryVerification(TypedDict): """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -311,7 +311,7 @@ class PersonCreateParamsDocumentsVisa(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ diff --git a/stripe/params/v2/core/accounts/_person_token_create_params.py b/stripe/params/v2/core/accounts/_person_token_create_params.py index 15a321f83..3b1b8fc23 100644 --- a/stripe/params/v2/core/accounts/_person_token_create_params.py +++ b/stripe/params/v2/core/accounts/_person_token_create_params.py @@ -239,7 +239,7 @@ class PersonTokenCreateParamsDocumentsCompanyAuthorization(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -250,7 +250,7 @@ class PersonTokenCreateParamsDocumentsPassport(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -261,7 +261,7 @@ class PersonTokenCreateParamsDocumentsPrimaryVerification(TypedDict): """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -285,7 +285,7 @@ class PersonTokenCreateParamsDocumentsSecondaryVerification(TypedDict): """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -309,7 +309,7 @@ class PersonTokenCreateParamsDocumentsVisa(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ diff --git a/stripe/params/v2/core/accounts/_person_update_params.py b/stripe/params/v2/core/accounts/_person_update_params.py index ed45a4816..2318e45f2 100644 --- a/stripe/params/v2/core/accounts/_person_update_params.py +++ b/stripe/params/v2/core/accounts/_person_update_params.py @@ -247,7 +247,7 @@ class PersonUpdateParamsDocumentsCompanyAuthorization(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -258,7 +258,7 @@ class PersonUpdateParamsDocumentsPassport(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -269,7 +269,7 @@ class PersonUpdateParamsDocumentsPrimaryVerification(TypedDict): """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -291,7 +291,7 @@ class PersonUpdateParamsDocumentsSecondaryVerification(TypedDict): """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -313,7 +313,7 @@ class PersonUpdateParamsDocumentsVisa(TypedDict): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index cb01a9d1b..48f8e20bc 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -1166,7 +1166,7 @@ class Sr(StripeObject): """ class Th(StripeObject): - type: Literal["simplified"] + type: Union[Literal["simplified"], str] """ Type of registration in `country`. """ diff --git a/stripe/v2/billing/_meter_event_adjustment.py b/stripe/v2/billing/_meter_event_adjustment.py index 741df9078..1a74d9bc3 100644 --- a/stripe/v2/billing/_meter_event_adjustment.py +++ b/stripe/v2/billing/_meter_event_adjustment.py @@ -48,7 +48,7 @@ class Cancel(StripeObject): """ Open Enum. The meter event adjustment's status. """ - type: Literal["cancel"] + type: Union[Literal["cancel"], str] """ Open Enum. Specifies the type of cancellation. Currently supports canceling a single event. """ diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index 84fabf29f..df5978725 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -2981,7 +2981,7 @@ class BankAccountOwnershipVerification(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -2991,7 +2991,7 @@ class CompanyLicense(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -3001,7 +3001,7 @@ class CompanyMemorandumOfAssociation(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -3011,7 +3011,7 @@ class CompanyMinisterialDecree(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -3021,7 +3021,7 @@ class CompanyRegistrationVerification(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -3031,7 +3031,7 @@ class CompanyTaxIdVerification(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -3051,7 +3051,7 @@ class FrontBack(StripeObject): """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens for the front and back of the verification document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -3062,7 +3062,7 @@ class ProofOfAddress(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -3082,7 +3082,7 @@ class Signer(StripeObject): """ Person that is signing the document. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -3103,7 +3103,7 @@ class Signer(StripeObject): """ Person that is signing the document. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -3634,7 +3634,7 @@ class CompanyAuthorization(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -3644,7 +3644,7 @@ class Passport(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -3664,7 +3664,7 @@ class FrontBack(StripeObject): """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens for the front and back of the verification document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -3685,7 +3685,7 @@ class FrontBack(StripeObject): """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens for the front and back of the verification document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -3696,7 +3696,7 @@ class Visa(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ diff --git a/stripe/v2/core/_account_person.py b/stripe/v2/core/_account_person.py index f4f06045a..e1c4a1608 100644 --- a/stripe/v2/core/_account_person.py +++ b/stripe/v2/core/_account_person.py @@ -138,7 +138,7 @@ class CompanyAuthorization(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -148,7 +148,7 @@ class Passport(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ @@ -168,7 +168,7 @@ class FrontBack(StripeObject): """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens for the front and back of the verification document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -189,7 +189,7 @@ class FrontBack(StripeObject): """ The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens for the front and back of the verification document. """ - type: Literal["front_back"] + type: Union[Literal["front_back"], str] """ The format of the verification document. Currently supports `front_back` only. """ @@ -200,7 +200,7 @@ class Visa(StripeObject): """ One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. """ - type: Literal["files"] + type: Union[Literal["files"], str] """ The format of the document. Currently supports `files` only. """ diff --git a/stripe/v2/core/_event.py b/stripe/v2/core/_event.py index fe014db67..18f8c3348 100644 --- a/stripe/v2/core/_event.py +++ b/stripe/v2/core/_event.py @@ -40,7 +40,7 @@ class Request(StripeObject): """ Information on the API request that instigated the event. """ - type: Literal["request"] + type: Union[Literal["request"], str] """ Event reason type. """