import type { TaxItem } from './TaxItem'; import type { OptionItem } from './OptionItem'; import type { ProductListItemReference } from './ProductListItemReference'; import type { PriceAdjustment } from './PriceAdjustment'; /** * @type ProductItem: Document representing a product item. * * @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. * * @property grossPrice: The gross price of the line item before applying any adjustments. * * @property itemText: The text describing the item. * - **Max Length:** 256 * * @property netPrice: The net price of the line item before applying any adjustments. * * @property tax: The tax on the line item before applying any adjustments. * * @property taxBasis: The amount used to calculate the tax for this item. * * @property adjustedTax: The tax on the line item, including any adjustments. * * @property bonusDiscountLineItemId: The ID of the bonus discount line item to which this bonus product relates. * - **Min Length:** 1 * - **Max Length:** 256 * * @property bonusProductLineItem: A flag indicating whether this item is a bonus product. * * @property brand: * - **Max Length:** 256 * * @property bundledProductItems: The bundled product items. * * @property externalLineItemStatus: The external line item status. * - **Max Length:** 256 * * @property externalLineItemText: The external line item text. * * @property gift: Returns true if the item is a gift. * * @property giftMessage: The gift message. * - **Max Length:** 4000 * * @property inventoryId: The inventory list ID associated with this item. * - **Max Length:** 256 * * @property itemId: The product item ID. Use this to identify this item when updating its quantity or creating a custom price adjustment for it. * - **Min Length:** 1 * - **Max Length:** 256 * * @property minOrderQuantity: The minimum order quantity for this product. * * @property optionItems: The option items. * * @property position: The position of the product line item. * * @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. * * @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. * * @property productId: The id (SKU) of the product. * - **Min Length:** 1 * - **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. * - **Max Length:** 4000 * * @property quantity: The ordered quantity of the products represented by this item. * * @property shipmentId: The ID of the shipment to which this item belongs. * - **Min Length:** 1 * - **Max Length:** 256 * * @property shippingItemId: If the product line item has a related shipping item, this value is the shipping item ID. A related shipping item represents a surcharge applied to individual products using a particular shipping method. * - **Min Length:** 1 * - **Max Length:** 256 * * @property stepQuantity: * * @property taxItems: The individual tax items for this product line item (e.g. state tax, county tax). * * @property taxRate: The tax rate applicable to this product line item. For a 10% tax rate, the value is 0.1. * */ export type ProductItem = { basePrice?: number; grossPrice?: number; itemText?: string; netPrice?: number; tax?: number; taxBasis?: number; adjustedTax?: number; bonusDiscountLineItemId?: string; bonusProductLineItem?: boolean; brand?: string; bundledProductItems?: Array; externalLineItemStatus?: string; externalLineItemText?: string; gift?: boolean; giftMessage?: string; inventoryId?: string; itemId?: string; minOrderQuantity?: number; optionItems?: Array; position?: number; priceAdjustments?: Array; priceAfterItemDiscount?: number; priceAfterOrderDiscount?: number; productId: string; productListItem?: ProductListItemReference; productName?: string; quantity?: number; shipmentId: string; shippingItemId?: string; stepQuantity?: number; taxItems?: Array; taxRate: number; } & { [key: string]: any; };