Skip to content

Commit 89e3cbe

Browse files
AdyenAutomationBotAdyenAutomationBotgcatanese
authored
Code generation: update services and models (#1515)
* false[adyen-sdk-automation] automated change * style(fmt): code formatted * Update WebhookHandler parsing logic (check type) * Add tests * style(fmt): code formatted * Update AcsWebhooks tests --------- Co-authored-by: AdyenAutomationBot <AdyenAutomationBot 38424300+AdyenAutomationBot@users.noreply.github.com> Co-authored-by: gcatanese <gcatanese@yahoo.com>
1 parent 8d60816 commit 89e3cbe

File tree

865 files changed

+7041
-1486
lines changed

Some content is hidden

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

865 files changed

+7041
-1486
lines changed

src/main/java/com/adyen/model/acswebhooks/Amount.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import com.fasterxml.jackson.annotation.JsonProperty;
1616
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1717
import com.fasterxml.jackson.core.JsonProcessingException;
18-
import java.util.Objects;
18+
import java.util.*;
1919

2020
/** Amount */
2121
@JsonPropertyOrder({Amount.JSON_PROPERTY_CURRENCY, Amount.JSON_PROPERTY_VALUE})

src/main/java/com/adyen/model/acswebhooks/AuthenticationDecision.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1818
import com.fasterxml.jackson.annotation.JsonValue;
1919
import com.fasterxml.jackson.core.JsonProcessingException;
20-
import java.util.Objects;
20+
import java.util.*;
21+
import java.util.Arrays;
22+
import java.util.logging.Logger;
2123

2224
/** AuthenticationDecision */
2325
@JsonPropertyOrder({AuthenticationDecision.JSON_PROPERTY_STATUS})
@@ -32,6 +34,8 @@ public enum StatusEnum {
3234

3335
REFUSED(String.valueOf("refused"));
3436

37+
private static final Logger LOG = Logger.getLogger(StatusEnum.class.getName());
38+
3539
private String value;
3640

3741
StatusEnum(String value) {
@@ -55,7 +59,13 @@ public static StatusEnum fromValue(String value) {
5559
return b;
5660
}
5761
}
58-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
62+
// handling unexpected value
63+
LOG.warning(
64+
"StatusEnum: unexpected enum value '"
65+
+ value
66+
+ "' - Supported values are "
67+
+ Arrays.toString(StatusEnum.values()));
68+
return null;
5969
}
6070
}
6171

src/main/java/com/adyen/model/acswebhooks/AuthenticationInfo.java

Lines changed: 66 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
import com.fasterxml.jackson.annotation.JsonValue;
1919
import com.fasterxml.jackson.core.JsonProcessingException;
2020
import java.time.OffsetDateTime;
21-
import java.util.Objects;
21+
import java.util.*;
22+
import java.util.Arrays;
23+
import java.util.logging.Logger;
2224

2325
/** AuthenticationInfo */
2426
@JsonPropertyOrder({
@@ -76,6 +78,8 @@ public enum ChallengeIndicatorEnum {
7678

7779
_82(String.valueOf("82"));
7880

81+
private static final Logger LOG = Logger.getLogger(ChallengeIndicatorEnum.class.getName());
82+
7983
private String value;
8084

8185
ChallengeIndicatorEnum(String value) {
@@ -99,7 +103,13 @@ public static ChallengeIndicatorEnum fromValue(String value) {
99103
return b;
100104
}
101105
}
102-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
106+
// handling unexpected value
107+
LOG.warning(
108+
"ChallengeIndicatorEnum: unexpected enum value '"
109+
+ value
110+
+ "' - Supported values are "
111+
+ Arrays.toString(ChallengeIndicatorEnum.values()));
112+
return null;
103113
}
104114
}
105115

@@ -121,6 +131,8 @@ public enum DeviceChannelEnum {
121131

122132
THREEDSREQUESTORINITIATED(String.valueOf("ThreeDSRequestorInitiated"));
123133

134+
private static final Logger LOG = Logger.getLogger(DeviceChannelEnum.class.getName());
135+
124136
private String value;
125137

126138
DeviceChannelEnum(String value) {
@@ -144,7 +156,13 @@ public static DeviceChannelEnum fromValue(String value) {
144156
return b;
145157
}
146158
}
147-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
159+
// handling unexpected value
160+
LOG.warning(
161+
"DeviceChannelEnum: unexpected enum value '"
162+
+ value
163+
+ "' - Supported values are "
164+
+ Arrays.toString(DeviceChannelEnum.values()));
165+
return null;
148166
}
149167
}
150168

@@ -175,6 +193,8 @@ public enum ExemptionIndicatorEnum {
175193

176194
VISADAFEXEMPTION(String.valueOf("visaDAFExemption"));
177195

196+
private static final Logger LOG = Logger.getLogger(ExemptionIndicatorEnum.class.getName());
197+
178198
private String value;
179199

180200
ExemptionIndicatorEnum(String value) {
@@ -198,7 +218,13 @@ public static ExemptionIndicatorEnum fromValue(String value) {
198218
return b;
199219
}
200220
}
201-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
221+
// handling unexpected value
222+
LOG.warning(
223+
"ExemptionIndicatorEnum: unexpected enum value '"
224+
+ value
225+
+ "' - Supported values are "
226+
+ Arrays.toString(ExemptionIndicatorEnum.values()));
227+
return null;
202228
}
203229
}
204230

@@ -217,6 +243,8 @@ public enum MessageCategoryEnum {
217243

218244
NONPAYMENT(String.valueOf("nonPayment"));
219245

246+
private static final Logger LOG = Logger.getLogger(MessageCategoryEnum.class.getName());
247+
220248
private String value;
221249

222250
MessageCategoryEnum(String value) {
@@ -240,7 +268,13 @@ public static MessageCategoryEnum fromValue(String value) {
240268
return b;
241269
}
242270
}
243-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
271+
// handling unexpected value
272+
LOG.warning(
273+
"MessageCategoryEnum: unexpected enum value '"
274+
+ value
275+
+ "' - Supported values are "
276+
+ Arrays.toString(MessageCategoryEnum.values()));
277+
return null;
244278
}
245279
}
246280

@@ -274,6 +308,8 @@ public enum TransStatusEnum {
274308

275309
U(String.valueOf("U"));
276310

311+
private static final Logger LOG = Logger.getLogger(TransStatusEnum.class.getName());
312+
277313
private String value;
278314

279315
TransStatusEnum(String value) {
@@ -297,7 +333,13 @@ public static TransStatusEnum fromValue(String value) {
297333
return b;
298334
}
299335
}
300-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
336+
// handling unexpected value
337+
LOG.warning(
338+
"TransStatusEnum: unexpected enum value '"
339+
+ value
340+
+ "' - Supported values are "
341+
+ Arrays.toString(TransStatusEnum.values()));
342+
return null;
301343
}
302344
}
303345

@@ -380,6 +422,8 @@ public enum TransStatusReasonEnum {
380422

381423
_88(String.valueOf("88"));
382424

425+
private static final Logger LOG = Logger.getLogger(TransStatusReasonEnum.class.getName());
426+
383427
private String value;
384428

385429
TransStatusReasonEnum(String value) {
@@ -403,7 +447,13 @@ public static TransStatusReasonEnum fromValue(String value) {
403447
return b;
404448
}
405449
}
406-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
450+
// handling unexpected value
451+
LOG.warning(
452+
"TransStatusReasonEnum: unexpected enum value '"
453+
+ value
454+
+ "' - Supported values are "
455+
+ Arrays.toString(TransStatusReasonEnum.values()));
456+
return null;
407457
}
408458
}
409459

@@ -416,6 +466,8 @@ public enum TypeEnum {
416466

417467
CHALLENGE(String.valueOf("challenge"));
418468

469+
private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName());
470+
419471
private String value;
420472

421473
TypeEnum(String value) {
@@ -439,7 +491,13 @@ public static TypeEnum fromValue(String value) {
439491
return b;
440492
}
441493
}
442-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
494+
// handling unexpected value
495+
LOG.warning(
496+
"TypeEnum: unexpected enum value '"
497+
+ value
498+
+ "' - Supported values are "
499+
+ Arrays.toString(TypeEnum.values()));
500+
return null;
443501
}
444502
}
445503

src/main/java/com/adyen/model/acswebhooks/AuthenticationNotificationData.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1818
import com.fasterxml.jackson.annotation.JsonValue;
1919
import com.fasterxml.jackson.core.JsonProcessingException;
20-
import java.util.Objects;
20+
import java.util.*;
21+
import java.util.Arrays;
22+
import java.util.logging.Logger;
2123

2224
/** AuthenticationNotificationData */
2325
@JsonPropertyOrder({
@@ -52,6 +54,8 @@ public enum StatusEnum {
5254

5355
ERROR(String.valueOf("error"));
5456

57+
private static final Logger LOG = Logger.getLogger(StatusEnum.class.getName());
58+
5559
private String value;
5660

5761
StatusEnum(String value) {
@@ -75,7 +79,13 @@ public static StatusEnum fromValue(String value) {
7579
return b;
7680
}
7781
}
78-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
82+
// handling unexpected value
83+
LOG.warning(
84+
"StatusEnum: unexpected enum value '"
85+
+ value
86+
+ "' - Supported values are "
87+
+ Arrays.toString(StatusEnum.values()));
88+
return null;
7989
}
8090
}
8191

src/main/java/com/adyen/model/acswebhooks/AuthenticationNotificationRequest.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
import com.fasterxml.jackson.annotation.JsonValue;
1919
import com.fasterxml.jackson.core.JsonProcessingException;
2020
import java.time.OffsetDateTime;
21-
import java.util.Objects;
21+
import java.util.*;
22+
import java.util.Arrays;
23+
import java.util.logging.Logger;
2224

2325
/** AuthenticationNotificationRequest */
2426
@JsonPropertyOrder({
@@ -42,6 +44,8 @@ public enum TypeEnum {
4244
BALANCEPLATFORM_AUTHENTICATION_CREATED(
4345
String.valueOf("balancePlatform.authentication.created"));
4446

47+
private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName());
48+
4549
private String value;
4650

4751
TypeEnum(String value) {
@@ -65,7 +69,13 @@ public static TypeEnum fromValue(String value) {
6569
return b;
6670
}
6771
}
68-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
72+
// handling unexpected value
73+
LOG.warning(
74+
"TypeEnum: unexpected enum value '"
75+
+ value
76+
+ "' - Supported values are "
77+
+ Arrays.toString(TypeEnum.values()));
78+
return null;
6979
}
7080
}
7181

src/main/java/com/adyen/model/acswebhooks/BalancePlatformNotificationResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import com.fasterxml.jackson.annotation.JsonProperty;
1616
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1717
import com.fasterxml.jackson.core.JsonProcessingException;
18-
import java.util.Objects;
18+
import java.util.*;
1919

2020
/** BalancePlatformNotificationResponse */
2121
@JsonPropertyOrder({BalancePlatformNotificationResponse.JSON_PROPERTY_NOTIFICATION_RESPONSE})

src/main/java/com/adyen/model/acswebhooks/ChallengeInfo.java

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
import com.fasterxml.jackson.annotation.JsonValue;
1919
import com.fasterxml.jackson.core.JsonProcessingException;
2020
import java.time.OffsetDateTime;
21-
import java.util.Objects;
21+
import java.util.*;
22+
import java.util.Arrays;
23+
import java.util.logging.Logger;
2224

2325
/** ChallengeInfo */
2426
@JsonPropertyOrder({
@@ -58,6 +60,8 @@ public enum ChallengeCancelEnum {
5860

5961
_08(String.valueOf("08"));
6062

63+
private static final Logger LOG = Logger.getLogger(ChallengeCancelEnum.class.getName());
64+
6165
private String value;
6266

6367
ChallengeCancelEnum(String value) {
@@ -81,7 +85,13 @@ public static ChallengeCancelEnum fromValue(String value) {
8185
return b;
8286
}
8387
}
84-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
88+
// handling unexpected value
89+
LOG.warning(
90+
"ChallengeCancelEnum: unexpected enum value '"
91+
+ value
92+
+ "' - Supported values are "
93+
+ Arrays.toString(ChallengeCancelEnum.values()));
94+
return null;
8595
}
8696
}
8797

@@ -100,6 +110,8 @@ public enum FlowEnum {
100110

101111
OOB_TRIGGER_FL(String.valueOf("OOB_TRIGGER_FL"));
102112

113+
private static final Logger LOG = Logger.getLogger(FlowEnum.class.getName());
114+
103115
private String value;
104116

105117
FlowEnum(String value) {
@@ -123,7 +135,13 @@ public static FlowEnum fromValue(String value) {
123135
return b;
124136
}
125137
}
126-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
138+
// handling unexpected value
139+
LOG.warning(
140+
"FlowEnum: unexpected enum value '"
141+
+ value
142+
+ "' - Supported values are "
143+
+ Arrays.toString(FlowEnum.values()));
144+
return null;
127145
}
128146
}
129147

src/main/java/com/adyen/model/acswebhooks/Purchase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1717
import com.fasterxml.jackson.core.JsonProcessingException;
1818
import java.time.OffsetDateTime;
19-
import java.util.Objects;
19+
import java.util.*;
2020

2121
/** Purchase */
2222
@JsonPropertyOrder({

src/main/java/com/adyen/model/acswebhooks/PurchaseInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import com.fasterxml.jackson.annotation.JsonProperty;
1616
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1717
import com.fasterxml.jackson.core.JsonProcessingException;
18-
import java.util.Objects;
18+
import java.util.*;
1919

2020
/** PurchaseInfo */
2121
@JsonPropertyOrder({

0 commit comments

Comments
 (0)