lib/access/response.rb in access-2.0.26 vs lib/access/response.rb in access-2.0.27
- old
+ new
@@ -10,11 +10,13 @@
#redemptions
attr_reader :content_type, :redemption_method, :details
#usages
attr_reader :api_calls_over_time, :member_usage
#campaign show page
- attr_reader :campaign_name, :campaign_description, :start_date, :end_date, :campaign_ranking, :spot_list, :channel_list
+ attr_reader :key, :campaign_name, :campaign_description, :start_date, :end_date, :campaign_ranking, :spot_list, :channel_list
+ #spot show page
+ attr_reader :spot_name, :spot_text, :spot_ranking, :spot_redirect_url, :spot_redirect_type, :spot_image_url, :offer_resource
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
@@ -159,10 +161,11 @@
end
end
class SpotResponse < Response
def process_data
- @spots = Access::Spot.process_batch(@spots)
+ @spots = Access::Spot.process_batch(@spots) if @spots
+ @offer_resource = Access::Offer.new(@offer_resource) if @offer_resource
end
end
class RedemptionResponse < Response
def process_data