Skip to content
Merged
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
30 changes: 18 additions & 12 deletions src/main/java/com/adyen/model/capital/Amount.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ public Amount() {}

/**
* The three-character [ISO currency
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the
* amount.
*
* @param currency The three-character [ISO currency
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the
* amount.
* @return the current {@code Amount} instance, allowing for method chaining
*/
public Amount currency(String currency) {
Expand All @@ -58,10 +60,12 @@ public Amount currency(String currency) {

/**
* The three-character [ISO currency
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the
* amount.
*
* @return currency The three-character [ISO currency
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the
* amount.
*/
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
Expand All @@ -71,10 +75,12 @@ public String getCurrency() {

/**
* The three-character [ISO currency
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the
* amount.
*
* @param currency The three-character [ISO currency
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
* code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the
* amount.
*/
@JsonProperty(JSON_PROPERTY_CURRENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
Expand All @@ -84,10 +90,10 @@ public void setCurrency(String currency) {
}

/**
* The amount of the transaction, in [minor
* The numeric value of the amount, in [minor
* units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
*
* @param value The amount of the transaction, in [minor
* @param value The numeric value of the amount, in [minor
* units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
* @return the current {@code Amount} instance, allowing for method chaining
*/
Expand All @@ -98,10 +104,10 @@ public Amount value(Long value) {
}

/**
* The amount of the transaction, in [minor
* The numeric value of the amount, in [minor
* units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
*
* @return value The amount of the transaction, in [minor
* @return value The numeric value of the amount, in [minor
* units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
*/
@JsonProperty(JSON_PROPERTY_VALUE)
Expand All @@ -111,10 +117,10 @@ public Long getValue() {
}

/**
* The amount of the transaction, in [minor
* The numeric value of the amount, in [minor
* units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
*
* @param value The amount of the transaction, in [minor
* @param value The numeric value of the amount, in [minor
* units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
*/
@JsonProperty(JSON_PROPERTY_VALUE)
Expand Down
60 changes: 5 additions & 55 deletions src/main/java/com/adyen/model/capital/Grant.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

/** Grant */
@JsonPropertyOrder({
Grant.JSON_PROPERTY_AMOUNT,
Grant.JSON_PROPERTY_BALANCES,
Grant.JSON_PROPERTY_COUNTERPARTY,
Grant.JSON_PROPERTY_GRANT_ACCOUNT_ID,
Expand All @@ -30,20 +29,14 @@
Grant.JSON_PROPERTY_STATUS
})
public class Grant {
public static final String JSON_PROPERTY_AMOUNT = "amount";
private Amount amount;

/** Mark when the attribute has been explicitly set. */
private boolean isSetAmount = false;

public static final String JSON_PROPERTY_BALANCES = "balances";
private Balance balances;

/** Mark when the attribute has been explicitly set. */
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 @@ -80,41 +73,6 @@ public class Grant {

public Grant() {}

/**
* amount
*
* @param amount
* @return the current {@code Grant} instance, allowing for method chaining
*/
public Grant amount(Amount amount) {
this.amount = amount;
isSetAmount = true; // mark as set
return this;
}

/**
* Get amount
*
* @return amount
*/
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Amount getAmount() {
return amount;
}

/**
* amount
*
* @param amount
*/
@JsonProperty(JSON_PROPERTY_AMOUNT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAmount(Amount amount) {
this.amount = amount;
isSetAmount = true; // mark as set
}

/**
* balances
*
Expand Down Expand Up @@ -156,7 +114,7 @@ public void setBalances(Balance balances) {
* @param counterparty
* @return the current {@code Grant} instance, allowing for method chaining
*/
public Grant counterparty(Counterparty counterparty) {
public Grant counterparty(GrantCounterparty counterparty) {
this.counterparty = counterparty;
isSetCounterparty = true; // mark as set
return this;
Expand All @@ -169,7 +127,7 @@ public Grant counterparty(Counterparty counterparty) {
*/
@JsonProperty(JSON_PROPERTY_COUNTERPARTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Counterparty getCounterparty() {
public GrantCounterparty getCounterparty() {
return counterparty;
}

Expand All @@ -180,7 +138,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 Expand Up @@ -361,9 +319,7 @@ public boolean equals(Object o) {
return false;
}
Grant grant = (Grant) o;
return Objects.equals(this.amount, grant.amount)
&& Objects.equals(this.isSetAmount, grant.isSetAmount)
&& Objects.equals(this.balances, grant.balances)
return Objects.equals(this.balances, grant.balances)
&& Objects.equals(this.isSetBalances, grant.isSetBalances)
&& Objects.equals(this.counterparty, grant.counterparty)
&& Objects.equals(this.isSetCounterparty, grant.isSetCounterparty)
Expand All @@ -380,8 +336,6 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
amount,
isSetAmount,
balances,
isSetBalances,
counterparty,
Expand All @@ -400,7 +354,6 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Grant {\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" balances: ").append(toIndentedString(balances)).append("\n");
sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n");
sb.append(" grantAccountId: ").append(toIndentedString(grantAccountId)).append("\n");
Expand Down Expand Up @@ -431,9 +384,6 @@ public Map<String, Object> getExplicitNulls() {

Map<String, Object> nulls = new HashMap<>();

if (isSetAmount) {
addIfNull(nulls, JSON_PROPERTY_AMOUNT, this.amount);
}
if (isSetBalances) {
addIfNull(nulls, JSON_PROPERTY_BALANCES, this.balances);
}
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,32 +50,24 @@ public class Counterparty {
*/
@JsonIgnore private boolean includeNullValues = false;

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

/**
* The unique identifier of the account holder that receives the grant. If no
* &#x60;balanceAccountId&#x60; is provided, the grant funds are disbursed to the primary balance
* account of this account holder.
* The unique identifier of the account holder that receives the grant.
*
* @param accountHolderId The unique identifier of the account holder that receives the grant. If
* no &#x60;balanceAccountId&#x60; is provided, the grant funds are disbursed to the primary
* balance account of this account holder.
* @return the current {@code Counterparty} instance, allowing for method chaining
* @param accountHolderId The unique identifier of the account holder that receives the grant.
* @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 unique identifier of the account holder that receives the grant. If no
* &#x60;balanceAccountId&#x60; is provided, the grant funds are disbursed to the primary balance
* account of this account holder.
* The unique identifier of the account holder that receives the grant.
*
* @return accountHolderId The unique identifier of the account holder that receives the grant. If
* no &#x60;balanceAccountId&#x60; is provided, the grant funds are disbursed to the primary
* balance account of this account holder.
* @return accountHolderId The unique identifier of the account holder that receives the grant.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
Expand All @@ -84,13 +76,9 @@ public String getAccountHolderId() {
}

/**
* The unique identifier of the account holder that receives the grant. If no
* &#x60;balanceAccountId&#x60; is provided, the grant funds are disbursed to the primary balance
* account of this account holder.
* The unique identifier of the account holder that receives the grant.
*
* @param accountHolderId The unique identifier of the account holder that receives the grant. If
* no &#x60;balanceAccountId&#x60; is provided, the grant funds are disbursed to the primary
* balance account of this account holder.
* @param accountHolderId The unique identifier of the account holder that receives the grant.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
Expand All @@ -105,9 +93,9 @@ public void setAccountHolderId(String accountHolderId) {
*
* @param balanceAccountId The unique identifier of the balance account where the funds are
* disbursed. The balance account must belong to the specified 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 @@ -147,9 +135,9 @@ public void setBalanceAccountId(String balanceAccountId) {
* @param transferInstrumentId The unique identifier of the transfer instrument where the funds
* are disbursed. The transfer instrument must belong to the legal entity of the specified
* 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 @@ -187,7 +175,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 @@ -204,7 +192,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 @@ -213,13 +201,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 @@ -236,7 +225,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 @@ -287,18 +276,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