Package recombee_api_client :: Package api_requests :: Module add_cart_addition :: Class AddCartAddition
[hide private]
[frames] | no frames]

Class AddCartAddition

source code

     object --+    
              |    
request.Request --+
                  |
                 AddCartAddition

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

Instance Methods [hide private]
 
__init__(self, user_id, item_id, timestamp=UUID('f963e825-3b26-4a9b-b152-01d0bae9202f'), cascade_create=UUID('f963e825-3b26-4a9b-b152-01d0bae9202f'), amount=UUID('f963e825-3b26-4a9b-b152-01d0bae9202f'), price=UUID('f963e825-3b26-4a9b-b152-01d0bae9202f'), recomm_id=UUID('f963e825-3b26-4a9b-b152-01d0bae9202f'))
Required parameters:
source code
 
get_body_parameters(self)
Values of body parameters as a dictionary (name of parameter: value of the parameter).
source code
 
get_query_parameters(self)
Values of query parameters as a dictionary (name of parameter: value of the parameter).
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from request.Request: quote_path_param

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, user_id, item_id, timestamp=UUID('f963e825-3b26-4a9b-b152-01d0bae9202f'), cascade_create=UUID('f963e825-3b26-4a9b-b152-01d0bae9202f'), amount=UUID('f963e825-3b26-4a9b-b152-01d0bae9202f'), price=UUID('f963e825-3b26-4a9b-b152-01d0bae9202f'), recomm_id=UUID('f963e825-3b26-4a9b-b152-01d0bae9202f'))
(Constructor)

source code 

Required parameters:

Parameters:
  • user_id - User who added the item to the cart
  • item_id - Item added to the cart

    Optional parameters:

  • timestamp - UTC timestamp of the cart addition as ISO8601-1 pattern or UTC epoch time. The default value is the current time.
  • cascade_create - Sets whether the given user/item should be created if not present in the database.
  • amount - 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 - Price of the added item. If `amount` is greater than 1, sum of prices of all the items should be given.
  • recomm_id - If this cart addition is based on a recommendation request, `recommId` is the id of the clicked recommendation.
Overrides: object.__init__