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

import datetime as dt
import typing

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


class VendorResponseStoredMethod(UniversalBaseModel):
    """
    Stored payment method information
    """

    id_pmethod: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="IdPmethod")] = None
    method: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Method")] = None
    descriptor: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Descriptor")] = None
    masked_account: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="MaskedAccount")] = None
    exp_date: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ExpDate")] = None
    holder_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="HolderName")] = None
    ach_sec_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="AchSecCode")] = None
    ach_holder_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="AchHolderType")] = None
    is_validated_ach: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="IsValidatedACH")] = None
    bin: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="BIN")] = None
    bin_data: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="binData")] = None
    aba: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="ABA")] = None
    postal_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="PostalCode")] = None
    method_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="MethodType")] = None
    last_updated: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="LastUpdated")] = None
    card_updated_on: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="CardUpdatedOn")] = (
        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
