Class AdditionalCharge

    • Constructor Detail

      • AdditionalCharge

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

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

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

        public AdditionalCharge​(AdditionalCharge 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
      • getMerchant

        public Merchant getMerchant()
        The merchant this charge belongs to
      • getAmount

        public Long getAmount()
        Optional flat charge amount
      • getPercentageDecimal

        public Long getPercentageDecimal()
        Optional percent to charge times 10000, e.g. 12.5% will be 125000
      • getIsCashbackOnly

        public Boolean getIsCashbackOnly()
        If this charge should only apply to transactions with cashback
      • getEnabled

        public Boolean getEnabled()
        If this charge is enabled
      • getModifiedTime

        public Long getModifiedTime()
        Last modified time
      • getDeletedTime

        public Long getDeletedTime()
        Deleted time
      • 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
      • isNotNullMerchant

        public boolean isNotNullMerchant()
        Checks whether the 'merchant' field is set and is not null
      • isNotNullType

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

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

        public boolean isNotNullPercentageDecimal()
        Checks whether the 'percentageDecimal' field is set and is not null
      • isNotNullIsCashbackOnly

        public boolean isNotNullIsCashbackOnly()
        Checks whether the 'isCashbackOnly' field is set and is not null
      • isNotNullEnabled

        public boolean isNotNullEnabled()
        Checks whether the 'enabled' field is set and is not null
      • isNotNullModifiedTime

        public boolean isNotNullModifiedTime()
        Checks whether the 'modifiedTime' field is set and is not null
      • isNotNullDeletedTime

        public boolean isNotNullDeletedTime()
        Checks whether the 'deletedTime' 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
      • hasMerchant

        public boolean hasMerchant()
        Checks whether the 'merchant' field has been set, however the value could be null
      • hasType

        public boolean hasType()
        Checks whether the 'type' 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
      • hasPercentageDecimal

        public boolean hasPercentageDecimal()
        Checks whether the 'percentageDecimal' field has been set, however the value could be null
      • hasIsCashbackOnly

        public boolean hasIsCashbackOnly()
        Checks whether the 'isCashbackOnly' field has been set, however the value could be null
      • hasEnabled

        public boolean hasEnabled()
        Checks whether the 'enabled' field has been set, however the value could be null
      • hasModifiedTime

        public boolean hasModifiedTime()
        Checks whether the 'modifiedTime' field has been set, however the value could be null
      • hasDeletedTime

        public boolean hasDeletedTime()
        Checks whether the 'deletedTime' field has been set, however the value could be null
      • setMerchant

        public AdditionalCharge setMerchant​(Merchant merchant)
        Sets the field 'merchant'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setPercentageDecimal

        public AdditionalCharge setPercentageDecimal​(Long percentageDecimal)
        Sets the field 'percentageDecimal'.
      • setIsCashbackOnly

        public AdditionalCharge setIsCashbackOnly​(Boolean isCashbackOnly)
        Sets the field 'isCashbackOnly'.
      • setModifiedTime

        public AdditionalCharge setModifiedTime​(Long modifiedTime)
        Sets the field 'modifiedTime'.
      • setDeletedTime

        public AdditionalCharge setDeletedTime​(Long deletedTime)
        Sets the field 'deletedTime'.
      • clearId

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

        public void clearMerchant()
        Clears the 'merchant' field, the 'has' method for this field will now return false
      • clearType

        public void clearType()
        Clears the 'type' 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
      • clearPercentageDecimal

        public void clearPercentageDecimal()
        Clears the 'percentageDecimal' field, the 'has' method for this field will now return false
      • clearIsCashbackOnly

        public void clearIsCashbackOnly()
        Clears the 'isCashbackOnly' field, the 'has' method for this field will now return false
      • clearEnabled

        public void clearEnabled()
        Clears the 'enabled' field, the 'has' method for this field will now return false
      • clearModifiedTime

        public void clearModifiedTime()
        Clears the 'modifiedTime' field, the 'has' method for this field will now return false
      • clearDeletedTime

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

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