# 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.order_id import OrderId
from ...types.orderdescription import Orderdescription
from ...types.source import Source


class TransactionDetailPaymentDetails(UniversalBaseModel):
    """
    Detailed breakdown of payment amounts and identifiers
    """

    total_amount: typing_extensions.Annotated[float, FieldMetadata(alias="totalAmount")]
    service_fee: typing_extensions.Annotated[float, FieldMetadata(alias="serviceFee")]
    check_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="checkNumber")] = None
    check_image: typing_extensions.Annotated[typing.Optional[typing.Any], FieldMetadata(alias="checkImage")] = None
    check_unique_id: typing_extensions.Annotated[str, FieldMetadata(alias="checkUniqueId")]
    currency: str
    order_description: typing_extensions.Annotated[
        typing.Optional[Orderdescription], FieldMetadata(alias="orderDescription")
    ] = None
    order_id: typing_extensions.Annotated[typing.Optional[OrderId], FieldMetadata(alias="orderId")] = None
    order_id_alternative: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="orderIdAlternative")
    ] = None
    payment_description: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="paymentDescription")
    ] = None
    group_number: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="groupNumber")] = None
    source: typing.Optional[Source] = None
    payabli_trans_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="payabliTransId")] = None
    unbundled: typing.Optional[typing.Any] = None
    categories: typing.List[typing.Any]
    split_funding: typing_extensions.Annotated[typing.List[typing.Any], FieldMetadata(alias="splitFunding")]

    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
