Package com.clover.sdk.v3.payments
Class BatchTransactions
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.BatchTransactions
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class BatchTransactions extends GenericParcelable implements Validator, JSONifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
BatchTransactions.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<BatchTransactions>
CREATOR
static JSONifiable.Creator<BatchTransactions>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description BatchTransactions()
Constructs a new empty instance.protected
BatchTransactions(boolean noInit)
Constructs a new empty instance.BatchTransactions(BatchTransactions src)
Constructs a new instance that is a deep copy of the source instance.BatchTransactions(String json)
Constructs a new instance from the given JSON String.BatchTransactions(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
clearCreditIds()
Clears the 'creditIds' field, the 'has' method for this field will now return falsevoid
clearPaymentIds()
Clears the 'paymentIds' field, the 'has' method for this field will now return falsevoid
clearRefundIds()
Clears the 'refundIds' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.BatchTransactions
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.List<String>
getCreditIds()
List of credits in the batchprotected 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<String>
getPaymentIds()
List of payments in the batchList<String>
getRefundIds()
List of refunds in the batchboolean
hasCreditIds()
Checks whether the 'creditIds' field has been set, however the value could be nullboolean
hasPaymentIds()
Checks whether the 'paymentIds' field has been set, however the value could be nullboolean
hasRefundIds()
Checks whether the 'refundIds' field has been set, however the value could be nullboolean
isNotEmptyCreditIds()
Checks whether the 'creditIds' field is set and is not null and is not emptyboolean
isNotEmptyPaymentIds()
Checks whether the 'paymentIds' field is set and is not null and is not emptyboolean
isNotEmptyRefundIds()
Checks whether the 'refundIds' field is set and is not null and is not emptyboolean
isNotNullCreditIds()
Checks whether the 'creditIds' field is set and is not nullboolean
isNotNullPaymentIds()
Checks whether the 'paymentIds' field is set and is not nullboolean
isNotNullRefundIds()
Checks whether the 'refundIds' field is set and is not nullvoid
mergeChanges(BatchTransactions 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.BatchTransactions
setCreditIds(List<String> creditIds)
Sets the field 'creditIds'.BatchTransactions
setPaymentIds(List<String> paymentIds)
Sets the field 'paymentIds'.BatchTransactions
setRefundIds(List<String> refundIds)
Sets the field 'refundIds'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<BatchTransactions> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<BatchTransactions> JSON_CREATOR
-
-
Constructor Detail
-
BatchTransactions
public BatchTransactions()
Constructs a new empty instance.
-
BatchTransactions
protected BatchTransactions(boolean noInit)
Constructs a new empty instance.
-
BatchTransactions
public BatchTransactions(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
BatchTransactions
public BatchTransactions(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.
-
BatchTransactions
public BatchTransactions(BatchTransactions src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
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
-
isNotNullPaymentIds
public boolean isNotNullPaymentIds()
Checks whether the 'paymentIds' field is set and is not null
-
isNotEmptyPaymentIds
public boolean isNotEmptyPaymentIds()
Checks whether the 'paymentIds' field is set and is not null and is not empty
-
isNotNullRefundIds
public boolean isNotNullRefundIds()
Checks whether the 'refundIds' field is set and is not null
-
isNotEmptyRefundIds
public boolean isNotEmptyRefundIds()
Checks whether the 'refundIds' field is set and is not null and is not empty
-
isNotNullCreditIds
public boolean isNotNullCreditIds()
Checks whether the 'creditIds' field is set and is not null
-
isNotEmptyCreditIds
public boolean isNotEmptyCreditIds()
Checks whether the 'creditIds' field is set and is not null and is not empty
-
hasPaymentIds
public boolean hasPaymentIds()
Checks whether the 'paymentIds' field has been set, however the value could be null
-
hasRefundIds
public boolean hasRefundIds()
Checks whether the 'refundIds' field has been set, however the value could be null
-
hasCreditIds
public boolean hasCreditIds()
Checks whether the 'creditIds' field has been set, however the value could be null
-
setPaymentIds
public BatchTransactions setPaymentIds(List<String> paymentIds)
Sets the field 'paymentIds'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setRefundIds
public BatchTransactions setRefundIds(List<String> refundIds)
Sets the field 'refundIds'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setCreditIds
public BatchTransactions setCreditIds(List<String> creditIds)
Sets the field 'creditIds'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
clearPaymentIds
public void clearPaymentIds()
Clears the 'paymentIds' field, the 'has' method for this field will now return false
-
clearRefundIds
public void clearRefundIds()
Clears the 'refundIds' field, the 'has' method for this field will now return false
-
clearCreditIds
public void clearCreditIds()
Clears the 'creditIds' 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 BatchTransactions copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(BatchTransactions src)
Copy all the changed fields from the given source to this instance.
-
-