| 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
| |||||||||||
| 30 | return { | ||||||||||
| 31 | customer_context => $hashref->{Response}{TransactionReference}{CustomerContext}, | ||||||||||
| 32 | 18 | ▶ | ( $hashref->{Response}{Error} ? (warnings => $hashref->{Response}{Error}) : () ), | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | } | ||||||||||
| 34 | } | ||||||||||
| 35 | else { | ||||||||||
| 36 | 0 | return $hashref; | |||||||||
| 37 | } | ||||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 5 | 1; | |||||||||
| 41 | |||||||||||
| 42 | __END__ | ||||||||||