# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
import typing_extensions
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...core.serialization import FieldMetadata
from ...types.account_number import AccountNumber
from ...types.bank_account_holder_name import BankAccountHolderName
from ...types.bank_name import BankName
from ...types.routing_account import RoutingAccount
from ...types.type_account import TypeAccount


class RequestOutAuthorizeVendorBillingData(UniversalBaseModel):
    """
    Object containing vendor's bank information. This object is deprecated for this endpoint. Use the `paymentMethod` object in payout authorize requests instead.
    """

    bank_name: typing_extensions.Annotated[typing.Optional[BankName], FieldMetadata(alias="bankName")] = None
    routing_account: typing_extensions.Annotated[
        typing.Optional[RoutingAccount], FieldMetadata(alias="routingAccount")
    ] = None
    account_number: typing_extensions.Annotated[
        typing.Optional[AccountNumber], FieldMetadata(alias="accountNumber")
    ] = None
    type_account: typing_extensions.Annotated[typing.Optional[TypeAccount], FieldMetadata(alias="typeAccount")] = None
    bank_account_holder_name: typing_extensions.Annotated[
        typing.Optional[BankAccountHolderName], FieldMetadata(alias="bankAccountHolderName")
    ] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
