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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .catalog_entry_object_prices_item_price_type_display import CatalogEntryObjectPricesItemPriceTypeDisplay


class CatalogEntryObjectPricesItem(UniversalBaseModel):
    """
    Catalog price object
    """

    id: str = pydantic.Field()
    """
    Price ID
    """

    price: str = pydantic.Field()
    """
    Price amount (decimal string)
    """

    unit_price: typing.Optional[str] = pydantic.Field(default=None)
    """
    Unit price (decimal string)
    """

    price_type: int = pydantic.Field()
    """
    Price type
    """

    price_type_display: typing.Optional[CatalogEntryObjectPricesItemPriceTypeDisplay] = pydantic.Field(default=None)
    """
    Human-readable price type
    """

    ottimate_location_id: typing.Optional[int] = pydantic.Field(default=None)
    """
    Location ID
    """

    ottimate_group_id: typing.Optional[int] = pydantic.Field(default=None)
    """
    Location group ID
    """

    start_date: dt.datetime = pydantic.Field()
    """
    Price start date
    """

    end_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Price end date
    """

    reference_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Unique key
    """

    created_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Record creation date
    """

    last_modified_date: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Record last modified date
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
