public class ApiResponse
extends java.lang.Object
Contains the result code and the error message if any.
Modifier and Type | Field and Description |
---|---|
static int |
RESULT_SUCCESS
The default result code for a successful request
|
Constructor and Description |
---|
ApiResponse(long resultCode,
java.lang.String message)
Creates the ApiResponse.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isSuccessful()
Returns true if the request was successful, false otherwise
|
java.lang.String |
message()
Returns the error message for this ApiResponse
|
long |
resultCode()
Returns the result code for this ApiResponse
|
java.lang.String |
toString()
|
public static final int RESULT_SUCCESS
public ApiResponse(long resultCode, java.lang.String message)
resultCode
- the result code of the responsemessage
- the error message if presentpublic java.lang.String message()
public long resultCode()
public boolean isSuccessful()
public java.lang.String toString()
toString
in class java.lang.Object