NAME

Net::UPS::Service - Class representing a UPS service type

SYNOPSIS

$services = $ups->shop_for_rates($from, $to, $package);
unless ( defined $services ) {
    die $ups->errstr;
}
unless ( @$services ) {
    die "There are no services available for your address";
}
print "Following services are available for your address to ship that package:\n";
while (my $service = shift @$services ) {
    printf("%s => \$.2f\n", $service->label, $service->total_charges);
}

DESCRIPTION

Net::UPS::Service represents a single UPS shipping service. In typical programming environment, the only time you will interact with this package is when it's returned from shop_for_rates() method of Net::UPS.

ATTRIBUTES

Following attributes are available in all Services

code()

Two digit service code as used by UPS Online Tools. It is not something useful for an average programmer.

label()

Label assigned by Net::UPS to each service code, to rid programmer of having to have service codes table in front of him the whole time he's coding.

total_charges()

Monetary value of total cost of shipping package(s). If you had multiple packages passed to shop_for_rates() method, then total_charges() is the total of all the rates' total_charges(). Don't get confused!

rates()

An array reference to a list of rates quoted by this service. Amount of rates always equals amount of packages being rated, so there is always only one rate per package. If there was only one package rated, than rates() returns an arrayref with a single Net::UPS::Rate object.

rated_packages()

Reference to a list of packages rated using this service. If there was only one package rated, rated_packages() returns an arrayref containing a single element.

guaranteed_days()

Guaranteed days in transit. You can use this option to calculate the exact date the customer can expect the package delivered.

METHODS