Class: SilencerShop::ProductFeed
- Includes:
- API
- Defined in:
- lib/silencer_shop/product_feed.rb
Constant Summary collapse
- ENDPOINTS =
{ catalog: "productfeed/catalog".freeze, availability: "productfeed/availability".freeze }
Constants included from API
API::API_URL, API::FILE_UPLOAD_ATTRS, API::USER_AGENT
Instance Method Summary collapse
- #availability ⇒ Object
- #catalog ⇒ Object
-
#initialize(client) ⇒ ProductFeed
constructor
A new instance of ProductFeed.
Methods included from API
#get_request, #post_file_request, #post_request
Constructor Details
#initialize(client) ⇒ ProductFeed
Returns a new instance of ProductFeed.
13 14 15 |
# File 'lib/silencer_shop/product_feed.rb', line 13 def initialize(client) @client = client end |
Instance Method Details
#availability ⇒ Object
21 22 23 |
# File 'lib/silencer_shop/product_feed.rb', line 21 def availability get_request(ENDPOINTS[:availability], auth_header(@client.access_token)) end |
#catalog ⇒ Object
17 18 19 |
# File 'lib/silencer_shop/product_feed.rb', line 17 def catalog get_request(ENDPOINTS[:catalog], auth_header(@client.access_token)) end |