Amazon::MWS::Client
An API binding for Amazon's Marketplace Web Services. An overview of the entire interface can be found at https://mws.amazon.com/docs/devGuide.
Constructs a new client object. Takes the following keyword arguments:
An attributes you would like to add (besides language=Perl) to the user agent string, as a hashref.
The name of your application. Defaults to 'Amazon::MWS::Client'
The version of your application. Defaults to the current version of this module.
Where MWS lives. Defaults to 'https://mws.amazonaws.com'.
Your AWS Access Key Id
Your AWS Secret Access Key
Your Amazon Merchant ID
The marketplace id for the calls being made by this object.
Any of the "API METHODS" can throw the following exceptions (Exception::Class). They are all subclasses of Amazon::MWS::Exception.
The call to the API method was missing a required argument. The name of the missing argument can be found in $e->name.
There was an error communicating with the Amazon endpoint. The HTTP::Request and Response objects can be found in $e->request and $e->response.
Amazon returned an response, but indicated an error. An arrayref of hashrefs corresponding to the error xml (via XML::Simple on the Error elements) is available at $e->errors, and the entire xml response is available at $e->xml.
If Amazon sends the 'Content-MD5' header and it does not match the content, this exception will be thrown. The response can be found in $e->response.
The LWP::UserAgent object used to send the requests to Amazon.
The following methods may be called on objects of this class. All concerns (such as authentication) which are common to every request are handled by this class.
Enumerated values may be specified as strings or as constants from the Amazon::MWS::Enumeration packages for compile time checking.
All parameters to individual API methods may be specified either as name-value pairs in the argument string or as hashrefs, and should have the same names as specified in the API documentation.
Return values will be hashrefs with keys as specified in the 'Response Elements' section of the API documentation unless otherwise noted.
The mapping of API datatypes to perl datatypes is specified in Amazon::MWS::TypeMap. Note that where the documentation calls for a 'structured list', you should pass in an arrayref.
Requires an additional 'content_type' argument specifying what content type the HTTP-BODY is.
Returns the count as a simple scalar (as do all methods ending with Count)
The raw body of the response is returned.
The returned ReportRequest will be an arrayref for consistency with other methods, even though there will only ever be one element.
The raw body is returned.
Paul Driver frodwith@cpan.org
frodwith@cpan.org
Copyright (c) 2009, Plain Black Corporation http://plainblack.com. All rights reserved
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install Amazon::MWS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Amazon::MWS
CPAN shell
perl -MCPAN -e shell install Amazon::MWS
For more information on module installation, please visit the detailed CPAN module installation guide.