public class GigyaApiResponse extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
INVALID_VALUE |
static int |
OK |
| Constructor and Description |
|---|
GigyaApiResponse(java.lang.String json) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
asJson()
Get JSON formatted of the current response.
|
boolean |
contains(java.lang.String key)
Check if response parameters contains a specific key.
|
boolean |
containsNested(java.lang.String key)
Check if response parameters contains a specific nested key.
|
java.lang.String |
getCallId()
Get response callId.
|
int |
getErrorCode()
Get response error code.
|
java.lang.String |
getErrorDetails()
Get response error details if exists.
|
<T> T |
getField(java.lang.String key,
java.lang.Class<T> clazz)
Type field optional getter.
|
Gson |
getGson() |
int |
getStatusCode()
Get response status code
|
java.lang.String |
getStatusReason()
Get response status reason if exists.
|
java.lang.String |
getTime()
Get response time.
|
<T> T |
parseTo(java.lang.Class<T> clazz)
Optional parsing of the current response with generic given type.
|
public static final int INVALID_VALUE
public static final int OK
public GigyaApiResponse(java.lang.String json)
public Gson getGson()
public java.lang.String asJson()
public <T> T parseTo(java.lang.Class<T> clazz)
clazz - Requested type for parsing.public boolean contains(java.lang.String key)
key - Required key for evaluation.public boolean containsNested(java.lang.String key)
key - Required key for evaluation.public <T> T getField(java.lang.String key, java.lang.Class<T> clazz)
key - Requested parameter key.clazz - Required parsed object type.public int getStatusCode()
public int getErrorCode()
public java.lang.String getErrorDetails()
public java.lang.String getStatusReason()
public java.lang.String getCallId()
public java.lang.String getTime()