| 1 | package Net::Async::Webservice::UPS::Response::ShipmentConfirm; | ||||||||||
| 2 | 5 | $Net::Async::Webservice::UPS::Response::ShipmentConfirm::VERSION = '1.1.4'; | |||||||||
| 3 | { | ||||||||||
| 4 | 5 | $Net::Async::Webservice::UPS::Response::ShipmentConfirm::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 ArrayRef); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 5 | ▶ | use Net::Async::Webservice::UPS::Types qw(:types); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 5 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 5 | extends 'Net::Async::Webservice::UPS::Response::ShipmentBase'; | |||||||||
| 12 | |||||||||||
| 13 | # ABSTRACT: UPS response to a ShipConfirm request | ||||||||||
| 14 | |||||||||||
| 15 | |||||||||||
| 16 | 5 | has shipment_digest => ( | |||||||||
| 17 | is => 'ro', | ||||||||||
| 18 | isa => Str, | ||||||||||
| 19 | required => 1, | ||||||||||
| 20 | ); | ||||||||||
| 21 | |||||||||||
| 22 | |||||||||||
| 23 | 5 | has packages => ( | |||||||||
| 24 | is => 'ro', | ||||||||||
| 25 | isa => ArrayRef[Package], | ||||||||||
| 26 | required => 1, | ||||||||||
| 27 | ); | ||||||||||
| 28 | |||||||||||
| 29 | 3 | ▶ | sub BUILDARGS { | ||||||||
|
Subroutine
BUILDARGS: called CC=3 SCAR=12.3
Pod
undocumented
| |||||||||||
| 30 | 3 | my ($class,$hashref) = @_; | |||||||||
| 31 | 0 | ▶ | if (@_>2) { shift; $hashref={@_} }; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | |||||||||||
| 33 | 3 | my $ret = $class->next::method($hashref); | |||||||||
| 34 | |||||||||||
| 35 | 3 | ▶ | if ($hashref->{BillingWeight}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | |||||||||||
| 37 | 3 | my $weight = $hashref->{BillingWeight}; | |||||||||
| 38 | 3 | my $charges = $hashref->{ShipmentCharges}; | |||||||||
| 39 | |||||||||||
| 40 | return { | ||||||||||
| 41 | %$ret, | ||||||||||
| 42 | unit => $weight->{UnitOfMeasurement}{Code}, | ||||||||||
| 43 | billing_weight => $weight->{Weight}, | ||||||||||
| 44 | currency => $charges->{TotalCharges}{CurrencyCode}, | ||||||||||
| 45 | service_option_charges => $charges->{ServiceOptionsCharges}{MonetaryValue}, | ||||||||||
| 46 | transportation_charges => $charges->{TransportationCharges}{MonetaryValue}, | ||||||||||
| 47 | total_charges => $charges->{TotalCharges}{MonetaryValue}, | ||||||||||
| 48 | shipment_digest => $hashref->{ShipmentDigest}, | ||||||||||
| 49 | shipment_identification_number => $hashref->{ShipmentIdentificationNumber}, | ||||||||||
| 50 | packages => $hashref->{packages}, | ||||||||||
| 51 | 3 | }; | |||||||||
| 52 | } | ||||||||||
| 53 | else { | ||||||||||
| 54 | 0 | return $ret; | |||||||||
| 55 | } | ||||||||||
| 56 | } | ||||||||||
| 57 | |||||||||||
| 58 | 5 | 1; | |||||||||
| 59 | |||||||||||
| 60 | __END__ | ||||||||||