Package DE_EPAGES::USPS::API::WebServices::PackagePickupAvailability
It collects (XML) information required to generate USPS Package Pickup Availability requests and processed correct responses
Functions
- callWebService
- feedRequest
- getAddress2OrError
- getCarrierRouteOrEmpty
- getCityOrError
- getDateOrEmpty
- getDayOfWeekOrEmpty
- getFirmNameOrEmpty
- getStateOrError
- getSuiteOrAptOrEmpty
- getUrbanizationOrEmpty
- getZipcode4OrEmpty
- getZipcode5OrError
- isValidResponseOrError
- new
- setAddress
- setCredentials
- setPickUpDateOrError
callWebService
It arranges the log filter and calls the web service through the common interface.
Syntax |
$self->callWebService(); |
feedRequest
It feeds USPS PickupAvailabilityObject object, ready to use the web service call.
Syntax |
$self->feedRequest($ShippingLabel); |
Input |
|
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 |
|
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 |
|
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 |
|
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 |
getDateOrEmpty( ); |
Return |
|
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 |
getDayOfWeekOrEmpty( ); |
Return |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
new
Creates a new Package Pickup Availability object .
Syntax |
$PackagePickupAvailability = DE_EPAGES::USPS::API::WebServices::PackagePickupAvailability->new(); |
Input |
|
Return |
|
setAddress
It sets origin address into the request XML structure inside the PackagePickupAvailability object.
Syntax |
$self->setAddress($OriginAddress); |
Input |
|
setCredentials
It sets USPS access credentials for Package Pickup Availability web services into XML root node as required by USPS.
Syntax |
$self->setCredentials($Username, $Password); |
Input |
|
setPickUpDateOrError
It sets the PickUp Date into the request XML structure inside the PackagePickupAvailability object.
Syntax |
$self->setPickUpDateOrError($PickUpDate); |
Input |
|