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

from .transaction_response_base import TransactionResponseBase
import typing
from .transaction_failure_reason import TransactionFailureReason
import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class TransactionResponseBankToBankBase(TransactionResponseBase):
    failure_reason: typing.Optional[TransactionFailureReason] = pydantic.Field(alias="failureReason", default=None)
    """
    If the invoice failed to be paid, this field will be populated with the reason of failure.
    """

    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
