recombee_api_client.api_requests.add_cart_addition module¶
-
class
recombee_api_client.api_requests.add_cart_addition.
AddCartAddition
(user_id: str, item_id: str, timestamp: Union[str, int] = UUID('4750787b-a593-45b2-8329-ea36205ebd37'), cascade_create: bool = UUID('4750787b-a593-45b2-8329-ea36205ebd37'), amount: float = UUID('4750787b-a593-45b2-8329-ea36205ebd37'), price: float = UUID('4750787b-a593-45b2-8329-ea36205ebd37'), recomm_id: str = UUID('4750787b-a593-45b2-8329-ea36205ebd37'), additional_data: dict = UUID('4750787b-a593-45b2-8329-ea36205ebd37'))¶ Bases:
recombee_api_client.api_requests.request.Request
Adds a cart addition of a given item made by a given user.
Required parameters:
- Parameters
user_id – User who added the item to the cart
item_id – Item added to the cart
Optional parameters:
- 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.
additional_data – A dictionary of additional data for the interaction.
-
get_body_parameters
() → dict¶ Values of body parameters as a dictionary (name of parameter: value of the parameter).
-
get_query_parameters
() → dict¶ Values of query parameters as a dictionary (name of parameter: value of the parameter).