# 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 ...._models import BaseModel
from .carts.currency_object import CurrencyObject
from .carts.delivery_method import DeliveryMethod

__all__ = ["AddOns", "Available", "AvailableItem", "Selected"]


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

    api_type: Optional[str] = FieldInfo(alias="_type", default=None)
    """The type of the Add-On Item object."""

    max_quantity: Optional[int] = FieldInfo(alias="maxQuantity", default=None)
    """The maximum quantity of this item that can be added to the order."""

    name: Optional[str] = None
    """The name of the Add-On item."""

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

    sale_price: Optional[CurrencyObject] = FieldInfo(alias="salePrice", default=None)


class Available(BaseModel):
    api_type: Optional[str] = FieldInfo(alias="_type", default=None)
    """The type of the Add-On object."""

    delivery_method: Optional[DeliveryMethod] = FieldInfo(alias="deliveryMethod", default=None)
    """How to pickup the tickets"""

    delivery_text: Optional[str] = FieldInfo(alias="deliveryText", default=None)
    """The delivery method for this item."""

    items: Optional[List[AvailableItem]] = None
    """List of specific items under the add-on category."""


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

    delivery_text: Optional[str] = FieldInfo(alias="deliveryText", default=None)
    """Text to display to the user to indicate how the add-on will be delivered."""

    name: Optional[str] = None
    """The name of the add-on."""

    quantity: Optional[int] = None
    """The quantity of the add-on."""

    sale_price: Optional[CurrencyObject] = FieldInfo(alias="salePrice", default=None)


class AddOns(BaseModel):
    available: Optional[List[Available]] = None
    """List of available add-ons grouped by type."""

    selected: Optional[List[Selected]] = None
    """List of selected add-ons."""
