# 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 LineItemObject(UniversalBaseModel):
    id: str = pydantic.Field()
    """
    Line item identifier
    """

    ottimate_item_id: str = pydantic.Field()
    """
    Associated inventory item ID
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Item name from vendor
    """

    display_name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Standardized item name
    """

    sku: typing.Optional[str] = pydantic.Field(default=None)
    """
    Stock keeping unit
    """

    type: typing.Optional[str] = pydantic.Field(default=None)
    """
    Item type classification
    """

    quantity: float = pydantic.Field()
    """
    Quantity ordered/received
    """

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

    unit_price: float = pydantic.Field()
    """
    Price per unit
    """

    is_taxed: bool = pydantic.Field()
    """
    Whether item is subject to tax
    """

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

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

    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
