Package com.adyen.model.payment
Class ServiceError
- java.lang.Object
-
- com.adyen.model.payment.ServiceError
-
public class ServiceError 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_MESSAGEstatic StringJSON_PROPERTY_PSP_REFERENCEstatic StringJSON_PROPERTY_STATUS
-
Constructor Summary
Constructors Constructor Description ServiceError()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceErroradditionalData(Map<String,String> additionalData)booleanequals(Object o)Return true if this ServiceError object is equal to o.ServiceErrorerrorCode(String errorCode)ServiceErrorerrorType(String errorType)static ServiceErrorfromJson(String jsonString)Create an instance of ServiceError 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.StringgetMessage()A short explanation of the issue.StringgetPspReference()The PSP reference of the payment.IntegergetStatus()The HTTP response status.inthashCode()ServiceErrormessage(String message)ServiceErrorpspReference(String pspReference)ServiceErrorputAdditionalDataItem(String key, String additionalDataItem)voidsetAdditionalData(Map<String,String> additionalData)Contains additional information about the payment.voidsetErrorCode(String errorCode)The error code mapped to the error message.voidsetErrorType(String errorType)The category of the error.voidsetMessage(String message)A short explanation of the issue.voidsetPspReference(String pspReference)The PSP reference of the payment.voidsetStatus(Integer status)The HTTP response status.ServiceErrorstatus(Integer status)StringtoJson()Convert an instance of ServiceError to an JSON stringStringtoString()
-
-
-
Field Detail
-
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
-
additionalData
public ServiceError additionalData(Map<String,String> additionalData)
-
putAdditionalDataItem
public ServiceError 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)
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)
-
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)
-
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)
-
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)
-
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)
-
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.
-
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
-
-