public class BatchTransactions extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
BatchTransactions.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<BatchTransactions> |
CREATOR |
static JSONifiable.Creator<BatchTransactions> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
BatchTransactions()
Constructs a new empty instance.
|
|
BatchTransactions(BatchTransactions src)
Constructs a new instance that is a deep copy of the source instance.
|
protected |
BatchTransactions(boolean noInit)
Constructs a new empty instance.
|
|
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(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCreditIds()
Clears the 'creditIds' field, the 'has' method for this field will now return false
|
void |
clearPaymentIds()
Clears the 'paymentIds' field, the 'has' method for this field will now return false
|
void |
clearRefundIds()
Clears the 'refundIds' field, the 'has' method for this field will now return false
|
boolean |
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 batch
|
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<String> |
getPaymentIds()
List of payments in the batch
|
List<String> |
getRefundIds()
List of refunds in the batch
|
boolean |
hasCreditIds()
Checks whether the 'creditIds' field has been set, however the value could be null
|
boolean |
hasPaymentIds()
Checks whether the 'paymentIds' field has been set, however the value could be null
|
boolean |
hasRefundIds()
Checks whether the 'refundIds' field has been set, however the value could be null
|
boolean |
isNotEmptyCreditIds()
Checks whether the 'creditIds' field is set and is not null and is not empty
|
boolean |
isNotEmptyPaymentIds()
Checks whether the 'paymentIds' field is set and is not null and is not empty
|
boolean |
isNotEmptyRefundIds()
Checks whether the 'refundIds' field is set and is not null and is not empty
|
boolean |
isNotNullCreditIds()
Checks whether the 'creditIds' field is set and is not null
|
boolean |
isNotNullPaymentIds()
Checks whether the 'paymentIds' field is set and is not null
|
boolean |
isNotNullRefundIds()
Checks whether the 'refundIds' field is set and is not null
|
void |
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() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<BatchTransactions> CREATOR
public static final JSONifiable.Creator<BatchTransactions> JSON_CREATOR
public BatchTransactions()
protected BatchTransactions(boolean noInit)
public BatchTransactions(String json) throws IllegalArgumentException
IllegalArgumentException
public BatchTransactions(JSONObject jsonObject)
public BatchTransactions(BatchTransactions src)
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullPaymentIds()
public boolean isNotEmptyPaymentIds()
public boolean isNotNullRefundIds()
public boolean isNotEmptyRefundIds()
public boolean isNotNullCreditIds()
public boolean isNotEmptyCreditIds()
public boolean hasPaymentIds()
public boolean hasRefundIds()
public boolean hasCreditIds()
public BatchTransactions setPaymentIds(List<String> paymentIds)
public BatchTransactions setRefundIds(List<String> refundIds)
public BatchTransactions setCreditIds(List<String> creditIds)
public void clearPaymentIds()
public void clearRefundIds()
public void clearCreditIds()
public boolean containsChanges()
public void resetChangeLog()
public BatchTransactions copyChanges()
public void mergeChanges(BatchTransactions src)