Package com.adyen.model.management
Class RestServiceError
- java.lang.Object
-
- com.adyen.model.management.RestServiceError
-
public class RestServiceError extends Object
RestServiceError
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_DETAILstatic StringJSON_PROPERTY_ERROR_CODEstatic StringJSON_PROPERTY_INSTANCEstatic StringJSON_PROPERTY_INVALID_FIELDSstatic StringJSON_PROPERTY_REQUEST_IDstatic StringJSON_PROPERTY_RESPONSEstatic StringJSON_PROPERTY_STATUSstatic StringJSON_PROPERTY_TITLEstatic StringJSON_PROPERTY_TYPE
-
Constructor Summary
Constructors Constructor Description RestServiceError()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RestServiceErroraddInvalidFieldsItem(InvalidFieldWrapper invalidFieldsItem)RestServiceErrordetail(String detail)booleanequals(Object o)Return true if this RestServiceError object is equal to o.RestServiceErrorerrorCode(String errorCode)static RestServiceErrorfromJson(String jsonString)Create an instance of RestServiceError given an JSON stringStringgetDetail()A human-readable explanation specific to this occurrence of the problem.StringgetErrorCode()A code that identifies the problem type.StringgetInstance()A unique URI that identifies the specific occurrence of the problem.List<InvalidFieldWrapper>getInvalidFields()Detailed explanation of each validation error, when applicable.StringgetRequestId()A unique reference for the request, essentially the same as `pspReference`.JSONObjectgetResponse()Get responseIntegergetStatus()The HTTP status code.StringgetTitle()A short, human-readable summary of the problem type.StringgetType()A URI that identifies the problem type, pointing to human-readable documentation on this problem type.inthashCode()RestServiceErrorinstance(String instance)RestServiceErrorinvalidFields(List<InvalidFieldWrapper> invalidFields)RestServiceErrorrequestId(String requestId)RestServiceErrorresponse(JSONObject response)voidsetDetail(String detail)voidsetErrorCode(String errorCode)voidsetInstance(String instance)voidsetInvalidFields(List<InvalidFieldWrapper> invalidFields)voidsetRequestId(String requestId)voidsetResponse(JSONObject response)voidsetStatus(Integer status)voidsetTitle(String title)voidsetType(String type)RestServiceErrorstatus(Integer status)RestServiceErrortitle(String title)StringtoJson()Convert an instance of RestServiceError to an JSON stringStringtoString()RestServiceErrortype(String type)
-
-
-
Field Detail
-
JSON_PROPERTY_DETAIL
public static final String JSON_PROPERTY_DETAIL
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ERROR_CODE
public static final String JSON_PROPERTY_ERROR_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_INSTANCE
public static final String JSON_PROPERTY_INSTANCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_INVALID_FIELDS
public static final String JSON_PROPERTY_INVALID_FIELDS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REQUEST_ID
public static final String JSON_PROPERTY_REQUEST_ID
- See Also:
- Constant Field Values
-
JSON_PROPERTY_RESPONSE
public static final String JSON_PROPERTY_RESPONSE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STATUS
public static final String JSON_PROPERTY_STATUS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TITLE
public static final String JSON_PROPERTY_TITLE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TYPE
public static final String JSON_PROPERTY_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
detail
public RestServiceError detail(String detail)
-
getDetail
public String getDetail()
A human-readable explanation specific to this occurrence of the problem.- Returns:
- detail
-
setDetail
public void setDetail(String detail)
-
errorCode
public RestServiceError errorCode(String errorCode)
-
getErrorCode
public String getErrorCode()
A code that identifies the problem type.- Returns:
- errorCode
-
setErrorCode
public void setErrorCode(String errorCode)
-
instance
public RestServiceError instance(String instance)
-
getInstance
public String getInstance()
A unique URI that identifies the specific occurrence of the problem.- Returns:
- instance
-
setInstance
public void setInstance(String instance)
-
invalidFields
public RestServiceError invalidFields(List<InvalidFieldWrapper> invalidFields)
-
addInvalidFieldsItem
public RestServiceError addInvalidFieldsItem(InvalidFieldWrapper invalidFieldsItem)
-
getInvalidFields
public List<InvalidFieldWrapper> getInvalidFields()
Detailed explanation of each validation error, when applicable.- Returns:
- invalidFields
-
setInvalidFields
public void setInvalidFields(List<InvalidFieldWrapper> invalidFields)
-
requestId
public RestServiceError requestId(String requestId)
-
getRequestId
public String getRequestId()
A unique reference for the request, essentially the same as `pspReference`.- Returns:
- requestId
-
setRequestId
public void setRequestId(String requestId)
-
response
public RestServiceError response(JSONObject response)
-
getResponse
public JSONObject getResponse()
Get response- Returns:
- response
-
setResponse
public void setResponse(JSONObject response)
-
status
public RestServiceError status(Integer status)
-
getStatus
public Integer getStatus()
The HTTP status code.- Returns:
- status
-
setStatus
public void setStatus(Integer status)
-
title
public RestServiceError title(String title)
-
getTitle
public String getTitle()
A short, human-readable summary of the problem type.- Returns:
- title
-
setTitle
public void setTitle(String title)
-
type
public RestServiceError type(String type)
-
getType
public String getType()
A URI that identifies the problem type, pointing to human-readable documentation on this problem type.- Returns:
- type
-
setType
public void setType(String type)
-
equals
public boolean equals(Object o)
Return true if this RestServiceError object is equal to o.
-
fromJson
public static RestServiceError fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of RestServiceError given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of RestServiceError
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to RestServiceError
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of RestServiceError to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-