diff --git a/src/main/java/com/adyen/model/checkout/PaymentMethodsRequest.java b/src/main/java/com/adyen/model/checkout/PaymentMethodsRequest.java index b1ffa80f6..2f1d3fc21 100755 --- a/src/main/java/com/adyen/model/checkout/PaymentMethodsRequest.java +++ b/src/main/java/com/adyen/model/checkout/PaymentMethodsRequest.java @@ -21,6 +21,9 @@ package com.adyen.model.checkout; +import java.io.IOException; +import java.util.List; +import java.util.Objects; import com.adyen.model.Amount; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -28,9 +31,6 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Objects; - /** * PaymentMethodsRequest */ @@ -48,6 +48,10 @@ public class PaymentMethodsRequest { private String shopperLocale = null; @SerializedName("shopperReference") private String shopperReference = null; + @SerializedName("allowedPaymentMethods") + private List allowedPaymentMethods; + @SerializedName("blockedPaymentMethods") + private List blockedPaymentMethods; public PaymentMethodsRequest amount(Amount amount) { this.amount = amount; @@ -73,7 +77,8 @@ public PaymentMethodsRequest channel(ChannelEnum channel) { } /** - * The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * Web + * The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * + * Web * * @return channel **/ @@ -157,6 +162,22 @@ public void setShopperReference(String shopperReference) { this.shopperReference = shopperReference; } + public List getAllowedPaymentMethods() { + return allowedPaymentMethods; + } + + public void setAllowedPaymentMethods(List allowedPaymentMethods) { + this.allowedPaymentMethods = allowedPaymentMethods; + } + + public List getBlockedPaymentMethods() { + return blockedPaymentMethods; + } + + public void setBlockedPaymentMethods(List blockedPaymentMethods) { + this.blockedPaymentMethods = blockedPaymentMethods; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -166,17 +187,20 @@ public boolean equals(Object o) { return false; } PaymentMethodsRequest paymentMethodsRequest = (PaymentMethodsRequest) o; - return Objects.equals(this.amount, paymentMethodsRequest.amount) && - Objects.equals(this.channel, paymentMethodsRequest.channel) && - Objects.equals(this.countryCode, paymentMethodsRequest.countryCode) && - Objects.equals(this.merchantAccount, paymentMethodsRequest.merchantAccount) && - Objects.equals(this.shopperLocale, paymentMethodsRequest.shopperLocale) && - Objects.equals(this.shopperReference, paymentMethodsRequest.shopperReference); + return Objects.equals(this.amount, paymentMethodsRequest.amount) + && Objects.equals(this.channel, paymentMethodsRequest.channel) + && Objects.equals(this.countryCode, + paymentMethodsRequest.countryCode) + && Objects.equals(this.merchantAccount, paymentMethodsRequest.merchantAccount) + && Objects.equals(this.shopperLocale, paymentMethodsRequest.shopperLocale) + && Objects.equals(this.allowedPaymentMethods, paymentMethodsRequest.allowedPaymentMethods) + && Objects.equals(this.blockedPaymentMethods, paymentMethodsRequest.blockedPaymentMethods) + && Objects.equals(this.shopperReference, paymentMethodsRequest.shopperReference); } @Override public int hashCode() { - return Objects.hash(amount, channel, countryCode, merchantAccount, shopperLocale, shopperReference); + return Objects.hash(amount, channel, countryCode, merchantAccount, shopperLocale, shopperReference, allowedPaymentMethods, blockedPaymentMethods); } @Override @@ -190,6 +214,8 @@ public String toString() { sb.append(" merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n"); sb.append(" shopperLocale: ").append(toIndentedString(shopperLocale)).append("\n"); sb.append(" shopperReference: ").append(toIndentedString(shopperReference)).append("\n"); + sb.append(" allowedPaymentMethods: ").append(toIndentedString(allowedPaymentMethods)).append("\n"); + sb.append(" blockedPaymentMethods: ").append(toIndentedString(blockedPaymentMethods)).append("\n"); sb.append("}"); return sb.toString(); } @@ -206,7 +232,8 @@ private String toIndentedString(Object o) { } /** - * The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * Web + * The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * + * Web */ @JsonAdapter(ChannelEnum.Adapter.class) public enum ChannelEnum {