public class DeviceCashSummaryRow extends GenericParcelable implements Validator, JSONifiable
Each instance of this represents a summary of cash sales, cash back tendered, cash removed and cash added to a device.
Modifier and Type | Class and Description |
---|---|
static interface |
DeviceCashSummaryRow.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<DeviceCashSummaryRow> |
CREATOR |
static JSONifiable.Creator<DeviceCashSummaryRow> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
DeviceCashSummaryRow()
Constructs a new empty instance.
|
protected |
DeviceCashSummaryRow(boolean noInit)
Constructs a new empty instance.
|
|
DeviceCashSummaryRow(DeviceCashSummaryRow src)
Constructs a new instance that is a deep copy of the source instance.
|
|
DeviceCashSummaryRow(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.
|
|
DeviceCashSummaryRow(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCashAddedAmount()
Clears the 'cashAddedAmount' field, the 'has' method for this field will now return false
|
void |
clearCashBackAmount()
Clears the 'cashBackAmount' field, the 'has' method for this field will now return false
|
void |
clearCashPaymentAmount()
Clears the 'cashPaymentAmount' field, the 'has' method for this field will now return false
|
void |
clearCashRefundedAmount()
Clears the 'cashRefundedAmount' field, the 'has' method for this field will now return false
|
void |
clearCashRemovedAmount()
Clears the 'cashRemovedAmount' field, the 'has' method for this field will now return false
|
void |
clearCashSalesAmount()
Clears the 'cashSalesAmount' field, the 'has' method for this field will now return false
|
void |
clearDevice()
Clears the 'device' field, the 'has' method for this field will now return false
|
void |
clearExpectedDeposit()
Clears the 'expectedDeposit' field, the 'has' method for this field will now return false
|
void |
clearNet()
Clears the 'net' field, the 'has' method for this field will now return false
|
void |
clearNetTips()
Clears the 'netTips' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
DeviceCashSummaryRow |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getCashAddedAmount()
The sum of all amounts transmitted as a cash added event.
|
Long |
getCashBackAmount()
The sum of all amounts transmitted as a cash back event.
|
Long |
getCashPaymentAmount()
The sum of all payment amounts paid with cash.
|
Long |
getCashRefundedAmount()
The sum of all cash refunds and credits.
|
Long |
getCashRemovedAmount()
The sum of all amounts transmitted as a cash removed event.
|
Long |
getCashSalesAmount()
Cash payments minus cash refunded minus cash credited.
|
Reference |
getDevice()
The device that this summary is for.
|
Long |
getExpectedDeposit()
Net minus tips.
|
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.
|
Long |
getNet()
Cash sales plus cash added minus cash removed minus cash back.
|
Long |
getNetTips()
Net of tips for the reporting period as an estimate how much tips would have been paid in cash to the employees.
|
boolean |
hasCashAddedAmount()
Checks whether the 'cashAddedAmount' field has been set, however the value could be null
|
boolean |
hasCashBackAmount()
Checks whether the 'cashBackAmount' field has been set, however the value could be null
|
boolean |
hasCashPaymentAmount()
Checks whether the 'cashPaymentAmount' field has been set, however the value could be null
|
boolean |
hasCashRefundedAmount()
Checks whether the 'cashRefundedAmount' field has been set, however the value could be null
|
boolean |
hasCashRemovedAmount()
Checks whether the 'cashRemovedAmount' field has been set, however the value could be null
|
boolean |
hasCashSalesAmount()
Checks whether the 'cashSalesAmount' field has been set, however the value could be null
|
boolean |
hasDevice()
Checks whether the 'device' field has been set, however the value could be null
|
boolean |
hasExpectedDeposit()
Checks whether the 'expectedDeposit' field has been set, however the value could be null
|
boolean |
hasNet()
Checks whether the 'net' field has been set, however the value could be null
|
boolean |
hasNetTips()
Checks whether the 'netTips' field has been set, however the value could be null
|
boolean |
isNotNullCashAddedAmount()
Checks whether the 'cashAddedAmount' field is set and is not null
|
boolean |
isNotNullCashBackAmount()
Checks whether the 'cashBackAmount' field is set and is not null
|
boolean |
isNotNullCashPaymentAmount()
Checks whether the 'cashPaymentAmount' field is set and is not null
|
boolean |
isNotNullCashRefundedAmount()
Checks whether the 'cashRefundedAmount' field is set and is not null
|
boolean |
isNotNullCashRemovedAmount()
Checks whether the 'cashRemovedAmount' field is set and is not null
|
boolean |
isNotNullCashSalesAmount()
Checks whether the 'cashSalesAmount' field is set and is not null
|
boolean |
isNotNullDevice()
Checks whether the 'device' field is set and is not null
|
boolean |
isNotNullExpectedDeposit()
Checks whether the 'expectedDeposit' field is set and is not null
|
boolean |
isNotNullNet()
Checks whether the 'net' field is set and is not null
|
boolean |
isNotNullNetTips()
Checks whether the 'netTips' field is set and is not null
|
void |
mergeChanges(DeviceCashSummaryRow 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.
|
DeviceCashSummaryRow |
setCashAddedAmount(Long cashAddedAmount)
Sets the field 'cashAddedAmount'.
|
DeviceCashSummaryRow |
setCashBackAmount(Long cashBackAmount)
Sets the field 'cashBackAmount'.
|
DeviceCashSummaryRow |
setCashPaymentAmount(Long cashPaymentAmount)
Sets the field 'cashPaymentAmount'.
|
DeviceCashSummaryRow |
setCashRefundedAmount(Long cashRefundedAmount)
Sets the field 'cashRefundedAmount'.
|
DeviceCashSummaryRow |
setCashRemovedAmount(Long cashRemovedAmount)
Sets the field 'cashRemovedAmount'.
|
DeviceCashSummaryRow |
setCashSalesAmount(Long cashSalesAmount)
Sets the field 'cashSalesAmount'.
|
DeviceCashSummaryRow |
setDevice(Reference device)
Sets the field 'device'.
|
DeviceCashSummaryRow |
setExpectedDeposit(Long expectedDeposit)
Sets the field 'expectedDeposit'.
|
DeviceCashSummaryRow |
setNet(Long net)
Sets the field 'net'.
|
DeviceCashSummaryRow |
setNetTips(Long netTips)
Sets the field 'netTips'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<DeviceCashSummaryRow> CREATOR
public static final JSONifiable.Creator<DeviceCashSummaryRow> JSON_CREATOR
public DeviceCashSummaryRow()
protected DeviceCashSummaryRow(boolean noInit)
public DeviceCashSummaryRow(String json) throws IllegalArgumentException
IllegalArgumentException
public DeviceCashSummaryRow(JSONObject jsonObject)
public DeviceCashSummaryRow(DeviceCashSummaryRow src)
public Reference getDevice()
public Long getCashSalesAmount()
public Long getCashPaymentAmount()
public Long getCashRefundedAmount()
public Long getCashBackAmount()
public Long getCashAddedAmount()
public Long getCashRemovedAmount()
public Long getNet()
public Long getNetTips()
public Long getExpectedDeposit()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullDevice()
public boolean isNotNullCashSalesAmount()
public boolean isNotNullCashPaymentAmount()
public boolean isNotNullCashRefundedAmount()
public boolean isNotNullCashBackAmount()
public boolean isNotNullCashAddedAmount()
public boolean isNotNullCashRemovedAmount()
public boolean isNotNullNet()
public boolean isNotNullNetTips()
public boolean isNotNullExpectedDeposit()
public boolean hasDevice()
public boolean hasCashSalesAmount()
public boolean hasCashPaymentAmount()
public boolean hasCashRefundedAmount()
public boolean hasCashBackAmount()
public boolean hasCashAddedAmount()
public boolean hasCashRemovedAmount()
public boolean hasNet()
public boolean hasNetTips()
public boolean hasExpectedDeposit()
public DeviceCashSummaryRow setDevice(Reference device)
public DeviceCashSummaryRow setCashSalesAmount(Long cashSalesAmount)
public DeviceCashSummaryRow setCashPaymentAmount(Long cashPaymentAmount)
public DeviceCashSummaryRow setCashRefundedAmount(Long cashRefundedAmount)
public DeviceCashSummaryRow setCashBackAmount(Long cashBackAmount)
public DeviceCashSummaryRow setCashAddedAmount(Long cashAddedAmount)
public DeviceCashSummaryRow setCashRemovedAmount(Long cashRemovedAmount)
public DeviceCashSummaryRow setNet(Long net)
public DeviceCashSummaryRow setNetTips(Long netTips)
public DeviceCashSummaryRow setExpectedDeposit(Long expectedDeposit)
public void clearDevice()
public void clearCashSalesAmount()
public void clearCashPaymentAmount()
public void clearCashRefundedAmount()
public void clearCashBackAmount()
public void clearCashAddedAmount()
public void clearCashRemovedAmount()
public void clearNet()
public void clearNetTips()
public void clearExpectedDeposit()
public boolean containsChanges()
public void resetChangeLog()
public DeviceCashSummaryRow copyChanges()
public void mergeChanges(DeviceCashSummaryRow src)