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

from __future__ import annotations

from typing import Union
from datetime import date
from typing_extensions import Literal

import httpx

from .showtimes import (
    ShowtimesResource,
    AsyncShowtimesResource,
    ShowtimesResourceWithRawResponse,
    AsyncShowtimesResourceWithRawResponse,
    ShowtimesResourceWithStreamingResponse,
    AsyncShowtimesResourceWithStreamingResponse,
)
from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ....._utils import maybe_transform, async_maybe_transform
from ....._compat import cached_property
from ....._resource import SyncAPIResource, AsyncAPIResource
from ....._response import (
    to_raw_response_wrapper,
    to_streamed_response_wrapper,
    async_to_raw_response_wrapper,
    async_to_streamed_response_wrapper,
)
from ....._base_client import make_request_options
from .....types.api.v2 import show_list_params, show_retrieve_params, show_retrieve_deals_params
from .lottery_settings import (
    LotterySettingsResource,
    AsyncLotterySettingsResource,
    LotterySettingsResourceWithRawResponse,
    AsyncLotterySettingsResourceWithRawResponse,
    LotterySettingsResourceWithStreamingResponse,
    AsyncLotterySettingsResourceWithStreamingResponse,
)
from .....types.api.v2.show import Show
from .....types.api.v2.rush_settings import RushSettings
from .....types.api.v2.show_list_response import ShowListResponse
from .....types.api.v2.show_retrieve_deals_response import ShowRetrieveDealsResponse

__all__ = ["ShowsResource", "AsyncShowsResource"]


class ShowsResource(SyncAPIResource):
    @cached_property
    def lottery_settings(self) -> LotterySettingsResource:
        return LotterySettingsResource(self._client)

    @cached_property
    def showtimes(self) -> ShowtimesResource:
        return ShowtimesResource(self._client)

    @cached_property
    def with_raw_response(self) -> ShowsResourceWithRawResponse:
        """
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/alisytsma/ali-test-mcp#accessing-raw-response-data-eg-headers
        """
        return ShowsResourceWithRawResponse(self)

    @cached_property
    def with_streaming_response(self) -> ShowsResourceWithStreamingResponse:
        """
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/alisytsma/ali-test-mcp#with_streaming_response
        """
        return ShowsResourceWithStreamingResponse(self)

    def retrieve(
        self,
        show_id: int,
        *,
        embed: str | NotGiven = NOT_GIVEN,
        include_showtimes_with_no_inventory: str | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> Show:
        """Get show by showId.

        You could use parameter embed=`showGroup` to include
        showGroup object inside of this show.

        Args:
          embed: Resource name (`showGroup`)

          include_showtimes_with_no_inventory: When true, includes showtimes with no inventory in the response

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        return self._get(
            f"/api/v2/shows/{show_id}",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {
                        "embed": embed,
                        "include_showtimes_with_no_inventory": include_showtimes_with_no_inventory,
                    },
                    show_retrieve_params.ShowRetrieveParams,
                ),
            ),
            cast_to=Show,
        )

    def list(
        self,
        *,
        id: str | NotGiven = NOT_GIVEN,
        are_access_programs_active: bool | NotGiven = NOT_GIVEN,
        are_regular_tickets_available: bool | NotGiven = NOT_GIVEN,
        categories: str | NotGiven = NOT_GIVEN,
        date: Union[str, date] | NotGiven = NOT_GIVEN,
        date_from: object | NotGiven = NOT_GIVEN,
        date_to: object | NotGiven = NOT_GIVEN,
        day_part: Literal["MATINEE", "EVENING"] | NotGiven = NOT_GIVEN,
        end_date_from: object | NotGiven = NOT_GIVEN,
        end_date_to: object | NotGiven = NOT_GIVEN,
        fieldset: Literal["SHOW_SUMMARY"] | NotGiven = NOT_GIVEN,
        genres: str | NotGiven = NOT_GIVEN,
        has_no_fees: bool | NotGiven = NOT_GIVEN,
        hide_from_hero_list: bool | NotGiven = NOT_GIVEN,
        include_aggregations: bool | NotGiven = NOT_GIVEN,
        limit: int | NotGiven = NOT_GIVEN,
        location: int | NotGiven = NOT_GIVEN,
        max_price: int | NotGiven = NOT_GIVEN,
        num_tickets: int | NotGiven = NOT_GIVEN,
        offset: int | NotGiven = NOT_GIVEN,
        on_sale_date_from: object | NotGiven = NOT_GIVEN,
        on_sale_date_to: object | NotGiven = NOT_GIVEN,
        query: str | NotGiven = NOT_GIVEN,
        relevance: Literal["CATEGORY", "VENUE"] | NotGiven = NOT_GIVEN,
        sort_by: Literal[
            "ALLOCATION",
            "START_DATE",
            "END_DATE",
            "LIFETIME_TICKET_VOLUME",
            "PRICE",
            "RECENT_CONVERSION_RATE",
            "RECENT_NET_REVENUE",
            "RECENT_PDP_VIEWS_COUNT",
            "RECENT_TRANSACTION_COUNT",
            "WEIGHTED_REVENUE_AND_VOLUME_SCORE",
        ]
        | NotGiven = NOT_GIVEN,
        sort_order: Literal["ASC", "DESC"] | NotGiven = NOT_GIVEN,
        start_date_from: object | NotGiven = NOT_GIVEN,
        start_date_to: object | NotGiven = NOT_GIVEN,
        subcategories: str | NotGiven = NOT_GIVEN,
        use_override_fields: bool | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> ShowListResponse:
        """
        Retrieve a list of shows based on given criteria

        Args:
          id: A single id or comma separated list of IDs. Be sure to sort ids ASC to improve
              cache efficiency.

          are_access_programs_active: If true, return only shows that have Lottery or Rush active - not necessarily
              available

          are_regular_tickets_available: Include show summaries for shows where regular Tickets are available, if true

          categories: Categories to filter shows by. A show must have one of the provided categories
              to appear in the results.

          date: Date or list of dates to filter showtimes by formatted as yyyy-MM-dd. It could
              also be two specific strings, TODAY or THIS_WEEKEND.

          date_from: Start date for a date range to filter showtimes by formatted as yyyy-MM-dd. It
              could also be used independently without a dateTo, in that case the results will
              include showtimes with a date greater or equal than dateFrom.

          date_to: End date for a date range to filter showtimes by formatted as yyyy-MM-dd. It
              could also be used independently without a dateFrom, in that case the results
              will include showtimes with a date lower or equal than dateTo.

          day_part: Return only shows that have available tickets for a specific day part. Can be
              either EVENING or MATINEE

          end_date_from: First date for a date range to filter products by endDate - formatted as
              yyyy-MM-dd. If an endDateFrom parameter is provided, this will return all
              products with an endDate greater than (or equal to) this value

          end_date_to: Last date for a date range to filter products by endDate - formatted as
              yyyy-MM-dd. If an endDateTo parameter is provided, this will return all products
              with an endDate less than (or equal to) this value

          genres: List of comma-separated categories to filter shows by. A show must have at least
              one provided category to appear in the results.

          has_no_fees: When true, return only shows that have no booking fee

          hide_from_hero_list: When false, only include shows that should be displayed in the hero list

          include_aggregations: Include aggregate metadata, if specified

          limit: Max number of results to be returned, if specified.

          location: location Id

          max_price: Max price to filter results by

          num_tickets: Number of tickets

          offset: The offset at which to start (used with `limit` for pagination).

          on_sale_date_from: First date for a date range to filter products by onSaleDate - formatted as
              yyyy-MM-dd. If an onSaleDateFrom parameter is provided, this will return all
              products with an onSaleDate greater than (or equal to) this value

          on_sale_date_to: Last date for a date range to filter products by onSaleDate - formatted as
              yyyy-MM-dd. If an onSaleDateTo parameter is provided, this will return all
              products with an onSaleDate less than (or equal to) this value

          query: search query, if specified

          relevance: gives more relevance to the specified field in the search process

          sort_by: Field by which to sort the query results.

          sort_order: Order by which to sort the results, if a sortBy parameter is provided.

          start_date_from: First date for a date range to filter products by startDate - formatted as
              yyyy-MM-dd. If a startDateFrom parameter is provided, this will return all
              products with a startDate greater than (or equal to) this value

          start_date_to: Last date for a date range to filter products by startDate - formatted as
              yyyy-MM-dd. If a startDateTo parameter is provided, this will return all
              products with a startDate less than (or equal to) this value

          subcategories: Comma-separated subcategory ID(s) to filter shows by. A show must have all of
              the provided subcategories to appear in the results.

          use_override_fields: When true, uses calculated FeeStructure#feeStructureOverride fees and prices for
              the show if they exist.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        return self._get(
            "/api/v2/shows",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {
                        "id": id,
                        "are_access_programs_active": are_access_programs_active,
                        "are_regular_tickets_available": are_regular_tickets_available,
                        "categories": categories,
                        "date": date,
                        "date_from": date_from,
                        "date_to": date_to,
                        "day_part": day_part,
                        "end_date_from": end_date_from,
                        "end_date_to": end_date_to,
                        "fieldset": fieldset,
                        "genres": genres,
                        "has_no_fees": has_no_fees,
                        "hide_from_hero_list": hide_from_hero_list,
                        "include_aggregations": include_aggregations,
                        "limit": limit,
                        "location": location,
                        "max_price": max_price,
                        "num_tickets": num_tickets,
                        "offset": offset,
                        "on_sale_date_from": on_sale_date_from,
                        "on_sale_date_to": on_sale_date_to,
                        "query": query,
                        "relevance": relevance,
                        "sort_by": sort_by,
                        "sort_order": sort_order,
                        "start_date_from": start_date_from,
                        "start_date_to": start_date_to,
                        "subcategories": subcategories,
                        "use_override_fields": use_override_fields,
                    },
                    show_list_params.ShowListParams,
                ),
            ),
            cast_to=ShowListResponse,
        )

    def retrieve_deals(
        self,
        *,
        location_id: str,
        dates: str | NotGiven = NOT_GIVEN,
        quantity: str | NotGiven = NOT_GIVEN,
        timezone: str | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> ShowRetrieveDealsResponse:
        """
        Get all shows that have exclusive inventory available

        Args:
          dates: A comma separated list of dates, or date enums like TODAY, TOMORROW

          quantity: Filter by minimum number of seats available

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        return self._get(
            "/api/v2/shows/deals",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {
                        "location_id": location_id,
                        "dates": dates,
                        "quantity": quantity,
                        "timezone": timezone,
                    },
                    show_retrieve_deals_params.ShowRetrieveDealsParams,
                ),
            ),
            cast_to=ShowRetrieveDealsResponse,
        )

    def retrieve_rush_settings(
        self,
        show_id: int,
        *,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> RushSettings:
        """
        Get rushSettings for show

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        return self._get(
            f"/api/v2/shows/{show_id}/rushSettings",
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=RushSettings,
        )


class AsyncShowsResource(AsyncAPIResource):
    @cached_property
    def lottery_settings(self) -> AsyncLotterySettingsResource:
        return AsyncLotterySettingsResource(self._client)

    @cached_property
    def showtimes(self) -> AsyncShowtimesResource:
        return AsyncShowtimesResource(self._client)

    @cached_property
    def with_raw_response(self) -> AsyncShowsResourceWithRawResponse:
        """
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/alisytsma/ali-test-mcp#accessing-raw-response-data-eg-headers
        """
        return AsyncShowsResourceWithRawResponse(self)

    @cached_property
    def with_streaming_response(self) -> AsyncShowsResourceWithStreamingResponse:
        """
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/alisytsma/ali-test-mcp#with_streaming_response
        """
        return AsyncShowsResourceWithStreamingResponse(self)

    async def retrieve(
        self,
        show_id: int,
        *,
        embed: str | NotGiven = NOT_GIVEN,
        include_showtimes_with_no_inventory: str | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> Show:
        """Get show by showId.

        You could use parameter embed=`showGroup` to include
        showGroup object inside of this show.

        Args:
          embed: Resource name (`showGroup`)

          include_showtimes_with_no_inventory: When true, includes showtimes with no inventory in the response

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        return await self._get(
            f"/api/v2/shows/{show_id}",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=await async_maybe_transform(
                    {
                        "embed": embed,
                        "include_showtimes_with_no_inventory": include_showtimes_with_no_inventory,
                    },
                    show_retrieve_params.ShowRetrieveParams,
                ),
            ),
            cast_to=Show,
        )

    async def list(
        self,
        *,
        id: str | NotGiven = NOT_GIVEN,
        are_access_programs_active: bool | NotGiven = NOT_GIVEN,
        are_regular_tickets_available: bool | NotGiven = NOT_GIVEN,
        categories: str | NotGiven = NOT_GIVEN,
        date: Union[str, date] | NotGiven = NOT_GIVEN,
        date_from: object | NotGiven = NOT_GIVEN,
        date_to: object | NotGiven = NOT_GIVEN,
        day_part: Literal["MATINEE", "EVENING"] | NotGiven = NOT_GIVEN,
        end_date_from: object | NotGiven = NOT_GIVEN,
        end_date_to: object | NotGiven = NOT_GIVEN,
        fieldset: Literal["SHOW_SUMMARY"] | NotGiven = NOT_GIVEN,
        genres: str | NotGiven = NOT_GIVEN,
        has_no_fees: bool | NotGiven = NOT_GIVEN,
        hide_from_hero_list: bool | NotGiven = NOT_GIVEN,
        include_aggregations: bool | NotGiven = NOT_GIVEN,
        limit: int | NotGiven = NOT_GIVEN,
        location: int | NotGiven = NOT_GIVEN,
        max_price: int | NotGiven = NOT_GIVEN,
        num_tickets: int | NotGiven = NOT_GIVEN,
        offset: int | NotGiven = NOT_GIVEN,
        on_sale_date_from: object | NotGiven = NOT_GIVEN,
        on_sale_date_to: object | NotGiven = NOT_GIVEN,
        query: str | NotGiven = NOT_GIVEN,
        relevance: Literal["CATEGORY", "VENUE"] | NotGiven = NOT_GIVEN,
        sort_by: Literal[
            "ALLOCATION",
            "START_DATE",
            "END_DATE",
            "LIFETIME_TICKET_VOLUME",
            "PRICE",
            "RECENT_CONVERSION_RATE",
            "RECENT_NET_REVENUE",
            "RECENT_PDP_VIEWS_COUNT",
            "RECENT_TRANSACTION_COUNT",
            "WEIGHTED_REVENUE_AND_VOLUME_SCORE",
        ]
        | NotGiven = NOT_GIVEN,
        sort_order: Literal["ASC", "DESC"] | NotGiven = NOT_GIVEN,
        start_date_from: object | NotGiven = NOT_GIVEN,
        start_date_to: object | NotGiven = NOT_GIVEN,
        subcategories: str | NotGiven = NOT_GIVEN,
        use_override_fields: bool | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> ShowListResponse:
        """
        Retrieve a list of shows based on given criteria

        Args:
          id: A single id or comma separated list of IDs. Be sure to sort ids ASC to improve
              cache efficiency.

          are_access_programs_active: If true, return only shows that have Lottery or Rush active - not necessarily
              available

          are_regular_tickets_available: Include show summaries for shows where regular Tickets are available, if true

          categories: Categories to filter shows by. A show must have one of the provided categories
              to appear in the results.

          date: Date or list of dates to filter showtimes by formatted as yyyy-MM-dd. It could
              also be two specific strings, TODAY or THIS_WEEKEND.

          date_from: Start date for a date range to filter showtimes by formatted as yyyy-MM-dd. It
              could also be used independently without a dateTo, in that case the results will
              include showtimes with a date greater or equal than dateFrom.

          date_to: End date for a date range to filter showtimes by formatted as yyyy-MM-dd. It
              could also be used independently without a dateFrom, in that case the results
              will include showtimes with a date lower or equal than dateTo.

          day_part: Return only shows that have available tickets for a specific day part. Can be
              either EVENING or MATINEE

          end_date_from: First date for a date range to filter products by endDate - formatted as
              yyyy-MM-dd. If an endDateFrom parameter is provided, this will return all
              products with an endDate greater than (or equal to) this value

          end_date_to: Last date for a date range to filter products by endDate - formatted as
              yyyy-MM-dd. If an endDateTo parameter is provided, this will return all products
              with an endDate less than (or equal to) this value

          genres: List of comma-separated categories to filter shows by. A show must have at least
              one provided category to appear in the results.

          has_no_fees: When true, return only shows that have no booking fee

          hide_from_hero_list: When false, only include shows that should be displayed in the hero list

          include_aggregations: Include aggregate metadata, if specified

          limit: Max number of results to be returned, if specified.

          location: location Id

          max_price: Max price to filter results by

          num_tickets: Number of tickets

          offset: The offset at which to start (used with `limit` for pagination).

          on_sale_date_from: First date for a date range to filter products by onSaleDate - formatted as
              yyyy-MM-dd. If an onSaleDateFrom parameter is provided, this will return all
              products with an onSaleDate greater than (or equal to) this value

          on_sale_date_to: Last date for a date range to filter products by onSaleDate - formatted as
              yyyy-MM-dd. If an onSaleDateTo parameter is provided, this will return all
              products with an onSaleDate less than (or equal to) this value

          query: search query, if specified

          relevance: gives more relevance to the specified field in the search process

          sort_by: Field by which to sort the query results.

          sort_order: Order by which to sort the results, if a sortBy parameter is provided.

          start_date_from: First date for a date range to filter products by startDate - formatted as
              yyyy-MM-dd. If a startDateFrom parameter is provided, this will return all
              products with a startDate greater than (or equal to) this value

          start_date_to: Last date for a date range to filter products by startDate - formatted as
              yyyy-MM-dd. If a startDateTo parameter is provided, this will return all
              products with a startDate less than (or equal to) this value

          subcategories: Comma-separated subcategory ID(s) to filter shows by. A show must have all of
              the provided subcategories to appear in the results.

          use_override_fields: When true, uses calculated FeeStructure#feeStructureOverride fees and prices for
              the show if they exist.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        return await self._get(
            "/api/v2/shows",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=await async_maybe_transform(
                    {
                        "id": id,
                        "are_access_programs_active": are_access_programs_active,
                        "are_regular_tickets_available": are_regular_tickets_available,
                        "categories": categories,
                        "date": date,
                        "date_from": date_from,
                        "date_to": date_to,
                        "day_part": day_part,
                        "end_date_from": end_date_from,
                        "end_date_to": end_date_to,
                        "fieldset": fieldset,
                        "genres": genres,
                        "has_no_fees": has_no_fees,
                        "hide_from_hero_list": hide_from_hero_list,
                        "include_aggregations": include_aggregations,
                        "limit": limit,
                        "location": location,
                        "max_price": max_price,
                        "num_tickets": num_tickets,
                        "offset": offset,
                        "on_sale_date_from": on_sale_date_from,
                        "on_sale_date_to": on_sale_date_to,
                        "query": query,
                        "relevance": relevance,
                        "sort_by": sort_by,
                        "sort_order": sort_order,
                        "start_date_from": start_date_from,
                        "start_date_to": start_date_to,
                        "subcategories": subcategories,
                        "use_override_fields": use_override_fields,
                    },
                    show_list_params.ShowListParams,
                ),
            ),
            cast_to=ShowListResponse,
        )

    async def retrieve_deals(
        self,
        *,
        location_id: str,
        dates: str | NotGiven = NOT_GIVEN,
        quantity: str | NotGiven = NOT_GIVEN,
        timezone: str | NotGiven = NOT_GIVEN,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> ShowRetrieveDealsResponse:
        """
        Get all shows that have exclusive inventory available

        Args:
          dates: A comma separated list of dates, or date enums like TODAY, TOMORROW

          quantity: Filter by minimum number of seats available

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        return await self._get(
            "/api/v2/shows/deals",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=await async_maybe_transform(
                    {
                        "location_id": location_id,
                        "dates": dates,
                        "quantity": quantity,
                        "timezone": timezone,
                    },
                    show_retrieve_deals_params.ShowRetrieveDealsParams,
                ),
            ),
            cast_to=ShowRetrieveDealsResponse,
        )

    async def retrieve_rush_settings(
        self,
        show_id: int,
        *,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
    ) -> RushSettings:
        """
        Get rushSettings for show

        Args:
          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        return await self._get(
            f"/api/v2/shows/{show_id}/rushSettings",
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=RushSettings,
        )


class ShowsResourceWithRawResponse:
    def __init__(self, shows: ShowsResource) -> None:
        self._shows = shows

        self.retrieve = to_raw_response_wrapper(
            shows.retrieve,
        )
        self.list = to_raw_response_wrapper(
            shows.list,
        )
        self.retrieve_deals = to_raw_response_wrapper(
            shows.retrieve_deals,
        )
        self.retrieve_rush_settings = to_raw_response_wrapper(
            shows.retrieve_rush_settings,
        )

    @cached_property
    def lottery_settings(self) -> LotterySettingsResourceWithRawResponse:
        return LotterySettingsResourceWithRawResponse(self._shows.lottery_settings)

    @cached_property
    def showtimes(self) -> ShowtimesResourceWithRawResponse:
        return ShowtimesResourceWithRawResponse(self._shows.showtimes)


class AsyncShowsResourceWithRawResponse:
    def __init__(self, shows: AsyncShowsResource) -> None:
        self._shows = shows

        self.retrieve = async_to_raw_response_wrapper(
            shows.retrieve,
        )
        self.list = async_to_raw_response_wrapper(
            shows.list,
        )
        self.retrieve_deals = async_to_raw_response_wrapper(
            shows.retrieve_deals,
        )
        self.retrieve_rush_settings = async_to_raw_response_wrapper(
            shows.retrieve_rush_settings,
        )

    @cached_property
    def lottery_settings(self) -> AsyncLotterySettingsResourceWithRawResponse:
        return AsyncLotterySettingsResourceWithRawResponse(self._shows.lottery_settings)

    @cached_property
    def showtimes(self) -> AsyncShowtimesResourceWithRawResponse:
        return AsyncShowtimesResourceWithRawResponse(self._shows.showtimes)


class ShowsResourceWithStreamingResponse:
    def __init__(self, shows: ShowsResource) -> None:
        self._shows = shows

        self.retrieve = to_streamed_response_wrapper(
            shows.retrieve,
        )
        self.list = to_streamed_response_wrapper(
            shows.list,
        )
        self.retrieve_deals = to_streamed_response_wrapper(
            shows.retrieve_deals,
        )
        self.retrieve_rush_settings = to_streamed_response_wrapper(
            shows.retrieve_rush_settings,
        )

    @cached_property
    def lottery_settings(self) -> LotterySettingsResourceWithStreamingResponse:
        return LotterySettingsResourceWithStreamingResponse(self._shows.lottery_settings)

    @cached_property
    def showtimes(self) -> ShowtimesResourceWithStreamingResponse:
        return ShowtimesResourceWithStreamingResponse(self._shows.showtimes)


class AsyncShowsResourceWithStreamingResponse:
    def __init__(self, shows: AsyncShowsResource) -> None:
        self._shows = shows

        self.retrieve = async_to_streamed_response_wrapper(
            shows.retrieve,
        )
        self.list = async_to_streamed_response_wrapper(
            shows.list,
        )
        self.retrieve_deals = async_to_streamed_response_wrapper(
            shows.retrieve_deals,
        )
        self.retrieve_rush_settings = async_to_streamed_response_wrapper(
            shows.retrieve_rush_settings,
        )

    @cached_property
    def lottery_settings(self) -> AsyncLotterySettingsResourceWithStreamingResponse:
        return AsyncLotterySettingsResourceWithStreamingResponse(self._shows.lottery_settings)

    @cached_property
    def showtimes(self) -> AsyncShowtimesResourceWithStreamingResponse:
        return AsyncShowtimesResourceWithStreamingResponse(self._shows.showtimes)
