# 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
from ...core.serialization import FieldMetadata
from ...types.customer_summary_record import CustomerSummaryRecord
from ...types.dbaname import Dbaname
from ...types.external_paypoint_id import ExternalPaypointId
from ...types.legalname import Legalname
from ...types.method_query_records import MethodQueryRecords
from ...types.org_parent_name import OrgParentName
from ...types.page_identifier import PageIdentifier
from ...types.payor_data_request import PayorDataRequest
from ...types.subscription_query_records import SubscriptionQueryRecords


class GetMethodResponseResponseDataCustomersItem(PayorDataRequest):
    balance: typing.Optional[float] = pydantic.Field(default=None)
    """
    Customer's current balance
    """

    created: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Creation timestamp
    """

    customer_consent: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="customerConsent")
    ] = pydantic.Field(default=None)
    """
    Customer consent information
    """

    customer_status: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="customerStatus")] = (
        pydantic.Field(default=None)
    )
    """
    Status code for the customer
    """

    customer_summary: typing_extensions.Annotated[
        typing.Optional[CustomerSummaryRecord], FieldMetadata(alias="customerSummary")
    ] = None
    customer_username: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="customerUsername")] = (
        pydantic.Field(default=None)
    )
    """
    Username of the customer
    """

    external_paypoint_id: typing_extensions.Annotated[
        typing.Optional[ExternalPaypointId], FieldMetadata(alias="externalPaypointID")
    ] = None
    last_updated: typing_extensions.Annotated[typing.Optional[dt.datetime], FieldMetadata(alias="lastUpdated")] = (
        pydantic.Field(default=None)
    )
    """
    Last update timestamp
    """

    mfa: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Multi-factor authentication status
    """

    mfa_mode: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="mfaMode")] = pydantic.Field(
        default=None
    )
    """
    MFA mode setting
    """

    pageindentifier: typing.Optional[PageIdentifier] = None
    parent_org_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="parentOrgId")] = (
        pydantic.Field(default=None)
    )
    """
    Parent organization ID
    """

    parent_org_name: typing_extensions.Annotated[
        typing.Optional[OrgParentName], FieldMetadata(alias="parentOrgName")
    ] = None
    paypoint_dbaname: typing_extensions.Annotated[typing.Optional[Dbaname], FieldMetadata(alias="paypointDbaname")] = (
        None
    )
    paypoint_entryname: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paypointEntryname")] = (
        pydantic.Field(default=None)
    )
    """
    The paypoint entryname the customer is associated with
    """

    paypoint_legalname: typing_extensions.Annotated[
        typing.Optional[Legalname], FieldMetadata(alias="paypointLegalname")
    ] = None
    sn_data: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="snData")
    ] = pydantic.Field(default=None)
    """
    Social network data
    """

    sn_identifier: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="snIdentifier")] = (
        pydantic.Field(default=None)
    )
    """
    Social network identifier
    """

    sn_provider: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="snProvider")] = pydantic.Field(
        default=None
    )
    """
    Social network provider
    """

    stored_methods: typing_extensions.Annotated[
        typing.Optional[typing.List[MethodQueryRecords]], FieldMetadata(alias="storedMethods")
    ] = pydantic.Field(default=None)
    """
    List of payment methods associated to the customer
    """

    subscriptions: typing.Optional[typing.List[SubscriptionQueryRecords]] = pydantic.Field(default=None)
    """
    List of subscriptions associated to the customer
    """

    time_zone: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="timeZone")] = pydantic.Field(
        default=None
    )
    """
    Customer's timezone
    """

    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
