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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .catalog_entry_create_request_allowances_item import CatalogEntryCreateRequestAllowancesItem
from .catalog_entry_create_request_prices_item import CatalogEntryCreateRequestPricesItem


class CatalogEntryCreateRequest(UniversalBaseModel):
    """
    Request body for creating a catalog entry
    """

    ottimate_company_id: int = pydantic.Field()
    """
    Company ID
    """

    erp_vendor_id: str = pydantic.Field()
    """
    ERP Vendor id from ERP/accounting system
    """

    description: str = pydantic.Field()
    """
    Item name/description
    """

    original_description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Original item description
    """

    sku: typing.Optional[str] = pydantic.Field(default=None)
    """
    SKU code
    """

    upc: typing.Optional[str] = pydantic.Field(default=None)
    """
    UPC code
    """

    size: typing.Optional[str] = pydantic.Field(default=None)
    """
    Pack size
    """

    uom: typing.Optional[str] = pydantic.Field(default=None)
    """
    Unit of measure
    """

    price: typing.Optional[float] = pydantic.Field(default=None)
    """
    Price
    """

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

    is_split_case: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Split case indicator
    """

    authorized_vendor: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Whether vendor is authorized
    """

    catalog_unique_key: typing.Optional[str] = pydantic.Field(default=None)
    """
    Unique key for upsert operations
    """

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

    dimensions: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
    """
    Dimension key-value pairs
    """

    properties: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
    """
    Additional properties
    """

    prices: typing.Optional[typing.List[CatalogEntryCreateRequestPricesItem]] = pydantic.Field(default=None)
    """
    Nested prices to create
    """

    allowances: typing.Optional[typing.List[CatalogEntryCreateRequestAllowancesItem]] = pydantic.Field(default=None)
    """
    Nested allowances to create
    """

    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
