Package com.adyen.model.storedvalue
Class ServiceError
- java.lang.Object
-
- com.adyen.model.storedvalue.ServiceError
-
public class ServiceError extends Object
ServiceError
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServiceError.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_ADDITIONAL_DATAstatic StringSERIALIZED_NAME_ERROR_CODEstatic StringSERIALIZED_NAME_ERROR_TYPEstatic StringSERIALIZED_NAME_MESSAGEstatic StringSERIALIZED_NAME_PSP_REFERENCEstatic StringSERIALIZED_NAME_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)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)voidsetErrorCode(String errorCode)voidsetErrorType(String errorType)voidsetMessage(String message)voidsetPspReference(String pspReference)voidsetStatus(Integer status)ServiceErrorstatus(Integer status)StringtoJson()Convert an instance of ServiceError to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_ADDITIONAL_DATA
public static final String SERIALIZED_NAME_ADDITIONAL_DATA
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ERROR_CODE
public static final String SERIALIZED_NAME_ERROR_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ERROR_TYPE
public static final String SERIALIZED_NAME_ERROR_TYPE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MESSAGE
public static final String SERIALIZED_NAME_MESSAGE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PSP_REFERENCE
public static final String SERIALIZED_NAME_PSP_REFERENCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STATUS
public static final String SERIALIZED_NAME_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
-
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)
-
errorType
public ServiceError errorType(String errorType)
-
getErrorType
public String getErrorType()
The category of the error.- Returns:
- errorType
-
setErrorType
public void setErrorType(String 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)
-
pspReference
public ServiceError pspReference(String pspReference)
-
getPspReference
public String getPspReference()
The PSP reference of the payment.- Returns:
- pspReference
-
setPspReference
public void setPspReference(String pspReference)
-
status
public ServiceError status(Integer status)
-
getStatus
public Integer getStatus()
The HTTP response status.- Returns:
- status
-
setStatus
public void setStatus(Integer status)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to ServiceError
-
fromJson
public static ServiceError fromJson(String jsonString) throws IOException
Create an instance of ServiceError given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ServiceError
- Throws:
IOException- if the JSON string is invalid with respect to ServiceError
-
toJson
public String toJson()
Convert an instance of ServiceError to an JSON string- Returns:
- JSON string
-
-