algolia 3.0.0.beta.11 → 3.0.0.beta.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Gemfile.lock +2 -2
  4. data/lib/algolia/api/query_suggestions_client.rb +4 -10
  5. data/lib/algolia/api/search_client.rb +2 -2
  6. data/lib/algolia/api/usage_client.rb +4 -4
  7. data/lib/algolia/models/abtesting/{filter_effects_empty_search.rb → empty_search_filter.rb} +3 -3
  8. data/lib/algolia/models/abtesting/filter_effects.rb +2 -2
  9. data/lib/algolia/models/abtesting/{filter_effects_outliers.rb → outliers_filter.rb} +3 -3
  10. data/lib/algolia/models/analytics/{click_positions_inner.rb → click_position.rb} +3 -3
  11. data/lib/algolia/models/analytics/get_click_positions_response.rb +1 -1
  12. data/lib/algolia/models/analytics/top_search_with_analytics.rb +1 -1
  13. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +1 -1
  14. data/lib/algolia/models/ingestion/docker_streams_input.rb +1 -0
  15. data/lib/algolia/models/ingestion/{transformation_try_response_error.rb → transformation_error.rb} +3 -3
  16. data/lib/algolia/models/ingestion/transformation_try_response.rb +1 -1
  17. data/lib/algolia/models/monitoring/{incidents_inner.rb → incident_entry.rb} +3 -3
  18. data/lib/algolia/models/monitoring/{indexing_time_response_metrics.rb → indexing_metric.rb} +3 -3
  19. data/lib/algolia/models/monitoring/indexing_time_response.rb +1 -1
  20. data/lib/algolia/models/monitoring/infrastructure_response.rb +1 -1
  21. data/lib/algolia/models/monitoring/{latency_response_metrics.rb → latency_metric.rb} +3 -3
  22. data/lib/algolia/models/monitoring/latency_response.rb +1 -1
  23. data/lib/algolia/models/monitoring/{infrastructure_response_metrics.rb → metrics.rb} +3 -6
  24. data/lib/algolia/models/monitoring/{time_inner.rb → time_entry.rb} +3 -3
  25. data/lib/algolia/models/{search/search_for_hits_options.rb → query-suggestions/config_status.rb} +43 -36
  26. data/lib/algolia/models/{recommend/related_products.rb → query-suggestions/log_file.rb} +36 -32
  27. data/lib/algolia/models/recommend/around_precision.rb +1 -1
  28. data/lib/algolia/models/recommend/fallback_params.rb +1 -1
  29. data/lib/algolia/models/recommend/{around_precision_from_value_inner.rb → range.rb} +3 -6
  30. data/lib/algolia/models/recommend/recommend_rule.rb +1 -1
  31. data/lib/algolia/models/recommend/{redirect_rule_index_metadata_data.rb → redirect_rule_index_data.rb} +3 -3
  32. data/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +1 -1
  33. data/lib/algolia/models/recommend/{recommend_rule_metadata.rb → rule_metadata.rb} +3 -3
  34. data/lib/algolia/models/recommend/search_params.rb +1 -1
  35. data/lib/algolia/models/recommend/search_params_object.rb +1 -1
  36. data/lib/algolia/models/search/around_precision.rb +1 -1
  37. data/lib/algolia/models/search/browse_params_object.rb +1 -1
  38. data/lib/algolia/models/search/built_in_operation.rb +1 -2
  39. data/lib/algolia/models/search/built_in_operation_value.rb +105 -0
  40. data/lib/algolia/models/search/consequence_params.rb +1 -1
  41. data/lib/algolia/models/search/dictionary_entry.rb +0 -2
  42. data/lib/algolia/models/search/index_settings.rb +2 -2
  43. data/lib/algolia/models/search/{around_precision_from_value_inner.rb → range.rb} +3 -6
  44. data/lib/algolia/models/search/{redirect_rule_index_metadata_data.rb → redirect_rule_index_data.rb} +3 -3
  45. data/lib/algolia/models/search/redirect_rule_index_metadata.rb +1 -1
  46. data/lib/algolia/models/search/search_for_facets.rb +1 -1
  47. data/lib/algolia/models/search/search_for_hits.rb +1 -1
  48. data/lib/algolia/models/search/search_params_object.rb +1 -1
  49. data/lib/algolia/models/search/search_params_string.rb +1 -0
  50. data/lib/algolia/models/search/settings_response.rb +2 -2
  51. data/lib/algolia/models/usage/{get_usage400_response_error_errors_inner.rb → error_item.rb} +3 -3
  52. data/lib/algolia/models/usage/{get_usage400_response_error.rb → forbidden_error.rb} +4 -4
  53. data/lib/algolia/models/usage/{get_usage200_response.rb → index_usage.rb} +4 -4
  54. data/lib/algolia/models/usage/invalid_request_error.rb +231 -0
  55. data/lib/algolia/models/usage/{get_usage200_response_statistics_inner.rb → statistic_entry.rb} +3 -3
  56. data/lib/algolia/version.rb +1 -1
  57. metadata +24 -64
  58. data/lib/algolia/models/abtesting/custom_search_params.rb +0 -214
  59. data/lib/algolia/models/abtesting/error_base.rb +0 -212
  60. data/lib/algolia/models/analytics/error_base.rb +0 -212
  61. data/lib/algolia/models/ingestion/error_base.rb +0 -212
  62. data/lib/algolia/models/ingestion/source_shopify_base.rb +0 -214
  63. data/lib/algolia/models/insights/error_base.rb +0 -212
  64. data/lib/algolia/models/monitoring/error_base.rb +0 -212
  65. data/lib/algolia/models/monitoring/get_servers403_response.rb +0 -211
  66. data/lib/algolia/models/personalization/error_base.rb +0 -212
  67. data/lib/algolia/models/query-suggestions/app_id.rb +0 -209
  68. data/lib/algolia/models/query-suggestions/error_base.rb +0 -212
  69. data/lib/algolia/models/recommend/base_recommend_request.rb +0 -281
  70. data/lib/algolia/models/recommend/base_search_params.rb +0 -635
  71. data/lib/algolia/models/recommend/base_search_params_without_query.rb +0 -616
  72. data/lib/algolia/models/recommend/base_search_response.rb +0 -499
  73. data/lib/algolia/models/recommend/error_base.rb +0 -212
  74. data/lib/algolia/models/recommend/frequently_bought_together.rb +0 -247
  75. data/lib/algolia/models/recommend/index_settings_as_search_params.rb +0 -788
  76. data/lib/algolia/models/recommend/looking_similar.rb +0 -256
  77. data/lib/algolia/models/recommend/recommendations_hits.rb +0 -215
  78. data/lib/algolia/models/recommend/recommended_for_you.rb +0 -244
  79. data/lib/algolia/models/recommend/search_pagination.rb +0 -282
  80. data/lib/algolia/models/recommend/search_params_query.rb +0 -212
  81. data/lib/algolia/models/recommend/trending_facets.rb +0 -258
  82. data/lib/algolia/models/recommend/trending_items.rb +0 -264
  83. data/lib/algolia/models/search/base_get_api_key_response.rb +0 -224
  84. data/lib/algolia/models/search/base_index_settings.rb +0 -426
  85. data/lib/algolia/models/search/base_search_params.rb +0 -635
  86. data/lib/algolia/models/search/base_search_params_without_query.rb +0 -616
  87. data/lib/algolia/models/search/base_search_response.rb +0 -499
  88. data/lib/algolia/models/search/browse_pagination.rb +0 -274
  89. data/lib/algolia/models/search/cursor.rb +0 -209
  90. data/lib/algolia/models/search/error_base.rb +0 -212
  91. data/lib/algolia/models/search/index_settings_as_search_params.rb +0 -788
  92. data/lib/algolia/models/search/params.rb +0 -236
  93. data/lib/algolia/models/search/search_for_facets_options.rb +0 -293
  94. data/lib/algolia/models/search/search_hits.rb +0 -240
  95. data/lib/algolia/models/search/search_pagination.rb +0 -282
  96. data/lib/algolia/models/search/search_params_query.rb +0 -212
  97. data/lib/algolia/models/search/with_primary.rb +0 -212
  98. data/lib/algolia/models/usage/error_base.rb +0 -212
  99. data/lib/algolia/models/usage/get_usage400_response.rb +0 -213
@@ -1,240 +0,0 @@
1
- # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
-
3
- require "date"
4
- require "time"
5
-
6
- module Algolia
7
- module Search
8
- class SearchHits
9
- # Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
10
- attr_accessor :hits
11
-
12
- # Search query.
13
- attr_accessor :query
14
-
15
- # URL-encoded string of all search parameters.
16
- attr_accessor :params
17
-
18
- attr_accessor :additional_properties
19
-
20
- # Attribute mapping from ruby-style variable name to JSON key.
21
- def self.attribute_map
22
- {
23
- :hits => :hits,
24
- :query => :query,
25
- :params => :params
26
- }
27
- end
28
-
29
- # Returns all the JSON keys this model knows about
30
- def self.acceptable_attributes
31
- attribute_map.values
32
- end
33
-
34
- # Attribute type mapping.
35
- def self.types_mapping
36
- {
37
- :hits => :"Array<Hit>",
38
- :query => :"String",
39
- :params => :"String"
40
- }
41
- end
42
-
43
- # List of attributes with nullable: true
44
- def self.openapi_nullable
45
- Set.new(
46
- []
47
- )
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- if (!attributes.is_a?(Hash))
54
- raise(
55
- ArgumentError,
56
- "The input argument (attributes) must be a hash in `Algolia::SearchHits` initialize method"
57
- )
58
- end
59
-
60
- if attributes.key?(:hits)
61
- if (value = attributes[:hits]).is_a?(Array)
62
- self.hits = value
63
- end
64
- else
65
- self.hits = nil
66
- end
67
-
68
- if attributes.key?(:query)
69
- self.query = attributes[:query]
70
- else
71
- self.query = nil
72
- end
73
-
74
- if attributes.key?(:params)
75
- self.params = attributes[:params]
76
- else
77
- self.params = nil
78
- end
79
-
80
- # add extra attribute to additional_properties
81
- self.additional_properties ||= {}
82
- self.additional_properties.merge!(attributes.reject { |k, _| self.class.attribute_map.key?(k.to_sym) })
83
- end
84
-
85
- # Checks equality by comparing each attribute.
86
- # @param [Object] Object to be compared
87
- def ==(other)
88
- return true if self.equal?(other)
89
- self.class == other.class &&
90
- hits == other.hits &&
91
- query == other.query &&
92
- params == other.params
93
- end
94
-
95
- # @see the `==` method
96
- # @param [Object] Object to be compared
97
- def eql?(other)
98
- self == other
99
- end
100
-
101
- # Calculates hash code according to all attributes.
102
- # @return [Integer] Hash code
103
- def hash
104
- [hits, query, params].hash
105
- end
106
-
107
- # Builds the object from hash
108
- # @param [Hash] attributes Model attributes in the form of hash
109
- # @return [Object] Returns the model itself
110
- def self.build_from_hash(attributes)
111
- return nil unless attributes.is_a?(Hash)
112
- attributes = attributes.transform_keys(&:to_sym)
113
- transformed_hash = {}
114
- types_mapping.each_pair do |key, type|
115
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
116
- transformed_hash[key.to_sym] = nil
117
- elsif type =~ /\AArray<(.*)>/i
118
- # check to ensure the input is an array given that the attribute
119
- # is documented as an array but the input is not
120
- if attributes[attribute_map[key]].is_a?(Array)
121
- transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
122
- _deserialize(::Regexp.last_match(1), v)
123
- }
124
- end
125
- elsif !attributes[attribute_map[key]].nil?
126
- transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
127
- end
128
- end
129
-
130
- # add extra attribute to transformed_hash
131
- transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) })
132
- new(transformed_hash)
133
- end
134
-
135
- # Deserializes the data based on type
136
- # @param string type Data type
137
- # @param string value Value to be deserialized
138
- # @return [Object] Deserialized data
139
- def self._deserialize(type, value)
140
- case type.to_sym
141
- when :Time
142
- Time.parse(value)
143
- when :Date
144
- Date.parse(value)
145
- when :String
146
- value.to_s
147
- when :Integer
148
- value.to_i
149
- when :Float
150
- value.to_f
151
- when :Boolean
152
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
153
- true
154
- else
155
- false
156
- end
157
-
158
- when :Object
159
- # generic object (usually a Hash), return directly
160
- value
161
- when /\AArray<(?<inner_type>.+)>\z/
162
- inner_type = Regexp.last_match[:inner_type]
163
- value.map { |v| _deserialize(inner_type, v) }
164
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
- k_type = Regexp.last_match[:k_type]
166
- v_type = Regexp.last_match[:v_type]
167
- {}.tap do |hash|
168
- value.each do |k, v|
169
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
- end
171
- end
172
- # model
173
- else
174
- # models (e.g. Pet) or oneOf
175
- klass = Algolia::Search.const_get(type)
176
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
177
- .build_from_hash(value)
178
- end
179
- end
180
-
181
- # Returns the string representation of the object
182
- # @return [String] String presentation of the object
183
- def to_s
184
- to_hash.to_s
185
- end
186
-
187
- # to_body is an alias to to_hash (backward compatibility)
188
- # @return [Hash] Returns the object in the form of hash
189
- def to_body
190
- to_hash
191
- end
192
-
193
- def to_json(*_args)
194
- to_hash.to_json
195
- end
196
-
197
- # Returns the object in the form of hash
198
- # @return [Hash] Returns the object in the form of hash
199
- def to_hash
200
- hash = {}
201
- self.class.attribute_map.each_pair do |attr, param|
202
- value = send(attr)
203
- if value.nil?
204
- is_nullable = self.class.openapi_nullable.include?(attr)
205
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
206
- end
207
-
208
- hash[param] = _to_hash(value)
209
- end
210
-
211
- # also add attributes from additional_properties to hash
212
- self.additional_properties&.each_pair do |k, v|
213
- hash[k.to_sym] = _to_hash(v)
214
- end
215
-
216
- hash
217
- end
218
-
219
- # Outputs non-array value in the form of hash
220
- # For object, use to_hash. Otherwise, just return the value
221
- # @param [Object] value Any valid value
222
- # @return [Hash] Returns the value in the form of hash
223
- def _to_hash(value)
224
- if value.is_a?(Array)
225
- value.compact.map { |v| _to_hash(v) }
226
- elsif value.is_a?(Hash)
227
- {}.tap do |hash|
228
- value.each { |k, v| hash[k] = _to_hash(v) }
229
- end
230
- elsif value.respond_to?(:to_hash)
231
- value.to_hash
232
- else
233
- value
234
- end
235
- end
236
-
237
- end
238
-
239
- end
240
- end
@@ -1,282 +0,0 @@
1
- # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
-
3
- require "date"
4
- require "time"
5
-
6
- module Algolia
7
- module Search
8
- class SearchPagination
9
- # Page of search results to retrieve.
10
- attr_accessor :page
11
-
12
- # Number of results (hits).
13
- attr_accessor :nb_hits
14
-
15
- # Number of pages of results.
16
- attr_accessor :nb_pages
17
-
18
- # Number of hits per page.
19
- attr_accessor :hits_per_page
20
-
21
- # Attribute mapping from ruby-style variable name to JSON key.
22
- def self.attribute_map
23
- {
24
- :page => :page,
25
- :nb_hits => :nbHits,
26
- :nb_pages => :nbPages,
27
- :hits_per_page => :hitsPerPage
28
- }
29
- end
30
-
31
- # Returns all the JSON keys this model knows about
32
- def self.acceptable_attributes
33
- attribute_map.values
34
- end
35
-
36
- # Attribute type mapping.
37
- def self.types_mapping
38
- {
39
- :page => :"Integer",
40
- :nb_hits => :"Integer",
41
- :nb_pages => :"Integer",
42
- :hits_per_page => :"Integer"
43
- }
44
- end
45
-
46
- # List of attributes with nullable: true
47
- def self.openapi_nullable
48
- Set.new(
49
- []
50
- )
51
- end
52
-
53
- # Initializes the object
54
- # @param [Hash] attributes Model attributes in the form of hash
55
- def initialize(attributes = {})
56
- if (!attributes.is_a?(Hash))
57
- raise(
58
- ArgumentError,
59
- "The input argument (attributes) must be a hash in `Algolia::SearchPagination` initialize method"
60
- )
61
- end
62
-
63
- # check to see if the attribute exists and convert string to symbol for hash key
64
- attributes = attributes.each_with_object({}) { |(k, v), h|
65
- if (!self.class.attribute_map.key?(k.to_sym))
66
- raise(
67
- ArgumentError,
68
- "`#{k}` is not a valid attribute in `Algolia::SearchPagination`. Please check the name to make sure it's valid. List of attributes: " +
69
- self.class.attribute_map.keys.inspect
70
- )
71
- end
72
-
73
- h[k.to_sym] = v
74
- }
75
-
76
- if attributes.key?(:page)
77
- self.page = attributes[:page]
78
- else
79
- self.page = nil
80
- end
81
-
82
- if attributes.key?(:nb_hits)
83
- self.nb_hits = attributes[:nb_hits]
84
- else
85
- self.nb_hits = nil
86
- end
87
-
88
- if attributes.key?(:nb_pages)
89
- self.nb_pages = attributes[:nb_pages]
90
- else
91
- self.nb_pages = nil
92
- end
93
-
94
- if attributes.key?(:hits_per_page)
95
- self.hits_per_page = attributes[:hits_per_page]
96
- else
97
- self.hits_per_page = nil
98
- end
99
- end
100
-
101
- # Custom attribute writer method with validation
102
- # @param [Object] page Value to be assigned
103
- def page=(page)
104
- if page.nil?
105
- raise ArgumentError, "page cannot be nil"
106
- end
107
-
108
- if page < 0
109
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
110
- end
111
-
112
- @page = page
113
- end
114
-
115
- # Custom attribute writer method with validation
116
- # @param [Object] hits_per_page Value to be assigned
117
- def hits_per_page=(hits_per_page)
118
- if hits_per_page.nil?
119
- raise ArgumentError, "hits_per_page cannot be nil"
120
- end
121
-
122
- if hits_per_page > 1000
123
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
124
- end
125
-
126
- if hits_per_page < 1
127
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
128
- end
129
-
130
- @hits_per_page = hits_per_page
131
- end
132
-
133
- # Checks equality by comparing each attribute.
134
- # @param [Object] Object to be compared
135
- def ==(other)
136
- return true if self.equal?(other)
137
- self.class == other.class &&
138
- page == other.page &&
139
- nb_hits == other.nb_hits &&
140
- nb_pages == other.nb_pages &&
141
- hits_per_page == other.hits_per_page
142
- end
143
-
144
- # @see the `==` method
145
- # @param [Object] Object to be compared
146
- def eql?(other)
147
- self == other
148
- end
149
-
150
- # Calculates hash code according to all attributes.
151
- # @return [Integer] Hash code
152
- def hash
153
- [page, nb_hits, nb_pages, hits_per_page].hash
154
- end
155
-
156
- # Builds the object from hash
157
- # @param [Hash] attributes Model attributes in the form of hash
158
- # @return [Object] Returns the model itself
159
- def self.build_from_hash(attributes)
160
- return nil unless attributes.is_a?(Hash)
161
- attributes = attributes.transform_keys(&:to_sym)
162
- transformed_hash = {}
163
- types_mapping.each_pair do |key, type|
164
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
165
- transformed_hash[key.to_sym] = nil
166
- elsif type =~ /\AArray<(.*)>/i
167
- # check to ensure the input is an array given that the attribute
168
- # is documented as an array but the input is not
169
- if attributes[attribute_map[key]].is_a?(Array)
170
- transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
171
- _deserialize(::Regexp.last_match(1), v)
172
- }
173
- end
174
- elsif !attributes[attribute_map[key]].nil?
175
- transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
176
- end
177
- end
178
-
179
- new(transformed_hash)
180
- end
181
-
182
- # Deserializes the data based on type
183
- # @param string type Data type
184
- # @param string value Value to be deserialized
185
- # @return [Object] Deserialized data
186
- def self._deserialize(type, value)
187
- case type.to_sym
188
- when :Time
189
- Time.parse(value)
190
- when :Date
191
- Date.parse(value)
192
- when :String
193
- value.to_s
194
- when :Integer
195
- value.to_i
196
- when :Float
197
- value.to_f
198
- when :Boolean
199
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
200
- true
201
- else
202
- false
203
- end
204
-
205
- when :Object
206
- # generic object (usually a Hash), return directly
207
- value
208
- when /\AArray<(?<inner_type>.+)>\z/
209
- inner_type = Regexp.last_match[:inner_type]
210
- value.map { |v| _deserialize(inner_type, v) }
211
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
212
- k_type = Regexp.last_match[:k_type]
213
- v_type = Regexp.last_match[:v_type]
214
- {}.tap do |hash|
215
- value.each do |k, v|
216
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
217
- end
218
- end
219
- # model
220
- else
221
- # models (e.g. Pet) or oneOf
222
- klass = Algolia::Search.const_get(type)
223
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
224
- .build_from_hash(value)
225
- end
226
- end
227
-
228
- # Returns the string representation of the object
229
- # @return [String] String presentation of the object
230
- def to_s
231
- to_hash.to_s
232
- end
233
-
234
- # to_body is an alias to to_hash (backward compatibility)
235
- # @return [Hash] Returns the object in the form of hash
236
- def to_body
237
- to_hash
238
- end
239
-
240
- def to_json(*_args)
241
- to_hash.to_json
242
- end
243
-
244
- # Returns the object in the form of hash
245
- # @return [Hash] Returns the object in the form of hash
246
- def to_hash
247
- hash = {}
248
- self.class.attribute_map.each_pair do |attr, param|
249
- value = send(attr)
250
- if value.nil?
251
- is_nullable = self.class.openapi_nullable.include?(attr)
252
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
253
- end
254
-
255
- hash[param] = _to_hash(value)
256
- end
257
-
258
- hash
259
- end
260
-
261
- # Outputs non-array value in the form of hash
262
- # For object, use to_hash. Otherwise, just return the value
263
- # @param [Object] value Any valid value
264
- # @return [Hash] Returns the value in the form of hash
265
- def _to_hash(value)
266
- if value.is_a?(Array)
267
- value.compact.map { |v| _to_hash(v) }
268
- elsif value.is_a?(Hash)
269
- {}.tap do |hash|
270
- value.each { |k, v| hash[k] = _to_hash(v) }
271
- end
272
- elsif value.respond_to?(:to_hash)
273
- value.to_hash
274
- else
275
- value
276
- end
277
- end
278
-
279
- end
280
-
281
- end
282
- end