Skip to content

Commit

Permalink
false[adyen-sdk-automation] automated change (#1375)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdyenAutomationBot authored Oct 15, 2024
1 parent 342b722 commit cc3a52d
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 64 deletions.
41 changes: 40 additions & 1 deletion src/main/java/com/adyen/model/management/Currency.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
@JsonPropertyOrder({
Currency.JSON_PROPERTY_AMOUNT,
Currency.JSON_PROPERTY_CURRENCY_CODE,
Currency.JSON_PROPERTY_MAX_AMOUNT,
Currency.JSON_PROPERTY_PERCENTAGE
})

Expand All @@ -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;

Expand Down Expand Up @@ -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%**.
*
Expand Down Expand Up @@ -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
Expand All @@ -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();
Expand Down
57 changes: 48 additions & 9 deletions src/main/java/com/adyen/model/management/ModelConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<String> country = null;

Expand Down Expand Up @@ -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
Expand All @@ -110,18 +147,18 @@ 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<String> getCountry() {
return country;
}

/**
* 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
*/
Expand All @@ -132,7 +169,7 @@ public void setCountry(List<String> 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
Expand All @@ -148,18 +185,18 @@ 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<Currency> getCurrencies() {
return currencies;
}

/**
* Currency, and surcharge percentage or amount.
* Currency and percentage or amount of the surcharge.
*
* @param currencies
*/
Expand Down Expand Up @@ -223,21 +260,23 @@ 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);
}

@Override
public int hashCode() {
return Objects.hash(brand, country, currencies, sources);
return Objects.hash(brand, commercial, country, currencies, sources);
}

@Override
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");
Expand Down
53 changes: 3 additions & 50 deletions src/main/java/com/adyen/model/management/SplitConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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<String> stores = null;

public SplitConfiguration() {
}

Expand Down Expand Up @@ -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<String> 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<String> 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<String> stores) {
this.stores = stores;
}

/**
* Return true if this SplitConfiguration object is equal to o.
*/
Expand All @@ -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
Expand All @@ -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();
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/adyen/model/management/Surcharge.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -101,18 +101,18 @@ 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<ModelConfiguration> getConfigurations() {
return configurations;
}

/**
* 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
*/
Expand Down

0 comments on commit cc3a52d

Please sign in to comment.