import type * as Square from "../index"; /** * Describes delivery details of an order fulfillment. */ export interface FulfillmentDeliveryDetails { /** The contact information for the person to receive the fulfillment. */ recipient?: Square.FulfillmentRecipient; /** * Indicates the fulfillment delivery schedule type. If `SCHEDULED`, then * `deliver_at` is required. The default is `SCHEDULED`. * See [OrderFulfillmentDeliveryDetailsScheduleType](#type-orderfulfillmentdeliverydetailsscheduletype) for possible values */ scheduleType?: Square.FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType; /** * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) * indicating when the fulfillment was placed. * The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). * * Must be in RFC 3339 timestamp format, e.g., "2016-09-04T23:59:33.123Z". */ placedAt?: string; /** * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) * that represents the start of the delivery period. * The application can set this field while the fulfillment `state` is * `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the * terminal state such as `COMPLETED`, `CANCELED`, and `FAILED`). * * The timestamp must be in RFC 3339 format * (for example, "2016-09-04T23:59:33.123Z"). * * For fulfillments with the schedule type `ASAP`, this is automatically set * to the current time plus `prep_time_duration`, if available. */ deliverAt?: string | null; /** * The [duration](https://developer.squareup.com/docs/build-basics/working-with-dates) * needed to prepare and deliver this fulfillment. * The duration must be in RFC 3339 format (for example, "PT30M" for 30 minutes). Don't confuse * "M" for months with "M" for minutes. "P5M" means 5 months, while "PT5M" means 5 minutes. */ prepTimeDuration?: string | null; /** * The [duration](https://developer.squareup.com/docs/build-basics/working-with-dates) * after `deliver_at` in which to deliver the order. * Applications can set this field when the fulfillment `state` is * `PROPOSED`, `RESERVED`, or `PREPARED` (any time before the terminal state * such as `COMPLETED`, `CANCELED`, and `FAILED`). * * The duration must be in RFC 3339 format (for example, "PT30M" for 30 minutes). Don't confuse * "M" for months with "M" for minutes. "P5M" means 5 months, while "PT5M" means 5 minutes. */ deliveryWindowDuration?: string | null; /** * Provides additional instructions about the delivery fulfillment. * It is displayed in the Square Point of Sale application and set by the API. */ note?: string | null; /** * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) * indicates when the seller completed the fulfillment. * This field is automatically set when fulfillment `state` changes to `COMPLETED`. * The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). */ completedAt?: string | null; /** * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) * indicates when the seller started processing the fulfillment. * This field is automatically set when the fulfillment `state` changes to `RESERVED`. * The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). */ inProgressAt?: string; /** * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) * indicating when the fulfillment was rejected. This field is * automatically set when the fulfillment `state` changes to `FAILED`. * The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). */ rejectedAt?: string; /** * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) * indicating when the seller marked the fulfillment as ready for * courier pickup. This field is automatically set when the fulfillment `state` changes * to PREPARED. * The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). */ readyAt?: string; /** * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) * indicating when the fulfillment was delivered to the recipient. * The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). */ deliveredAt?: string; /** * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) * indicating when the fulfillment was canceled. This field is automatically * set when the fulfillment `state` changes to `CANCELED`. * * The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). */ canceledAt?: string; /** The delivery cancellation reason. Max length: 100 characters. */ cancelReason?: string | null; /** * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) * indicating when an order can be picked up by the courier for delivery. * The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). */ courierPickupAt?: string | null; /** * The [duration](https://developer.squareup.com/docs/build-basics/working-with-dates) * after `courier_pickup_at` in which the courier should pick up the order. * The duration must be in RFC 3339 format (for example, "PT30M" for 30 minutes). Don't confuse * "M" for months with "M" for minutes. "P5M" means 5 months, while "PT5M" means 5 minutes. */ courierPickupWindowDuration?: string | null; /** Whether the delivery is preferred to be no contact. */ isNoContactDelivery?: boolean | null; /** A note to provide additional instructions about how to deliver the order. */ dropoffNotes?: string | null; /** The name of the courier provider. */ courierProviderName?: string | null; /** The support phone number of the courier. */ courierSupportPhoneNumber?: string | null; /** The identifier for the delivery created by Square. */ squareDeliveryId?: string | null; /** The identifier for the delivery created by the third-party courier service. */ externalDeliveryId?: string | null; /** * The flag to indicate the delivery is managed by a third party (ie DoorDash), which means * we may not receive all recipient information for PII purposes. */ managedDelivery?: boolean | null; }