ePages 7.0.0 - DE_EPAGES/DHLIntraship/API/Tools.pm

Package DE_EPAGES::DHLIntraship::API::Tools

Useful functions for this cartridge.

Functions

GetCustomerNumber
GetPackageType
IsDateInThePast
new
truncateAttribute

GetCustomerNumber

Gets Customer Number.

Syntax
GetCustomerNumber( $ShippingFulfillmentMethod, $Address );
Input
$ShippingFulfillmentMethod (object)
ShippingFulfillmentMethodDHLIntraship
$Address (object)
Address
Return
$CustomerNumber (string)
CustomerNumber

GetPackageType

Obtains package type.

Syntax
GetPackageType( $CustomerNumber );
Input
$CustomerNumber (string)
CustomerNumber
Return
$PackageType (string)
Package Type

IsDateInThePast

Finds out whether a date is in the past or not.

Syntax
IsDateInThePast( $Date );
Input
$Date (DateTime)
Date
Return
$IsDateInThePast (boolean)
Whether a date is in the past or not.

new

Class constructor.

Syntax
new( );
Return
$self (object)
self

truncateAttribute

Truncates an attribute to its maximum allowed length.

Syntax
truncateAttribute( $Attribute, $FieldName );
Input
$Attribute (String)
Attribute to truncate.
$FieldName (String)
Name of the field to truncate.
Return
$TruncatedAttribute (object)
Truncated attribute.