# 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.cardexp import Cardexp
from ...types.cardholder import Cardholder
from ...types.cardnumber import Cardnumber
from ...types.cardzip import Cardzip
from .request_payment_validate_payment_method_method import RequestPaymentValidatePaymentMethodMethod


class RequestPaymentValidatePaymentMethod(UniversalBaseModel):
    """
    Object describing payment method to use for validation.
    """

    method: RequestPaymentValidatePaymentMethodMethod
    cardnumber: Cardnumber
    cardexp: Cardexp
    cardzip: Cardzip
    card_holder: typing_extensions.Annotated[Cardholder, FieldMetadata(alias="cardHolder")]

    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
