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

Package DE_EPAGES::USPS::API::WebServices::PackagePickupSchedule

It collects (XML) information required to generate USPS Package Pickup Schedule requests and processed correct responses

Functions

callWebService
feedRequest
getAddress2OrError
getCarrierRouteOrEmpty
getCityOrError
getConfirmationNumberOrEmpty
getCountTypeOrEmpty
getDateOrEmpty
getDayOfWeekOrEmpty
getEmailAddressOrEmpty
getEstimatedWeightOrEmpty
getExtensionOrEmpty
getFirmNameOrEmpty
getFirstNameOrEmpty
getLastNameOrEmpty
getPackageLocationOrEmpty
getPackageOrEmpty
getPhoneOrEmpty
getServiceTypeOrEmpty
getSpecialInstructionsOrEmpty
getStateOrError
getSuiteOrAptOrEmpty
getUrbanizationOrEmpty
getZipcode4OrEmpty
getZipcode5OrError
isValidResponseOrError
new
setAddress
setCredentials
setPackageLocationOrError
setPickupSettings
setServiceTypeOrError
setWeightInOunces

callWebService

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

Syntax
$self->callWebService();

feedRequest

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

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

getAddress2OrError

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
self->getAddress2OrError(  );
Return
$Address2 (String)
Street atribute string

getCarrierRouteOrEmpty

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
getCarrierRouteOrEmpty(  );
Return
$CarrierRoute (String)
Carrier Route (can be C for City, H for Highway, R for Rural)

getCityOrError

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
self->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
self->getConfirmationNumberOrEmpty(  );
Return
$ConfirmationNumber (String)
Confirmation number for pickup

getCountTypeOrEmpty

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
self->getCountTypeOrEmpty(  );
Return
$Count (String)
Number of packages

getDateOrEmpty

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
self->getDateOrEmpty(  );
Return
$Date (String)
First day available for pickup

getDayOfWeekOrEmpty

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
self->getDayOfWeekOrEmpty(  );
Return
$DayOfWeek (String)
First day of the week available for pickup

getEmailAddressOrEmpty

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
self->getEmailAddressOrEmpty(  );
Return
$EmailAddress (String)
Email Address for pickup

getEstimatedWeightOrEmpty

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
self->getEstimatedWeightOrEmpty(  );
Return
$EstimatedWeight (String)
Estimated Weight of the parcel for pickup

getExtensionOrEmpty

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
self->getExtensionOrEmpty(  );
Return
$Extension (String)
Extension atribute string

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
$self->getFirmNameOrEmpty(  );
Return
$FirmName (String)
Company atribute string

getFirstNameOrEmpty

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
$self->getFirstNameOrEmpty(  );
Return
$FirstName (String)
FirstName atribute string

getLastNameOrEmpty

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
$self->getLastNameOrEmpty(  );
Return
$LastName (String)
LastName atribute string

getPackageLocationOrEmpty

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
self->getPackageLocationOrEmpty(  );
Return
$PackageLocation (String)
Location of the parcel for pickup

getPackageOrEmpty

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
self->getPackageOrEmpty(  );
Return
@Package (String)
Kind of package

getPhoneOrEmpty

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
self->getPhoneOrEmpty(  );
Return
$Phone (String)
Phone atribute string

getServiceTypeOrEmpty

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
self->getServiceTypeOrEmpty(  );
Return
$ServiceType (String)
Kind of package

getSpecialInstructionsOrEmpty

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
self->getSpecialInstructionsOrEmpty(  );
Return
$SpecialInstructions (String)
Instructions for pickup

getStateOrError

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
self->getStateOrError(  );
Return
$State (String)
State atribute string

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
self->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
self->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
self->getZipcode4OrEmpty(  );
Return
$Zipcode4 (String)
Zipcode4 atribute string

getZipcode5OrError

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
self->getZipcode5OrError(  );
Return
$Zipcode (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 Schedule object .

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

setAddress

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

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

setCredentials

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

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

setPackageLocationOrError

It sets the PAckage location into the request XML structure inside the PackagePickupSchedule object.

Syntax
$self->setPackageLocationOrError($PackageLocation);
Input
$PackageLocation (object)
PackageLocation object

setPickupSettings

It sets the pickup settings into the request XML structure inside the PackagePickupSchedule object.

Syntax
$self->setPickupSettings($ShippingLabel);
Input
$ShippingLabel (object)
ShippingLabel object

setServiceTypeOrError

It sets the service type into the request XML structure inside the PackagePickupSchedule object.

Syntax
$self->setServiceTypeOrError($ShippingFulfillmentProduct);
Input
$ShippingFulfillmentProduct (object)
ShippingFulfillmentProduct object

setWeightInOunces

It sets package weight in pounds into the request XML structure inside the PackagePickupSchedule object.

Syntax
$self->setWeightInOunces($weight, $Unit);
Input
$weight (float)
weight value
$Unit (object)
Unit of Measure object