
com.adyen.model.transfers.Counterparty 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
/*
* Transfers API
*
* The version of the OpenAPI document: 4
*
*
* 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.transfers;
import java.util.Objects;
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 java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* Counterparty
*/
@JsonPropertyOrder({
Counterparty.JSON_PROPERTY_ACCOUNT_HOLDER_ID,
Counterparty.JSON_PROPERTY_BALANCE_ACCOUNT_ID,
Counterparty.JSON_PROPERTY_TRANSFER_INSTRUMENT_ID
})
public class Counterparty {
public static final String JSON_PROPERTY_ACCOUNT_HOLDER_ID = "accountHolderId";
private String accountHolderId;
public static final String JSON_PROPERTY_BALANCE_ACCOUNT_ID = "balanceAccountId";
private String balanceAccountId;
public static final String JSON_PROPERTY_TRANSFER_INSTRUMENT_ID = "transferInstrumentId";
private String transferInstrumentId;
public Counterparty() {
}
/**
* The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided.
*
* @param accountHolderId The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided.
* @return the current {@code Counterparty} instance, allowing for method chaining
*/
public Counterparty accountHolderId(String accountHolderId) {
this.accountHolderId = accountHolderId;
return this;
}
/**
* The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided.
* @return accountHolderId The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getAccountHolderId() {
return accountHolderId;
}
/**
* The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided.
*
* @param accountHolderId The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountHolderId(String accountHolderId) {
this.accountHolderId = accountHolderId;
}
/**
* The identifier of the balance account that belongs to the receiving account holder.
*
* @param balanceAccountId The identifier of the balance account that belongs to the receiving account holder.
* @return the current {@code Counterparty} instance, allowing for method chaining
*/
public Counterparty balanceAccountId(String balanceAccountId) {
this.balanceAccountId = balanceAccountId;
return this;
}
/**
* The identifier of the balance account that belongs to the receiving account holder.
* @return balanceAccountId The identifier of the balance account that belongs to the receiving account holder.
*/
@JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBalanceAccountId() {
return balanceAccountId;
}
/**
* The identifier of the balance account that belongs to the receiving account holder.
*
* @param balanceAccountId The identifier of the balance account that belongs to the receiving account holder.
*/
@JsonProperty(JSON_PROPERTY_BALANCE_ACCOUNT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBalanceAccountId(String balanceAccountId) {
this.balanceAccountId = balanceAccountId;
}
/**
* The identifier of the transfer instrument that belongs to the legal entity of the account holder.
*
* @param transferInstrumentId The identifier of the transfer instrument that belongs to the legal entity of the account holder.
* @return the current {@code Counterparty} instance, allowing for method chaining
*/
public Counterparty transferInstrumentId(String transferInstrumentId) {
this.transferInstrumentId = transferInstrumentId;
return this;
}
/**
* The identifier of the transfer instrument that belongs to the legal entity of the account holder.
* @return transferInstrumentId The identifier of the transfer instrument that belongs to the legal entity of the account holder.
*/
@JsonProperty(JSON_PROPERTY_TRANSFER_INSTRUMENT_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTransferInstrumentId() {
return transferInstrumentId;
}
/**
* The identifier of the transfer instrument that belongs to the legal entity of the account holder.
*
* @param transferInstrumentId The identifier of the transfer instrument that belongs to the legal entity of the account holder.
*/
@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.accountHolderId, counterparty.accountHolderId) &&
Objects.equals(this.balanceAccountId, counterparty.balanceAccountId) &&
Objects.equals(this.transferInstrumentId, counterparty.transferInstrumentId);
}
@Override
public int hashCode() {
return Objects.hash(accountHolderId, balanceAccountId, transferInstrumentId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Counterparty {\n");
sb.append(" accountHolderId: ").append(toIndentedString(accountHolderId)).append("\n");
sb.append(" balanceAccountId: ").append(toIndentedString(balanceAccountId)).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);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy