# 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 QueryBatchesTransfer(UniversalBaseModel):
    """
    Transfer details within a batch response.
    """

    transfer_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="TransferId")] = pydantic.Field(
        default=None
    )
    """
    The transfer ID.
    """

    transfer_date: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="TransferDate")] = (
        pydantic.Field(default=None)
    )
    """
    The transfer date.
    """

    processor: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="Processor")] = pydantic.Field(
        default=None
    )
    """
    The processor used for the transfer.
    """

    transfer_status: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="TransferStatus")] = (
        pydantic.Field(default=None)
    )
    """
    The transfer status.
    """

    gross_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="GrossAmount")] = (
        pydantic.Field(default=None)
    )
    """
    The gross amount of the transfer.
    """

    charge_back_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="ChargeBackAmount")] = (
        pydantic.Field(default=None)
    )
    """
    The chargeback amount.
    """

    returned_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="ReturnedAmount")] = (
        pydantic.Field(default=None)
    )
    """
    The returned amount.
    """

    refund_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="RefundAmount")] = (
        pydantic.Field(default=None)
    )
    """
    The refund amount.
    """

    hold_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="HoldAmount")] = (
        pydantic.Field(default=None)
    )
    """
    The amount being held.
    """

    released_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="ReleasedAmount")] = (
        pydantic.Field(default=None)
    )
    """
    The amount that has been released.
    """

    billing_fees_amount: typing_extensions.Annotated[
        typing.Optional[float], FieldMetadata(alias="BillingFeesAmount")
    ] = pydantic.Field(default=None)
    """
    The billing fees amount.
    """

    third_party_paid_amount: typing_extensions.Annotated[
        typing.Optional[float], FieldMetadata(alias="ThirdPartyPaidAmount")
    ] = pydantic.Field(default=None)
    """
    The third party paid amount.
    """

    adjustments_amount: typing_extensions.Annotated[
        typing.Optional[float], FieldMetadata(alias="AdjustmentsAmount")
    ] = pydantic.Field(default=None)
    """
    The adjustments amount.
    """

    net_funded_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="NetFundedAmount")] = (
        pydantic.Field(default=None)
    )
    """
    The net funded amount.
    """

    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
