Skip to content

Commit

Permalink
Update models + services (#1133)
Browse files Browse the repository at this point in the history
* [create-pull-request] automated change

* Fix tests automation/services (#1137)

* Fix TransfersTest

* Fix tests

* Remove unused imports

* Refactor tests

* Rename TransactionData back to Transaction for TransactionsApi

---------

Co-authored-by: Alexandros Moraitis <[email protected]>
Co-authored-by: alessio <[email protected]>
Co-authored-by: jillingk <[email protected]>
  • Loading branch information
4 people authored Oct 2, 2023
1 parent eb63a81 commit a9c201d
Show file tree
Hide file tree
Showing 38 changed files with 412 additions and 196 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/adyen/model/balancecontrol/JSON.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/adyen/model/balanceplatform/JSON.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/adyen/model/binlookup/JSON.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/adyen/model/checkout/AfterpayDetails.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public enum TypeEnum {

AFTERPAYTOUCH("afterpaytouch"),

AFTERPAY_B2B("afterpay_b2b");
AFTERPAY_B2B("afterpay_b2b"),

CLEARPAY("clearpay");

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: &gt; { \&quot;shopperStatement\&quot; : \&quot;ADYEN - SELLER-A\&quot;, \&quot;localizedShopperStatement\&quot; : { \&quot;ja-Kana\&quot; : \&quot;ADYEN - セラーA\&quot; } } 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 &#x60;shopperStatement&#x60; 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 &#x60;localizedShopperStatement&#x60; 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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: &gt; { \&quot;shopperStatement\&quot; : \&quot;ADYEN - SELLER-A\&quot;, \&quot;localizedShopperStatement\&quot; : { \&quot;ja-Kana\&quot; : \&quot;ADYEN - セラーA\&quot; } } 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 &#x60;shopperStatement&#x60; is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned.
* The &#x60;localizedShopperStatement&#x60; 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)

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/adyen/model/checkout/JSON.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/adyen/model/checkout/PaymentDetails.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ public enum TypeEnum {

GOPAY_WALLET("gopay_wallet"),

POLI("poli"),

KCP_NAVERPAY("kcp_naverpay"),

ONLINEBANKING_IN("onlinebanking_IN"),
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/adyen/model/checkout/PaymentRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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: &gt; { \&quot;shopperStatement\&quot; : \&quot;ADYEN - SELLER-A\&quot;, \&quot;localizedShopperStatement\&quot; : { \&quot;ja-Kana\&quot; : \&quot;ADYEN - セラーA\&quot; } } 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 &#x60;shopperStatement&#x60; is used to modify the statement of the shopper. Adyen handles the complexity of ensuring the correct descriptors are assigned.
* The &#x60;localizedShopperStatement&#x60; 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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: &gt; { \&quot;shopperStatement\&quot; : \&quot;ADYEN - SELLER-A\&quot;, \&quot;localizedShopperStatement\&quot; : { \&quot;ja-Kana\&quot; : \&quot;ADYEN - セラーA\&quot; } } 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 &#x60;shopperStatement&#x60; 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 &#x60;localizedShopperStatement&#x60; 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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/adyen/model/dataprotection/JSON.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading

0 comments on commit a9c201d

Please sign in to comment.