import type { OptionItem } from './OptionItem'; import type { ProductListItemReference } from './ProductListItemReference'; import type { OmsProductData } from './OmsProductData'; import type { ProductItem } from './ProductItem'; import type { PriceAdjustment } from './PriceAdjustment'; /** * @type OrderProductItem: Document representing an order product item. * * @property omsData: Product information retrieved from Order Management (OMS). Only available in the context of an order. * * @property adjustedTax: The tax on the line item, including any adjustments. It is read only. * * @property basePrice: The base price of the line item, which is the unit price not including 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 bonusDiscountLineItemId: The ID of the bonus discount line item this bonus product relates to. It is read only. * * @property bonusProductLineItem: A flag indicating whether the product item is a bonus. * * @property bundledProductItems: The bundled product items. * * @property gift: Returns true if the item is a gift. It is read only. * * @property giftMessage: The gift message. * * @property inventoryId: The inventory list ID associated with this item. * - **Max Length:** 256 * * @property itemId: The product item ID. Use it to identify this item when updating its quantity or creating a custom price adjustment for it. It is read only. * * @property itemText: The text describing the item. * * @property optionItems: The option items. * * @property price: The price of the line item before applying any adjustments. If the line item is based on net pricing then the net price is returned. If the line item is based on gross pricing then the gross price is returned. It is read only. * * @property priceAdjustments: The price adjustments. * * @property priceAfterItemDiscount: The price of the product line item 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 priceAfterOrderDiscount: The price of the product line item 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 productId: The ID of the product. * - **Max Length:** 100 * * @property productListItem: If this product line item was added from a product list, this value is a reference to the corresponding product list item. * * @property productName: The name of the product. * * @property qualifyingProductItemId: Returns the id of the ProductLineItem that qualified the basket for this bonus product. This method is only applicable if the product line item is a bonus product line item, and if the promotion is a product promotion with number of qualifying products granting a bonus-product discount. If these conditions aren\'t met, the method returns null. If there are multiple product line items that triggered this bonus product, this method returns the last one by position within the order. * - **Max Length:** 28 * * @property quantity: The quantity of the products represented by this item. * * @property shipmentId: The ID of the shipment this item belongs to. * * @property shippingItemId: If the product line item has a related shipping item, this value is its ID. A related shipping item represents a surcharge applied to individual products using a particular shipping method. It is read only. * * @property tax: The tax for the product item, not including price adjustments. It is read only. * * @property taxBasis: The price used to calculate the tax for this product item. It is read only. * * @property taxClassId: The tax class ID for the product item, or null if no tax class ID is associated with the product item. It is read only. * * @property taxRate: The tax rate, which is the decimal tax rate to be applied to the product represented by this item. It is read only. * */ export type OrderProductItem = { omsData?: OmsProductData; adjustedTax?: number; basePrice?: number; bonusDiscountLineItemId?: string; bonusProductLineItem?: boolean; bundledProductItems?: Array; gift?: boolean; giftMessage?: string; inventoryId?: string; itemId?: string; itemText?: string; optionItems?: Array; price?: number; priceAdjustments?: Array; priceAfterItemDiscount?: number; priceAfterOrderDiscount?: number; productId?: string; productListItem?: ProductListItemReference; productName?: string; qualifyingProductItemId?: string; quantity?: number; shipmentId?: string; shippingItemId?: string; tax?: number; taxBasis?: number; taxClassId?: string; taxRate?: number; } & { [key: string]: any; };