| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# ============================================================================ |
|
2
|
|
|
|
|
|
|
package Business::UPS::Tracking::Element::ReferenceNumber; |
|
3
|
|
|
|
|
|
|
# ============================================================================ |
|
4
|
1
|
|
|
1
|
|
4860
|
use utf8; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
9
|
|
|
5
|
1
|
|
|
1
|
|
1027
|
use 5.0100; |
|
|
1
|
|
|
|
|
6
|
|
|
|
1
|
|
|
|
|
259
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
1722
|
use Moose; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Business::UPS::Tracking::Utils; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=encoding utf8 |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 NAME |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Business::UPS::Tracking::Element::ReferenceNumber - A reference number |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
This class represents a reference number. Usually it is created |
|
20
|
|
|
|
|
|
|
automatically from a L<Business::UPS::Tracking::Shipment> object. |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 ACCESSORS |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head2 xml |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Original L<XML::LibXML::Node> node. |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 Code |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Reference number types. |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
For small package available options are: |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=over 3 |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=item * 28 - Purchase Order No. |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item * 33 - Model Number |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=item * 34 - Part Number |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=item * 35 - Serial Number |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=item * 50 - Department Number |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=item * 51 - Store Number |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=item * 54 - FDA Product Code |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item * 55 - Acct. Rec. Customer Acct. |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=item * 56 - Appropriation Number |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item * 57 - Bill of Lading Number |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item * 59 - Invoice Number |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=item * 60 - Manifest Key Number |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item * 61- Dealer Order Number |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=item * 62 - Production Code |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item * 63 - Purchase Req. Number |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item * 64 - Salesperson Number |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item * 67 - Transaction Ref. No. |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item * RZ - RMA |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item * 9V - COD Number |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=back |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
For freight available options are: |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=over 3 |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item * BL |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * PO |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=back |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 Value |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Reference number as supplied by the customer |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=cut |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
has 'xml' => ( |
|
93
|
|
|
|
|
|
|
is => 'rw', |
|
94
|
|
|
|
|
|
|
isa => 'XML::LibXML::Node', |
|
95
|
|
|
|
|
|
|
required => 1, |
|
96
|
|
|
|
|
|
|
trigger => \&_build_referencenumber, |
|
97
|
|
|
|
|
|
|
); |
|
98
|
|
|
|
|
|
|
has 'Code' => ( |
|
99
|
|
|
|
|
|
|
is => 'rw', |
|
100
|
|
|
|
|
|
|
isa => 'Str', |
|
101
|
|
|
|
|
|
|
); |
|
102
|
|
|
|
|
|
|
has 'Value' => ( |
|
103
|
|
|
|
|
|
|
is => 'rw', |
|
104
|
|
|
|
|
|
|
isa => 'Str', |
|
105
|
|
|
|
|
|
|
); |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
our %DESCRIPTION = ( |
|
108
|
|
|
|
|
|
|
'28' => 'Purchase Order No.', |
|
109
|
|
|
|
|
|
|
'33' => 'Model Number', |
|
110
|
|
|
|
|
|
|
'34' => 'Part Number', |
|
111
|
|
|
|
|
|
|
'35' => 'Serial Number', |
|
112
|
|
|
|
|
|
|
'50' => 'Department Number', |
|
113
|
|
|
|
|
|
|
'51' => 'Store Number', |
|
114
|
|
|
|
|
|
|
'54' => 'FDA Product Code', |
|
115
|
|
|
|
|
|
|
'55' => 'Acct. Rec. Customer Acct.', |
|
116
|
|
|
|
|
|
|
'56' => 'Appropriation Number', |
|
117
|
|
|
|
|
|
|
'57' => 'Bill of Lading Number', |
|
118
|
|
|
|
|
|
|
'59' => 'Invoice Number', |
|
119
|
|
|
|
|
|
|
'60' => 'Manifest Key Number', |
|
120
|
|
|
|
|
|
|
'61' => 'Dealer Order Number', |
|
121
|
|
|
|
|
|
|
'62' => 'Production Code', |
|
122
|
|
|
|
|
|
|
'63' => 'Purchase Req. Number', |
|
123
|
|
|
|
|
|
|
'64' => 'Salesperson Number', |
|
124
|
|
|
|
|
|
|
'67' => 'Transaction Ref. No.', |
|
125
|
|
|
|
|
|
|
'RZ' => 'RMA', |
|
126
|
|
|
|
|
|
|
'9V' => 'COD Number', |
|
127
|
|
|
|
|
|
|
'BL' => 'BL', |
|
128
|
|
|
|
|
|
|
'PO' => 'PO', |
|
129
|
|
|
|
|
|
|
); |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
sub _build_referencenumber { |
|
133
|
|
|
|
|
|
|
my ( $self, $xml ) = @_; |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
$self->Code( $xml->findvalue('Code') ); |
|
136
|
|
|
|
|
|
|
$self->Value( $xml->findvalue('Value') ); |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
return; |
|
139
|
|
|
|
|
|
|
} |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head1 METHODS |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head2 printall |
|
144
|
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Returns the serialized object content |
|
146
|
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |
|
148
|
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
sub printall { |
|
150
|
|
|
|
|
|
|
my ($self) = @_; |
|
151
|
|
|
|
|
|
|
return $self->Value; |
|
152
|
|
|
|
|
|
|
} |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=head2 Description |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
Returns the description for the current reference number code. |
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=cut |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
sub Description { |
|
161
|
|
|
|
|
|
|
my ($self) = @_; |
|
162
|
|
|
|
|
|
|
my $code = $self->Code; |
|
163
|
|
|
|
|
|
|
return $DESCRIPTION{$code} |
|
164
|
|
|
|
|
|
|
if (exists $DESCRIPTION{$code}); |
|
165
|
|
|
|
|
|
|
return 'Unspecified'; |
|
166
|
|
|
|
|
|
|
} |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
sub serialize { |
|
169
|
|
|
|
|
|
|
my ($self) = @_; |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
return $self->Value; |
|
172
|
|
|
|
|
|
|
} |
|
173
|
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=head2 meta |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
Moose meta method |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=cut |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
181
|
|
|
|
|
|
|
no Moose; |
|
182
|
|
|
|
|
|
|
1; |