diff --git a/src/main/java/com/adyen/model/management/Currency.java b/src/main/java/com/adyen/model/management/Currency.java index b432e7fb2..61c2cd387 100644 --- a/src/main/java/com/adyen/model/management/Currency.java +++ b/src/main/java/com/adyen/model/management/Currency.java @@ -33,6 +33,7 @@ @JsonPropertyOrder({ Currency.JSON_PROPERTY_AMOUNT, Currency.JSON_PROPERTY_CURRENCY_CODE, + Currency.JSON_PROPERTY_MAX_AMOUNT, Currency.JSON_PROPERTY_PERCENTAGE }) @@ -43,6 +44,9 @@ public class Currency { public static final String JSON_PROPERTY_CURRENCY_CODE = "currencyCode"; private String currencyCode; + public static final String JSON_PROPERTY_MAX_AMOUNT = "maxAmount"; + private Integer maxAmount; + public static final String JSON_PROPERTY_PERCENTAGE = "percentage"; private Double percentage; @@ -115,6 +119,39 @@ public void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } + /** + * The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @param maxAmount + * @return the current {@code Currency} instance, allowing for method chaining + */ + public Currency maxAmount(Integer maxAmount) { + this.maxAmount = maxAmount; + return this; + } + + /** + * The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @return maxAmount + */ + @ApiModelProperty(value = "The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).") + @JsonProperty(JSON_PROPERTY_MAX_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getMaxAmount() { + return maxAmount; + } + + /** + * The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @param maxAmount + */ + @JsonProperty(JSON_PROPERTY_MAX_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaxAmount(Integer maxAmount) { + this.maxAmount = maxAmount; + } + /** * Surcharge percentage per transaction. The maximum number of decimal places is two. For example, **1%** or **2.27%**. * @@ -162,12 +199,13 @@ public boolean equals(Object o) { Currency currency = (Currency) o; return Objects.equals(this.amount, currency.amount) && Objects.equals(this.currencyCode, currency.currencyCode) && + Objects.equals(this.maxAmount, currency.maxAmount) && Objects.equals(this.percentage, currency.percentage); } @Override public int hashCode() { - return Objects.hash(amount, currencyCode, percentage); + return Objects.hash(amount, currencyCode, maxAmount, percentage); } @Override @@ -176,6 +214,7 @@ public String toString() { sb.append("class Currency {\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n"); + sb.append(" maxAmount: ").append(toIndentedString(maxAmount)).append("\n"); sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/management/ModelConfiguration.java b/src/main/java/com/adyen/model/management/ModelConfiguration.java index 803ff7078..9574f0dfa 100644 --- a/src/main/java/com/adyen/model/management/ModelConfiguration.java +++ b/src/main/java/com/adyen/model/management/ModelConfiguration.java @@ -35,6 +35,7 @@ */ @JsonPropertyOrder({ ModelConfiguration.JSON_PROPERTY_BRAND, + ModelConfiguration.JSON_PROPERTY_COMMERCIAL, ModelConfiguration.JSON_PROPERTY_COUNTRY, ModelConfiguration.JSON_PROPERTY_CURRENCIES, ModelConfiguration.JSON_PROPERTY_SOURCES @@ -45,6 +46,9 @@ public class ModelConfiguration { public static final String JSON_PROPERTY_BRAND = "brand"; private String brand; + public static final String JSON_PROPERTY_COMMERCIAL = "commercial"; + private Boolean commercial; + public static final String JSON_PROPERTY_COUNTRY = "country"; private List country = null; @@ -91,7 +95,40 @@ public void setBrand(String brand) { } /** - * Countries, to filter different surcharge amounts for domestic or international cards. + * Set to **true** to apply surcharges only to commercial/business cards. + * + * @param commercial + * @return the current {@code ModelConfiguration} instance, allowing for method chaining + */ + public ModelConfiguration commercial(Boolean commercial) { + this.commercial = commercial; + return this; + } + + /** + * Set to **true** to apply surcharges only to commercial/business cards. + * @return commercial + */ + @ApiModelProperty(value = "Set to **true** to apply surcharges only to commercial/business cards.") + @JsonProperty(JSON_PROPERTY_COMMERCIAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCommercial() { + return commercial; + } + + /** + * Set to **true** to apply surcharges only to commercial/business cards. + * + * @param commercial + */ + @JsonProperty(JSON_PROPERTY_COMMERCIAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCommercial(Boolean commercial) { + this.commercial = commercial; + } + + /** + * The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region. * * @param country * @return the current {@code ModelConfiguration} instance, allowing for method chaining @@ -110,10 +147,10 @@ public ModelConfiguration addCountryItem(String countryItem) { } /** - * Countries, to filter different surcharge amounts for domestic or international cards. + * The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region. * @return country */ - @ApiModelProperty(value = "Countries, to filter different surcharge amounts for domestic or international cards.") + @ApiModelProperty(value = "The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region.") @JsonProperty(JSON_PROPERTY_COUNTRY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getCountry() { @@ -121,7 +158,7 @@ public List getCountry() { } /** - * Countries, to filter different surcharge amounts for domestic or international cards. + * The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region. * * @param country */ @@ -132,7 +169,7 @@ public void setCountry(List country) { } /** - * Currency, and surcharge percentage or amount. + * Currency and percentage or amount of the surcharge. * * @param currencies * @return the current {@code ModelConfiguration} instance, allowing for method chaining @@ -148,10 +185,10 @@ public ModelConfiguration addCurrenciesItem(Currency currenciesItem) { } /** - * Currency, and surcharge percentage or amount. + * Currency and percentage or amount of the surcharge. * @return currencies */ - @ApiModelProperty(required = true, value = "Currency, and surcharge percentage or amount.") + @ApiModelProperty(required = true, value = "Currency and percentage or amount of the surcharge.") @JsonProperty(JSON_PROPERTY_CURRENCIES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getCurrencies() { @@ -159,7 +196,7 @@ public List getCurrencies() { } /** - * Currency, and surcharge percentage or amount. + * Currency and percentage or amount of the surcharge. * * @param currencies */ @@ -223,6 +260,7 @@ public boolean equals(Object o) { } ModelConfiguration configuration = (ModelConfiguration) o; return Objects.equals(this.brand, configuration.brand) && + Objects.equals(this.commercial, configuration.commercial) && Objects.equals(this.country, configuration.country) && Objects.equals(this.currencies, configuration.currencies) && Objects.equals(this.sources, configuration.sources); @@ -230,7 +268,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(brand, country, currencies, sources); + return Objects.hash(brand, commercial, country, currencies, sources); } @Override @@ -238,6 +276,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ModelConfiguration {\n"); sb.append(" brand: ").append(toIndentedString(brand)).append("\n"); + sb.append(" commercial: ").append(toIndentedString(commercial)).append("\n"); sb.append(" country: ").append(toIndentedString(country)).append("\n"); sb.append(" currencies: ").append(toIndentedString(currencies)).append("\n"); sb.append(" sources: ").append(toIndentedString(sources)).append("\n"); diff --git a/src/main/java/com/adyen/model/management/SplitConfiguration.java b/src/main/java/com/adyen/model/management/SplitConfiguration.java index b5f157f20..49a45fba4 100644 --- a/src/main/java/com/adyen/model/management/SplitConfiguration.java +++ b/src/main/java/com/adyen/model/management/SplitConfiguration.java @@ -36,8 +36,7 @@ @JsonPropertyOrder({ SplitConfiguration.JSON_PROPERTY_DESCRIPTION, SplitConfiguration.JSON_PROPERTY_RULES, - SplitConfiguration.JSON_PROPERTY_SPLIT_CONFIGURATION_ID, - SplitConfiguration.JSON_PROPERTY_STORES + SplitConfiguration.JSON_PROPERTY_SPLIT_CONFIGURATION_ID }) public class SplitConfiguration { @@ -50,9 +49,6 @@ public class SplitConfiguration { public static final String JSON_PROPERTY_SPLIT_CONFIGURATION_ID = "splitConfigurationId"; private String splitConfigurationId; - public static final String JSON_PROPERTY_STORES = "stores"; - private List stores = null; - public SplitConfiguration() { } @@ -160,47 +156,6 @@ public void setSplitConfigurationId(String splitConfigurationId) { this.splitConfigurationId = splitConfigurationId; } - /** - * List of stores to which the split configuration applies. - * - * @param stores - * @return the current {@code SplitConfiguration} instance, allowing for method chaining - */ - public SplitConfiguration stores(List stores) { - this.stores = stores; - return this; - } - - public SplitConfiguration addStoresItem(String storesItem) { - if (this.stores == null) { - this.stores = new ArrayList<>(); - } - this.stores.add(storesItem); - return this; - } - - /** - * List of stores to which the split configuration applies. - * @return stores - */ - @ApiModelProperty(value = "List of stores to which the split configuration applies.") - @JsonProperty(JSON_PROPERTY_STORES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getStores() { - return stores; - } - - /** - * List of stores to which the split configuration applies. - * - * @param stores - */ - @JsonProperty(JSON_PROPERTY_STORES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStores(List stores) { - this.stores = stores; - } - /** * Return true if this SplitConfiguration object is equal to o. */ @@ -215,13 +170,12 @@ public boolean equals(Object o) { SplitConfiguration splitConfiguration = (SplitConfiguration) o; return Objects.equals(this.description, splitConfiguration.description) && Objects.equals(this.rules, splitConfiguration.rules) && - Objects.equals(this.splitConfigurationId, splitConfiguration.splitConfigurationId) && - Objects.equals(this.stores, splitConfiguration.stores); + Objects.equals(this.splitConfigurationId, splitConfiguration.splitConfigurationId); } @Override public int hashCode() { - return Objects.hash(description, rules, splitConfigurationId, stores); + return Objects.hash(description, rules, splitConfigurationId); } @Override @@ -231,7 +185,6 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); sb.append(" splitConfigurationId: ").append(toIndentedString(splitConfigurationId)).append("\n"); - sb.append(" stores: ").append(toIndentedString(stores)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/adyen/model/management/Surcharge.java b/src/main/java/com/adyen/model/management/Surcharge.java index cd60901a8..4571983ce 100644 --- a/src/main/java/com/adyen/model/management/Surcharge.java +++ b/src/main/java/com/adyen/model/management/Surcharge.java @@ -82,7 +82,7 @@ public void setAskConfirmation(Boolean askConfirmation) { } /** - * Surcharge fees or percentages for specific payment methods, funding sources (credit or debit), and currencies. + * Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies. * * @param configurations * @return the current {@code Surcharge} instance, allowing for method chaining @@ -101,10 +101,10 @@ public Surcharge addConfigurationsItem(ModelConfiguration configurationsItem) { } /** - * Surcharge fees or percentages for specific payment methods, funding sources (credit or debit), and currencies. + * Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies. * @return configurations */ - @ApiModelProperty(value = "Surcharge fees or percentages for specific payment methods, funding sources (credit or debit), and currencies.") + @ApiModelProperty(value = "Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies.") @JsonProperty(JSON_PROPERTY_CONFIGURATIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getConfigurations() { @@ -112,7 +112,7 @@ public List getConfigurations() { } /** - * Surcharge fees or percentages for specific payment methods, funding sources (credit or debit), and currencies. + * Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies. * * @param configurations */