Package com.adyen.model.tapi
Class Response
- java.lang.Object
-
- com.adyen.model.tapi.Response
-
public class Response extends Object
Result of a message request processing. If Result is Success, `ErrorCondition` is absent or not used in the processing of the message. In the other cases, the `ErrorCondition` has to be present and can refine the processing of the message response. `AdditionalResponse` gives more information about the success or the failure of the message request processing, for logging without real time involvements.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_ADDITIONAL_RESPONSEstatic StringJSON_PROPERTY_ERROR_CONDITIONstatic StringJSON_PROPERTY_RESULT
-
Constructor Summary
Constructors Constructor Description Response()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseadditionalResponse(String additionalResponse)Additional information related to processing status of a message request.booleanequals(Object o)Return true if this Response object is equal to o.ResponseerrorCondition(ErrorCondition errorCondition)errorConditionstatic ResponsefromJson(String jsonString)Create an instance of Response given an JSON stringStringgetAdditionalResponse()Additional information related to processing status of a message request.ErrorConditiongetErrorCondition()Get errorConditionMap<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.ResultgetResult()Get resultinthashCode()ResponseincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.Responseresult(Result result)resultvoidsetAdditionalResponse(String additionalResponse)Additional information related to processing status of a message request.voidsetErrorCondition(ErrorCondition errorCondition)errorConditionvoidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetResult(Result result)resultStringtoJson()Convert an instance of Response to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_RESULT
public static final String JSON_PROPERTY_RESULT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ERROR_CONDITION
public static final String JSON_PROPERTY_ERROR_CONDITION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ADDITIONAL_RESPONSE
public static final String JSON_PROPERTY_ADDITIONAL_RESPONSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
result
public Response result(Result result)
result- Parameters:
result-- Returns:
- the current
Responseinstance, allowing for method chaining
-
getResult
public Result getResult()
Get result- Returns:
- result
-
setResult
public void setResult(Result result)
result- Parameters:
result-
-
errorCondition
public Response errorCondition(ErrorCondition errorCondition)
errorCondition- Parameters:
errorCondition-- Returns:
- the current
Responseinstance, allowing for method chaining
-
getErrorCondition
public ErrorCondition getErrorCondition()
Get errorCondition- Returns:
- errorCondition
-
setErrorCondition
public void setErrorCondition(ErrorCondition errorCondition)
errorCondition- Parameters:
errorCondition-
-
additionalResponse
public Response additionalResponse(String additionalResponse)
Additional information related to processing status of a message request. If present, the POI logs it for further examination.- Parameters:
additionalResponse- Additional information related to processing status of a message request. If present, the POI logs it for further examination.- Returns:
- the current
Responseinstance, allowing for method chaining
-
getAdditionalResponse
public String getAdditionalResponse()
Additional information related to processing status of a message request. If present, the POI logs it for further examination.- Returns:
- additionalResponse Additional information related to processing status of a message request. If present, the POI logs it for further examination.
-
setAdditionalResponse
public void setAdditionalResponse(String additionalResponse)
Additional information related to processing status of a message request. If present, the POI logs it for further examination.- Parameters:
additionalResponse- Additional information related to processing status of a message request. If present, the POI logs it for further examination.
-
includeNullValues
public Response includeNullValues(boolean includeNullValues)
Configures whether null values are explicitly serialized in the JSON payload. Default is false.
-
isIncludeNullValues
public boolean isIncludeNullValues()
Returns whether null values are explicitly serialized in the JSON payload.
-
setIncludeNullValues
public void setIncludeNullValues(boolean includeNullValues)
Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
-
equals
public boolean equals(Object o)
Return true if this Response object is equal to o.
-
getExplicitNulls
public Map<String,Object> getExplicitNulls()
Returns a map of properties to be merged into the JSON payload as explicit null values.
-
fromJson
public static Response fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Response given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Response
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Response
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Response to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-