public class CreditResponse extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
CreditResponse.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<CreditResponse> |
CREATOR |
static JSONifiable.Creator<CreditResponse> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
CreditResponse()
Constructs a new empty instance.
|
protected |
CreditResponse(boolean noInit)
Constructs a new empty instance.
|
|
CreditResponse(CreditResponse src)
Constructs a new instance that is a deep copy of the source instance.
|
|
CreditResponse(JSONObject jsonObject)
Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
reflected in this instance and vice-versa.
|
|
CreditResponse(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearClientData()
Clears the 'clientData' field, the 'has' method for this field will now return false
|
void |
clearCredit()
Clears the 'credit' field, the 'has' method for this field will now return false
|
void |
clearRequestSuccessful()
Clears the 'requestSuccessful' field, the 'has' method for this field will now return false
|
void |
clearResponseErrorMessage()
Clears the 'responseErrorMessage' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
CreditResponse |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Map<String,String> |
getClientData()
Additional data sent back from the gateway
|
Credit |
getCredit() |
protected GenericClient |
getGenericClient() |
JSONObject |
getJSONObject()
Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
reflected in this instance and vice-versa.
|
Boolean |
getRequestSuccessful() |
String |
getResponseErrorMessage() |
boolean |
hasClientData()
Checks whether the 'clientData' field has been set, however the value could be null
|
boolean |
hasCredit()
Checks whether the 'credit' field has been set, however the value could be null
|
boolean |
hasRequestSuccessful()
Checks whether the 'requestSuccessful' field has been set, however the value could be null
|
boolean |
hasResponseErrorMessage()
Checks whether the 'responseErrorMessage' field has been set, however the value could be null
|
boolean |
isNotEmptyClientData()
Checks whether the 'clientData' field is set and is not null and is not empty
|
boolean |
isNotNullClientData()
Checks whether the 'clientData' field is set and is not null
|
boolean |
isNotNullCredit()
Checks whether the 'credit' field is set and is not null
|
boolean |
isNotNullRequestSuccessful()
Checks whether the 'requestSuccessful' field is set and is not null
|
boolean |
isNotNullResponseErrorMessage()
Checks whether the 'responseErrorMessage' field is set and is not null
|
void |
mergeChanges(CreditResponse src)
Copy all the changed fields from the given source to this instance.
|
void |
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
|
CreditResponse |
setClientData(Map<String,String> clientData)
Sets the field 'clientData'.
|
CreditResponse |
setCredit(Credit credit)
Sets the field 'credit'.
|
CreditResponse |
setRequestSuccessful(Boolean requestSuccessful)
Sets the field 'requestSuccessful'.
|
CreditResponse |
setResponseErrorMessage(String responseErrorMessage)
Sets the field 'responseErrorMessage'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<CreditResponse> CREATOR
public static final JSONifiable.Creator<CreditResponse> JSON_CREATOR
public CreditResponse()
protected CreditResponse(boolean noInit)
public CreditResponse(String json) throws IllegalArgumentException
IllegalArgumentException
public CreditResponse(JSONObject jsonObject)
public CreditResponse(CreditResponse src)
public Boolean getRequestSuccessful()
public String getResponseErrorMessage()
public Credit getCredit()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullRequestSuccessful()
public boolean isNotNullResponseErrorMessage()
public boolean isNotNullCredit()
public boolean isNotNullClientData()
public boolean isNotEmptyClientData()
public boolean hasRequestSuccessful()
public boolean hasResponseErrorMessage()
public boolean hasCredit()
public boolean hasClientData()
public CreditResponse setRequestSuccessful(Boolean requestSuccessful)
public CreditResponse setResponseErrorMessage(String responseErrorMessage)
public CreditResponse setCredit(Credit credit)
public CreditResponse setClientData(Map<String,String> clientData)
public void clearRequestSuccessful()
public void clearResponseErrorMessage()
public void clearCredit()
public void clearClientData()
public boolean containsChanges()
public void resetChangeLog()
public CreditResponse copyChanges()
public void mergeChanges(CreditResponse src)