com.adyen.model.balanceplatform.Counterparty Maven / Gradle / Ivy
/*
* Configuration API
*
* The version of the OpenAPI document: 2
*
*
* 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.balanceplatform;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.balanceplatform.BankAccount;
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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* Counterparty
*/
@JsonPropertyOrder({
Counterparty.JSON_PROPERTY_BANK_ACCOUNT,
Counterparty.JSON_PROPERTY_TRANSFER_INSTRUMENT_ID
})
public class Counterparty {
public static final String JSON_PROPERTY_BANK_ACCOUNT = "bankAccount";
private BankAccount bankAccount;
public static final String JSON_PROPERTY_TRANSFER_INSTRUMENT_ID = "transferInstrumentId";
private String transferInstrumentId;
public Counterparty() {
}
public Counterparty bankAccount(BankAccount bankAccount) {
this.bankAccount = bankAccount;
return this;
}
/**
* Get bankAccount
* @return bankAccount
**/
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BANK_ACCOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BankAccount getBankAccount() {
return bankAccount;
}
/**
* bankAccount
*
* @param bankAccount
*/
@JsonProperty(JSON_PROPERTY_BANK_ACCOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBankAccount(BankAccount bankAccount) {
this.bankAccount = bankAccount;
}
public Counterparty transferInstrumentId(String transferInstrumentId) {
this.transferInstrumentId = transferInstrumentId;
return this;
}
/**
* The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id).
* @return transferInstrumentId
**/
@ApiModelProperty(value = "The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id).")
@JsonProperty(JSON_PROPERTY_TRANSFER_INSTRUMENT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTransferInstrumentId() {
return transferInstrumentId;
}
/**
* The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id).
*
* @param transferInstrumentId
*/
@JsonProperty(JSON_PROPERTY_TRANSFER_INSTRUMENT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTransferInstrumentId(String transferInstrumentId) {
this.transferInstrumentId = transferInstrumentId;
}
/**
* Return true if this Counterparty object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Counterparty counterparty = (Counterparty) o;
return Objects.equals(this.bankAccount, counterparty.bankAccount) &&
Objects.equals(this.transferInstrumentId, counterparty.transferInstrumentId);
}
@Override
public int hashCode() {
return Objects.hash(bankAccount, transferInstrumentId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Counterparty {\n");
sb.append(" bankAccount: ").append(toIndentedString(bankAccount)).append("\n");
sb.append(" transferInstrumentId: ").append(toIndentedString(transferInstrumentId)).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 Counterparty given an JSON string
*
* @param jsonString JSON string
* @return An instance of Counterparty
* @throws JsonProcessingException if the JSON string is invalid with respect to Counterparty
*/
public static Counterparty fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, Counterparty.class);
}
/**
* Convert an instance of Counterparty to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}