import type { GiftCertificateItem } from './GiftCertificateItem'; import type { OrderPaymentInstrument } from './OrderPaymentInstrument'; import type { OrderProductItem } from './OrderProductItem'; import type { BonusDiscountLineItem } from './BonusDiscountLineItem'; import type { ShippingItem } from './ShippingItem'; import type { OrderAddress } from './OrderAddress'; import type { Shipment } from './Shipment'; import type { CouponItem } from './CouponItem'; import type { CustomerInfo } from './CustomerInfo'; import type { GroupedTaxItem } from './GroupedTaxItem'; import type { OmsData } from './OmsData'; import type { PriceAdjustment } from './PriceAdjustment'; /** * @type Order: Document representing an order. * * @property adjustedMerchandizeTotalTax: The total tax on products in the order, including price adjustments, but not including service charges such as shipping. It is read only. * * @property adjustedShippingTotalTax: The total tax on shipping charges in the order, including shipping price adjustments. It is read only. * * @property billingAddress: The billing address. * * @property bonusDiscountLineItems: The bonus discount line items. * * @property channelType: The sales channel. It is read only. * * @property confirmationStatus: The confirmation status. * * @property couponItems: The coupon items. It is read only. * * @property createdBy: This value depends on how the order was created. If a shopper created the order, this value is Customer. If a job created the order, this value is System. Otherwise, this value is the name of the user who created the order. It is read only. * * @property creationDate: The timestamp when the order was created. It is read only. * * @property currency: The ISO 4217 mnemonic code of the currency. It is read only. * - **Pattern:** /^([A-Z][A-Z][A-Z]|N\/A)$/ * * @property customerInfo: The customer information for guest or logged-in customers. It is read only. * * @property customerName: The customer name. It is read only. * * @property exportStatus: The export status of the order. * * @property externalOrderStatus: The external status of the order. * * @property giftCertificateItems: The gift certificate line items. It is read only. * * @property globalPartyId: The Customer 360 Global Party ID associated with the shopper. It is read only. * * @property lastModified: The timestamp when the order was last modified. It is read only. * * @property merchandizeTotalTax: The total products tax in the purchase currency. Merchandise total prices represent the sum of product prices not including shipping or adjustments. It is read only. * * @property orderNo: The order number. * - **Min Length:** 1 * - **Max Length:** 50 * * @property orderPriceAdjustments: The order-level price adjustments. It is read only. * * @property orderToken: The order token used to secure the lookup of an order on base of the plain order number. The order token contains only URL safe characters. It is read only. * * @property orderTotal: The total price, including products, shipping, and tax. It is read only. * * @property orderViewCode: The order view code used to secure the order lookup of an order using Order Lookup API. The order view code contains only URL safe characters. Warning : Order view code must not be exposed in the URL and must only be displayed to the shopper or sent as an email. Order view code must not be logged in the code. It is read only. * * @property paymentInstruments: The payment instruments list. * * @property paymentStatus: The payment status. * * @property productItems: The product items. It is read only. * * @property productSubTotal: The total price of all products including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn\'t include tax. If the taxation policy is gross, it includes tax. It is read only. * * @property productTotal: The total price of all products in the shipment including item-level adjustments and prorated order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn\'t include tax. If the taxation policy is gross, it includes tax. It is read only. * * @property taxRoundedAtGroup: If the tax is rounded at the group level, this is set to true. If the tax is rounded at the item or unit level, it is set to false. It is read only. * * @property shipments: The shipments. It is read only. * * @property shippingItems: The shipping items. It is read only. * * @property shippingStatus: The shipping status. * * @property shippingTotal: The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, it doesn\'t include tax. If the taxation policy is gross, it includes tax. It is read only. * * @property shippingTotalTax: The total tax on all shipping charges, not including shipping adjustments. It is read only. * * @property siteId: The order\'s site. It is read only. * - **Min Length:** 1 * - **Max Length:** 32 * * @property omsData: Information retrieved from Order Management (OMS) for the order. * * @property sourceCode: The source code assigned to the basket from which this order was created. It is read only. * * @property status: The status. * * @property taxTotal: The total tax amount. It is read only. * * @property taxation: The taxation policy (gross or net). It is read only. * * @property groupedTaxItems: Tax values that are grouped and summed based on the tax rate. The tax totals of the line items with the same tax rate are grouped together and summed up. This does not affect the calculation in any way. It is read only. * * @property guest: The registration status of the customer. It is read only. * */ export type Order = { adjustedMerchandizeTotalTax?: number; adjustedShippingTotalTax?: number; billingAddress?: OrderAddress; bonusDiscountLineItems?: Array; channelType?: OrderChannelTypeEnum; confirmationStatus?: OrderConfirmationStatusEnum; couponItems?: Array; createdBy?: string; creationDate?: string; currency?: string; customerInfo?: CustomerInfo; customerName?: string; exportStatus?: OrderExportStatusEnum; externalOrderStatus?: string; giftCertificateItems?: Array; globalPartyId?: string; lastModified?: string; merchandizeTotalTax?: number; orderNo?: string; orderPriceAdjustments?: Array; orderToken?: string; orderTotal?: number; orderViewCode?: string; paymentInstruments?: Array; paymentStatus?: OrderPaymentStatusEnum; productItems?: Array; productSubTotal?: number; productTotal?: number; taxRoundedAtGroup?: boolean; shipments?: Array; shippingItems?: Array; shippingStatus?: OrderShippingStatusEnum; shippingTotal?: number; shippingTotalTax?: number; siteId?: string; omsData?: OmsData; sourceCode?: string; status?: OrderStatusEnum; taxTotal?: number; taxation?: OrderTaxationEnum; groupedTaxItems?: Array; guest?: boolean; } & { [key: string]: any; }; export type OrderChannelTypeEnum = 'storefront' | 'callcenter' | 'marketplace' | 'dss' | 'store' | 'pinterest' | 'twitter' | 'facebookads' | 'subscriptions' | 'onlinereservation' | 'customerservicecenter' | 'instagramcommerce' | 'tiktok' | 'snapchat' | 'google' | 'whatsapp' | 'youtube' | 'chatgpt' | 'gemini'; export type OrderConfirmationStatusEnum = 'not_confirmed' | 'confirmed'; export type OrderExportStatusEnum = 'not_exported' | 'exported' | 'ready' | 'failed'; export type OrderPaymentStatusEnum = 'not_paid' | 'part_paid' | 'paid'; export type OrderShippingStatusEnum = 'not_shipped' | 'part_shipped' | 'shipped'; export type OrderStatusEnum = 'created' | 'new' | 'completed' | 'cancelled' | 'replaced' | 'failed'; export type OrderTaxationEnum = 'gross' | 'net';