Class DisplayOrder

    • Constructor Detail

      • DisplayOrder

        public DisplayOrder()
        Constructs a new empty instance.
      • DisplayOrder

        protected DisplayOrder​(boolean noInit)
        Constructs a new empty instance.
      • 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
      • getAmountRemaining

        public String getAmountRemaining()
        Formatted amount remaining
      • getPayments

        public List<DisplayPayment> getPayments()
        Payments that were made for this order
      • 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 interface JSONifiable
      • 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
      • 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'.
      • 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.