Skip to content

Commit c4e7e00

Browse files
Merge pull request #1109 from Adyen/automation/release
Release v21.2.0
2 parents 3f35b25 + c997e5b commit c4e7e00

File tree

119 files changed

+4374
-413
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+4374
-413
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ You can use Maven and add this dependency to your project's POM:
5656
<dependency>
5757
<groupId>com.adyen</groupId>
5858
<artifactId>adyen-java-api-library</artifactId>
59-
<version>21.1.0</version>
59+
<version>21.2.0</version>
6060
</dependency>
6161
```
6262

Diff for: pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.adyen</groupId>
55
<artifactId>adyen-java-api-library</artifactId>
66
<packaging>jar</packaging>
7-
<version>21.1.0</version>
7+
<version>21.2.0</version>
88
<name>Adyen Java API Library</name>
99
<description>Adyen API Client Library for Java</description>
1010
<url>https://github.com/adyen/adyen-java-api-library</url>

Diff for: src/main/java/com/adyen/Client.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class Client {
3232
private Config config;
3333
public static final String ENDPOINT_CERT_LIVE = "https://palcert-live.adyen.com";
3434
public static final String LIB_NAME = "adyen-java-api-library";
35-
public static final String LIB_VERSION = "21.1.0";
35+
public static final String LIB_VERSION = "21.2.0";
3636
public static final String CHECKOUT_ENDPOINT_CERT_LIVE = "https://checkoutcert-live-%s.adyen.com/checkout";
3737
public static final String TERMINAL_API_ENDPOINT_TEST = "https://terminal-api-test.adyen.com";
3838
public static final String TERMINAL_API_ENDPOINT_LIVE = "https://terminal-api-live.adyen.com";

Diff for: src/main/java/com/adyen/model/balanceplatform/AccountHolderCapability.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import java.util.Map;
1818
import java.util.HashMap;
1919
import com.adyen.model.balanceplatform.AccountSupportingEntityCapability;
20+
import com.adyen.model.balanceplatform.CapabilityProblem;
2021
import com.adyen.model.balanceplatform.CapabilitySettings;
2122
import com.fasterxml.jackson.annotation.JsonInclude;
2223
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -100,7 +101,7 @@ public static AllowedLevelEnum fromValue(String value) {
100101
private Boolean enabled;
101102

102103
public static final String JSON_PROPERTY_PROBLEMS = "problems";
103-
private List<Object> problems = null;
104+
private List<CapabilityProblem> problems = null;
104105

105106
public static final String JSON_PROPERTY_REQUESTED = "requested";
106107
private Boolean requested;
@@ -298,12 +299,12 @@ public void setEnabled(Boolean enabled) {
298299
}
299300

300301

301-
public AccountHolderCapability problems(List<Object> problems) {
302+
public AccountHolderCapability problems(List<CapabilityProblem> problems) {
302303
this.problems = problems;
303304
return this;
304305
}
305306

306-
public AccountHolderCapability addProblemsItem(Object problemsItem) {
307+
public AccountHolderCapability addProblemsItem(CapabilityProblem problemsItem) {
307308
if (this.problems == null) {
308309
this.problems = new ArrayList<>();
309310
}
@@ -319,14 +320,14 @@ public AccountHolderCapability addProblemsItem(Object problemsItem) {
319320
@JsonProperty(JSON_PROPERTY_PROBLEMS)
320321
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
321322

322-
public List<Object> getProblems() {
323+
public List<CapabilityProblem> getProblems() {
323324
return problems;
324325
}
325326

326327

327328
@JsonProperty(JSON_PROPERTY_PROBLEMS)
328329
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
329-
public void setProblems(List<Object> problems) {
330+
public void setProblems(List<CapabilityProblem> problems) {
330331
this.problems = problems;
331332
}
332333

Diff for: src/main/java/com/adyen/model/balanceplatform/BankAccountIdentificationValidationRequestAccountIdentification.java

+35-20
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,6 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
108108
boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS);
109109
int match = 0;
110110
JsonToken token = tree.traverse(jp.getCodec()).nextToken();
111-
// Local Object Mapper that forces strict validation
112-
ObjectMapper localObjectMapper = JSON.getMapper();
113-
localObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
114111

115112
// deserialize AULocalAccountIdentification
116113
try {
@@ -129,7 +126,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
129126
boolean typeMatch = Arrays.stream(AULocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
130127
if (attemptParsing || typeMatch) {
131128
// Strict deserialization for oneOf models
132-
deserialized = localObjectMapper.readValue(tree.toString(), AULocalAccountIdentification.class);
129+
deserialized = JSON.getMapper().readValue(tree.toString(), AULocalAccountIdentification.class);
133130
// typeMatch should enforce proper deserialization
134131
match++;
135132
log.log(Level.FINER, "Input data matches schema 'AULocalAccountIdentification'");
@@ -157,7 +154,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
157154
boolean typeMatch = Arrays.stream(BRLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
158155
if (attemptParsing || typeMatch) {
159156
// Strict deserialization for oneOf models
160-
deserialized = localObjectMapper.readValue(tree.toString(), BRLocalAccountIdentification.class);
157+
deserialized = JSON.getMapper().readValue(tree.toString(), BRLocalAccountIdentification.class);
161158
// typeMatch should enforce proper deserialization
162159
match++;
163160
log.log(Level.FINER, "Input data matches schema 'BRLocalAccountIdentification'");
@@ -185,7 +182,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
185182
boolean typeMatch = Arrays.stream(CALocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
186183
if (attemptParsing || typeMatch) {
187184
// Strict deserialization for oneOf models
188-
deserialized = localObjectMapper.readValue(tree.toString(), CALocalAccountIdentification.class);
185+
deserialized = JSON.getMapper().readValue(tree.toString(), CALocalAccountIdentification.class);
189186
// typeMatch should enforce proper deserialization
190187
match++;
191188
log.log(Level.FINER, "Input data matches schema 'CALocalAccountIdentification'");
@@ -213,7 +210,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
213210
boolean typeMatch = Arrays.stream(CZLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
214211
if (attemptParsing || typeMatch) {
215212
// Strict deserialization for oneOf models
216-
deserialized = localObjectMapper.readValue(tree.toString(), CZLocalAccountIdentification.class);
213+
deserialized = JSON.getMapper().readValue(tree.toString(), CZLocalAccountIdentification.class);
217214
// typeMatch should enforce proper deserialization
218215
match++;
219216
log.log(Level.FINER, "Input data matches schema 'CZLocalAccountIdentification'");
@@ -241,7 +238,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
241238
boolean typeMatch = Arrays.stream(DKLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
242239
if (attemptParsing || typeMatch) {
243240
// Strict deserialization for oneOf models
244-
deserialized = localObjectMapper.readValue(tree.toString(), DKLocalAccountIdentification.class);
241+
deserialized = JSON.getMapper().readValue(tree.toString(), DKLocalAccountIdentification.class);
245242
// typeMatch should enforce proper deserialization
246243
match++;
247244
log.log(Level.FINER, "Input data matches schema 'DKLocalAccountIdentification'");
@@ -269,7 +266,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
269266
boolean typeMatch = Arrays.stream(HKLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
270267
if (attemptParsing || typeMatch) {
271268
// Strict deserialization for oneOf models
272-
deserialized = localObjectMapper.readValue(tree.toString(), HKLocalAccountIdentification.class);
269+
deserialized = JSON.getMapper().readValue(tree.toString(), HKLocalAccountIdentification.class);
273270
// typeMatch should enforce proper deserialization
274271
match++;
275272
log.log(Level.FINER, "Input data matches schema 'HKLocalAccountIdentification'");
@@ -297,7 +294,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
297294
boolean typeMatch = Arrays.stream(HULocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
298295
if (attemptParsing || typeMatch) {
299296
// Strict deserialization for oneOf models
300-
deserialized = localObjectMapper.readValue(tree.toString(), HULocalAccountIdentification.class);
297+
deserialized = JSON.getMapper().readValue(tree.toString(), HULocalAccountIdentification.class);
301298
// typeMatch should enforce proper deserialization
302299
match++;
303300
log.log(Level.FINER, "Input data matches schema 'HULocalAccountIdentification'");
@@ -325,7 +322,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
325322
boolean typeMatch = Arrays.stream(IbanAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
326323
if (attemptParsing || typeMatch) {
327324
// Strict deserialization for oneOf models
328-
deserialized = localObjectMapper.readValue(tree.toString(), IbanAccountIdentification.class);
325+
deserialized = JSON.getMapper().readValue(tree.toString(), IbanAccountIdentification.class);
329326
// typeMatch should enforce proper deserialization
330327
match++;
331328
log.log(Level.FINER, "Input data matches schema 'IbanAccountIdentification'");
@@ -353,7 +350,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
353350
boolean typeMatch = Arrays.stream(NOLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
354351
if (attemptParsing || typeMatch) {
355352
// Strict deserialization for oneOf models
356-
deserialized = localObjectMapper.readValue(tree.toString(), NOLocalAccountIdentification.class);
353+
deserialized = JSON.getMapper().readValue(tree.toString(), NOLocalAccountIdentification.class);
357354
// typeMatch should enforce proper deserialization
358355
match++;
359356
log.log(Level.FINER, "Input data matches schema 'NOLocalAccountIdentification'");
@@ -381,7 +378,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
381378
boolean typeMatch = Arrays.stream(NZLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
382379
if (attemptParsing || typeMatch) {
383380
// Strict deserialization for oneOf models
384-
deserialized = localObjectMapper.readValue(tree.toString(), NZLocalAccountIdentification.class);
381+
deserialized = JSON.getMapper().readValue(tree.toString(), NZLocalAccountIdentification.class);
385382
// typeMatch should enforce proper deserialization
386383
match++;
387384
log.log(Level.FINER, "Input data matches schema 'NZLocalAccountIdentification'");
@@ -409,7 +406,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
409406
boolean typeMatch = Arrays.stream(NumberAndBicAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
410407
if (attemptParsing || typeMatch) {
411408
// Strict deserialization for oneOf models
412-
deserialized = localObjectMapper.readValue(tree.toString(), NumberAndBicAccountIdentification.class);
409+
deserialized = JSON.getMapper().readValue(tree.toString(), NumberAndBicAccountIdentification.class);
413410
// typeMatch should enforce proper deserialization
414411
match++;
415412
log.log(Level.FINER, "Input data matches schema 'NumberAndBicAccountIdentification'");
@@ -437,7 +434,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
437434
boolean typeMatch = Arrays.stream(PLLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
438435
if (attemptParsing || typeMatch) {
439436
// Strict deserialization for oneOf models
440-
deserialized = localObjectMapper.readValue(tree.toString(), PLLocalAccountIdentification.class);
437+
deserialized = JSON.getMapper().readValue(tree.toString(), PLLocalAccountIdentification.class);
441438
// typeMatch should enforce proper deserialization
442439
match++;
443440
log.log(Level.FINER, "Input data matches schema 'PLLocalAccountIdentification'");
@@ -465,7 +462,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
465462
boolean typeMatch = Arrays.stream(SELocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
466463
if (attemptParsing || typeMatch) {
467464
// Strict deserialization for oneOf models
468-
deserialized = localObjectMapper.readValue(tree.toString(), SELocalAccountIdentification.class);
465+
deserialized = JSON.getMapper().readValue(tree.toString(), SELocalAccountIdentification.class);
469466
// typeMatch should enforce proper deserialization
470467
match++;
471468
log.log(Level.FINER, "Input data matches schema 'SELocalAccountIdentification'");
@@ -493,7 +490,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
493490
boolean typeMatch = Arrays.stream(SGLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
494491
if (attemptParsing || typeMatch) {
495492
// Strict deserialization for oneOf models
496-
deserialized = localObjectMapper.readValue(tree.toString(), SGLocalAccountIdentification.class);
493+
deserialized = JSON.getMapper().readValue(tree.toString(), SGLocalAccountIdentification.class);
497494
// typeMatch should enforce proper deserialization
498495
match++;
499496
log.log(Level.FINER, "Input data matches schema 'SGLocalAccountIdentification'");
@@ -521,7 +518,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
521518
boolean typeMatch = Arrays.stream(UKLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
522519
if (attemptParsing || typeMatch) {
523520
// Strict deserialization for oneOf models
524-
deserialized = localObjectMapper.readValue(tree.toString(), UKLocalAccountIdentification.class);
521+
deserialized = JSON.getMapper().readValue(tree.toString(), UKLocalAccountIdentification.class);
525522
// typeMatch should enforce proper deserialization
526523
match++;
527524
log.log(Level.FINER, "Input data matches schema 'UKLocalAccountIdentification'");
@@ -549,7 +546,7 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
549546
boolean typeMatch = Arrays.stream(USLocalAccountIdentification.TypeEnum.values()).anyMatch((t) -> t.getValue().contains(tree.findValue("type").asText()));
550547
if (attemptParsing || typeMatch) {
551548
// Strict deserialization for oneOf models
552-
deserialized = localObjectMapper.readValue(tree.toString(), USLocalAccountIdentification.class);
549+
deserialized = JSON.getMapper().readValue(tree.toString(), USLocalAccountIdentification.class);
553550
// typeMatch should enforce proper deserialization
554551
match++;
555552
log.log(Level.FINER, "Input data matches schema 'USLocalAccountIdentification'");
@@ -568,7 +565,6 @@ public BankAccountIdentificationValidationRequestAccountIdentification deseriali
568565
log.log(Level.WARNING, String.format("Warning, indecisive deserialization for BankAccountIdentificationValidationRequestAccountIdentification: %d classes match result, expected 1", match));
569566
}
570567

571-
localObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
572568
BankAccountIdentificationValidationRequestAccountIdentification ret = new BankAccountIdentificationValidationRequestAccountIdentification();
573569
ret.setActualInstance(deserialized);
574570
return ret;
@@ -991,5 +987,24 @@ public USLocalAccountIdentification getUSLocalAccountIdentification() throws Cla
991987
return (USLocalAccountIdentification)super.getActualInstance();
992988
}
993989

990+
/**
991+
* Create an instance of BankAccountIdentificationValidationRequestAccountIdentification given an JSON string
992+
*
993+
* @param jsonString JSON string
994+
* @return An instance of BankAccountIdentificationValidationRequestAccountIdentification
995+
* @throws IOException if the JSON string is invalid with respect to BankAccountIdentificationValidationRequestAccountIdentification
996+
*/
997+
public static BankAccountIdentificationValidationRequestAccountIdentification fromJson(String jsonString) throws IOException {
998+
return JSON.getMapper().readValue(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.class);
999+
}
1000+
1001+
/**
1002+
* Convert an instance of BankAccountIdentificationValidationRequestAccountIdentification to an JSON string
1003+
*
1004+
* @return JSON string
1005+
*/
1006+
public String toJson() throws JsonProcessingException {
1007+
return JSON.getMapper().writeValueAsString(this);
1008+
}
9941009
}
9951010

0 commit comments

Comments
 (0)