Class: Ebay::Merchandising
- Inherits:
-
Object
- Object
- Ebay::Merchandising
- Includes:
- Requestable
- Defined in:
- lib/ebay/merchandising.rb
Overview
Retrieves information about products or item listings on eBay to help you sell more merchandise to eBay buyers
Instance Attribute Summary collapse
- #consumer_id ⇒ String readonly
- #global_id ⇒ String readonly
- #response_data_format ⇒ String readonly
- #service_version ⇒ String readonly
Attributes included from Requestable
Instance Method Summary collapse
-
#get_most_watched_items(payload = {}) ⇒ HTTP::Response
Retrieves data for items with the highest watch count.
-
#get_related_category_items(payload = {}) ⇒ HTTP::Response
Retrieves recommended items from categories related to a specified category or item.
-
#get_similar_items(item_id, payload = {}) ⇒ HTTP::Response
Retrieves items that are similar to the specified item.
-
#get_version ⇒ HTTP::Response
Returns the current service version.
-
#initialize(consumer_id: Config.app_id, global_id: nil, response_data_format: nil, service_version: nil) ⇒ Merchandising
constructor
Returns a Finding API request instance.
Methods included from Requestable
#market_id=, #persistent, #sandbox, #use, #via
Constructor Details
#initialize(consumer_id: Config.app_id, global_id: nil, response_data_format: nil, service_version: nil) ⇒ Merchandising
Returns a Finding API request instance
41 42 43 44 45 46 47 |
# File 'lib/ebay/merchandising.rb', line 41 def initialize(consumer_id: Config.app_id, global_id: nil, response_data_format: nil, service_version: nil) @consumer_id = consumer_id @global_id = global_id @response_data_format = response_data_format @service_version = service_version end |
Instance Attribute Details
#consumer_id ⇒ String (readonly)
24 25 26 |
# File 'lib/ebay/merchandising.rb', line 24 def consumer_id @consumer_id end |
#global_id ⇒ String (readonly)
27 28 29 |
# File 'lib/ebay/merchandising.rb', line 27 def global_id @global_id end |
#response_data_format ⇒ String (readonly)
30 31 32 |
# File 'lib/ebay/merchandising.rb', line 30 def response_data_format @response_data_format end |
#service_version ⇒ String (readonly)
33 34 35 |
# File 'lib/ebay/merchandising.rb', line 33 def service_version @service_version end |
Instance Method Details
#get_most_watched_items(payload = {}) ⇒ HTTP::Response
Retrieves data for items with the highest watch count
53 54 55 |
# File 'lib/ebay/merchandising.rb', line 53 def get_most_watched_items(payload = {}) request('getMostWatchedItems', payload) end |
#get_related_category_items(payload = {}) ⇒ HTTP::Response
Retrieves recommended items from categories related to a specified category or item
62 63 64 |
# File 'lib/ebay/merchandising.rb', line 62 def (payload = {}) request('getRelatedCategoryItems', payload) end |
#get_similar_items(item_id, payload = {}) ⇒ HTTP::Response
Retrieves items that are similar to the specified item
71 72 73 74 |
# File 'lib/ebay/merchandising.rb', line 71 def get_similar_items(item_id, payload = {}) payload = payload.merge('itemId' => item_id) request('getSimilarItems', payload) end |
#get_version ⇒ HTTP::Response
Returns the current service version
79 80 81 |
# File 'lib/ebay/merchandising.rb', line 79 def get_version request('getVersion') end |