SetItemValues extends SetValues
Set/update (some) property values of a given item. The properties (columns) must be previously created by [Add item property](https://docs.recombee.com/api.html#add-item-property).
Table of Contents
- $cascade_create : bool
- $ensure_https : bool
- $item_id : string
- $timeout : int
- $values : array<string|int, mixed>
- __construct() : mixed
- Construct the request
- getBodyParameters() : array<string|int, mixed>
- Get body parameters
- getEnsureHttps() : bool
- Returns true if HTTPS must be chosen over HTTP for this request
- getMethod() : static
- Get used HTTP method
- getPath() : string
- Get URI to the endpoint
- getQueryParameters() : array<string|int, mixed>
- Get query parameters
- getTimeout() : int
- Get request timeout
- setEnsureHttps() : mixed
- Sets if HTTPS must be chosen over HTTP for this request
- setTimeout() : mixed
- Sets request timeout
Properties
$cascade_create
protected
bool
$cascade_create
$ensure_https
protected
bool
$ensure_https
$item_id
protected
string
$item_id
$timeout
protected
int
$timeout
$values
protected
array<string|int, mixed>
$values
Methods
__construct()
Construct the request
public
__construct(string $item_id, array<string|int, mixed> $values[, array<string|int, mixed> $optional = array() ]) : mixed
Parameters
- $item_id : string
-
ID of the item which will be modified.
- $values : array<string|int, mixed>
-
The values for the individual properties. Example of body:
{ "product_description": "4K TV with 3D feature", "categories": ["Electronics", "Televisions"], "price_usd": 342, }
- $optional : array<string|int, mixed> = array()
-
Optional parameters given as an array containing pairs name of the parameter => value
- Allowed parameters:
-
cascadeCreate
- Type: bool
- Description: Sets whether the given entity should be created if not present in the database.
-
cascadeCreate
- Allowed parameters:
Return values
mixed —getBodyParameters()
Get body parameters
public
abstract getBodyParameters() : array<string|int, mixed>
Return values
array<string|int, mixed> —Values of body parameters (name of parameter => value of the parameter)
getEnsureHttps()
Returns true if HTTPS must be chosen over HTTP for this request
public
getEnsureHttps() : bool
Return values
bool —true if HTTPS must be chosen
getMethod()
Get used HTTP method
public
abstract getMethod() : static
Return values
static —Used HTTP method
getPath()
Get URI to the endpoint
public
getPath() : string
Return values
string —URI to the endpoint
getQueryParameters()
Get query parameters
public
abstract getQueryParameters() : array<string|int, mixed>
Return values
array<string|int, mixed> —Values of query parameters (name of parameter => value of the parameter)
getTimeout()
Get request timeout
public
getTimeout() : int
Return values
int —Request timeout in milliseconds
setEnsureHttps()
Sets if HTTPS must be chosen over HTTP for this request
public
setEnsureHttps(mixed $ensure_https) : mixed
Parameters
- $ensure_https : mixed
Return values
mixed —setTimeout()
Sets request timeout
public
setTimeout(mixed $timeout) : mixed
Parameters
- $timeout : mixed