Package com.clover.sdk.v3.order
Class DisplayOrder
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.order.DisplayOrder
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class DisplayOrder extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.Fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DisplayOrder.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<DisplayOrder>
CREATOR
static JSONifiable.Creator<DisplayOrder>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor 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(String json)
Constructs a new instance from the given JSON String.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAmountRemaining()
Clears the 'amountRemaining' field, the 'has' method for this field will now return falsevoid
clearCurrency()
Clears the 'currency' field, the 'has' method for this field will now return falsevoid
clearDiscounts()
Clears the 'discounts' field, the 'has' method for this field will now return falsevoid
clearEmployee()
Clears the 'employee' field, the 'has' method for this field will now return falsevoid
clearId()
Clears the 'id' field, the 'has' method for this field will now return falsevoid
clearIsVat()
Clears the 'isVat' field, the 'has' method for this field will now return falsevoid
clearLineItems()
Clears the 'lineItems' field, the 'has' method for this field will now return falsevoid
clearNote()
Clears the 'note' field, the 'has' method for this field will now return falsevoid
clearPayments()
Clears the 'payments' field, the 'has' method for this field will now return falsevoid
clearServiceChargeAmount()
Clears the 'serviceChargeAmount' field, the 'has' method for this field will now return falsevoid
clearServiceChargeName()
Clears the 'serviceChargeName' field, the 'has' method for this field will now return falsevoid
clearSubtotal()
Clears the 'subtotal' field, the 'has' method for this field will now return falsevoid
clearTax()
Clears the 'tax' field, the 'has' method for this field will now return falsevoid
clearTitle()
Clears the 'title' field, the 'has' method for this field will now return falsevoid
clearTotal()
Clears the 'total' field, the 'has' method for this field will now return falseboolean
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 remainingString
getCurrency()
Currency of this orderList<DisplayDiscount>
getDiscounts()
String
getEmployee()
The employee associated with this orderprotected GenericClient
getGenericClient()
String
getId()
Unique identifierBoolean
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 orderString
getServiceChargeAmount()
Optional service charge amount (gratuity) applied to this orderString
getServiceChargeName()
Optional service charge name (gratuity) applied to this orderString
getSubtotal()
Formatted subtotal of the orderString
getTax()
Formatted tax of the orderString
getTitle()
String
getTotal()
Formatted total of the orderboolean
hasAmountRemaining()
Checks whether the 'amountRemaining' field has been set, however the value could be nullboolean
hasCurrency()
Checks whether the 'currency' field has been set, however the value could be nullboolean
hasDiscounts()
Checks whether the 'discounts' field has been set, however the value could be nullboolean
hasEmployee()
Checks whether the 'employee' field has been set, however the value could be nullboolean
hasId()
Checks whether the 'id' field has been set, however the value could be nullboolean
hasIsVat()
Checks whether the 'isVat' field has been set, however the value could be nullboolean
hasLineItems()
Checks whether the 'lineItems' field has been set, however the value could be nullboolean
hasNote()
Checks whether the 'note' field has been set, however the value could be nullboolean
hasPayments()
Checks whether the 'payments' field has been set, however the value could be nullboolean
hasServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field has been set, however the value could be nullboolean
hasServiceChargeName()
Checks whether the 'serviceChargeName' field has been set, however the value could be nullboolean
hasSubtotal()
Checks whether the 'subtotal' field has been set, however the value could be nullboolean
hasTax()
Checks whether the 'tax' field has been set, however the value could be nullboolean
hasTitle()
Checks whether the 'title' field has been set, however the value could be nullboolean
hasTotal()
Checks whether the 'total' field has been set, however the value could be nullboolean
isNotEmptyDiscounts()
Checks whether the 'discounts' field is set and is not null and is not emptyboolean
isNotEmptyLineItems()
Checks whether the 'lineItems' field is set and is not null and is not emptyboolean
isNotEmptyPayments()
Checks whether the 'payments' field is set and is not null and is not emptyboolean
isNotNullAmountRemaining()
Checks whether the 'amountRemaining' field is set and is not nullboolean
isNotNullCurrency()
Checks whether the 'currency' field is set and is not nullboolean
isNotNullDiscounts()
Checks whether the 'discounts' field is set and is not nullboolean
isNotNullEmployee()
Checks whether the 'employee' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullIsVat()
Checks whether the 'isVat' field is set and is not nullboolean
isNotNullLineItems()
Checks whether the 'lineItems' field is set and is not nullboolean
isNotNullNote()
Checks whether the 'note' field is set and is not nullboolean
isNotNullPayments()
Checks whether the 'payments' field is set and is not nullboolean
isNotNullServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field is set and is not nullboolean
isNotNullServiceChargeName()
Checks whether the 'serviceChargeName' field is set and is not nullboolean
isNotNullSubtotal()
Checks whether the 'subtotal' field is set and is not nullboolean
isNotNullTax()
Checks whether the 'tax' field is set and is not nullboolean
isNotNullTitle()
Checks whether the 'title' field is set and is not nullboolean
isNotNullTotal()
Checks whether the 'total' field is set and is not nullvoid
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()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<DisplayOrder> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<DisplayOrder> JSON_CREATOR
-
-
Constructor Detail
-
DisplayOrder
public DisplayOrder()
Constructs a new empty instance.
-
DisplayOrder
protected DisplayOrder(boolean noInit)
Constructs a new empty instance.
-
DisplayOrder
public DisplayOrder(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
DisplayOrder
public 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
public DisplayOrder(DisplayOrder src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getId
public String getId()
Unique identifier
-
getCurrency
public String getCurrency()
Currency of this order
-
getEmployee
public String getEmployee()
The employee associated with this order
-
getSubtotal
public String getSubtotal()
Formatted subtotal of the order
-
getTax
public String getTax()
Formatted tax of the order
-
getTotal
public String getTotal()
Formatted total of the order
-
getTitle
public String getTitle()
-
getNote
public String getNote()
-
getIsVat
public Boolean getIsVat()
This order was created by merchant with VAT enabled.
-
getServiceChargeName
public String getServiceChargeName()
Optional service charge name (gratuity) applied to this order
-
getServiceChargeAmount
public String getServiceChargeAmount()
Optional service charge amount (gratuity) applied to this order
-
getDiscounts
public List<DisplayDiscount> getDiscounts()
-
getLineItems
public List<DisplayLineItem> getLineItems()
-
getAmountRemaining
public String getAmountRemaining()
Formatted amount remaining
-
getPayments
public List<DisplayPayment> getPayments()
Payments that were made for this order
-
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
-
isNotNullId
public boolean isNotNullId()
Checks whether the 'id' field is set and is not null
-
isNotNullCurrency
public boolean isNotNullCurrency()
Checks whether the 'currency' field is set and is not null
-
isNotNullEmployee
public boolean isNotNullEmployee()
Checks whether the 'employee' field is set and is not null
-
isNotNullSubtotal
public boolean isNotNullSubtotal()
Checks whether the 'subtotal' field is set and is not null
-
isNotNullTax
public boolean isNotNullTax()
Checks whether the 'tax' field is set and is not null
-
isNotNullTotal
public boolean isNotNullTotal()
Checks whether the 'total' field is set and is not null
-
isNotNullTitle
public boolean isNotNullTitle()
Checks whether the 'title' field is set and is not null
-
isNotNullNote
public boolean isNotNullNote()
Checks whether the 'note' field is set and is not null
-
isNotNullIsVat
public boolean isNotNullIsVat()
Checks whether the 'isVat' field is set and is not null
-
isNotNullServiceChargeName
public boolean isNotNullServiceChargeName()
Checks whether the 'serviceChargeName' field is set and is not null
-
isNotNullServiceChargeAmount
public boolean isNotNullServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field is set and is not null
-
isNotNullDiscounts
public boolean isNotNullDiscounts()
Checks whether the 'discounts' field is set and is not null
-
isNotEmptyDiscounts
public boolean isNotEmptyDiscounts()
Checks whether the 'discounts' field is set and is not null and is not empty
-
isNotNullLineItems
public boolean isNotNullLineItems()
Checks whether the 'lineItems' field is set and is not null
-
isNotEmptyLineItems
public boolean isNotEmptyLineItems()
Checks whether the 'lineItems' field is set and is not null and is not empty
-
isNotNullAmountRemaining
public boolean isNotNullAmountRemaining()
Checks whether the 'amountRemaining' field is set and is not null
-
isNotNullPayments
public boolean isNotNullPayments()
Checks whether the 'payments' field is set and is not null
-
isNotEmptyPayments
public boolean isNotEmptyPayments()
Checks whether the 'payments' field is set and is not null and is not empty
-
hasId
public boolean hasId()
Checks whether the 'id' field has been set, however the value could be null
-
hasCurrency
public boolean hasCurrency()
Checks whether the 'currency' field has been set, however the value could be null
-
hasEmployee
public boolean hasEmployee()
Checks whether the 'employee' field has been set, however the value could be null
-
hasSubtotal
public boolean hasSubtotal()
Checks whether the 'subtotal' field has been set, however the value could be null
-
hasTax
public boolean hasTax()
Checks whether the 'tax' field has been set, however the value could be null
-
hasTotal
public boolean hasTotal()
Checks whether the 'total' field has been set, however the value could be null
-
hasTitle
public boolean hasTitle()
Checks whether the 'title' field has been set, however the value could be null
-
hasNote
public boolean hasNote()
Checks whether the 'note' field has been set, however the value could be null
-
hasIsVat
public boolean hasIsVat()
Checks whether the 'isVat' field has been set, however the value could be null
-
hasServiceChargeName
public boolean hasServiceChargeName()
Checks whether the 'serviceChargeName' field has been set, however the value could be null
-
hasServiceChargeAmount
public boolean hasServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field has been set, however the value could be null
-
hasDiscounts
public boolean hasDiscounts()
Checks whether the 'discounts' field has been set, however the value could be null
-
hasLineItems
public boolean hasLineItems()
Checks whether the 'lineItems' field has been set, however the value could be null
-
hasAmountRemaining
public boolean hasAmountRemaining()
Checks whether the 'amountRemaining' field has been set, however the value could be null
-
hasPayments
public boolean hasPayments()
Checks whether the 'payments' field has been set, however the value could be null
-
setId
public DisplayOrder setId(String id)
Sets the field 'id'.
-
setCurrency
public DisplayOrder setCurrency(String currency)
Sets the field 'currency'.
-
setEmployee
public DisplayOrder setEmployee(String employee)
Sets the field 'employee'.
-
setSubtotal
public DisplayOrder setSubtotal(String subtotal)
Sets the field 'subtotal'.
-
setTax
public DisplayOrder setTax(String tax)
Sets the field 'tax'.
-
setTotal
public DisplayOrder setTotal(String total)
Sets the field 'total'.
-
setTitle
public DisplayOrder setTitle(String title)
Sets the field 'title'.
-
setNote
public DisplayOrder setNote(String note)
Sets the field 'note'.
-
setIsVat
public DisplayOrder setIsVat(Boolean isVat)
Sets the field 'isVat'.
-
setServiceChargeName
public DisplayOrder setServiceChargeName(String serviceChargeName)
Sets the field 'serviceChargeName'.
-
setServiceChargeAmount
public DisplayOrder setServiceChargeAmount(String serviceChargeAmount)
Sets the field 'serviceChargeAmount'.
-
setDiscounts
public DisplayOrder setDiscounts(List<DisplayDiscount> discounts)
Sets the field 'discounts'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setLineItems
public DisplayOrder setLineItems(List<DisplayLineItem> lineItems)
Sets the field 'lineItems'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setAmountRemaining
public DisplayOrder setAmountRemaining(String amountRemaining)
Sets the field 'amountRemaining'.
-
setPayments
public DisplayOrder setPayments(List<DisplayPayment> payments)
Sets the field 'payments'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearCurrency
public void clearCurrency()
Clears the 'currency' field, the 'has' method for this field will now return false
-
clearEmployee
public void clearEmployee()
Clears the 'employee' field, the 'has' method for this field will now return false
-
clearSubtotal
public void clearSubtotal()
Clears the 'subtotal' field, the 'has' method for this field will now return false
-
clearTax
public void clearTax()
Clears the 'tax' field, the 'has' method for this field will now return false
-
clearTotal
public void clearTotal()
Clears the 'total' field, the 'has' method for this field will now return false
-
clearTitle
public void clearTitle()
Clears the 'title' field, the 'has' method for this field will now return false
-
clearNote
public void clearNote()
Clears the 'note' field, the 'has' method for this field will now return false
-
clearIsVat
public void clearIsVat()
Clears the 'isVat' field, the 'has' method for this field will now return false
-
clearServiceChargeName
public void clearServiceChargeName()
Clears the 'serviceChargeName' field, the 'has' method for this field will now return false
-
clearServiceChargeAmount
public void clearServiceChargeAmount()
Clears the 'serviceChargeAmount' field, the 'has' method for this field will now return false
-
clearDiscounts
public void clearDiscounts()
Clears the 'discounts' field, the 'has' method for this field will now return false
-
clearLineItems
public void clearLineItems()
Clears the 'lineItems' field, the 'has' method for this field will now return false
-
clearAmountRemaining
public void clearAmountRemaining()
Clears the 'amountRemaining' field, the 'has' method for this field will now return false
-
clearPayments
public void clearPayments()
Clears the 'payments' 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 DisplayOrder copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(DisplayOrder src)
Copy all the changed fields from the given source to this instance.
-
-