Recombee API Client
Public Member Functions | Properties | List of all members
Recombee.ApiClient.ApiRequests.AddPurchase Class Reference

Add purchase More...

Inheritance diagram for Recombee.ApiClient.ApiRequests.AddPurchase:
Inheritance graph
[legend]
Collaboration diagram for Recombee.ApiClient.ApiRequests.AddPurchase:
Collaboration graph
[legend]

Public Member Functions

 AddPurchase (string userId, string itemId, DateTime? timestamp=null, bool? cascadeCreate=null, double? amount=null, double? price=null, double? profit=null, string recommId=null, Dictionary< string, object > additionalData=null)
 Construct the request More...
 
override string Path ()
 
Returns
URI to the endpoint including path parameters
More...
 
override Dictionary< string, object > QueryParameters ()
 Get query parameters More...
 
override Dictionary< string, object > BodyParameters ()
 Get body parameters More...
 
- Public Member Functions inherited from Recombee.ApiClient.ApiRequests.Request
 Request (HttpMethod httpMethod, int timeoutMilliseconds, bool ensureHttps=false)
 Construct the request More...
 

Properties

string UserId [get]
 User who purchased the item More...
 
string ItemId [get]
 Purchased item More...
 
DateTime? Timestamp [get]
 UTC timestamp of the purchase as ISO8601-1 pattern or UTC epoch time. The default value is the current time. More...
 
bool? CascadeCreate [get]
 Sets whether the given user/item should be created if not present in the database. More...
 
double? Amount [get]
 Amount (number) of purchased items. The default is 1. For example if user-x purchases two item-y during a single order (session...), the amount should equal to 2. More...
 
double? Price [get]
 Price paid by the user for the item. If amount is greater than 1, sum of prices of all the items should be given. More...
 
double? Profit [get]
 Your profit from the purchased item. The profit is natural in e-commerce domain (for example if user-x purchases item-y for $100 and the gross margin is 30 %, then the profit is $30), but is applicable also in other domains (for example at a news company it may be income from displayed advertisement on article page). If amount is greater than 1, sum of profit of all the items should be given. More...
 
string RecommId [get]
 If this purchase is based on a recommendation request, recommId is the id of the clicked recommendation. More...
 
Dictionary< string, object > AdditionalData [get]
 A dictionary of additional data for the interaction. More...
 
- Properties inherited from Recombee.ApiClient.ApiRequests.Request
TimeSpan Timeout [get, set]
 Timeout for the request in milliseconds More...
 
bool EnsureHttps [get]
 If true, HTTPS must be chosen over HTTP for this request More...
 
HttpMethod RequestHttpMehod [get]
 Used HTTP method More...
 

Additional Inherited Members

- Protected Member Functions inherited from Recombee.ApiClient.ApiRequests.Request
double ConvertToUnixTimestamp (DateTime date)
 
Returns
Converts DateTime to UNIX timestamp (epoch)
More...
 

Detailed Description

Add purchase

Adds a purchase of a given item made by a given user.

Constructor & Destructor Documentation

◆ AddPurchase()

Recombee.ApiClient.ApiRequests.AddPurchase.AddPurchase ( string  userId,
string  itemId,
DateTime?  timestamp = null,
bool?  cascadeCreate = null,
double?  amount = null,
double?  price = null,
double?  profit = null,
string  recommId = null,
Dictionary< string, object >  additionalData = null 
)
inline

Construct the request

Parameters
userIdUser who purchased the item
itemIdPurchased item
timestampUTC timestamp of the purchase as ISO8601-1 pattern or UTC epoch time. The default value is the current time.
cascadeCreateSets whether the given user/item should be created if not present in the database.
amountAmount (number) of purchased items. The default is 1. For example if user-x purchases two item-y during a single order (session...), the amount should equal to 2.
pricePrice paid by the user for the item. If amount is greater than 1, sum of prices of all the items should be given.
profitYour profit from the purchased item. The profit is natural in e-commerce domain (for example if user-x purchases item-y for $100 and the gross margin is 30 %, then the profit is $30), but is applicable also in other domains (for example at a news company it may be income from displayed advertisement on article page). If amount is greater than 1, sum of profit of all the items should be given.
recommIdIf this purchase is based on a recommendation request, recommId is the id of the clicked recommendation.
additionalDataA dictionary of additional data for the interaction.

Member Function Documentation

◆ BodyParameters()

override Dictionary<string, object> Recombee.ApiClient.ApiRequests.AddPurchase.BodyParameters ( )
inlinevirtual

Get body parameters

Returns
Dictionary containing values of body parameters (name of parameter: value of the parameter)

Implements Recombee.ApiClient.ApiRequests.Request.

◆ Path()

override string Recombee.ApiClient.ApiRequests.AddPurchase.Path ( )
inlinevirtual

Returns
URI to the endpoint including path parameters

Implements Recombee.ApiClient.ApiRequests.Request.

◆ QueryParameters()

override Dictionary<string, object> Recombee.ApiClient.ApiRequests.AddPurchase.QueryParameters ( )
inlinevirtual

Get query parameters

Returns
Dictionary containing values of query parameters (name of parameter: value of the parameter)

Implements Recombee.ApiClient.ApiRequests.Request.

Property Documentation

◆ AdditionalData

Dictionary<string, object> Recombee.ApiClient.ApiRequests.AddPurchase.AdditionalData
get

A dictionary of additional data for the interaction.

◆ Amount

double? Recombee.ApiClient.ApiRequests.AddPurchase.Amount
get

Amount (number) of purchased items. The default is 1. For example if user-x purchases two item-y during a single order (session...), the amount should equal to 2.

◆ CascadeCreate

bool? Recombee.ApiClient.ApiRequests.AddPurchase.CascadeCreate
get

Sets whether the given user/item should be created if not present in the database.

◆ ItemId

string Recombee.ApiClient.ApiRequests.AddPurchase.ItemId
get

Purchased item

◆ Price

double? Recombee.ApiClient.ApiRequests.AddPurchase.Price
get

Price paid by the user for the item. If amount is greater than 1, sum of prices of all the items should be given.

◆ Profit

double? Recombee.ApiClient.ApiRequests.AddPurchase.Profit
get

Your profit from the purchased item. The profit is natural in e-commerce domain (for example if user-x purchases item-y for $100 and the gross margin is 30 %, then the profit is $30), but is applicable also in other domains (for example at a news company it may be income from displayed advertisement on article page). If amount is greater than 1, sum of profit of all the items should be given.

◆ RecommId

string Recombee.ApiClient.ApiRequests.AddPurchase.RecommId
get

If this purchase is based on a recommendation request, recommId is the id of the clicked recommendation.

◆ Timestamp

DateTime? Recombee.ApiClient.ApiRequests.AddPurchase.Timestamp
get

UTC timestamp of the purchase as ISO8601-1 pattern or UTC epoch time. The default value is the current time.

◆ UserId

string Recombee.ApiClient.ApiRequests.AddPurchase.UserId
get

User who purchased the item


The documentation for this class was generated from the following file: