line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Async::Webservice::UPS::Shipper; |
2
|
|
|
|
|
|
|
$Net::Async::Webservice::UPS::Shipper::VERSION = '1.1.2'; |
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
$Net::Async::Webservice::UPS::Shipper::DIST = 'Net-Async-Webservice-UPS'; |
5
|
|
|
|
|
|
|
} |
6
|
3
|
|
|
3
|
|
1628
|
use Moo; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
18
|
|
7
|
3
|
|
|
3
|
|
865
|
use 5.010; |
|
3
|
|
|
|
|
16
|
|
|
3
|
|
|
|
|
117
|
|
8
|
3
|
|
|
3
|
|
14
|
use Types::Standard qw(Str); |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
33
|
|
9
|
3
|
|
|
3
|
|
1852
|
use Net::Async::Webservice::UPS::Types ':types'; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
29
|
|
10
|
|
|
|
|
|
|
extends 'Net::Async::Webservice::UPS::Contact'; |
11
|
3
|
|
|
3
|
|
12574
|
use namespace::autoclean; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
24
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# ABSTRACT: a contact with an account number |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has account_number => ( |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
isa => Str, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub as_hash { |
23
|
0
|
|
|
0
|
1
|
|
my ($self,$shape) = @_; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my $ret = $self->next::method($shape); |
26
|
0
|
0
|
|
|
|
|
if ($self->account_number) { |
27
|
0
|
|
|
|
|
|
$ret->{ShipperNumber} = $self->account_number; |
28
|
|
|
|
|
|
|
} |
29
|
0
|
|
|
|
|
|
return $ret; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub cache_id { |
34
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
0
|
|
|
|
return join ':', |
37
|
|
|
|
|
|
|
($self->account_number||''), |
38
|
|
|
|
|
|
|
$self->address->cache_id; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=pod |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=encoding UTF-8 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 NAME |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Net::Async::Webservice::UPS::Shipper - a contact with an account number |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 VERSION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
version 1.1.2 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
A shipper is eithre the originator of a shipment, or someone to whose |
60
|
|
|
|
|
|
|
account the shipment is billed. This class subclasses |
61
|
|
|
|
|
|
|
L<Net::Async::Webservice::UPS::Contact> and adds the |
62
|
|
|
|
|
|
|
L</account_number> field. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 C<account_number> |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Optional string, the UPS account number for this shipper. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 METHODS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 C<as_hash> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Returns a hashref that, when passed through L<XML::Simple>, will |
75
|
|
|
|
|
|
|
produce the XML fragment needed in UPS requests to represent this |
76
|
|
|
|
|
|
|
shipper. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 C<cache_id> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Returns a string identifying this shipper. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHORS |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=over 4 |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item * |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item * |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Sherzod B. Ruzmetov <sherzodr@cpan.org> |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=back |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
This software is copyright (c) 2014 by Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
101
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=cut |