NAME

Net::Async::Webservice::UPS::Package - a package for UPS

VERSION

version 1.0.6

ATTRIBUTES

packaging_type

Type of packaging (see "PackagingType" in Net::Async::Webservice::UPS::Types), defaults to PACKAGE.

linear_unit

Either CM or IN, required.

You can either pass this attribute directly, or use the measurement_system shortcut constructor parameter: if you pass measurement_system => 'english', linear_unit will be assumed to be IN; if you pass measurement_system => 'metric', it will be assumed to be CM.

length

Length of the package, in centimeters or inches depending on "linear_unit".

width

Width of the package, in centimeters or inches depending on "linear_unit".

height

Height of the package, in centimeters or inches depending on "linear_unit".

weight

Weight of the package, in kilograms or pounds depending on "weight_unit".

id

Optional string, may be used to link package-level response parts to the packages in a request.

METHODS

weight_unit

Either KGS or LBS, required.

You can either pass this attribute directly, or use the measurement_system shortcut constructor parameter: if you pass measurement_system => 'english', weight_unit will be assumed to be LBS; if you pass measurement_system => 'metric', it will be assumed to be KGS.

as_hash

Returns a hashref that, when passed through XML::Simple, will produce the XML fragment needed in UPS requests to represent this package.

is_oversized

Returns an integer indicating whether this package is to be considered "oversized", and if so, in which oversize class it fits.

Mostly used internally by "as_hash".

cache_id

Returns a string identifying this package.

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.