ResponseTemplate
HEXONET ResponseTemplate
Table of Contents
- $hash : array<string|int, mixed>
- hash representation of plain API response
- $raw : string
- plain API response
- __construct() : mixed
- Constructor
- getCode() : int
- Get API response code
- getDescription() : string
- Get API response description
- getHash() : array<string|int, mixed>
- Get API response as Hash
- getPlain() : string
- Get Plain API response
- getQueuetime() : float
- Get Queuetime of API response
- getRuntime() : float
- Get Runtime of API response
- isError() : bool
- Check if current API response represents an error case API response code is an 5xx code
- isPending() : bool
- Check if current operation is returned as pending
- isSuccess() : bool
- Check if current API response represents a success case API response code is an 2xx code
- isTmpError() : bool
- Check if current API response represents a temporary error case API response code is an 4xx code
Properties
$hash
hash representation of plain API response
protected
array<string|int, mixed>
$hash
$raw
plain API response
protected
string
$raw
Methods
__construct()
Constructor
public
__construct(string $raw) : mixed
Parameters
- $raw : string
-
plain API response
Return values
mixed —getCode()
Get API response code
public
getCode() : int
Return values
int —API response code
getDescription()
Get API response description
public
getDescription() : string
Return values
string —API response description
getHash()
Get API response as Hash
public
getHash() : array<string|int, mixed>
Return values
array<string|int, mixed> —API response hash
getPlain()
Get Plain API response
public
getPlain() : string
Return values
string —Plain API response
getQueuetime()
Get Queuetime of API response
public
getQueuetime() : float
Return values
float —Queuetime of API response
getRuntime()
Get Runtime of API response
public
getRuntime() : float
Return values
float —Runtime of API response
isError()
Check if current API response represents an error case API response code is an 5xx code
public
isError() : bool
Return values
bool —boolean result
isPending()
Check if current operation is returned as pending
public
isPending() : bool
Return values
bool —result
isSuccess()
Check if current API response represents a success case API response code is an 2xx code
public
isSuccess() : bool
Return values
bool —boolean result
isTmpError()
Check if current API response represents a temporary error case API response code is an 4xx code
public
isTmpError() : bool
Return values
bool —result