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

from __future__ import annotations

from typing import Iterable
from typing_extensions import Required, Annotated, TypedDict

from ...._utils import PropertyInfo
from .pyos_hold_seat_param import PyosHoldSeatParam
from .customers.ticket_type import TicketType
from .price_type_selection_param import PriceTypeSelectionParam

__all__ = ["HoldCreateParams"]


class HoldCreateParams(TypedDict, total=False):
    hold_type: Required[Annotated[TicketType, PropertyInfo(alias="holdType")]]
    """Type of the tickets (Lottery, Rush and Regular tickets)"""

    agent_payment_reference: Annotated[str, PropertyInfo(alias="agentPaymentReference")]
    """
    A unique string to identify the booking within a payment on-account retailer's
    internal system
    """

    apply_rewards_credit: Annotated[bool, PropertyInfo(alias="applyRewardsCredit")]
    """
    Automatically applies rewards credit upon hold creation, if the customer has any
    """

    customer: str
    """A customer public facing Id (String).

    "me" or a hashed string. ?customer=me and /customers/me/ are both magical
    customer identifiers, but they are customer identifiers nonetheless. They make
    the API easier to use than ?customer=c.dkd3kl238es or
    /customers/c.23i8fjdksdfs3.
    """

    hold_body_id: Annotated[str, PropertyInfo(alias="holdBodyId")]
    """
    The redisId for finding a saved body of PostHoldInputBody. holdBodyId can link
    us to another PostHoldInputBody in redis and a hold can be made from this
    fetched PostHoldInputBody.
    """

    lottery_entry: Annotated[int, PropertyInfo(alias="lotteryEntry")]
    """Numeric identifier for a resource"""

    num_tickets: Annotated[int, PropertyInfo(alias="numTickets")]
    """number of tickets to hold, required for REGULAR and RUSH"""

    offer: int
    """Numeric identifier for a resource"""

    provider: int
    """Numeric identifier for a resource"""

    provider_params: Annotated[str, PropertyInfo(alias="providerParams")]
    """Some server information necessary to hold seats. From `inventoryItem` object.

    required for REGULAR
    """

    seats: Iterable[PyosHoldSeatParam]
    """The list of seats to be held for the customer."""

    section: int
    """Numeric identifier for a resource"""

    should_override_ticket_protection_plan: Annotated[bool, PropertyInfo(alias="shouldOverrideTicketProtectionPlan")]
    """
    If true, the hold will not be linked to the show's/rules ticketProtectionPlan
    but the configured alternative
    """

    showtime: int
    """Numeric identifier for a resource"""

    tickets_by_price_type: Annotated[Iterable[PriceTypeSelectionParam], PropertyInfo(alias="ticketsByPriceType")]

    use_unified_checkout: Annotated[bool, PropertyInfo(alias="useUnifiedCheckout")]

    voucher_code: Annotated[str, PropertyInfo(alias="voucherCode")]
    """voucher code"""
