# 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 .transaction_query_records import TransactionQueryRecords


class CustomerSummaryRecord(UniversalBaseModel):
    numberof_transactions: typing_extensions.Annotated[
        typing.Optional[int], FieldMetadata(alias="numberofTransactions")
    ] = pydantic.Field(default=None)
    """
    Number total of transactions or payments
    """

    recent_transactions: typing_extensions.Annotated[
        typing.Optional[typing.List[TransactionQueryRecords]], FieldMetadata(alias="recentTransactions")
    ] = pydantic.Field(default=None)
    """
    List of more recent 5 transactions belonging to the customer
    """

    total_amount_transactions: typing_extensions.Annotated[
        typing.Optional[float], FieldMetadata(alias="totalAmountTransactions")
    ] = pydantic.Field(default=None)
    """
    Total amount in transactions
    """

    total_net_amount_transactions: typing_extensions.Annotated[
        typing.Optional[float], FieldMetadata(alias="totalNetAmountTransactions")
    ] = pydantic.Field(default=None)
    """
    Total net amount in transactions
    """

    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
