Class: RecombeeApiClient::DeleteItem
- Inherits:
-
ApiRequest
- Object
- ApiRequest
- RecombeeApiClient::DeleteItem
- Defined in:
- lib/recombee_api_client/api/delete_item.rb
Overview
Deletes an item of the given itemId from the catalog.
If there are any purchases, ratings, bookmarks, cart additions, or detail views of the item present in the database, they will be deleted in cascade as well. Also, if the item is present in some series, it will be removed from all the series where present.
If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful), and only exclude the item from recommendations. In such a case, use ReQL filter instead of deleting the item completely.
Instance Attribute Summary collapse
-
#ensure_https ⇒ Object
Returns the value of attribute ensure_https.
-
#item_id ⇒ Object
readonly
Returns the value of attribute item_id.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#body_parameters ⇒ Object
Values of body parameters as a Hash.
-
#initialize(item_id) ⇒ DeleteItem
constructor
- Required arguments -
item_id-> ID of the item to be deleted.
- Required arguments -
-
#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(item_id) ⇒ DeleteItem
-
Required arguments
item_id-> ID of the item to be deleted.
24 25 26 27 28 |
# File 'lib/recombee_api_client/api/delete_item.rb', line 24 def initialize(item_id) @item_id = item_id @timeout = 3000 @ensure_https = false end |
Instance Attribute Details
#ensure_https ⇒ Object
Returns the value of attribute ensure_https.
18 19 20 |
# File 'lib/recombee_api_client/api/delete_item.rb', line 18 def ensure_https @ensure_https end |
#item_id ⇒ Object (readonly)
Returns the value of attribute item_id.
17 18 19 |
# File 'lib/recombee_api_client/api/delete_item.rb', line 17 def item_id @item_id end |
#timeout ⇒ Object
Returns the value of attribute timeout.
18 19 20 |
# File 'lib/recombee_api_client/api/delete_item.rb', line 18 def timeout @timeout end |
Instance Method Details
#body_parameters ⇒ Object
Values of body parameters as a Hash
36 37 38 |
# File 'lib/recombee_api_client/api/delete_item.rb', line 36 def body_parameters {} end |
#method ⇒ Object
HTTP method
31 32 33 |
# File 'lib/recombee_api_client/api/delete_item.rb', line 31 def method :delete end |
#path ⇒ Object
Relative path to the endpoint
47 48 49 |
# File 'lib/recombee_api_client/api/delete_item.rb', line 47 def path "/{databaseId}/items/#{@item_id}" end |
#query_parameters ⇒ Object
Values of query parameters as a Hash. name of parameter => value of the parameter
42 43 44 |
# File 'lib/recombee_api_client/api/delete_item.rb', line 42 def query_parameters {} end |