Skip to content

Commit eaa27d2

Browse files
[checkout] Automated update from Adyen/adyen-openapi@425d65d
1 parent ef0f827 commit eaa27d2

7 files changed

Lines changed: 565 additions & 11 deletions

File tree

sdk-generation-log/checkout.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"service": "checkout",
33
"project": "java",
4-
"generatedAt": "2026-07-22T11:25:22Z",
5-
"openapiCommitSha": "c6f0131e5551226fd523852ff6f5ad1df6c72ee2",
4+
"generatedAt": "2026-07-31T12:01:49Z",
5+
"openapiCommitSha": "425d65d12163ebd4fe6fa6d2f859075817c81cba",
66
"automationCommitSha": "0c108bd8050cf480d2710b78b770afdfbdd89397",
7-
"libraryCommitSha": "913f166177824e57c26c5f0543b46144219ca6af"
7+
"libraryCommitSha": "ef0f827bf1e2d31bdc55f7cc4860ffef20601f42"
88
}

src/main/java/com/adyen/model/checkout/CheckoutPaymentMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,7 @@ public CheckoutPaymentMethod(ZipDetails o) {
21462146
mappings.put("gcash", StoredPaymentMethodDetails.class);
21472147
mappings.put("giftcard", CardDetails.class);
21482148
mappings.put("googlepay", GooglePayDetails.class);
2149-
mappings.put("gopay_wallet", PaymentDetails.class);
2149+
mappings.put("gopay_wallet", StoredPaymentMethodDetails.class);
21502150
mappings.put("grabpay_ID", StoredPaymentMethodDetails.class);
21512151
mappings.put("grabpay_MY", StoredPaymentMethodDetails.class);
21522152
mappings.put("grabpay_PH", StoredPaymentMethodDetails.class);

src/main/java/com/adyen/model/checkout/DonationCampaignsRequest.java

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
/** DonationCampaignsRequest */
2323
@JsonPropertyOrder({
2424
DonationCampaignsRequest.JSON_PROPERTY_CURRENCY,
25+
DonationCampaignsRequest.JSON_PROPERTY_LABEL,
2526
DonationCampaignsRequest.JSON_PROPERTY_LOCALE,
2627
DonationCampaignsRequest.JSON_PROPERTY_MERCHANT_ACCOUNT,
2728
DonationCampaignsRequest.JSON_PROPERTY_STORE
@@ -33,6 +34,12 @@ public class DonationCampaignsRequest {
3334
/** Mark when the attribute has been explicitly set. */
3435
private boolean isSetCurrency = false;
3536

37+
public static final String JSON_PROPERTY_LABEL = "label";
38+
private String label;
39+
40+
/** Mark when the attribute has been explicitly set. */
41+
private boolean isSetLabel = false;
42+
3643
public static final String JSON_PROPERTY_LOCALE = "locale";
3744
private String locale;
3845

@@ -100,6 +107,41 @@ public void setCurrency(String currency) {
100107
isSetCurrency = true; // mark as set
101108
}
102109

110+
/**
111+
* The label that is assigned to the donation campaign.
112+
*
113+
* @param label The label that is assigned to the donation campaign.
114+
* @return the current {@code DonationCampaignsRequest} instance, allowing for method chaining
115+
*/
116+
public DonationCampaignsRequest label(String label) {
117+
this.label = label;
118+
isSetLabel = true; // mark as set
119+
return this;
120+
}
121+
122+
/**
123+
* The label that is assigned to the donation campaign.
124+
*
125+
* @return label The label that is assigned to the donation campaign.
126+
*/
127+
@JsonProperty(JSON_PROPERTY_LABEL)
128+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
129+
public String getLabel() {
130+
return label;
131+
}
132+
133+
/**
134+
* The label that is assigned to the donation campaign.
135+
*
136+
* @param label The label that is assigned to the donation campaign.
137+
*/
138+
@JsonProperty(JSON_PROPERTY_LABEL)
139+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
140+
public void setLabel(String label) {
141+
this.label = label;
142+
isSetLabel = true; // mark as set
143+
}
144+
103145
/**
104146
* Locale on the shopper interaction device.
105147
*
@@ -276,6 +318,8 @@ public boolean equals(Object o) {
276318
DonationCampaignsRequest donationCampaignsRequest = (DonationCampaignsRequest) o;
277319
return Objects.equals(this.currency, donationCampaignsRequest.currency)
278320
&& Objects.equals(this.isSetCurrency, donationCampaignsRequest.isSetCurrency)
321+
&& Objects.equals(this.label, donationCampaignsRequest.label)
322+
&& Objects.equals(this.isSetLabel, donationCampaignsRequest.isSetLabel)
279323
&& Objects.equals(this.locale, donationCampaignsRequest.locale)
280324
&& Objects.equals(this.isSetLocale, donationCampaignsRequest.isSetLocale)
281325
&& Objects.equals(this.merchantAccount, donationCampaignsRequest.merchantAccount)
@@ -289,6 +333,8 @@ public int hashCode() {
289333
return Objects.hash(
290334
currency,
291335
isSetCurrency,
336+
label,
337+
isSetLabel,
292338
locale,
293339
isSetLocale,
294340
merchantAccount,
@@ -302,6 +348,7 @@ public String toString() {
302348
StringBuilder sb = new StringBuilder();
303349
sb.append("class DonationCampaignsRequest {\n");
304350
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
351+
sb.append(" label: ").append(toIndentedString(label)).append("\n");
305352
sb.append(" locale: ").append(toIndentedString(locale)).append("\n");
306353
sb.append(" merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n");
307354
sb.append(" store: ").append(toIndentedString(store)).append("\n");
@@ -332,6 +379,9 @@ public Map<String, Object> getExplicitNulls() {
332379
if (isSetCurrency) {
333380
addIfNull(nulls, JSON_PROPERTY_CURRENCY, this.currency);
334381
}
382+
if (isSetLabel) {
383+
addIfNull(nulls, JSON_PROPERTY_LABEL, this.label);
384+
}
335385
if (isSetLocale) {
336386
addIfNull(nulls, JSON_PROPERTY_LOCALE, this.locale);
337387
}

src/main/java/com/adyen/model/checkout/DonationPaymentMethod.java

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,32 @@ public DonationPaymentMethod deserialize(JsonParser jp, DeserializationContext c
203203
log.log(Level.FINER, "Input data does not match schema 'PayWithGoogleDonations'", e);
204204
}
205205

206+
// deserialize SepaDirectDebitDonations
207+
try {
208+
boolean attemptParsing = true;
209+
if (attemptParsing) {
210+
// Checks if the unique type of the oneOf json matches any of the object TypeEnum values
211+
boolean typeMatch = false;
212+
if (tree.findValue("type") != null) {
213+
typeMatch =
214+
Arrays.stream(SepaDirectDebitDonations.TypeEnum.values())
215+
.anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
216+
}
217+
218+
if (typeMatch) {
219+
deserialized = tree.traverse(jp.getCodec()).readValueAs(SepaDirectDebitDonations.class);
220+
// TODO: there is no validation against JSON schema constraints
221+
// (min, max, enum, pattern...), this does not perform a strict JSON
222+
// validation, which means the 'match' count may be higher than it should be.
223+
match++;
224+
log.log(Level.FINER, "Input data matches schema 'SepaDirectDebitDonations'");
225+
}
226+
}
227+
} catch (Exception e) {
228+
// deserialization failed, continue
229+
log.log(Level.FINER, "Input data does not match schema 'SepaDirectDebitDonations'", e);
230+
}
231+
206232
if (match == 1) {
207233
DonationPaymentMethod ret = new DonationPaymentMethod();
208234
ret.setActualInstance(deserialized);
@@ -254,12 +280,18 @@ public DonationPaymentMethod(PayWithGoogleDonations o) {
254280
setActualInstance(o);
255281
}
256282

283+
public DonationPaymentMethod(SepaDirectDebitDonations o) {
284+
super("oneOf", Boolean.FALSE);
285+
setActualInstance(o);
286+
}
287+
257288
static {
258289
schemas.put("ApplePayDonations", new GenericType<ApplePayDonations>() {});
259290
schemas.put("CardDonations", new GenericType<CardDonations>() {});
260291
schemas.put("GooglePayDonations", new GenericType<GooglePayDonations>() {});
261292
schemas.put("IdealDonations", new GenericType<IdealDonations>() {});
262293
schemas.put("PayWithGoogleDonations", new GenericType<PayWithGoogleDonations>() {});
294+
schemas.put("SepaDirectDebitDonations", new GenericType<SepaDirectDebitDonations>() {});
263295
JSON.registerDescendants(DonationPaymentMethod.class, Collections.unmodifiableMap(schemas));
264296
// Initialize and register the discriminator mappings.
265297
Map<String, Class<?>> mappings = new HashMap<>();
@@ -270,11 +302,13 @@ public DonationPaymentMethod(PayWithGoogleDonations o) {
270302
mappings.put("networkToken", CardDonations.class);
271303
mappings.put("paywithgoogle", PayWithGoogleDonations.class);
272304
mappings.put("scheme", CardDonations.class);
305+
mappings.put("sepadirectdebit", SepaDirectDebitDonations.class);
273306
mappings.put("ApplePayDonations", ApplePayDonations.class);
274307
mappings.put("CardDonations", CardDonations.class);
275308
mappings.put("GooglePayDonations", GooglePayDonations.class);
276309
mappings.put("IdealDonations", IdealDonations.class);
277310
mappings.put("PayWithGoogleDonations", PayWithGoogleDonations.class);
311+
mappings.put("SepaDirectDebitDonations", SepaDirectDebitDonations.class);
278312
mappings.put("DonationPaymentMethod", DonationPaymentMethod.class);
279313
JSON.registerDiscriminator(DonationPaymentMethod.class, "type", mappings);
280314
}
@@ -287,7 +321,7 @@ public Map<String, GenericType<?>> getSchemas() {
287321
/**
288322
* Set the instance that matches the oneOf child schema, check the instance parameter is valid
289323
* against the oneOf child schemas: ApplePayDonations, CardDonations, GooglePayDonations,
290-
* IdealDonations, PayWithGoogleDonations
324+
* IdealDonations, PayWithGoogleDonations, SepaDirectDebitDonations
291325
*
292326
* <p>It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a
293327
* composed schema (allOf, anyOf, oneOf).
@@ -319,16 +353,21 @@ public void setActualInstance(Object instance) {
319353
return;
320354
}
321355

356+
if (JSON.isInstanceOf(SepaDirectDebitDonations.class, instance, new HashSet<>())) {
357+
super.setActualInstance(instance);
358+
return;
359+
}
360+
322361
throw new RuntimeException(
323-
"Invalid instance type. Must be ApplePayDonations, CardDonations, GooglePayDonations, IdealDonations, PayWithGoogleDonations");
362+
"Invalid instance type. Must be ApplePayDonations, CardDonations, GooglePayDonations, IdealDonations, PayWithGoogleDonations, SepaDirectDebitDonations");
324363
}
325364

326365
/**
327366
* Get the actual instance, which can be the following: ApplePayDonations, CardDonations,
328-
* GooglePayDonations, IdealDonations, PayWithGoogleDonations
367+
* GooglePayDonations, IdealDonations, PayWithGoogleDonations, SepaDirectDebitDonations
329368
*
330369
* @return The actual instance (ApplePayDonations, CardDonations, GooglePayDonations,
331-
* IdealDonations, PayWithGoogleDonations)
370+
* IdealDonations, PayWithGoogleDonations, SepaDirectDebitDonations)
332371
*/
333372
@Override
334373
public Object getActualInstance() {
@@ -390,6 +429,17 @@ public PayWithGoogleDonations getPayWithGoogleDonations() throws ClassCastExcept
390429
return (PayWithGoogleDonations) super.getActualInstance();
391430
}
392431

432+
/**
433+
* Get the actual instance of `SepaDirectDebitDonations`. If the actual instance is not
434+
* `SepaDirectDebitDonations`, the ClassCastException will be thrown.
435+
*
436+
* @return The actual instance of `SepaDirectDebitDonations`
437+
* @throws ClassCastException if the instance is not `SepaDirectDebitDonations`
438+
*/
439+
public SepaDirectDebitDonations getSepaDirectDebitDonations() throws ClassCastException {
440+
return (SepaDirectDebitDonations) super.getActualInstance();
441+
}
442+
393443
/**
394444
* Create an instance of DonationPaymentMethod given an JSON string
395445
*

src/main/java/com/adyen/model/checkout/PaymentDetails.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ public enum TypeEnum {
156156

157157
OMANNET(String.valueOf("omannet")),
158158

159-
GOPAY_WALLET(String.valueOf("gopay_wallet")),
160-
161159
KCP_NAVERPAY(String.valueOf("kcp_naverpay")),
162160

163161
FAWRY(String.valueOf("fawry")),

0 commit comments

Comments
 (0)