Class: Vacuum::Endpoint::MWS
Overview
A Marketplace Web Services (MWS) API endpoint.
Constant Summary collapse
- HOSTS =
A list of MWS API hosts.
{ 'CA' => 'mws.amazonservices.ca', 'CN' => 'mws.amazonservices.com.cn', 'DE' => 'mws-eu.amazonservices.com', 'ES' => 'mws-eu.amazonservices.com', 'FR' => 'mws-eu.amazonservices.com', 'IT' => 'mws-eu.amazonservices.com', 'JP' => 'mws.amazonservices.jp', 'UK' => 'mws-eu.amazonservices.com', 'US' => 'mws.amazonservices.com' }
Constants inherited from Base
Instance Attribute Summary collapse
-
#api ⇒ Object
Internal: Gets/Sets the Symbol MWS API type.
-
#marketplace ⇒ Object
Sets the String marketplace ID.
-
#seller ⇒ Object
Sets the String seller ID.
Attributes inherited from Base
Instance Method Summary collapse
-
#host ⇒ Object
Returns a String MWS API host.
-
#path ⇒ Object
Returns a String MWS API URL path.
Methods inherited from Base
Instance Attribute Details
#api ⇒ Object
Internal: Gets/Sets the Symbol MWS API type.
19 20 21 |
# File 'lib/vacuum/endpoint/mws.rb', line 19 def api @api end |
#marketplace ⇒ Object
Sets the String marketplace ID.
Raises a Missing Marketplace error if marketplace ID is missing.
29 30 31 |
# File 'lib/vacuum/endpoint/mws.rb', line 29 def marketplace @marketplace or raise MissingMarketplace end |
#seller ⇒ Object
Sets the String seller ID.
Raises a Missing Seller error if seller ID is missing.
51 52 53 |
# File 'lib/vacuum/endpoint/mws.rb', line 51 def seller @seller or raise MissingSeller end |
Instance Method Details
#host ⇒ Object
Returns a String MWS API host.
22 23 24 |
# File 'lib/vacuum/endpoint/mws.rb', line 22 def host HOSTS[locale] end |
#path ⇒ Object
Returns a String MWS API URL path.
Raises a Not Implemented Error if API is not implemented.
39 40 41 42 43 44 45 46 |
# File 'lib/vacuum/endpoint/mws.rb', line 39 def path case api when :products '/Products/2011-10-01' else raise NotImplementedError end end |