public class Batch extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
Batch.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Batch> |
CREATOR |
static JSONifiable.Creator<Batch> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
Batch()
Constructs a new empty instance.
|
|
Batch(Batch src)
Constructs a new instance that is a deep copy of the source instance.
|
protected |
Batch(boolean noInit)
Constructs a new empty instance.
|
|
Batch(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.
|
|
Batch(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearBatchDetails()
Clears the 'batchDetails' field, the 'has' method for this field will now return false
|
void |
clearBatchDetailsJson()
Clears the 'batchDetailsJson' field, the 'has' method for this field will now return false
|
void |
clearBatchTransactions()
Clears the 'batchTransactions' field, the 'has' method for this field will now return false
|
void |
clearBatchType()
Clears the 'batchType' field, the 'has' method for this field will now return false
|
void |
clearCloseoutTimeDifference()
Clears the 'closeoutTimeDifference' field, the 'has' method for this field will now return false
|
void |
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
|
void |
clearDevices()
Clears the 'devices' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return false
|
void |
clearRapidDepositUrl()
Clears the 'rapidDepositUrl' field, the 'has' method for this field will now return false
|
void |
clearState()
Clears the 'state' field, the 'has' method for this field will now return false
|
void |
clearTotalBatchAmount()
Clears the 'totalBatchAmount' field, the 'has' method for this field will now return false
|
void |
clearTxCount()
Clears the 'txCount' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
Batch |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
BatchDetail |
getBatchDetails()
Details split based on card / employees
|
String |
getBatchDetailsJson()
Json string of COS DB batch.batch_details column
|
BatchTransactions |
getBatchTransactions()
List of payments, refunds, and gift card transaction reference objects in the batch
|
BatchType |
getBatchType() |
Long |
getCloseoutTimeDifference()
Time difference in minutes between expected and actual closeout
|
Long |
getCreatedTime()
Created time of batch
|
String |
getDevices()
List of devices in batch
|
protected GenericClient |
getGenericClient() |
String |
getId() |
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.
|
Long |
getModifiedTime()
Modified time of batch
|
String |
getRapidDepositUrl()
URL pointing to rapid deposit i.e.
|
BatchState |
getState() |
Long |
getTotalBatchAmount()
Total amount closed
|
Long |
getTxCount()
The number of transactions being batched
|
boolean |
hasBatchDetails()
Checks whether the 'batchDetails' field has been set, however the value could be null
|
boolean |
hasBatchDetailsJson()
Checks whether the 'batchDetailsJson' field has been set, however the value could be null
|
boolean |
hasBatchTransactions()
Checks whether the 'batchTransactions' field has been set, however the value could be null
|
boolean |
hasBatchType()
Checks whether the 'batchType' field has been set, however the value could be null
|
boolean |
hasCloseoutTimeDifference()
Checks whether the 'closeoutTimeDifference' field has been set, however the value could be null
|
boolean |
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
|
boolean |
hasDevices()
Checks whether the 'devices' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be null
|
boolean |
hasRapidDepositUrl()
Checks whether the 'rapidDepositUrl' field has been set, however the value could be null
|
boolean |
hasState()
Checks whether the 'state' field has been set, however the value could be null
|
boolean |
hasTotalBatchAmount()
Checks whether the 'totalBatchAmount' field has been set, however the value could be null
|
boolean |
hasTxCount()
Checks whether the 'txCount' field has been set, however the value could be null
|
boolean |
isNotNullBatchDetails()
Checks whether the 'batchDetails' field is set and is not null
|
boolean |
isNotNullBatchDetailsJson()
Checks whether the 'batchDetailsJson' field is set and is not null
|
boolean |
isNotNullBatchTransactions()
Checks whether the 'batchTransactions' field is set and is not null
|
boolean |
isNotNullBatchType()
Checks whether the 'batchType' field is set and is not null
|
boolean |
isNotNullCloseoutTimeDifference()
Checks whether the 'closeoutTimeDifference' field is set and is not null
|
boolean |
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
|
boolean |
isNotNullDevices()
Checks whether the 'devices' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
boolean |
isNotNullRapidDepositUrl()
Checks whether the 'rapidDepositUrl' field is set and is not null
|
boolean |
isNotNullState()
Checks whether the 'state' field is set and is not null
|
boolean |
isNotNullTotalBatchAmount()
Checks whether the 'totalBatchAmount' field is set and is not null
|
boolean |
isNotNullTxCount()
Checks whether the 'txCount' field is set and is not null
|
void |
mergeChanges(Batch 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.
|
Batch |
setBatchDetails(BatchDetail batchDetails)
Sets the field 'batchDetails'.
|
Batch |
setBatchDetailsJson(String batchDetailsJson)
Sets the field 'batchDetailsJson'.
|
Batch |
setBatchTransactions(BatchTransactions batchTransactions)
Sets the field 'batchTransactions'.
|
Batch |
setBatchType(BatchType batchType)
Sets the field 'batchType'.
|
Batch |
setCloseoutTimeDifference(Long closeoutTimeDifference)
Sets the field 'closeoutTimeDifference'.
|
Batch |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
Batch |
setDevices(String devices)
Sets the field 'devices'.
|
Batch |
setId(String id)
Sets the field 'id'.
|
Batch |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
Batch |
setRapidDepositUrl(String rapidDepositUrl)
Sets the field 'rapidDepositUrl'.
|
Batch |
setState(BatchState state)
Sets the field 'state'.
|
Batch |
setTotalBatchAmount(Long totalBatchAmount)
Sets the field 'totalBatchAmount'.
|
Batch |
setTxCount(Long txCount)
Sets the field 'txCount'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<Batch> CREATOR
public static final JSONifiable.Creator<Batch> JSON_CREATOR
public Batch()
protected Batch(boolean noInit)
public Batch(String json) throws IllegalArgumentException
IllegalArgumentException
public Batch(JSONObject jsonObject)
public Batch(Batch src)
public String getId()
public String getRapidDepositUrl()
public Long getTxCount()
public Long getTotalBatchAmount()
public String getDevices()
public BatchState getState()
public BatchType getBatchType()
public Long getCreatedTime()
public Long getModifiedTime()
public Long getCloseoutTimeDifference()
public BatchDetail getBatchDetails()
public BatchTransactions getBatchTransactions()
public String getBatchDetailsJson()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullRapidDepositUrl()
public boolean isNotNullTxCount()
public boolean isNotNullTotalBatchAmount()
public boolean isNotNullDevices()
public boolean isNotNullState()
public boolean isNotNullBatchType()
public boolean isNotNullCreatedTime()
public boolean isNotNullModifiedTime()
public boolean isNotNullCloseoutTimeDifference()
public boolean isNotNullBatchDetails()
public boolean isNotNullBatchTransactions()
public boolean isNotNullBatchDetailsJson()
public boolean hasId()
public boolean hasRapidDepositUrl()
public boolean hasTxCount()
public boolean hasTotalBatchAmount()
public boolean hasDevices()
public boolean hasState()
public boolean hasBatchType()
public boolean hasCreatedTime()
public boolean hasModifiedTime()
public boolean hasCloseoutTimeDifference()
public boolean hasBatchDetails()
public boolean hasBatchTransactions()
public boolean hasBatchDetailsJson()
public Batch setRapidDepositUrl(String rapidDepositUrl)
public Batch setTotalBatchAmount(Long totalBatchAmount)
public Batch setState(BatchState state)
public Batch setCloseoutTimeDifference(Long closeoutTimeDifference)
public Batch setBatchDetails(BatchDetail batchDetails)
public Batch setBatchTransactions(BatchTransactions batchTransactions)
public Batch setBatchDetailsJson(String batchDetailsJson)
public void clearId()
public void clearRapidDepositUrl()
public void clearTxCount()
public void clearTotalBatchAmount()
public void clearDevices()
public void clearState()
public void clearBatchType()
public void clearCreatedTime()
public void clearModifiedTime()
public void clearCloseoutTimeDifference()
public void clearBatchDetails()
public void clearBatchTransactions()
public void clearBatchDetailsJson()
public boolean containsChanges()
public void resetChangeLog()
public Batch copyChanges()
public void mergeChanges(Batch src)