Class: BestBuy::Stores

Inherits:
BaseAPI show all
Defined in:
lib/best_buy/stores.rb

Constant Summary collapse

STORES_API =
'/v1/stores'

Constants inherited from BaseAPI

BaseAPI::BASE_URL

Instance Attribute Summary

Attributes inherited from BaseAPI

#api_key

Instance Method Summary collapse

Methods inherited from BaseAPI

#get_all, #initialize

Constructor Details

This class inherits a constructor from BestBuy::BaseAPI

Instance Method Details

#find(store_id) ⇒ Object



9
10
11
12
13
14
# File 'lib/best_buy/stores.rb', line 9

def find(store_id)
  response = get_response("/#{store_id}.json", { apiKey: api_key })
  parsed_response = APIHelper.new.parse_response(response)

  model_class.new(parsed_response)
end