com.adyen.model.payout.SubmitResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adyen-java-api-library Show documentation
Show all versions of adyen-java-api-library Show documentation
Adyen API Client Library for Java
/*
* Adyen Payout API
*
* The version of the OpenAPI document: 68
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.adyen.model.payout;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* SubmitResponse
*/
@JsonPropertyOrder({
SubmitResponse.JSON_PROPERTY_ADDITIONAL_DATA,
SubmitResponse.JSON_PROPERTY_PSP_REFERENCE,
SubmitResponse.JSON_PROPERTY_REFUSAL_REASON,
SubmitResponse.JSON_PROPERTY_RESULT_CODE
})
public class SubmitResponse {
public static final String JSON_PROPERTY_ADDITIONAL_DATA = "additionalData";
private Map additionalData = null;
public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
private String pspReference;
public static final String JSON_PROPERTY_REFUSAL_REASON = "refusalReason";
private String refusalReason;
public static final String JSON_PROPERTY_RESULT_CODE = "resultCode";
private String resultCode;
public SubmitResponse() {
}
public SubmitResponse additionalData(Map additionalData) {
this.additionalData = additionalData;
return this;
}
public SubmitResponse putAdditionalDataItem(String key, String additionalDataItem) {
if (this.additionalData == null) {
this.additionalData = new HashMap<>();
}
this.additionalData.put(key, additionalDataItem);
return this;
}
/**
* This field contains additional data, which may be returned in a particular response.
* @return additionalData
**/
@ApiModelProperty(value = "This field contains additional data, which may be returned in a particular response.")
@JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map getAdditionalData() {
return additionalData;
}
@JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAdditionalData(Map additionalData) {
this.additionalData = additionalData;
}
public SubmitResponse pspReference(String pspReference) {
this.pspReference = pspReference;
return this;
}
/**
* A new reference to uniquely identify this request.
* @return pspReference
**/
@ApiModelProperty(required = true, value = "A new reference to uniquely identify this request.")
@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPspReference() {
return pspReference;
}
@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPspReference(String pspReference) {
this.pspReference = pspReference;
}
public SubmitResponse refusalReason(String refusalReason) {
this.refusalReason = refusalReason;
return this;
}
/**
* In case of refusal, an informational message for the reason.
* @return refusalReason
**/
@ApiModelProperty(value = "In case of refusal, an informational message for the reason.")
@JsonProperty(JSON_PROPERTY_REFUSAL_REASON)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRefusalReason() {
return refusalReason;
}
@JsonProperty(JSON_PROPERTY_REFUSAL_REASON)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRefusalReason(String refusalReason) {
this.refusalReason = refusalReason;
}
public SubmitResponse resultCode(String resultCode) {
this.resultCode = resultCode;
return this;
}
/**
* The response: * In case of success, it is `payout-submit-received`. * In case of an error, an informational message is returned.
* @return resultCode
**/
@ApiModelProperty(required = true, value = "The response: * In case of success, it is `payout-submit-received`. * In case of an error, an informational message is returned.")
@JsonProperty(JSON_PROPERTY_RESULT_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getResultCode() {
return resultCode;
}
@JsonProperty(JSON_PROPERTY_RESULT_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setResultCode(String resultCode) {
this.resultCode = resultCode;
}
/**
* Return true if this SubmitResponse object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SubmitResponse submitResponse = (SubmitResponse) o;
return Objects.equals(this.additionalData, submitResponse.additionalData) &&
Objects.equals(this.pspReference, submitResponse.pspReference) &&
Objects.equals(this.refusalReason, submitResponse.refusalReason) &&
Objects.equals(this.resultCode, submitResponse.resultCode);
}
@Override
public int hashCode() {
return Objects.hash(additionalData, pspReference, refusalReason, resultCode);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SubmitResponse {\n");
sb.append(" additionalData: ").append(toIndentedString(additionalData)).append("\n");
sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n");
sb.append(" refusalReason: ").append(toIndentedString(refusalReason)).append("\n");
sb.append(" resultCode: ").append(toIndentedString(resultCode)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Create an instance of SubmitResponse given an JSON string
*
* @param jsonString JSON string
* @return An instance of SubmitResponse
* @throws JsonProcessingException if the JSON string is invalid with respect to SubmitResponse
*/
public static SubmitResponse fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, SubmitResponse.class);
}
/**
* Convert an instance of SubmitResponse to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}