# 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 UpdateTransferOrderLineData(UncheckedBaseModel):
    """
    Represents a line item update in a transfer order
    """

    uid: typing.Optional[str] = pydantic.Field(default=None)
    """
    Line item id being updated. Required for updating/removing existing line items, but should not be set for new line items.
    """

    item_variation_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Catalog item variation being transferred
    
    Required for new line items, but otherwise is not updatable.
    """

    quantity_ordered: typing.Optional[str] = pydantic.Field(default=None)
    """
    Total quantity ordered
    """

    remove: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Flag to remove the line item during update. Must include `uid` in removal request
    """

    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
