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

from typing import Optional

from pydantic import Field as FieldInfo

from ...._models import BaseModel
from .currency_code import CurrencyCode
from .customers.customer_service_info import CustomerServiceInfo

__all__ = ["Location"]


class Location(BaseModel):
    id: int
    """Numeric identifier for a resource"""

    api_type: str = FieldInfo(alias="_type")
    """(nonnull, const = Location)"""

    abbr: str
    """Short name of location (non-null, not empty)"""

    app_launch_image_url: str = FieldInfo(alias="appLaunchImageUrl")
    """A link points to an external resource. For images we using IMGX.

    To get the right size see link "https://docs.imgix.com/apis/url/size"
    """

    app_launch_video_url: str = FieldInfo(alias="appLaunchVideoUrl")
    """A link points to an external resource. For images we using IMGX.

    To get the right size see link "https://docs.imgix.com/apis/url/size"
    """

    currency_code: CurrencyCode = FieldInfo(alias="currencyCode")
    """The 3-character abbreviation for a currency."""

    currency_symbol: str = FieldInfo(alias="currencySymbol")
    """The symbol used to represent this currency ($, £, etc.)"""

    customer_service_info: CustomerServiceInfo = FieldInfo(alias="customerServiceInfo")
    """Customer service information to contact TodayTix by phone, mail, email, etc."""

    display_name: str = FieldInfo(alias="displayName")
    """Name of location to display in UI (non-null, not empty)"""

    in_range_distance_km: int = FieldInfo(alias="inRangeDistanceKm")
    """
    Location radius in KM from coordinate (latitude, longitude). Using this distance
    client able to suggest to switch city. (non-null)
    """

    latitude: float
    """(non-null, valid latitude)"""

    locale: str
    """
    locale of location's country (non-null, ISO 3166-1 for country and ISO 639-1 for
    language)
    """

    longitude: float
    """(non-null, valid longitude)"""

    map_initial_radius_km: int = FieldInfo(alias="mapInitialRadiusKm")
    """
    The radius of the area to focus on the map when it initially loads for this
    location. (non-null)
    """

    name: str
    """Full name of the location (non-null, not empty)"""

    seo_country_name: str = FieldInfo(alias="seoCountryName")
    """SEO country name (non-null, not empty)"""

    seo_name: str = FieldInfo(alias="seoName")
    """SEO ready name (non-null, not empty)"""

    tile_image_url: str = FieldInfo(alias="tileImageUrl")
    """A link points to an external resource. For images we using IMGX.

    To get the right size see link "https://docs.imgix.com/apis/url/size"
    """

    timezone: str
    """Timezone (ISO)"""

    allow_passbook: Optional[bool] = FieldInfo(alias="allowPassbook", default=None)
    """TODO move to app config (non-null)"""

    enable_discover: Optional[bool] = FieldInfo(alias="enableDiscover", default=None)
    """Enable discover option for this location (non-null)"""

    include_fees: Optional[bool] = FieldInfo(alias="includeFees", default=None)
    """Whether or not fees are included in the display price (non-null)"""

    region_code: Optional[str] = FieldInfo(alias="regionCode", default=None)
    """Two character identifier for a country. Used with phone number validation."""
