ePages 7.3.0 - DE_EPAGES/USPS/API/WebServices/PackagePickupCancel.pm

Package DE_EPAGES::USPS::API::WebServices::PackagePickupCancel

It collects (XML) information required to generate USPS Package Pickup Cancel requests and processes responses

Functions

callWebService
feedRequest
getAddress2OrError
getCityOrError
getConfirmationNumberOrEmpty
getFirmNameOrEmpty
getStateOrError
getStatusOrEmpty
getSuiteOrAptOrEmpty
getUrbanizationOrEmpty
getZipcode4OrEmpty
getZipcode5OrError
isValidResponseOrError
new
setAddress
setConfirmationNumber
setCredentials

callWebService

It arranges the log filter and calls the web service through the common interface.

Syntax
$self->callWebService();

feedRequest

It feeds USPS PackagePickupCancel object, ready to use the web service call.

Syntax
$self->feedRequest($ShippingLabel);
Input
$ShippingLabel (object)
Shipping label object

getAddress2OrError

It checks that the label node exists for the response and returns the content. It throws an error if no label can be found.

Syntax
getAddress2OrError(  );
Return
$Address2 (String)
Street atribute string

getCityOrError

It checks that the label node exists for the response and returns the content. It throws an error if no label can be found.

Syntax
getCityOrError(  );
Return
$City (String)
City atribute string

getConfirmationNumberOrEmpty

It checks that the response is of APItag type, that the node name exists for the response and returns the content. It returns an empty string if no node can be found.

Syntax
getConfirmationNumberOrEmpty(  );
Return
$ConfirmationNumber (String)
Confirmation number scheduled previously

getFirmNameOrEmpty

It checks that the response is of APItag type, that the node name exists for the response and returns the content. It returns an empty string if no node can be found.

Syntax
getFirmNameOrEmpty(  );
Return
$FirmName (String)
Company atribute string

getStateOrError

It checks that the label node exists for the response and returns the content. It throws an error if no label can be found.

Syntax
getStateOrError(  );
Return
$State (String)
State atribute string

getStatusOrEmpty

It checks that the response is of APItag type, that the node name exists for the response and returns the content. It returns an empty string if no node can be found.

Syntax
getStatusOrEmpty(  );
Return
$Status (String)
Status of request to cancel

getSuiteOrAptOrEmpty

It checks that the response is of APItag type, that the node name exists for the response and returns the content. It returns an empty string if no node can be found.

Syntax
getSuiteOrAptOrEmpty(  );
Return
$SuiteOrApt (String)
Suite or Apartment address atribute string

getUrbanizationOrEmpty

It checks that the response is of APItag type, that the node name exists for the response and returns the content. It returns an empty string if no node can be found.

Syntax
getUrbanizationOrEmpty(  );
Return
$Urbanization (String)
Urbanization atribute string

getZipcode4OrEmpty

It checks that the response is of APItag type, that the node name exists for the response and returns the content. It returns an empty string if no node can be found.

Syntax
getZipcode4OrEmpty(  );
Return
$Zipcode4 (String)
Zipcode4 atribute string

getZipcode5OrError

It checks that the label node exists for the response and returns the content. It throws an error if no label can be found.

Syntax
getZipcode5OrError(  );
Return
$Zipcode5 (String)
Zipcode5 atribute string

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 Package Pickup Cancel object.

Syntax
$PackagePickupCancel = DE_EPAGES::USPS::API::WebServices::PackagePickupCancel->new();
Input
$ShippingFulfillmentMethod (object)
ShippingFulfillmentMethod object
$Client (object)
Remote Client object -only used for mocking-
Return
$PPC (object)
PackagePickupCancel object

setAddress

It sets origin address into the request XML structure inside the PackagePickupCancel object.

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

setConfirmationNumber

It sets USPS Confirmation Number for Package Pickup Cancel web services into XML root node as required by USPS.

Syntax
$self->setConfirmationNumber();
Input
$PetitionNumber (String)
Petition Number

setCredentials

It sets USPS access credentials for Package Pickup Cancel web services into XML root node as required by USPS.

Syntax
$self->setCredentials($Username, $Password);
Input
$Username (object)
User credential for the Package Pickup Availability WS
$Password (object)
Password credential for the Package Pickup Availability WS