# 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.Any]],
        FieldMetadata(alias="customerConsent"),
        pydantic.Field(alias="customerConsent", description="Customer consent information"),
    ] = None
    customer_status: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="customerStatus"),
        pydantic.Field(alias="customerStatus", description="Status code for the customer"),
    ] = None
    customer_summary: typing_extensions.Annotated[
        typing.Optional[CustomerSummaryRecord],
        FieldMetadata(alias="customerSummary"),
        pydantic.Field(alias="customerSummary"),
    ] = None
    customer_username: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="customerUsername"),
        pydantic.Field(alias="customerUsername", description="Username of the customer"),
    ] = None
    external_paypoint_id: typing_extensions.Annotated[
        typing.Optional[ExternalPaypointId],
        FieldMetadata(alias="externalPaypointID"),
        pydantic.Field(alias="externalPaypointID"),
    ] = None
    last_updated: typing_extensions.Annotated[
        typing.Optional[dt.datetime],
        FieldMetadata(alias="lastUpdated"),
        pydantic.Field(alias="lastUpdated", description="Last update timestamp"),
    ] = None
    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(alias="mfaMode", description="MFA mode setting"),
    ] = None
    pageindentifier: typing.Optional[PageIdentifier] = None
    parent_org_id: typing_extensions.Annotated[
        typing.Optional[int],
        FieldMetadata(alias="parentOrgId"),
        pydantic.Field(alias="parentOrgId", description="Parent organization ID"),
    ] = None
    parent_org_name: typing_extensions.Annotated[
        typing.Optional[OrgParentName], FieldMetadata(alias="parentOrgName"), pydantic.Field(alias="parentOrgName")
    ] = None
    paypoint_dbaname: typing_extensions.Annotated[
        typing.Optional[Dbaname], FieldMetadata(alias="paypointDbaname"), pydantic.Field(alias="paypointDbaname")
    ] = None
    paypoint_entryname: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="paypointEntryname"),
        pydantic.Field(alias="paypointEntryname", description="The paypoint entryname the customer is associated with"),
    ] = None
    paypoint_legalname: typing_extensions.Annotated[
        typing.Optional[Legalname], FieldMetadata(alias="paypointLegalname"), pydantic.Field(alias="paypointLegalname")
    ] = None
    sn_data: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, typing.Any]],
        FieldMetadata(alias="snData"),
        pydantic.Field(alias="snData", description="Social network data"),
    ] = None
    sn_identifier: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="snIdentifier"),
        pydantic.Field(alias="snIdentifier", description="Social network identifier"),
    ] = None
    sn_provider: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="snProvider"),
        pydantic.Field(alias="snProvider", description="Social network provider"),
    ] = None
    stored_methods: typing_extensions.Annotated[
        typing.Optional[typing.List[MethodQueryRecords]],
        FieldMetadata(alias="storedMethods"),
        pydantic.Field(alias="storedMethods", description="List of payment methods associated to the customer"),
    ] = None
    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(alias="timeZone", description="Customer's timezone"),
    ] = 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
