algolia 3.5.0 → 3.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/abtesting_client.rb +17 -16
- data/lib/algolia/api/analytics_client.rb +173 -333
- data/lib/algolia/api/ingestion_client.rb +40 -200
- data/lib/algolia/api/insights_client.rb +18 -32
- data/lib/algolia/api/monitoring_client.rb +33 -25
- data/lib/algolia/api/personalization_client.rb +16 -8
- data/lib/algolia/api/query_suggestions_client.rb +17 -9
- data/lib/algolia/api/recommend_client.rb +17 -9
- data/lib/algolia/api/search_client.rb +63 -110
- data/lib/algolia/configuration.rb +16 -1
- data/lib/algolia/models/abtesting/ab_test_configuration.rb +0 -2
- data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -18
- data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +0 -18
- data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -18
- data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -18
- data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -18
- data/lib/algolia/models/abtesting/variant.rb +0 -20
- data/lib/algolia/models/analytics/click_position.rb +0 -32
- data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -28
- data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -24
- data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -28
- data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -28
- data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -32
- data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -18
- data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -14
- data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -14
- data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -14
- data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -28
- data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -24
- data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -18
- data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -28
- data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -28
- data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -32
- data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -18
- data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -14
- data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -56
- data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -98
- data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -90
- data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -132
- data/lib/algolia/models/ingestion/event.rb +1 -25
- data/lib/algolia/models/ingestion/pagination.rb +0 -60
- data/lib/algolia/models/ingestion/run.rb +0 -18
- data/lib/algolia/models/ingestion/source_csv.rb +0 -21
- data/lib/algolia/models/ingestion/task.rb +0 -18
- data/lib/algolia/models/ingestion/task_create.rb +0 -18
- data/lib/algolia/models/ingestion/task_create_v1.rb +0 -18
- data/lib/algolia/models/ingestion/task_update.rb +0 -18
- data/lib/algolia/models/ingestion/task_update_v1.rb +0 -18
- data/lib/algolia/models/ingestion/task_v1.rb +0 -18
- data/lib/algolia/models/ingestion/transformation.rb +1 -1
- data/lib/algolia/models/ingestion/transformation_create.rb +1 -1
- data/lib/algolia/models/insights/added_to_cart_object_ids.rb +0 -123
- data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +0 -149
- data/lib/algolia/models/insights/clicked_filters.rb +0 -105
- data/lib/algolia/models/insights/clicked_object_ids.rb +0 -105
- data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +0 -149
- data/lib/algolia/models/insights/converted_filters.rb +0 -105
- data/lib/algolia/models/insights/converted_object_ids.rb +0 -105
- data/lib/algolia/models/insights/converted_object_ids_after_search.rb +0 -131
- data/lib/algolia/models/insights/insights_events.rb +0 -18
- data/lib/algolia/models/insights/object_data_after_search.rb +0 -26
- data/lib/algolia/models/insights/purchased_object_ids.rb +0 -123
- data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +0 -123
- data/lib/algolia/models/insights/viewed_filters.rb +0 -105
- data/lib/algolia/models/insights/viewed_object_ids.rb +0 -105
- data/lib/algolia/models/personalization/personalization_strategy_params.rb +0 -18
- data/lib/algolia/models/query-suggestions/configuration.rb +0 -17
- data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -17
- data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -17
- data/lib/algolia/models/query-suggestions/source_index.rb +0 -28
- data/lib/algolia/models/recommend/banner_image.rb +4 -2
- data/lib/algolia/models/recommend/bought_together_query.rb +0 -36
- data/lib/algolia/models/recommend/condition.rb +0 -15
- data/lib/algolia/models/recommend/consequence.rb +0 -28
- data/lib/algolia/models/recommend/fallback_params.rb +3 -95
- data/lib/algolia/models/recommend/looking_similar_query.rb +0 -36
- data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -14
- data/lib/algolia/models/recommend/ranking_info.rb +0 -112
- data/lib/algolia/models/recommend/recommend_hit.rb +0 -20
- data/lib/algolia/models/recommend/recommend_search_params.rb +3 -95
- data/lib/algolia/models/recommend/recommendations_results.rb +13 -61
- data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -36
- data/lib/algolia/models/recommend/related_query.rb +0 -36
- data/lib/algolia/models/recommend/search_recommend_rules_params.rb +2 -52
- data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -14
- data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -20
- data/lib/algolia/models/recommend/trending_facets_query.rb +0 -36
- data/lib/algolia/models/recommend/trending_items_query.rb +0 -36
- data/lib/algolia/models/recommend/widgets.rb +5 -2
- data/lib/algolia/models/search/banner_image.rb +4 -2
- data/lib/algolia/models/search/browse_params_object.rb +1 -129
- data/lib/algolia/models/search/browse_response.rb +13 -61
- data/lib/algolia/models/search/condition.rb +0 -15
- data/lib/algolia/models/search/consequence.rb +0 -28
- data/lib/algolia/models/search/consequence_params.rb +1 -129
- data/lib/algolia/models/search/get_api_key_response.rb +2 -0
- data/lib/algolia/models/search/get_objects_response.rb +0 -2
- data/lib/algolia/models/search/index_settings.rb +3 -81
- data/lib/algolia/models/search/log.rb +0 -34
- data/lib/algolia/models/search/promote_object_ids.rb +0 -14
- data/lib/algolia/models/search/ranking_info.rb +0 -112
- data/lib/algolia/models/search/rule.rb +0 -18
- data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -32
- data/lib/algolia/models/search/search_dictionary_entries_response.rb +1 -15
- data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -14
- data/lib/algolia/models/search/search_for_facets.rb +1 -129
- data/lib/algolia/models/search/search_for_hits.rb +1 -129
- data/lib/algolia/models/search/search_params_object.rb +1 -129
- data/lib/algolia/models/search/search_response.rb +13 -61
- data/lib/algolia/models/search/search_rules_params.rb +2 -34
- data/lib/algolia/models/search/search_synonyms_params.rb +0 -32
- data/lib/algolia/models/search/search_user_ids_params.rb +0 -32
- data/lib/algolia/models/search/search_user_ids_response.rb +1 -33
- data/lib/algolia/models/search/settings_response.rb +3 -81
- data/lib/algolia/models/search/user_hit.rb +0 -15
- data/lib/algolia/models/search/user_id.rb +0 -15
- data/lib/algolia/models/search/widgets.rb +5 -2
- data/lib/algolia/user_agent.rb +8 -2
- data/lib/algolia/version.rb +1 -1
- metadata +2 -11
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +0 -230
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_with_index.rb +0 -212
- data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +0 -252
- data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +0 -263
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +0 -276
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +0 -316
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +0 -295
- data/lib/algolia/models/recommend/banners.rb +0 -209
- data/lib/algolia/models/search/banners.rb +0 -209
|
@@ -33,11 +33,17 @@ module Algolia
|
|
|
33
33
|
|
|
34
34
|
@user_agent = UserAgent.new.add(client_name, VERSION)
|
|
35
35
|
|
|
36
|
+
if opts[:user_agent_segments]
|
|
37
|
+
opts[:user_agent_segments].each do |segment|
|
|
38
|
+
@user_agent.add(segment)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
@header_params = {
|
|
37
43
|
"X-Algolia-Application-Id" => app_id,
|
|
38
44
|
"X-Algolia-API-Key" => api_key,
|
|
39
45
|
"Content-Type" => "application/json",
|
|
40
|
-
"User-Agent" => @user_agent
|
|
46
|
+
"User-Agent" => @user_agent.value
|
|
41
47
|
}
|
|
42
48
|
@header_params.transform_keys!(&:downcase)
|
|
43
49
|
|
|
@@ -47,11 +53,20 @@ module Algolia
|
|
|
47
53
|
def set_client_api_key(api_key)
|
|
48
54
|
@api_key = api_key
|
|
49
55
|
@header_params["X-Algolia-API-Key"] = api_key
|
|
56
|
+
|
|
57
|
+
self
|
|
50
58
|
end
|
|
51
59
|
|
|
52
60
|
# The default Configuration object.
|
|
53
61
|
def self.default
|
|
54
62
|
@@default ||= Configuration.new
|
|
55
63
|
end
|
|
64
|
+
|
|
65
|
+
def add_user_agent_segment(segment, version = nil)
|
|
66
|
+
@user_agent.add(segment, version)
|
|
67
|
+
@header_params["user-agent"] = @user_agent.value
|
|
68
|
+
|
|
69
|
+
self
|
|
70
|
+
end
|
|
56
71
|
end
|
|
57
72
|
end
|
|
@@ -85,24 +85,6 @@ module Algolia
|
|
|
85
85
|
end
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
-
# Custom attribute writer method with validation
|
|
89
|
-
# @param [Object] traffic_percentage Value to be assigned
|
|
90
|
-
def traffic_percentage=(traffic_percentage)
|
|
91
|
-
if traffic_percentage.nil?
|
|
92
|
-
raise ArgumentError, "traffic_percentage cannot be nil"
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
if traffic_percentage > 100
|
|
96
|
-
raise ArgumentError, "invalid value for \"traffic_percentage\", must be smaller than or equal to 100."
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
if traffic_percentage < 0
|
|
100
|
-
raise ArgumentError, "invalid value for \"traffic_percentage\", must be greater than or equal to 0."
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
@traffic_percentage = traffic_percentage
|
|
104
|
-
end
|
|
105
|
-
|
|
106
88
|
# Checks equality by comparing each attribute.
|
|
107
89
|
# @param [Object] Object to be compared
|
|
108
90
|
def ==(other)
|
|
@@ -103,24 +103,6 @@ module Algolia
|
|
|
103
103
|
end
|
|
104
104
|
end
|
|
105
105
|
|
|
106
|
-
# Custom attribute writer method with validation
|
|
107
|
-
# @param [Object] traffic_percentage Value to be assigned
|
|
108
|
-
def traffic_percentage=(traffic_percentage)
|
|
109
|
-
if traffic_percentage.nil?
|
|
110
|
-
raise ArgumentError, "traffic_percentage cannot be nil"
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
if traffic_percentage > 100
|
|
114
|
-
raise ArgumentError, "invalid value for \"traffic_percentage\", must be smaller than or equal to 100."
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
if traffic_percentage < 0
|
|
118
|
-
raise ArgumentError, "invalid value for \"traffic_percentage\", must be greater than or equal to 0."
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
@traffic_percentage = traffic_percentage
|
|
122
|
-
end
|
|
123
|
-
|
|
124
106
|
# Checks equality by comparing each attribute.
|
|
125
107
|
# @param [Object] Object to be compared
|
|
126
108
|
def ==(other)
|
|
@@ -89,24 +89,6 @@ module Algolia
|
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
-
# Custom attribute writer method with validation
|
|
93
|
-
# @param [Object] variants Value to be assigned
|
|
94
|
-
def variants=(variants)
|
|
95
|
-
if variants.nil?
|
|
96
|
-
raise ArgumentError, "variants cannot be nil"
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
if variants.length > 2
|
|
100
|
-
raise ArgumentError, "invalid value for \"variants\", number of items must be less than or equal to 2."
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
if variants.length < 2
|
|
104
|
-
raise ArgumentError, "invalid value for \"variants\", number of items must be greater than or equal to 2."
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
@variants = variants
|
|
108
|
-
end
|
|
109
|
-
|
|
110
92
|
# Checks equality by comparing each attribute.
|
|
111
93
|
# @param [Object] Object to be compared
|
|
112
94
|
def ==(other)
|
|
@@ -72,24 +72,6 @@ module Algolia
|
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
74
|
|
|
75
|
-
# Custom attribute writer method with validation
|
|
76
|
-
# @param [Object] size Value to be assigned
|
|
77
|
-
def size=(size)
|
|
78
|
-
if size.nil?
|
|
79
|
-
raise ArgumentError, "size cannot be nil"
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
if size > 1
|
|
83
|
-
raise ArgumentError, "invalid value for \"size\", must be smaller than or equal to 1."
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
if size < 0
|
|
87
|
-
raise ArgumentError, "invalid value for \"size\", must be greater than or equal to 0."
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
@size = size
|
|
91
|
-
end
|
|
92
|
-
|
|
93
75
|
# Checks equality by comparing each attribute.
|
|
94
76
|
# @param [Object] Object to be compared
|
|
95
77
|
def ==(other)
|
|
@@ -100,24 +100,6 @@ module Algolia
|
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
# Custom attribute writer method with validation
|
|
104
|
-
# @param [Object] variants Value to be assigned
|
|
105
|
-
def variants=(variants)
|
|
106
|
-
if variants.nil?
|
|
107
|
-
raise ArgumentError, "variants cannot be nil"
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
if variants.length > 2
|
|
111
|
-
raise ArgumentError, "invalid value for \"variants\", number of items must be less than or equal to 2."
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
if variants.length < 2
|
|
115
|
-
raise ArgumentError, "invalid value for \"variants\", number of items must be greater than or equal to 2."
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
@variants = variants
|
|
119
|
-
end
|
|
120
|
-
|
|
121
103
|
# Checks equality by comparing each attribute.
|
|
122
104
|
# @param [Object] Object to be compared
|
|
123
105
|
def ==(other)
|
|
@@ -201,8 +201,6 @@ module Algolia
|
|
|
201
201
|
|
|
202
202
|
if attributes.key?(:description)
|
|
203
203
|
self.description = attributes[:description]
|
|
204
|
-
else
|
|
205
|
-
self.description = nil
|
|
206
204
|
end
|
|
207
205
|
|
|
208
206
|
if attributes.key?(:estimated_sample_size)
|
|
@@ -264,24 +262,6 @@ module Algolia
|
|
|
264
262
|
end
|
|
265
263
|
end
|
|
266
264
|
|
|
267
|
-
# Custom attribute writer method with validation
|
|
268
|
-
# @param [Object] traffic_percentage Value to be assigned
|
|
269
|
-
def traffic_percentage=(traffic_percentage)
|
|
270
|
-
if traffic_percentage.nil?
|
|
271
|
-
raise ArgumentError, "traffic_percentage cannot be nil"
|
|
272
|
-
end
|
|
273
|
-
|
|
274
|
-
if traffic_percentage > 100
|
|
275
|
-
raise ArgumentError, "invalid value for \"traffic_percentage\", must be smaller than or equal to 100."
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
if traffic_percentage < 0
|
|
279
|
-
raise ArgumentError, "invalid value for \"traffic_percentage\", must be greater than or equal to 0."
|
|
280
|
-
end
|
|
281
|
-
|
|
282
|
-
@traffic_percentage = traffic_percentage
|
|
283
|
-
end
|
|
284
|
-
|
|
285
265
|
# Checks equality by comparing each attribute.
|
|
286
266
|
# @param [Object] Object to be compared
|
|
287
267
|
def ==(other)
|
|
@@ -75,38 +75,6 @@ module Algolia
|
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
-
# Custom attribute writer method with validation
|
|
79
|
-
# @param [Object] position Value to be assigned
|
|
80
|
-
def position=(position)
|
|
81
|
-
if position.nil?
|
|
82
|
-
raise ArgumentError, "position cannot be nil"
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
if position.length > 2
|
|
86
|
-
raise ArgumentError, "invalid value for \"position\", number of items must be less than or equal to 2."
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
if position.length < 2
|
|
90
|
-
raise ArgumentError, "invalid value for \"position\", number of items must be greater than or equal to 2."
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
@position = position
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# Custom attribute writer method with validation
|
|
97
|
-
# @param [Object] click_count Value to be assigned
|
|
98
|
-
def click_count=(click_count)
|
|
99
|
-
if click_count.nil?
|
|
100
|
-
raise ArgumentError, "click_count cannot be nil"
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
if click_count < 0
|
|
104
|
-
raise ArgumentError, "invalid value for \"click_count\", must be greater than or equal to 0."
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
@click_count = click_count
|
|
108
|
-
end
|
|
109
|
-
|
|
110
78
|
# Checks equality by comparing each attribute.
|
|
111
79
|
# @param [Object] Object to be compared
|
|
112
80
|
def ==(other)
|
|
@@ -100,34 +100,6 @@ module Algolia
|
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
# Custom attribute writer method with validation
|
|
104
|
-
# @param [Object] rate Value to be assigned
|
|
105
|
-
def rate=(rate)
|
|
106
|
-
if !rate.nil? && rate > 1
|
|
107
|
-
raise ArgumentError, "invalid value for \"rate\", must be smaller than or equal to 1."
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
if !rate.nil? && rate < 0
|
|
111
|
-
raise ArgumentError, "invalid value for \"rate\", must be greater than or equal to 0."
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
@rate = rate
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
# Custom attribute writer method with validation
|
|
118
|
-
# @param [Object] add_to_cart_count Value to be assigned
|
|
119
|
-
def add_to_cart_count=(add_to_cart_count)
|
|
120
|
-
if add_to_cart_count.nil?
|
|
121
|
-
raise ArgumentError, "add_to_cart_count cannot be nil"
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
if add_to_cart_count < 0
|
|
125
|
-
raise ArgumentError, "invalid value for \"add_to_cart_count\", must be greater than or equal to 0."
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
@add_to_cart_count = add_to_cart_count
|
|
129
|
-
end
|
|
130
|
-
|
|
131
103
|
# Checks equality by comparing each attribute.
|
|
132
104
|
# @param [Object] Object to be compared
|
|
133
105
|
def ==(other)
|
|
@@ -89,30 +89,6 @@ module Algolia
|
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
-
# Custom attribute writer method with validation
|
|
93
|
-
# @param [Object] average Value to be assigned
|
|
94
|
-
def average=(average)
|
|
95
|
-
if !average.nil? && average < 1
|
|
96
|
-
raise ArgumentError, "invalid value for \"average\", must be greater than or equal to 1."
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
@average = average
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
# Custom attribute writer method with validation
|
|
103
|
-
# @param [Object] click_count Value to be assigned
|
|
104
|
-
def click_count=(click_count)
|
|
105
|
-
if click_count.nil?
|
|
106
|
-
raise ArgumentError, "click_count cannot be nil"
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
if click_count < 0
|
|
110
|
-
raise ArgumentError, "invalid value for \"click_count\", must be greater than or equal to 0."
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
@click_count = click_count
|
|
114
|
-
end
|
|
115
|
-
|
|
116
92
|
# Checks equality by comparing each attribute.
|
|
117
93
|
# @param [Object] Object to be compared
|
|
118
94
|
def ==(other)
|
|
@@ -100,34 +100,6 @@ module Algolia
|
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
# Custom attribute writer method with validation
|
|
104
|
-
# @param [Object] rate Value to be assigned
|
|
105
|
-
def rate=(rate)
|
|
106
|
-
if !rate.nil? && rate > 1
|
|
107
|
-
raise ArgumentError, "invalid value for \"rate\", must be smaller than or equal to 1."
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
if !rate.nil? && rate < 0
|
|
111
|
-
raise ArgumentError, "invalid value for \"rate\", must be greater than or equal to 0."
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
@rate = rate
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
# Custom attribute writer method with validation
|
|
118
|
-
# @param [Object] click_count Value to be assigned
|
|
119
|
-
def click_count=(click_count)
|
|
120
|
-
if click_count.nil?
|
|
121
|
-
raise ArgumentError, "click_count cannot be nil"
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
if click_count < 0
|
|
125
|
-
raise ArgumentError, "invalid value for \"click_count\", must be greater than or equal to 0."
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
@click_count = click_count
|
|
129
|
-
end
|
|
130
|
-
|
|
131
103
|
# Checks equality by comparing each attribute.
|
|
132
104
|
# @param [Object] Object to be compared
|
|
133
105
|
def ==(other)
|
|
@@ -100,34 +100,6 @@ module Algolia
|
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
# Custom attribute writer method with validation
|
|
104
|
-
# @param [Object] rate Value to be assigned
|
|
105
|
-
def rate=(rate)
|
|
106
|
-
if !rate.nil? && rate > 1
|
|
107
|
-
raise ArgumentError, "invalid value for \"rate\", must be smaller than or equal to 1."
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
if !rate.nil? && rate < 0
|
|
111
|
-
raise ArgumentError, "invalid value for \"rate\", must be greater than or equal to 0."
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
@rate = rate
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
# Custom attribute writer method with validation
|
|
118
|
-
# @param [Object] conversion_count Value to be assigned
|
|
119
|
-
def conversion_count=(conversion_count)
|
|
120
|
-
if conversion_count.nil?
|
|
121
|
-
raise ArgumentError, "conversion_count cannot be nil"
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
if conversion_count < 0
|
|
125
|
-
raise ArgumentError, "invalid value for \"conversion_count\", must be greater than or equal to 0."
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
@conversion_count = conversion_count
|
|
129
|
-
end
|
|
130
|
-
|
|
131
103
|
# Checks equality by comparing each attribute.
|
|
132
104
|
# @param [Object] Object to be compared
|
|
133
105
|
def ==(other)
|
|
@@ -98,38 +98,6 @@ module Algolia
|
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
-
# Custom attribute writer method with validation
|
|
102
|
-
# @param [Object] rate Value to be assigned
|
|
103
|
-
def rate=(rate)
|
|
104
|
-
if rate.nil?
|
|
105
|
-
raise ArgumentError, "rate cannot be nil"
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
if rate > 1
|
|
109
|
-
raise ArgumentError, "invalid value for \"rate\", must be smaller than or equal to 1."
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
if rate < 0
|
|
113
|
-
raise ArgumentError, "invalid value for \"rate\", must be greater than or equal to 0."
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
@rate = rate
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
# Custom attribute writer method with validation
|
|
120
|
-
# @param [Object] no_click_count Value to be assigned
|
|
121
|
-
def no_click_count=(no_click_count)
|
|
122
|
-
if no_click_count.nil?
|
|
123
|
-
raise ArgumentError, "no_click_count cannot be nil"
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
if no_click_count < 1
|
|
127
|
-
raise ArgumentError, "invalid value for \"no_click_count\", must be greater than or equal to 1."
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
@no_click_count = no_click_count
|
|
131
|
-
end
|
|
132
|
-
|
|
133
101
|
# Checks equality by comparing each attribute.
|
|
134
102
|
# @param [Object] Object to be compared
|
|
135
103
|
def ==(other)
|
|
@@ -98,24 +98,6 @@ module Algolia
|
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
-
# Custom attribute writer method with validation
|
|
102
|
-
# @param [Object] rate Value to be assigned
|
|
103
|
-
def rate=(rate)
|
|
104
|
-
if rate.nil?
|
|
105
|
-
raise ArgumentError, "rate cannot be nil"
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
if rate > 1
|
|
109
|
-
raise ArgumentError, "invalid value for \"rate\", must be smaller than or equal to 1."
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
if rate < 0
|
|
113
|
-
raise ArgumentError, "invalid value for \"rate\", must be greater than or equal to 0."
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
@rate = rate
|
|
117
|
-
end
|
|
118
|
-
|
|
119
101
|
# Checks equality by comparing each attribute.
|
|
120
102
|
# @param [Object] Object to be compared
|
|
121
103
|
def ==(other)
|
|
@@ -100,20 +100,6 @@ module Algolia
|
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
-
# Custom attribute writer method with validation
|
|
104
|
-
# @param [Object] rate Value to be assigned
|
|
105
|
-
def rate=(rate)
|
|
106
|
-
if !rate.nil? && rate > 1
|
|
107
|
-
raise ArgumentError, "invalid value for \"rate\", must be smaller than or equal to 1."
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
if !rate.nil? && rate < 0
|
|
111
|
-
raise ArgumentError, "invalid value for \"rate\", must be greater than or equal to 0."
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
@rate = rate
|
|
115
|
-
end
|
|
116
|
-
|
|
117
103
|
# Checks equality by comparing each attribute.
|
|
118
104
|
# @param [Object] Object to be compared
|
|
119
105
|
def ==(other)
|
|
@@ -87,20 +87,6 @@ module Algolia
|
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
# Custom attribute writer method with validation
|
|
91
|
-
# @param [Object] count Value to be assigned
|
|
92
|
-
def count=(count)
|
|
93
|
-
if count.nil?
|
|
94
|
-
raise ArgumentError, "count cannot be nil"
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
if count < 1
|
|
98
|
-
raise ArgumentError, "invalid value for \"count\", must be greater than or equal to 1."
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
@count = count
|
|
102
|
-
end
|
|
103
|
-
|
|
104
90
|
# Checks equality by comparing each attribute.
|
|
105
91
|
# @param [Object] Object to be compared
|
|
106
92
|
def ==(other)
|
|
@@ -87,20 +87,6 @@ module Algolia
|
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
# Custom attribute writer method with validation
|
|
91
|
-
# @param [Object] with_filter_count Value to be assigned
|
|
92
|
-
def with_filter_count=(with_filter_count)
|
|
93
|
-
if with_filter_count.nil?
|
|
94
|
-
raise ArgumentError, "with_filter_count cannot be nil"
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
if with_filter_count < 0
|
|
98
|
-
raise ArgumentError, "invalid value for \"with_filter_count\", must be greater than or equal to 0."
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
@with_filter_count = with_filter_count
|
|
102
|
-
end
|
|
103
|
-
|
|
104
90
|
# Checks equality by comparing each attribute.
|
|
105
91
|
# @param [Object] Object to be compared
|
|
106
92
|
def ==(other)
|
|
@@ -102,34 +102,6 @@ module Algolia
|
|
|
102
102
|
end
|
|
103
103
|
end
|
|
104
104
|
|
|
105
|
-
# Custom attribute writer method with validation
|
|
106
|
-
# @param [Object] rate Value to be assigned
|
|
107
|
-
def rate=(rate)
|
|
108
|
-
if !rate.nil? && rate > 1
|
|
109
|
-
raise ArgumentError, "invalid value for \"rate\", must be smaller than or equal to 1."
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
if !rate.nil? && rate < 0
|
|
113
|
-
raise ArgumentError, "invalid value for \"rate\", must be greater than or equal to 0."
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
@rate = rate
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
# Custom attribute writer method with validation
|
|
120
|
-
# @param [Object] add_to_cart_count Value to be assigned
|
|
121
|
-
def add_to_cart_count=(add_to_cart_count)
|
|
122
|
-
if add_to_cart_count.nil?
|
|
123
|
-
raise ArgumentError, "add_to_cart_count cannot be nil"
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
if add_to_cart_count < 0
|
|
127
|
-
raise ArgumentError, "invalid value for \"add_to_cart_count\", must be greater than or equal to 0."
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
@add_to_cart_count = add_to_cart_count
|
|
131
|
-
end
|
|
132
|
-
|
|
133
105
|
# Checks equality by comparing each attribute.
|
|
134
106
|
# @param [Object] Object to be compared
|
|
135
107
|
def ==(other)
|
|
@@ -91,30 +91,6 @@ module Algolia
|
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
-
# Custom attribute writer method with validation
|
|
95
|
-
# @param [Object] average Value to be assigned
|
|
96
|
-
def average=(average)
|
|
97
|
-
if !average.nil? && average < 1
|
|
98
|
-
raise ArgumentError, "invalid value for \"average\", must be greater than or equal to 1."
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
@average = average
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
# Custom attribute writer method with validation
|
|
105
|
-
# @param [Object] click_count Value to be assigned
|
|
106
|
-
def click_count=(click_count)
|
|
107
|
-
if click_count.nil?
|
|
108
|
-
raise ArgumentError, "click_count cannot be nil"
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
if click_count < 0
|
|
112
|
-
raise ArgumentError, "invalid value for \"click_count\", must be greater than or equal to 0."
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
@click_count = click_count
|
|
116
|
-
end
|
|
117
|
-
|
|
118
94
|
# Checks equality by comparing each attribute.
|
|
119
95
|
# @param [Object] Object to be compared
|
|
120
96
|
def ==(other)
|
|
@@ -67,24 +67,6 @@ module Algolia
|
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
-
# Custom attribute writer method with validation
|
|
71
|
-
# @param [Object] positions Value to be assigned
|
|
72
|
-
def positions=(positions)
|
|
73
|
-
if positions.nil?
|
|
74
|
-
raise ArgumentError, "positions cannot be nil"
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
if positions.length > 12
|
|
78
|
-
raise ArgumentError, "invalid value for \"positions\", number of items must be less than or equal to 12."
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
if positions.length < 12
|
|
82
|
-
raise ArgumentError, "invalid value for \"positions\", number of items must be greater than or equal to 12."
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
@positions = positions
|
|
86
|
-
end
|
|
87
|
-
|
|
88
70
|
# Checks equality by comparing each attribute.
|
|
89
71
|
# @param [Object] Object to be compared
|
|
90
72
|
def ==(other)
|
|
@@ -102,34 +102,6 @@ module Algolia
|
|
|
102
102
|
end
|
|
103
103
|
end
|
|
104
104
|
|
|
105
|
-
# Custom attribute writer method with validation
|
|
106
|
-
# @param [Object] rate Value to be assigned
|
|
107
|
-
def rate=(rate)
|
|
108
|
-
if !rate.nil? && rate > 1
|
|
109
|
-
raise ArgumentError, "invalid value for \"rate\", must be smaller than or equal to 1."
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
if !rate.nil? && rate < 0
|
|
113
|
-
raise ArgumentError, "invalid value for \"rate\", must be greater than or equal to 0."
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
@rate = rate
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
# Custom attribute writer method with validation
|
|
120
|
-
# @param [Object] click_count Value to be assigned
|
|
121
|
-
def click_count=(click_count)
|
|
122
|
-
if click_count.nil?
|
|
123
|
-
raise ArgumentError, "click_count cannot be nil"
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
if click_count < 0
|
|
127
|
-
raise ArgumentError, "invalid value for \"click_count\", must be greater than or equal to 0."
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
@click_count = click_count
|
|
131
|
-
end
|
|
132
|
-
|
|
133
105
|
# Checks equality by comparing each attribute.
|
|
134
106
|
# @param [Object] Object to be compared
|
|
135
107
|
def ==(other)
|
|
@@ -102,34 +102,6 @@ module Algolia
|
|
|
102
102
|
end
|
|
103
103
|
end
|
|
104
104
|
|
|
105
|
-
# Custom attribute writer method with validation
|
|
106
|
-
# @param [Object] rate Value to be assigned
|
|
107
|
-
def rate=(rate)
|
|
108
|
-
if !rate.nil? && rate > 1
|
|
109
|
-
raise ArgumentError, "invalid value for \"rate\", must be smaller than or equal to 1."
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
if !rate.nil? && rate < 0
|
|
113
|
-
raise ArgumentError, "invalid value for \"rate\", must be greater than or equal to 0."
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
@rate = rate
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
# Custom attribute writer method with validation
|
|
120
|
-
# @param [Object] conversion_count Value to be assigned
|
|
121
|
-
def conversion_count=(conversion_count)
|
|
122
|
-
if conversion_count.nil?
|
|
123
|
-
raise ArgumentError, "conversion_count cannot be nil"
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
if conversion_count < 0
|
|
127
|
-
raise ArgumentError, "invalid value for \"conversion_count\", must be greater than or equal to 0."
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
@conversion_count = conversion_count
|
|
131
|
-
end
|
|
132
|
-
|
|
133
105
|
# Checks equality by comparing each attribute.
|
|
134
106
|
# @param [Object] Object to be compared
|
|
135
107
|
def ==(other)
|