# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal

from pydantic import Field as FieldInfo

from ....._models import BaseModel
from .minified_show import MinifiedShow
from .social_share_config import SocialShareConfig
from .customer_service_info import CustomerServiceInfo
from ..marketing_consent_status import MarketingConsentStatus

__all__ = ["LotteryEntry"]


class LotteryEntry(BaseModel):
    id: Optional[int] = None
    """Numeric identifier for a resource"""

    api_type: Optional[str] = FieldInfo(alias="_type", default=None)

    account_newsletter_consent: Optional[MarketingConsentStatus] = FieldInfo(
        alias="accountNewsletterConsent", default=None
    )
    """
    Used to indicate the status of a user's consent to receive marketing
    communications from TodayTix. N.B. Clients may only set this to GRANTED or
    DENIED in POST/PATCH endpoints; only the backend can set this to UNDETERMINED.
    """

    allow_change_email: Optional[bool] = FieldInfo(alias="allowChangeEmail", default=None)
    """while true - user could modify email"""

    allow_change_pickup_name: Optional[bool] = FieldInfo(alias="allowChangePickupName", default=None)
    """while true - user could modify pickup name"""

    claim_expiration_time: Optional[datetime] = FieldInfo(alias="claimExpirationTime", default=None)
    """The date-time at which this LotteryEntry expires.

    Entrants must initiate a hold by this time.
    """

    confirmation_text: Optional[object] = FieldInfo(alias="confirmationText", default=None)
    """Show this text after enter on lottery confirmation screen"""

    country_code: Optional[str] = FieldInfo(alias="countryCode", default=None)
    """Country code."""

    customer_service_info: Optional[CustomerServiceInfo] = FieldInfo(alias="customerServiceInfo", default=None)
    """Customer service information to contact TodayTix by phone, mail, email, etc."""

    email: Optional[str] = None
    """Email address."""

    increase_chance_text: Optional[object] = FieldInfo(alias="increaseChanceText", default=None)
    """Show this text after enter on lottery confirmation screen"""

    increase_chance_title: Optional[object] = FieldInfo(alias="increaseChanceTitle", default=None)
    """Show this text after enter on lottery confirmation screen"""

    lottery_id: Optional[int] = FieldInfo(alias="lotteryId", default=None)
    """Lottery Id.

    Client need this to find lottery entry by lotteryId from deeplink or push
    message payload
    """

    num_seats: Optional[float] = FieldInfo(alias="numSeats", default=None)
    """Number of seats entered for lottery"""

    part_two_show_datetime: Optional[datetime] = FieldInfo(alias="partTwoShowDatetime", default=None)
    """
    If this is a 2-part show, the datetime of the part 2 performance. Otherwise,
    null.
    """

    phone: Optional[str] = None
    """Phone number."""

    pickup_name: Optional[str] = FieldInfo(alias="pickupName", default=None)
    """Participant's pickup name."""

    receipt_texts: Optional[List[str]] = FieldInfo(alias="receiptTexts", default=None)
    """
    Arbitrary list of texts with seats info, price texts. Client need to display all
    this strings in the same order.
    """

    share_config: Optional[SocialShareConfig] = FieldInfo(alias="shareConfig", default=None)

    shared_on_facebook: Optional[bool] = FieldInfo(alias="sharedOnFacebook", default=None)
    """Has this lottery entry been shared via Facebook"""

    shared_on_instagram: Optional[bool] = FieldInfo(alias="sharedOnInstagram", default=None)
    """Has this lottery entry been shared via Instagram"""

    shared_on_twitter: Optional[bool] = FieldInfo(alias="sharedOnTwitter", default=None)
    """Has this lottery entry been shared via Twitter"""

    show: Optional[MinifiedShow] = None
    """
    Object representing a subset of properties of a 'Show' object. Used for
    LotteryEntry and Order API to get top-level show info in those contexts.
    """

    show_datetime: Optional[datetime] = FieldInfo(alias="showDatetime", default=None)
    """Showtime datetime (nonnull, correct datetime format)"""

    showtime_id: Optional[int] = FieldInfo(alias="showtimeId", default=None)
    """Numeric identifier for a resource"""

    status: Optional[Literal["LOTTERY_WINNER", "LOTTERY_PENDING", "LOTTERY_LOSER", "LOTTERY_DECLINED"]] = None
    """Status of lottery entry. f.e.

    client should use it to show Claim Now button for winner entries.
    """

    winner_claim_text: Optional[str] = FieldInfo(alias="winnerClaimText", default=None)
    """A text describing how long customers have to claim winning tickets."""

    winner_notification_end: Optional[datetime] = FieldInfo(alias="winnerNotificationEnd", default=None)
    """
    The UTC time at which winner picking ends for this lottery (i.e., the latest
    time at which an entrants should be notified of their entry status). Only used
    by web.
    """

    winner_notification_start: Optional[datetime] = FieldInfo(alias="winnerNotificationStart", default=None)
    """
    The UTC time at which winner picking begins for this lottery (i.e., the earliest
    time at which entrants should be notified of their entry status). Only used by
    Web.
    """

    winner_notification_text: Optional[str] = FieldInfo(alias="winnerNotificationText", default=None)
    """
    A text describing when customers will be notified about their entry. Hardcoded
    specifically for Harry Potter lottery (and only used there).
    """
