From bb1c98d09026a56d181ef30d77c097ddc4fc521c Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Tue, 3 Dec 2024 16:44:37 +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 +++++++ .../CalculatePciStatusRequest.java | 184 +++++ .../CalculatePciStatusResponse.java | 135 ++++ .../model/legalentitymanagement/Document.java | 10 +- .../GeneratePciDescriptionResponse.java | 8 +- .../IdentificationData.java | 10 +- .../legalentitymanagement/LegalEntity.java | 42 +- .../LegalEntityAssociation.java | 16 +- .../LegalEntityInfo.java | 42 +- .../LegalEntityInfoRequiredType.java | 42 +- .../OnboardingLinkSettings.java | 41 +- .../legalentitymanagement/PhoneNumber.java | 41 +- .../model/legalentitymanagement/Trust.java | 98 +-- .../UnincorporatedPartnership.java | 698 ++++++++++++++++++ .../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 +- .../PciQuestionnairesApi.java | 37 + 32 files changed, 3545 insertions(+), 126 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/legalentitymanagement/CalculatePciStatusRequest.java create mode 100644 src/main/java/com/adyen/model/legalentitymanagement/CalculatePciStatusResponse.java create mode 100644 src/main/java/com/adyen/model/legalentitymanagement/UnincorporatedPartnership.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/CalculatePciStatusRequest.java b/src/main/java/com/adyen/model/legalentitymanagement/CalculatePciStatusRequest.java new file mode 100644 index 000000000..e39e99f29 --- /dev/null +++ b/src/main/java/com/adyen/model/legalentitymanagement/CalculatePciStatusRequest.java @@ -0,0 +1,184 @@ +/* + * Legal Entity 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.legalentitymanagement; + +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 java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * CalculatePciStatusRequest + */ +@JsonPropertyOrder({ + CalculatePciStatusRequest.JSON_PROPERTY_ADDITIONAL_SALES_CHANNELS +}) + +public class CalculatePciStatusRequest { + /** + * Gets or Sets additionalSalesChannels + */ + public enum AdditionalSalesChannelsEnum { + ECOMMERCE("eCommerce"), + + ECOMMOTO("ecomMoto"), + + POS("pos"), + + POSMOTO("posMoto"); + + private String value; + + AdditionalSalesChannelsEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AdditionalSalesChannelsEnum fromValue(String value) { + for (AdditionalSalesChannelsEnum b : AdditionalSalesChannelsEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDITIONAL_SALES_CHANNELS = "additionalSalesChannels"; + private List additionalSalesChannels = null; + + public CalculatePciStatusRequest() { + } + + /** + * An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/platforms) and [add payment methods](https://docs.adyen.com/adyen-for-platforms-model) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** + * + * @param additionalSalesChannels + * @return the current {@code CalculatePciStatusRequest} instance, allowing for method chaining + */ + public CalculatePciStatusRequest additionalSalesChannels(List additionalSalesChannels) { + this.additionalSalesChannels = additionalSalesChannels; + return this; + } + + public CalculatePciStatusRequest addAdditionalSalesChannelsItem(AdditionalSalesChannelsEnum additionalSalesChannelsItem) { + if (this.additionalSalesChannels == null) { + this.additionalSalesChannels = new ArrayList<>(); + } + this.additionalSalesChannels.add(additionalSalesChannelsItem); + return this; + } + + /** + * An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/platforms) and [add payment methods](https://docs.adyen.com/adyen-for-platforms-model) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** + * @return additionalSalesChannels + */ + @ApiModelProperty(value = "An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/platforms) and [add payment methods](https://docs.adyen.com/adyen-for-platforms-model) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** ") + @JsonProperty(JSON_PROPERTY_ADDITIONAL_SALES_CHANNELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAdditionalSalesChannels() { + return additionalSalesChannels; + } + + /** + * An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/platforms) and [add payment methods](https://docs.adyen.com/adyen-for-platforms-model) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** + * + * @param additionalSalesChannels + */ + @JsonProperty(JSON_PROPERTY_ADDITIONAL_SALES_CHANNELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAdditionalSalesChannels(List additionalSalesChannels) { + this.additionalSalesChannels = additionalSalesChannels; + } + + /** + * Return true if this CalculatePciStatusRequest object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CalculatePciStatusRequest calculatePciStatusRequest = (CalculatePciStatusRequest) o; + return Objects.equals(this.additionalSalesChannels, calculatePciStatusRequest.additionalSalesChannels); + } + + @Override + public int hashCode() { + return Objects.hash(additionalSalesChannels); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CalculatePciStatusRequest {\n"); + sb.append(" additionalSalesChannels: ").append(toIndentedString(additionalSalesChannels)).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 CalculatePciStatusRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of CalculatePciStatusRequest + * @throws JsonProcessingException if the JSON string is invalid with respect to CalculatePciStatusRequest + */ + public static CalculatePciStatusRequest fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CalculatePciStatusRequest.class); + } +/** + * Convert an instance of CalculatePciStatusRequest to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/legalentitymanagement/CalculatePciStatusResponse.java b/src/main/java/com/adyen/model/legalentitymanagement/CalculatePciStatusResponse.java new file mode 100644 index 000000000..d01d3a73b --- /dev/null +++ b/src/main/java/com/adyen/model/legalentitymanagement/CalculatePciStatusResponse.java @@ -0,0 +1,135 @@ +/* + * Legal Entity 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.legalentitymanagement; + +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; + + +/** + * CalculatePciStatusResponse + */ +@JsonPropertyOrder({ + CalculatePciStatusResponse.JSON_PROPERTY_SIGNING_REQUIRED +}) + +public class CalculatePciStatusResponse { + public static final String JSON_PROPERTY_SIGNING_REQUIRED = "signingRequired"; + private Boolean signingRequired; + + public CalculatePciStatusResponse() { + } + + /** + * Indicates if the user is required to sign PCI questionnaires. If **false**, they do not need to sign any questionnaires. + * + * @param signingRequired + * @return the current {@code CalculatePciStatusResponse} instance, allowing for method chaining + */ + public CalculatePciStatusResponse signingRequired(Boolean signingRequired) { + this.signingRequired = signingRequired; + return this; + } + + /** + * Indicates if the user is required to sign PCI questionnaires. If **false**, they do not need to sign any questionnaires. + * @return signingRequired + */ + @ApiModelProperty(value = "Indicates if the user is required to sign PCI questionnaires. If **false**, they do not need to sign any questionnaires.") + @JsonProperty(JSON_PROPERTY_SIGNING_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSigningRequired() { + return signingRequired; + } + + /** + * Indicates if the user is required to sign PCI questionnaires. If **false**, they do not need to sign any questionnaires. + * + * @param signingRequired + */ + @JsonProperty(JSON_PROPERTY_SIGNING_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSigningRequired(Boolean signingRequired) { + this.signingRequired = signingRequired; + } + + /** + * Return true if this CalculatePciStatusResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CalculatePciStatusResponse calculatePciStatusResponse = (CalculatePciStatusResponse) o; + return Objects.equals(this.signingRequired, calculatePciStatusResponse.signingRequired); + } + + @Override + public int hashCode() { + return Objects.hash(signingRequired); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CalculatePciStatusResponse {\n"); + sb.append(" signingRequired: ").append(toIndentedString(signingRequired)).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 CalculatePciStatusResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CalculatePciStatusResponse + * @throws JsonProcessingException if the JSON string is invalid with respect to CalculatePciStatusResponse + */ + public static CalculatePciStatusResponse fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, CalculatePciStatusResponse.class); + } +/** + * Convert an instance of CalculatePciStatusResponse to an JSON string + * + * @return JSON string + */ + public String toJson() throws JsonProcessingException { + return JSON.getMapper().writeValueAsString(this); + } +} diff --git a/src/main/java/com/adyen/model/legalentitymanagement/Document.java b/src/main/java/com/adyen/model/legalentitymanagement/Document.java index 50e1b7019..c4c40ab81 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/Document.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/Document.java @@ -92,7 +92,7 @@ public class Document { private OwnerEntity owner; /** - * Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + * Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value is **constitutionalDocument**. * For **unincorporatedPartnership**, the `type` value is **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). */ public enum TypeEnum { BANKSTATEMENT("bankStatement"), @@ -598,7 +598,7 @@ public void setOwner(OwnerEntity owner) { } /** - * Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + * Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value is **constitutionalDocument**. * For **unincorporatedPartnership**, the `type` value is **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). * * @param type * @return the current {@code Document} instance, allowing for method chaining @@ -609,10 +609,10 @@ public Document type(TypeEnum type) { } /** - * Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + * Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value is **constitutionalDocument**. * For **unincorporatedPartnership**, the `type` value is **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). * @return type */ - @ApiModelProperty(required = true, value = "Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id).") + @ApiModelProperty(required = true, value = "Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value is **constitutionalDocument**. * For **unincorporatedPartnership**, the `type` value is **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id).") @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public TypeEnum getType() { @@ -620,7 +620,7 @@ public TypeEnum getType() { } /** - * Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value can be **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). + * Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value is **constitutionalDocument**. * For **unincorporatedPartnership**, the `type` value is **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). * * @param type */ diff --git a/src/main/java/com/adyen/model/legalentitymanagement/GeneratePciDescriptionResponse.java b/src/main/java/com/adyen/model/legalentitymanagement/GeneratePciDescriptionResponse.java index 083e128ad..a534b343a 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/GeneratePciDescriptionResponse.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/GeneratePciDescriptionResponse.java @@ -118,7 +118,7 @@ public void setLanguage(String language) { } /** - * The array of Adyen-generated unique identifiers for the questionnaires. + * The array of Adyen-generated unique identifiers for the questionnaires. If empty, the user is not required to sign questionnaires. * * @param pciTemplateReferences * @return the current {@code GeneratePciDescriptionResponse} instance, allowing for method chaining @@ -137,10 +137,10 @@ public GeneratePciDescriptionResponse addPciTemplateReferencesItem(String pciTem } /** - * The array of Adyen-generated unique identifiers for the questionnaires. + * The array of Adyen-generated unique identifiers for the questionnaires. If empty, the user is not required to sign questionnaires. * @return pciTemplateReferences */ - @ApiModelProperty(value = "The array of Adyen-generated unique identifiers for the questionnaires.") + @ApiModelProperty(value = "The array of Adyen-generated unique identifiers for the questionnaires. If empty, the user is not required to sign questionnaires.") @JsonProperty(JSON_PROPERTY_PCI_TEMPLATE_REFERENCES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getPciTemplateReferences() { @@ -148,7 +148,7 @@ public List getPciTemplateReferences() { } /** - * The array of Adyen-generated unique identifiers for the questionnaires. + * The array of Adyen-generated unique identifiers for the questionnaires. If empty, the user is not required to sign questionnaires. * * @param pciTemplateReferences */ 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/LegalEntity.java b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntity.java index 95da092f5..eda22a6b8 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntity.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntity.java @@ -26,6 +26,7 @@ import com.adyen.model.legalentitymanagement.SoleProprietorship; import com.adyen.model.legalentitymanagement.TransferInstrumentReference; import com.adyen.model.legalentitymanagement.Trust; +import com.adyen.model.legalentitymanagement.UnincorporatedPartnership; import com.adyen.model.legalentitymanagement.VerificationDeadline; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -59,6 +60,7 @@ LegalEntity.JSON_PROPERTY_TRANSFER_INSTRUMENTS, LegalEntity.JSON_PROPERTY_TRUST, LegalEntity.JSON_PROPERTY_TYPE, + LegalEntity.JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP, LegalEntity.JSON_PROPERTY_VERIFICATION_DEADLINES, LegalEntity.JSON_PROPERTY_VERIFICATION_PLAN }) @@ -145,6 +147,9 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; private TypeEnum type; + public static final String JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP = "unincorporatedPartnership"; + private UnincorporatedPartnership unincorporatedPartnership; + public static final String JSON_PROPERTY_VERIFICATION_DEADLINES = "verificationDeadlines"; private List verificationDeadlines = null; @@ -643,6 +648,39 @@ public void setType(TypeEnum type) { this.type = type; } + /** + * unincorporatedPartnership + * + * @param unincorporatedPartnership + * @return the current {@code LegalEntity} instance, allowing for method chaining + */ + public LegalEntity unincorporatedPartnership(UnincorporatedPartnership unincorporatedPartnership) { + this.unincorporatedPartnership = unincorporatedPartnership; + return this; + } + + /** + * unincorporatedPartnership + * @return unincorporatedPartnership + */ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UnincorporatedPartnership getUnincorporatedPartnership() { + return unincorporatedPartnership; + } + + /** + * unincorporatedPartnership + * + * @param unincorporatedPartnership + */ + @JsonProperty(JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUnincorporatedPartnership(UnincorporatedPartnership unincorporatedPartnership) { + this.unincorporatedPartnership = unincorporatedPartnership; + } + /** * List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. * @@ -742,13 +780,14 @@ public boolean equals(Object o) { Objects.equals(this.transferInstruments, legalEntity.transferInstruments) && Objects.equals(this.trust, legalEntity.trust) && Objects.equals(this.type, legalEntity.type) && + Objects.equals(this.unincorporatedPartnership, legalEntity.unincorporatedPartnership) && Objects.equals(this.verificationDeadlines, legalEntity.verificationDeadlines) && Objects.equals(this.verificationPlan, legalEntity.verificationPlan); } @Override public int hashCode() { - return Objects.hash(capabilities, documentDetails, documents, entityAssociations, id, individual, organization, problems, reference, soleProprietorship, transferInstruments, trust, type, verificationDeadlines, verificationPlan); + return Objects.hash(capabilities, documentDetails, documents, entityAssociations, id, individual, organization, problems, reference, soleProprietorship, transferInstruments, trust, type, unincorporatedPartnership, verificationDeadlines, verificationPlan); } @Override @@ -768,6 +807,7 @@ public String toString() { sb.append(" transferInstruments: ").append(toIndentedString(transferInstruments)).append("\n"); sb.append(" trust: ").append(toIndentedString(trust)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" unincorporatedPartnership: ").append(toIndentedString(unincorporatedPartnership)).append("\n"); sb.append(" verificationDeadlines: ").append(toIndentedString(verificationDeadlines)).append("\n"); sb.append(" verificationPlan: ").append(toIndentedString(verificationPlan)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityAssociation.java b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityAssociation.java index 90d255458..de26f77cf 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityAssociation.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityAssociation.java @@ -66,7 +66,7 @@ public class LegalEntityAssociation { private List settlorExemptionReason = null; /** - * Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. + * Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership** */ public enum TypeEnum { DEFINEDBENEFICIARY("definedBeneficiary"), @@ -81,6 +81,8 @@ public enum TypeEnum { PROTECTOR("protector"), + SECONDARYPARTNER("secondaryPartner"), + SECONDARYTRUSTEE("secondaryTrustee"), SETTLOR("settlor"), @@ -99,7 +101,9 @@ public enum TypeEnum { ULTIMATEPARENTCOMPANY("ultimateParentCompany"), - UNDEFINEDBENEFICIARY("undefinedBeneficiary"); + UNDEFINEDBENEFICIARY("undefinedBeneficiary"), + + UNINCORPORATEDPARTNERSHIP("unincorporatedPartnership"); private String value; @@ -374,7 +378,7 @@ public void setSettlorExemptionReason(List settlorExemptionReason) { } /** - * Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. + * Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership** * * @param type * @return the current {@code LegalEntityAssociation} instance, allowing for method chaining @@ -385,10 +389,10 @@ public LegalEntityAssociation type(TypeEnum type) { } /** - * Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. + * Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership** * @return type */ - @ApiModelProperty(required = true, value = "Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**.") + @ApiModelProperty(required = true, value = "Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership**") @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public TypeEnum getType() { @@ -396,7 +400,7 @@ public TypeEnum getType() { } /** - * Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. + * Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **uboThroughOwnership**, **uboThroughControl**, **director**, **signatory**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership** * * @param type */ diff --git a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityInfo.java b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityInfo.java index 4158cdda8..21219ac9d 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityInfo.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityInfo.java @@ -22,6 +22,7 @@ import com.adyen.model.legalentitymanagement.Organization; import com.adyen.model.legalentitymanagement.SoleProprietorship; import com.adyen.model.legalentitymanagement.Trust; +import com.adyen.model.legalentitymanagement.UnincorporatedPartnership; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -49,6 +50,7 @@ LegalEntityInfo.JSON_PROPERTY_SOLE_PROPRIETORSHIP, LegalEntityInfo.JSON_PROPERTY_TRUST, LegalEntityInfo.JSON_PROPERTY_TYPE, + LegalEntityInfo.JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP, LegalEntityInfo.JSON_PROPERTY_VERIFICATION_PLAN }) @@ -118,6 +120,9 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; private TypeEnum type; + public static final String JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP = "unincorporatedPartnership"; + private UnincorporatedPartnership unincorporatedPartnership; + public static final String JSON_PROPERTY_VERIFICATION_PLAN = "verificationPlan"; private String verificationPlan; @@ -404,6 +409,39 @@ public void setType(TypeEnum type) { this.type = type; } + /** + * unincorporatedPartnership + * + * @param unincorporatedPartnership + * @return the current {@code LegalEntityInfo} instance, allowing for method chaining + */ + public LegalEntityInfo unincorporatedPartnership(UnincorporatedPartnership unincorporatedPartnership) { + this.unincorporatedPartnership = unincorporatedPartnership; + return this; + } + + /** + * unincorporatedPartnership + * @return unincorporatedPartnership + */ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UnincorporatedPartnership getUnincorporatedPartnership() { + return unincorporatedPartnership; + } + + /** + * unincorporatedPartnership + * + * @param unincorporatedPartnership + */ + @JsonProperty(JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUnincorporatedPartnership(UnincorporatedPartnership unincorporatedPartnership) { + this.unincorporatedPartnership = unincorporatedPartnership; + } + /** * A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). * @@ -457,12 +495,13 @@ public boolean equals(Object o) { Objects.equals(this.soleProprietorship, legalEntityInfo.soleProprietorship) && Objects.equals(this.trust, legalEntityInfo.trust) && Objects.equals(this.type, legalEntityInfo.type) && + Objects.equals(this.unincorporatedPartnership, legalEntityInfo.unincorporatedPartnership) && Objects.equals(this.verificationPlan, legalEntityInfo.verificationPlan); } @Override public int hashCode() { - return Objects.hash(capabilities, entityAssociations, individual, organization, reference, soleProprietorship, trust, type, verificationPlan); + return Objects.hash(capabilities, entityAssociations, individual, organization, reference, soleProprietorship, trust, type, unincorporatedPartnership, verificationPlan); } @Override @@ -477,6 +516,7 @@ public String toString() { sb.append(" soleProprietorship: ").append(toIndentedString(soleProprietorship)).append("\n"); sb.append(" trust: ").append(toIndentedString(trust)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" unincorporatedPartnership: ").append(toIndentedString(unincorporatedPartnership)).append("\n"); sb.append(" verificationPlan: ").append(toIndentedString(verificationPlan)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityInfoRequiredType.java b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityInfoRequiredType.java index 64c42d5ad..43ebf1852 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityInfoRequiredType.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/LegalEntityInfoRequiredType.java @@ -22,6 +22,7 @@ import com.adyen.model.legalentitymanagement.Organization; import com.adyen.model.legalentitymanagement.SoleProprietorship; import com.adyen.model.legalentitymanagement.Trust; +import com.adyen.model.legalentitymanagement.UnincorporatedPartnership; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -49,6 +50,7 @@ LegalEntityInfoRequiredType.JSON_PROPERTY_SOLE_PROPRIETORSHIP, LegalEntityInfoRequiredType.JSON_PROPERTY_TRUST, LegalEntityInfoRequiredType.JSON_PROPERTY_TYPE, + LegalEntityInfoRequiredType.JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP, LegalEntityInfoRequiredType.JSON_PROPERTY_VERIFICATION_PLAN }) @@ -118,6 +120,9 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_TYPE = "type"; private TypeEnum type; + public static final String JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP = "unincorporatedPartnership"; + private UnincorporatedPartnership unincorporatedPartnership; + public static final String JSON_PROPERTY_VERIFICATION_PLAN = "verificationPlan"; private String verificationPlan; @@ -404,6 +409,39 @@ public void setType(TypeEnum type) { this.type = type; } + /** + * unincorporatedPartnership + * + * @param unincorporatedPartnership + * @return the current {@code LegalEntityInfoRequiredType} instance, allowing for method chaining + */ + public LegalEntityInfoRequiredType unincorporatedPartnership(UnincorporatedPartnership unincorporatedPartnership) { + this.unincorporatedPartnership = unincorporatedPartnership; + return this; + } + + /** + * unincorporatedPartnership + * @return unincorporatedPartnership + */ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UnincorporatedPartnership getUnincorporatedPartnership() { + return unincorporatedPartnership; + } + + /** + * unincorporatedPartnership + * + * @param unincorporatedPartnership + */ + @JsonProperty(JSON_PROPERTY_UNINCORPORATED_PARTNERSHIP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUnincorporatedPartnership(UnincorporatedPartnership unincorporatedPartnership) { + this.unincorporatedPartnership = unincorporatedPartnership; + } + /** * A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). * @@ -457,12 +495,13 @@ public boolean equals(Object o) { Objects.equals(this.soleProprietorship, legalEntityInfoRequiredType.soleProprietorship) && Objects.equals(this.trust, legalEntityInfoRequiredType.trust) && Objects.equals(this.type, legalEntityInfoRequiredType.type) && + Objects.equals(this.unincorporatedPartnership, legalEntityInfoRequiredType.unincorporatedPartnership) && Objects.equals(this.verificationPlan, legalEntityInfoRequiredType.verificationPlan); } @Override public int hashCode() { - return Objects.hash(capabilities, entityAssociations, individual, organization, reference, soleProprietorship, trust, type, verificationPlan); + return Objects.hash(capabilities, entityAssociations, individual, organization, reference, soleProprietorship, trust, type, unincorporatedPartnership, verificationPlan); } @Override @@ -477,6 +516,7 @@ public String toString() { sb.append(" soleProprietorship: ").append(toIndentedString(soleProprietorship)).append("\n"); sb.append(" trust: ").append(toIndentedString(trust)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" unincorporatedPartnership: ").append(toIndentedString(unincorporatedPartnership)).append("\n"); sb.append(" verificationPlan: ").append(toIndentedString(verificationPlan)).append("\n"); sb.append("}"); return sb.toString(); 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/legalentitymanagement/UnincorporatedPartnership.java b/src/main/java/com/adyen/model/legalentitymanagement/UnincorporatedPartnership.java new file mode 100644 index 000000000..4b15fe22f --- /dev/null +++ b/src/main/java/com/adyen/model/legalentitymanagement/UnincorporatedPartnership.java @@ -0,0 +1,698 @@ +/* + * Legal Entity 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.legalentitymanagement; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.adyen.model.legalentitymanagement.Address; +import com.adyen.model.legalentitymanagement.TaxInformation; +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.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; + + +/** + * UnincorporatedPartnership + */ +@JsonPropertyOrder({ + UnincorporatedPartnership.JSON_PROPERTY_COUNTRY_OF_GOVERNING_LAW, + UnincorporatedPartnership.JSON_PROPERTY_DATE_OF_INCORPORATION, + UnincorporatedPartnership.JSON_PROPERTY_DESCRIPTION, + UnincorporatedPartnership.JSON_PROPERTY_DOING_BUSINESS_AS, + UnincorporatedPartnership.JSON_PROPERTY_NAME, + UnincorporatedPartnership.JSON_PROPERTY_PRINCIPAL_PLACE_OF_BUSINESS, + UnincorporatedPartnership.JSON_PROPERTY_REGISTERED_ADDRESS, + UnincorporatedPartnership.JSON_PROPERTY_REGISTRATION_NUMBER, + UnincorporatedPartnership.JSON_PROPERTY_TAX_INFORMATION, + UnincorporatedPartnership.JSON_PROPERTY_TYPE, + UnincorporatedPartnership.JSON_PROPERTY_VAT_ABSENCE_REASON, + UnincorporatedPartnership.JSON_PROPERTY_VAT_NUMBER +}) + +public class UnincorporatedPartnership { + public static final String JSON_PROPERTY_COUNTRY_OF_GOVERNING_LAW = "countryOfGoverningLaw"; + private String countryOfGoverningLaw; + + 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; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PRINCIPAL_PLACE_OF_BUSINESS = "principalPlaceOfBusiness"; + private Address principalPlaceOfBusiness; + + public static final String JSON_PROPERTY_REGISTERED_ADDRESS = "registeredAddress"; + private Address registeredAddress; + + public static final String JSON_PROPERTY_REGISTRATION_NUMBER = "registrationNumber"; + private String registrationNumber; + + public static final String JSON_PROPERTY_TAX_INFORMATION = "taxInformation"; + private List taxInformation = null; + + /** + * Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** * **limitedLiabilityPartnership** * **eg** * **cooperative** * **vos** * **comunidadDeBienes** * **herenciaYacente** * **comunidadDePropietarios** * **sep** * **sca** * **bt** * **kkt** * **scs** * **snc** + */ + public enum TypeEnum { + LIMITEDPARTNERSHIP("limitedPartnership"), + + GENERALPARTNERSHIP("generalPartnership"), + + FAMILYPARTNERSHIP("familyPartnership"), + + COMMERCIALPARTNERSHIP("commercialPartnership"), + + PUBLICPARTNERSHIP("publicPartnership"), + + OTHERPARTNERSHIP("otherPartnership"), + + GBR("gbr"), + + GMBH("gmbh"), + + KGAA("kgaa"), + + CV("cv"), + + VOF("vof"), + + MAATSCHAP("maatschap"), + + PRIVATEFUNDLIMITEDPARTNERSHIP("privateFundLimitedPartnership"), + + BUSINESSTRUSTENTITY("businessTrustEntity"), + + BUSINESSPARTNERSHIP("businessPartnership"), + + LIMITEDLIABILITYPARTNERSHIP("limitedLiabilityPartnership"), + + EG("eg"), + + COOPERATIVE("cooperative"), + + VOS("vos"), + + COMUNIDADDEBIENES("comunidadDeBienes"), + + HERENCIAYACENTE("herenciaYacente"), + + COMUNIDADDEPROPIETARIOS("comunidadDePropietarios"), + + SEP("sep"), + + SCA("sca"), + + BT("bt"), + + KKT("kkt"), + + SCS("scs"), + + SNC("snc"); + + 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; + + /** + * The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. + */ + public enum VatAbsenceReasonEnum { + INDUSTRYEXEMPTION("industryExemption"), + + BELOWTAXTHRESHOLD("belowTaxThreshold"); + + private String value; + + VatAbsenceReasonEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static VatAbsenceReasonEnum fromValue(String value) { + for (VatAbsenceReasonEnum b : VatAbsenceReasonEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_VAT_ABSENCE_REASON = "vatAbsenceReason"; + private VatAbsenceReasonEnum vatAbsenceReason; + + public static final String JSON_PROPERTY_VAT_NUMBER = "vatNumber"; + private String vatNumber; + + public UnincorporatedPartnership() { + } + + /** + * The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. + * + * @param countryOfGoverningLaw + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership countryOfGoverningLaw(String countryOfGoverningLaw) { + this.countryOfGoverningLaw = countryOfGoverningLaw; + return this; + } + + /** + * The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. + * @return countryOfGoverningLaw + */ + @ApiModelProperty(required = true, value = "The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country.") + @JsonProperty(JSON_PROPERTY_COUNTRY_OF_GOVERNING_LAW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCountryOfGoverningLaw() { + return countryOfGoverningLaw; + } + + /** + * The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. + * + * @param countryOfGoverningLaw + */ + @JsonProperty(JSON_PROPERTY_COUNTRY_OF_GOVERNING_LAW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountryOfGoverningLaw(String countryOfGoverningLaw) { + this.countryOfGoverningLaw = countryOfGoverningLaw; + } + + /** + * The date when the legal arrangement was incorporated in YYYY-MM-DD format. + * + * @param dateOfIncorporation + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership dateOfIncorporation(String dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + return this; + } + + /** + * The date when the legal arrangement was incorporated in YYYY-MM-DD format. + * @return dateOfIncorporation + */ + @ApiModelProperty(value = "The date when the legal arrangement was incorporated in YYYY-MM-DD format.") + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDateOfIncorporation() { + return dateOfIncorporation; + } + + /** + * The date when the legal arrangement was incorporated in YYYY-MM-DD format. + * + * @param dateOfIncorporation + */ + @JsonProperty(JSON_PROPERTY_DATE_OF_INCORPORATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDateOfIncorporation(String dateOfIncorporation) { + this.dateOfIncorporation = dateOfIncorporation; + } + + /** + * Short description about the Legal Arrangement. + * + * @param description + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership description(String description) { + this.description = description; + return this; + } + + /** + * Short description about the Legal Arrangement. + * @return description + */ + @ApiModelProperty(value = "Short description about the Legal Arrangement.") + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + /** + * Short description about the Legal Arrangement. + * + * @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`. + * + * @param doingBusinessAs + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership doingBusinessAs(String doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + return this; + } + + /** + * The registered name, if different from the `name`. + * @return doingBusinessAs + */ + @ApiModelProperty(value = "The registered name, if different from the `name`.") + @JsonProperty(JSON_PROPERTY_DOING_BUSINESS_AS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDoingBusinessAs() { + return doingBusinessAs; + } + + /** + * The registered name, if different from the `name`. + * + * @param doingBusinessAs + */ + @JsonProperty(JSON_PROPERTY_DOING_BUSINESS_AS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDoingBusinessAs(String doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + } + + /** + * The legal name. + * + * @param name + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership name(String name) { + this.name = name; + return this; + } + + /** + * The legal name. + * @return name + */ + @ApiModelProperty(required = true, value = "The legal name.") + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + /** + * The legal name. + * + * @param name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + /** + * principalPlaceOfBusiness + * + * @param principalPlaceOfBusiness + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership principalPlaceOfBusiness(Address principalPlaceOfBusiness) { + this.principalPlaceOfBusiness = principalPlaceOfBusiness; + return this; + } + + /** + * principalPlaceOfBusiness + * @return principalPlaceOfBusiness + */ + @ApiModelProperty(value = "") + @JsonProperty(JSON_PROPERTY_PRINCIPAL_PLACE_OF_BUSINESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Address getPrincipalPlaceOfBusiness() { + return principalPlaceOfBusiness; + } + + /** + * principalPlaceOfBusiness + * + * @param principalPlaceOfBusiness + */ + @JsonProperty(JSON_PROPERTY_PRINCIPAL_PLACE_OF_BUSINESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrincipalPlaceOfBusiness(Address principalPlaceOfBusiness) { + this.principalPlaceOfBusiness = principalPlaceOfBusiness; + } + + /** + * registeredAddress + * + * @param registeredAddress + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership registeredAddress(Address registeredAddress) { + this.registeredAddress = registeredAddress; + return this; + } + + /** + * registeredAddress + * @return registeredAddress + */ + @ApiModelProperty(required = true, value = "") + @JsonProperty(JSON_PROPERTY_REGISTERED_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Address getRegisteredAddress() { + return registeredAddress; + } + + /** + * registeredAddress + * + * @param registeredAddress + */ + @JsonProperty(JSON_PROPERTY_REGISTERED_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRegisteredAddress(Address registeredAddress) { + this.registeredAddress = registeredAddress; + } + + /** + * The registration number. + * + * @param registrationNumber + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership registrationNumber(String registrationNumber) { + this.registrationNumber = registrationNumber; + return this; + } + + /** + * The registration number. + * @return registrationNumber + */ + @ApiModelProperty(value = "The registration number.") + @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRegistrationNumber() { + return registrationNumber; + } + + /** + * The registration number. + * + * @param registrationNumber + */ + @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRegistrationNumber(String registrationNumber) { + this.registrationNumber = registrationNumber; + } + + /** + * The tax information of the entity. + * + * @param taxInformation + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership taxInformation(List taxInformation) { + this.taxInformation = taxInformation; + return this; + } + + public UnincorporatedPartnership addTaxInformationItem(TaxInformation taxInformationItem) { + if (this.taxInformation == null) { + this.taxInformation = new ArrayList<>(); + } + this.taxInformation.add(taxInformationItem); + return this; + } + + /** + * The tax information of the entity. + * @return taxInformation + */ + @ApiModelProperty(value = "The tax information of the entity.") + @JsonProperty(JSON_PROPERTY_TAX_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTaxInformation() { + return taxInformation; + } + + /** + * The tax information of the entity. + * + * @param taxInformation + */ + @JsonProperty(JSON_PROPERTY_TAX_INFORMATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTaxInformation(List taxInformation) { + this.taxInformation = taxInformation; + } + + /** + * Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** * **limitedLiabilityPartnership** * **eg** * **cooperative** * **vos** * **comunidadDeBienes** * **herenciaYacente** * **comunidadDePropietarios** * **sep** * **sca** * **bt** * **kkt** * **scs** * **snc** + * + * @param type + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** * **limitedLiabilityPartnership** * **eg** * **cooperative** * **vos** * **comunidadDeBienes** * **herenciaYacente** * **comunidadDePropietarios** * **sep** * **sca** * **bt** * **kkt** * **scs** * **snc** + * @return type + */ + @ApiModelProperty(value = "Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** * **limitedLiabilityPartnership** * **eg** * **cooperative** * **vos** * **comunidadDeBienes** * **herenciaYacente** * **comunidadDePropietarios** * **sep** * **sca** * **bt** * **kkt** * **scs** * **snc** ") + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + /** + * Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** * **limitedLiabilityPartnership** * **eg** * **cooperative** * **vos** * **comunidadDeBienes** * **herenciaYacente** * **comunidadDePropietarios** * **sep** * **sca** * **bt** * **kkt** * **scs** * **snc** + * + * @param type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(TypeEnum type) { + this.type = type; + } + + /** + * The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. + * + * @param vatAbsenceReason + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership vatAbsenceReason(VatAbsenceReasonEnum vatAbsenceReason) { + this.vatAbsenceReason = vatAbsenceReason; + return this; + } + + /** + * The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. + * @return vatAbsenceReason + */ + @ApiModelProperty(value = "The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**.") + @JsonProperty(JSON_PROPERTY_VAT_ABSENCE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public VatAbsenceReasonEnum getVatAbsenceReason() { + return vatAbsenceReason; + } + + /** + * The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. + * + * @param vatAbsenceReason + */ + @JsonProperty(JSON_PROPERTY_VAT_ABSENCE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVatAbsenceReason(VatAbsenceReasonEnum vatAbsenceReason) { + this.vatAbsenceReason = vatAbsenceReason; + } + + /** + * The VAT number. + * + * @param vatNumber + * @return the current {@code UnincorporatedPartnership} instance, allowing for method chaining + */ + public UnincorporatedPartnership vatNumber(String vatNumber) { + this.vatNumber = vatNumber; + return this; + } + + /** + * The VAT number. + * @return vatNumber + */ + @ApiModelProperty(value = "The VAT number.") + @JsonProperty(JSON_PROPERTY_VAT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVatNumber() { + return vatNumber; + } + + /** + * The VAT number. + * + * @param vatNumber + */ + @JsonProperty(JSON_PROPERTY_VAT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVatNumber(String vatNumber) { + this.vatNumber = vatNumber; + } + + /** + * Return true if this UnincorporatedPartnership object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnincorporatedPartnership unincorporatedPartnership = (UnincorporatedPartnership) o; + return Objects.equals(this.countryOfGoverningLaw, unincorporatedPartnership.countryOfGoverningLaw) && + Objects.equals(this.dateOfIncorporation, unincorporatedPartnership.dateOfIncorporation) && + Objects.equals(this.description, unincorporatedPartnership.description) && + Objects.equals(this.doingBusinessAs, unincorporatedPartnership.doingBusinessAs) && + Objects.equals(this.name, unincorporatedPartnership.name) && + Objects.equals(this.principalPlaceOfBusiness, unincorporatedPartnership.principalPlaceOfBusiness) && + Objects.equals(this.registeredAddress, unincorporatedPartnership.registeredAddress) && + Objects.equals(this.registrationNumber, unincorporatedPartnership.registrationNumber) && + Objects.equals(this.taxInformation, unincorporatedPartnership.taxInformation) && + Objects.equals(this.type, unincorporatedPartnership.type) && + Objects.equals(this.vatAbsenceReason, unincorporatedPartnership.vatAbsenceReason) && + Objects.equals(this.vatNumber, unincorporatedPartnership.vatNumber); + } + + @Override + public int hashCode() { + return Objects.hash(countryOfGoverningLaw, dateOfIncorporation, description, doingBusinessAs, name, principalPlaceOfBusiness, registeredAddress, registrationNumber, taxInformation, type, vatAbsenceReason, vatNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnincorporatedPartnership {\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(" taxInformation: ").append(toIndentedString(taxInformation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" vatAbsenceReason: ").append(toIndentedString(vatAbsenceReason)).append("\n"); + sb.append(" vatNumber: ").append(toIndentedString(vatNumber)).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 UnincorporatedPartnership given an JSON string + * + * @param jsonString JSON string + * @return An instance of UnincorporatedPartnership + * @throws JsonProcessingException if the JSON string is invalid with respect to UnincorporatedPartnership + */ + public static UnincorporatedPartnership fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, UnincorporatedPartnership.class); + } +/** + * Convert an instance of UnincorporatedPartnership 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/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"); diff --git a/src/main/java/com/adyen/service/legalentitymanagement/PciQuestionnairesApi.java b/src/main/java/com/adyen/service/legalentitymanagement/PciQuestionnairesApi.java index 2f02dd14e..e9e7b2d1e 100644 --- a/src/main/java/com/adyen/service/legalentitymanagement/PciQuestionnairesApi.java +++ b/src/main/java/com/adyen/service/legalentitymanagement/PciQuestionnairesApi.java @@ -14,6 +14,8 @@ import com.adyen.Client; import com.adyen.Service; import com.adyen.constants.ApiConstants; +import com.adyen.model.legalentitymanagement.CalculatePciStatusRequest; +import com.adyen.model.legalentitymanagement.CalculatePciStatusResponse; import com.adyen.model.legalentitymanagement.GeneratePciDescriptionRequest; import com.adyen.model.legalentitymanagement.GeneratePciDescriptionResponse; import com.adyen.model.legalentitymanagement.GetPciQuestionnaireInfosResponse; @@ -55,6 +57,41 @@ public PciQuestionnairesApi(Client client, String baseURL) { this.baseURL = baseURL; } + /** + * Calculate PCI status of a legal entity + * + * @param id {@link String } The unique identifier of the legal entity to calculate PCI status. (required) + * @param calculatePciStatusRequest {@link CalculatePciStatusRequest } (required) + * @return {@link CalculatePciStatusResponse } + * @throws ApiException if fails to make API call + */ + public CalculatePciStatusResponse calculatePciStatusOfLegalEntity(String id, CalculatePciStatusRequest calculatePciStatusRequest) throws ApiException, IOException { + return calculatePciStatusOfLegalEntity(id, calculatePciStatusRequest, null); + } + + /** + * Calculate PCI status of a legal entity + * + * @param id {@link String } The unique identifier of the legal entity to calculate PCI status. (required) + * @param calculatePciStatusRequest {@link CalculatePciStatusRequest } (required) + * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) + * @return {@link CalculatePciStatusResponse } + * @throws ApiException if fails to make API call + */ + public CalculatePciStatusResponse calculatePciStatusOfLegalEntity(String id, CalculatePciStatusRequest calculatePciStatusRequest, RequestOptions requestOptions) throws ApiException, IOException { + //Add path params + Map pathParams = new HashMap<>(); + if (id == null) { + throw new IllegalArgumentException("Please provide the id path parameter"); + } + pathParams.put("id", id); + + String requestBody = calculatePciStatusRequest.toJson(); + Resource resource = new Resource(this, this.baseURL + "/legalEntities/{id}/pciQuestionnaires/signingRequired", null); + String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.POST, pathParams); + return CalculatePciStatusResponse.fromJson(jsonResult); + } + /** * Generate PCI questionnaire *