Class SummaryLineItems

    • Constructor Detail

      • SummaryLineItems

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

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

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

        public SummaryLineItems​(SummaryLineItems src)
        Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
    • Method Detail

      • getRefundsTotal

        public Long getRefundsTotal()
        net refunds - taxes refunded - tips refunded
      • getDiscountsTotal

        public Long getDiscountsTotal()
      • getVoidedLineItemsTotal

        public Long getVoidedLineItemsTotal()
        Total value of line items removed from orders
      • getNetItemSales

        public Long getNetItemSales()
        Payment summary: original item revenue - taxes - tips - refunds - discounts + modifiers
      • 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
      • isNotNullRefundsTotal

        public boolean isNotNullRefundsTotal()
        Checks whether the 'refundsTotal' field is set and is not null
      • isNotNullDiscountsTotal

        public boolean isNotNullDiscountsTotal()
        Checks whether the 'discountsTotal' field is set and is not null
      • isNotNullVoidedLineItemsTotal

        public boolean isNotNullVoidedLineItemsTotal()
        Checks whether the 'voidedLineItemsTotal' field is set and is not null
      • isNotNullNetItemSales

        public boolean isNotNullNetItemSales()
        Checks whether the 'netItemSales' field is set and is not null
      • hasRefundsTotal

        public boolean hasRefundsTotal()
        Checks whether the 'refundsTotal' field has been set, however the value could be null
      • hasDiscountsTotal

        public boolean hasDiscountsTotal()
        Checks whether the 'discountsTotal' field has been set, however the value could be null
      • hasVoidedLineItemsTotal

        public boolean hasVoidedLineItemsTotal()
        Checks whether the 'voidedLineItemsTotal' field has been set, however the value could be null
      • hasNetItemSales

        public boolean hasNetItemSales()
        Checks whether the 'netItemSales' field has been set, however the value could be null
      • setRefundsTotal

        public SummaryLineItems setRefundsTotal​(Long refundsTotal)
        Sets the field 'refundsTotal'.
      • setDiscountsTotal

        public SummaryLineItems setDiscountsTotal​(Long discountsTotal)
        Sets the field 'discountsTotal'.
      • setVoidedLineItemsTotal

        public SummaryLineItems setVoidedLineItemsTotal​(Long voidedLineItemsTotal)
        Sets the field 'voidedLineItemsTotal'.
      • setNetItemSales

        public SummaryLineItems setNetItemSales​(Long netItemSales)
        Sets the field 'netItemSales'.
      • clearRefundsTotal

        public void clearRefundsTotal()
        Clears the 'refundsTotal' field, the 'has' method for this field will now return false
      • clearDiscountsTotal

        public void clearDiscountsTotal()
        Clears the 'discountsTotal' field, the 'has' method for this field will now return false
      • clearVoidedLineItemsTotal

        public void clearVoidedLineItemsTotal()
        Clears the 'voidedLineItemsTotal' field, the 'has' method for this field will now return false
      • clearNetItemSales

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

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