Class: AmazonMwsProducts::ListMatchingProducts
- Inherits:
-
Object
- Object
- AmazonMwsProducts::ListMatchingProducts
- Defined in:
- lib/amazon_mws_products/list_matching_products.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#query_context_id ⇒ Object
readonly
Returns the value of attribute query_context_id.
Instance Method Summary collapse
- #client ⇒ Object
- #execute ⇒ Object
-
#initialize(options) ⇒ ListMatchingProducts
constructor
A new instance of ListMatchingProducts.
Constructor Details
#initialize(options) ⇒ ListMatchingProducts
Returns a new instance of ListMatchingProducts.
5 6 7 8 9 |
# File 'lib/amazon_mws_products/list_matching_products.rb', line 5 def initialize() @account = .fetch(:account) @query = .fetch(:query) @query_context_id = [:query_context_id] end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
3 4 5 |
# File 'lib/amazon_mws_products/list_matching_products.rb', line 3 def account @account end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
3 4 5 |
# File 'lib/amazon_mws_products/list_matching_products.rb', line 3 def query @query end |
#query_context_id ⇒ Object (readonly)
Returns the value of attribute query_context_id.
3 4 5 |
# File 'lib/amazon_mws_products/list_matching_products.rb', line 3 def query_context_id @query_context_id end |
Instance Method Details
#client ⇒ Object
17 18 19 |
# File 'lib/amazon_mws_products/list_matching_products.rb', line 17 def client Client.new(account, 'ListMatchingProducts') end |
#execute ⇒ Object
11 12 13 14 15 |
# File 'lib/amazon_mws_products/list_matching_products.rb', line 11 def execute params = { "Query" => URI.encode(query) } params["QueryContextId"] = query_context_id if query_context_id client.get(params) end |