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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class TransferOrderGoodsReceiptLineItem(UncheckedBaseModel):
    """
    A simplified line item for goods receipts in transfer orders
    """

    transfer_order_line_uid: str = pydantic.Field()
    """
    The unique identifier of the Transfer Order line being received
    """

    quantity_received: typing.Optional[str] = pydantic.Field(default=None)
    """
    The quantity received for this line item as a decimal string (e.g. "10.5").
    These items will be added to the destination [Location](entity:Location)'s inventory with [InventoryState](entity:InventoryState) of IN_STOCK.
    """

    quantity_damaged: typing.Optional[str] = pydantic.Field(default=None)
    """
    The quantity that was damaged during shipping/handling as a decimal string (e.g. "1.5").
    These items will be added to the destination [Location](entity:Location)'s inventory with [InventoryState](entity:InventoryState) of WASTE.
    """

    quantity_canceled: typing.Optional[str] = pydantic.Field(default=None)
    """
    The quantity that was canceled during shipping/handling as a decimal string (e.g. "1.5"). These will be immediately added to inventory in the source location.
    """

    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
