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

import typing_extensions
import typing_extensions
from .fulfillment_recipient import FulfillmentRecipientParams
import typing


class FulfillmentShipmentDetailsParams(typing_extensions.TypedDict):
    """
    Contains the details necessary to fulfill a shipment order.
    """

    recipient: typing_extensions.NotRequired[FulfillmentRecipientParams]
    """
    Information about the person to receive this shipment fulfillment.
    """

    carrier: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The shipping carrier being used to ship this fulfillment (such as UPS, FedEx, or USPS).
    """

    shipping_note: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A note with additional information for the shipping carrier.
    """

    shipping_type: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A description of the type of shipping product purchased from the carrier
    (such as First Class, Priority, or Express).
    """

    tracking_number: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The reference number provided by the carrier to track the shipment's progress.
    """

    tracking_url: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A link to the tracking webpage on the carrier's website.
    """

    placed_at: typing_extensions.NotRequired[str]
    """
    The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
    indicating when the shipment was requested. The timestamp must be in RFC 3339 format
    (for example, "2016-09-04T23:59:33.123Z").
    """

    in_progress_at: typing_extensions.NotRequired[str]
    """
    The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
    indicating when this fulfillment was moved to the `RESERVED` state, which  indicates that preparation
    of this shipment has begun. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
    """

    packaged_at: typing_extensions.NotRequired[str]
    """
    The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
    indicating when this fulfillment was moved to the `PREPARED` state, which indicates that the
    fulfillment is packaged. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
    """

    expected_shipped_at: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
    indicating when the shipment is expected to be delivered to the shipping carrier.
    The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
    """

    shipped_at: typing_extensions.NotRequired[str]
    """
    The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
    indicating when this fulfillment was moved to the `COMPLETED` state, which indicates that
    the fulfillment has been given to the shipping carrier. The timestamp must be in RFC 3339 format
    (for example, "2016-09-04T23:59:33.123Z").
    """

    canceled_at: typing_extensions.NotRequired[typing.Optional[str]]
    """
    The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
    indicating the shipment was canceled.
    The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
    """

    cancel_reason: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A description of why the shipment was canceled.
    """

    failed_at: typing_extensions.NotRequired[str]
    """
    The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates)
    indicating when the shipment failed to be completed. The timestamp must be in RFC 3339 format
    (for example, "2016-09-04T23:59:33.123Z").
    """

    failure_reason: typing_extensions.NotRequired[typing.Optional[str]]
    """
    A description of why the shipment failed to be completed.
    """
