From f1868e76c531d2fbe3229d24a60cb09126d4dc94 Mon Sep 17 00:00:00 2001 From: Adyen Automation Date: Wed, 27 Sep 2023 18:31:15 +0000 Subject: [PATCH] [create-pull-request] automated change --- .../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 ++++++++++++++++++ ...{Transaction.java => TransactionData.java} | 184 +++++++------ .../transfers/TransactionSearchResponse.java | 12 +- .../com/adyen/model/transfers/Transfer.java | 26 +- .../adyen/model/transfers/TransferInfo.java | 33 +-- .../service/transfers/TransactionsApi.java | 20 +- .../adyen/service/transfers/TransfersApi.java | 1 + 36 files changed, 488 insertions(+), 257 deletions(-) create mode 100644 src/main/java/com/adyen/model/transfers/ServiceError.java rename src/main/java/com/adyen/model/transfers/{Transaction.java => TransactionData.java} (82%) 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/TransactionData.java similarity index 82% rename from src/main/java/com/adyen/model/transfers/Transaction.java rename to src/main/java/com/adyen/model/transfers/TransactionData.java index e706bc28c..f6abd7c72 100644 --- a/src/main/java/com/adyen/model/transfers/Transaction.java +++ b/src/main/java/com/adyen/model/transfers/TransactionData.java @@ -31,32 +31,32 @@ /** - * Transaction + * TransactionData */ @JsonPropertyOrder({ - Transaction.JSON_PROPERTY_ACCOUNT_HOLDER_ID, - Transaction.JSON_PROPERTY_AMOUNT, - Transaction.JSON_PROPERTY_BALANCE_ACCOUNT_ID, - Transaction.JSON_PROPERTY_BALANCE_PLATFORM, - Transaction.JSON_PROPERTY_BOOKING_DATE, - Transaction.JSON_PROPERTY_CATEGORY, - Transaction.JSON_PROPERTY_COUNTERPARTY, - Transaction.JSON_PROPERTY_CREATED_AT, - Transaction.JSON_PROPERTY_CREATION_DATE, - Transaction.JSON_PROPERTY_DESCRIPTION, - Transaction.JSON_PROPERTY_EVENT_ID, - Transaction.JSON_PROPERTY_ID, - Transaction.JSON_PROPERTY_INSTRUCTED_AMOUNT, - Transaction.JSON_PROPERTY_PAYMENT_INSTRUMENT_ID, - Transaction.JSON_PROPERTY_REFERENCE, - Transaction.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, - Transaction.JSON_PROPERTY_STATUS, - Transaction.JSON_PROPERTY_TRANSFER_ID, - Transaction.JSON_PROPERTY_TYPE, - Transaction.JSON_PROPERTY_VALUE_DATE + TransactionData.JSON_PROPERTY_ACCOUNT_HOLDER_ID, + TransactionData.JSON_PROPERTY_AMOUNT, + TransactionData.JSON_PROPERTY_BALANCE_ACCOUNT_ID, + TransactionData.JSON_PROPERTY_BALANCE_PLATFORM, + TransactionData.JSON_PROPERTY_BOOKING_DATE, + TransactionData.JSON_PROPERTY_CATEGORY, + TransactionData.JSON_PROPERTY_COUNTERPARTY, + TransactionData.JSON_PROPERTY_CREATED_AT, + TransactionData.JSON_PROPERTY_CREATION_DATE, + TransactionData.JSON_PROPERTY_DESCRIPTION, + TransactionData.JSON_PROPERTY_EVENT_ID, + TransactionData.JSON_PROPERTY_ID, + TransactionData.JSON_PROPERTY_INSTRUCTED_AMOUNT, + TransactionData.JSON_PROPERTY_PAYMENT_INSTRUMENT_ID, + TransactionData.JSON_PROPERTY_REFERENCE, + TransactionData.JSON_PROPERTY_REFERENCE_FOR_BENEFICIARY, + TransactionData.JSON_PROPERTY_STATUS, + TransactionData.JSON_PROPERTY_TRANSFER_ID, + TransactionData.JSON_PROPERTY_TYPE, + TransactionData.JSON_PROPERTY_VALUE_DATE }) -public class Transaction { +public class TransactionData { public static final String JSON_PROPERTY_ACCOUNT_HOLDER_ID = "accountHolderId"; private String accountHolderId; @@ -88,7 +88,9 @@ public enum CategoryEnum { MIGRATION("migration"), - PLATFORMPAYMENT("platformPayment"); + PLATFORMPAYMENT("platformPayment"), + + UPGRADE("upgrade"); private String value; @@ -201,6 +203,8 @@ public enum TypeEnum { BALANCEADJUSTMENT("balanceAdjustment"), + BALANCEMIGRATION("balanceMigration"), + BALANCEROLLOVER("balanceRollover"), BANKTRANSFER("bankTransfer"), @@ -211,10 +215,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 +261,9 @@ public enum TypeEnum { RESERVEADJUSTMENT("reserveAdjustment"), - SECONDCHARGEBACK("secondChargeback"); + SECONDCHARGEBACK("secondChargeback"), + + SECONDCHARGEBACKCORRECTION("secondChargebackCorrection"); private String value; @@ -282,10 +298,10 @@ public static TypeEnum fromValue(String value) { public static final String JSON_PROPERTY_VALUE_DATE = "valueDate"; private OffsetDateTime valueDate; - public Transaction() { + public TransactionData() { } - public Transaction accountHolderId(String accountHolderId) { + public TransactionData accountHolderId(String accountHolderId) { this.accountHolderId = accountHolderId; return this; } @@ -310,7 +326,7 @@ public void setAccountHolderId(String accountHolderId) { } - public Transaction amount(Amount amount) { + public TransactionData amount(Amount amount) { this.amount = amount; return this; } @@ -335,7 +351,7 @@ public void setAmount(Amount amount) { } - public Transaction balanceAccountId(String balanceAccountId) { + public TransactionData balanceAccountId(String balanceAccountId) { this.balanceAccountId = balanceAccountId; return this; } @@ -360,16 +376,16 @@ public void setBalanceAccountId(String balanceAccountId) { } - public Transaction balancePlatform(String balancePlatform) { + public TransactionData balancePlatform(String balancePlatform) { this.balancePlatform = balancePlatform; return this; } /** - * 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) @@ -385,16 +401,16 @@ public void setBalancePlatform(String balancePlatform) { } - public Transaction bookingDate(OffsetDateTime bookingDate) { + public TransactionData bookingDate(OffsetDateTime bookingDate) { this.bookingDate = bookingDate; return this; } /** - * 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) @@ -410,7 +426,7 @@ public void setBookingDate(OffsetDateTime bookingDate) { } - public Transaction category(CategoryEnum category) { + public TransactionData category(CategoryEnum category) { this.category = category; return this; } @@ -435,7 +451,7 @@ public void setCategory(CategoryEnum category) { } - public Transaction counterparty(CounterpartyV3 counterparty) { + public TransactionData counterparty(CounterpartyV3 counterparty) { this.counterparty = counterparty; return this; } @@ -460,7 +476,7 @@ public void setCounterparty(CounterpartyV3 counterparty) { } - public Transaction createdAt(OffsetDateTime createdAt) { + public TransactionData createdAt(OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } @@ -485,7 +501,7 @@ public void setCreatedAt(OffsetDateTime createdAt) { } - public Transaction creationDate(OffsetDateTime creationDate) { + public TransactionData creationDate(OffsetDateTime creationDate) { this.creationDate = creationDate; return this; } @@ -510,7 +526,7 @@ public void setCreationDate(OffsetDateTime creationDate) { } - public Transaction description(String description) { + public TransactionData description(String description) { this.description = description; return this; } @@ -535,16 +551,16 @@ public void setDescription(String description) { } - public Transaction eventId(String eventId) { + public TransactionData eventId(String eventId) { this.eventId = eventId; return this; } /** - * 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) @@ -560,16 +576,16 @@ public void setEventId(String eventId) { } - public Transaction id(String id) { + public TransactionData id(String id) { this.id = id; return this; } /** - * 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) @@ -585,7 +601,7 @@ public void setId(String id) { } - public Transaction instructedAmount(Amount instructedAmount) { + public TransactionData instructedAmount(Amount instructedAmount) { this.instructedAmount = instructedAmount; return this; } @@ -610,16 +626,16 @@ public void setInstructedAmount(Amount instructedAmount) { } - public Transaction paymentInstrumentId(String paymentInstrumentId) { + public TransactionData paymentInstrumentId(String paymentInstrumentId) { this.paymentInstrumentId = paymentInstrumentId; return this; } /** - * 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) @@ -635,7 +651,7 @@ public void setPaymentInstrumentId(String paymentInstrumentId) { } - public Transaction reference(String reference) { + public TransactionData reference(String reference) { this.reference = reference; return this; } @@ -660,7 +676,7 @@ public void setReference(String reference) { } - public Transaction referenceForBeneficiary(String referenceForBeneficiary) { + public TransactionData referenceForBeneficiary(String referenceForBeneficiary) { this.referenceForBeneficiary = referenceForBeneficiary; return this; } @@ -685,7 +701,7 @@ public void setReferenceForBeneficiary(String referenceForBeneficiary) { } - public Transaction status(StatusEnum status) { + public TransactionData status(StatusEnum status) { this.status = status; return this; } @@ -710,7 +726,7 @@ public void setStatus(StatusEnum status) { } - public Transaction transferId(String transferId) { + public TransactionData transferId(String transferId) { this.transferId = transferId; return this; } @@ -735,7 +751,7 @@ public void setTransferId(String transferId) { } - public Transaction type(TypeEnum type) { + public TransactionData type(TypeEnum type) { this.type = type; return this; } @@ -760,7 +776,7 @@ public void setType(TypeEnum type) { } - public Transaction valueDate(OffsetDateTime valueDate) { + public TransactionData valueDate(OffsetDateTime valueDate) { this.valueDate = valueDate; return this; } @@ -786,7 +802,7 @@ public void setValueDate(OffsetDateTime valueDate) { /** - * Return true if this Transaction object is equal to o. + * Return true if this TransactionData object is equal to o. */ @Override public boolean equals(Object o) { @@ -796,27 +812,27 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Transaction transaction = (Transaction) o; - return Objects.equals(this.accountHolderId, transaction.accountHolderId) && - Objects.equals(this.amount, transaction.amount) && - Objects.equals(this.balanceAccountId, transaction.balanceAccountId) && - Objects.equals(this.balancePlatform, transaction.balancePlatform) && - Objects.equals(this.bookingDate, transaction.bookingDate) && - Objects.equals(this.category, transaction.category) && - Objects.equals(this.counterparty, transaction.counterparty) && - Objects.equals(this.createdAt, transaction.createdAt) && - Objects.equals(this.creationDate, transaction.creationDate) && - Objects.equals(this.description, transaction.description) && - Objects.equals(this.eventId, transaction.eventId) && - Objects.equals(this.id, transaction.id) && - Objects.equals(this.instructedAmount, transaction.instructedAmount) && - Objects.equals(this.paymentInstrumentId, transaction.paymentInstrumentId) && - Objects.equals(this.reference, transaction.reference) && - Objects.equals(this.referenceForBeneficiary, transaction.referenceForBeneficiary) && - Objects.equals(this.status, transaction.status) && - Objects.equals(this.transferId, transaction.transferId) && - Objects.equals(this.type, transaction.type) && - Objects.equals(this.valueDate, transaction.valueDate); + TransactionData transactionData = (TransactionData) o; + return Objects.equals(this.accountHolderId, transactionData.accountHolderId) && + Objects.equals(this.amount, transactionData.amount) && + Objects.equals(this.balanceAccountId, transactionData.balanceAccountId) && + Objects.equals(this.balancePlatform, transactionData.balancePlatform) && + Objects.equals(this.bookingDate, transactionData.bookingDate) && + Objects.equals(this.category, transactionData.category) && + Objects.equals(this.counterparty, transactionData.counterparty) && + Objects.equals(this.createdAt, transactionData.createdAt) && + Objects.equals(this.creationDate, transactionData.creationDate) && + Objects.equals(this.description, transactionData.description) && + Objects.equals(this.eventId, transactionData.eventId) && + Objects.equals(this.id, transactionData.id) && + Objects.equals(this.instructedAmount, transactionData.instructedAmount) && + Objects.equals(this.paymentInstrumentId, transactionData.paymentInstrumentId) && + Objects.equals(this.reference, transactionData.reference) && + Objects.equals(this.referenceForBeneficiary, transactionData.referenceForBeneficiary) && + Objects.equals(this.status, transactionData.status) && + Objects.equals(this.transferId, transactionData.transferId) && + Objects.equals(this.type, transactionData.type) && + Objects.equals(this.valueDate, transactionData.valueDate); } @Override @@ -827,7 +843,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Transaction {\n"); + sb.append("class TransactionData {\n"); sb.append(" accountHolderId: ").append(toIndentedString(accountHolderId)).append("\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" balanceAccountId: ").append(toIndentedString(balanceAccountId)).append("\n"); @@ -864,17 +880,17 @@ private String toIndentedString(Object o) { } /** - * Create an instance of Transaction given an JSON string + * Create an instance of TransactionData given an JSON string * * @param jsonString JSON string - * @return An instance of Transaction - * @throws JsonProcessingException if the JSON string is invalid with respect to Transaction + * @return An instance of TransactionData + * @throws JsonProcessingException if the JSON string is invalid with respect to TransactionData */ - public static Transaction fromJson(String jsonString) throws JsonProcessingException { - return JSON.getMapper().readValue(jsonString, Transaction.class); + public static TransactionData fromJson(String jsonString) throws JsonProcessingException { + return JSON.getMapper().readValue(jsonString, TransactionData.class); } /** - * Convert an instance of Transaction to an JSON string + * Convert an instance of TransactionData to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java b/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java index 8c634311f..a7029b795 100644 --- a/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java +++ b/src/main/java/com/adyen/model/transfers/TransactionSearchResponse.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.HashMap; import com.adyen.model.transfers.Links; -import com.adyen.model.transfers.Transaction; +import com.adyen.model.transfers.TransactionData; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -44,7 +44,7 @@ public class TransactionSearchResponse { private Links links; public static final String JSON_PROPERTY_DATA = "data"; - private List data = null; + private List data = null; public TransactionSearchResponse() { } @@ -74,12 +74,12 @@ public void setLinks(Links links) { } - public TransactionSearchResponse data(List data) { + public TransactionSearchResponse data(List data) { this.data = data; return this; } - public TransactionSearchResponse addDataItem(Transaction dataItem) { + public TransactionSearchResponse addDataItem(TransactionData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -95,14 +95,14 @@ public TransactionSearchResponse addDataItem(Transaction dataItem) { @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { + public List getData() { return data; } @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setData(List data) { + public void setData(List data) { this.data = data; } 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..c2fa58dac 100644 --- a/src/main/java/com/adyen/service/transfers/TransactionsApi.java +++ b/src/main/java/com/adyen/service/transfers/TransactionsApi.java @@ -16,7 +16,7 @@ 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.TransactionData; import com.adyen.model.transfers.TransactionSearchResponse; import com.adyen.model.RequestOptions; import com.adyen.service.exception.ApiException; @@ -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) @@ -117,10 +117,10 @@ public TransactionSearchResponse getAllTransactions(String balancePlatform, Stri * Get a transaction * * @param id {@link String } Unique identifier of the transaction. (required) - * @return {@link Transaction } + * @return {@link TransactionData } * @throws ApiException if fails to make API call */ - public Transaction getTransaction(String id) throws ApiException, IOException { + public TransactionData getTransaction(String id) throws ApiException, IOException { return getTransaction(id, null); } @@ -129,10 +129,10 @@ public Transaction getTransaction(String id) throws ApiException, IOException { * * @param id {@link String } Unique identifier of the transaction. (required) * @param requestOptions {@link RequestOptions } Object to store additional data such as idempotency-keys (optional) - * @return {@link Transaction } + * @return {@link TransactionData } * @throws ApiException if fails to make API call */ - public Transaction getTransaction(String id, RequestOptions requestOptions) throws ApiException, IOException { + public TransactionData getTransaction(String id, RequestOptions requestOptions) throws ApiException, IOException { //Add path params Map pathParams = new HashMap<>(); if (id == null) { @@ -143,6 +143,6 @@ public Transaction getTransaction(String id, RequestOptions requestOptions) thro String requestBody = null; Resource resource = new Resource(this, this.baseURL + "/transactions/{id}", null); String jsonResult = resource.request(requestBody, requestOptions, ApiConstants.HttpMethod.GET, pathParams); - return Transaction.fromJson(jsonResult); + return TransactionData.fromJson(jsonResult); } } 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;