com.adyen.model.payout.ModifyResponse Maven / Gradle / Ivy
/*
* 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;
/**
* ModifyResponse
*/
@JsonPropertyOrder({
ModifyResponse.JSON_PROPERTY_ADDITIONAL_DATA,
ModifyResponse.JSON_PROPERTY_PSP_REFERENCE,
ModifyResponse.JSON_PROPERTY_RESPONSE
})
public class ModifyResponse {
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_RESPONSE = "response";
private String response;
public ModifyResponse() {
}
public ModifyResponse additionalData(Map additionalData) {
this.additionalData = additionalData;
return this;
}
public ModifyResponse 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;
}
/**
* This field contains additional data, which may be returned in a particular response.
*
* @param additionalData
*/
@JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAdditionalData(Map additionalData) {
this.additionalData = additionalData;
}
public ModifyResponse pspReference(String pspReference) {
this.pspReference = pspReference;
return this;
}
/**
* Adyen's 16-character string reference associated with the transaction. This value is globally unique; quote it when communicating with us about this response.
* @return pspReference
**/
@ApiModelProperty(required = true, value = "Adyen's 16-character string reference associated with the transaction. This value is globally unique; quote it when communicating with us about this response.")
@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPspReference() {
return pspReference;
}
/**
* Adyen's 16-character string reference associated with the transaction. This value is globally unique; quote it when communicating with us about this response.
*
* @param pspReference
*/
@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPspReference(String pspReference) {
this.pspReference = pspReference;
}
public ModifyResponse response(String response) {
this.response = response;
return this;
}
/**
* The response: * In case of success, it is either `payout-confirm-received` or `payout-decline-received`. * In case of an error, an informational message is returned.
* @return response
**/
@ApiModelProperty(required = true, value = "The response: * In case of success, it is either `payout-confirm-received` or `payout-decline-received`. * In case of an error, an informational message is returned.")
@JsonProperty(JSON_PROPERTY_RESPONSE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getResponse() {
return response;
}
/**
* The response: * In case of success, it is either `payout-confirm-received` or `payout-decline-received`. * In case of an error, an informational message is returned.
*
* @param response
*/
@JsonProperty(JSON_PROPERTY_RESPONSE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setResponse(String response) {
this.response = response;
}
/**
* Return true if this ModifyResponse object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModifyResponse modifyResponse = (ModifyResponse) o;
return Objects.equals(this.additionalData, modifyResponse.additionalData) &&
Objects.equals(this.pspReference, modifyResponse.pspReference) &&
Objects.equals(this.response, modifyResponse.response);
}
@Override
public int hashCode() {
return Objects.hash(additionalData, pspReference, response);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModifyResponse {\n");
sb.append(" additionalData: ").append(toIndentedString(additionalData)).append("\n");
sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n");
sb.append(" response: ").append(toIndentedString(response)).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 ModifyResponse given an JSON string
*
* @param jsonString JSON string
* @return An instance of ModifyResponse
* @throws JsonProcessingException if the JSON string is invalid with respect to ModifyResponse
*/
public static ModifyResponse fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, ModifyResponse.class);
}
/**
* Convert an instance of ModifyResponse to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}