# 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
from .apple_pay_id import ApplePayId
from .apple_pay_type import ApplePayType
from .created_at import CreatedAt
from .domain_name import DomainName
from .entry import Entry
from .last_modified import LastModified
from .paypoint_name import PaypointName


class AppleWalletData(UniversalBaseModel):
    """
    The wallet data.
    """

    entry: typing.Optional[Entry] = None
    apple_pay_merchant_id: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="applePayMerchantId")
    ] = pydantic.Field(default=None)
    """
    The Apple Pay merchant identifier.
    """

    domain_names: typing_extensions.Annotated[
        typing.Optional[typing.List[DomainName]], FieldMetadata(alias="domainNames")
    ] = pydantic.Field(default=None)
    """
    A list of domain names that are enabled for this paypoint.
    """

    paypoint_name: typing_extensions.Annotated[typing.Optional[PaypointName], FieldMetadata(alias="paypointName")] = (
        None
    )
    paypoint_url: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="paypointUrl")] = (
        pydantic.Field(default=None)
    )
    """
    The paypoint URL.
    """

    marked_for_deletion_at: typing_extensions.Annotated[
        typing.Optional[dt.datetime], FieldMetadata(alias="markedForDeletionAt")
    ] = pydantic.Field(default=None)
    """
    The date and time a paypoint's Apple Pay registration was scheduled for deletion. The paypoint will be unregistered from Apple Pay permanently 30 days from this value.
    """

    created_at: typing_extensions.Annotated[typing.Optional[CreatedAt], FieldMetadata(alias="createdAt")] = None
    updated_at: typing_extensions.Annotated[typing.Optional[LastModified], FieldMetadata(alias="updatedAt")] = None
    id: typing.Optional[ApplePayId] = pydantic.Field(default=None)
    """
    Internal ID for the Apple Pay paypoint registration update.
    """

    type: typing.Optional[ApplePayType] = pydantic.Field(default=None)
    """
    The record type, in this context it will always be `ApplePayRegistration`.
    """

    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
