Class CardlessPaymentData

    • Constructor Detail

      • CardlessPaymentData

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

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

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

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

      • getPaymentData

        public String getPaymentData()
        QR code or barcode data
      • 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
      • isNotNullPaymentNetwork

        public boolean isNotNullPaymentNetwork()
        Checks whether the 'paymentNetwork' field is set and is not null
      • isNotNullPaymentType

        public boolean isNotNullPaymentType()
        Checks whether the 'paymentType' field is set and is not null
      • isNotNullPaymentData

        public boolean isNotNullPaymentData()
        Checks whether the 'paymentData' field is set and is not null
      • hasPaymentNetwork

        public boolean hasPaymentNetwork()
        Checks whether the 'paymentNetwork' field has been set, however the value could be null
      • hasPaymentType

        public boolean hasPaymentType()
        Checks whether the 'paymentType' field has been set, however the value could be null
      • hasPaymentData

        public boolean hasPaymentData()
        Checks whether the 'paymentData' field has been set, however the value could be null
      • clearPaymentNetwork

        public void clearPaymentNetwork()
        Clears the 'paymentNetwork' field, the 'has' method for this field will now return false
      • clearPaymentType

        public void clearPaymentType()
        Clears the 'paymentType' field, the 'has' method for this field will now return false
      • clearPaymentData

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

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