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

from ..core.pydantic_utilities import UniversalBaseModel
import typing_extensions
import typing
from ..core.serialization import FieldMetadata
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class V1Card(UniversalBaseModel):
    """
    Card metadata of the requested BIN.
    """

    bin: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIN")] = pydantic.Field(default=None)
    """
    BIN of the card.
    """

    issuer_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name of the card issuer bank.
    """

    country_code: typing.Optional[str] = pydantic.Field(default=None)
    """
    Country code of the card.
    """

    currency: typing.Optional[str] = pydantic.Field(default=None)
    """
    Currency of the card.
    """

    card_type: typing.Optional[str] = pydantic.Field(default=None)
    """
    Type of the card.
    """

    card_category: typing.Optional[str] = pydantic.Field(default=None)
    """
    Category of the card.
    """

    card_scheme: typing.Optional[str] = pydantic.Field(default=None)
    """
    Scheme of the card.
    """

    card_last_four_digits: typing.Optional[str] = pydantic.Field(default=None)
    """
    Last four digits of the card number.
    """

    card_expiry: typing.Optional[str] = pydantic.Field(default=None)
    """
    Expiry date of the card.
    """

    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
