Package DE_EPAGES::SEUR::API::Tools
This package provides the SEUR global functionality.
@EXPORT_OK |
Functions
- AlphanumSubstring
- AreMandatoryShippingFieldsSet
- CountryPhonePrefix
- GetLabelImagePath
- GetTransactionImagePath
- LastPhone9Digits
- SetPlainHashDefined
- ToIso
- ToUtf
AlphanumSubstring
It returns first/last $length alphanumeric characters from a string.
Syntax |
$subString = AlphanumSubstring($string, $length, $startTermination; |
Input |
|
Return |
|
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 |
|
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 |
|