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

import typing

import pydantic
import typing_extensions
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...core.serialization import FieldMetadata


class OcrBillItem(UniversalBaseModel):
    item_total_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="itemTotalAmount")] = (
        None
    )
    item_tax_amount: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="itemTaxAmount")] = None
    item_tax_rate: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="itemTaxRate")] = None
    item_product_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="itemProductCode")] = None
    item_product_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="itemProductName")] = None
    item_description: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="itemDescription")] = None
    item_commodity_code: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="itemCommodityCode")] = (
        None
    )
    item_unit_of_measure: typing_extensions.Annotated[
        typing.Optional[str], FieldMetadata(alias="itemUnitOfMeasure")
    ] = None
    item_cost: typing_extensions.Annotated[typing.Optional[float], FieldMetadata(alias="itemCost")] = None
    item_qty: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="itemQty")] = None
    item_mode: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="itemMode")] = None
    item_categories: typing_extensions.Annotated[
        typing.Optional[typing.List[str]], FieldMetadata(alias="itemCategories")
    ] = None

    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
