line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Amazon::MWS::Orders; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
40
|
use strict; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
327
|
|
4
|
8
|
|
|
8
|
|
45
|
use warnings; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
408
|
|
5
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
|
37
|
use Amazon::MWS::Routines qw(:all); |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
4926
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $version = '2013-09-01'; |
9
|
|
|
|
|
|
|
my $orders_service = "/Orders/$version"; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
define_api_method GetServiceStatus => |
12
|
|
|
|
|
|
|
raw_body => 0, |
13
|
|
|
|
|
|
|
service => "$orders_service", |
14
|
|
|
|
|
|
|
module_name => 'Amazon::MWS::Orders', |
15
|
|
|
|
|
|
|
parameters => {}, |
16
|
|
|
|
|
|
|
respond => sub { |
17
|
|
|
|
|
|
|
my $root = shift; |
18
|
|
|
|
|
|
|
return $root->{Status}; |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
define_api_method ListOrders => |
22
|
|
|
|
|
|
|
service => $orders_service, |
23
|
|
|
|
|
|
|
version => $version, |
24
|
|
|
|
|
|
|
parameters => { |
25
|
|
|
|
|
|
|
MarketplaceId => { |
26
|
|
|
|
|
|
|
required => 1, |
27
|
|
|
|
|
|
|
type => 'IdList', |
28
|
|
|
|
|
|
|
}, |
29
|
|
|
|
|
|
|
OrderStatus => { type => 'StatusList' }, |
30
|
|
|
|
|
|
|
CreatedAfter => { type => 'datetime' }, |
31
|
|
|
|
|
|
|
CreatedBefore => { type => 'datetime' }, |
32
|
|
|
|
|
|
|
LastUpdatedAfter => { type => 'datetime' }, |
33
|
|
|
|
|
|
|
LastUpdatedBefore => { type => 'datetime' }, |
34
|
|
|
|
|
|
|
MaxResultsPerPage => { type => 'nonNegativeInteger' }, |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
respond => sub { |
37
|
|
|
|
|
|
|
my $root = shift; |
38
|
|
|
|
|
|
|
convert_ListOrdersResult($root); |
39
|
|
|
|
|
|
|
return $root; |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
define_api_method ListOrdersByNextToken => |
43
|
|
|
|
|
|
|
service => "$orders_service", |
44
|
|
|
|
|
|
|
version => $version, |
45
|
|
|
|
|
|
|
parameters => { |
46
|
|
|
|
|
|
|
NextToken => { |
47
|
|
|
|
|
|
|
type => 'string', |
48
|
|
|
|
|
|
|
required => 1, |
49
|
|
|
|
|
|
|
}, |
50
|
|
|
|
|
|
|
}, |
51
|
|
|
|
|
|
|
respond => sub { |
52
|
|
|
|
|
|
|
my $root = shift; |
53
|
|
|
|
|
|
|
convert_ListOrdersResult($root); |
54
|
|
|
|
|
|
|
return $root; |
55
|
|
|
|
|
|
|
}; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
define_api_method GetOrder => |
58
|
|
|
|
|
|
|
service => "$orders_service", |
59
|
|
|
|
|
|
|
version => $version, |
60
|
|
|
|
|
|
|
parameters => { |
61
|
|
|
|
|
|
|
AmazonOrderId => { |
62
|
|
|
|
|
|
|
required => 1, |
63
|
|
|
|
|
|
|
type => 'IdList', |
64
|
|
|
|
|
|
|
}, |
65
|
|
|
|
|
|
|
}, |
66
|
|
|
|
|
|
|
respond => sub { |
67
|
|
|
|
|
|
|
my $root = shift; |
68
|
|
|
|
|
|
|
convert_ListOrdersResult($root); |
69
|
|
|
|
|
|
|
return $root; |
70
|
|
|
|
|
|
|
}; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
define_api_method ListOrderItems => |
73
|
|
|
|
|
|
|
service => "$orders_service", |
74
|
|
|
|
|
|
|
version => $version, |
75
|
|
|
|
|
|
|
parameters => { |
76
|
|
|
|
|
|
|
AmazonOrderId => { |
77
|
|
|
|
|
|
|
required => 1, |
78
|
|
|
|
|
|
|
type => 'string', |
79
|
|
|
|
|
|
|
}, |
80
|
|
|
|
|
|
|
}, |
81
|
|
|
|
|
|
|
respond => sub { |
82
|
|
|
|
|
|
|
my $root = shift; |
83
|
|
|
|
|
|
|
convert_ListOrderItemsResult($root); |
84
|
|
|
|
|
|
|
return $root; |
85
|
|
|
|
|
|
|
}; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
define_api_method ListOrderItemsByNextToken => |
88
|
|
|
|
|
|
|
service => "$orders_service", |
89
|
|
|
|
|
|
|
version => $version, |
90
|
|
|
|
|
|
|
parameters => { |
91
|
|
|
|
|
|
|
NextToken => { |
92
|
|
|
|
|
|
|
type => 'string', |
93
|
|
|
|
|
|
|
required => 1, |
94
|
|
|
|
|
|
|
}, |
95
|
|
|
|
|
|
|
}, |
96
|
|
|
|
|
|
|
respond => sub { |
97
|
|
|
|
|
|
|
my $root = shift; |
98
|
|
|
|
|
|
|
convert_ListOrderItemsResult($root); |
99
|
|
|
|
|
|
|
return $root; |
100
|
|
|
|
|
|
|
}; |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub convert_ListOrdersResult { |
103
|
0
|
|
|
0
|
0
|
|
my $root = shift; |
104
|
0
|
|
|
|
|
|
Amazon::MWS::Routines::force_array($root->{Orders}, 'Order'); |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
sub convert_ListOrderItemsResult { |
108
|
|
|
|
|
|
|
|
109
|
0
|
|
|
0
|
0
|
|
my $root = shift; |
110
|
0
|
|
|
|
|
|
Amazon::MWS::Routines::force_array($root->{OrderItems}, 'OrderItem'); |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
1; |