UPS/Response.pm

filter: Statementstmt 95.0% 19 / 20 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 89.6% 26 / 29 CC 3 SCAR 7.2
CC
3
Cov
92%
BUILDARGS
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« UPS/Response/Utils.pm ↑ Summary UPS/Response/ShipmentConfirm.pm »
1 package Net::Async::Webservice::UPS::Response;
2 5 $Net::Async::Webservice::UPS::Response::VERSION = '1.1.4';
3 {
4 5 $Net::Async::Webservice::UPS::Response::DIST = 'Net-Async-Webservice-UPS';
5 }
6 5 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use Types::Standard qw(Str HashRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 # ABSTRACT: base class with fields common to all UPS responses
11  
12  
13 5 has customer_context => (
14 is => 'ro',
15 isa => Str,
16 );
17  
18  
19 5 has warnings => (
20 is => 'ro',
21 isa => HashRef,
22 required => 0,
23 );
24  
25 18 ▶sub BUILDARGS {
Subroutine BUILDARGS: called CC=3 SCAR=11.3
Pod undocumented
26 18 my ($class,@etc) = @_;
27  
28 18 my $hashref = $class->next::method(@etc);
29 18 ▶ if ($hashref->{Response}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($hashref->{'Response'}) { } 18 0 18
30 return {
31 customer_context => $hashref->{Response}{TransactionReference}{CustomerContext},
32 18 ▶ ( $hashref->{Response}{Error} ? (warnings => $hashref->{Response}{Error}) : () ),
Branch: 1 branch
BranchTrueFalseTotal
$hashref->{'Response'}{'Error'} ? : 3 15 18
33 }
34 }
35 else {
36 0 return $hashref;
37 }
38 }
39  
40 5 1;
41  
42 __END__
« UPS/Response/Utils.pm ↑ Summary UPS/Response/ShipmentConfirm.pm »