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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .fulfillment_state import FulfillmentState
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class OrderFulfillmentUpdatedUpdate(UncheckedBaseModel):
    """
    Information about fulfillment updates.
    """

    fulfillment_uid: typing.Optional[str] = pydantic.Field(default=None)
    """
    A unique ID that identifies the fulfillment only within this order.
    """

    old_state: typing.Optional[FulfillmentState] = pydantic.Field(default=None)
    """
    The state of the fulfillment before the change.
    The state is not populated if the fulfillment is created with this new `Order` version.
    """

    new_state: typing.Optional[FulfillmentState] = pydantic.Field(default=None)
    """
    The state of the fulfillment after the change. The state might be equal to `old_state` if a non-state
    field was changed on the fulfillment (such as the tracking number).
    """

    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
