NAME

Net::Async::Webservice::UPS::Address - an address for UPS

VERSION

version 1.0.7

ATTRIBUTES

city

String with the name of the city, optional.

postal_code

String with the post code of the address, required.

postal_code_extended

String with the extended post code of the address, optional. If a postcode matching \d+-\d+ is passed in to the constructor, the first group of digits is assigned to "postal_code" and the second one to "postal_code_extended".

state

String with the name of the state, optional.

country_code

String with the 2 letter country code, optional (defaults to US).

name

String with the recipient name, optional.

building_name

String with the building name, optional.

address

String with the first line of the address, optional.

address2

String with the second line of address, optional.

address3

String with the third line of the address, optional.

is_residential

Boolean, indicating whether this address is residential. Optional.

quality

This should only be set in objects that are returned as part of a Net::Async::Webservice::UPS::Response::Address. It's a float between 0 and 1 expressing how good a match this address is for the one provided.

METHODS

is_exact_match

True if "quality" is 1. This method exists for compatibility with Net::UPS::Address.

is_very_close_match

True if "quality" is >= 0.95. This method exists for compatibility with Net::UPS::Address.

is_close_match

True if "quality" is >=0.9. This method exists for compatibility with Net::UPS::Address.

is_possible_match

True if "quality" is >= 0.9 (yes, the same as "is_close_match"). This method exists for compatibility with Net::UPS::Address.

is_poor_match

True if "quality" is <= 0.69. This method exists for compatibility with Net::UPS::Address.

as_hash

Returns a hashref that, when passed through XML::Simple, will produce the XML fragment needed in UPS requests to represent this address. Takes one parameter, either 'AV' or 'XAV', to select which representation to use ('XAV' is the "street level validation" variant).

cache_id

Returns a string identifying this address.

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.