ePages 6.11.0 - DE_EPAGES/ExternalShipping/API/Object/ShippingLabel.pm

Package DE_EPAGES::ExternalShipping::API::Object::ShippingLabel

object interface for ShippingLabel.

Base
DE_EPAGES::Order::API::Object::OrderDocument

Functions

addToShippingOrder
className
dbPackage
deleteFromShippingOrder
generateTrackingLink
getCalculatedTotalWeight
isTotalWeightCalculated
isValid
issueLabelByHand
issueLabelWithTracking
validateLabel

addToShippingOrder

Adds shipping label to Shipping Order

Syntax
$Label->addToShippingOrder();

className

Returns the class name, used for DAL access.

Syntax
$ClassName = $ShippingLabel->className;
Return
$ClassName (String)
class name

dbPackage

Returns the database package, used for DAL access.

Syntax
$DbPackage = $ShippingLabel->dbPackage;
Return
$DbPackage (String)
database package name

deleteFromShippingOrder

Deletes shipping label from Shipping Order

Syntax
$Label->deleteFromShippingOrder();

generateTrackingLink

generates tracking link. Implement in child classes.

Syntax
$Label->generateTrackingLink();

getCalculatedTotalWeight

Returns calculated weight based on lineitems in shipping label.

Syntax
$ShippingLabel->getCalculatedTotalWeight( );
Return
$TotalWeight (float)
calculated weight (unit:shippinglabel.weightunit)

isTotalWeightCalculated

Checks if $ShippingLabel->get('TotalWeight') equals $ShippingLabel->calculatedTotalWeight(). If that's the case total weight can be recalculated when lineitems are changed.

Syntax
$ShippingLabel->isTotalWeightCalculated();
Return
$IsEquals (boolean)
true if total weight is calculated

isValid

Returns true if shipping label is completely configured and ready for sending in shipping order. Implementations should save the results of $Label->validateLabel() and return this value here. Non-Webservice implementations may check the existance of all mandatory fields.

Syntax
$Label->isValid();
Return
$IsValid (boolean)
true if shipping label is valid

issueLabelByHand

Sets label to Issued and removes it from ShippingOrder if issued "by hand"

Syntax
$Label->issueLabelByHand();

issueLabelWithTracking

Sets label to Issued and adds tracking information, if implemented by generateTrackingLink.

Syntax
$Label->issueLabelWithTracking($TrackingID);

validateLabel

Does validation for one shipping label. Has to be implemented in child class, e.g. by calling a webservice.

Syntax
$Label->validateLabel();