NAME

Net::UPS::Address - Shipping address class

SYNOPSIS

use Net::UPS::Address;
$address = Net::UPS::Address->new();
$address->city("Pittsburgh");
$address->state("PA");
$address->postal_code("15228");
$address->country_code("US");
$address->is_residential(1);

DESCRIPTION

Net::UPS::Address is a class representing a shipping address. Valid address attributes are city, state, postal_code, country_code and is_residential.

If address was run through Address Validation Service, additional attribute quality will be set to a floating point number between 0 and 1, inclusively, that represent the quality of match.

METHODS

In addition to accessor methods documented above, following convenience methods are provided.

is_match()
is_very_close_match()
is_close_match()
is_possible_match()
is_poor_match()

When address is returned from Address Validation Service, above attributes can be consulted to find out the quality of the match. tolerance threshold for the above attributes are 0, 0.5, 0.10, 0.30 and 1.0 respectively.

validate()
validate(\%args)

Validates the address by submitting itself to US Address Validation service. For this method to work Net::UPS singleton needs to be created first.

AUTHOR AND LICENSING

For support and licensing information refer to Net::UPS