Class: RecombeeApiClient::RemoveFromSeries

Inherits:
ApiRequest
  • Object
show all
Defined in:
lib/recombee_api_client/api/remove_from_series.rb

Overview

Removes an existing series item from the series.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HashNormalizer

#camelize, #normalize_optional

Constructor Details

#initialize(series_id, item_type, item_id) ⇒ RemoveFromSeries

  • *Required arguments*

    • series_id -> ID of the series from which a series item is to be removed.

    • item_type -> Type of the item to be removed.

    • item_id -> ID of the item iff ‘itemType` is `item`. ID of the series iff `itemType` is `series`.



22
23
24
25
26
27
28
# File 'lib/recombee_api_client/api/remove_from_series.rb', line 22

def initialize(series_id, item_type, item_id)
  @series_id = series_id
  @item_type = item_type
  @item_id = item_id
  @timeout = 3000
  @ensure_https = false
end

Instance Attribute Details

#ensure_httpsObject

Returns the value of attribute ensure_https.



14
15
16
# File 'lib/recombee_api_client/api/remove_from_series.rb', line 14

def ensure_https
  @ensure_https
end

#item_idObject (readonly)

Returns the value of attribute item_id.



12
13
14
# File 'lib/recombee_api_client/api/remove_from_series.rb', line 12

def item_id
  @item_id
end

#item_typeObject (readonly)

Returns the value of attribute item_type.



12
13
14
# File 'lib/recombee_api_client/api/remove_from_series.rb', line 12

def item_type
  @item_type
end

#series_idObject (readonly)

Returns the value of attribute series_id.



12
13
14
# File 'lib/recombee_api_client/api/remove_from_series.rb', line 12

def series_id
  @series_id
end

#timeoutObject

Returns the value of attribute timeout.



13
14
15
# File 'lib/recombee_api_client/api/remove_from_series.rb', line 13

def timeout
  @timeout
end

Instance Method Details

#body_parametersObject

Values of body parameters as a Hash



36
37
38
39
40
41
# File 'lib/recombee_api_client/api/remove_from_series.rb', line 36

def body_parameters
  p = Hash.new
  p['itemType'] = @item_type
  p['itemId'] = @item_id
  p
end

#methodObject

HTTP method



31
32
33
# File 'lib/recombee_api_client/api/remove_from_series.rb', line 31

def method
  :delete
end

#pathObject

Relative path to the endpoint



51
52
53
# File 'lib/recombee_api_client/api/remove_from_series.rb', line 51

def path
  "/{databaseId}/series/#{@series_id}/items/"
end

#query_parametersObject

Values of query parameters as a Hash. name of parameter => value of the parameter



45
46
47
48
# File 'lib/recombee_api_client/api/remove_from_series.rb', line 45

def query_parameters
  params = {}
  params
end