Amazon-MWS
view release on metacpan or search on metacpan
lib/Amazon/MWS/Client.pm view on Meta::CPAN
Amazon::MWS::Client
=head1 DESCRIPTION
An API binding for Amazon's Marketplace Web Services. An overview of the
entire interface can be found at L<https://mws.amazon.com/docs/devGuide>.
=head1 METHODS
=head2 new
Constructs a new client object. Takes the following keyword arguments:
=head3 agent_attributes
An attributes you would like to add (besides language=Perl) to the user agent
string, as a hashref.
=head3 application
The name of your application. Defaults to 'Amazon::MWS::Client'
=head3 version
The version of your application. Defaults to the current version of this
module.
=head3 endpoint
Where MWS lives. Defaults to 'https://mws.amazonaws.com'.
=head3 access_key_id
Your AWS Access Key Id
=head3 secret_key
Your AWS Secret Access Key
=head3 merchant_id
Your Amazon Merchant ID
=head3 marketplace_id
The marketplace id for the calls being made by this object.
=head1 EXCEPTIONS
Any of the L<API METHODS> can throw the following exceptions
(Exception::Class). They are all subclasses of Amazon::MWS::Exception.
=head2 Amazon::MWS::Exception::MissingArgument
The call to the API method was missing a required argument. The name of the
missing argument can be found in $e->name.
=head2 Amazon::MWS::Exception::Transport
There was an error communicating with the Amazon endpoint. The HTTP::Request
and Response objects can be found in $e->request and $e->response.
=head2 Amazon::MWS::Exception::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.
=head2 Amazon::MWS::Exception::BadChecksum
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.
=head1 INTERNAL METHODS
=head2 agent
The LWP::UserAgent object used to send the requests to Amazon.
=head1 API METHODS
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
L<Amazon::MWS::TypeMap>. Note that where the documentation calls for a
'structured list', you should pass in an arrayref.
=head2 SubmitFeed
Requires an additional 'content_type' argument specifying what content type
the HTTP-BODY is.
=head2 GetFeedSubmissionList
=head2 GetFeedSubmissionListByNextToken
=head2 GetFeedSubmissionCount
Returns the count as a simple scalar (as do all methods ending with Count)
=head2 CancelFeedSubmissions
=head2 GetFeedSubmissionResult
The raw body of the response is returned.
=head2 RequestReport
( run in 1.182 second using v1.01-cache-2.11-cpan-d8267643d1d )