Class: RecombeeApiClient::UpdateMoreItems
- Inherits:
-
ApiRequest
- Object
- ApiRequest
- RecombeeApiClient::UpdateMoreItems
- Defined in:
- lib/recombee_api_client/api/update_more_items.rb
Overview
Updates (some) property values of all the items that pass the filter.
Example: *Setting all the items that are older than a week as unavailable*
```json
{
"filter": "'releaseDate' < now() - 7*24*3600",
"changes": {"available": false}
}
```
Instance Attribute Summary collapse
-
#changes ⇒ Object
readonly
Returns the value of attribute changes.
-
#ensure_https ⇒ Object
Returns the value of attribute ensure_https.
-
#filter ⇒ Object
readonly
Returns the value of attribute filter.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#body_parameters ⇒ Object
Values of body parameters as a Hash.
-
#initialize(filter, changes) ⇒ UpdateMoreItems
constructor
-
*Required arguments* -
filter-> A [ReQL](docs.recombee.com/reql) expression, which returnstruefor the items that shall be updated.
-
-
#method ⇒ Object
HTTP method.
-
#path ⇒ Object
Relative path to the endpoint.
-
#query_parameters ⇒ Object
Values of query parameters as a Hash.
Methods included from HashNormalizer
#camelize, #normalize_hash_to_camel_case
Constructor Details
#initialize(filter, changes) ⇒ UpdateMoreItems
-
*Required arguments*
-
filter-> A [ReQL](docs.recombee.com/reql) expression, which returnstruefor the items that shall be updated. -
changes-> A dictionary where the keys are properties that shall be updated.
-
30 31 32 33 34 35 |
# File 'lib/recombee_api_client/api/update_more_items.rb', line 30 def initialize(filter, changes) @filter = filter @changes = changes @timeout = 100_000 @ensure_https = false end |
Instance Attribute Details
#changes ⇒ Object (readonly)
Returns the value of attribute changes.
22 23 24 |
# File 'lib/recombee_api_client/api/update_more_items.rb', line 22 def changes @changes end |
#ensure_https ⇒ Object
Returns the value of attribute ensure_https.
23 24 25 |
# File 'lib/recombee_api_client/api/update_more_items.rb', line 23 def ensure_https @ensure_https end |
#filter ⇒ Object (readonly)
Returns the value of attribute filter.
22 23 24 |
# File 'lib/recombee_api_client/api/update_more_items.rb', line 22 def filter @filter end |
#timeout ⇒ Object
Returns the value of attribute timeout.
23 24 25 |
# File 'lib/recombee_api_client/api/update_more_items.rb', line 23 def timeout @timeout end |
Instance Method Details
#body_parameters ⇒ Object
Values of body parameters as a Hash
43 44 45 46 47 48 49 |
# File 'lib/recombee_api_client/api/update_more_items.rb', line 43 def body_parameters p = {} p['filter'] = @filter p['changes'] = @changes p end |
#method ⇒ Object
HTTP method
38 39 40 |
# File 'lib/recombee_api_client/api/update_more_items.rb', line 38 def method :post end |
#path ⇒ Object
Relative path to the endpoint
58 59 60 |
# File 'lib/recombee_api_client/api/update_more_items.rb', line 58 def path '/{databaseId}/more-items/' end |
#query_parameters ⇒ Object
Values of query parameters as a Hash. name of parameter => value of the parameter
53 54 55 |
# File 'lib/recombee_api_client/api/update_more_items.rb', line 53 def query_parameters {} end |