Class: BestBuy::Store
- Inherits:
-
Object
- Object
- BestBuy::Store
- Defined in:
- lib/best_buy/models/store.rb
Instance Attribute Summary collapse
-
#location_type ⇒ Object
readonly
Returns the value of attribute location_type.
-
#long_name ⇒ Object
readonly
Returns the value of attribute long_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#opening_time ⇒ Object
readonly
Returns the value of attribute opening_time.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#services ⇒ Object
readonly
Returns the value of attribute services.
-
#store_address ⇒ Object
readonly
Returns the value of attribute store_address.
-
#store_id ⇒ Object
readonly
Returns the value of attribute store_id.
-
#store_type ⇒ Object
readonly
Returns the value of attribute store_type.
Instance Method Summary collapse
-
#initialize(init_params) ⇒ Store
constructor
A new instance of Store.
Constructor Details
#initialize(init_params) ⇒ Store
Returns a new instance of Store.
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/best_buy/models/store.rb', line 13 def initialize(init_params) @location_type = init_params[:location_type] @long_name = init_params[:long_name] @name = init_params[:name] @opening_time = init_params[:detailed_hours] @phone = init_params[:phone] @services = init_params[:services]&.map { |service_hash| service_hash[:service] } @store_id = init_params[:store_id] @store_type = init_params[:store_type] @store_address = Address.new(init_params) end |
Instance Attribute Details
#location_type ⇒ Object (readonly)
Returns the value of attribute location_type.
7 8 9 |
# File 'lib/best_buy/models/store.rb', line 7 def location_type @location_type end |
#long_name ⇒ Object (readonly)
Returns the value of attribute long_name.
7 8 9 |
# File 'lib/best_buy/models/store.rb', line 7 def long_name @long_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/best_buy/models/store.rb', line 7 def name @name end |
#opening_time ⇒ Object (readonly)
Returns the value of attribute opening_time.
7 8 9 |
# File 'lib/best_buy/models/store.rb', line 7 def opening_time @opening_time end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
7 8 9 |
# File 'lib/best_buy/models/store.rb', line 7 def phone @phone end |
#services ⇒ Object (readonly)
Returns the value of attribute services.
7 8 9 |
# File 'lib/best_buy/models/store.rb', line 7 def services @services end |
#store_address ⇒ Object (readonly)
Returns the value of attribute store_address.
7 8 9 |
# File 'lib/best_buy/models/store.rb', line 7 def store_address @store_address end |
#store_id ⇒ Object (readonly)
Returns the value of attribute store_id.
7 8 9 |
# File 'lib/best_buy/models/store.rb', line 7 def store_id @store_id end |
#store_type ⇒ Object (readonly)
Returns the value of attribute store_type.
7 8 9 |
# File 'lib/best_buy/models/store.rb', line 7 def store_type @store_type end |