NAME

Net::Async::Webservice::UPS::Service - shipment service from UPS

VERSION

version 1.0.4

DESCRIPTION

Instances of this class describe a particular shipping service. They can be used as parameter to "request_rate" in Net::Async::Webservice::UPS, and are also used inside Net::Async::Webservice::UPS::Response::Rate, as returned by that same method.

ATTRIBUTES

code

UPS service code, see "ServiceCode" in Net::Async::Webservice::UPS::Types. If you construct an object passing only "label", the code corresponding to that label will be used.

label

UPS service label, see "ServiceLabel" in Net::Async::Webservice::UPS::Types. If you construct an object passing only "code", the label corresponding to that code will be used.

total_charges

If thes service has been returned by request_rate, this is the total charges for the shipment, equal to the sum of total_charges of all the rates in "rates".

rates

If thes service has been returned by request_rate, this is a arrayref of Net::Async::Webservice::UPS::Rate for each package.

rated_packages

If thes service has been returned by request_rate, this is a arrayref of Net::Async::Webservice::UPS::Package holding the rated packages.

guaranteed_days

If thes service has been returned by request_rate, this is number of guaranteed days in transit.

METHODS

name

Returns the "label", with underscores replaced by spaces.

cache_id

Returns a string identifying this service.

FUNCTIONS

label_for_code

my $label = Net::Async::Webservice::UPS::Service::label_for_code($code);

Not a method. Returns the UPS service label string for the given service code.

AUTHORS

  • Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>

  • Sherzod B. Ruzmetov <sherzodr@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.