Package DE_EPAGES::USPS::API::WebServices::TrackingDeliveryConfirmationLabel
It collects (XML) information required to generate USPS Tracking/Delivery Confirmation Label requests and processed correct responses
Functions
- _sizeIntoInches
- _weightIntoOunces
- callWebService
- feedRequest
- getResponseDeliveryConfirmationNumberOrError
- getResponseLabelBase64CodeOrError
- getResponseLogMessageOrEmpty
- getResponsePostageOrError
- isValidRequestAndInternalConditionsOrError
- isValidResponseOrError
- new
- setContainerTypeOrError
- setCredentials
- setDataFromOrder
- setDataFromShippingLabel
- setDestinationAddress
- setDestinationAddressCleansing
- setLabelDate
- setOriginAddress
- setSenderRecipientMailing
- setServiceTypeOrError
- setSizeInInches
- setSizeOrError
- setWeightInOuncesOrError
_sizeIntoInches
It converts hash dimensions into inches and returns them.
Syntax |
$hSizeInInches = $self->_sizeIntoInches($hSize, $Unit); |
Input |
|
Return |
|
_weightIntoOunces
It converts any weight units into ounces and returns them.
Syntax |
$weightInOunces = $self->_weightIntoOunces($weight, $Unit); |
Input |
|
Return |
|
callWebService
It arranges the log filter and calls the web service through the common interface.
Syntax |
$self->callWebService(); |
feedRequest
It feeds USPS Tracking Delivery Confirmation Label object, ready to use the web service call.
Syntax |
$self->feedRequest($ShippingLabel); |
Input |
|
getResponseDeliveryConfirmationNumberOrError
It checks that the delivery confirmation number node exists for the response and returns the content. It throws an error if no delivery confirmation number can be found.
Syntax |
$number = $self->getResponseDeliveryConfirmationNumberOrError(); |
Return |
|
getResponseLabelBase64CodeOrError
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 |
$base64code = $self->getResponseLabelBase64CodeOrError(); |
Return |
|
getResponseLogMessageOrEmpty
It returns the provided log message attribute of the response or an empty string if no log message can be found.
Syntax |
$logMessage = $self->getResponseLogMessageOrEmpty(); |
Return |
|
getResponsePostageOrError
It checks that the postage node exists for the response and returns the content. It throws an error if no postage can be found.
Syntax |
$postage = $self->getResponsePostageOrError(); |
Return |
|
isValidRequestAndInternalConditionsOrError
It checks validity of the request based on documented (already known) requirements. It returns 1 (true) or throws an error.
Syntax |
$isValid = $self->isValidRequestAndInternalConditionsOrError(); |
Return |
|
isValidResponseOrError
It checks that the response is of Tracking Delivery Confirmation Label API web service type. If it's not, it throws an error.
Syntax |
$isValid = $self->isValidResponseOrError(); |
Return |
|
new
Creates a new Tracking Delivery Confirmation Label object .
Syntax |
$TDCLabel = DE_EPAGES::USPS::API::WebServices::TrackingDeliveryConfirmationLabel->new($ShippingFulfillmentMethod); |
Input |
|
Return |
|
setContainerTypeOrError
It sets the container type into the request XML structure inside the TrackingDeliveryConfirmationLabel object.
Syntax |
$self->setContainerTypeOrError($ContainerType); |
Input |
|
setCredentials
It sets USPS access credentials for Tracking Delivery Confirmation Label web services into XML root node as required by USPS.
Syntax |
$self->setCredentials( $ShippingFulfillmentMethod ); |
Input |
|
setDataFromOrder
It sets order content information into the request XML structure inside the TrackingDeliveryConfirmationLabel object.
Syntax |
$self->setDataFromOrder($Order); |
Input |
|
setDataFromShippingLabel
It sets shipping label content information into the request XML structure inside the TrackingDeliveryConfirmationLabel object.
Syntax |
$self->setDataFromShippingLabel($ShippingLabel); |
Input |
|
setDestinationAddress
It sets destination address into the request XML structure inside the TrackingDeliveryConfirmationLabel object.
Syntax |
$self->setDestinationAddress($DestinationAddress); |
Input |
|
setDestinationAddressCleansing
It sets cleansing allowance or not depending if a validated USPS address was chosen by end customer at checkout process
Syntax |
$self->setDestinationAddressCleansing($IsUSPSSuggestedAddress); |
Input |
|
setLabelDate
If not null date is included, it formats and adds to the LabelDate attribute of the request object.
Syntax |
$self->setLabelDate($pickupDate); |
Input |
|
setOriginAddress
It sets origin address into the request XML structure inside the TrackingDeliveryConfirmationLabel object.
Syntax |
$self->setOriginAddress($OriginAddress); |
Input |
|
setSenderRecipientMailing
If shop and end user addresses have FullName and EMail attributes set, activate USPS mailing service informing about tracking delivery status
Syntax |
$self->setSenderRecipientMailing($OriginAddress, $DestinationAddress); |
Input |
|
setServiceTypeOrError
It sets the service type into the request XML structure inside the TrackingDeliveryConfirmationLabel object.
Syntax |
$self->setServiceTypeOrError($ServiceType); |
Input |
|
setSizeInInches
It sets package size into the request XML structure inside the TrackingDeliveryConfirmationLabel object.
Syntax |
$self->setSizeInInches($hSize, $Unit); |
Input |
|
setSizeOrError
It checks the dimensions of the package and fits the Size XML parameter accordingly. if a size value is passed it bypasses dimensions checking.
Syntax |
$self->setSizeOrError($size); |
Input |
|
setWeightInOuncesOrError
It sets package weight into the request XML structure inside the TrackingDeliveryConfirmationLabel object. It throws an error on incorrect parameters
Syntax |
$self->setWeightInOuncesOrError($weight, $Unit); |
Input |
|