import type { ProductListItemReference } from './ProductListItemReference'; import type { ProductItem } from './ProductItem'; import type { PriceAdjustment } from './PriceAdjustment'; /** * @type OptionItem: An option item represents an optional purchase related to a product item, and is always associated with that parent product item. An option item can have different values from which to select. For example, a refrigerator item can have an option item representing an extended warranty, with a set of option item values representing different warranty lengths. When a shopper purchases the warranty option item together with the parent refrigerator item, they select one of the available warranty option item values. * * @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. It is read only. * * @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. It is read only. * - **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 optionId: The ID of the option. It is read only. * - **Max Length:** 256 * * @property optionItems: The option items. * * @property optionValueId: The ID of the option value. It is read only. * - **Max Length:** 256 * * @property price: The price of the line item before applying any 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 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 (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. * * @property quantity: The ordered 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 on the line item before applying any adjustments. It is read only. * * @property taxBasis: The amount used to calculate the tax for this 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 OptionItem = { adjustedTax?: number; basePrice?: number; bonusDiscountLineItemId?: string; bonusProductLineItem?: boolean; bundledProductItems?: Array; gift?: boolean; giftMessage?: string; inventoryId?: string; itemId?: string; itemText?: string; optionId: string; optionItems?: Array; optionValueId: string; price?: number; priceAdjustments?: Array; priceAfterItemDiscount?: number; priceAfterOrderDiscount?: number; productId?: string; productListItem?: ProductListItemReference; productName?: string; quantity?: number; shipmentId?: string; shippingItemId?: string; tax?: number; taxBasis?: number; taxClassId?: string; taxRate?: number; } & { [key: string]: any; };