line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Amazon::MWS::Client; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
1347
|
use warnings; |
|
8
|
|
|
|
|
28
|
|
|
8
|
|
|
|
|
313
|
|
4
|
8
|
|
|
8
|
|
51
|
use strict; |
|
8
|
|
|
|
|
19
|
|
|
8
|
|
|
|
|
369
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.5'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
8
|
|
|
8
|
|
2290
|
use Amazon::MWS::TypeMap qw(:all); |
|
8
|
|
|
|
|
35
|
|
|
8
|
|
|
|
|
1333
|
|
10
|
8
|
|
|
8
|
|
2948
|
use Amazon::MWS::Routines qw(:all); |
|
8
|
|
|
|
|
38
|
|
|
8
|
|
|
|
|
1620
|
|
11
|
8
|
|
|
8
|
|
3019
|
use Amazon::MWS::InboundShipments; |
|
8
|
|
|
|
|
40
|
|
|
8
|
|
|
|
|
315
|
|
12
|
8
|
|
|
8
|
|
2606
|
use Amazon::MWS::FulfillmentInventory; |
|
8
|
|
|
|
|
33
|
|
|
8
|
|
|
|
|
324
|
|
13
|
8
|
|
|
8
|
|
2557
|
use Amazon::MWS::FulfillmentOutbound; |
|
8
|
|
|
|
|
30
|
|
|
8
|
|
|
|
|
268
|
|
14
|
8
|
|
|
8
|
|
2410
|
use Amazon::MWS::Orders; |
|
8
|
|
|
|
|
26
|
|
|
8
|
|
|
|
|
305
|
|
15
|
8
|
|
|
8
|
|
2538
|
use Amazon::MWS::Sellers; |
|
8
|
|
|
|
|
33
|
|
|
8
|
|
|
|
|
283
|
|
16
|
8
|
|
|
8
|
|
2800
|
use Amazon::MWS::Reports; |
|
8
|
|
|
|
|
33
|
|
|
8
|
|
|
|
|
335
|
|
17
|
8
|
|
|
8
|
|
2633
|
use Amazon::MWS::Feeds; |
|
8
|
|
|
|
|
28
|
|
|
8
|
|
|
|
|
298
|
|
18
|
8
|
|
|
8
|
|
2698
|
use Amazon::MWS::Products; |
|
8
|
|
|
|
|
38
|
|
|
8
|
|
|
|
|
358
|
|
19
|
8
|
|
|
8
|
|
70
|
use Data::Dumper; |
|
8
|
|
|
|
|
21
|
|
|
8
|
|
|
|
|
968
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub agent { |
22
|
1
|
|
|
1
|
1
|
6
|
return shift->{agent}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 NAME |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Amazon::MWS::Client |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 DESCRIPTION |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
An API binding for Amazon's Marketplace Web Services. An overview of the |
37
|
|
|
|
|
|
|
entire interface can be found at L<https://mws.amazon.com/docs/devGuide>. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 METHODS |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 new |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Constructs a new client object. Takes the following keyword arguments: |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head3 agent_attributes |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
An attributes you would like to add (besides language=Perl) to the user agent |
48
|
|
|
|
|
|
|
string, as a hashref. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head3 application |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
The name of your application. Defaults to 'Amazon::MWS::Client' |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head3 version |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
The version of your application. Defaults to the current version of this |
57
|
|
|
|
|
|
|
module. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head3 endpoint |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Where MWS lives. Defaults to 'https://mws.amazonaws.com'. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head3 access_key_id |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Your AWS Access Key Id |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head3 secret_key |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Your AWS Secret Access Key |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head3 merchant_id |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Your Amazon Merchant ID |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head3 marketplace_id |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
The marketplace id for the calls being made by this object. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 EXCEPTIONS |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Any of the L<API METHODS> can throw the following exceptions |
82
|
|
|
|
|
|
|
(Exception::Class). They are all subclasses of Amazon::MWS::Exception. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 Amazon::MWS::Exception::MissingArgument |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
The call to the API method was missing a required argument. The name of the |
87
|
|
|
|
|
|
|
missing argument can be found in $e->name. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head2 Amazon::MWS::Exception::Transport |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
There was an error communicating with the Amazon endpoint. The HTTP::Request |
92
|
|
|
|
|
|
|
and Response objects can be found in $e->request and $e->response. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 Amazon::MWS::Exception::Response |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Amazon returned an response, but indicated an error. An arrayref of hashrefs |
97
|
|
|
|
|
|
|
corresponding to the error xml (via XML::Simple on the Error elements) is |
98
|
|
|
|
|
|
|
available at $e->errors, and the entire xml response is available at $e->xml. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 Amazon::MWS::Exception::BadChecksum |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
If Amazon sends the 'Content-MD5' header and it does not match the content, |
103
|
|
|
|
|
|
|
this exception will be thrown. The response can be found in $e->response. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 INTERNAL METHODS |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head2 agent |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
The LWP::UserAgent object used to send the requests to Amazon. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 API METHODS |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
The following methods may be called on objects of this class. All concerns |
114
|
|
|
|
|
|
|
(such as authentication) which are common to every request are handled by this |
115
|
|
|
|
|
|
|
class. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
Enumerated values may be specified as strings or as constants from the |
118
|
|
|
|
|
|
|
Amazon::MWS::Enumeration packages for compile time checking. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
All parameters to individual API methods may be specified either as name-value |
121
|
|
|
|
|
|
|
pairs in the argument string or as hashrefs, and should have the same names as |
122
|
|
|
|
|
|
|
specified in the API documentation. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
Return values will be hashrefs with keys as specified in the 'Response |
125
|
|
|
|
|
|
|
Elements' section of the API documentation unless otherwise noted. |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
The mapping of API datatypes to perl datatypes is specified in |
128
|
|
|
|
|
|
|
L<Amazon::MWS::TypeMap>. Note that where the documentation calls for a |
129
|
|
|
|
|
|
|
'structured list', you should pass in an arrayref. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head2 SubmitFeed |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Requires an additional 'content_type' argument specifying what content type |
134
|
|
|
|
|
|
|
the HTTP-BODY is. |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head2 GetFeedSubmissionList |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head2 GetFeedSubmissionListByNextToken |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head2 GetFeedSubmissionCount |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
Returns the count as a simple scalar (as do all methods ending with Count) |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=head2 CancelFeedSubmissions |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head2 GetFeedSubmissionResult |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
The raw body of the response is returned. |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head2 RequestReport |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
The returned ReportRequest will be an arrayref for consistency with other |
153
|
|
|
|
|
|
|
methods, even though there will only ever be one element. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head2 GetReportRequestList |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head2 GetReportRequestListByNextToken |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head2 GetReportRequestCount |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head2 CancelReportRequests |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head2 GetReportList |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head2 GetReportListByNextToken |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head2 GetReportCount |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=head2 GetReport |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
The raw body is returned. |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=head2 ManageReportSchedule |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=head2 GetReportScheduleList |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
=head2 GetReportScheduleListByNextToken |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=head2 GetReportScheduleCount |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=head2 UpdateReportAcknowledgements |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=head1 AUTHOR |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
Paul Driver C<< frodwith@cpan.org >> |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
=head1 LICENCE AND COPYRIGHT |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
Copyright (c) 2009, Plain Black Corporation L<http://plainblack.com>. |
190
|
|
|
|
|
|
|
All rights reserved |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or modify it under |
193
|
|
|
|
|
|
|
the same terms as Perl itself. See L<perlartistic>. |