ePages 7.19.0 - DE_EPAGES/SIA/API/Registration/ResponseParser.pm

Package DE_EPAGES::SIA::API::Registration::ResponseParser

Class to parse the SIA response files.

Functions

parseContentLine
parseFile

parseContentLine

Parses a single SIA non-header response line.

Syntax
$ResponseParser->parseContentLine($Line);
Example
$ResponseParser->parseContentLine('0001444a0a5f55dIMN01ACEN000100010046e46341de7d7Max Mustermann.....');
Input
$Line (string)
A single SIA non-header response line
Return
(ref.hash
E.g.:
$VAR1 = {
'ErrorCode' => '000R',
'WorkOrderID' => '2e6372e1a82'
};)
Hash ref containing the WorkOrderID and ErrorCode of the response.

parseFile

Parses and returns all registration response entries from a SIA response file.

Syntax
$ResponseParser->parseFile($FilePath);
Example
$ResponseParser->parseFile('/tmp/O3XsUI3WGk/SIACNP01.FTPSORTB.ACEN.20161006.100006.txt');
Input
$FilePath (string)
Path to the SIA response file to parse
Return
(ref.hash.hash)
Hash ref of hash refs that contain the important values from the
response. Key: WorkOrderID concatenated with FilePath,
value: other values from the line