Skip to content

[checkout] Code generation: update services and models#2013

Merged
poojah-adyen merged 1 commit into
mainfrom
sdk-automation/checkout
Jul 22, 2026
Merged

[checkout] Code generation: update services and models#2013
poojah-adyen merged 1 commit into
mainfrom
sdk-automation/checkout

Conversation

@AdyenAutomationBot

@AdyenAutomationBot AdyenAutomationBot commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

This PR contains the automated changes for the checkout service.

The commit history of this PR reflects the adyen-openapi commits that have been applied.

Breaking Changes 🛠️

PaymentDetails

  • Removed the paybright value from the type (TypeEnum) enum.

Checkout error model

  • Removed models DefaultErrorResponseEntity and InvalidField, replaced by the new CheckoutErrorResponseEntity.

New Features 💎

New payment methods

  • New models AuPayDetails (aupay) and DBaraiDetails (dbarai), registered as oneOf variants and discriminator mappings in CheckoutPaymentMethod.

Enhanced Scheme Data

  • New models CarRental, Healthcare, Lodging, TemporaryServices, Folio, Room, PickupInfo, ReturnInfo, RentalSurcharges.
  • EnhancedSchemeData — new carRental, healthcare, lodging, and temporaryServices fields.
  • CardBrandDetails — new healthcare field.

Third-party token redundancy

  • New model ThirdPartyTokenRedundancyInfo.
  • Added thirdPartyTokenRedundancyInfo field to PaymentRequest, CreateCheckoutSessionRequest, and CreateCheckoutSessionResponse.

Order tracking / shipping on line items

  • LineItem — new shippingCompany, shippingMethod, trackingNumber, trackingUri, returnShippingCompany, returnTrackingNumber, and returnTrackingUri fields.

PayPal update order

  • PaypalUpdateOrderRequest — new deliveryAddress, discountAmount, and shippingAmount fields.

Other new fields

  • CreateCheckoutSessionRequest — new shopperConversionId field.
  • StoredPaymentMethod — new externalToken field.
  • KlarnaDetails and RivertyDetails — new merchantData field.

Other Changes

  • Added discriminator (type) mapping registration for the payment-method and donation subtypes in CheckoutPaymentMethod and DonationPaymentMethod (template-level, no spec change).
  • Documentation-only reflows on Airline, Leg, Passenger, ItemDetailLine, LevelTwoThree, Ticket, Agency, TravelAgency ,Destination (no structural change).
  • • sdk-generation-log/checkout.json — generation metadata bump.

@AdyenAutomationBot
AdyenAutomationBot requested a review from a team as a code owner July 21, 2026 09:54

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Adyen Checkout API Java SDK models to version 72, introducing several new payment and service details models (such as AuPayDetails, CarRental, DBaraiDetails, Healthcare, and TemporaryServices) while removing obsolete error entities. It also updates existing models with new fields, Javadoc documentation, and discriminator mappings. Feedback on the changes highlights a type mismatch in TemporaryServices.java where hourRate is defined as an Integer despite a documented maximum value that requires a Long. Additionally, in CheckoutPaymentMethod.java, the use of tree.findValue('type') for deserializing AuPayDetails and DBaraiDetails should be replaced with tree.get('type') to avoid false positives from recursive JSON tree searches.

Comment on lines +46 to +47
public static final String JSON_PROPERTY_HOUR_RATE = "hourRate";
private Integer hourRate;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

There is a type mismatch between the Javadoc description (which states a maximum value of 10000000000) and the Java field type Integer (which has a maximum value of 2147483647). If a value exceeding Integer.MAX_VALUE is received, it will cause deserialization or overflow issues.

Although this file is auto-generated, the OpenAPI specification should be updated to define this field as a 64-bit integer (int64), which will generate a Long in Java. Please also update the corresponding builder, getter, and setter methods to use Long instead of Integer.

Suggested change
public static final String JSON_PROPERTY_HOUR_RATE = "hourRate";
private Integer hourRate;
public static final String JSON_PROPERTY_HOUR_RATE = "hourRate";
private Long hourRate;

Comment on lines +289 to +294
boolean typeMatch = false;
if (tree.findValue("type") != null) {
typeMatch =
Arrays.stream(AuPayDetails.TypeEnum.values())
.anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using tree.findValue("type") recursively searches the entire JSON tree for any property named "type". If the root object does not have a "type" property but a nested object does, this can lead to a false positive match and incorrect deserialization. Using tree.get("type") is safer as it only checks the direct properties of the root object.

Suggested change
boolean typeMatch = false;
if (tree.findValue("type") != null) {
typeMatch =
Arrays.stream(AuPayDetails.TypeEnum.values())
.anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
}
boolean typeMatch = false;
if (tree.get("type") != null) {
typeMatch =
Arrays.stream(AuPayDetails.TypeEnum.values())
.anyMatch((t) -> t.getValue().equals(tree.get("type").asText()));
}

Comment on lines +471 to +476
boolean typeMatch = false;
if (tree.findValue("type") != null) {
typeMatch =
Arrays.stream(DBaraiDetails.TypeEnum.values())
.anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using tree.findValue("type") recursively searches the entire JSON tree for any property named "type". If the root object does not have a "type" property but a nested object does, this can lead to a false positive match and incorrect deserialization. Using tree.get("type") is safer as it only checks the direct properties of the root object.

Suggested change
boolean typeMatch = false;
if (tree.findValue("type") != null) {
typeMatch =
Arrays.stream(DBaraiDetails.TypeEnum.values())
.anyMatch((t) -> t.getValue().equals(tree.findValue("type").asText()));
}
boolean typeMatch = false;
if (tree.get("type") != null) {
typeMatch =
Arrays.stream(DBaraiDetails.TypeEnum.values())
.anyMatch((t) -> t.getValue().equals(tree.get("type").asText()));
}

BANKTRANSFER_IBAN(String.valueOf("bankTransfer_IBAN")),

PAYBRIGHT(String.valueOf("paybright")),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking change. Verified that paybright has been deprecated for a while


/** Standardized error response following RFC-7807 format */
@JsonPropertyOrder({
DefaultErrorResponseEntity.JSON_PROPERTY_DETAIL,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking change, verified the error type has been updated to CheckoutErrorResponseEntity

@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/checkout branch from 42eaa0f to aaaec73 Compare July 22, 2026 11:25
@sonarqubecloud

Copy link
Copy Markdown

InvalidField.JSON_PROPERTY_NAME,
InvalidField.JSON_PROPERTY_VALUE
})
public class InvalidField {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaking change, verified the error type has been updated to CheckoutErrorResponseEntity

@poojah-adyen
poojah-adyen enabled auto-merge July 22, 2026 12:34

@poojah-adyen poojah-adyen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@poojah-adyen
poojah-adyen added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit 7f01d8c Jul 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants