Class: RecombeeApiClient::UpdateManualReqlSegmentation
- Inherits:
-
ApiRequest
- Object
- ApiRequest
- RecombeeApiClient::UpdateManualReqlSegmentation
- Defined in:
- lib/recombee_api_client/api/update_manual_reql_segmentation.rb
Overview
Update an existing Segmentation.
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#ensure_https ⇒ Object
Returns the value of attribute ensure_https.
-
#segmentation_id ⇒ Object
readonly
Returns the value of attribute segmentation_id.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#body_parameters ⇒ Object
Values of body parameters as a Hash.
-
#initialize(segmentation_id, optional = {}) ⇒ UpdateManualReqlSegmentation
constructor
-
*Required arguments* -
segmentation_id
-> ID of the updated Segmentation.
-
-
#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_optional
Constructor Details
#initialize(segmentation_id, optional = {}) ⇒ UpdateManualReqlSegmentation
-
*Required arguments*
-
segmentation_id
-> ID of the updated Segmentation
-
-
*Optional arguments (given as hash optional)*
-
title
-> Human-readable name that is shown in the Recombee Admin UI. -
description
-> Description that is shown in the Recombee Admin UI.
-
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/recombee_api_client/api/update_manual_reql_segmentation.rb', line 27 def initialize(segmentation_id, optional = {}) @segmentation_id = segmentation_id optional = normalize_optional(optional) @title = optional['title'] @description = optional['description'] @optional = optional @timeout = 10000 @ensure_https = false @optional.each do |par, _| fail UnknownOptionalParameter.new(par) unless ["title","description"].include? par end end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
13 14 15 |
# File 'lib/recombee_api_client/api/update_manual_reql_segmentation.rb', line 13 def description @description end |
#ensure_https ⇒ Object
Returns the value of attribute ensure_https.
15 16 17 |
# File 'lib/recombee_api_client/api/update_manual_reql_segmentation.rb', line 15 def ensure_https @ensure_https end |
#segmentation_id ⇒ Object (readonly)
Returns the value of attribute segmentation_id.
13 14 15 |
# File 'lib/recombee_api_client/api/update_manual_reql_segmentation.rb', line 13 def segmentation_id @segmentation_id end |
#timeout ⇒ Object
Returns the value of attribute timeout.
14 15 16 |
# File 'lib/recombee_api_client/api/update_manual_reql_segmentation.rb', line 14 def timeout @timeout end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
13 14 15 |
# File 'lib/recombee_api_client/api/update_manual_reql_segmentation.rb', line 13 def title @title end |
Instance Method Details
#body_parameters ⇒ Object
Values of body parameters as a Hash
46 47 48 49 50 51 |
# File 'lib/recombee_api_client/api/update_manual_reql_segmentation.rb', line 46 def body_parameters p = Hash.new p['title'] = @optional['title'] if @optional.include? 'title' p['description'] = @optional['description'] if @optional.include? 'description' p end |
#method ⇒ Object
HTTP method
41 42 43 |
# File 'lib/recombee_api_client/api/update_manual_reql_segmentation.rb', line 41 def method :post end |
#path ⇒ Object
Relative path to the endpoint
61 62 63 |
# File 'lib/recombee_api_client/api/update_manual_reql_segmentation.rb', line 61 def path "/{databaseId}/segmentations/manual-reql/#{@segmentation_id}" end |
#query_parameters ⇒ Object
Values of query parameters as a Hash. name of parameter => value of the parameter
55 56 57 58 |
# File 'lib/recombee_api_client/api/update_manual_reql_segmentation.rb', line 55 def query_parameters params = {} params end |