ePages 6.17.39 - DE_EPAGES/USPS/API/WebServices/AddressInformation.pm

Package DE_EPAGES::USPS::API::WebServices::AddressInformation

It will verify the correctness of the US address entered by the user

Functions

getAddressesOrEmpty
isValidResponseOrError
new
setAddress
setCredentials

getAddressesOrEmpty

Description

Syntax
getAddressesOrEmpty(  );
Return
$Addresses (refarray)
Array of possible addresses

isValidResponseOrError

It checks that the response is of Address Informattion API web service type. If it's not, it throws an error.

Syntax
$isValid = $self->isValidResponseOrError();
Return
(boolean)
$isValid

new

Creates a new Address Information object .

Syntax
$AddressInfo = DE_EPAGES::USPS::API::WebServices::AddressInformation->new();
Input
$ShippingFulfillmentMethod (object)
ShippingFulfillmentMethod object
$Client (object)
Client object
Return
$AddressInfo (object)
Address Information object

setAddress

It sets the address into the request XML structure inside the AddressInformation object.

Syntax
$self->setAddress($Address);
Input
$Address (object)
Address object

setCredentials

It sets USPS access credentials for Address Information web services into XML root node as required by USPS.

Syntax
$self->setCredentials();
Input
$Username (string)
username string