# 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(alias="TransferId", description="The transfer ID."),
    ] = None
    transfer_date: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="TransferDate"),
        pydantic.Field(alias="TransferDate", description="The transfer date."),
    ] = None
    processor: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="Processor"),
        pydantic.Field(alias="Processor", description="The processor used for the transfer."),
    ] = None
    transfer_status: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="TransferStatus"),
        pydantic.Field(alias="TransferStatus", description="The transfer status."),
    ] = None
    gross_amount: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="GrossAmount"),
        pydantic.Field(alias="GrossAmount", description="The gross amount of the transfer."),
    ] = None
    charge_back_amount: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="ChargeBackAmount"),
        pydantic.Field(alias="ChargeBackAmount", description="The chargeback amount."),
    ] = None
    returned_amount: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="ReturnedAmount"),
        pydantic.Field(alias="ReturnedAmount", description="The returned amount."),
    ] = None
    refund_amount: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="RefundAmount"),
        pydantic.Field(alias="RefundAmount", description="The refund amount."),
    ] = None
    hold_amount: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="HoldAmount"),
        pydantic.Field(alias="HoldAmount", description="The amount being held."),
    ] = None
    released_amount: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="ReleasedAmount"),
        pydantic.Field(alias="ReleasedAmount", description="The amount that has been released."),
    ] = None
    billing_fees_amount: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="BillingFeesAmount"),
        pydantic.Field(alias="BillingFeesAmount", description="The billing fees amount."),
    ] = None
    third_party_paid_amount: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="ThirdPartyPaidAmount"),
        pydantic.Field(alias="ThirdPartyPaidAmount", description="The third party paid amount."),
    ] = None
    adjustments_amount: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="AdjustmentsAmount"),
        pydantic.Field(alias="AdjustmentsAmount", description="The adjustments amount."),
    ] = None
    net_funded_amount: typing_extensions.Annotated[
        typing.Optional[float],
        FieldMetadata(alias="NetFundedAmount"),
        pydantic.Field(alias="NetFundedAmount", description="The net funded amount."),
    ] = 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
