diff --git a/src/main/java/com/adyen/model/checkout/Amount.java b/src/main/java/com/adyen/model/checkout/Amount.java index 75394d3bb..acdb6f0b5 100644 --- a/src/main/java/com/adyen/model/checkout/Amount.java +++ b/src/main/java/com/adyen/model/checkout/Amount.java @@ -46,7 +46,7 @@ public Amount() { } /** - * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). * * @param currency * @return the current {@code Amount} instance, allowing for method chaining @@ -57,10 +57,10 @@ public Amount currency(String currency) { } /** - * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). * @return currency */ - @ApiModelProperty(required = true, value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).") + @ApiModelProperty(required = true, value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).") @JsonProperty(JSON_PROPERTY_CURRENCY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getCurrency() { @@ -68,7 +68,7 @@ public String getCurrency() { } /** - * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). * * @param currency */ @@ -79,7 +79,7 @@ public void setCurrency(String currency) { } /** - * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). * * @param value * @return the current {@code Amount} instance, allowing for method chaining @@ -90,10 +90,10 @@ public Amount value(Long value) { } /** - * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). * @return value */ - @ApiModelProperty(required = true, value = "The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).") + @ApiModelProperty(required = true, value = "The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).") @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Long getValue() { @@ -101,7 +101,7 @@ public Long getValue() { } /** - * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). * * @param value */ diff --git a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java index f79e1753d..cb51cb952 100644 --- a/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java +++ b/src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java @@ -51,6 +51,7 @@ import com.adyen.model.checkout.PayUUpiDetails; import com.adyen.model.checkout.PayWithGoogleDetails; import com.adyen.model.checkout.PaymentDetails; +import com.adyen.model.checkout.PseDetails; import com.adyen.model.checkout.RatepayDetails; import com.adyen.model.checkout.RivertyDetails; import com.adyen.model.checkout.SamsungPayDetails; @@ -1120,6 +1121,34 @@ public CheckoutPaymentMethod deserialize(JsonParser jp, DeserializationContext c } + // deserialize PseDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PseDetails.class.equals(Integer.class) || PseDetails.class.equals(Long.class) || PseDetails.class.equals(Float.class) || PseDetails.class.equals(Double.class) || PseDetails.class.equals(Boolean.class) || PseDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((PseDetails.class.equals(Integer.class) || PseDetails.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((PseDetails.class.equals(Float.class) || PseDetails.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (PseDetails.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (PseDetails.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + // Checks if the unique type of the oneOf json matches any of the object TypeEnum values + boolean typeMatch = Arrays.stream(PseDetails.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText())); + if (attemptParsing || typeMatch) { + // Strict deserialization for oneOf models + deserialized = JSON.getMapper().readValue(tree.toString(), PseDetails.class); + // typeMatch should enforce proper deserialization + match++; + log.log(Level.FINER, "Input data matches schema 'PseDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PseDetails'", e); + } + + // deserialize RatepayDetails try { boolean attemptParsing = true; @@ -1688,6 +1717,11 @@ public CheckoutPaymentMethod(PaymentDetails o) { setActualInstance(o); } + public CheckoutPaymentMethod(PseDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public CheckoutPaymentMethod(RatepayDetails o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1824,6 +1858,8 @@ public CheckoutPaymentMethod(ZipDetails o) { }); schemas.put("PaymentDetails", new GenericType() { }); + schemas.put("PseDetails", new GenericType() { + }); schemas.put("RatepayDetails", new GenericType() { }); schemas.put("RivertyDetails", new GenericType() { @@ -1861,7 +1897,7 @@ public Map getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails + * AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails * * It could be an instance of the 'oneOf' schemas. * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). @@ -2043,6 +2079,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(PseDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(RatepayDetails.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -2108,14 +2149,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); + throw new RuntimeException("Invalid instance type. Must be AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); } /** * Get the actual instance, which can be the following: - * AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails + * AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails * - * @return The actual instance (AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails) + * @return The actual instance (AchDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DotpayDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, GenericIssuerPaymentMethodDetails, GiropayDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PseDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails) */ @Override public Object getActualInstance() { @@ -2507,6 +2548,17 @@ public PaymentDetails getPaymentDetails() throws ClassCastException { return (PaymentDetails)super.getActualInstance(); } + /** + * Get the actual instance of `PseDetails`. If the actual instance is not `PseDetails`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `PseDetails` + * @throws ClassCastException if the instance is not `PseDetails` + */ + public PseDetails getPseDetails() throws ClassCastException { + return (PseDetails)super.getActualInstance(); + } + /** * Get the actual instance of `RatepayDetails`. If the actual instance is not `RatepayDetails`, * the ClassCastException will be thrown. diff --git a/src/main/java/com/adyen/model/checkout/PseDetails.java b/src/main/java/com/adyen/model/checkout/PseDetails.java new file mode 100644 index 000000000..dc65f6877 --- /dev/null +++ b/src/main/java/com/adyen/model/checkout/PseDetails.java @@ -0,0 +1,363 @@ +/* + * Adyen Checkout API + * + * The version of the OpenAPI document: 71 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.adyen.model.checkout; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * PseDetails + */ +@JsonPropertyOrder({ + PseDetails.JSON_PROPERTY_BANK, + PseDetails.JSON_PROPERTY_CHECKOUT_ATTEMPT_ID, + PseDetails.JSON_PROPERTY_CLIENT_TYPE, + PseDetails.JSON_PROPERTY_IDENTIFICATION, + PseDetails.JSON_PROPERTY_IDENTIFICATION_TYPE, + PseDetails.JSON_PROPERTY_TYPE +}) + +public class PseDetails { + public static final String JSON_PROPERTY_BANK = "bank"; + private String bank; + + public static final String JSON_PROPERTY_CHECKOUT_ATTEMPT_ID = "checkoutAttemptId"; + private String checkoutAttemptId; + + public static final String JSON_PROPERTY_CLIENT_TYPE = "clientType"; + private String clientType; + + public static final String JSON_PROPERTY_IDENTIFICATION = "identification"; + private String identification; + + public static final String JSON_PROPERTY_IDENTIFICATION_TYPE = "identificationType"; + private String identificationType; + + /** + * The payment method type. + */ + public enum TypeEnum { + PSE_PAYULATAM("pse_payulatam"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + private TypeEnum type; + + public PseDetails() { + } + + /** + * The shopper's bank. + * + * @param bank + * @return the current {@code PseDetails} instance, allowing for method chaining + */ + public PseDetails bank(String bank) { + this.bank = bank; + return this; + } + + /** + * The shopper's bank. + * @return bank + */ + @ApiModelProperty(required = true, value = "The shopper's bank.") + @JsonProperty(JSON_PROPERTY_BANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBank() { + return bank; + } + + /** + * The shopper's bank. + * + * @param bank + */ + @JsonProperty(JSON_PROPERTY_BANK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBank(String bank) { + this.bank = bank; + } + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId + * @return the current {@code PseDetails} instance, allowing for method chaining + */ + public PseDetails checkoutAttemptId(String checkoutAttemptId) { + this.checkoutAttemptId = checkoutAttemptId; + return this; + } + + /** + * The checkout attempt identifier. + * @return checkoutAttemptId + */ + @ApiModelProperty(value = "The checkout attempt identifier.") + @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCheckoutAttemptId() { + return checkoutAttemptId; + } + + /** + * The checkout attempt identifier. + * + * @param checkoutAttemptId + */ + @JsonProperty(JSON_PROPERTY_CHECKOUT_ATTEMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCheckoutAttemptId(String checkoutAttemptId) { + this.checkoutAttemptId = checkoutAttemptId; + } + + /** + * The client type. + * + * @param clientType + * @return the current {@code PseDetails} instance, allowing for method chaining + */ + public PseDetails clientType(String clientType) { + this.clientType = clientType; + return this; + } + + /** + * The client type. + * @return clientType + */ + @ApiModelProperty(required = true, value = "The client type.") + @JsonProperty(JSON_PROPERTY_CLIENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientType() { + return clientType; + } + + /** + * The client type. + * + * @param clientType + */ + @JsonProperty(JSON_PROPERTY_CLIENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setClientType(String clientType) { + this.clientType = clientType; + } + + /** + * The identification code. + * + * @param identification + * @return the current {@code PseDetails} instance, allowing for method chaining + */ + public PseDetails identification(String identification) { + this.identification = identification; + return this; + } + + /** + * The identification code. + * @return identification + */ + @ApiModelProperty(required = true, value = "The identification code.") + @JsonProperty(JSON_PROPERTY_IDENTIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIdentification() { + return identification; + } + + /** + * The identification code. + * + * @param identification + */ + @JsonProperty(JSON_PROPERTY_IDENTIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdentification(String identification) { + this.identification = identification; + } + + /** + * The identification type. + * + * @param identificationType + * @return the current {@code PseDetails} instance, allowing for method chaining + */ + public PseDetails identificationType(String identificationType) { + this.identificationType = identificationType; + return this; + } + + /** + * The identification type. + * @return identificationType + */ + @ApiModelProperty(required = true, value = "The identification type.") + @JsonProperty(JSON_PROPERTY_IDENTIFICATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIdentificationType() { + return identificationType; + } + + /** + * The identification type. + * + * @param identificationType + */ + @JsonProperty(JSON_PROPERTY_IDENTIFICATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIdentificationType(String identificationType) { + this.identificationType = identificationType; + } + + /** + * The payment method type. + * + * @param type + * @return the current {@code PseDetails} instance, allowing for method chaining + */ + public PseDetails type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The payment method type. + * @return type + */ + @ApiModelProperty(value = "The payment method type.") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * The payment method type. + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Return true if this PseDetails object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PseDetails pseDetails = (PseDetails) o; + return Objects.equals(this.bank, pseDetails.bank) && + Objects.equals(this.checkoutAttemptId, pseDetails.checkoutAttemptId) && + Objects.equals(this.clientType, pseDetails.clientType) && + Objects.equals(this.identification, pseDetails.identification) && + Objects.equals(this.identificationType, pseDetails.identificationType) && + Objects.equals(this.type, pseDetails.type); + } + + @Override + public int hashCode() { + return Objects.hash(bank, checkoutAttemptId, clientType, identification, identificationType, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PseDetails {\n"); + sb.append(" bank: ").append(toIndentedString(bank)).append("\n"); + sb.append(" checkoutAttemptId: ").append(toIndentedString(checkoutAttemptId)).append("\n"); + sb.append(" clientType: ").append(toIndentedString(clientType)).append("\n"); + sb.append(" identification: ").append(toIndentedString(identification)).append("\n"); + sb.append(" identificationType: ").append(toIndentedString(identificationType)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of PseDetails given an JSON string + * + * @param jsonString JSON string + * @return An instance of PseDetails + * @throws JsonProcessingException if the JSON string is invalid with respect to PseDetails + */ + public static PseDetails fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, PseDetails.class); + } +/** + * Convert an instance of PseDetails to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/legalentitymanagement/OnboardingLinkSettings.java b/src/main/java/com/adyen/model/legalentitymanagement/OnboardingLinkSettings.java index ce11229d9..01d28e543 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/OnboardingLinkSettings.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/OnboardingLinkSettings.java @@ -38,6 +38,7 @@ OnboardingLinkSettings.JSON_PROPERTY_ALLOW_INTRA_REGION_CROSS_BORDER_PAYOUT, OnboardingLinkSettings.JSON_PROPERTY_CHANGE_LEGAL_ENTITY_TYPE, OnboardingLinkSettings.JSON_PROPERTY_EDIT_PREFILLED_COUNTRY, + OnboardingLinkSettings.JSON_PROPERTY_ENFORCE_LEGAL_AGE, OnboardingLinkSettings.JSON_PROPERTY_HIDE_ONBOARDING_INTRODUCTION_INDIVIDUAL, OnboardingLinkSettings.JSON_PROPERTY_HIDE_ONBOARDING_INTRODUCTION_ORGANIZATION, OnboardingLinkSettings.JSON_PROPERTY_HIDE_ONBOARDING_INTRODUCTION_SOLE_PROPRIETOR, @@ -66,6 +67,9 @@ public class OnboardingLinkSettings { public static final String JSON_PROPERTY_EDIT_PREFILLED_COUNTRY = "editPrefilledCountry"; private Boolean editPrefilledCountry; + public static final String JSON_PROPERTY_ENFORCE_LEGAL_AGE = "enforceLegalAge"; + private Boolean enforceLegalAge; + public static final String JSON_PROPERTY_HIDE_ONBOARDING_INTRODUCTION_INDIVIDUAL = "hideOnboardingIntroductionIndividual"; private Boolean hideOnboardingIntroductionIndividual; @@ -272,6 +276,39 @@ public void setEditPrefilledCountry(Boolean editPrefilledCountry) { this.editPrefilledCountry = editPrefilledCountry; } + /** + * Default value: **false** Indicates if only users above the age of 18 can be onboarded. + * + * @param enforceLegalAge + * @return the current {@code OnboardingLinkSettings} instance, allowing for method chaining + */ + public OnboardingLinkSettings enforceLegalAge(Boolean enforceLegalAge) { + this.enforceLegalAge = enforceLegalAge; + return this; + } + + /** + * Default value: **false** Indicates if only users above the age of 18 can be onboarded. + * @return enforceLegalAge + */ + @ApiModelProperty(value = "Default value: **false** Indicates if only users above the age of 18 can be onboarded.") + @JsonProperty(JSON_PROPERTY_ENFORCE_LEGAL_AGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnforceLegalAge() { + return enforceLegalAge; + } + + /** + * Default value: **false** Indicates if only users above the age of 18 can be onboarded. + * + * @param enforceLegalAge + */ + @JsonProperty(JSON_PROPERTY_ENFORCE_LEGAL_AGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnforceLegalAge(Boolean enforceLegalAge) { + this.enforceLegalAge = enforceLegalAge; + } + /** * Default value: **true** Indicates whether the introduction screen is hidden for the user of the individual legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. * @@ -619,6 +656,7 @@ public boolean equals(Object o) { Objects.equals(this.allowIntraRegionCrossBorderPayout, onboardingLinkSettings.allowIntraRegionCrossBorderPayout) && Objects.equals(this.changeLegalEntityType, onboardingLinkSettings.changeLegalEntityType) && Objects.equals(this.editPrefilledCountry, onboardingLinkSettings.editPrefilledCountry) && + Objects.equals(this.enforceLegalAge, onboardingLinkSettings.enforceLegalAge) && Objects.equals(this.hideOnboardingIntroductionIndividual, onboardingLinkSettings.hideOnboardingIntroductionIndividual) && Objects.equals(this.hideOnboardingIntroductionOrganization, onboardingLinkSettings.hideOnboardingIntroductionOrganization) && Objects.equals(this.hideOnboardingIntroductionSoleProprietor, onboardingLinkSettings.hideOnboardingIntroductionSoleProprietor) && @@ -633,7 +671,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(acceptedCountries, allowBankAccountFormatSelection, allowIntraRegionCrossBorderPayout, changeLegalEntityType, editPrefilledCountry, hideOnboardingIntroductionIndividual, hideOnboardingIntroductionOrganization, hideOnboardingIntroductionSoleProprietor, hideOnboardingIntroductionTrust, instantBankVerification, requirePciSignEcomMoto, requirePciSignEcommerce, requirePciSignPos, requirePciSignPosMoto, transferInstrumentLimit); + return Objects.hash(acceptedCountries, allowBankAccountFormatSelection, allowIntraRegionCrossBorderPayout, changeLegalEntityType, editPrefilledCountry, enforceLegalAge, hideOnboardingIntroductionIndividual, hideOnboardingIntroductionOrganization, hideOnboardingIntroductionSoleProprietor, hideOnboardingIntroductionTrust, instantBankVerification, requirePciSignEcomMoto, requirePciSignEcommerce, requirePciSignPos, requirePciSignPosMoto, transferInstrumentLimit); } @Override @@ -645,6 +683,7 @@ public String toString() { sb.append(" allowIntraRegionCrossBorderPayout: ").append(toIndentedString(allowIntraRegionCrossBorderPayout)).append("\n"); sb.append(" changeLegalEntityType: ").append(toIndentedString(changeLegalEntityType)).append("\n"); sb.append(" editPrefilledCountry: ").append(toIndentedString(editPrefilledCountry)).append("\n"); + sb.append(" enforceLegalAge: ").append(toIndentedString(enforceLegalAge)).append("\n"); sb.append(" hideOnboardingIntroductionIndividual: ").append(toIndentedString(hideOnboardingIntroductionIndividual)).append("\n"); sb.append(" hideOnboardingIntroductionOrganization: ").append(toIndentedString(hideOnboardingIntroductionOrganization)).append("\n"); sb.append(" hideOnboardingIntroductionSoleProprietor: ").append(toIndentedString(hideOnboardingIntroductionSoleProprietor)).append("\n"); diff --git a/src/main/java/com/adyen/model/legalentitymanagement/PhoneNumber.java b/src/main/java/com/adyen/model/legalentitymanagement/PhoneNumber.java index a5071547d..2fb874797 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/PhoneNumber.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/PhoneNumber.java @@ -32,6 +32,7 @@ */ @JsonPropertyOrder({ PhoneNumber.JSON_PROPERTY_NUMBER, + PhoneNumber.JSON_PROPERTY_PHONE_COUNTRY_CODE, PhoneNumber.JSON_PROPERTY_TYPE }) @@ -39,6 +40,9 @@ public class PhoneNumber { public static final String JSON_PROPERTY_NUMBER = "number"; private String number; + public static final String JSON_PROPERTY_PHONE_COUNTRY_CODE = "phoneCountryCode"; + private String phoneCountryCode; + public static final String JSON_PROPERTY_TYPE = "type"; private String type; @@ -78,6 +82,39 @@ public void setNumber(String number) { this.number = number; } + /** + * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number` + * + * @param phoneCountryCode + * @return the current {@code PhoneNumber} instance, allowing for method chaining + */ + public PhoneNumber phoneCountryCode(String phoneCountryCode) { + this.phoneCountryCode = phoneCountryCode; + return this; + } + + /** + * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number` + * @return phoneCountryCode + */ + @ApiModelProperty(value = "The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number`") + @JsonProperty(JSON_PROPERTY_PHONE_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPhoneCountryCode() { + return phoneCountryCode; + } + + /** + * The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number` + * + * @param phoneCountryCode + */ + @JsonProperty(JSON_PROPERTY_PHONE_COUNTRY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhoneCountryCode(String phoneCountryCode) { + this.phoneCountryCode = phoneCountryCode; + } + /** * The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.** * @@ -124,12 +161,13 @@ public boolean equals(Object o) { } PhoneNumber phoneNumber = (PhoneNumber) o; return Objects.equals(this.number, phoneNumber.number) && + Objects.equals(this.phoneCountryCode, phoneNumber.phoneCountryCode) && Objects.equals(this.type, phoneNumber.type); } @Override public int hashCode() { - return Objects.hash(number, type); + return Objects.hash(number, phoneCountryCode, type); } @Override @@ -137,6 +175,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PhoneNumber {\n"); sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" phoneCountryCode: ").append(toIndentedString(phoneCountryCode)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/legalentitymanagement/Trust.java b/src/main/java/com/adyen/model/legalentitymanagement/Trust.java index d47e7579e..6a33eb65e 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/Trust.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/Trust.java @@ -38,12 +38,12 @@ @JsonPropertyOrder({ Trust.JSON_PROPERTY_COUNTRY_OF_GOVERNING_LAW, Trust.JSON_PROPERTY_DATE_OF_INCORPORATION, + Trust.JSON_PROPERTY_DESCRIPTION, Trust.JSON_PROPERTY_DOING_BUSINESS_AS, Trust.JSON_PROPERTY_NAME, Trust.JSON_PROPERTY_PRINCIPAL_PLACE_OF_BUSINESS, Trust.JSON_PROPERTY_REGISTERED_ADDRESS, Trust.JSON_PROPERTY_REGISTRATION_NUMBER, - Trust.JSON_PROPERTY_TAX_ABSENT, Trust.JSON_PROPERTY_TAX_INFORMATION, Trust.JSON_PROPERTY_TYPE, Trust.JSON_PROPERTY_UNDEFINED_BENEFICIARY_INFO, @@ -58,6 +58,9 @@ public class Trust { public static final String JSON_PROPERTY_DATE_OF_INCORPORATION = "dateOfIncorporation"; private String dateOfIncorporation; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + public static final String JSON_PROPERTY_DOING_BUSINESS_AS = "doingBusinessAs"; private String doingBusinessAs; @@ -73,28 +76,33 @@ public class Trust { public static final String JSON_PROPERTY_REGISTRATION_NUMBER = "registrationNumber"; private String registrationNumber; - public static final String JSON_PROPERTY_TAX_ABSENT = "taxAbsent"; - private Boolean taxAbsent; - public static final String JSON_PROPERTY_TAX_INFORMATION = "taxInformation"; private List taxInformation = null; /** - * Type of trust. Possible values for Australian trusts: **cashManagementTrust**, **corporateUnitTrust**, **deceasedEstate**, **discretionaryInvestmentTrust**, **discretionaryServicesManagementTrust**, **discretionaryTradingTrust**, **firstHomeSaverAccountsTrust**, **fixedTrust**, **fixedUnitTrust**, **hybridTrust**, **listedPublicUnitTrust**, **otherTrust**, **pooledSuperannuationTrust**, **publicTradingTrust**, **unlistedPublicUnitTrust**. + * Type of trust. See possible values for trusts in [Australia](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-australia) and [New Zealand](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-new-zealand). */ public enum TypeEnum { + BUSINESSTRUST("businessTrust"), + CASHMANAGEMENTTRUST("cashManagementTrust"), + CHARITABLETRUST("charitableTrust"), + CORPORATEUNITTRUST("corporateUnitTrust"), DECEASEDESTATE("deceasedEstate"), + DISCRETIONARYTRUST("discretionaryTrust"), + DISCRETIONARYINVESTMENTTRUST("discretionaryInvestmentTrust"), DISCRETIONARYSERVICESMANAGEMENTTRUST("discretionaryServicesManagementTrust"), DISCRETIONARYTRADINGTRUST("discretionaryTradingTrust"), + FAMILYTRUST("familyTrust"), + FIRSTHOMESAVERACCOUNTSTRUST("firstHomeSaverAccountsTrust"), FIXEDTRUST("fixedTrust"), @@ -256,6 +264,39 @@ public void setDateOfIncorporation(String dateOfIncorporation) { this.dateOfIncorporation = dateOfIncorporation; } + /** + * A short description about the trust. Only applicable for charitable trusts in New Zealand. + * + * @param description + * @return the current {@code Trust} instance, allowing for method chaining + */ + public Trust description(String description) { + this.description = description; + return this; + } + + /** + * A short description about the trust. Only applicable for charitable trusts in New Zealand. + * @return description + */ + @ApiModelProperty(value = "A short description about the trust. Only applicable for charitable trusts in New Zealand.") + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + /** + * A short description about the trust. Only applicable for charitable trusts in New Zealand. + * + * @param description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + /** * The registered name, if different from the `name`. * @@ -421,39 +462,6 @@ public void setRegistrationNumber(String registrationNumber) { this.registrationNumber = registrationNumber; } - /** - * The tax information is absent. - * - * @param taxAbsent - * @return the current {@code Trust} instance, allowing for method chaining - */ - public Trust taxAbsent(Boolean taxAbsent) { - this.taxAbsent = taxAbsent; - return this; - } - - /** - * The tax information is absent. - * @return taxAbsent - */ - @ApiModelProperty(value = "The tax information is absent.") - @JsonProperty(JSON_PROPERTY_TAX_ABSENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTaxAbsent() { - return taxAbsent; - } - - /** - * The tax information is absent. - * - * @param taxAbsent - */ - @JsonProperty(JSON_PROPERTY_TAX_ABSENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTaxAbsent(Boolean taxAbsent) { - this.taxAbsent = taxAbsent; - } - /** * The tax information of the entity. * @@ -496,7 +504,7 @@ public void setTaxInformation(List taxInformation) { } /** - * Type of trust. Possible values for Australian trusts: **cashManagementTrust**, **corporateUnitTrust**, **deceasedEstate**, **discretionaryInvestmentTrust**, **discretionaryServicesManagementTrust**, **discretionaryTradingTrust**, **firstHomeSaverAccountsTrust**, **fixedTrust**, **fixedUnitTrust**, **hybridTrust**, **listedPublicUnitTrust**, **otherTrust**, **pooledSuperannuationTrust**, **publicTradingTrust**, **unlistedPublicUnitTrust**. + * Type of trust. See possible values for trusts in [Australia](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-australia) and [New Zealand](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-new-zealand). * * @param type * @return the current {@code Trust} instance, allowing for method chaining @@ -507,10 +515,10 @@ public Trust type(TypeEnum type) { } /** - * Type of trust. Possible values for Australian trusts: **cashManagementTrust**, **corporateUnitTrust**, **deceasedEstate**, **discretionaryInvestmentTrust**, **discretionaryServicesManagementTrust**, **discretionaryTradingTrust**, **firstHomeSaverAccountsTrust**, **fixedTrust**, **fixedUnitTrust**, **hybridTrust**, **listedPublicUnitTrust**, **otherTrust**, **pooledSuperannuationTrust**, **publicTradingTrust**, **unlistedPublicUnitTrust**. + * Type of trust. See possible values for trusts in [Australia](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-australia) and [New Zealand](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-new-zealand). * @return type */ - @ApiModelProperty(required = true, value = "Type of trust. Possible values for Australian trusts: **cashManagementTrust**, **corporateUnitTrust**, **deceasedEstate**, **discretionaryInvestmentTrust**, **discretionaryServicesManagementTrust**, **discretionaryTradingTrust**, **firstHomeSaverAccountsTrust**, **fixedTrust**, **fixedUnitTrust**, **hybridTrust**, **listedPublicUnitTrust**, **otherTrust**, **pooledSuperannuationTrust**, **publicTradingTrust**, **unlistedPublicUnitTrust**.") + @ApiModelProperty(required = true, value = "Type of trust. See possible values for trusts in [Australia](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-australia) and [New Zealand](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-new-zealand).") @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public TypeEnum getType() { @@ -518,7 +526,7 @@ public TypeEnum getType() { } /** - * Type of trust. Possible values for Australian trusts: **cashManagementTrust**, **corporateUnitTrust**, **deceasedEstate**, **discretionaryInvestmentTrust**, **discretionaryServicesManagementTrust**, **discretionaryTradingTrust**, **firstHomeSaverAccountsTrust**, **fixedTrust**, **fixedUnitTrust**, **hybridTrust**, **listedPublicUnitTrust**, **otherTrust**, **pooledSuperannuationTrust**, **publicTradingTrust**, **unlistedPublicUnitTrust**. + * Type of trust. See possible values for trusts in [Australia](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-australia) and [New Zealand](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-new-zealand). * * @param type */ @@ -649,12 +657,12 @@ public boolean equals(Object o) { Trust trust = (Trust) o; return Objects.equals(this.countryOfGoverningLaw, trust.countryOfGoverningLaw) && Objects.equals(this.dateOfIncorporation, trust.dateOfIncorporation) && + Objects.equals(this.description, trust.description) && Objects.equals(this.doingBusinessAs, trust.doingBusinessAs) && Objects.equals(this.name, trust.name) && Objects.equals(this.principalPlaceOfBusiness, trust.principalPlaceOfBusiness) && Objects.equals(this.registeredAddress, trust.registeredAddress) && Objects.equals(this.registrationNumber, trust.registrationNumber) && - Objects.equals(this.taxAbsent, trust.taxAbsent) && Objects.equals(this.taxInformation, trust.taxInformation) && Objects.equals(this.type, trust.type) && Objects.equals(this.undefinedBeneficiaryInfo, trust.undefinedBeneficiaryInfo) && @@ -664,7 +672,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(countryOfGoverningLaw, dateOfIncorporation, doingBusinessAs, name, principalPlaceOfBusiness, registeredAddress, registrationNumber, taxAbsent, taxInformation, type, undefinedBeneficiaryInfo, vatAbsenceReason, vatNumber); + return Objects.hash(countryOfGoverningLaw, dateOfIncorporation, description, doingBusinessAs, name, principalPlaceOfBusiness, registeredAddress, registrationNumber, taxInformation, type, undefinedBeneficiaryInfo, vatAbsenceReason, vatNumber); } @Override @@ -673,12 +681,12 @@ public String toString() { sb.append("class Trust {\n"); sb.append(" countryOfGoverningLaw: ").append(toIndentedString(countryOfGoverningLaw)).append("\n"); sb.append(" dateOfIncorporation: ").append(toIndentedString(dateOfIncorporation)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" doingBusinessAs: ").append(toIndentedString(doingBusinessAs)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" principalPlaceOfBusiness: ").append(toIndentedString(principalPlaceOfBusiness)).append("\n"); sb.append(" registeredAddress: ").append(toIndentedString(registeredAddress)).append("\n"); sb.append(" registrationNumber: ").append(toIndentedString(registrationNumber)).append("\n"); - sb.append(" taxAbsent: ").append(toIndentedString(taxAbsent)).append("\n"); sb.append(" taxInformation: ").append(toIndentedString(taxInformation)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" undefinedBeneficiaryInfo: ").append(toIndentedString(undefinedBeneficiaryInfo)).append("\n"); diff --git a/src/main/java/com/adyen/model/management/AmexInfo.java b/src/main/java/com/adyen/model/management/AmexInfo.java index 3f83755e3..807750d72 100644 --- a/src/main/java/com/adyen/model/management/AmexInfo.java +++ b/src/main/java/com/adyen/model/management/AmexInfo.java @@ -44,7 +44,7 @@ public class AmexInfo { private Boolean reuseMidNumber; /** - * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with American Express. * **gatewayContract** — American Express receives the settlement and handles disputes. They then pay out to the merchant directly. * **paymentDesignatorContract** — Adyen receives the settlement and handles disputes. Adyen then pays out to the merchant. + * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract**: Adyen holds the contract with American Express. * **gatewayContract**: American Express receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * **paymentDesignatorContract**: Adyen receives the settlement, and handles disputes and payouts. */ public enum ServiceLevelEnum { NOCONTRACT("noContract"), @@ -87,7 +87,7 @@ public AmexInfo() { } /** - * MID (Merchant ID) number. Format: 10 numeric characters. Must be provided only when requesting `gatewayContract` or `paymentDesignatorContract` service levels. + * Merchant ID (MID) number. Format: 10 numeric characters. You must provide this field when you request `gatewayContract` or `paymentDesignatorContract` service levels. * * @param midNumber * @return the current {@code AmexInfo} instance, allowing for method chaining @@ -98,10 +98,10 @@ public AmexInfo midNumber(String midNumber) { } /** - * MID (Merchant ID) number. Format: 10 numeric characters. Must be provided only when requesting `gatewayContract` or `paymentDesignatorContract` service levels. + * Merchant ID (MID) number. Format: 10 numeric characters. You must provide this field when you request `gatewayContract` or `paymentDesignatorContract` service levels. * @return midNumber */ - @ApiModelProperty(value = "MID (Merchant ID) number. Format: 10 numeric characters. Must be provided only when requesting `gatewayContract` or `paymentDesignatorContract` service levels.") + @ApiModelProperty(value = "Merchant ID (MID) number. Format: 10 numeric characters. You must provide this field when you request `gatewayContract` or `paymentDesignatorContract` service levels.") @JsonProperty(JSON_PROPERTY_MID_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getMidNumber() { @@ -109,7 +109,7 @@ public String getMidNumber() { } /** - * MID (Merchant ID) number. Format: 10 numeric characters. Must be provided only when requesting `gatewayContract` or `paymentDesignatorContract` service levels. + * Merchant ID (MID) number. Format: 10 numeric characters. You must provide this field when you request `gatewayContract` or `paymentDesignatorContract` service levels. * * @param midNumber */ @@ -120,7 +120,7 @@ public void setMidNumber(String midNumber) { } /** - * Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is `false`. + * Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is **false**. * * @param reuseMidNumber * @return the current {@code AmexInfo} instance, allowing for method chaining @@ -131,10 +131,10 @@ public AmexInfo reuseMidNumber(Boolean reuseMidNumber) { } /** - * Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is `false`. + * Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is **false**. * @return reuseMidNumber */ - @ApiModelProperty(value = "Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is `false`.") + @ApiModelProperty(value = "Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is **false**.") @JsonProperty(JSON_PROPERTY_REUSE_MID_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getReuseMidNumber() { @@ -142,7 +142,7 @@ public Boolean getReuseMidNumber() { } /** - * Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is `false`. + * Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is **false**. * * @param reuseMidNumber */ @@ -153,7 +153,7 @@ public void setReuseMidNumber(Boolean reuseMidNumber) { } /** - * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with American Express. * **gatewayContract** — American Express receives the settlement and handles disputes. They then pay out to the merchant directly. * **paymentDesignatorContract** — Adyen receives the settlement and handles disputes. Adyen then pays out to the merchant. + * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract**: Adyen holds the contract with American Express. * **gatewayContract**: American Express receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * **paymentDesignatorContract**: Adyen receives the settlement, and handles disputes and payouts. * * @param serviceLevel * @return the current {@code AmexInfo} instance, allowing for method chaining @@ -164,10 +164,10 @@ public AmexInfo serviceLevel(ServiceLevelEnum serviceLevel) { } /** - * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with American Express. * **gatewayContract** — American Express receives the settlement and handles disputes. They then pay out to the merchant directly. * **paymentDesignatorContract** — Adyen receives the settlement and handles disputes. Adyen then pays out to the merchant. + * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract**: Adyen holds the contract with American Express. * **gatewayContract**: American Express receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * **paymentDesignatorContract**: Adyen receives the settlement, and handles disputes and payouts. * @return serviceLevel */ - @ApiModelProperty(required = true, value = "Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with American Express. * **gatewayContract** — American Express receives the settlement and handles disputes. They then pay out to the merchant directly. * **paymentDesignatorContract** — Adyen receives the settlement and handles disputes. Adyen then pays out to the merchant.") + @ApiModelProperty(required = true, value = "Specifies the service level (settlement type) of this payment method. Possible values: * **noContract**: Adyen holds the contract with American Express. * **gatewayContract**: American Express receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * **paymentDesignatorContract**: Adyen receives the settlement, and handles disputes and payouts.") @JsonProperty(JSON_PROPERTY_SERVICE_LEVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public ServiceLevelEnum getServiceLevel() { @@ -175,7 +175,7 @@ public ServiceLevelEnum getServiceLevel() { } /** - * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with American Express. * **gatewayContract** — American Express receives the settlement and handles disputes. They then pay out to the merchant directly. * **paymentDesignatorContract** — Adyen receives the settlement and handles disputes. Adyen then pays out to the merchant. + * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract**: Adyen holds the contract with American Express. * **gatewayContract**: American Express receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * **paymentDesignatorContract**: Adyen receives the settlement, and handles disputes and payouts. * * @param serviceLevel */ diff --git a/src/main/java/com/adyen/model/management/DinersInfo.java b/src/main/java/com/adyen/model/management/DinersInfo.java new file mode 100644 index 000000000..34c73948d --- /dev/null +++ b/src/main/java/com/adyen/model/management/DinersInfo.java @@ -0,0 +1,288 @@ +/* + * Management API + * + * The version of the OpenAPI document: 3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.adyen.model.management; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.management.TransactionDescriptionInfo; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * DinersInfo + */ +@JsonPropertyOrder({ + DinersInfo.JSON_PROPERTY_MID_NUMBER, + DinersInfo.JSON_PROPERTY_REUSE_MID_NUMBER, + DinersInfo.JSON_PROPERTY_SERVICE_LEVEL, + DinersInfo.JSON_PROPERTY_TRANSACTION_DESCRIPTION +}) + +public class DinersInfo { + public static final String JSON_PROPERTY_MID_NUMBER = "midNumber"; + private String midNumber; + + public static final String JSON_PROPERTY_REUSE_MID_NUMBER = "reuseMidNumber"; + private Boolean reuseMidNumber; + + /** + * Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. + */ + public enum ServiceLevelEnum { + NOCONTRACT("noContract"), + + GATEWAYCONTRACT("gatewayContract"); + + private String value; + + ServiceLevelEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ServiceLevelEnum fromValue(String value) { + for (ServiceLevelEnum b : ServiceLevelEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SERVICE_LEVEL = "serviceLevel"; + private ServiceLevelEnum serviceLevel; + + public static final String JSON_PROPERTY_TRANSACTION_DESCRIPTION = "transactionDescription"; + private TransactionDescriptionInfo transactionDescription; + + public DinersInfo() { + } + + /** + * MID (Merchant ID) number. Required for merchants operating in Japan. Format: 14 numeric characters. + * + * @param midNumber + * @return the current {@code DinersInfo} instance, allowing for method chaining + */ + public DinersInfo midNumber(String midNumber) { + this.midNumber = midNumber; + return this; + } + + /** + * MID (Merchant ID) number. Required for merchants operating in Japan. Format: 14 numeric characters. + * @return midNumber + */ + @ApiModelProperty(value = "MID (Merchant ID) number. Required for merchants operating in Japan. Format: 14 numeric characters.") + @JsonProperty(JSON_PROPERTY_MID_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMidNumber() { + return midNumber; + } + + /** + * MID (Merchant ID) number. Required for merchants operating in Japan. Format: 14 numeric characters. + * + * @param midNumber + */ + @JsonProperty(JSON_PROPERTY_MID_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMidNumber(String midNumber) { + this.midNumber = midNumber; + } + + /** + * Indicates whether the JCB Merchant ID is reused from a previously configured JCB payment method. The default value is **false**. For merchants operating in Japan, this field is required and must be set to **true**. + * + * @param reuseMidNumber + * @return the current {@code DinersInfo} instance, allowing for method chaining + */ + public DinersInfo reuseMidNumber(Boolean reuseMidNumber) { + this.reuseMidNumber = reuseMidNumber; + return this; + } + + /** + * Indicates whether the JCB Merchant ID is reused from a previously configured JCB payment method. The default value is **false**. For merchants operating in Japan, this field is required and must be set to **true**. + * @return reuseMidNumber + */ + @ApiModelProperty(required = true, value = "Indicates whether the JCB Merchant ID is reused from a previously configured JCB payment method. The default value is **false**. For merchants operating in Japan, this field is required and must be set to **true**.") + @JsonProperty(JSON_PROPERTY_REUSE_MID_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getReuseMidNumber() { + return reuseMidNumber; + } + + /** + * Indicates whether the JCB Merchant ID is reused from a previously configured JCB payment method. The default value is **false**. For merchants operating in Japan, this field is required and must be set to **true**. + * + * @param reuseMidNumber + */ + @JsonProperty(JSON_PROPERTY_REUSE_MID_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReuseMidNumber(Boolean reuseMidNumber) { + this.reuseMidNumber = reuseMidNumber; + } + + /** + * Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. + * + * @param serviceLevel + * @return the current {@code DinersInfo} instance, allowing for method chaining + */ + public DinersInfo serviceLevel(ServiceLevelEnum serviceLevel) { + this.serviceLevel = serviceLevel; + return this; + } + + /** + * Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. + * @return serviceLevel + */ + @ApiModelProperty(value = "Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly.") + @JsonProperty(JSON_PROPERTY_SERVICE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ServiceLevelEnum getServiceLevel() { + return serviceLevel; + } + + /** + * Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. + * + * @param serviceLevel + */ + @JsonProperty(JSON_PROPERTY_SERVICE_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setServiceLevel(ServiceLevelEnum serviceLevel) { + this.serviceLevel = serviceLevel; + } + + /** + * transactionDescription + * + * @param transactionDescription + * @return the current {@code DinersInfo} instance, allowing for method chaining + */ + public DinersInfo transactionDescription(TransactionDescriptionInfo transactionDescription) { + this.transactionDescription = transactionDescription; + return this; + } + + /** + * transactionDescription + * @return transactionDescription + */ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_TRANSACTION_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransactionDescriptionInfo getTransactionDescription() { + return transactionDescription; + } + + /** + * transactionDescription + * + * @param transactionDescription + */ + @JsonProperty(JSON_PROPERTY_TRANSACTION_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransactionDescription(TransactionDescriptionInfo transactionDescription) { + this.transactionDescription = transactionDescription; + } + + /** + * Return true if this DinersInfo object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DinersInfo dinersInfo = (DinersInfo) o; + return Objects.equals(this.midNumber, dinersInfo.midNumber) && + Objects.equals(this.reuseMidNumber, dinersInfo.reuseMidNumber) && + Objects.equals(this.serviceLevel, dinersInfo.serviceLevel) && + Objects.equals(this.transactionDescription, dinersInfo.transactionDescription); + } + + @Override + public int hashCode() { + return Objects.hash(midNumber, reuseMidNumber, serviceLevel, transactionDescription); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DinersInfo {\n"); + sb.append(" midNumber: ").append(toIndentedString(midNumber)).append("\n"); + sb.append(" reuseMidNumber: ").append(toIndentedString(reuseMidNumber)).append("\n"); + sb.append(" serviceLevel: ").append(toIndentedString(serviceLevel)).append("\n"); + sb.append(" transactionDescription: ").append(toIndentedString(transactionDescription)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +/** + * Create an instance of DinersInfo given an JSON string + * + * @param jsonString JSON string + * @return An instance of DinersInfo + * @throws JsonProcessingException if the JSON string is invalid with respect to DinersInfo + */ + public static DinersInfo fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DinersInfo.class); + } +/** + * Convert an instance of DinersInfo to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/management/JCBInfo.java b/src/main/java/com/adyen/model/management/JCBInfo.java index f6cde4528..996af13bf 100644 --- a/src/main/java/com/adyen/model/management/JCBInfo.java +++ b/src/main/java/com/adyen/model/management/JCBInfo.java @@ -46,7 +46,7 @@ public class JCBInfo { private Boolean reuseMidNumber; /** - * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with JCB. * **gatewayContract** — JCB receives the settlement and handles disputes. They then pay out to the merchant directly. + * Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. */ public enum ServiceLevelEnum { NOCONTRACT("noContract"), @@ -90,7 +90,7 @@ public JCBInfo() { } /** - * MID (Merchant ID) number. Format: 10 numeric characters. Must be provided for both `noContract` and `gatewayContract` service levels. + * MID (Merchant ID) number. Required for merchants operating in Japan.Format: 14 numeric characters. * * @param midNumber * @return the current {@code JCBInfo} instance, allowing for method chaining @@ -101,10 +101,10 @@ public JCBInfo midNumber(String midNumber) { } /** - * MID (Merchant ID) number. Format: 10 numeric characters. Must be provided for both `noContract` and `gatewayContract` service levels. + * MID (Merchant ID) number. Required for merchants operating in Japan.Format: 14 numeric characters. * @return midNumber */ - @ApiModelProperty(value = "MID (Merchant ID) number. Format: 10 numeric characters. Must be provided for both `noContract` and `gatewayContract` service levels.") + @ApiModelProperty(value = "MID (Merchant ID) number. Required for merchants operating in Japan.Format: 14 numeric characters.") @JsonProperty(JSON_PROPERTY_MID_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getMidNumber() { @@ -112,7 +112,7 @@ public String getMidNumber() { } /** - * MID (Merchant ID) number. Format: 10 numeric characters. Must be provided for both `noContract` and `gatewayContract` service levels. + * MID (Merchant ID) number. Required for merchants operating in Japan.Format: 14 numeric characters. * * @param midNumber */ @@ -123,7 +123,7 @@ public void setMidNumber(String midNumber) { } /** - * Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. This is applicable for both `noContract` and `gatewayContract` service levels. The default value is `false`. + * Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. The default value is **false**.For merchants operating in Japan, this field is required and must be set to **true**. * * @param reuseMidNumber * @return the current {@code JCBInfo} instance, allowing for method chaining @@ -134,10 +134,10 @@ public JCBInfo reuseMidNumber(Boolean reuseMidNumber) { } /** - * Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. This is applicable for both `noContract` and `gatewayContract` service levels. The default value is `false`. + * Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. The default value is **false**.For merchants operating in Japan, this field is required and must be set to **true**. * @return reuseMidNumber */ - @ApiModelProperty(value = "Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. This is applicable for both `noContract` and `gatewayContract` service levels. The default value is `false`.") + @ApiModelProperty(value = "Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. The default value is **false**.For merchants operating in Japan, this field is required and must be set to **true**.") @JsonProperty(JSON_PROPERTY_REUSE_MID_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public Boolean getReuseMidNumber() { @@ -145,7 +145,7 @@ public Boolean getReuseMidNumber() { } /** - * Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. This is applicable for both `noContract` and `gatewayContract` service levels. The default value is `false`. + * Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. The default value is **false**.For merchants operating in Japan, this field is required and must be set to **true**. * * @param reuseMidNumber */ @@ -156,7 +156,7 @@ public void setReuseMidNumber(Boolean reuseMidNumber) { } /** - * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with JCB. * **gatewayContract** — JCB receives the settlement and handles disputes. They then pay out to the merchant directly. + * Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * * @param serviceLevel * @return the current {@code JCBInfo} instance, allowing for method chaining @@ -167,10 +167,10 @@ public JCBInfo serviceLevel(ServiceLevelEnum serviceLevel) { } /** - * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with JCB. * **gatewayContract** — JCB receives the settlement and handles disputes. They then pay out to the merchant directly. + * Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * @return serviceLevel */ - @ApiModelProperty(required = true, value = "Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with JCB. * **gatewayContract** — JCB receives the settlement and handles disputes. They then pay out to the merchant directly.") + @ApiModelProperty(value = "Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly.") @JsonProperty(JSON_PROPERTY_SERVICE_LEVEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public ServiceLevelEnum getServiceLevel() { @@ -178,7 +178,7 @@ public ServiceLevelEnum getServiceLevel() { } /** - * Specifies the service level (settlement type) of this payment method. Possible values: * **noContract** — Adyen holds the contract with JCB. * **gatewayContract** — JCB receives the settlement and handles disputes. They then pay out to the merchant directly. + * Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * * @param serviceLevel */ diff --git a/src/main/java/com/adyen/model/management/PaymentMethod.java b/src/main/java/com/adyen/model/management/PaymentMethod.java index 20f0602bf..c528800c1 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethod.java +++ b/src/main/java/com/adyen/model/management/PaymentMethod.java @@ -23,6 +23,7 @@ import com.adyen.model.management.BcmcInfo; import com.adyen.model.management.CartesBancairesInfo; import com.adyen.model.management.ClearpayInfo; +import com.adyen.model.management.DinersInfo; import com.adyen.model.management.GenericPmWithTdiInfo; import com.adyen.model.management.GiroPayInfo; import com.adyen.model.management.GooglePayInfo; @@ -149,7 +150,7 @@ public class PaymentMethod { private List customRoutingFlags = null; public static final String JSON_PROPERTY_DINERS = "diners"; - private GenericPmWithTdiInfo diners; + private DinersInfo diners; public static final String JSON_PROPERTY_DISCOVER = "discover"; private GenericPmWithTdiInfo discover; @@ -751,7 +752,7 @@ public void setCustomRoutingFlags(List customRoutingFlags) { * @param diners * @return the current {@code PaymentMethod} instance, allowing for method chaining */ - public PaymentMethod diners(GenericPmWithTdiInfo diners) { + public PaymentMethod diners(DinersInfo diners) { this.diners = diners; return this; } @@ -763,7 +764,7 @@ public PaymentMethod diners(GenericPmWithTdiInfo diners) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DINERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public GenericPmWithTdiInfo getDiners() { + public DinersInfo getDiners() { return diners; } @@ -774,7 +775,7 @@ public GenericPmWithTdiInfo getDiners() { */ @JsonProperty(JSON_PROPERTY_DINERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDiners(GenericPmWithTdiInfo diners) { + public void setDiners(DinersInfo diners) { this.diners = diners; } diff --git a/src/main/java/com/adyen/model/management/PaymentMethodResponse.java b/src/main/java/com/adyen/model/management/PaymentMethodResponse.java index e7e3b6f95..55b608014 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethodResponse.java +++ b/src/main/java/com/adyen/model/management/PaymentMethodResponse.java @@ -61,6 +61,8 @@ public class PaymentMethodResponse { public enum TypesWithErrorsEnum { ACCEL("accel"), + AFFIRM("affirm"), + AFTERPAYTOUCH("afterpaytouch"), ALELO("alelo"), diff --git a/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java b/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java index 2541a118d..2cd63eb12 100644 --- a/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java +++ b/src/main/java/com/adyen/model/management/PaymentMethodSetupInfo.java @@ -23,6 +23,7 @@ import com.adyen.model.management.BcmcInfo; import com.adyen.model.management.CartesBancairesInfo; import com.adyen.model.management.ClearpayInfo; +import com.adyen.model.management.DinersInfo; import com.adyen.model.management.GenericPmWithTdiInfo; import com.adyen.model.management.GiroPayInfo; import com.adyen.model.management.GooglePayInfo; @@ -142,7 +143,7 @@ public class PaymentMethodSetupInfo { private List customRoutingFlags = null; public static final String JSON_PROPERTY_DINERS = "diners"; - private GenericPmWithTdiInfo diners; + private DinersInfo diners; public static final String JSON_PROPERTY_DISCOVER = "discover"; private GenericPmWithTdiInfo discover; @@ -264,6 +265,8 @@ public static ShopperInteractionEnum fromValue(String value) { public enum TypeEnum { ACCEL("accel"), + AFFIRM("affirm"), + AFTERPAYTOUCH("afterpaytouch"), ALELO("alelo"), @@ -877,7 +880,7 @@ public void setCustomRoutingFlags(List customRoutingFlags) { * @param diners * @return the current {@code PaymentMethodSetupInfo} instance, allowing for method chaining */ - public PaymentMethodSetupInfo diners(GenericPmWithTdiInfo diners) { + public PaymentMethodSetupInfo diners(DinersInfo diners) { this.diners = diners; return this; } @@ -889,7 +892,7 @@ public PaymentMethodSetupInfo diners(GenericPmWithTdiInfo diners) { @ApiModelProperty(value = "") @JsonProperty(JSON_PROPERTY_DINERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public GenericPmWithTdiInfo getDiners() { + public DinersInfo getDiners() { return diners; } @@ -900,7 +903,7 @@ public GenericPmWithTdiInfo getDiners() { */ @JsonProperty(JSON_PROPERTY_DINERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDiners(GenericPmWithTdiInfo diners) { + public void setDiners(DinersInfo diners) { this.diners = diners; } diff --git a/src/main/java/com/adyen/model/payment/ModificationResult.java b/src/main/java/com/adyen/model/payment/ModificationResult.java index aa4401f90..0261c14fc 100644 --- a/src/main/java/com/adyen/model/payment/ModificationResult.java +++ b/src/main/java/com/adyen/model/payment/ModificationResult.java @@ -50,21 +50,21 @@ public class ModificationResult { * Indicates if the modification request has been received for processing. */ public enum ResponseEnum { - CAPTURE_RECEIVED_("[capture-received]"), + _CAPTURE_RECEIVED_("[capture-received]"), - CANCEL_RECEIVED_("[cancel-received]"), + _CANCEL_RECEIVED_("[cancel-received]"), - REFUND_RECEIVED_("[refund-received]"), + _REFUND_RECEIVED_("[refund-received]"), - CANCELORREFUND_RECEIVED_("[cancelOrRefund-received]"), + _CANCELORREFUND_RECEIVED_("[cancelOrRefund-received]"), - ADJUSTAUTHORISATION_RECEIVED_("[adjustAuthorisation-received]"), + _ADJUSTAUTHORISATION_RECEIVED_("[adjustAuthorisation-received]"), - DONATION_RECEIVED_("[donation-received]"), + _DONATION_RECEIVED_("[donation-received]"), - TECHNICAL_CANCEL_RECEIVED_("[technical-cancel-received]"), + _TECHNICAL_CANCEL_RECEIVED_("[technical-cancel-received]"), - VOIDPENDINGREFUND_RECEIVED_("[voidPendingRefund-received]"), + _VOIDPENDINGREFUND_RECEIVED_("[voidPendingRefund-received]"), AUTHORISED("Authorised");