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

from typing import Optional
from datetime import datetime
from typing_extensions import Literal

from pydantic import Field as FieldInfo

from ...._models import BaseModel

__all__ = ["HoldUpdateClearResponse"]


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

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

    created_datetime: Optional[datetime] = FieldInfo(alias="createdDatetime", default=None)
    """Datetime at which this hold was created."""

    expiration_datetime: Optional[datetime] = FieldInfo(alias="expirationDatetime", default=None)
    """Datetime at which this hold expires."""

    retailer_id: Optional[str] = FieldInfo(alias="retailerId", default=None)
    """A retailer public facing Id (String). (pub_id on server side)"""

    secret: Optional[str] = None
    """This is a secret which can be used to access a hold without a JWT token.

    This will only be returned on the initial hold creation, everywhere else this
    will be null.
    """

    status: Optional[Literal["ACTIVE", "CONFIRMED"]] = None
    """The Hold status, Active or Confirmed.

    Introduced to support Retailers relying on Booking reference: `holdId` to
    retrieve confirmed basket details.

    - ACTIVE seats held and valid for purchase.
    - CONFIRMED seats were purchased so there is a linked Transaction.
    """
