Net::UPS::Address - Shipping address class
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);
Net::UPS::Address is a class representing a shipping address. Valid address attributes are city, state, postal_code, country_code and is_residential.
city
state
postal_code
country_code
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.
quality
In addition to accessor methods documented above, following convenience methods are provided.
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.
Validates the address by submitting itself to US Address Validation service. For this method to work Net::UPS singleton needs to be created first.
For support and licensing information refer to Net::UPS
To install Net::UPS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::UPS
CPAN shell
perl -MCPAN -e shell install Net::UPS
For more information on module installation, please visit the detailed CPAN module installation guide.