Package com.adyen.model
Class ApiError
- java.lang.Object
-
- com.adyen.model.ApiError
-
public class ApiError extends Object
ServiceError
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_ADDITIONAL_DATAstatic StringJSON_PROPERTY_ERROR_CODEstatic StringJSON_PROPERTY_ERROR_TYPEstatic StringJSON_PROPERTY_INVALID_FIELDSstatic StringJSON_PROPERTY_MESSAGEstatic StringJSON_PROPERTY_PSP_REFERENCEstatic StringJSON_PROPERTY_STATUS
-
Constructor Summary
Constructors Constructor Description ApiError()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ApiErroraddInvalidFieldsItem(InvalidField invalidFieldsItem)ApiErroradditionalData(Map<String,String> additionalData)booleanequals(Object o)Return true if this ServiceError object is equal to o.ApiErrorerrorCode(String errorCode)ApiErrorerrorType(String errorType)static ApiErrorfromJson(String jsonString)Create an instance of ApiError given an JSON stringMap<String,String>getAdditionalData()Contains additional information about the payment.StringgetErrorCode()The error code mapped to the error message.StringgetErrorType()The category of the error.List<InvalidField>getInvalidFields()Detailed explanation of each validation error, when applicable.StringgetMessage()A short explanation of the issue.StringgetPspReference()The PSP reference of the payment.IntegergetStatus()The HTTP response status.inthashCode()ApiErrorinvalidFields(List<InvalidField> invalidFields)ApiErrormessage(String message)ApiErrorpspReference(String pspReference)ApiErrorputAdditionalDataItem(String key, String additionalDataItem)voidsetAdditionalData(Map<String,String> additionalData)voidsetErrorCode(String errorCode)voidsetErrorType(String errorType)voidsetInvalidFields(List<InvalidField> invalidFields)voidsetMessage(String message)voidsetPspReference(String pspReference)voidsetStatus(Integer status)ApiErrorstatus(Integer status)StringtoJson()Convert an instance of ApiError to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_INVALID_FIELDS
public static final String JSON_PROPERTY_INVALID_FIELDS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ADDITIONAL_DATA
public static final String JSON_PROPERTY_ADDITIONAL_DATA
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ERROR_CODE
public static final String JSON_PROPERTY_ERROR_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ERROR_TYPE
public static final String JSON_PROPERTY_ERROR_TYPE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_MESSAGE
public static final String JSON_PROPERTY_MESSAGE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PSP_REFERENCE
public static final String JSON_PROPERTY_PSP_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STATUS
public static final String JSON_PROPERTY_STATUS
- See Also:
- Constant Field Values
-
-
Method Detail
-
invalidFields
public ApiError invalidFields(List<InvalidField> invalidFields)
-
addInvalidFieldsItem
public ApiError addInvalidFieldsItem(InvalidField invalidFieldsItem)
-
getInvalidFields
public List<InvalidField> getInvalidFields()
Detailed explanation of each validation error, when applicable.- Returns:
- invalidFields
-
setInvalidFields
public void setInvalidFields(List<InvalidField> invalidFields)
-
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
-
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)
-
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.
-
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
-
-