line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Async::Webservice::UPS::Types; |
2
|
|
|
|
|
|
|
$Net::Async::Webservice::UPS::Types::VERSION = '1.1.3'; |
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
$Net::Async::Webservice::UPS::Types::DIST = 'Net-Async-Webservice-UPS'; |
5
|
|
|
|
|
|
|
} |
6
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
162
|
|
7
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
265
|
|
8
|
|
|
|
|
|
|
use Type::Library |
9
|
4
|
|
|
|
|
31
|
-base, |
10
|
|
|
|
|
|
|
-declare => qw( PickupType CustomerClassification |
11
|
|
|
|
|
|
|
Cache Cacheable |
12
|
|
|
|
|
|
|
Address Package PackageList |
13
|
|
|
|
|
|
|
Rate RateList |
14
|
|
|
|
|
|
|
RequestMode Service ReturnService |
15
|
|
|
|
|
|
|
ServiceCode ServiceLabel |
16
|
|
|
|
|
|
|
ReturnServiceCode ReturnServiceLabel |
17
|
|
|
|
|
|
|
CreditCardCode CreditCardType |
18
|
|
|
|
|
|
|
PackagingType MeasurementSystem |
19
|
|
|
|
|
|
|
Measure SizeMeasurementUnit WeightMeasurementUnit Currency |
20
|
|
|
|
|
|
|
Tolerance Payment ImageType Image |
21
|
|
|
|
|
|
|
Contact Shipper CreditCard Label |
22
|
|
|
|
|
|
|
ShipmentConfirm PackageResult |
23
|
|
|
|
|
|
|
QVSubscription QVEvent QVFile QVDelivery QVGeneric |
24
|
|
|
|
|
|
|
QVOrigin QVManifest QVPackage QVException QVReference |
25
|
4
|
|
|
4
|
|
17
|
); |
|
4
|
|
|
|
|
4
|
|
26
|
4
|
|
|
4
|
|
18024
|
use Type::Utils -all; |
|
4
|
|
|
|
|
16201
|
|
|
4
|
|
|
|
|
52
|
|
27
|
4
|
|
|
4
|
|
8891
|
use Types::Standard -types; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
31
|
|
28
|
4
|
|
|
4
|
|
12314
|
use Scalar::Util 'weaken'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
315
|
|
29
|
4
|
|
|
4
|
|
2473
|
use namespace::autoclean; |
|
4
|
|
|
|
|
42544
|
|
|
4
|
|
|
|
|
23
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# ABSTRACT: type library for UPS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
enum PickupType, |
35
|
|
|
|
|
|
|
[qw( |
36
|
|
|
|
|
|
|
DAILY_PICKUP |
37
|
|
|
|
|
|
|
DAILY |
38
|
|
|
|
|
|
|
CUSTOMER_COUNTER |
39
|
|
|
|
|
|
|
ONE_TIME_PICKUP |
40
|
|
|
|
|
|
|
ONE_TIME |
41
|
|
|
|
|
|
|
ON_CALL_AIR |
42
|
|
|
|
|
|
|
SUGGESTED_RETAIL |
43
|
|
|
|
|
|
|
SUGGESTED_RETAIL_RATES |
44
|
|
|
|
|
|
|
LETTER_CENTER |
45
|
|
|
|
|
|
|
AIR_SERVICE_CENTER |
46
|
|
|
|
|
|
|
)]; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
enum CustomerClassification, |
50
|
|
|
|
|
|
|
[qw( |
51
|
|
|
|
|
|
|
WHOLESALE |
52
|
|
|
|
|
|
|
OCCASIONAL |
53
|
|
|
|
|
|
|
RETAIL |
54
|
|
|
|
|
|
|
)]; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
enum RequestMode, # there are probably more |
58
|
|
|
|
|
|
|
[qw( |
59
|
|
|
|
|
|
|
rate |
60
|
|
|
|
|
|
|
shop |
61
|
|
|
|
|
|
|
)]; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
enum ServiceCode, |
65
|
|
|
|
|
|
|
[qw( |
66
|
|
|
|
|
|
|
01 |
67
|
|
|
|
|
|
|
02 |
68
|
|
|
|
|
|
|
03 |
69
|
|
|
|
|
|
|
07 |
70
|
|
|
|
|
|
|
08 |
71
|
|
|
|
|
|
|
11 |
72
|
|
|
|
|
|
|
12 |
73
|
|
|
|
|
|
|
12 |
74
|
|
|
|
|
|
|
13 |
75
|
|
|
|
|
|
|
14 |
76
|
|
|
|
|
|
|
54 |
77
|
|
|
|
|
|
|
59 |
78
|
|
|
|
|
|
|
65 |
79
|
|
|
|
|
|
|
86 |
80
|
|
|
|
|
|
|
85 |
81
|
|
|
|
|
|
|
83 |
82
|
|
|
|
|
|
|
82 |
83
|
|
|
|
|
|
|
)]; |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
enum ServiceLabel, |
87
|
|
|
|
|
|
|
[qw( |
88
|
|
|
|
|
|
|
NEXT_DAY_AIR |
89
|
|
|
|
|
|
|
2ND_DAY_AIR |
90
|
|
|
|
|
|
|
GROUND |
91
|
|
|
|
|
|
|
WORLDWIDE_EXPRESS |
92
|
|
|
|
|
|
|
WORLDWIDE_EXPEDITED |
93
|
|
|
|
|
|
|
STANDARD |
94
|
|
|
|
|
|
|
3_DAY_SELECT |
95
|
|
|
|
|
|
|
3DAY_SELECT |
96
|
|
|
|
|
|
|
NEXT_DAY_AIR_SAVER |
97
|
|
|
|
|
|
|
NEXT_DAY_AIR_EARLY_AM |
98
|
|
|
|
|
|
|
WORLDWIDE_EXPRESS_PLUS |
99
|
|
|
|
|
|
|
2ND_DAY_AIR_AM |
100
|
|
|
|
|
|
|
SAVER |
101
|
|
|
|
|
|
|
TODAY_EXPRESS_SAVER |
102
|
|
|
|
|
|
|
TODAY_EXPRESS |
103
|
|
|
|
|
|
|
TODAY_DEDICATED_COURIER |
104
|
|
|
|
|
|
|
TODAY_STANDARD |
105
|
|
|
|
|
|
|
)]; |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
enum PackagingType, |
109
|
|
|
|
|
|
|
[qw( |
110
|
|
|
|
|
|
|
LETTER |
111
|
|
|
|
|
|
|
PACKAGE |
112
|
|
|
|
|
|
|
TUBE |
113
|
|
|
|
|
|
|
UPS_PAK |
114
|
|
|
|
|
|
|
UPS_EXPRESS_BOX |
115
|
|
|
|
|
|
|
UPS_25KG_BOX |
116
|
|
|
|
|
|
|
UPS_10KG_BOX |
117
|
|
|
|
|
|
|
)]; |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
enum CreditCardCode, |
121
|
|
|
|
|
|
|
[qw( |
122
|
|
|
|
|
|
|
01 |
123
|
|
|
|
|
|
|
03 |
124
|
|
|
|
|
|
|
04 |
125
|
|
|
|
|
|
|
05 |
126
|
|
|
|
|
|
|
06 |
127
|
|
|
|
|
|
|
07 |
128
|
|
|
|
|
|
|
08 |
129
|
|
|
|
|
|
|
)]; |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
enum CreditCardType, |
133
|
|
|
|
|
|
|
[qw( |
134
|
|
|
|
|
|
|
AMEX |
135
|
|
|
|
|
|
|
Discover |
136
|
|
|
|
|
|
|
MasterCard |
137
|
|
|
|
|
|
|
Optima |
138
|
|
|
|
|
|
|
VISA |
139
|
|
|
|
|
|
|
Bravo |
140
|
|
|
|
|
|
|
Diners |
141
|
|
|
|
|
|
|
)]; |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
enum MeasurementSystem, |
145
|
|
|
|
|
|
|
[qw( |
146
|
|
|
|
|
|
|
metric |
147
|
|
|
|
|
|
|
english |
148
|
|
|
|
|
|
|
)]; |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
enum SizeMeasurementUnit, |
152
|
|
|
|
|
|
|
[qw( |
153
|
|
|
|
|
|
|
IN |
154
|
|
|
|
|
|
|
CM |
155
|
|
|
|
|
|
|
)]; |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
enum WeightMeasurementUnit, |
159
|
|
|
|
|
|
|
[qw( |
160
|
|
|
|
|
|
|
LBS |
161
|
|
|
|
|
|
|
KGS |
162
|
|
|
|
|
|
|
)]; |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
declare Currency, |
166
|
|
|
|
|
|
|
as Str; |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
declare Measure, |
170
|
|
|
|
|
|
|
as StrictNum, |
171
|
|
|
|
|
|
|
where { $_ >= 0 }, |
172
|
|
|
|
|
|
|
inline_as { |
173
|
|
|
|
|
|
|
my ($constraint, $varname) = @_; |
174
|
|
|
|
|
|
|
my $perlcode = |
175
|
|
|
|
|
|
|
$constraint->parent->inline_check($varname) |
176
|
|
|
|
|
|
|
. "&& ($varname >= 0)"; |
177
|
|
|
|
|
|
|
return $perlcode; |
178
|
|
|
|
|
|
|
}, |
179
|
|
|
|
|
|
|
message { ($_//'<undef>').' is not a valid measure, it must be a non-negative number' }; |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
declare Tolerance, |
183
|
|
|
|
|
|
|
as StrictNum, |
184
|
|
|
|
|
|
|
where { $_ >= 0 && $_ <= 1 }, |
185
|
|
|
|
|
|
|
inline_as { |
186
|
|
|
|
|
|
|
my ($constraint, $varname) = @_; |
187
|
|
|
|
|
|
|
my $perlcode = |
188
|
|
|
|
|
|
|
$constraint->parent->inline_check($varname) |
189
|
|
|
|
|
|
|
. "&& ($varname >= 0 && $varname <= 1)"; |
190
|
|
|
|
|
|
|
return $perlcode; |
191
|
|
|
|
|
|
|
}, |
192
|
|
|
|
|
|
|
message { ($_//'<undef>').' is not a valid tolerance, it must be a number between 0 and 1' }; |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
class_type Address, { class => 'Net::Async::Webservice::UPS::Address' }; |
196
|
|
|
|
|
|
|
coerce Address, from Str, via { |
197
|
|
|
|
|
|
|
require Net::Async::Webservice::UPS::Address; |
198
|
|
|
|
|
|
|
Net::Async::Webservice::UPS::Address->new({postal_code => $_}); |
199
|
|
|
|
|
|
|
}; |
200
|
|
|
|
|
|
|
Address->coercion->freeze; |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
class_type Contact, { class => 'Net::Async::Webservice::UPS::Contact' }; |
204
|
|
|
|
|
|
|
coerce Contact, from Address, via { |
205
|
|
|
|
|
|
|
require Net::Async::Webservice::UPS::Contact; |
206
|
|
|
|
|
|
|
Net::Async::Webservice::UPS::Contact->new({address=>$_}); |
207
|
|
|
|
|
|
|
}; |
208
|
|
|
|
|
|
|
Contact->coercion->freeze; |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
class_type Shipper, { class => 'Net::Async::Webservice::UPS::Shipper' }; |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
class_type Payment, { class => 'Net::Async::Webservice::UPS::Payment' }; |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
class_type CreditCard, { class => 'Net::Async::Webservice::UPS::CreditCard' }; |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
enum ImageType, [qw(EPL ZPL SPL STARPL GIF HTML)]; |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
class_type Image, { class => 'Net::Async::Webservice::UPS::Response::Image' }; |
224
|
|
|
|
|
|
|
coerce Image, from HashRef, via { |
225
|
|
|
|
|
|
|
require Net::Async::Webservice::UPS::Response::Image; |
226
|
|
|
|
|
|
|
Net::Async::Webservice::UPS::Response::Image->from_hash($_); |
227
|
|
|
|
|
|
|
}; |
228
|
|
|
|
|
|
|
Image->coercion->freeze; |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
class_type Label, { class => 'Net::Async::Webservice::UPS::Label' }; |
232
|
|
|
|
|
|
|
coerce Label, from Str, via { |
233
|
|
|
|
|
|
|
require Net::Async::Webservice::UPS::Label; |
234
|
|
|
|
|
|
|
Net::Async::Webservice::UPS::Label->new({ code => $_ }); |
235
|
|
|
|
|
|
|
}; |
236
|
|
|
|
|
|
|
Label->coercion->freeze; |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
class_type Package, { class => 'Net::Async::Webservice::UPS::Package' }; |
240
|
|
|
|
|
|
|
declare PackageList, as ArrayRef[Package]; |
241
|
|
|
|
|
|
|
coerce PackageList, from Package, via { [ $_ ] }; |
242
|
|
|
|
|
|
|
PackageList->coercion->freeze; |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
class_type PackageResult, { class => 'Net::Async::Webservice::UPS::Response::PackageResult' }; |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
class_type Service, { class => 'Net::Async::Webservice::UPS::Service' }; |
249
|
|
|
|
|
|
|
coerce Service, from Str, via { |
250
|
|
|
|
|
|
|
require Net::Async::Webservice::UPS::Service; |
251
|
|
|
|
|
|
|
Net::Async::Webservice::UPS::Service->new({label=>$_}); |
252
|
|
|
|
|
|
|
}; |
253
|
|
|
|
|
|
|
Service->coercion->freeze; |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
class_type ReturnService, { class => 'Net::Async::Webservice::UPS::ReturnService' }; |
257
|
|
|
|
|
|
|
coerce ReturnService, from Str, via { |
258
|
|
|
|
|
|
|
require Net::Async::Webservice::UPS::ReturnService; |
259
|
|
|
|
|
|
|
Net::Async::Webservice::UPS::ReturnService->new({label=>$_}); |
260
|
|
|
|
|
|
|
}; |
261
|
|
|
|
|
|
|
ReturnService->coercion->freeze; |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
enum ReturnServiceCode, |
265
|
|
|
|
|
|
|
[qw( |
266
|
|
|
|
|
|
|
2 |
267
|
|
|
|
|
|
|
3 |
268
|
|
|
|
|
|
|
5 |
269
|
|
|
|
|
|
|
8 |
270
|
|
|
|
|
|
|
9 |
271
|
|
|
|
|
|
|
)]; |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
enum ReturnServiceLabel, |
275
|
|
|
|
|
|
|
[qw( |
276
|
|
|
|
|
|
|
PNM |
277
|
|
|
|
|
|
|
RS1 |
278
|
|
|
|
|
|
|
RS3 |
279
|
|
|
|
|
|
|
ERL |
280
|
|
|
|
|
|
|
PRL |
281
|
|
|
|
|
|
|
)]; |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
class_type Rate, { class => 'Net::Async::Webservice::UPS::Rate' }; |
285
|
|
|
|
|
|
|
declare RateList, as ArrayRef[Rate]; |
286
|
|
|
|
|
|
|
coerce RateList, from Rate, via { [ $_ ] }; |
287
|
|
|
|
|
|
|
RateList->coercion->freeze; |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
class_type ShipmentConfirm, { class => 'Net::Async::Webservice::UPS::Response::ShipmentConfirm' }; |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
class_type QVSubscription, { class => 'Net::Async::Webservice::UPS::QVSubscription' }; |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
class_type QVEvent, { class => 'Net::Async::Webservice::UPS::Response::QV::Event' }; |
295
|
|
|
|
|
|
|
class_type QVFile, { class => 'Net::Async::Webservice::UPS::Response::QV::File' }; |
296
|
|
|
|
|
|
|
class_type QVDelivery, { class => 'Net::Async::Webservice::UPS::Response::QV::Delivery' }; |
297
|
|
|
|
|
|
|
class_type QVGeneric, { class => 'Net::Async::Webservice::UPS::Response::QV::Generic' }; |
298
|
|
|
|
|
|
|
class_type QVOrigin, { class => 'Net::Async::Webservice::UPS::Response::QV::Origin' }; |
299
|
|
|
|
|
|
|
class_type QVManifest, { class => 'Net::Async::Webservice::UPS::Response::QV::Manifest' }; |
300
|
|
|
|
|
|
|
class_type QVPackage, { class => 'Net::Async::Webservice::UPS::Response::QV::Package' }; |
301
|
|
|
|
|
|
|
class_type QVException, { class => 'Net::Async::Webservice::UPS::Response::QV::Exception' }; |
302
|
|
|
|
|
|
|
class_type QVReference, { class => 'Net::Async::Webservice::UPS::Response::QV::Reference' }; |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
duck_type Cache, [qw(get set)]; |
306
|
|
|
|
|
|
|
duck_type Cacheable, [qw(cache_id)]; |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
1; |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
__END__ |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
=pod |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
=encoding UTF-8 |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
=head1 NAME |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
Net::Async::Webservice::UPS::Types - type library for UPS |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
=head1 VERSION |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
version 1.1.3 |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
=head1 DESCRIPTION |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
This L<Type::Library> declares a few type constraints and coercions |
327
|
|
|
|
|
|
|
for use with L<Net::Async::Webservice::UPS>. |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
=head1 TYPES |
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
=head2 C<PickupType> |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
C<E>num, one of C<DAILY_PICKUP> C<DAILY> C<CUSTOMER_COUNTER> |
334
|
|
|
|
|
|
|
C<ONE_TIME_PICKUP> C<ONE_TIME> C<ON_CALL_AIR> C<SUGGESTED_RETAIL> |
335
|
|
|
|
|
|
|
C<SUGGESTED_RETAIL_RATES> C<LETTER_CENTER> C<AIR_SERVICE_CENTER> |
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
=head2 C<CustomerClassification> |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
C<E>num, one of C<WHOLESALE> C<OCCASIONAL> C<RETAIL> |
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
=head2 C<RequestMode> |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
Enum, one of C<rate> C<shop> |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
=head2 C<ServiceCode> |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
Enum, one of C<01> C<02> C<03> C<07> C<08> C<11> C<12> C<12> C<13> |
348
|
|
|
|
|
|
|
C<14> C<54> C<59> C<65> C<86> C<85> C<83> C<82> |
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
=head2 C<ServiceLabel> |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
Enum, one of C<NEXT_DAY_AIR> C<2ND_DAY_AIR> C<GROUND> |
353
|
|
|
|
|
|
|
C<WORLDWIDE_EXPRESS> C<WORLDWIDE_EXPEDITED> C<STANDARD> |
354
|
|
|
|
|
|
|
C<3_DAY_SELECT> C<3DAY_SELECT> C<NEXT_DAY_AIR_SAVER> |
355
|
|
|
|
|
|
|
C<NEXT_DAY_AIR_EARLY_AM> C<WORLDWIDE_EXPRESS_PLUS> C<2ND_DAY_AIR_AM> |
356
|
|
|
|
|
|
|
C<SAVER> C<TODAY_EXPRESS_SAVER> C<TODAY_EXPRESS> |
357
|
|
|
|
|
|
|
C<TODAY_DEDICATED_COURIER> C<TODAY_STANDARD> |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
=head2 C<PackagingType> |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
Enum, one of C<LETTER> C<PACKAGE> C<TUBE> C<UPS_PAK> |
362
|
|
|
|
|
|
|
C<UPS_EXPRESS_BOX> C<UPS_25KG_BOX> C<UPS_10KG_BOX> |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
=head2 C<CreditCardCode> |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
Enum, one of C<01> C<03> C<04> C<05> C<06> C<07> C<08> |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
=head2 C<CreditCardType> |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
Enum, one of C<AMEX> C<Discover> C<MasterCard> C<Optima> C<VISA> |
371
|
|
|
|
|
|
|
C<Bravo> C<Diners>. |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
=head2 C<MeasurementSystem> |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
Enum, one of C<metric> C<english>. |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
=head2 C<SizeMeasurementUnit> |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
Enum, one of C<IN> C<CM> |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
=head2 C<WeightMeasurementUnit> |
382
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
Enum, one of C<LBS> C<KGS> |
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
=head2 C<Currency> |
386
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
String. |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
=head2 C<Measure> |
390
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
Non-negative number. |
392
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
=head2 C<Tolerance> |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
Number between 0 and 1. |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
=head2 C<Address> |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::Address>, with automatic |
400
|
|
|
|
|
|
|
coercion from string (interpreted as a US postal code). |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
=head2 C<Contact> |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::Contact>. |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
=head2 C<Shipper> |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::Shipper>. |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
=head2 C<Payment> |
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::Payment>. |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
=head2 C<CreditCard> |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::CreditCard>. |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
=head2 C<ImageType> |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
Enum, one of C<EPL>, C<ZPL>, C<SPL>, C<STARPL>, C<GIF>, C<HTML>. |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
=head2 C<Image> |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::Response::Image>, with |
425
|
|
|
|
|
|
|
automatic coercion from hashref (via |
426
|
|
|
|
|
|
|
L<Net::Async::Webservice::UPS::Response::Image/from_hash>). |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
=head2 C<Label> |
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::Label>, with automatic |
431
|
|
|
|
|
|
|
coercion from string (interpreted as a label code). |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
=head2 C<Package> |
434
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::Package>. |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
=head2 C<PackageList> |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
Array ref of packages, with automatic coercion from a single package |
440
|
|
|
|
|
|
|
to a singleton array. |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
=head2 C<PackageResult> |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::Response::PackageResult>. |
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
=head2 C<Service> |
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::Service>, with automatic |
449
|
|
|
|
|
|
|
coercion from string (interpreted as a service label). |
450
|
|
|
|
|
|
|
|
451
|
|
|
|
|
|
|
=head2 C<ReturnService> |
452
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::ReturnService>, with automatic |
454
|
|
|
|
|
|
|
coercion from string (interpreted as a service label). |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
=head2 C<ReturnServiceCode> |
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
Enum, one of C<2> C<3> C<5> C<8> C<9> |
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
=head2 C<ReturnServiceLabel> |
461
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
Enum, one of C<PNM> C<RS1> C<RS3> C<ERL> C<PRL> |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
=head2 C<Rate> |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::Rate>. |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
=head2 C<RateList> |
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
Array ref of rates, with automatic coercion from a single rate to a |
471
|
|
|
|
|
|
|
singleton array. |
472
|
|
|
|
|
|
|
|
473
|
|
|
|
|
|
|
=head2 C<ShipmentConfirm> |
474
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
Instance of L<Net::Async::Webservice::UPS::Response::ShipmentConfirm>. |
476
|
|
|
|
|
|
|
|
477
|
|
|
|
|
|
|
=head2 C<Cache> |
478
|
|
|
|
|
|
|
|
479
|
|
|
|
|
|
|
Duck type, any object with a C<get> and a C<set> method. |
480
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
=head2 C<Cacheable> |
482
|
|
|
|
|
|
|
|
483
|
|
|
|
|
|
|
Duck type, any object with a C<cache_id> method. |
484
|
|
|
|
|
|
|
|
485
|
|
|
|
|
|
|
=head1 AUTHORS |
486
|
|
|
|
|
|
|
|
487
|
|
|
|
|
|
|
=over 4 |
488
|
|
|
|
|
|
|
|
489
|
|
|
|
|
|
|
=item * |
490
|
|
|
|
|
|
|
|
491
|
|
|
|
|
|
|
Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> |
492
|
|
|
|
|
|
|
|
493
|
|
|
|
|
|
|
=item * |
494
|
|
|
|
|
|
|
|
495
|
|
|
|
|
|
|
Sherzod B. Ruzmetov <sherzodr@cpan.org> |
496
|
|
|
|
|
|
|
|
497
|
|
|
|
|
|
|
=back |
498
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
500
|
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>. |
502
|
|
|
|
|
|
|
|
503
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
504
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
=cut |