Class ServiceError


  • public class ServiceError
    extends Object
    ServiceError
    • Constructor Detail

      • ServiceError

        public ServiceError()
    • Method Detail

      • additionalData

        public ServiceError additionalData​(Map<String,​String> additionalData)
        Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.
        Parameters:
        additionalData -
        Returns:
        the current ServiceError instance, allowing for method chaining
      • getAdditionalData

        public Map<String,​String> getAdditionalData()
        Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.
        Returns:
        additionalData
      • setAdditionalData

        public void setAdditionalData​(Map<String,​String> additionalData)
        Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.
        Parameters:
        additionalData -
      • errorCode

        public ServiceError errorCode​(String errorCode)
        The error code mapped to the error message.
        Parameters:
        errorCode -
        Returns:
        the current ServiceError instance, allowing for method chaining
      • getErrorCode

        public String getErrorCode()
        The error code mapped to the error message.
        Returns:
        errorCode
      • setErrorCode

        public void setErrorCode​(String errorCode)
        The error code mapped to the error message.
        Parameters:
        errorCode -
      • errorType

        public ServiceError errorType​(String errorType)
        The category of the error.
        Parameters:
        errorType -
        Returns:
        the current ServiceError instance, allowing for method chaining
      • getErrorType

        public String getErrorType()
        The category of the error.
        Returns:
        errorType
      • setErrorType

        public void setErrorType​(String errorType)
        The category of the error.
        Parameters:
        errorType -
      • message

        public ServiceError message​(String message)
        A short explanation of the issue.
        Parameters:
        message -
        Returns:
        the current ServiceError instance, allowing for method chaining
      • getMessage

        public String getMessage()
        A short explanation of the issue.
        Returns:
        message
      • setMessage

        public void setMessage​(String message)
        A short explanation of the issue.
        Parameters:
        message -
      • pspReference

        public ServiceError pspReference​(String pspReference)
        The PSP reference of the payment.
        Parameters:
        pspReference -
        Returns:
        the current ServiceError instance, allowing for method chaining
      • getPspReference

        public String getPspReference()
        The PSP reference of the payment.
        Returns:
        pspReference
      • setPspReference

        public void setPspReference​(String pspReference)
        The PSP reference of the payment.
        Parameters:
        pspReference -
      • status

        public ServiceError status​(Integer status)
        The HTTP response status.
        Parameters:
        status -
        Returns:
        the current ServiceError instance, allowing for method chaining
      • getStatus

        public Integer getStatus()
        The HTTP response status.
        Returns:
        status
      • setStatus

        public void setStatus​(Integer status)
        The HTTP response status.
        Parameters:
        status -
      • equals

        public boolean equals​(Object o)
        Return true if this ServiceError object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromJson

        public static ServiceError fromJson​(String jsonString)
                                     throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of ServiceError given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of ServiceError
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to ServiceError
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of ServiceError to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException