Package com.clover.common.payments
Class VoidExtraData
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.common.payments.VoidExtraData
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class VoidExtraData extends GenericParcelable implements Validator, JSONifiable
This used to be a genearted class and its a part of avro-internal schema. The main purpose of this class is to serve as a conduit so that we can add any new objects or data without changing the internal void api's. As of the creation of this object we were only sending the TerminalManagementComponent which was a part of internal package. So the avsc file was created in avro-internal schema. As of this update we wanted to add voidReasonDetails which has more details about why we are trying to void a transaction this is defined in the external schema. We have a seperate task to move all the TerminalManagement details out of the internal schema into external schema. Waiting for that task to complete or making that change as part of this change since is not possible since its a pretty big change. That is the reason we are making this class as a manual.Fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
VoidExtraData.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<VoidExtraData>
CREATOR
static JSONifiable.Creator<VoidExtraData>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description VoidExtraData()
Constructs a new empty instance.protected
VoidExtraData(boolean noInit)
Constructs a new empty instance.VoidExtraData(VoidExtraData src)
Constructs a new instance that is a deep copy of the source instance.VoidExtraData(String json)
Constructs a new instance from the given JSON String.VoidExtraData(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
clearTerminalManagementComponents()
Clears the 'terminalManagementComponents' field, the 'has' method for this field will now return falsevoid
clearVoidReasonDetails()
Clears the 'voidReasonDetails' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.VoidExtraData
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.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.List<TerminalManagementComponent>
getTerminalManagementComponents()
VoidReasonDetails
getVoidReasonDetails()
boolean
hasTerminalManagementComponents()
Checks whether the 'terminalManagementComponents' field has been set, however the value could be nullboolean
hasVoidReasonDetails()
Checks whether the 'voidReasonDetails' field has been set, however the value could be nullboolean
isNotEmptyTerminalManagementComponents()
Checks whether the 'terminalManagementComponents' field is set and is not null and is not emptyboolean
isNotNullTerminalManagementComponents()
Checks whether the 'terminalManagementComponents' field is set and is not nullboolean
isNotNullVoidReasonDetails()
Checks whether the 'voidReasonDetails' field is set and is not nullvoid
mergeChanges(VoidExtraData 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.VoidExtraData
setTerminalManagementComponents(List<TerminalManagementComponent> terminalManagementComponents)
Sets the field 'terminalManagementComponents'.VoidExtraData
setVoidReasonDetails(VoidReasonDetails voidReasonDetails)
Sets the field 'voidReasonDetails'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<VoidExtraData> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<VoidExtraData> JSON_CREATOR
-
-
Constructor Detail
-
VoidExtraData
public VoidExtraData()
Constructs a new empty instance.
-
VoidExtraData
protected VoidExtraData(boolean noInit)
Constructs a new empty instance.
-
VoidExtraData
public VoidExtraData(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
VoidExtraData
public VoidExtraData(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.
-
VoidExtraData
public VoidExtraData(VoidExtraData src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getTerminalManagementComponents
public List<TerminalManagementComponent> getTerminalManagementComponents()
-
getVoidReasonDetails
public VoidReasonDetails getVoidReasonDetails()
-
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
-
isNotNullTerminalManagementComponents
public boolean isNotNullTerminalManagementComponents()
Checks whether the 'terminalManagementComponents' field is set and is not null
-
isNotEmptyTerminalManagementComponents
public boolean isNotEmptyTerminalManagementComponents()
Checks whether the 'terminalManagementComponents' field is set and is not null and is not empty
-
isNotNullVoidReasonDetails
public boolean isNotNullVoidReasonDetails()
Checks whether the 'voidReasonDetails' field is set and is not null
-
hasTerminalManagementComponents
public boolean hasTerminalManagementComponents()
Checks whether the 'terminalManagementComponents' field has been set, however the value could be null
-
hasVoidReasonDetails
public boolean hasVoidReasonDetails()
Checks whether the 'voidReasonDetails' field has been set, however the value could be null
-
setTerminalManagementComponents
public VoidExtraData setTerminalManagementComponents(List<TerminalManagementComponent> terminalManagementComponents)
Sets the field 'terminalManagementComponents'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setVoidReasonDetails
public VoidExtraData setVoidReasonDetails(VoidReasonDetails voidReasonDetails)
Sets the field 'voidReasonDetails'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
clearTerminalManagementComponents
public void clearTerminalManagementComponents()
Clears the 'terminalManagementComponents' field, the 'has' method for this field will now return false
-
clearVoidReasonDetails
public void clearVoidReasonDetails()
Clears the 'voidReasonDetails' 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 VoidExtraData copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(VoidExtraData src)
Copy all the changed fields from the given source to this instance.
-
-