lib/algolia/models/insights/error_base.rb in algolia-3.0.0.beta.1 vs lib/algolia/models/insights/error_base.rb in algolia-3.0.0.beta.3

- old
+ new

@@ -92,15 +92,11 @@ elsif !attributes[attribute_map[key]].nil? transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]]) end end - # merge additional_properties into transformed_hash - unless @additional_properties.nil? - @additional_properties.each_pair do |k, v| - transformed_hash[k.to_sym] = v - end - end + # add extra attribute to transformed_hash + transformed_hash.merge!(attributes.reject { |k, _| attribute_map.key?(k.to_sym) }) new(transformed_hash) end # Deserializes the data based on type # @param string type Data type