getFormattedbarcode static method
Given a 44 characters long code
, converts and returns a 48 characters long code in FEBRABAN
format.
Implementation
static String getFormattedbarcode(String code) {
code = code.formatOnlyNumbers();
assert(code.length == 44, "Barcode must be 44 characters long.");
return isConcessionary(code)
? _buildConcessionaryBarcode(code)
: _buildBankBarcode(code);
}