rtldev-middleware-perl-sdk

NAME

WebService::Hexonet::Connector::Response - Library to provide accessibility to API response data.

SYNOPSIS

This module is internally used by the WebService::Hexonet::Connector::APIClient module. To be used in the way:

# specify the used API command (used for the request that responsed with $plain)
$command = {
        COMMAND => 'StatusAccount'
};
# Optionally specify replacements for place holders in static response templates e.g. {CONNECTION_URL}
# see ResponseTemplateManager. This makes of course sense and is handled internally by APIClient automatically.
# When using Repsonse class in unit tests, you could leave this probably out.
$ph = {
    CONNECTION_URL => 'https://api.ispapi.net/api/call.cgi'
};

# specify the API plain-text response (this is just an example that won't fit to the command above)
$plain = "[RESPONSE]\r\nCODE=200\r\nDESCRIPTION=Command completed successfully\r\nEOF\r\n";

# create a new instance by
$r = WebService::Hexonet::Connector::Response->new($plain, $command, $ph);

DESCRIPTION

HEXONET Backend API always responds in plain-text format that needs to get parsed into a useful data structure. This module manages all this: parsing data into hash format, into columns and records. It provides different methods to access the data to fit your needs.

Methods

LICENSE AND COPYRIGHT

This program is licensed under the MIT License.

AUTHOR

HEXONET GmbH