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

from typing import List, Optional

from pydantic import Field as FieldInfo

from .barcode import Barcode
from ...._models import BaseModel
from .carts.currency_object import CurrencyObject

__all__ = ["Ticket", "SeatAttribute"]


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

    description: Optional[str] = None

    intention: Optional[str] = None

    title: Optional[str] = None


class Ticket(BaseModel):
    api_type: str = FieldInfo(alias="_type")

    is_ga: bool = FieldInfo(alias="isGA")
    """Whether the ticket is General Admission or not."""

    sale_price: CurrencyObject = FieldInfo(alias="salePrice")

    section_name: str = FieldInfo(alias="sectionName")

    total_fees: CurrencyObject = FieldInfo(alias="totalFees")

    barcode: Optional[Barcode] = None

    door: Optional[str] = None
    """The door or entrance where the ticket holder should enter the venue."""

    face_value: Optional[CurrencyObject] = FieldInfo(alias="faceValue", default=None)

    price_type_name: Optional[str] = FieldInfo(alias="priceTypeName", default=None)
    """The name of the price type, if applicable."""

    row_name: Optional[str] = FieldInfo(alias="rowName", default=None)
    """The name of the row. Null for GA seats."""

    seat_attributes: Optional[List[SeatAttribute]] = FieldInfo(alias="seatAttributes", default=None)

    seat_name: Optional[str] = FieldInfo(alias="seatName", default=None)
    """The name of the seat. Null for GA seats."""

    seat_note: Optional[str] = FieldInfo(alias="seatNote", default=None)
