Class LineItemPayment

    • Constructor Detail

      • LineItemPayment

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

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

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

        public LineItemPayment​(LineItemPayment 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; TBD this is confusing because it's used as either line item id or payment id
      • getPercentage

        public Long getPercentage()
        Percent of this line item covered by this payment
      • getBinName

        public String getBinName()
        Bin this line item payment was for
      • getRefunded

        public Boolean getRefunded()
        Payment has been refunded
      • 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
      • isNotNullPercentage

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

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

        public boolean isNotNullRefunded()
        Checks whether the 'refunded' 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
      • hasPercentage

        public boolean hasPercentage()
        Checks whether the 'percentage' 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
      • hasRefunded

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

        public LineItemPayment setPercentage​(Long percentage)
        Sets the field 'percentage'.
      • clearId

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

        public void clearPercentage()
        Clears the 'percentage' 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
      • clearRefunded

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

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