Sha256: 01b1688e9f2297dd3f3412d921c98b2847a6a687023701c1c3e1d6ea66ac78d1

Contents?: true

Size: 868 Bytes

Versions: 5

Compression:

Stored size: 868 Bytes

Contents

module Vacuum
  module Endpoint
    # A Product Advertising API endpoint.
    class ProductAdvertising < Base
      # A list of Product Advertising API hosts.
      HOSTS = {
        'CA' => 'ecs.amazonaws.ca',
        'CN' => 'webservices.amazon.cn',
        'DE' => 'ecs.amazonaws.de',
        'ES' => 'webservices.amazon.es',
        'FR' => 'ecs.amazonaws.fr',
        'IT' => 'webservices.amazon.it',
        'JP' => 'ecs.amazonaws.jp',
        'UK' => 'ecs.amazonaws.co.uk',
        'US' => 'ecs.amazonaws.com'
      }

      # Returns a String Product Advertising API host.
      def host
        HOSTS[locale]
      end

      # Sets the String Associate tag.
      #
      # Raises a Missing Tag error if tag is missing.
      def tag
        @tag or raise MissingTag
      end

      # Sets the String Associate tag.
      attr_writer :tag
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vacuum-0.2.2 lib/vacuum/endpoint/product_advertising.rb
vacuum-0.2.1 lib/vacuum/endpoint/product_advertising.rb
vacuum-0.2.0 lib/vacuum/endpoint/product_advertising.rb
vacuum-0.2.0.pre.1 lib/vacuum/endpoint/product_advertising.rb
vacuum-0.2.0.pre lib/vacuum/endpoint/product_advertising.rb