lib/access/response.rb in access-2.1.1 vs lib/access/response.rb in access-2.1.2
- old
+ new
@@ -19,10 +19,12 @@
attr_reader :channel_name, :channel_type, :channel_identifier, :channel_description
#shopping cart count
attr_reader :total_cart_count
#amt
attr_reader :data
+ #hotel
+ attr_reader :hotels
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
@@ -64,9 +66,16 @@
class ProductGroupResponse < Response
def process_data
(@product_groups = []; create_error) if @message
@product_groups = Access::ProductGroup.process_batch(@product_groups) if @product_groups
+ end
+ end
+
+ class HotelResponse < Response
+ def process_data
+ (@hotels = []; create_error) if @message
+ @hotels = Access::Hotel.process_batch(@hotels) if @hotels
end
end
class StoreResponse < Response
def process_data