Package DE_EPAGES::SEUR::API::Tools
This package provides the SEUR global functionality.
@EXPORT_OK |
Functions
- AreMandatoryShippingFieldsSet
- CountryPhonePrefix
- GetLabelImagePath
- GetTransactionImagePath
- alphanumSubstring
- lastPhone9Digits
- setPlainHashDefined
- toIso
- toUtf
AreMandatoryShippingFieldsSet
checks all required fields are mandatory in the shop
Syntax |
$IsAllowed = AreMandatoryShippingFieldsSet($Shop); |
Example |
my $IsAllowed = AreMandatoryShippingFieldsSet($Shop); |
Input |
|
Return |
|
CountryPhonePrefix
It returns the associate country prefix for a given country code.
Syntax |
$strPrefix = CountryPhonePrefix($countryCode); |
Input |
|
Return |
|
GetLabelImagePath
returns the path for the barcode image of a shipping label
Syntax |
$Path = GetLabelImagePath($ShippingLabel,$FileExtension); |
Example |
my $Path = GetLabelImagePath($ShippingLabel,'gif'); |
Input |
|
Return |
|
GetTransactionImagePath
returns the path for the expedition manifest PDF image of a transaction
Syntax |
$Path = GetTransactionImagePath($Transaction, $FileExtension); |
Example |
my $Path = GetTransactionImagePath($Transaction, 'gif'); |
Input |
|
Return |
|
alphanumSubstring
It returns first/last $length alphanumeric characters from a string.
Syntax |
$subString = alphanumSubstring($string, $length, $startTermination; |
Input |
|
Return |
|
lastPhone9Digits
It returns last 9 digits from an ordered list of possible phone numbers located into the address object.
Syntax |
$phone = lastPhone9Digits($Address); |
Input |
|
Return |
|
setPlainHashDefined
It checks hash items and assigns empty string values to undefined items. (necessary to avoid web service calls failures)
Syntax |
$hDefined = setPlainHashDefined($hash); |
Input |
|
Return |
|
toIso
It encodes strings found into the hash to iso-8859-1 encoding.
Syntax |
$hash = toIso($hash); |
Input |
|
Return |
|
toUtf
It encodes and returns entry strings into utf-8 encoding.
Syntax |
$strOut = toUtf($strIn); |
Input |
|
Return |
|