Class: AddCartAddition

AddCartAddition(userId, itemId, optional)

Adds a cart addition of a given item made by a given user.

Constructor

new AddCartAddition(userId, itemId, optional)

Construct the request
Parameters:
Name Type Description
userId string User who added the item to the cart
itemId string Item added to the cart
optional Object Optional parameters given as an object with structure name of the parameter: value - Allowed parameters: - *timestamp* - Type: string|number - Description: UTC timestamp of the cart addition as ISO8601-1 pattern or UTC epoch time. The default value is the current time. - *cascadeCreate* - Type: boolean - Description: Sets whether the given user/item should be created if not present in the database. - *amount* - Type: number - Description: Amount (number) added to cart. The default is 1. For example if `user-x` adds two `item-y` during a single order (session...), the `amount` should equal to 2. - *price* - Type: number - Description: Price of the added item. If `amount` is greater than 1, sum of prices of all the items should be given. - *recommId* - Type: string - Description: If this cart addition is based on a recommendation request, `recommId` is the id of the clicked recommendation.
Source:

Methods

bodyParameters() → {Object}

Get body parameters
Source:
Returns:
The values of body parameters (name of parameter: value of the parameter)
Type
Object

queryParameters() → {Object}

Get query parameters
Source:
Returns:
The values of query parameters (name of parameter: value of the parameter)
Type
Object