From 2b3a5fb01f636a533fa867fcf5e71ea973011af8 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Tue, 3 Dec 2024 12:07:21 +0000 Subject: [PATCH] false[adyen-sdk-automation] automated change --- .../java/com/adyen/model/checkout/Amount.java | 16 +- .../com/adyen/model/checkout/CardDetails.java | 4 +- .../adyen/model/checkout/CardDonations.java | 4 +- .../model/checkout/CheckoutPaymentMethod.java | 60 +- .../com/adyen/model/checkout/PseDetails.java | 363 ++++++++++++ .../AbstractOpenApiSchema.java | 147 +++++ .../adyen/model/disputewebhooks/Amount.java | 174 ++++++ .../BalancePlatformNotificationResponse.java | 135 +++++ .../DisputeEventNotification.java | 523 ++++++++++++++++++ .../DisputeNotificationRequest.java | 210 +++++++ .../com/adyen/model/disputewebhooks/JSON.java | 253 +++++++++ .../IdentificationData.java | 10 +- .../OnboardingLinkSettings.java | 41 +- .../legalentitymanagement/PhoneNumber.java | 41 +- .../model/legalentitymanagement/Trust.java | 98 ++-- .../com/adyen/model/management/AmexInfo.java | 26 +- .../adyen/model/management/DinersInfo.java | 288 ++++++++++ .../com/adyen/model/management/JCBInfo.java | 26 +- .../adyen/model/management/PaymentMethod.java | 9 +- .../management/PaymentMethodResponse.java | 2 + .../management/PaymentMethodSetupInfo.java | 11 +- .../model/payment/ModificationResult.java | 16 +- 22 files changed, 2349 insertions(+), 108 deletions(-) create mode 100644 src/main/java/com/adyen/model/checkout/PseDetails.java create mode 100644 src/main/java/com/adyen/model/disputewebhooks/AbstractOpenApiSchema.java create mode 100644 src/main/java/com/adyen/model/disputewebhooks/Amount.java create mode 100644 src/main/java/com/adyen/model/disputewebhooks/BalancePlatformNotificationResponse.java create mode 100644 src/main/java/com/adyen/model/disputewebhooks/DisputeEventNotification.java create mode 100644 src/main/java/com/adyen/model/disputewebhooks/DisputeNotificationRequest.java create mode 100644 src/main/java/com/adyen/model/disputewebhooks/JSON.java create mode 100644 src/main/java/com/adyen/model/management/DinersInfo.java 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/CardDetails.java b/src/main/java/com/adyen/model/checkout/CardDetails.java index f19831b83..6f68ce27c 100644 --- a/src/main/java/com/adyen/model/checkout/CardDetails.java +++ b/src/main/java/com/adyen/model/checkout/CardDetails.java @@ -172,7 +172,9 @@ public enum TypeEnum { GIFTCARD("giftcard"), - CARD("card"); + CARD("card"), + + CLICKTOPAY("clicktopay"); private String value; diff --git a/src/main/java/com/adyen/model/checkout/CardDonations.java b/src/main/java/com/adyen/model/checkout/CardDonations.java index fe1f7ec85..0bfe90b26 100644 --- a/src/main/java/com/adyen/model/checkout/CardDonations.java +++ b/src/main/java/com/adyen/model/checkout/CardDonations.java @@ -172,7 +172,9 @@ public enum TypeEnum { GIFTCARD("giftcard"), - CARD("card"); + CARD("card"), + + CLICKTOPAY("clicktopay"); private String 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/disputewebhooks/AbstractOpenApiSchema.java b/src/main/java/com/adyen/model/disputewebhooks/AbstractOpenApiSchema.java new file mode 100644 index 000000000..358afee91 --- /dev/null +++ b/src/main/java/com/adyen/model/disputewebhooks/AbstractOpenApiSchema.java @@ -0,0 +1,147 @@ +/* + * Dispute webhooks + * + * The version of the OpenAPI document: 1 + * + * + * 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.disputewebhooks; + +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; +import jakarta.ws.rs.core.GenericType; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ + +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).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 "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/src/main/java/com/adyen/model/disputewebhooks/Amount.java b/src/main/java/com/adyen/model/disputewebhooks/Amount.java new file mode 100644 index 000000000..c1748ae6a --- /dev/null +++ b/src/main/java/com/adyen/model/disputewebhooks/Amount.java @@ -0,0 +1,174 @@ +/* + * Dispute webhooks + * + * The version of the OpenAPI document: 1 + * + * + * 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.disputewebhooks; + +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; + + +/** + * Amount + */ +@JsonPropertyOrder({ + Amount.JSON_PROPERTY_CURRENCY, + Amount.JSON_PROPERTY_VALUE +}) + +public class Amount { + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private String currency; + + public static final String JSON_PROPERTY_VALUE = "value"; + private Long value; + + public Amount() { + } + + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * + * @param currency + * @return the current {@code Amount} instance, allowing for method chaining + */ + public Amount currency(String currency) { + this.currency = currency; + return this; + } + + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * @return currency + */ + @ApiModelProperty(required = true, value = "The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).") + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCurrency() { + return currency; + } + + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + * + * @param currency + */ + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrency(String currency) { + this.currency = currency; + } + + /** + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @param value + * @return the current {@code Amount} instance, allowing for method chaining + */ + public Amount value(Long value) { + this.value = value; + return this; + } + + /** + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * @return value + */ + @ApiModelProperty(required = true, value = "The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).") + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getValue() { + return value; + } + + /** + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). + * + * @param value + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValue(Long value) { + this.value = value; + } + + /** + * Return true if this Amount object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Amount amount = (Amount) o; + return Objects.equals(this.currency, amount.currency) && + Objects.equals(this.value, amount.value); + } + + @Override + public int hashCode() { + return Objects.hash(currency, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Amount {\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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 Amount given an JSON string + * + * @param jsonString JSON string + * @return An instance of Amount + * @throws JsonProcessingException if the JSON string is invalid with respect to Amount + */ + public static Amount fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, Amount.class); + } +/** + * Convert an instance of Amount 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/disputewebhooks/BalancePlatformNotificationResponse.java b/src/main/java/com/adyen/model/disputewebhooks/BalancePlatformNotificationResponse.java new file mode 100644 index 000000000..9a7741e79 --- /dev/null +++ b/src/main/java/com/adyen/model/disputewebhooks/BalancePlatformNotificationResponse.java @@ -0,0 +1,135 @@ +/* + * Dispute webhooks + * + * The version of the OpenAPI document: 1 + * + * + * 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.disputewebhooks; + +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; + + +/** + * BalancePlatformNotificationResponse + */ +@JsonPropertyOrder({ + BalancePlatformNotificationResponse.JSON_PROPERTY_NOTIFICATION_RESPONSE +}) + +public class BalancePlatformNotificationResponse { + public static final String JSON_PROPERTY_NOTIFICATION_RESPONSE = "notificationResponse"; + private String notificationResponse; + + public BalancePlatformNotificationResponse() { + } + + /** + * Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * + * @param notificationResponse + * @return the current {@code BalancePlatformNotificationResponse} instance, allowing for method chaining + */ + public BalancePlatformNotificationResponse notificationResponse(String notificationResponse) { + this.notificationResponse = notificationResponse; + return this; + } + + /** + * Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * @return notificationResponse + */ + @ApiModelProperty(value = "Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).") + @JsonProperty(JSON_PROPERTY_NOTIFICATION_RESPONSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNotificationResponse() { + return notificationResponse; + } + + /** + * Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). + * + * @param notificationResponse + */ + @JsonProperty(JSON_PROPERTY_NOTIFICATION_RESPONSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNotificationResponse(String notificationResponse) { + this.notificationResponse = notificationResponse; + } + + /** + * Return true if this BalancePlatformNotificationResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalancePlatformNotificationResponse balancePlatformNotificationResponse = (BalancePlatformNotificationResponse) o; + return Objects.equals(this.notificationResponse, balancePlatformNotificationResponse.notificationResponse); + } + + @Override + public int hashCode() { + return Objects.hash(notificationResponse); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalancePlatformNotificationResponse {\n"); + sb.append(" notificationResponse: ").append(toIndentedString(notificationResponse)).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 BalancePlatformNotificationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BalancePlatformNotificationResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to BalancePlatformNotificationResponse + */ + public static BalancePlatformNotificationResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, BalancePlatformNotificationResponse.class); + } +/** + * Convert an instance of BalancePlatformNotificationResponse 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/disputewebhooks/DisputeEventNotification.java b/src/main/java/com/adyen/model/disputewebhooks/DisputeEventNotification.java new file mode 100644 index 000000000..9c3b2edc1 --- /dev/null +++ b/src/main/java/com/adyen/model/disputewebhooks/DisputeEventNotification.java @@ -0,0 +1,523 @@ +/* + * Dispute webhooks + * + * The version of the OpenAPI document: 1 + * + * + * 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.disputewebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.disputewebhooks.Amount; +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 java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * DisputeEventNotification + */ +@JsonPropertyOrder({ + DisputeEventNotification.JSON_PROPERTY_ARN, + DisputeEventNotification.JSON_PROPERTY_BALANCE_PLATFORM, + DisputeEventNotification.JSON_PROPERTY_CREATION_DATE, + DisputeEventNotification.JSON_PROPERTY_DESCRIPTION, + DisputeEventNotification.JSON_PROPERTY_DISPUTED_AMOUNT, + DisputeEventNotification.JSON_PROPERTY_ID, + DisputeEventNotification.JSON_PROPERTY_STATUS, + DisputeEventNotification.JSON_PROPERTY_STATUS_DETAIL, + DisputeEventNotification.JSON_PROPERTY_TRANSACTION_ID, + DisputeEventNotification.JSON_PROPERTY_TYPE +}) + +public class DisputeEventNotification { + public static final String JSON_PROPERTY_ARN = "arn"; + private String arn; + + public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform"; + private String balancePlatform; + + public static final String JSON_PROPERTY_CREATION_DATE = "creationDate"; + private OffsetDateTime creationDate; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_DISPUTED_AMOUNT = "disputedAmount"; + private Amount disputedAmount; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_STATUS_DETAIL = "statusDetail"; + private String statusDetail; + + public static final String JSON_PROPERTY_TRANSACTION_ID = "transactionId"; + private String transactionId; + + /** + * The type of dispute raised for the transaction. + */ + public enum TypeEnum { + FRAUD("fraud"), + + NOTDELIVERED("notDelivered"); + + 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 DisputeEventNotification() { + } + + /** + * The unique Acquirer Reference Number (arn) generated by the card scheme for each capture. You can use the arn to trace the transaction through its lifecycle. + * + * @param arn + * @return the current {@code DisputeEventNotification} instance, allowing for method chaining + */ + public DisputeEventNotification arn(String arn) { + this.arn = arn; + return this; + } + + /** + * The unique Acquirer Reference Number (arn) generated by the card scheme for each capture. You can use the arn to trace the transaction through its lifecycle. + * @return arn + */ + @ApiModelProperty(value = "The unique Acquirer Reference Number (arn) generated by the card scheme for each capture. You can use the arn to trace the transaction through its lifecycle.") + @JsonProperty(JSON_PROPERTY_ARN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getArn() { + return arn; + } + + /** + * The unique Acquirer Reference Number (arn) generated by the card scheme for each capture. You can use the arn to trace the transaction through its lifecycle. + * + * @param arn + */ + @JsonProperty(JSON_PROPERTY_ARN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArn(String arn) { + this.arn = arn; + } + + /** + * The unique identifier of the balance platform. + * + * @param balancePlatform + * @return the current {@code DisputeEventNotification} instance, allowing for method chaining + */ + public DisputeEventNotification balancePlatform(String balancePlatform) { + this.balancePlatform = balancePlatform; + return this; + } + + /** + * The unique identifier of the balance platform. + * @return balancePlatform + */ + @ApiModelProperty(value = "The unique identifier of the balance platform.") + @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBalancePlatform() { + return balancePlatform; + } + + /** + * The unique identifier of the balance platform. + * + * @param balancePlatform + */ + @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalancePlatform(String balancePlatform) { + this.balancePlatform = balancePlatform; + } + + /** + * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @param creationDate + * @return the current {@code DisputeEventNotification} instance, allowing for method chaining + */ + public DisputeEventNotification creationDate(OffsetDateTime creationDate) { + this.creationDate = creationDate; + return this; + } + + /** + * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * @return creationDate + */ + @ApiModelProperty(value = "The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.") + @JsonProperty(JSON_PROPERTY_CREATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreationDate() { + return creationDate; + } + + /** + * The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. + * + * @param creationDate + */ + @JsonProperty(JSON_PROPERTY_CREATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreationDate(OffsetDateTime creationDate) { + this.creationDate = creationDate; + } + + /** + * Contains information about the dispute. + * + * @param description + * @return the current {@code DisputeEventNotification} instance, allowing for method chaining + */ + public DisputeEventNotification description(String description) { + this.description = description; + return this; + } + + /** + * Contains information about the dispute. + * @return description + */ + @ApiModelProperty(value = "Contains information about the dispute.") + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + /** + * Contains information about the dispute. + * + * @param description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + /** + * disputedAmount + * + * @param disputedAmount + * @return the current {@code DisputeEventNotification} instance, allowing for method chaining + */ + public DisputeEventNotification disputedAmount(Amount disputedAmount) { + this.disputedAmount = disputedAmount; + return this; + } + + /** + * disputedAmount + * @return disputedAmount + */ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_DISPUTED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Amount getDisputedAmount() { + return disputedAmount; + } + + /** + * disputedAmount + * + * @param disputedAmount + */ + @JsonProperty(JSON_PROPERTY_DISPUTED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDisputedAmount(Amount disputedAmount) { + this.disputedAmount = disputedAmount; + } + + /** + * The ID of the resource. + * + * @param id + * @return the current {@code DisputeEventNotification} instance, allowing for method chaining + */ + public DisputeEventNotification id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the resource. + * @return id + */ + @ApiModelProperty(value = "The ID of the resource.") + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + /** + * The ID of the resource. + * + * @param id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + /** + * The current status of the dispute. + * + * @param status + * @return the current {@code DisputeEventNotification} instance, allowing for method chaining + */ + public DisputeEventNotification status(String status) { + this.status = status; + return this; + } + + /** + * The current status of the dispute. + * @return status + */ + @ApiModelProperty(value = "The current status of the dispute.") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + /** + * The current status of the dispute. + * + * @param status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(String status) { + this.status = status; + } + + /** + * Additional information about the status of the dispute, when available. + * + * @param statusDetail + * @return the current {@code DisputeEventNotification} instance, allowing for method chaining + */ + public DisputeEventNotification statusDetail(String statusDetail) { + this.statusDetail = statusDetail; + return this; + } + + /** + * Additional information about the status of the dispute, when available. + * @return statusDetail + */ + @ApiModelProperty(value = "Additional information about the status of the dispute, when available.") + @JsonProperty(JSON_PROPERTY_STATUS_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatusDetail() { + return statusDetail; + } + + /** + * Additional information about the status of the dispute, when available. + * + * @param statusDetail + */ + @JsonProperty(JSON_PROPERTY_STATUS_DETAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatusDetail(String statusDetail) { + this.statusDetail = statusDetail; + } + + /** + * The unique reference of the transaction for which the dispute is requested. + * + * @param transactionId + * @return the current {@code DisputeEventNotification} instance, allowing for method chaining + */ + public DisputeEventNotification transactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + /** + * The unique reference of the transaction for which the dispute is requested. + * @return transactionId + */ + @ApiModelProperty(value = "The unique reference of the transaction for which the dispute is requested.") + @JsonProperty(JSON_PROPERTY_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTransactionId() { + return transactionId; + } + + /** + * The unique reference of the transaction for which the dispute is requested. + * + * @param transactionId + */ + @JsonProperty(JSON_PROPERTY_TRANSACTION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + /** + * The type of dispute raised for the transaction. + * + * @param type + * @return the current {@code DisputeEventNotification} instance, allowing for method chaining + */ + public DisputeEventNotification type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of dispute raised for the transaction. + * @return type + */ + @ApiModelProperty(value = "The type of dispute raised for the transaction.") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * The type of dispute raised for the transaction. + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Return true if this DisputeEventNotification object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisputeEventNotification disputeEventNotification = (DisputeEventNotification) o; + return Objects.equals(this.arn, disputeEventNotification.arn) && + Objects.equals(this.balancePlatform, disputeEventNotification.balancePlatform) && + Objects.equals(this.creationDate, disputeEventNotification.creationDate) && + Objects.equals(this.description, disputeEventNotification.description) && + Objects.equals(this.disputedAmount, disputeEventNotification.disputedAmount) && + Objects.equals(this.id, disputeEventNotification.id) && + Objects.equals(this.status, disputeEventNotification.status) && + Objects.equals(this.statusDetail, disputeEventNotification.statusDetail) && + Objects.equals(this.transactionId, disputeEventNotification.transactionId) && + Objects.equals(this.type, disputeEventNotification.type); + } + + @Override + public int hashCode() { + return Objects.hash(arn, balancePlatform, creationDate, description, disputedAmount, id, status, statusDetail, transactionId, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisputeEventNotification {\n"); + sb.append(" arn: ").append(toIndentedString(arn)).append("\n"); + sb.append(" balancePlatform: ").append(toIndentedString(balancePlatform)).append("\n"); + sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" disputedAmount: ").append(toIndentedString(disputedAmount)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusDetail: ").append(toIndentedString(statusDetail)).append("\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).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 DisputeEventNotification given an JSON string + * + * @param jsonString JSON string + * @return An instance of DisputeEventNotification + * @throws JsonProcessingException if the JSON string is invalid with respect to DisputeEventNotification + */ + public static DisputeEventNotification fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DisputeEventNotification.class); + } +/** + * Convert an instance of DisputeEventNotification 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/disputewebhooks/DisputeNotificationRequest.java b/src/main/java/com/adyen/model/disputewebhooks/DisputeNotificationRequest.java new file mode 100644 index 000000000..dd73de518 --- /dev/null +++ b/src/main/java/com/adyen/model/disputewebhooks/DisputeNotificationRequest.java @@ -0,0 +1,210 @@ +/* + * Dispute webhooks + * + * The version of the OpenAPI document: 1 + * + * + * 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.disputewebhooks; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.disputewebhooks.DisputeEventNotification; +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; + + +/** + * DisputeNotificationRequest + */ +@JsonPropertyOrder({ + DisputeNotificationRequest.JSON_PROPERTY_DATA, + DisputeNotificationRequest.JSON_PROPERTY_TYPE +}) + +public class DisputeNotificationRequest { + public static final String JSON_PROPERTY_DATA = "data"; + private DisputeEventNotification data; + + /** + * Type of webhook. + */ + public enum TypeEnum { + CREATED("balancePlatform.dispute.created"), + + UPDATED("balancePlatform.dispute.updated"); + + 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 DisputeNotificationRequest() { + } + + /** + * data + * + * @param data + * @return the current {@code DisputeNotificationRequest} instance, allowing for method chaining + */ + public DisputeNotificationRequest data(DisputeEventNotification data) { + this.data = data; + return this; + } + + /** + * data + * @return data + */ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DisputeEventNotification getData() { + return data; + } + + /** + * data + * + * @param data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(DisputeEventNotification data) { + this.data = data; + } + + /** + * Type of webhook. + * + * @param type + * @return the current {@code DisputeNotificationRequest} instance, allowing for method chaining + */ + public DisputeNotificationRequest type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of webhook. + * @return type + */ + @ApiModelProperty(required = true, value = "Type of webhook.") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * Type of webhook. + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * Return true if this DisputeNotificationRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DisputeNotificationRequest disputeNotificationRequest = (DisputeNotificationRequest) o; + return Objects.equals(this.data, disputeNotificationRequest.data) && + Objects.equals(this.type, disputeNotificationRequest.type); + } + + @Override + public int hashCode() { + return Objects.hash(data, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DisputeNotificationRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).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 DisputeNotificationRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of DisputeNotificationRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to DisputeNotificationRequest + */ + public static DisputeNotificationRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, DisputeNotificationRequest.class); + } +/** + * Convert an instance of DisputeNotificationRequest 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/disputewebhooks/JSON.java b/src/main/java/com/adyen/model/disputewebhooks/JSON.java new file mode 100644 index 000000000..a1d9b9220 --- /dev/null +++ b/src/main/java/com/adyen/model/disputewebhooks/JSON.java @@ -0,0 +1,253 @@ +package com.adyen.model.disputewebhooks; + +import com.adyen.serializer.ByteArraySerializer; +import com.adyen.serializer.ByteArrayDeserializer; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.adyen.model.disputewebhooks.*; + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.ext.ContextResolver; + +public class JSON implements ContextResolver { + private static ObjectMapper mapper; + + public JSON() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + JsonMapper.builder().configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.registerModule(new JavaTimeModule()); + // Custom ByteSerializer + SimpleModule simpleModule = new SimpleModule(); + simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); + mapper.registerModule(simpleModule); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public static ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap, ClassDiscriminatorMapping>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map> modelDescendants = new HashMap, Map>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static + { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/src/main/java/com/adyen/model/legalentitymanagement/IdentificationData.java b/src/main/java/com/adyen/model/legalentitymanagement/IdentificationData.java index aa313a5c8..6c15af282 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/IdentificationData.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/IdentificationData.java @@ -61,7 +61,7 @@ public class IdentificationData { private String number; /** - * Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** + * Type of identity data. For individuals, the following types are supported. See our [onboarding guide](https://docs.adyen.com/platforms/onboard-users/onboarding-steps/?onboarding_type=custom) for other supported countries. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** */ public enum TypeEnum { NATIONALIDNUMBER("nationalIdNumber"), @@ -313,7 +313,7 @@ public void setNumber(String number) { } /** - * Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** + * Type of identity data. For individuals, the following types are supported. See our [onboarding guide](https://docs.adyen.com/platforms/onboard-users/onboarding-steps/?onboarding_type=custom) for other supported countries. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** * * @param type * @return the current {@code IdentificationData} instance, allowing for method chaining @@ -324,10 +324,10 @@ public IdentificationData type(TypeEnum type) { } /** - * Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** + * Type of identity data. For individuals, the following types are supported. See our [onboarding guide](https://docs.adyen.com/platforms/onboard-users/onboarding-steps/?onboarding_type=custom) for other supported countries. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** * @return type */ - @ApiModelProperty(required = true, value = "Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber**") + @ApiModelProperty(required = true, value = "Type of identity data. For individuals, the following types are supported. See our [onboarding guide](https://docs.adyen.com/platforms/onboard-users/onboarding-steps/?onboarding_type=custom) for other supported countries. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber**") @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public TypeEnum getType() { @@ -335,7 +335,7 @@ public TypeEnum getType() { } /** - * Type of identity data. For individuals, the following types are supported: - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** + * Type of identity data. For individuals, the following types are supported. See our [onboarding guide](https://docs.adyen.com/platforms/onboard-users/onboarding-steps/?onboarding_type=custom) for other supported countries. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** * * @param type */ 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..2bae52d63 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");