class BestBuy::Store

Attributes

location_type[R]
long_name[R]
name[R]
opening_time[R]
phone[R]
services[R]
store_address[R]
store_id[R]
store_type[R]

Public Class Methods

new(init_params) click to toggle source
# 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