Class ApiError


  • public class ApiError
    extends Object
    ServiceError
    • Constructor Detail

      • ApiError

        public ApiError()
    • Method Detail

      • getInvalidFields

        public List<InvalidField> getInvalidFields()
        Detailed explanation of each validation error, when applicable.
        Returns:
        invalidFields
      • setInvalidFields

        public void setInvalidFields​(List<InvalidField> invalidFields)
      • putAdditionalDataItem

        public ApiError putAdditionalDataItem​(String key,
                                              String additionalDataItem)
      • 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)
      • getErrorCode

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

        public void setErrorCode​(String errorCode)
      • getErrorType

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

        public void setErrorType​(String errorType)
      • getMessage

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

        public void setMessage​(String message)
      • pspReference

        public ApiError pspReference​(String pspReference)
      • getPspReference

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

        public void setPspReference​(String pspReference)
      • getStatus

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

        public void setStatus​(Integer 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 ApiError fromJson​(String jsonString)
                                 throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of ApiError 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 ApiError to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException