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

import typing

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


class PurchaseOrderBulkUpsertRequestPurchaseOrdersItemItemsItem(UniversalBaseModel):
    external_id: typing.Optional[str] = None
    name: str
    sku: typing.Optional[str] = None
    quantity: float
    price: float
    uom: typing.Optional[str] = None
    dimensions: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
    """
    Dimension values keyed by type (e.g. PROJECT, CLASS). Each value is the ERP external_id of the dimension. When provided, REPLACES all existing dimensions on the item — include every dimension you want to keep. Omit the field or pass null to leave dimensions unchanged. Passing {} returns 400.
    """

    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
