# This file was auto-generated by Fern from our API Definition.

import typing_extensions
import typing_extensions
import typing
from .money import MoneyParams
from ..types.catalog_pricing_type import CatalogPricingType
from ..types.inventory_alert_type import InventoryAlertType


class ItemVariationLocationOverridesParams(typing_extensions.TypedDict):
    """
    Price and inventory alerting overrides for a `CatalogItemVariation` at a specific `Location`.
    """

    location_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The ID of the `Location`. This can include locations that are deactivated.
    """

    price_money: typing_extensions.NotRequired[MoneyParams]
    """
    The price of the `CatalogItemVariation` at the given `Location`, or blank for variable pricing.
    """

    pricing_type: typing_extensions.NotRequired[CatalogPricingType]
    """
    The pricing type (fixed or variable) for the `CatalogItemVariation` at the given `Location`.
    See [CatalogPricingType](#type-catalogpricingtype) for possible values
    """

    track_inventory: typing_extensions.NotRequired[typing.Optional[bool]]
    """
    If `true`, inventory tracking is active for the `CatalogItemVariation` at this `Location`.
    """

    inventory_alert_type: typing_extensions.NotRequired[InventoryAlertType]
    """
    Indicates whether the `CatalogItemVariation` displays an alert when its inventory
    quantity is less than or equal to its `inventory_alert_threshold`.
    See [InventoryAlertType](#type-inventoryalerttype) for possible values
    """

    inventory_alert_threshold: typing_extensions.NotRequired[typing.Optional[int]]
    """
    If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type`
    is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard.
    
    This value is always an integer.
    """

    sold_out: typing_extensions.NotRequired[bool]
    """
    Indicates whether the overridden item variation is sold out at the specified location.
    
    When inventory tracking is enabled on the item variation either globally or at the specified location,
    the item variation is automatically marked as sold out when its inventory count reaches zero. The seller
    can manually set the item variation as sold out even when the inventory count is greater than zero.
    Attempts by an application to set this attribute are ignored. Regardless how the sold-out status is set,
    applications should treat its inventory count as zero when this attribute value is `true`.
    """

    sold_out_valid_until: typing_extensions.NotRequired[str]
    """
    The seller-assigned timestamp, of the RFC 3339 format, to indicate when this sold-out variation
    becomes available again at the specified location. Attempts by an application to set this attribute are ignored.
    When the current time is later than this attribute value, the affected item variation is no longer sold out.
    """
