AMAECommerceCartItem class

This class contains information about items added to the cart.

Instance methods

-initWithProduct:quantity:revenue:referrer:

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

Properties

product

Product. The AMAECommerceProduct 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 AMAECommercePrice class instance.

referrer

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

Method descriptions

-initWithProduct:referrer:quantity:revenue:

- (instancetype)initWithProduct:(AMAECommerceProduct *)product
                       quantity:(NSDecimalNumber *)quantity
                        revenue:(AMAECommercePrice *)revenue
                       referrer:(nullable AMAECommerceReferrer *)referrer;

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

Parameters:

product

Product. The AMAECommerceProduct 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 AMAECommercePrice class instance.

referrer

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

Returns:

The AMAECommerceCartItem class instance.

Property descriptions

product

(nonatomic, strong, readonly) AMAECommerceProduct *product

Product. The AMAECommerceProduct class instance.

quantity

(nonatomic, strong, readonly) NSDecimalNumber *quantity

Quantity.

revenue

(nonatomic, strong, readonly) AMAECommercePrice *revenue

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

referrer

(nonatomic, strong, readonly, nullable) AMAECommerceReferrer *referrer

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