Class: module:models/ProductItem

module:models/ProductItem(quantity)

new module:models/ProductItem(quantity)

Constructs a new ProductItem. Document representing a product item.

Parameters:
Name Type Description
quantity Number

The quantity of the products represented by this item.

Source:

Members

(inner) adjusted_tax :Number

The tax of the product item after adjustments applying.

Type:
  • Number
Source:

(inner) base_price :Number

The base price for the line item, which is the price of the unit before applying adjustments, in the purchase currency. The base price may be net or gross of tax depending on the configured taxation policy.

Type:
  • Number
Source:

(inner) bonus_discount_line_item_id :String

The id of the bonus discount line item this bonus product relates to.

Type:
  • String
Source:

(inner) bonus_product_line_item :Boolean

A flag indicating whether the product item is a bonus.

Type:
  • Boolean
Source:

(inner) bundled_product_items :Array.<module:models/ProductItem>

The array of bundled product items. Can be empty.

Type:
Source:

(inner) c_fromStoreId :String

Links the store to the product line item for grouping shipments in the checkout process.

Type:
  • String
Source:

(inner) gift :Boolean

Returns true if the item is a gift.

Type:
  • Boolean
Source:

(inner) gift_message :String

The gift message.

Type:
  • String
Source:

(inner) inventory_id :String

The inventory list id associated with this item.

Type:
  • String
Source:

(inner) item_id :String

The item identifier. Use this to identify an item when updating the item quantity or creating a custom price adjustment for an item.

Type:
  • String
Source:

(inner) item_text :String

The text describing the item in more detail.

Type:
  • String
Source:

(inner) option_items :Array.<module:models/OptionItem>

The array of option items. This array can be empty.

Type:
Source:

(inner) price :Number

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.

Type:
  • Number
Source:

(inner) price_adjustments :Array.<module:models/PriceAdjustment>

Array of price adjustments. Can be empty.

Type:
Source:

(inner) price_after_item_discount :Number

The price of the product line item after applying all product-level adjustments. For net pricing the adjusted net price is returned. For gross pricing, the adjusted gross price is returned.

Type:
  • Number
Source:

(inner) price_after_order_discount :Number

The price of this product line item after considering all dependent price adjustments and prorating all order-level price adjustments. For net pricing the net price is returned. For gross pricing, the gross price is returned.

Type:
  • Number
Source:

(inner) product_id :String

Type:
  • String
Source:

(inner) product_list_item :module:models/ProductListItemReference

Type:
Source:

(inner) product_name :String

The name of the product.

Type:
  • String
Source:

(inner) quantity :Number

The quantity of the products represented by this item.

Type:
  • Number
Source:

(inner) shipment_id :String

The id of the shipment which includes the product item.

Type:
  • String
Source:

(inner) shipping_item_id :String

The reference to the related shipping item if it exists. This is the case if for example when a surcharge is defined for individual products using a particular a shipping method.

Type:
  • String
Source:

(inner) tax :Number

The tax of the product item before adjustments applying.

Type:
  • Number
Source:

(inner) tax_basis :Number

The price used to calculate the tax for this product item.

Type:
  • Number
Source:

(inner) tax_class_id :String

The tax class ID for the product item or null if no tax class ID is associated with the product item.

Type:
  • String
Source:

(inner) tax_rate :Number

The tax rate, which is the decimal tax rate to be applied to the product represented by this item.

Type:
  • Number
Source:

Methods

(static) constructFromObject(data, obj) → {module:models/ProductItem}

Constructs a ProductItem from a plain JavaScript object, optionally creating a new instance. Copies all relevant properties from data to obj if supplied or a new instance if not.

Parameters:
Name Type Description
data Object

The plain JavaScript object bearing properties of interest.

obj module:models/ProductItem

Optional instance to populate.

Source:
Returns:

The populated ProductItem instance.

Type
module:models/ProductItem