NAME
Amazon::MWS::Client
DESCRIPTION
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.
METHODS
new
Constructs a new client object. Takes the following keyword arguments:
agent_attributes
An attributes you would like to add (besides language=Perl) to the user agent string, as a hashref.
application
The name of your application. Defaults to 'Amazon::MWS::Client'
version
The version of your application. Defaults to the current version of this module.
endpoint
Where MWS lives. Defaults to 'https://mws.amazonaws.com'.
access_key_id
Your AWS Access Key Id
secret_key
Your AWS Secret Access Key
merchant_id
Your Amazon Merchant ID
marketplace_id
The marketplace id for the calls being made by this object.
EXCEPTIONS
Any of the "API METHODS" can throw the following exceptions (Exception::Class). They are all subclasses of Amazon::MWS::Exception.
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.
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.
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.
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.
INTERNAL METHODS
agent
The LWP::UserAgent object used to send the requests to Amazon.
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 Amazon::MWS::TypeMap. Note that where the documentation calls for a 'structured list', you should pass in an arrayref.
SubmitFeed
Requires an additional 'content_type' argument specifying what content type the HTTP-BODY is.
GetFeedSubmissionList
GetFeedSubmissionListByNextToken
GetFeedSubmissionCount
Returns the count as a simple scalar (as do all methods ending with Count)
CancelFeedSubmissions
GetFeedSubmissionResult
The raw body of the response is returned.
RequestReport
The returned ReportRequest will be an arrayref for consistency with other methods, even though there will only ever be one element.
GetReportRequestList
GetReportRequestListByNextToken
GetReportRequestCount
CancelReportRequests
GetReportList
GetReportListByNextToken
GetReportCount
GetReport
The raw body is returned.
ManageReportSchedule
GetReportScheduleList
GetReportScheduleListByNextToken
GetReportScheduleCount
UpdateReportAcknowledgements
AUTHOR
Paul Driver frodwith@cpan.org
LICENCE AND COPYRIGHT
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.