From a9c201d953aa29154060f7c5b668ef2595d171ca Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:08:08 +0200 Subject: [PATCH] Update models + services (#1133) * [create-pull-request] automated change * Fix tests automation/services (#1137) * Fix TransfersTest * Fix tests * Remove unused imports * Refactor tests * Rename TransactionData back to Transaction for TransactionsApi --------- Co-authored-by: Alexandros Moraitis Co-authored-by: alessio Co-authored-by: jillingk <93914435+jillingk@users.noreply.github.com> --- .../com/adyen/model/balancecontrol/JSON.java | 2 + .../com/adyen/model/balanceplatform/JSON.java | 2 + .../java/com/adyen/model/binlookup/JSON.java | 2 + .../adyen/model/checkout/AfterpayDetails.java | 4 +- .../model/checkout/BalanceCheckRequest.java | 4 +- .../checkout/DonationPaymentRequest.java | 4 +- .../java/com/adyen/model/checkout/JSON.java | 2 + .../adyen/model/checkout/PaymentDetails.java | 2 - .../adyen/model/checkout/PaymentRequest.java | 4 +- .../model/checkout/PaymentSetupRequest.java | 4 +- .../model/checkout/ThreeDSRequestData.java | 4 +- .../com/adyen/model/dataprotection/JSON.java | 2 + .../AcceptTermsOfServiceResponse.java | 4 +- .../GetTermsOfServiceDocumentRequest.java | 4 +- .../GetTermsOfServiceDocumentResponse.java | 4 +- .../model/legalentitymanagement/JSON.java | 2 + .../java/com/adyen/model/management/JSON.java | 2 + .../java/com/adyen/model/payment/JSON.java | 2 + .../adyen/model/payment/PaymentRequest.java | 4 +- .../adyen/model/payment/PaymentRequest3d.java | 4 +- .../model/payment/PaymentRequest3ds2.java | 4 +- .../java/com/adyen/model/payout/JSON.java | 2 + .../model/posterminalmanagement/JSON.java | 2 + .../java/com/adyen/model/recurring/JSON.java | 2 + .../com/adyen/model/storedvalue/JSON.java | 2 + .../HKLocalAccountIdentification.java | 38 +-- .../java/com/adyen/model/transfers/JSON.java | 2 + .../adyen/model/transfers/MerchantData.java | 35 ++- .../NZLocalAccountIdentification.java | 68 +---- .../adyen/model/transfers/ServiceError.java | 252 ++++++++++++++++++ .../adyen/model/transfers/Transaction.java | 50 ++-- .../transfers/TransactionSearchResponse.java | 10 +- .../com/adyen/model/transfers/Transfer.java | 26 +- .../adyen/model/transfers/TransferInfo.java | 33 +-- .../service/transfers/TransactionsApi.java | 10 +- .../adyen/service/transfers/TransfersApi.java | 1 + .../com/adyen/LegalEntityManagementTest.java | 3 +- src/test/java/com/adyen/PaymentTest.java | 6 +- 38 files changed, 412 insertions(+), 196 deletions(-) create mode 100644 src/main/java/com/adyen/model/transfers/ServiceError.java diff --git a/src/main/java/com/adyen/model/balancecontrol/JSON.java b/src/main/java/com/adyen/model/balancecontrol/JSON.java index 04464cdd3..04d9b1fe9 100644 --- a/src/main/java/com/adyen/model/balancecontrol/JSON.java +++ b/src/main/java/com/adyen/model/balancecontrol/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.balancecontrol; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/balanceplatform/JSON.java b/src/main/java/com/adyen/model/balanceplatform/JSON.java index 776031179..234c41d1a 100644 --- a/src/main/java/com/adyen/model/balanceplatform/JSON.java +++ b/src/main/java/com/adyen/model/balanceplatform/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.balanceplatform; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/binlookup/JSON.java b/src/main/java/com/adyen/model/binlookup/JSON.java index 88d7bdc4c..3d3c564d6 100644 --- a/src/main/java/com/adyen/model/binlookup/JSON.java +++ b/src/main/java/com/adyen/model/binlookup/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.binlookup; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/checkout/AfterpayDetails.java b/src/main/java/com/adyen/model/checkout/AfterpayDetails.java index 0ffa5b445..fbabe090a 100644 --- a/src/main/java/com/adyen/model/checkout/AfterpayDetails.java +++ b/src/main/java/com/adyen/model/checkout/AfterpayDetails.java @@ -67,7 +67,9 @@ public enum TypeEnum { AFTERPAYTOUCH("afterpaytouch"), - AFTERPAY_B2B("afterpay_b2b"); + AFTERPAY_B2B("afterpay_b2b"), + + CLEARPAY("clearpay"); private String value; diff --git a/src/main/java/com/adyen/model/checkout/BalanceCheckRequest.java b/src/main/java/com/adyen/model/checkout/BalanceCheckRequest.java index 27e0e4cc2..fd958c33a 100644 --- a/src/main/java/com/adyen/model/checkout/BalanceCheckRequest.java +++ b/src/main/java/com/adyen/model/checkout/BalanceCheckRequest.java @@ -704,10 +704,10 @@ public BalanceCheckRequest putLocalizedShopperStatementItem(String key, String l } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java b/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java index d7d46e73e..3991ba86e 100644 --- a/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java +++ b/src/main/java/com/adyen/model/checkout/DonationPaymentRequest.java @@ -1390,10 +1390,10 @@ public DonationPaymentRequest putLocalizedShopperStatementItem(String key, Strin } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/JSON.java b/src/main/java/com/adyen/model/checkout/JSON.java index 93a6210f9..777cc44eb 100644 --- a/src/main/java/com/adyen/model/checkout/JSON.java +++ b/src/main/java/com/adyen/model/checkout/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.checkout; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/checkout/PaymentDetails.java b/src/main/java/com/adyen/model/checkout/PaymentDetails.java index 22836574f..6947b9876 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentDetails.java +++ b/src/main/java/com/adyen/model/checkout/PaymentDetails.java @@ -155,8 +155,6 @@ public enum TypeEnum { GOPAY_WALLET("gopay_wallet"), - POLI("poli"), - KCP_NAVERPAY("kcp_naverpay"), ONLINEBANKING_IN("onlinebanking_IN"), diff --git a/src/main/java/com/adyen/model/checkout/PaymentRequest.java b/src/main/java/com/adyen/model/checkout/PaymentRequest.java index fd2cf0d7c..862919a55 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentRequest.java +++ b/src/main/java/com/adyen/model/checkout/PaymentRequest.java @@ -1303,10 +1303,10 @@ public PaymentRequest putLocalizedShopperStatementItem(String key, String locali } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants should send the Katakana shopperStatement in full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/PaymentSetupRequest.java b/src/main/java/com/adyen/model/checkout/PaymentSetupRequest.java index 5b66db531..87c12a3ca 100644 --- a/src/main/java/com/adyen/model/checkout/PaymentSetupRequest.java +++ b/src/main/java/com/adyen/model/checkout/PaymentSetupRequest.java @@ -1065,10 +1065,10 @@ public PaymentSetupRequest putLocalizedShopperStatementItem(String key, String l } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java b/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java index a07469522..e5c3069c8 100644 --- a/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java +++ b/src/main/java/com/adyen/model/checkout/ThreeDSRequestData.java @@ -160,9 +160,9 @@ public static NativeThreeDSEnum fromValue(String value) { * The version of 3D Secure to use. Possible values: * **2.1.0** * **2.2.0** */ public enum ThreeDSVersionEnum { - _1_0("V_2_1_0"), + _1_0("2.1.0"), - _2_0("V_2_2_0"); + _2_0("2.2.0"); private String value; diff --git a/src/main/java/com/adyen/model/dataprotection/JSON.java b/src/main/java/com/adyen/model/dataprotection/JSON.java index 87a8cd6c1..e18f11333 100644 --- a/src/main/java/com/adyen/model/dataprotection/JSON.java +++ b/src/main/java/com/adyen/model/dataprotection/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.dataprotection; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/legalentitymanagement/AcceptTermsOfServiceResponse.java b/src/main/java/com/adyen/model/legalentitymanagement/AcceptTermsOfServiceResponse.java index 4fca00179..114055906 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/AcceptTermsOfServiceResponse.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/AcceptTermsOfServiceResponse.java @@ -187,10 +187,10 @@ public AcceptTermsOfServiceResponse language(String language) { } /** - * The language used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch. + * The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. * @return language **/ - @ApiModelProperty(value = "The language used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch.") + @ApiModelProperty(value = "The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English.") @JsonProperty(JSON_PROPERTY_LANGUAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentRequest.java b/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentRequest.java index d85c190a4..d89badc57 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentRequest.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentRequest.java @@ -96,10 +96,10 @@ public GetTermsOfServiceDocumentRequest language(String language) { } /** - * The language to be used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch. + * The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. * @return language **/ - @ApiModelProperty(required = true, value = "The language to be used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch.") + @ApiModelProperty(required = true, value = "The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English.") @JsonProperty(JSON_PROPERTY_LANGUAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentResponse.java b/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentResponse.java index 9cf96710d..39964a1a3 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentResponse.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/GetTermsOfServiceDocumentResponse.java @@ -158,10 +158,10 @@ public GetTermsOfServiceDocumentResponse language(String language) { } /** - * The language used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch. + * The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. * @return language **/ - @ApiModelProperty(value = "The language used for the Terms of Service document, specified by the two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. For example, **nl** for Dutch.") + @ApiModelProperty(value = "The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English.") @JsonProperty(JSON_PROPERTY_LANGUAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/legalentitymanagement/JSON.java b/src/main/java/com/adyen/model/legalentitymanagement/JSON.java index 9a7a7067f..448131ef4 100644 --- a/src/main/java/com/adyen/model/legalentitymanagement/JSON.java +++ b/src/main/java/com/adyen/model/legalentitymanagement/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.legalentitymanagement; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/management/JSON.java b/src/main/java/com/adyen/model/management/JSON.java index 20b126290..9c23033b9 100644 --- a/src/main/java/com/adyen/model/management/JSON.java +++ b/src/main/java/com/adyen/model/management/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.management; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/payment/JSON.java b/src/main/java/com/adyen/model/payment/JSON.java index 68ef982f4..3c907576f 100644 --- a/src/main/java/com/adyen/model/payment/JSON.java +++ b/src/main/java/com/adyen/model/payment/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.payment; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/payment/PaymentRequest.java b/src/main/java/com/adyen/model/payment/PaymentRequest.java index 4547ca7c3..6203dcfbf 100644 --- a/src/main/java/com/adyen/model/payment/PaymentRequest.java +++ b/src/main/java/com/adyen/model/payment/PaymentRequest.java @@ -966,10 +966,10 @@ public PaymentRequest putLocalizedShopperStatementItem(String key, String locali } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/payment/PaymentRequest3d.java b/src/main/java/com/adyen/model/payment/PaymentRequest3d.java index 6abaf465e..e00a712af 100644 --- a/src/main/java/com/adyen/model/payment/PaymentRequest3d.java +++ b/src/main/java/com/adyen/model/payment/PaymentRequest3d.java @@ -709,10 +709,10 @@ public PaymentRequest3d putLocalizedShopperStatementItem(String key, String loca } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/payment/PaymentRequest3ds2.java b/src/main/java/com/adyen/model/payment/PaymentRequest3ds2.java index 0de17dece..5997b6fed 100644 --- a/src/main/java/com/adyen/model/payment/PaymentRequest3ds2.java +++ b/src/main/java/com/adyen/model/payment/PaymentRequest3ds2.java @@ -710,10 +710,10 @@ public PaymentRequest3ds2 putLocalizedShopperStatementItem(String key, String lo } /** - * This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions. + * The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. * @return localizedShopperStatement **/ - @ApiModelProperty(value = "This field allows merchants to use dynamic shopper statement in local character sets. The local shopper statement field can be supplied in markets where localized merchant descriptors are used. Currently, Adyen only supports this in the Japanese market .The available character sets at the moment are: * Processing in Japan: **ja-Kana** The character set **ja-Kana** supports UTF-8 based Katakana and alphanumeric and special characters. Merchants can use half-width or full-width characters. An example request would be: > { \"shopperStatement\" : \"ADYEN - SELLER-A\", \"localizedShopperStatement\" : { \"ja-Kana\" : \"ADYEN - セラーA\" } } We recommend merchants to always supply the field localizedShopperStatement in addition to the field shopperStatement.It is issuer dependent whether the localized shopper statement field is supported. In the case of non-domestic transactions (e.g. US-issued cards processed in JP) the field `shopperStatement` is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned. Please note, this field can be used for only Visa and Mastercard transactions.") + @ApiModelProperty(value = "The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.") @JsonProperty(JSON_PROPERTY_LOCALIZED_SHOPPER_STATEMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/payout/JSON.java b/src/main/java/com/adyen/model/payout/JSON.java index 25ed46802..2a88aeeb5 100644 --- a/src/main/java/com/adyen/model/payout/JSON.java +++ b/src/main/java/com/adyen/model/payout/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.payout; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/posterminalmanagement/JSON.java b/src/main/java/com/adyen/model/posterminalmanagement/JSON.java index f1eccfcdc..7d7591447 100644 --- a/src/main/java/com/adyen/model/posterminalmanagement/JSON.java +++ b/src/main/java/com/adyen/model/posterminalmanagement/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.posterminalmanagement; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/recurring/JSON.java b/src/main/java/com/adyen/model/recurring/JSON.java index 18d1af60b..81edbb88d 100644 --- a/src/main/java/com/adyen/model/recurring/JSON.java +++ b/src/main/java/com/adyen/model/recurring/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.recurring; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/storedvalue/JSON.java b/src/main/java/com/adyen/model/storedvalue/JSON.java index 546e9ed62..54f1ff4f1 100644 --- a/src/main/java/com/adyen/model/storedvalue/JSON.java +++ b/src/main/java/com/adyen/model/storedvalue/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.storedvalue; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/transfers/HKLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/HKLocalAccountIdentification.java index c35dcb628..9d839ba60 100644 --- a/src/main/java/com/adyen/model/transfers/HKLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/HKLocalAccountIdentification.java @@ -32,7 +32,7 @@ */ @JsonPropertyOrder({ HKLocalAccountIdentification.JSON_PROPERTY_ACCOUNT_NUMBER, - HKLocalAccountIdentification.JSON_PROPERTY_BANK_CODE, + HKLocalAccountIdentification.JSON_PROPERTY_CLEARING_CODE, HKLocalAccountIdentification.JSON_PROPERTY_TYPE }) @@ -40,8 +40,8 @@ public class HKLocalAccountIdentification { public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; private String accountNumber; - public static final String JSON_PROPERTY_BANK_CODE = "bankCode"; - private String bankCode; + public static final String JSON_PROPERTY_CLEARING_CODE = "clearingCode"; + private String clearingCode; /** * **hkLocal** @@ -88,10 +88,10 @@ public HKLocalAccountIdentification accountNumber(String accountNumber) { } /** - * The 6- to 19-character bank account number (alphanumeric), without separators or whitespace. + * The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. * @return accountNumber **/ - @ApiModelProperty(required = true, value = "The 6- to 19-character bank account number (alphanumeric), without separators or whitespace.") + @ApiModelProperty(required = true, value = "The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.") @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -107,28 +107,28 @@ public void setAccountNumber(String accountNumber) { } - public HKLocalAccountIdentification bankCode(String bankCode) { - this.bankCode = bankCode; + public HKLocalAccountIdentification clearingCode(String clearingCode) { + this.clearingCode = clearingCode; return this; } /** - * The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace. - * @return bankCode + * The 3-digit clearing code, without separators or whitespace. + * @return clearingCode **/ - @ApiModelProperty(required = true, value = "The 6-digit bank code including the 3-digit bank code and 3-digit branch code, without separators or whitespace.") - @JsonProperty(JSON_PROPERTY_BANK_CODE) + @ApiModelProperty(required = true, value = "The 3-digit clearing code, without separators or whitespace.") + @JsonProperty(JSON_PROPERTY_CLEARING_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBankCode() { - return bankCode; + public String getClearingCode() { + return clearingCode; } - @JsonProperty(JSON_PROPERTY_BANK_CODE) + @JsonProperty(JSON_PROPERTY_CLEARING_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBankCode(String bankCode) { - this.bankCode = bankCode; + public void setClearingCode(String clearingCode) { + this.clearingCode = clearingCode; } @@ -170,13 +170,13 @@ public boolean equals(Object o) { } HKLocalAccountIdentification hkLocalAccountIdentification = (HKLocalAccountIdentification) o; return Objects.equals(this.accountNumber, hkLocalAccountIdentification.accountNumber) && - Objects.equals(this.bankCode, hkLocalAccountIdentification.bankCode) && + Objects.equals(this.clearingCode, hkLocalAccountIdentification.clearingCode) && Objects.equals(this.type, hkLocalAccountIdentification.type); } @Override public int hashCode() { - return Objects.hash(accountNumber, bankCode, type); + return Objects.hash(accountNumber, clearingCode, type); } @Override @@ -184,7 +184,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class HKLocalAccountIdentification {\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" bankCode: ").append(toIndentedString(bankCode)).append("\n"); + sb.append(" clearingCode: ").append(toIndentedString(clearingCode)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/transfers/JSON.java b/src/main/java/com/adyen/model/transfers/JSON.java index 4baea8013..c96532ced 100644 --- a/src/main/java/com/adyen/model/transfers/JSON.java +++ b/src/main/java/com/adyen/model/transfers/JSON.java @@ -1,6 +1,7 @@ package com.adyen.model.transfers; 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; @@ -33,6 +34,7 @@ public JSON() { // Custom ByteSerializer SimpleModule simpleModule = new SimpleModule(); simpleModule.addSerializer(byte[].class, new ByteArraySerializer()); + simpleModule.addDeserializer(byte[].class, new ByteArrayDeserializer()); mapper.registerModule(simpleModule); } diff --git a/src/main/java/com/adyen/model/transfers/MerchantData.java b/src/main/java/com/adyen/model/transfers/MerchantData.java index 8c9c16b8e..00fd6fc5b 100644 --- a/src/main/java/com/adyen/model/transfers/MerchantData.java +++ b/src/main/java/com/adyen/model/transfers/MerchantData.java @@ -32,6 +32,7 @@ * MerchantData */ @JsonPropertyOrder({ + MerchantData.JSON_PROPERTY_ACQUIRER_ID, MerchantData.JSON_PROPERTY_MCC, MerchantData.JSON_PROPERTY_MERCHANT_ID, MerchantData.JSON_PROPERTY_NAME_LOCATION, @@ -39,6 +40,9 @@ }) public class MerchantData { + public static final String JSON_PROPERTY_ACQUIRER_ID = "acquirerId"; + private String acquirerId; + public static final String JSON_PROPERTY_MCC = "mcc"; private String mcc; @@ -54,6 +58,31 @@ public class MerchantData { public MerchantData() { } + public MerchantData acquirerId(String acquirerId) { + this.acquirerId = acquirerId; + return this; + } + + /** + * The unique identifier of the merchant's acquirer. + * @return acquirerId + **/ + @ApiModelProperty(value = "The unique identifier of the merchant's acquirer.") + @JsonProperty(JSON_PROPERTY_ACQUIRER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getAcquirerId() { + return acquirerId; + } + + + @JsonProperty(JSON_PROPERTY_ACQUIRER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAcquirerId(String acquirerId) { + this.acquirerId = acquirerId; + } + + public MerchantData mcc(String mcc) { this.mcc = mcc; return this; @@ -166,7 +195,8 @@ public boolean equals(Object o) { return false; } MerchantData merchantData = (MerchantData) o; - return Objects.equals(this.mcc, merchantData.mcc) && + return Objects.equals(this.acquirerId, merchantData.acquirerId) && + Objects.equals(this.mcc, merchantData.mcc) && Objects.equals(this.merchantId, merchantData.merchantId) && Objects.equals(this.nameLocation, merchantData.nameLocation) && Objects.equals(this.postalCode, merchantData.postalCode); @@ -174,13 +204,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(mcc, merchantId, nameLocation, postalCode); + return Objects.hash(acquirerId, mcc, merchantId, nameLocation, postalCode); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class MerchantData {\n"); + sb.append(" acquirerId: ").append(toIndentedString(acquirerId)).append("\n"); sb.append(" mcc: ").append(toIndentedString(mcc)).append("\n"); sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n"); sb.append(" nameLocation: ").append(toIndentedString(nameLocation)).append("\n"); diff --git a/src/main/java/com/adyen/model/transfers/NZLocalAccountIdentification.java b/src/main/java/com/adyen/model/transfers/NZLocalAccountIdentification.java index 43dc39e07..cc29c368c 100644 --- a/src/main/java/com/adyen/model/transfers/NZLocalAccountIdentification.java +++ b/src/main/java/com/adyen/model/transfers/NZLocalAccountIdentification.java @@ -32,8 +32,6 @@ */ @JsonPropertyOrder({ NZLocalAccountIdentification.JSON_PROPERTY_ACCOUNT_NUMBER, - NZLocalAccountIdentification.JSON_PROPERTY_ACCOUNT_SUFFIX, - NZLocalAccountIdentification.JSON_PROPERTY_BANK_CODE, NZLocalAccountIdentification.JSON_PROPERTY_TYPE }) @@ -41,12 +39,6 @@ public class NZLocalAccountIdentification { public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; private String accountNumber; - public static final String JSON_PROPERTY_ACCOUNT_SUFFIX = "accountSuffix"; - private String accountSuffix; - - public static final String JSON_PROPERTY_BANK_CODE = "bankCode"; - private String bankCode; - /** * **nzLocal** */ @@ -92,10 +84,10 @@ public NZLocalAccountIdentification accountNumber(String accountNumber) { } /** - * The 7-digit bank account number, without separators or whitespace. + * The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. * @return accountNumber **/ - @ApiModelProperty(required = true, value = "The 7-digit bank account number, without separators or whitespace.") + @ApiModelProperty(required = true, value = "The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix.") @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -111,56 +103,6 @@ public void setAccountNumber(String accountNumber) { } - public NZLocalAccountIdentification accountSuffix(String accountSuffix) { - this.accountSuffix = accountSuffix; - return this; - } - - /** - * The 2- to 3-digit account suffix, without separators or whitespace. - * @return accountSuffix - **/ - @ApiModelProperty(required = true, value = "The 2- to 3-digit account suffix, without separators or whitespace.") - @JsonProperty(JSON_PROPERTY_ACCOUNT_SUFFIX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getAccountSuffix() { - return accountSuffix; - } - - - @JsonProperty(JSON_PROPERTY_ACCOUNT_SUFFIX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountSuffix(String accountSuffix) { - this.accountSuffix = accountSuffix; - } - - - public NZLocalAccountIdentification bankCode(String bankCode) { - this.bankCode = bankCode; - return this; - } - - /** - * The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace. - * @return bankCode - **/ - @ApiModelProperty(required = true, value = "The 6-digit bank code including the 2-digit bank code and 4-digit branch code, without separators or whitespace.") - @JsonProperty(JSON_PROPERTY_BANK_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBankCode() { - return bankCode; - } - - - @JsonProperty(JSON_PROPERTY_BANK_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBankCode(String bankCode) { - this.bankCode = bankCode; - } - - public NZLocalAccountIdentification type(TypeEnum type) { this.type = type; return this; @@ -199,14 +141,12 @@ public boolean equals(Object o) { } NZLocalAccountIdentification nzLocalAccountIdentification = (NZLocalAccountIdentification) o; return Objects.equals(this.accountNumber, nzLocalAccountIdentification.accountNumber) && - Objects.equals(this.accountSuffix, nzLocalAccountIdentification.accountSuffix) && - Objects.equals(this.bankCode, nzLocalAccountIdentification.bankCode) && Objects.equals(this.type, nzLocalAccountIdentification.type); } @Override public int hashCode() { - return Objects.hash(accountNumber, accountSuffix, bankCode, type); + return Objects.hash(accountNumber, type); } @Override @@ -214,8 +154,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NZLocalAccountIdentification {\n"); sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" accountSuffix: ").append(toIndentedString(accountSuffix)).append("\n"); - sb.append(" bankCode: ").append(toIndentedString(bankCode)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/adyen/model/transfers/ServiceError.java b/src/main/java/com/adyen/model/transfers/ServiceError.java new file mode 100644 index 000000000..32a28e36f --- /dev/null +++ b/src/main/java/com/adyen/model/transfers/ServiceError.java @@ -0,0 +1,252 @@ +/* + * Transfers 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.transfers; + +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; + + +/** + * ServiceError + */ +@JsonPropertyOrder({ + ServiceError.JSON_PROPERTY_ERROR_CODE, + ServiceError.JSON_PROPERTY_ERROR_TYPE, + ServiceError.JSON_PROPERTY_MESSAGE, + ServiceError.JSON_PROPERTY_PSP_REFERENCE, + ServiceError.JSON_PROPERTY_STATUS +}) + +public class ServiceError { + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + private String errorCode; + + public static final String JSON_PROPERTY_ERROR_TYPE = "errorType"; + private String errorType; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference"; + private String pspReference; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public ServiceError() { + } + + public ServiceError errorCode(String errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * The error code mapped to the error message. + * @return errorCode + **/ + @ApiModelProperty(value = "The error code mapped to the error message.") + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorCode() { + return errorCode; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(String errorCode) { + this.errorCode = errorCode; + } + + + public ServiceError errorType(String errorType) { + this.errorType = errorType; + return this; + } + + /** + * The category of the error. + * @return errorType + **/ + @ApiModelProperty(value = "The category of the error.") + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getErrorType() { + return errorType; + } + + + @JsonProperty(JSON_PROPERTY_ERROR_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorType(String errorType) { + this.errorType = errorType; + } + + + public ServiceError message(String message) { + this.message = message; + return this; + } + + /** + * A short explanation of the issue. + * @return message + **/ + @ApiModelProperty(value = "A short explanation of the issue.") + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getMessage() { + return message; + } + + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(String message) { + this.message = message; + } + + + public ServiceError pspReference(String pspReference) { + this.pspReference = pspReference; + return this; + } + + /** + * The PSP reference of the payment. + * @return pspReference + **/ + @ApiModelProperty(value = "The PSP reference of the payment.") + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPspReference() { + return pspReference; + } + + + @JsonProperty(JSON_PROPERTY_PSP_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPspReference(String pspReference) { + this.pspReference = pspReference; + } + + + public ServiceError status(Integer status) { + this.status = status; + return this; + } + + /** + * The HTTP response status. + * @return status + **/ + @ApiModelProperty(value = "The HTTP response status.") + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Integer getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(Integer status) { + this.status = status; + } + + + /** + * Return true if this ServiceError object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceError serviceError = (ServiceError) o; + return Objects.equals(this.errorCode, serviceError.errorCode) && + Objects.equals(this.errorType, serviceError.errorType) && + Objects.equals(this.message, serviceError.message) && + Objects.equals(this.pspReference, serviceError.pspReference) && + Objects.equals(this.status, serviceError.status); + } + + @Override + public int hashCode() { + return Objects.hash(errorCode, errorType, message, pspReference, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceError {\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorType: ").append(toIndentedString(errorType)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" pspReference: ").append(toIndentedString(pspReference)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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 ServiceError given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServiceError + * @throws JsonProcessingException if the JSON string is invalid with respect to ServiceError + */ + public static ServiceError fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, ServiceError.class); + } +/** + * Convert an instance of ServiceError 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/transfers/Transaction.java b/src/main/java/com/adyen/model/transfers/Transaction.java index e706bc28c..39ecbef6d 100644 --- a/src/main/java/com/adyen/model/transfers/Transaction.java +++ b/src/main/java/com/adyen/model/transfers/Transaction.java @@ -13,17 +13,11 @@ package com.adyen.model.transfers; import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.transfers.Amount; -import com.adyen.model.transfers.CounterpartyV3; + 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; @@ -88,7 +82,9 @@ public enum CategoryEnum { MIGRATION("migration"), - PLATFORMPAYMENT("platformPayment"); + PLATFORMPAYMENT("platformPayment"), + + UPGRADE("upgrade"); private String value; @@ -201,6 +197,8 @@ public enum TypeEnum { BALANCEADJUSTMENT("balanceAdjustment"), + BALANCEMIGRATION("balanceMigration"), + BALANCEROLLOVER("balanceRollover"), BANKTRANSFER("bankTransfer"), @@ -211,10 +209,20 @@ public enum TypeEnum { CARDTRANSFER("cardTransfer"), + CASHOUTFEE("cashOutFee"), + + CASHOUTFUNDING("cashOutFunding"), + + CASHOUTINSTRUCTION("cashOutInstruction"), + CHARGEBACK("chargeback"), + CHARGEBACKCORRECTION("chargebackCorrection"), + CHARGEBACKREVERSAL("chargebackReversal"), + CHARGEBACKREVERSALCORRECTION("chargebackReversalCorrection"), + DEPOSITCORRECTION("depositCorrection"), FEE("fee"), @@ -247,7 +255,9 @@ public enum TypeEnum { RESERVEADJUSTMENT("reserveAdjustment"), - SECONDCHARGEBACK("secondChargeback"); + SECONDCHARGEBACK("secondChargeback"), + + SECONDCHARGEBACKCORRECTION("secondChargebackCorrection"); private String value; @@ -282,7 +292,7 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_VALUE_DATE = "valueDate"; private OffsetDateTime valueDate; - public Transaction() { + public Transaction() { } public Transaction accountHolderId(String accountHolderId) { @@ -366,10 +376,10 @@ public Transaction balancePlatform(String balancePlatform) { } /** - * Unique identifier of the balance platform. + * The unique identifier of the balance platform. * @return balancePlatform **/ - @ApiModelProperty(required = true, value = "Unique identifier of the balance platform.") + @ApiModelProperty(required = true, value = "The unique identifier of the balance platform.") @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -391,10 +401,10 @@ public Transaction bookingDate(OffsetDateTime bookingDate) { } /** - * The date the transaction was booked to the balance account. + * The date the transaction was booked into the balance account. * @return bookingDate **/ - @ApiModelProperty(required = true, value = "The date the transaction was booked to the balance account.") + @ApiModelProperty(required = true, value = "The date the transaction was booked into the balance account.") @JsonProperty(JSON_PROPERTY_BOOKING_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -541,10 +551,10 @@ public Transaction eventId(String eventId) { } /** - * The PSP reference in the journal. + * The PSP reference of the transaction in the journal. * @return eventId **/ - @ApiModelProperty(value = "The PSP reference in the journal.") + @ApiModelProperty(value = "The PSP reference of the transaction in the journal.") @JsonProperty(JSON_PROPERTY_EVENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -566,10 +576,10 @@ public Transaction id(String id) { } /** - * Unique identifier of the transaction. + * The unique identifier of the transaction. * @return id **/ - @ApiModelProperty(required = true, value = "Unique identifier of the transaction.") + @ApiModelProperty(required = true, value = "The unique identifier of the transaction.") @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -616,10 +626,10 @@ public Transaction paymentInstrumentId(String paymentInstrumentId) { } /** - * Unique identifier of the payment instrument that was used for the transaction. + * The unique identifier of the payment instrument that was used for the transaction. * @return paymentInstrumentId **/ - @ApiModelProperty(value = "Unique identifier of the payment instrument that was used for the transaction.") + @ApiModelProperty(value = "The unique identifier of the payment instrument that was used for the transaction.") @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUMENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java b/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java index 8c634311f..1676aa433 100644 --- a/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java +++ b/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java @@ -13,17 +13,9 @@ package com.adyen.model.transfers; import java.util.Objects; -import java.util.Arrays; -import java.util.Map; -import java.util.HashMap; -import com.adyen.model.transfers.Links; -import com.adyen.model.transfers.Transaction; + 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; diff --git a/src/main/java/com/adyen/model/transfers/Transfer.java b/src/main/java/com/adyen/model/transfers/Transfer.java index 736ef1666..1df33f11d 100644 --- a/src/main/java/com/adyen/model/transfers/Transfer.java +++ b/src/main/java/com/adyen/model/transfers/Transfer.java @@ -69,7 +69,7 @@ public class Transfer { private String balanceAccountId; /** - * The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + * The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. */ public enum CategoryEnum { BANK("bank"), @@ -167,7 +167,7 @@ public static DirectionEnum fromValue(String value) { private String paymentInstrumentId; /** - * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. */ public enum PriorityEnum { CROSSBORDER("crossBorder"), @@ -222,6 +222,8 @@ public enum ReasonEnum { APPROVED("approved"), + BALANCEACCOUNTTEMPORARILYBLOCKEDBYTRANSACTIONRULE("balanceAccountTemporarilyBlockedByTransactionRule"), + COUNTERPARTYACCOUNTBLOCKED("counterpartyAccountBlocked"), COUNTERPARTYACCOUNTCLOSED("counterpartyAccountClosed"), @@ -234,6 +236,8 @@ public enum ReasonEnum { COUNTERPARTYBANKUNAVAILABLE("counterpartyBankUnavailable"), + DECLINEDBYTRANSACTIONRULE("declinedByTransactionRule"), + ERROR("error"), NOTENOUGHBALANCE("notEnoughBalance"), @@ -242,6 +246,8 @@ public enum ReasonEnum { ROUTENOTFOUND("routeNotFound"), + SCAFAILED("scaFailed"), + UNKNOWN("unknown"); private String value; @@ -382,14 +388,6 @@ public enum StatusEnum { MISCCOSTPENDING("miscCostPending"), - OPERATIONAUTHORIZED("operationAuthorized"), - - OPERATIONBOOKED("operationBooked"), - - OPERATIONPENDING("operationPending"), - - OPERATIONRECEIVED("operationReceived"), - PAYMENTCOST("paymentCost"), PAYMENTCOSTPENDING("paymentCostPending"), @@ -562,10 +560,10 @@ public Transfer category(CategoryEnum category) { } /** - * The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. + * The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. * @return category **/ - @ApiModelProperty(required = true, value = "The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users.") + @ApiModelProperty(required = true, value = "The category of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users.") @JsonProperty(JSON_PROPERTY_CATEGORY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @@ -765,10 +763,10 @@ public Transfer priority(PriorityEnum priority) { } /** - * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). + * The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field. * @return priority **/ - @ApiModelProperty(value = "The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).") + @ApiModelProperty(value = "The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions. * **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: High-value transfer to a recipient in a different country. * **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field.") @JsonProperty(JSON_PROPERTY_PRIORITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) diff --git a/src/main/java/com/adyen/model/transfers/TransferInfo.java b/src/main/java/com/adyen/model/transfers/TransferInfo.java index 231eea349..270a25fc3 100644 --- a/src/main/java/com/adyen/model/transfers/TransferInfo.java +++ b/src/main/java/com/adyen/model/transfers/TransferInfo.java @@ -39,7 +39,6 @@ TransferInfo.JSON_PROPERTY_CATEGORY, TransferInfo.JSON_PROPERTY_COUNTERPARTY, TransferInfo.JSON_PROPERTY_DESCRIPTION, - TransferInfo.JSON_PROPERTY_ID, TransferInfo.JSON_PROPERTY_PAYMENT_INSTRUMENT_ID, TransferInfo.JSON_PROPERTY_PRIORITY, TransferInfo.JSON_PROPERTY_REFERENCE, @@ -104,9 +103,6 @@ public static CategoryEnum fromValue(String value) { public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; - public static final String JSON_PROPERTY_ID = "id"; - private String id; - public static final String JSON_PROPERTY_PAYMENT_INSTRUMENT_ID = "paymentInstrumentId"; private String paymentInstrumentId; @@ -295,31 +291,6 @@ public void setDescription(String description) { } - public TransferInfo 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; - } - - - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(String id) { - this.id = id; - } - - public TransferInfo paymentInstrumentId(String paymentInstrumentId) { this.paymentInstrumentId = paymentInstrumentId; return this; @@ -462,7 +433,6 @@ public boolean equals(Object o) { Objects.equals(this.category, transferInfo.category) && Objects.equals(this.counterparty, transferInfo.counterparty) && Objects.equals(this.description, transferInfo.description) && - Objects.equals(this.id, transferInfo.id) && Objects.equals(this.paymentInstrumentId, transferInfo.paymentInstrumentId) && Objects.equals(this.priority, transferInfo.priority) && Objects.equals(this.reference, transferInfo.reference) && @@ -472,7 +442,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(amount, balanceAccountId, category, counterparty, description, id, paymentInstrumentId, priority, reference, referenceForBeneficiary, ultimateParty); + return Objects.hash(amount, balanceAccountId, category, counterparty, description, paymentInstrumentId, priority, reference, referenceForBeneficiary, ultimateParty); } @Override @@ -484,7 +454,6 @@ public String toString() { sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" counterparty: ").append(toIndentedString(counterparty)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" paymentInstrumentId: ").append(toIndentedString(paymentInstrumentId)).append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); diff --git a/src/main/java/com/adyen/service/transfers/TransactionsApi.java b/src/main/java/com/adyen/service/transfers/TransactionsApi.java index b9ec5741e..25049d88b 100644 --- a/src/main/java/com/adyen/service/transfers/TransactionsApi.java +++ b/src/main/java/com/adyen/service/transfers/TransactionsApi.java @@ -15,7 +15,7 @@ import com.adyen.Service; import com.adyen.constants.ApiConstants; import java.time.OffsetDateTime; -import com.adyen.model.transfers.RestServiceError; + import com.adyen.model.transfers.Transaction; import com.adyen.model.transfers.TransactionSearchResponse; import com.adyen.model.RequestOptions; @@ -67,10 +67,10 @@ public TransactionSearchResponse getAllTransactions(OffsetDateTime createdSince, /** * Get all transactions * - * @param balancePlatform {@link String } Query: Unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). (optional) - * @param paymentInstrumentId {@link String } Query: Unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). (optional) - * @param accountHolderId {@link String } Query: Unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). (optional) - * @param balanceAccountId {@link String } Query: Unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). (optional) + * @param balancePlatform {@link String } Query: The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `accountHolderId`. (optional) + * @param paymentInstrumentId {@link String } Query: The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). To use this parameter, you must also provide a `balanceAccountId`, `accountHolderId`, or `balancePlatform`. The `paymentInstrumentId` must be related to the `balanceAccountId` or `accountHolderId` that you provide. (optional) + * @param accountHolderId {@link String } Query: The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `balancePlatform`. If you provide a `balanceAccountId`, the `accountHolderId` must be related to the `balanceAccountId`. (optional) + * @param balanceAccountId {@link String } Query: The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). Required if you don't provide an `accountHolderId` or `balancePlatform`. If you provide an `accountHolderId`, the `balanceAccountId` must be related to the `accountHolderId`. (optional) * @param cursor {@link String } Query: The `cursor` returned in the links of the previous response. (optional) * @param createdSince {@link OffsetDateTime } Query: Only include transactions that have been created on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. (required) * @param createdUntil {@link OffsetDateTime } Query: Only include transactions that have been created on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. (required) diff --git a/src/main/java/com/adyen/service/transfers/TransfersApi.java b/src/main/java/com/adyen/service/transfers/TransfersApi.java index b910e8300..64575c82b 100644 --- a/src/main/java/com/adyen/service/transfers/TransfersApi.java +++ b/src/main/java/com/adyen/service/transfers/TransfersApi.java @@ -15,6 +15,7 @@ import com.adyen.Service; import com.adyen.constants.ApiConstants; import com.adyen.model.transfers.RestServiceError; +import com.adyen.model.transfers.ServiceError; import com.adyen.model.transfers.Transfer; import com.adyen.model.transfers.TransferInfo; import com.adyen.model.RequestOptions; diff --git a/src/test/java/com/adyen/LegalEntityManagementTest.java b/src/test/java/com/adyen/LegalEntityManagementTest.java index c3fee5493..1580e8561 100644 --- a/src/test/java/com/adyen/LegalEntityManagementTest.java +++ b/src/test/java/com/adyen/LegalEntityManagementTest.java @@ -7,6 +7,7 @@ import org.junit.Test; import java.io.IOException; +import java.util.Base64; import java.util.logging.Level; import java.util.logging.Logger; @@ -319,7 +320,7 @@ public void TestBase64EncodedResponseToByteArray() throws Exception { " \"type\": \"bankStatement\"\n" + "}"); Document response = service.updateDocument("SE322KT223222D5FJ7TJN2986", request); - assertEquals("Thisisanbase64encodedstring", new String(response.getAttachments().get(0).getContent())); + assertEquals("Thisisanbase64encodedstring", new String(Base64.getDecoder().decode(response.getAttachments().get(0).getContent()))); } @Test diff --git a/src/test/java/com/adyen/PaymentTest.java b/src/test/java/com/adyen/PaymentTest.java index 1133fb96b..23382563d 100644 --- a/src/test/java/com/adyen/PaymentTest.java +++ b/src/test/java/com/adyen/PaymentTest.java @@ -44,6 +44,7 @@ import java.util.Locale; import java.util.Map; import java.util.TimeZone; +import java.util.Base64; import static com.adyen.constants.ApiConstants.AdditionalData.*; import static com.adyen.constants.ApiConstants.SelectedBrand.BOLETO_SANTANDER; @@ -443,9 +444,6 @@ protected void assertRefused(PaymentResult paymentResult) { @Test public void TestByteArrayDeserialization() throws Exception { - Client client = createMockClientFromFile("mocks/authorise-success.json"); - PaymentApi payment = new PaymentApi(client); - final String expectedBytesAsString = "Let's pretend/ this a jpg or something="; final byte[] expectedBytes = expectedBytesAsString.getBytes(StandardCharsets.UTF_8); final ByteString expectedByteString = ByteString.of(expectedBytes); @@ -456,7 +454,7 @@ public void TestByteArrayDeserialization() throws Exception { byte[] actualDeserializedBytes = JSON.getMapper().readValue(serializedBytesWithQuotes, byte[].class); // Assert - assertEquals(expectedBytesAsString, new String(actualDeserializedBytes, StandardCharsets.UTF_8)); + assertEquals(expectedBytesAsString, new String(Base64.getDecoder().decode(actualDeserializedBytes))); } @Test