# 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
from .update_transfer_order_line_data import UpdateTransferOrderLineData


class UpdateTransferOrderData(UncheckedBaseModel):
    """
    Data model for updating a transfer order. All fields are optional.
    """

    source_location_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The source [Location](entity:Location) that will send the items. Must be an active location
    in your Square account with sufficient inventory of the requested items.
    """

    destination_location_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The destination [Location](entity:Location) that will receive the items. Must be an active location
    in your Square account.
    """

    expected_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    Expected transfer date in RFC 3339 format (e.g. "2023-10-01T12:00:00Z").
    """

    notes: typing.Optional[str] = pydantic.Field(default=None)
    """
    Optional notes about the transfer
    """

    tracking_number: typing.Optional[str] = pydantic.Field(default=None)
    """
    Shipment tracking number
    """

    line_items: typing.Optional[typing.List[UpdateTransferOrderLineData]] = pydantic.Field(default=None)
    """
    List of items being transferred
    """

    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
