lib/access/response.rb in access-2.1.3 vs lib/access/response.rb in access-2.1.4
- old
+ new
@@ -20,11 +20,11 @@
#shopping cart count
attr_reader :total_cart_count
#amt
attr_reader :data
#hotel
- attr_reader :hotels
+ attr_reader :hotels, :aggregations
def initialize(response)
@response = response # Setting this temporarily so i can have a working member reg call, since it doesn't follow the resource [] best practices
response.each { |key, value| instance_variable_set("@#{key}", value) if self.class.instance_methods.include? key.to_sym }
@response_status = response.message
@@ -73,9 +73,10 @@
class HotelResponse < Response
def process_data
(@hotels = []; create_error) if @message
@hotels = Access::Hotel.process_batch(@hotels) if @hotels
+ @aggregations = Access::Hotel.process_batch(@aggregations) if @aggregations
end
end
class StoreResponse < Response
def process_data