Class PromotionalMessage

    • Constructor Detail

      • PromotionalMessage

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

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

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

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

      • getMessage

        public String getMessage()
      • getShowOnMerchantReceipt

        public Boolean getShowOnMerchantReceipt()
      • getShowOnCustomerReceipt

        public Boolean getShowOnCustomerReceipt()
      • getShowOnDisplay

        public Boolean getShowOnDisplay()
      • 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
      • isNotNullMessage

        public boolean isNotNullMessage()
        Checks whether the 'message' field is set and is not null
      • isNotNullShowOnMerchantReceipt

        public boolean isNotNullShowOnMerchantReceipt()
        Checks whether the 'showOnMerchantReceipt' field is set and is not null
      • isNotNullShowOnCustomerReceipt

        public boolean isNotNullShowOnCustomerReceipt()
        Checks whether the 'showOnCustomerReceipt' field is set and is not null
      • isNotNullShowOnDisplay

        public boolean isNotNullShowOnDisplay()
        Checks whether the 'showOnDisplay' field is set and is not null
      • hasMessage

        public boolean hasMessage()
        Checks whether the 'message' field has been set, however the value could be null
      • hasShowOnMerchantReceipt

        public boolean hasShowOnMerchantReceipt()
        Checks whether the 'showOnMerchantReceipt' field has been set, however the value could be null
      • hasShowOnCustomerReceipt

        public boolean hasShowOnCustomerReceipt()
        Checks whether the 'showOnCustomerReceipt' field has been set, however the value could be null
      • hasShowOnDisplay

        public boolean hasShowOnDisplay()
        Checks whether the 'showOnDisplay' field has been set, however the value could be null
      • setShowOnMerchantReceipt

        public PromotionalMessage setShowOnMerchantReceipt​(Boolean showOnMerchantReceipt)
        Sets the field 'showOnMerchantReceipt'.
      • setShowOnCustomerReceipt

        public PromotionalMessage setShowOnCustomerReceipt​(Boolean showOnCustomerReceipt)
        Sets the field 'showOnCustomerReceipt'.
      • clearMessage

        public void clearMessage()
        Clears the 'message' field, the 'has' method for this field will now return false
      • clearShowOnMerchantReceipt

        public void clearShowOnMerchantReceipt()
        Clears the 'showOnMerchantReceipt' field, the 'has' method for this field will now return false
      • clearShowOnCustomerReceipt

        public void clearShowOnCustomerReceipt()
        Clears the 'showOnCustomerReceipt' field, the 'has' method for this field will now return false
      • clearShowOnDisplay

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

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