Class: Rubizon::ProductAdvertisingProduct

Inherits:
AbstractSig2Product show all
Defined in:
lib/rubizon/product/product_advertising.rb

Overview

Define a class that generates requests for operations on the Product Advertising API

Instance Attribute Summary

Attributes inherited from AbstractSig2Product

#arn, #host, #path, #query_elements, #scheme

Instance Method Summary collapse

Methods inherited from AbstractSig2Product

#create_request, #endpoint, host_from_ARN

Constructor Details

#initialize(credentials, scheme = 'http') ⇒ ProductAdvertisingProduct

Initialize the product interface.

credentials - A SecurityCredentials object that encapsulates the

access and secret ids to be used for this product.

scheme - (optional - default: http) May set to ‘https’ if supported.



11
12
13
14
15
16
17
18
19
20
# File 'lib/rubizon/product/product_advertising.rb', line 11

def initialize(credentials,scheme='http')
  super(
    :scheme=>scheme,
    :host=>'webservices.amazon.com',
    :path=>'/onca/xml',
    '_omit' => ['SignatureMethod','SignatureVersion'],
    'Service'=>'AWSECommerceService'
  )
  @credentials= credentials
end

Instance Method Details

#item_lookup_request(subject_elements = {}) ⇒ Object

Create a request for an item lookup. The URL to use may be obtained from the request.

params - Parameters for the specific request as key/value pairs.



26
27
28
29
30
31
# File 'lib/rubizon/product/product_advertising.rb', line 26

def item_lookup_request(subject_elements={})
  basic_action(
    @item_lookup_elements||= {'Operation'=>'ItemLookup'},
    subject_elements
  )
end