com.adyen.model.payout.StoreDetailAndSubmitResponse 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;
/**
* StoreDetailAndSubmitResponse
*/
@JsonPropertyOrder({
StoreDetailAndSubmitResponse.JSON_PROPERTY_ADDITIONAL_DATA,
StoreDetailAndSubmitResponse.JSON_PROPERTY_PSP_REFERENCE,
StoreDetailAndSubmitResponse.JSON_PROPERTY_REFUSAL_REASON,
StoreDetailAndSubmitResponse.JSON_PROPERTY_RESULT_CODE
})
public class StoreDetailAndSubmitResponse {
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 StoreDetailAndSubmitResponse() {
}
public StoreDetailAndSubmitResponse additionalData(Map additionalData) {
this.additionalData = additionalData;
return this;
}
public StoreDetailAndSubmitResponse 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 StoreDetailAndSubmitResponse 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;
}
/**
* A new reference to uniquely identify this request.
*
* @param pspReference
*/
@JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPspReference(String pspReference) {
this.pspReference = pspReference;
}
public StoreDetailAndSubmitResponse 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;
}
/**
* In case of refusal, an informational message for the reason.
*
* @param refusalReason
*/
@JsonProperty(JSON_PROPERTY_REFUSAL_REASON)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRefusalReason(String refusalReason) {
this.refusalReason = refusalReason;
}
public StoreDetailAndSubmitResponse resultCode(String resultCode) {
this.resultCode = resultCode;
return this;
}
/**
* The response: * In case of success 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 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;
}
/**
* The response: * In case of success is payout-submit-received. * In case of an error, an informational message is returned.
*
* @param resultCode
*/
@JsonProperty(JSON_PROPERTY_RESULT_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setResultCode(String resultCode) {
this.resultCode = resultCode;
}
/**
* Return true if this StoreDetailAndSubmitResponse object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
StoreDetailAndSubmitResponse storeDetailAndSubmitResponse = (StoreDetailAndSubmitResponse) o;
return Objects.equals(this.additionalData, storeDetailAndSubmitResponse.additionalData) &&
Objects.equals(this.pspReference, storeDetailAndSubmitResponse.pspReference) &&
Objects.equals(this.refusalReason, storeDetailAndSubmitResponse.refusalReason) &&
Objects.equals(this.resultCode, storeDetailAndSubmitResponse.resultCode);
}
@Override
public int hashCode() {
return Objects.hash(additionalData, pspReference, refusalReason, resultCode);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class StoreDetailAndSubmitResponse {\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 StoreDetailAndSubmitResponse given an JSON string
*
* @param jsonString JSON string
* @return An instance of StoreDetailAndSubmitResponse
* @throws JsonProcessingException if the JSON string is invalid with respect to StoreDetailAndSubmitResponse
*/
public static StoreDetailAndSubmitResponse fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, StoreDetailAndSubmitResponse.class);
}
/**
* Convert an instance of StoreDetailAndSubmitResponse to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}