ePages 6.17.35 - DE_EPAGES/Chronopost/API/Tools.pm

Package DE_EPAGES::Chronopost::API::Tools

This package provides the Chronopost global functionality.

@EXPORT_OK
GetLabelImagePath
IsValidAddressCountry
GetErrorType

Functions

GetErrorType
GetLabelImagePath
IsValidAddressCountry

GetErrorType

returns the correct error message from an error id

Syntax
$errorMsg = GetErrorType($errorID);
Example
my $errorMsg = GetErrorType($errorID);
Input
#ErrorCode
string
Return
(string)
#errorType

GetLabelImagePath

returns the path for the barcode image of a shipping label

Syntax
$Path = GetLabelImagePath($ShippingLabel,$FileExtension);
Example
my $Path  = GetLabelImagePath($ShippingLabel,'gif');
Input
#ShippingLabel (object)
shipping label object
#FileExtension (string)
image file extension
Return
#Path (string)
path and image name

IsValidAddressCountry

checks if the shipping address is usable

Syntax
$IsAllowed = IsValidAddressCountry($Address);
Example
my $IsAllowed  = IsValidAddressCountry($Address);
Input
#Address (object)
address object
Return
#Value (boolean)
1 or 0