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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...types.authcode import Authcode
from ...types.avsresponsetext import Avsresponsetext
from ...types.cvvresponsetext import Cvvresponsetext
from ...types.order_id import OrderId
from ...types.resulttext import Resulttext


class TransactionDetailResponseData(UniversalBaseModel):
    """
    Response data from payment processor
    """

    response: typing.Optional[str] = None
    responsetext: Resulttext
    authcode: typing.Optional[Authcode] = None
    transactionid: str
    avsresponse: typing.Optional[str] = None
    avsresponse_text: typing.Optional[Avsresponsetext] = None
    cvvresponse: typing.Optional[str] = None
    cvvresponse_text: typing.Optional[Cvvresponsetext] = None
    orderid: typing.Optional[OrderId] = None
    type: typing.Optional[str] = None
    response_code: str
    response_code_text: str
    customer_vault_id: typing.Optional[str] = None
    emv_auth_response_data: typing.Optional[str] = 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
