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

import typing_extensions
import typing_extensions
import typing
from ..types.order_state import OrderState
from .order_fulfillment_updated_update import OrderFulfillmentUpdatedUpdateParams


class OrderFulfillmentUpdatedParams(typing_extensions.TypedDict):
    order_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The order's unique ID.
    """

    version: typing_extensions.NotRequired[int]
    """
    The version number, which is incremented each time an update is committed to the order.
    Orders that were not created through the API do not include a version number and
    therefore cannot be updated.
    
    [Read more about working with versions.](https://developer.squareup.com/docs/orders-api/manage-orders/update-orders)
    """

    location_id: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The ID of the seller location that this order is associated with.
    """

    state: typing_extensions.NotRequired[OrderState]
    """
    The state of the order.
    See [OrderState](#type-orderstate) for possible values
    """

    created_at: typing_extensions.NotRequired[str]
    """
    The timestamp for when the order was created, in RFC 3339 format.
    """

    updated_at: typing_extensions.NotRequired[str]
    """
    The timestamp for when the order was last updated, in RFC 3339 format.
    """

    fulfillment_update: typing_extensions.NotRequired[
        typing.Optional[typing.Sequence[OrderFulfillmentUpdatedUpdateParams]]
    ]
    """
    The fulfillments that were updated with this version change.
    """
