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

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.
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,258 +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 Recommend
8
- class TrendingFacets
9
- # Facet attribute for which to retrieve trending facet values.
10
- attr_accessor :facet_name
11
-
12
- attr_accessor :model
13
-
14
- attr_accessor :fallback_parameters
15
-
16
- class EnumAttributeValidator
17
- attr_reader :datatype
18
- attr_reader :allowable_values
19
-
20
- def initialize(datatype, allowable_values)
21
- @allowable_values = allowable_values.map do |value|
22
- case datatype.to_s
23
- when /Integer/i
24
- value.to_i
25
- when /Float/i
26
- value.to_f
27
- else
28
- value
29
- end
30
- end
31
- end
32
-
33
- def valid?(value)
34
- !value || allowable_values.include?(value)
35
- end
36
- end
37
-
38
- # Attribute mapping from ruby-style variable name to JSON key.
39
- def self.attribute_map
40
- {
41
- :facet_name => :facetName,
42
- :model => :model,
43
- :fallback_parameters => :fallbackParameters
44
- }
45
- end
46
-
47
- # Returns all the JSON keys this model knows about
48
- def self.acceptable_attributes
49
- attribute_map.values
50
- end
51
-
52
- # Attribute type mapping.
53
- def self.types_mapping
54
- {
55
- :facet_name => :"Object",
56
- :model => :"TrendingFacetsModel",
57
- :fallback_parameters => :"FallbackParams"
58
- }
59
- end
60
-
61
- # List of attributes with nullable: true
62
- def self.openapi_nullable
63
- Set.new(
64
- [
65
- :facet_name
66
- ]
67
- )
68
- end
69
-
70
- # Initializes the object
71
- # @param [Hash] attributes Model attributes in the form of hash
72
- def initialize(attributes = {})
73
- if (!attributes.is_a?(Hash))
74
- raise(
75
- ArgumentError,
76
- "The input argument (attributes) must be a hash in `Algolia::TrendingFacets` initialize method"
77
- )
78
- end
79
-
80
- # check to see if the attribute exists and convert string to symbol for hash key
81
- attributes = attributes.each_with_object({}) { |(k, v), h|
82
- if (!self.class.attribute_map.key?(k.to_sym))
83
- raise(
84
- ArgumentError,
85
- "`#{k}` is not a valid attribute in `Algolia::TrendingFacets`. Please check the name to make sure it's valid. List of attributes: " +
86
- self.class.attribute_map.keys.inspect
87
- )
88
- end
89
-
90
- h[k.to_sym] = v
91
- }
92
-
93
- if attributes.key?(:facet_name)
94
- self.facet_name = attributes[:facet_name]
95
- else
96
- self.facet_name = nil
97
- end
98
-
99
- if attributes.key?(:model)
100
- self.model = attributes[:model]
101
- else
102
- self.model = nil
103
- end
104
-
105
- if attributes.key?(:fallback_parameters)
106
- self.fallback_parameters = attributes[:fallback_parameters]
107
- end
108
- end
109
-
110
- # Checks equality by comparing each attribute.
111
- # @param [Object] Object to be compared
112
- def ==(other)
113
- return true if self.equal?(other)
114
- self.class == other.class &&
115
- facet_name == other.facet_name &&
116
- model == other.model &&
117
- fallback_parameters == other.fallback_parameters
118
- end
119
-
120
- # @see the `==` method
121
- # @param [Object] Object to be compared
122
- def eql?(other)
123
- self == other
124
- end
125
-
126
- # Calculates hash code according to all attributes.
127
- # @return [Integer] Hash code
128
- def hash
129
- [facet_name, model, fallback_parameters].hash
130
- end
131
-
132
- # Builds the object from hash
133
- # @param [Hash] attributes Model attributes in the form of hash
134
- # @return [Object] Returns the model itself
135
- def self.build_from_hash(attributes)
136
- return nil unless attributes.is_a?(Hash)
137
- attributes = attributes.transform_keys(&:to_sym)
138
- transformed_hash = {}
139
- types_mapping.each_pair do |key, type|
140
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
141
- transformed_hash[key.to_sym] = nil
142
- elsif type =~ /\AArray<(.*)>/i
143
- # check to ensure the input is an array given that the attribute
144
- # is documented as an array but the input is not
145
- if attributes[attribute_map[key]].is_a?(Array)
146
- transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
147
- _deserialize(::Regexp.last_match(1), v)
148
- }
149
- end
150
- elsif !attributes[attribute_map[key]].nil?
151
- transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
152
- end
153
- end
154
-
155
- new(transformed_hash)
156
- end
157
-
158
- # Deserializes the data based on type
159
- # @param string type Data type
160
- # @param string value Value to be deserialized
161
- # @return [Object] Deserialized data
162
- def self._deserialize(type, value)
163
- case type.to_sym
164
- when :Time
165
- Time.parse(value)
166
- when :Date
167
- Date.parse(value)
168
- when :String
169
- value.to_s
170
- when :Integer
171
- value.to_i
172
- when :Float
173
- value.to_f
174
- when :Boolean
175
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
176
- true
177
- else
178
- false
179
- end
180
-
181
- when :Object
182
- # generic object (usually a Hash), return directly
183
- value
184
- when /\AArray<(?<inner_type>.+)>\z/
185
- inner_type = Regexp.last_match[:inner_type]
186
- value.map { |v| _deserialize(inner_type, v) }
187
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
188
- k_type = Regexp.last_match[:k_type]
189
- v_type = Regexp.last_match[:v_type]
190
- {}.tap do |hash|
191
- value.each do |k, v|
192
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
- end
194
- end
195
- # model
196
- else
197
- # models (e.g. Pet) or oneOf
198
- klass = Algolia::Recommend.const_get(type)
199
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
200
- .build_from_hash(value)
201
- end
202
- end
203
-
204
- # Returns the string representation of the object
205
- # @return [String] String presentation of the object
206
- def to_s
207
- to_hash.to_s
208
- end
209
-
210
- # to_body is an alias to to_hash (backward compatibility)
211
- # @return [Hash] Returns the object in the form of hash
212
- def to_body
213
- to_hash
214
- end
215
-
216
- def to_json(*_args)
217
- to_hash.to_json
218
- end
219
-
220
- # Returns the object in the form of hash
221
- # @return [Hash] Returns the object in the form of hash
222
- def to_hash
223
- hash = {}
224
- self.class.attribute_map.each_pair do |attr, param|
225
- value = send(attr)
226
- if value.nil?
227
- is_nullable = self.class.openapi_nullable.include?(attr)
228
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
229
- end
230
-
231
- hash[param] = _to_hash(value)
232
- end
233
-
234
- hash
235
- end
236
-
237
- # Outputs non-array value in the form of hash
238
- # For object, use to_hash. Otherwise, just return the value
239
- # @param [Object] value Any valid value
240
- # @return [Hash] Returns the value in the form of hash
241
- def _to_hash(value)
242
- if value.is_a?(Array)
243
- value.compact.map { |v| _to_hash(v) }
244
- elsif value.is_a?(Hash)
245
- {}.tap do |hash|
246
- value.each { |k, v| hash[k] = _to_hash(v) }
247
- end
248
- elsif value.respond_to?(:to_hash)
249
- value.to_hash
250
- else
251
- value
252
- end
253
- end
254
-
255
- end
256
-
257
- end
258
- end
@@ -1,264 +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 Recommend
8
- class TrendingItems
9
- # Facet attribute. To be used in combination with `facetValue`. If specified, only recommendations matching the facet filter will be returned.
10
- attr_accessor :facet_name
11
-
12
- # Facet value. To be used in combination with `facetName`. If specified, only recommendations matching the facet filter will be returned.
13
- attr_accessor :facet_value
14
-
15
- attr_accessor :model
16
-
17
- attr_accessor :fallback_parameters
18
-
19
- class EnumAttributeValidator
20
- attr_reader :datatype
21
- attr_reader :allowable_values
22
-
23
- def initialize(datatype, allowable_values)
24
- @allowable_values = allowable_values.map do |value|
25
- case datatype.to_s
26
- when /Integer/i
27
- value.to_i
28
- when /Float/i
29
- value.to_f
30
- else
31
- value
32
- end
33
- end
34
- end
35
-
36
- def valid?(value)
37
- !value || allowable_values.include?(value)
38
- end
39
- end
40
-
41
- # Attribute mapping from ruby-style variable name to JSON key.
42
- def self.attribute_map
43
- {
44
- :facet_name => :facetName,
45
- :facet_value => :facetValue,
46
- :model => :model,
47
- :fallback_parameters => :fallbackParameters
48
- }
49
- end
50
-
51
- # Returns all the JSON keys this model knows about
52
- def self.acceptable_attributes
53
- attribute_map.values
54
- end
55
-
56
- # Attribute type mapping.
57
- def self.types_mapping
58
- {
59
- :facet_name => :"String",
60
- :facet_value => :"String",
61
- :model => :"TrendingItemsModel",
62
- :fallback_parameters => :"SearchParamsObject"
63
- }
64
- end
65
-
66
- # List of attributes with nullable: true
67
- def self.openapi_nullable
68
- Set.new(
69
- []
70
- )
71
- end
72
-
73
- # Initializes the object
74
- # @param [Hash] attributes Model attributes in the form of hash
75
- def initialize(attributes = {})
76
- if (!attributes.is_a?(Hash))
77
- raise(
78
- ArgumentError,
79
- "The input argument (attributes) must be a hash in `Algolia::TrendingItems` initialize method"
80
- )
81
- end
82
-
83
- # check to see if the attribute exists and convert string to symbol for hash key
84
- attributes = attributes.each_with_object({}) { |(k, v), h|
85
- if (!self.class.attribute_map.key?(k.to_sym))
86
- raise(
87
- ArgumentError,
88
- "`#{k}` is not a valid attribute in `Algolia::TrendingItems`. Please check the name to make sure it's valid. List of attributes: " +
89
- self.class.attribute_map.keys.inspect
90
- )
91
- end
92
-
93
- h[k.to_sym] = v
94
- }
95
-
96
- if attributes.key?(:facet_name)
97
- self.facet_name = attributes[:facet_name]
98
- end
99
-
100
- if attributes.key?(:facet_value)
101
- self.facet_value = attributes[:facet_value]
102
- end
103
-
104
- if attributes.key?(:model)
105
- self.model = attributes[:model]
106
- else
107
- self.model = nil
108
- end
109
-
110
- if attributes.key?(:fallback_parameters)
111
- self.fallback_parameters = attributes[:fallback_parameters]
112
- end
113
- end
114
-
115
- # Checks equality by comparing each attribute.
116
- # @param [Object] Object to be compared
117
- def ==(other)
118
- return true if self.equal?(other)
119
- self.class == other.class &&
120
- facet_name == other.facet_name &&
121
- facet_value == other.facet_value &&
122
- model == other.model &&
123
- fallback_parameters == other.fallback_parameters
124
- end
125
-
126
- # @see the `==` method
127
- # @param [Object] Object to be compared
128
- def eql?(other)
129
- self == other
130
- end
131
-
132
- # Calculates hash code according to all attributes.
133
- # @return [Integer] Hash code
134
- def hash
135
- [facet_name, facet_value, model, fallback_parameters].hash
136
- end
137
-
138
- # Builds the object from hash
139
- # @param [Hash] attributes Model attributes in the form of hash
140
- # @return [Object] Returns the model itself
141
- def self.build_from_hash(attributes)
142
- return nil unless attributes.is_a?(Hash)
143
- attributes = attributes.transform_keys(&:to_sym)
144
- transformed_hash = {}
145
- types_mapping.each_pair do |key, type|
146
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
147
- transformed_hash[key.to_sym] = nil
148
- elsif type =~ /\AArray<(.*)>/i
149
- # check to ensure the input is an array given that the attribute
150
- # is documented as an array but the input is not
151
- if attributes[attribute_map[key]].is_a?(Array)
152
- transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
153
- _deserialize(::Regexp.last_match(1), v)
154
- }
155
- end
156
- elsif !attributes[attribute_map[key]].nil?
157
- transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
158
- end
159
- end
160
-
161
- new(transformed_hash)
162
- end
163
-
164
- # Deserializes the data based on type
165
- # @param string type Data type
166
- # @param string value Value to be deserialized
167
- # @return [Object] Deserialized data
168
- def self._deserialize(type, value)
169
- case type.to_sym
170
- when :Time
171
- Time.parse(value)
172
- when :Date
173
- Date.parse(value)
174
- when :String
175
- value.to_s
176
- when :Integer
177
- value.to_i
178
- when :Float
179
- value.to_f
180
- when :Boolean
181
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
182
- true
183
- else
184
- false
185
- end
186
-
187
- when :Object
188
- # generic object (usually a Hash), return directly
189
- value
190
- when /\AArray<(?<inner_type>.+)>\z/
191
- inner_type = Regexp.last_match[:inner_type]
192
- value.map { |v| _deserialize(inner_type, v) }
193
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
194
- k_type = Regexp.last_match[:k_type]
195
- v_type = Regexp.last_match[:v_type]
196
- {}.tap do |hash|
197
- value.each do |k, v|
198
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
199
- end
200
- end
201
- # model
202
- else
203
- # models (e.g. Pet) or oneOf
204
- klass = Algolia::Recommend.const_get(type)
205
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
206
- .build_from_hash(value)
207
- end
208
- end
209
-
210
- # Returns the string representation of the object
211
- # @return [String] String presentation of the object
212
- def to_s
213
- to_hash.to_s
214
- end
215
-
216
- # to_body is an alias to to_hash (backward compatibility)
217
- # @return [Hash] Returns the object in the form of hash
218
- def to_body
219
- to_hash
220
- end
221
-
222
- def to_json(*_args)
223
- to_hash.to_json
224
- end
225
-
226
- # Returns the object in the form of hash
227
- # @return [Hash] Returns the object in the form of hash
228
- def to_hash
229
- hash = {}
230
- self.class.attribute_map.each_pair do |attr, param|
231
- value = send(attr)
232
- if value.nil?
233
- is_nullable = self.class.openapi_nullable.include?(attr)
234
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
- end
236
-
237
- hash[param] = _to_hash(value)
238
- end
239
-
240
- hash
241
- end
242
-
243
- # Outputs non-array value in the form of hash
244
- # For object, use to_hash. Otherwise, just return the value
245
- # @param [Object] value Any valid value
246
- # @return [Hash] Returns the value in the form of hash
247
- def _to_hash(value)
248
- if value.is_a?(Array)
249
- value.compact.map { |v| _to_hash(v) }
250
- elsif value.is_a?(Hash)
251
- {}.tap do |hash|
252
- value.each { |k, v| hash[k] = _to_hash(v) }
253
- end
254
- elsif value.respond_to?(:to_hash)
255
- value.to_hash
256
- else
257
- value
258
- end
259
- end
260
-
261
- end
262
-
263
- end
264
- end