ECommerceCartItem class

This class contains information about items added to the cart.

Instance methods

init(product:quantity:revenue:referrer:)

Initializes the instance of the ECommerceCartItem class with information about items added to the cart.

Properties

product

Product. The ECommerceProduct class instance.

quantity

Quantity.

revenue

The total price of the product in the cart. This price factors in the quantity, discounts to be applied, and so on. The ECommercePrice class instance.

referrer

The source of traffic to the cart. The ECommerceReferrer class instance.

Method descriptions

init(product:quantity:revenue:referrer:)

init(product: ECommerceProduct, quantity: NSDecimalNumber, revenue: ECommercePrice, referrer: ECommerceReferrer?)

Initializes the instance of the ECommerceCartItem class with information about items added to the cart.

Parameters:

product

Product. The ECommerceProduct class instance.

quantity

Quantity.

revenue

The total price of the product in the cart. This price factors in the quantity, discounts to be applied, and so on. The ECommercePrice class instance.

referrer

The source of traffic to the cart. The ECommerceReferrer class instance.

Returns:

The ECommerceCartItem class instance.

Property descriptions

product

var product: ECommerceProduct { get }

Product. The ECommerceProduct class instance.

quantity

var quantity: NSDecimalNumber { get }

Quantity.

revenue

var revenue: ECommercePrice { get }

The total price of the product in the cart. This price factors in the quantity, discounts to be applied, and so on. The ECommercePrice class instance.

referrer

var referrer: ECommerceReferrer? { get }

The source of traffic to the cart. The ECommerceReferrer class instance.