Class: Adcloud::Topic
Constant Summary
Constants inherited from Entity
Instance Attribute Summary
Attributes inherited from Entity
Instance Method Summary collapse
Methods inherited from Entity
all, all!, api_name, #connection, #create, create, #destroy, find, find_by_name, #meta, #update
Instance Method Details
#discounts=(data) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/adcloud/topic.rb', line 10 def discounts=(data) @discounts = data.reduce({}) do |hash, raw_discount| discount = TopicDiscount.new(raw_discount) hash[discount.country_code] = discount hash end end |