Class PaymentResponse

    • Constructor Detail

      • PaymentResponse

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

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

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

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

      • getRequestSuccessful

        public Boolean getRequestSuccessful()
      • getResponseErrorMessage

        public String getResponseErrorMessage()
      • getPayment

        public Payment getPayment()
      • getClientData

        public Map<String,​String> getClientData()
        Additional data sent back from the gateway
      • getSyncPaymentObject

        public Boolean getSyncPaymentObject()
      • 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
      • isNotNullRequestSuccessful

        public boolean isNotNullRequestSuccessful()
        Checks whether the 'requestSuccessful' field is set and is not null
      • isNotNullResponseErrorMessage

        public boolean isNotNullResponseErrorMessage()
        Checks whether the 'responseErrorMessage' field is set and is not null
      • isNotNullPayment

        public boolean isNotNullPayment()
        Checks whether the 'payment' field is set and is not null
      • isNotNullClientData

        public boolean isNotNullClientData()
        Checks whether the 'clientData' field is set and is not null
      • isNotEmptyClientData

        public boolean isNotEmptyClientData()
        Checks whether the 'clientData' field is set and is not null and is not empty
      • isNotNullSyncPaymentObject

        public boolean isNotNullSyncPaymentObject()
        Checks whether the 'syncPaymentObject' field is set and is not null
      • hasRequestSuccessful

        public boolean hasRequestSuccessful()
        Checks whether the 'requestSuccessful' field has been set, however the value could be null
      • hasResponseErrorMessage

        public boolean hasResponseErrorMessage()
        Checks whether the 'responseErrorMessage' field has been set, however the value could be null
      • hasPayment

        public boolean hasPayment()
        Checks whether the 'payment' field has been set, however the value could be null
      • hasClientData

        public boolean hasClientData()
        Checks whether the 'clientData' field has been set, however the value could be null
      • hasSyncPaymentObject

        public boolean hasSyncPaymentObject()
        Checks whether the 'syncPaymentObject' field has been set, however the value could be null
      • setRequestSuccessful

        public PaymentResponse setRequestSuccessful​(Boolean requestSuccessful)
        Sets the field 'requestSuccessful'.
      • setResponseErrorMessage

        public PaymentResponse setResponseErrorMessage​(String responseErrorMessage)
        Sets the field 'responseErrorMessage'.
      • setPayment

        public PaymentResponse setPayment​(Payment payment)
        Sets the field 'payment'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setSyncPaymentObject

        public PaymentResponse setSyncPaymentObject​(Boolean syncPaymentObject)
        Sets the field 'syncPaymentObject'.
      • clearRequestSuccessful

        public void clearRequestSuccessful()
        Clears the 'requestSuccessful' field, the 'has' method for this field will now return false
      • clearResponseErrorMessage

        public void clearResponseErrorMessage()
        Clears the 'responseErrorMessage' field, the 'has' method for this field will now return false
      • clearPayment

        public void clearPayment()
        Clears the 'payment' field, the 'has' method for this field will now return false
      • clearClientData

        public void clearClientData()
        Clears the 'clientData' field, the 'has' method for this field will now return false
      • clearSyncPaymentObject

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

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