Class: Ebisu::Store
- Inherits:
-
Object
- Object
- Ebisu::Store
- Defined in:
- lib/ebisu/models/store.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#image_id ⇒ Object
Returns the value of attribute image_id.
-
#is_best_store ⇒ Object
Returns the value of attribute is_best_store.
-
#name ⇒ Object
Returns the value of attribute name.
-
#ratings ⇒ Object
Returns the value of attribute ratings.
Instance Method Summary collapse
-
#initialize(data) ⇒ Store
constructor
A new instance of Store.
Constructor Details
#initialize(data) ⇒ Store
Returns a new instance of Store.
26 27 28 29 30 31 32 |
# File 'lib/ebisu/models/store.rb', line 26 def initialize(data) @id = data.dig('sellerId') @name = data.dig('name') @is_best_store = data.dig('isBestSeller') @ratings = Ebisu::StoreRatings.new(data.dig('review')) @image_id = data.dig('imageId') end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/ebisu/models/store.rb', line 5 def id @id end |
#image_id ⇒ Object
Returns the value of attribute image_id.
21 22 23 |
# File 'lib/ebisu/models/store.rb', line 21 def image_id @image_id end |
#is_best_store ⇒ Object
Returns the value of attribute is_best_store.
13 14 15 |
# File 'lib/ebisu/models/store.rb', line 13 def is_best_store @is_best_store end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/ebisu/models/store.rb', line 9 def name @name end |
#ratings ⇒ Object
Returns the value of attribute ratings.
17 18 19 |
# File 'lib/ebisu/models/store.rb', line 17 def @ratings end |