Package com.clover.sdk.v3.payments
Class CreditResponse
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.CreditResponse
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class CreditResponse extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.Fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CreditResponse.Constraints
-
Nested classes/interfaces inherited from interface com.clover.sdk.JSONifiable
JSONifiable.Creator<T>
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<CreditResponse>
CREATOR
static JSONifiable.Creator<CreditResponse>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor 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(String json)
Constructs a new instance from the given JSON String.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearClientData()
Clears the 'clientData' field, the 'has' method for this field will now return falsevoid
clearCredit()
Clears the 'credit' field, the 'has' method for this field will now return falsevoid
clearRequestSuccessful()
Clears the 'requestSuccessful' field, the 'has' method for this field will now return falsevoid
clearResponseErrorMessage()
Clears the 'responseErrorMessage' field, the 'has' method for this field will now return falseboolean
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 gatewayCredit
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 nullboolean
hasCredit()
Checks whether the 'credit' field has been set, however the value could be nullboolean
hasRequestSuccessful()
Checks whether the 'requestSuccessful' field has been set, however the value could be nullboolean
hasResponseErrorMessage()
Checks whether the 'responseErrorMessage' field has been set, however the value could be nullboolean
isNotEmptyClientData()
Checks whether the 'clientData' field is set and is not null and is not emptyboolean
isNotNullClientData()
Checks whether the 'clientData' field is set and is not nullboolean
isNotNullCredit()
Checks whether the 'credit' field is set and is not nullboolean
isNotNullRequestSuccessful()
Checks whether the 'requestSuccessful' field is set and is not nullboolean
isNotNullResponseErrorMessage()
Checks whether the 'responseErrorMessage' field is set and is not nullvoid
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()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<CreditResponse> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<CreditResponse> JSON_CREATOR
-
-
Constructor Detail
-
CreditResponse
public CreditResponse()
Constructs a new empty instance.
-
CreditResponse
protected CreditResponse(boolean noInit)
Constructs a new empty instance.
-
CreditResponse
public CreditResponse(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
CreditResponse
public 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
public CreditResponse(CreditResponse src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getRequestSuccessful
public Boolean getRequestSuccessful()
-
getResponseErrorMessage
public String getResponseErrorMessage()
-
getCredit
public Credit getCredit()
-
getGenericClient
protected GenericClient getGenericClient()
- Specified by:
getGenericClient
in classGenericParcelable
-
getJSONObject
public 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.- Specified by:
getJSONObject
in interfaceJSONifiable
-
isNotNullRequestSuccessful
public boolean isNotNullRequestSuccessful()
Checks whether the 'requestSuccessful' field is set and is not null
-
isNotNullResponseErrorMessage
public boolean isNotNullResponseErrorMessage()
Checks whether the 'responseErrorMessage' field is set and is not null
-
isNotNullCredit
public boolean isNotNullCredit()
Checks whether the 'credit' field is set and is not null
-
isNotNullClientData
public boolean isNotNullClientData()
Checks whether the 'clientData' field is set and is not null
-
isNotEmptyClientData
public boolean isNotEmptyClientData()
Checks whether the 'clientData' field is set and is not null and is not empty
-
hasRequestSuccessful
public boolean hasRequestSuccessful()
Checks whether the 'requestSuccessful' field has been set, however the value could be null
-
hasResponseErrorMessage
public boolean hasResponseErrorMessage()
Checks whether the 'responseErrorMessage' field has been set, however the value could be null
-
hasCredit
public boolean hasCredit()
Checks whether the 'credit' field has been set, however the value could be null
-
hasClientData
public boolean hasClientData()
Checks whether the 'clientData' field has been set, however the value could be null
-
setRequestSuccessful
public CreditResponse setRequestSuccessful(Boolean requestSuccessful)
Sets the field 'requestSuccessful'.
-
setResponseErrorMessage
public CreditResponse setResponseErrorMessage(String responseErrorMessage)
Sets the field 'responseErrorMessage'.
-
setCredit
public CreditResponse setCredit(Credit credit)
Sets the field 'credit'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setClientData
public CreditResponse setClientData(Map<String,String> clientData)
Sets the field 'clientData'.
-
clearRequestSuccessful
public void clearRequestSuccessful()
Clears the 'requestSuccessful' field, the 'has' method for this field will now return false
-
clearResponseErrorMessage
public void clearResponseErrorMessage()
Clears the 'responseErrorMessage' field, the 'has' method for this field will now return false
-
clearCredit
public void clearCredit()
Clears the 'credit' field, the 'has' method for this field will now return false
-
clearClientData
public void clearClientData()
Clears the 'clientData' field, the 'has' method for this field will now return false
-
containsChanges
public boolean containsChanges()
Returns true if this instance has any changes.
-
resetChangeLog
public void resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
-
copyChanges
public CreditResponse copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(CreditResponse src)
Copy all the changed fields from the given source to this instance.
-
-