public class DisplayOrder extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
DisplayOrder.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<DisplayOrder> |
CREATOR |
static JSONifiable.Creator<DisplayOrder> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
DisplayOrder()
Constructs a new empty instance.
|
protected |
DisplayOrder(boolean noInit)
Constructs a new empty instance.
|
|
DisplayOrder(DisplayOrder src)
Constructs a new instance that is a deep copy of the source instance.
|
|
DisplayOrder(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.
|
|
DisplayOrder(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAmountRemaining()
Clears the 'amountRemaining' field, the 'has' method for this field will now return false
|
void |
clearCurrency()
Clears the 'currency' field, the 'has' method for this field will now return false
|
void |
clearDiscounts()
Clears the 'discounts' field, the 'has' method for this field will now return false
|
void |
clearEmployee()
Clears the 'employee' 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 |
clearIsVat()
Clears the 'isVat' field, the 'has' method for this field will now return false
|
void |
clearLineItems()
Clears the 'lineItems' field, the 'has' method for this field will now return false
|
void |
clearNote()
Clears the 'note' field, the 'has' method for this field will now return false
|
void |
clearPayments()
Clears the 'payments' field, the 'has' method for this field will now return false
|
void |
clearServiceChargeAmount()
Clears the 'serviceChargeAmount' field, the 'has' method for this field will now return false
|
void |
clearServiceChargeName()
Clears the 'serviceChargeName' field, the 'has' method for this field will now return false
|
void |
clearSubtotal()
Clears the 'subtotal' field, the 'has' method for this field will now return false
|
void |
clearTax()
Clears the 'tax' field, the 'has' method for this field will now return false
|
void |
clearTitle()
Clears the 'title' field, the 'has' method for this field will now return false
|
void |
clearTotal()
Clears the 'total' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
DisplayOrder |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
String |
getAmountRemaining()
Formatted amount remaining
|
String |
getCurrency()
Currency of this order
|
List<DisplayDiscount> |
getDiscounts() |
String |
getEmployee()
The employee associated with this order
|
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
Boolean |
getIsVat()
This order was created by merchant with VAT enabled.
|
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<DisplayLineItem> |
getLineItems() |
String |
getNote() |
List<DisplayPayment> |
getPayments()
Payments that were made for this order
|
String |
getServiceChargeAmount()
Optional service charge amount (gratuity) applied to this order
|
String |
getServiceChargeName()
Optional service charge name (gratuity) applied to this order
|
String |
getSubtotal()
Formatted subtotal of the order
|
String |
getTax()
Formatted tax of the order
|
String |
getTitle() |
String |
getTotal()
Formatted total of the order
|
boolean |
hasAmountRemaining()
Checks whether the 'amountRemaining' field has been set, however the value could be null
|
boolean |
hasCurrency()
Checks whether the 'currency' field has been set, however the value could be null
|
boolean |
hasDiscounts()
Checks whether the 'discounts' field has been set, however the value could be null
|
boolean |
hasEmployee()
Checks whether the 'employee' 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 |
hasIsVat()
Checks whether the 'isVat' field has been set, however the value could be null
|
boolean |
hasLineItems()
Checks whether the 'lineItems' field has been set, however the value could be null
|
boolean |
hasNote()
Checks whether the 'note' field has been set, however the value could be null
|
boolean |
hasPayments()
Checks whether the 'payments' field has been set, however the value could be null
|
boolean |
hasServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field has been set, however the value could be null
|
boolean |
hasServiceChargeName()
Checks whether the 'serviceChargeName' field has been set, however the value could be null
|
boolean |
hasSubtotal()
Checks whether the 'subtotal' field has been set, however the value could be null
|
boolean |
hasTax()
Checks whether the 'tax' field has been set, however the value could be null
|
boolean |
hasTitle()
Checks whether the 'title' field has been set, however the value could be null
|
boolean |
hasTotal()
Checks whether the 'total' field has been set, however the value could be null
|
boolean |
isNotEmptyDiscounts()
Checks whether the 'discounts' field is set and is not null and is not empty
|
boolean |
isNotEmptyLineItems()
Checks whether the 'lineItems' field is set and is not null and is not empty
|
boolean |
isNotEmptyPayments()
Checks whether the 'payments' field is set and is not null and is not empty
|
boolean |
isNotNullAmountRemaining()
Checks whether the 'amountRemaining' field is set and is not null
|
boolean |
isNotNullCurrency()
Checks whether the 'currency' field is set and is not null
|
boolean |
isNotNullDiscounts()
Checks whether the 'discounts' field is set and is not null
|
boolean |
isNotNullEmployee()
Checks whether the 'employee' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullIsVat()
Checks whether the 'isVat' field is set and is not null
|
boolean |
isNotNullLineItems()
Checks whether the 'lineItems' field is set and is not null
|
boolean |
isNotNullNote()
Checks whether the 'note' field is set and is not null
|
boolean |
isNotNullPayments()
Checks whether the 'payments' field is set and is not null
|
boolean |
isNotNullServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field is set and is not null
|
boolean |
isNotNullServiceChargeName()
Checks whether the 'serviceChargeName' field is set and is not null
|
boolean |
isNotNullSubtotal()
Checks whether the 'subtotal' field is set and is not null
|
boolean |
isNotNullTax()
Checks whether the 'tax' field is set and is not null
|
boolean |
isNotNullTitle()
Checks whether the 'title' field is set and is not null
|
boolean |
isNotNullTotal()
Checks whether the 'total' field is set and is not null
|
void |
mergeChanges(DisplayOrder 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.
|
DisplayOrder |
setAmountRemaining(String amountRemaining)
Sets the field 'amountRemaining'.
|
DisplayOrder |
setCurrency(String currency)
Sets the field 'currency'.
|
DisplayOrder |
setDiscounts(List<DisplayDiscount> discounts)
Sets the field 'discounts'.
|
DisplayOrder |
setEmployee(String employee)
Sets the field 'employee'.
|
DisplayOrder |
setId(String id)
Sets the field 'id'.
|
DisplayOrder |
setIsVat(Boolean isVat)
Sets the field 'isVat'.
|
DisplayOrder |
setLineItems(List<DisplayLineItem> lineItems)
Sets the field 'lineItems'.
|
DisplayOrder |
setNote(String note)
Sets the field 'note'.
|
DisplayOrder |
setPayments(List<DisplayPayment> payments)
Sets the field 'payments'.
|
DisplayOrder |
setServiceChargeAmount(String serviceChargeAmount)
Sets the field 'serviceChargeAmount'.
|
DisplayOrder |
setServiceChargeName(String serviceChargeName)
Sets the field 'serviceChargeName'.
|
DisplayOrder |
setSubtotal(String subtotal)
Sets the field 'subtotal'.
|
DisplayOrder |
setTax(String tax)
Sets the field 'tax'.
|
DisplayOrder |
setTitle(String title)
Sets the field 'title'.
|
DisplayOrder |
setTotal(String total)
Sets the field 'total'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<DisplayOrder> CREATOR
public static final JSONifiable.Creator<DisplayOrder> JSON_CREATOR
public DisplayOrder()
protected DisplayOrder(boolean noInit)
public DisplayOrder(String json) throws IllegalArgumentException
IllegalArgumentException
public DisplayOrder(JSONObject jsonObject)
public DisplayOrder(DisplayOrder src)
public String getId()
public String getCurrency()
public String getEmployee()
public String getSubtotal()
public String getTax()
public String getTotal()
public String getTitle()
public String getNote()
public Boolean getIsVat()
public String getServiceChargeName()
public String getServiceChargeAmount()
public List<DisplayDiscount> getDiscounts()
public List<DisplayLineItem> getLineItems()
public String getAmountRemaining()
public List<DisplayPayment> getPayments()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullCurrency()
public boolean isNotNullEmployee()
public boolean isNotNullSubtotal()
public boolean isNotNullTax()
public boolean isNotNullTotal()
public boolean isNotNullTitle()
public boolean isNotNullNote()
public boolean isNotNullIsVat()
public boolean isNotNullServiceChargeName()
public boolean isNotNullServiceChargeAmount()
public boolean isNotNullDiscounts()
public boolean isNotEmptyDiscounts()
public boolean isNotNullLineItems()
public boolean isNotEmptyLineItems()
public boolean isNotNullAmountRemaining()
public boolean isNotNullPayments()
public boolean isNotEmptyPayments()
public boolean hasId()
public boolean hasCurrency()
public boolean hasEmployee()
public boolean hasSubtotal()
public boolean hasTax()
public boolean hasTotal()
public boolean hasTitle()
public boolean hasNote()
public boolean hasIsVat()
public boolean hasServiceChargeName()
public boolean hasServiceChargeAmount()
public boolean hasDiscounts()
public boolean hasLineItems()
public boolean hasAmountRemaining()
public boolean hasPayments()
public DisplayOrder setId(String id)
public DisplayOrder setCurrency(String currency)
public DisplayOrder setEmployee(String employee)
public DisplayOrder setSubtotal(String subtotal)
public DisplayOrder setTax(String tax)
public DisplayOrder setTotal(String total)
public DisplayOrder setTitle(String title)
public DisplayOrder setNote(String note)
public DisplayOrder setIsVat(Boolean isVat)
public DisplayOrder setServiceChargeName(String serviceChargeName)
public DisplayOrder setServiceChargeAmount(String serviceChargeAmount)
public DisplayOrder setDiscounts(List<DisplayDiscount> discounts)
public DisplayOrder setLineItems(List<DisplayLineItem> lineItems)
public DisplayOrder setAmountRemaining(String amountRemaining)
public DisplayOrder setPayments(List<DisplayPayment> payments)
public void clearId()
public void clearCurrency()
public void clearEmployee()
public void clearSubtotal()
public void clearTax()
public void clearTotal()
public void clearTitle()
public void clearNote()
public void clearIsVat()
public void clearServiceChargeName()
public void clearServiceChargeAmount()
public void clearDiscounts()
public void clearLineItems()
public void clearAmountRemaining()
public void clearPayments()
public boolean containsChanges()
public void resetChangeLog()
public DisplayOrder copyChanges()
public void mergeChanges(DisplayOrder src)