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

from ...core.pydantic_utilities import UniversalBaseModel
import pydantic
from .bank_address import BankAddress
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import typing


class BankLookupResponse(UniversalBaseModel):
    """
    Examples
    --------
    from mercoa.bank_lookup import BankAddress, BankLookupResponse

    BankLookupResponse(
        bank_name="Bank of America",
        bank_address=BankAddress(
            address="123 Main St",
            city="Anytown",
            state="CA",
            postal_code="12345",
            postal_code_extension="6789",
        ),
    )
    """

    bank_name: str = pydantic.Field(alias="bankName")
    bank_address: BankAddress = pydantic.Field(alias="bankAddress")

    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
