Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/java/com/adyen/model/transfers/CapitalGrant.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class CapitalGrant {
private boolean isSetBalances = false;

public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty";
private Counterparty counterparty;
private GrantCounterparty counterparty;

/** Mark when the attribute has been explicitly set. */
private boolean isSetCounterparty = false;
Expand Down Expand Up @@ -226,7 +226,7 @@ public void setBalances(CapitalBalance balances) {
* @param counterparty
* @return the current {@code CapitalGrant} instance, allowing for method chaining
*/
public CapitalGrant counterparty(Counterparty counterparty) {
public CapitalGrant counterparty(GrantCounterparty counterparty) {
this.counterparty = counterparty;
isSetCounterparty = true; // mark as set
return this;
Expand All @@ -239,7 +239,7 @@ public CapitalGrant counterparty(Counterparty counterparty) {
*/
@JsonProperty(JSON_PROPERTY_COUNTERPARTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Counterparty getCounterparty() {
public GrantCounterparty getCounterparty() {
return counterparty;
}

Expand All @@ -250,7 +250,7 @@ public Counterparty getCounterparty() {
*/
@JsonProperty(JSON_PROPERTY_COUNTERPARTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCounterparty(Counterparty counterparty) {
public void setCounterparty(GrantCounterparty counterparty) {
this.counterparty = counterparty;
isSetCounterparty = true; // mark as set
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
})
public class CapitalGrantInfo {
public static final String JSON_PROPERTY_COUNTERPARTY = "counterparty";
private Counterparty counterparty;
private GrantInfoCounterparty counterparty;

/** Mark when the attribute has been explicitly set. */
private boolean isSetCounterparty = false;
Expand Down Expand Up @@ -58,7 +58,7 @@ public CapitalGrantInfo() {}
* @param counterparty
* @return the current {@code CapitalGrantInfo} instance, allowing for method chaining
*/
public CapitalGrantInfo counterparty(Counterparty counterparty) {
public CapitalGrantInfo counterparty(GrantInfoCounterparty counterparty) {
this.counterparty = counterparty;
isSetCounterparty = true; // mark as set
return this;
Expand All @@ -71,7 +71,7 @@ public CapitalGrantInfo counterparty(Counterparty counterparty) {
*/
@JsonProperty(JSON_PROPERTY_COUNTERPARTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Counterparty getCounterparty() {
public GrantInfoCounterparty getCounterparty() {
return counterparty;
}

Expand All @@ -82,7 +82,7 @@ public Counterparty getCounterparty() {
*/
@JsonProperty(JSON_PROPERTY_COUNTERPARTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCounterparty(Counterparty counterparty) {
public void setCounterparty(GrantInfoCounterparty counterparty) {
this.counterparty = counterparty;
isSetCounterparty = true; // mark as set
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import java.util.*;

/** Counterparty */
/** GrantCounterparty */
@JsonPropertyOrder({
Counterparty.JSON_PROPERTY_ACCOUNT_HOLDER_ID,
Counterparty.JSON_PROPERTY_BALANCE_ACCOUNT_ID,
Counterparty.JSON_PROPERTY_TRANSFER_INSTRUMENT_ID
GrantCounterparty.JSON_PROPERTY_ACCOUNT_HOLDER_ID,
GrantCounterparty.JSON_PROPERTY_BALANCE_ACCOUNT_ID,
GrantCounterparty.JSON_PROPERTY_TRANSFER_INSTRUMENT_ID
})
public class Counterparty {
public class GrantCounterparty {
public static final String JSON_PROPERTY_ACCOUNT_HOLDER_ID = "accountHolderId";
private String accountHolderId;

Expand All @@ -50,30 +50,24 @@ public class Counterparty {
*/
@JsonIgnore private boolean includeNullValues = false;

public Counterparty() {}
public GrantCounterparty() {}

/**
* 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.
* The identifier of the receiving account holder.
*
* @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
* @param accountHolderId The identifier of the receiving account holder.
* @return the current {@code GrantCounterparty} instance, allowing for method chaining
*/
public Counterparty accountHolderId(String accountHolderId) {
public GrantCounterparty accountHolderId(String accountHolderId) {
this.accountHolderId = accountHolderId;
isSetAccountHolderId = true; // mark as set
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.
* The identifier of the receiving account holder.
*
* @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.
* @return accountHolderId The identifier of the receiving account holder.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
Expand All @@ -82,12 +76,9 @@ public String getAccountHolderId() {
}

/**
* 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.
* The identifier of the receiving account holder.
*
* @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.
* @param accountHolderId The identifier of the receiving account holder.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
Expand All @@ -101,9 +92,9 @@ public void setAccountHolderId(String accountHolderId) {
*
* @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
* @return the current {@code GrantCounterparty} instance, allowing for method chaining
*/
public Counterparty balanceAccountId(String balanceAccountId) {
public GrantCounterparty balanceAccountId(String balanceAccountId) {
this.balanceAccountId = balanceAccountId;
isSetBalanceAccountId = true; // mark as set
return this;
Expand Down Expand Up @@ -140,9 +131,9 @@ public void setBalanceAccountId(String balanceAccountId) {
*
* @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
* @return the current {@code GrantCounterparty} instance, allowing for method chaining
*/
public Counterparty transferInstrumentId(String transferInstrumentId) {
public GrantCounterparty transferInstrumentId(String transferInstrumentId) {
this.transferInstrumentId = transferInstrumentId;
isSetTransferInstrumentId = true; // mark as set
return this;
Expand Down Expand Up @@ -178,7 +169,7 @@ public void setTransferInstrumentId(String transferInstrumentId) {
/**
* Configures whether null values are explicitly serialized in the JSON payload. Default is false.
*/
public Counterparty includeNullValues(boolean includeNullValues) {
public GrantCounterparty includeNullValues(boolean includeNullValues) {
this.includeNullValues = includeNullValues;
return this;
}
Expand All @@ -195,7 +186,7 @@ public void setIncludeNullValues(boolean includeNullValues) {
this.includeNullValues = includeNullValues;
}

/** Return true if this Counterparty object is equal to o. */
/** Return true if this GrantCounterparty object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -204,13 +195,14 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
Counterparty counterparty = (Counterparty) o;
return Objects.equals(this.accountHolderId, counterparty.accountHolderId)
&& Objects.equals(this.isSetAccountHolderId, counterparty.isSetAccountHolderId)
&& Objects.equals(this.balanceAccountId, counterparty.balanceAccountId)
&& Objects.equals(this.isSetBalanceAccountId, counterparty.isSetBalanceAccountId)
&& Objects.equals(this.transferInstrumentId, counterparty.transferInstrumentId)
&& Objects.equals(this.isSetTransferInstrumentId, counterparty.isSetTransferInstrumentId);
GrantCounterparty grantCounterparty = (GrantCounterparty) o;
return Objects.equals(this.accountHolderId, grantCounterparty.accountHolderId)
&& Objects.equals(this.isSetAccountHolderId, grantCounterparty.isSetAccountHolderId)
&& Objects.equals(this.balanceAccountId, grantCounterparty.balanceAccountId)
&& Objects.equals(this.isSetBalanceAccountId, grantCounterparty.isSetBalanceAccountId)
&& Objects.equals(this.transferInstrumentId, grantCounterparty.transferInstrumentId)
&& Objects.equals(
this.isSetTransferInstrumentId, grantCounterparty.isSetTransferInstrumentId);
}

@Override
Expand All @@ -227,7 +219,7 @@ public int hashCode() {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Counterparty {\n");
sb.append("class GrantCounterparty {\n");
sb.append(" accountHolderId: ").append(toIndentedString(accountHolderId)).append("\n");
sb.append(" balanceAccountId: ").append(toIndentedString(balanceAccountId)).append("\n");
sb.append(" transferInstrumentId: ")
Expand Down Expand Up @@ -278,18 +270,18 @@ private void addIfNull(Map<String, Object> map, String key, Object value) {
}

/**
* Create an instance of Counterparty given an JSON string
* Create an instance of GrantCounterparty 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
* @return An instance of GrantCounterparty
* @throws JsonProcessingException if the JSON string is invalid with respect to GrantCounterparty
*/
public static Counterparty fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, Counterparty.class);
public static GrantCounterparty fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, GrantCounterparty.class);
}

/**
* Convert an instance of Counterparty to an JSON string
* Convert an instance of GrantCounterparty to an JSON string
*
* @return JSON string
*/
Expand Down
Loading