Class: A2z::Responses::TopItem
Instance Attribute Summary collapse
-
#actor ⇒ Object
Returns the value of attribute actor.
-
#artist ⇒ Object
Returns the value of attribute artist.
-
#asin ⇒ Object
Returns the value of attribute asin.
-
#author ⇒ Object
Returns the value of attribute author.
-
#detail_page_url ⇒ Object
Returns the value of attribute detail_page_url.
-
#product_group ⇒ Object
Returns the value of attribute product_group.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
Instance Attribute Details
#actor ⇒ Object
Returns the value of attribute actor.
4 5 6 |
# File 'lib/a2z/responses/top_item.rb', line 4 def actor @actor end |
#artist ⇒ Object
Returns the value of attribute artist.
4 5 6 |
# File 'lib/a2z/responses/top_item.rb', line 4 def artist @artist end |
#asin ⇒ Object
Returns the value of attribute asin.
4 5 6 |
# File 'lib/a2z/responses/top_item.rb', line 4 def asin @asin end |
#author ⇒ Object
Returns the value of attribute author.
4 5 6 |
# File 'lib/a2z/responses/top_item.rb', line 4 def @author end |
#detail_page_url ⇒ Object
Returns the value of attribute detail_page_url.
4 5 6 |
# File 'lib/a2z/responses/top_item.rb', line 4 def detail_page_url @detail_page_url end |
#product_group ⇒ Object
Returns the value of attribute product_group.
4 5 6 |
# File 'lib/a2z/responses/top_item.rb', line 4 def product_group @product_group end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/a2z/responses/top_item.rb', line 4 def title @title end |
Class Method Details
.from_response(data) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/a2z/responses/top_item.rb', line 7 def self.from_response(data) new.tap do |top_item| top_item.asin = data['ASIN'] top_item.title = data['Title'] top_item.product_group = data['ProductGroup'] top_item.actor = data['Actor'] top_item.artist = data['Artist'] top_item. = data['Author'] top_item.detail_page_url = data['DetailPageURL'] top_item.freeze end end |