Class Summary

    • Constructor Detail

      • Summary

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

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

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

        public Summary​(Summary 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()
      • getNum

        public Long getNum()
      • getSegmentLabel

        public Integer getSegmentLabel()
        An identifier that may be used to align report segments across different merchants.
      • getName

        public String getName()
        Optional name field relevant in some scenarios, for example while storing name of line item for top 5 items sold
      • getAmount

        public Long getAmount()
        The amount paid or refunded. This includes tax, discounts and service charge. This is not supposed to include tip, though there are times when refunds mistakenly include tips. A new field amountWithoutTips has been added for those incorrect endpoints.
      • getTipAmount

        public Long getTipAmount()
      • getTaxAmount

        public Long getTaxAmount()
      • getServiceChargeAmount

        public Long getServiceChargeAmount()
      • getStartTimestamp

        public Long getStartTimestamp()
        Beginning of the time period for this summary
      • getEndTimestamp

        public Long getEndTimestamp()
        End of the time period for this summary
      • getAmountWithoutTips

        public Long getAmountWithoutTips()
        The amount paid or refunded. This includes tax, discounts and service charge. This does not include tip.
      • getNetQuantity

        public Double getNetQuantity()
        Optional field, total quantity of items sold
      • 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
      • isNotNullNum

        public boolean isNotNullNum()
        Checks whether the 'num' field is set and is not null
      • isNotNullSegmentLabel

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

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

        public boolean isNotNullAmount()
        Checks whether the 'amount' field is set and is not null
      • isNotNullTipAmount

        public boolean isNotNullTipAmount()
        Checks whether the 'tipAmount' field is set and is not null
      • isNotNullTaxAmount

        public boolean isNotNullTaxAmount()
        Checks whether the 'taxAmount' field is set and is not null
      • isNotNullServiceChargeAmount

        public boolean isNotNullServiceChargeAmount()
        Checks whether the 'serviceChargeAmount' field is set and is not null
      • isNotNullStartTimestamp

        public boolean isNotNullStartTimestamp()
        Checks whether the 'startTimestamp' field is set and is not null
      • isNotNullEndTimestamp

        public boolean isNotNullEndTimestamp()
        Checks whether the 'endTimestamp' field is set and is not null
      • isNotNullAmountWithoutTips

        public boolean isNotNullAmountWithoutTips()
        Checks whether the 'amountWithoutTips' field is set and is not null
      • isNotNullNetQuantity

        public boolean isNotNullNetQuantity()
        Checks whether the 'netQuantity' 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
      • hasNum

        public boolean hasNum()
        Checks whether the 'num' field has been set, however the value could be null
      • hasSegmentLabel

        public boolean hasSegmentLabel()
        Checks whether the 'segmentLabel' 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
      • hasAmount

        public boolean hasAmount()
        Checks whether the 'amount' field has been set, however the value could be null
      • hasTipAmount

        public boolean hasTipAmount()
        Checks whether the 'tipAmount' field has been set, however the value could be null
      • hasTaxAmount

        public boolean hasTaxAmount()
        Checks whether the 'taxAmount' 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
      • hasStartTimestamp

        public boolean hasStartTimestamp()
        Checks whether the 'startTimestamp' field has been set, however the value could be null
      • hasEndTimestamp

        public boolean hasEndTimestamp()
        Checks whether the 'endTimestamp' field has been set, however the value could be null
      • hasAmountWithoutTips

        public boolean hasAmountWithoutTips()
        Checks whether the 'amountWithoutTips' field has been set, however the value could be null
      • hasNetQuantity

        public boolean hasNetQuantity()
        Checks whether the 'netQuantity' field has been set, however the value could be null
      • setId

        public Summary setId​(String id)
        Sets the field 'id'.
      • setNum

        public Summary setNum​(Long num)
        Sets the field 'num'.
      • setSegmentLabel

        public Summary setSegmentLabel​(Integer segmentLabel)
        Sets the field 'segmentLabel'.
      • setName

        public Summary setName​(String name)
        Sets the field 'name'.
      • setAmount

        public Summary setAmount​(Long amount)
        Sets the field 'amount'.
      • setTipAmount

        public Summary setTipAmount​(Long tipAmount)
        Sets the field 'tipAmount'.
      • setTaxAmount

        public Summary setTaxAmount​(Long taxAmount)
        Sets the field 'taxAmount'.
      • setServiceChargeAmount

        public Summary setServiceChargeAmount​(Long serviceChargeAmount)
        Sets the field 'serviceChargeAmount'.
      • setStartTimestamp

        public Summary setStartTimestamp​(Long startTimestamp)
        Sets the field 'startTimestamp'.
      • setEndTimestamp

        public Summary setEndTimestamp​(Long endTimestamp)
        Sets the field 'endTimestamp'.
      • setAmountWithoutTips

        public Summary setAmountWithoutTips​(Long amountWithoutTips)
        Sets the field 'amountWithoutTips'.
      • setNetQuantity

        public Summary setNetQuantity​(Double netQuantity)
        Sets the field 'netQuantity'.
      • clearId

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

        public void clearNum()
        Clears the 'num' field, the 'has' method for this field will now return false
      • clearSegmentLabel

        public void clearSegmentLabel()
        Clears the 'segmentLabel' 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
      • clearAmount

        public void clearAmount()
        Clears the 'amount' field, the 'has' method for this field will now return false
      • clearTipAmount

        public void clearTipAmount()
        Clears the 'tipAmount' field, the 'has' method for this field will now return false
      • clearTaxAmount

        public void clearTaxAmount()
        Clears the 'taxAmount' 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
      • clearStartTimestamp

        public void clearStartTimestamp()
        Clears the 'startTimestamp' field, the 'has' method for this field will now return false
      • clearEndTimestamp

        public void clearEndTimestamp()
        Clears the 'endTimestamp' field, the 'has' method for this field will now return false
      • clearAmountWithoutTips

        public void clearAmountWithoutTips()
        Clears the 'amountWithoutTips' field, the 'has' method for this field will now return false
      • clearNetQuantity

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

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