Class DisplayLineItem

    • Constructor Detail

      • DisplayLineItem

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

        protected DisplayLineItem​(boolean noInit)
        Constructs a new empty instance.
      • DisplayLineItem

        public DisplayLineItem​(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.
      • DisplayLineItem

        public DisplayLineItem​(DisplayLineItem 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
      • getOrderId

        public String getOrderId()
        The order with which the line item is associated
      • getName

        public String getName()
        Line item name
      • getAlternateName

        public String getAlternateName()
        Alternate name of the line item
      • getPrice

        public String getPrice()
        Formatted total price of the line item
      • getUnitPrice

        public String getUnitPrice()
        Formatted unit price in cases if applicable
      • getQuantity

        public String getQuantity()
        Formatted quantity
      • getUnitQuantity

        public String getUnitQuantity()
        Formatted unit quantity - such as 10 @ $1.99/oz
      • getNote

        public String getNote()
      • getPrinted

        public Boolean getPrinted()
      • getBinName

        public String getBinName()
      • getUserData

        public String getUserData()
      • getDiscountAmount

        public String getDiscountAmount()
      • getExchanged

        public Boolean getExchanged()
      • getExchangedAmount

        public String getExchangedAmount()
        Formatted exchanged amount
      • getRefunded

        public Boolean getRefunded()
      • getRefundedAmount

        public String getRefundedAmount()
        Formatted refunded amount
      • getPercent

        public String getPercent()
      • 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
      • isNotNullOrderId

        public boolean isNotNullOrderId()
        Checks whether the 'orderId' field is set and is not null
      • isNotNullName

        public boolean isNotNullName()
        Checks whether the 'name' field is set and is not null
      • isNotNullAlternateName

        public boolean isNotNullAlternateName()
        Checks whether the 'alternateName' field is set and is not null
      • isNotNullPrice

        public boolean isNotNullPrice()
        Checks whether the 'price' field is set and is not null
      • isNotNullUnitPrice

        public boolean isNotNullUnitPrice()
        Checks whether the 'unitPrice' field is set and is not null
      • isNotNullQuantity

        public boolean isNotNullQuantity()
        Checks whether the 'quantity' field is set and is not null
      • isNotNullUnitQuantity

        public boolean isNotNullUnitQuantity()
        Checks whether the 'unitQuantity' field is set and is not null
      • isNotNullNote

        public boolean isNotNullNote()
        Checks whether the 'note' field is set and is not null
      • isNotNullPrinted

        public boolean isNotNullPrinted()
        Checks whether the 'printed' field is set and is not null
      • isNotNullBinName

        public boolean isNotNullBinName()
        Checks whether the 'binName' field is set and is not null
      • isNotNullUserData

        public boolean isNotNullUserData()
        Checks whether the 'userData' 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
      • isNotNullDiscountAmount

        public boolean isNotNullDiscountAmount()
        Checks whether the 'discountAmount' field is set and is not null
      • isNotNullExchanged

        public boolean isNotNullExchanged()
        Checks whether the 'exchanged' field is set and is not null
      • isNotNullExchangedAmount

        public boolean isNotNullExchangedAmount()
        Checks whether the 'exchangedAmount' field is set and is not null
      • isNotNullModifications

        public boolean isNotNullModifications()
        Checks whether the 'modifications' field is set and is not null
      • isNotEmptyModifications

        public boolean isNotEmptyModifications()
        Checks whether the 'modifications' field is set and is not null and is not empty
      • isNotNullRefunded

        public boolean isNotNullRefunded()
        Checks whether the 'refunded' field is set and is not null
      • isNotNullRefundedAmount

        public boolean isNotNullRefundedAmount()
        Checks whether the 'refundedAmount' field is set and is not null
      • isNotNullPercent

        public boolean isNotNullPercent()
        Checks whether the 'percent' field is set and is not null
      • hasId

        public boolean hasId()
        Checks whether the 'id' field has been set, however the value could be null
      • hasOrderId

        public boolean hasOrderId()
        Checks whether the 'orderId' field has been set, however the value could be null
      • hasName

        public boolean hasName()
        Checks whether the 'name' field has been set, however the value could be null
      • hasAlternateName

        public boolean hasAlternateName()
        Checks whether the 'alternateName' field has been set, however the value could be null
      • hasPrice

        public boolean hasPrice()
        Checks whether the 'price' field has been set, however the value could be null
      • hasUnitPrice

        public boolean hasUnitPrice()
        Checks whether the 'unitPrice' field has been set, however the value could be null
      • hasQuantity

        public boolean hasQuantity()
        Checks whether the 'quantity' field has been set, however the value could be null
      • hasUnitQuantity

        public boolean hasUnitQuantity()
        Checks whether the 'unitQuantity' 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
      • hasPrinted

        public boolean hasPrinted()
        Checks whether the 'printed' field has been set, however the value could be null
      • hasBinName

        public boolean hasBinName()
        Checks whether the 'binName' field has been set, however the value could be null
      • hasUserData

        public boolean hasUserData()
        Checks whether the 'userData' 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
      • hasDiscountAmount

        public boolean hasDiscountAmount()
        Checks whether the 'discountAmount' field has been set, however the value could be null
      • hasExchanged

        public boolean hasExchanged()
        Checks whether the 'exchanged' field has been set, however the value could be null
      • hasExchangedAmount

        public boolean hasExchangedAmount()
        Checks whether the 'exchangedAmount' field has been set, however the value could be null
      • hasModifications

        public boolean hasModifications()
        Checks whether the 'modifications' field has been set, however the value could be null
      • hasRefunded

        public boolean hasRefunded()
        Checks whether the 'refunded' field has been set, however the value could be null
      • hasRefundedAmount

        public boolean hasRefundedAmount()
        Checks whether the 'refundedAmount' field has been set, however the value could be null
      • hasPercent

        public boolean hasPercent()
        Checks whether the 'percent' field has been set, however the value could be null
      • setAlternateName

        public DisplayLineItem setAlternateName​(String alternateName)
        Sets the field 'alternateName'.
      • setUnitQuantity

        public DisplayLineItem setUnitQuantity​(String unitQuantity)
        Sets the field 'unitQuantity'.
      • setDiscounts

        public DisplayLineItem 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.
      • setDiscountAmount

        public DisplayLineItem setDiscountAmount​(String discountAmount)
        Sets the field 'discountAmount'.
      • setExchangedAmount

        public DisplayLineItem setExchangedAmount​(String exchangedAmount)
        Sets the field 'exchangedAmount'.
      • setModifications

        public DisplayLineItem setModifications​(List<DisplayModification> modifications)
        Sets the field 'modifications'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setRefundedAmount

        public DisplayLineItem setRefundedAmount​(String refundedAmount)
        Sets the field 'refundedAmount'.
      • clearId

        public void clearId()
        Clears the 'id' field, the 'has' method for this field will now return false
      • clearOrderId

        public void clearOrderId()
        Clears the 'orderId' field, the 'has' method for this field will now return false
      • clearName

        public void clearName()
        Clears the 'name' field, the 'has' method for this field will now return false
      • clearAlternateName

        public void clearAlternateName()
        Clears the 'alternateName' field, the 'has' method for this field will now return false
      • clearPrice

        public void clearPrice()
        Clears the 'price' field, the 'has' method for this field will now return false
      • clearUnitPrice

        public void clearUnitPrice()
        Clears the 'unitPrice' field, the 'has' method for this field will now return false
      • clearQuantity

        public void clearQuantity()
        Clears the 'quantity' field, the 'has' method for this field will now return false
      • clearUnitQuantity

        public void clearUnitQuantity()
        Clears the 'unitQuantity' 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
      • clearPrinted

        public void clearPrinted()
        Clears the 'printed' field, the 'has' method for this field will now return false
      • clearBinName

        public void clearBinName()
        Clears the 'binName' field, the 'has' method for this field will now return false
      • clearUserData

        public void clearUserData()
        Clears the 'userData' 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
      • clearDiscountAmount

        public void clearDiscountAmount()
        Clears the 'discountAmount' field, the 'has' method for this field will now return false
      • clearExchanged

        public void clearExchanged()
        Clears the 'exchanged' field, the 'has' method for this field will now return false
      • clearExchangedAmount

        public void clearExchangedAmount()
        Clears the 'exchangedAmount' field, the 'has' method for this field will now return false
      • clearModifications

        public void clearModifications()
        Clears the 'modifications' field, the 'has' method for this field will now return false
      • clearRefunded

        public void clearRefunded()
        Clears the 'refunded' field, the 'has' method for this field will now return false
      • clearRefundedAmount

        public void clearRefundedAmount()
        Clears the 'refundedAmount' field, the 'has' method for this field will now return false
      • clearPercent

        public void clearPercent()
        Clears the 'percent' 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 DisplayLineItem copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

        public void mergeChanges​(DisplayLineItem src)
        Copy all the changed fields from the given source to this instance.