Skip to content

Conversation

@gcatanese
Copy link
Contributor

Generate Checkout models

@gcatanese gcatanese requested a review from a team as a code owner July 24, 2025 10:33
Copy link

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

Choose a reason for hiding this comment

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

Summary of Changes

Hello @gcatanese, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on generating and updating Checkout API models. The most significant change is the introduction and integration of the EnhancedSchemeData model into several request types. Additionally, new payment method types and properties have been added, and existing API documentation comments have been refined for improved clarity and accuracy, especially regarding 3D Secure 2 authentication flows and data requirements.

Highlights

  • New Model Integration: EnhancedSchemeData: The EnhancedSchemeData model has been introduced and integrated into several key Checkout request models, including PaymentAmountUpdateRequest, PaymentCancelRequest, PaymentRefundRequest, PaymentReversalRequest, and StandalonePaymentCancelRequest. This allows for the inclusion of enhanced scheme-specific data in these requests.
  • New Payment Method Types: Two new payment method types, PAYME and PAYME_POS, have been added to the PaymentDetails model, expanding the supported payment options.
  • New Payment Method Properties: The PaymentMethod model now includes a promoted boolean property, and the RivertyDetails model includes a subtype string property, providing more granular control and information for these payment entities.
  • API Documentation Enhancements: Numerous parameter descriptions across various Checkout models have been updated for clarity and accuracy, particularly concerning 3D Secure 2 requirements (e.g., shopperEmail, shopperIP, telephoneNumber, authenticationOnly, origin, dataOnly, nativeThreeDS) and returnUrl length recommendations. A typo from 'authorisation' to 'authorization' was also corrected.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

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

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 introduces the EnhancedSchemeData model and updates various request models to include it. It also contains several updates to PHPDoc comments for clarification and consistency.

My review focuses on improving the code's maintainability and readability by addressing formatting inconsistencies and improving documentation clarity in the auto-generated code.

* Sets shopperEmail
*
* @param string|null $shopperEmail The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations.
* @param string|null $shopperEmail The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`.

Choose a reason for hiding this comment

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

medium

The documentation lacks clarity regarding the necessity of providing shopperEmail when telephoneNumber is absent. Consider rephrasing to emphasize this requirement more explicitly.

     * @param string|null $shopperEmail The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. Providing this value is strongly recommended.

* Sets shopperIP
*
* @param string|null $shopperIP The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).
* @param string|null $shopperIP The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).

Choose a reason for hiding this comment

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

medium

There's a minor formatting issue in the PHPDoc. A space is missing after the closing parenthesis, which affects readability. Please add a space between checks). and > Required.

     * @param string|null $shopperIP The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).

* Sets threeDSAuthenticationOnly
*
* @param bool|null $threeDSAuthenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation.
* @param bool|null $threeDSAuthenticationOnly Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**.

Choose a reason for hiding this comment

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

medium

There's a minor formatting issue in the PHPDoc. A space is missing after the period, which affects readability. Please add a space between authorization. and Default:.

     * @param bool|null $threeDSAuthenticationOnly Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization. Default: **false**.

* Sets shopperIP
*
* @param string|null $shopperIP The shopper's IP address. In general, we recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > For 3D Secure 2 transactions, schemes require `shopperIP` for all browser-based implementations. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).
* @param string|null $shopperIP The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).

Choose a reason for hiding this comment

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

medium

There's a minor formatting issue in the PHPDoc. A space is missing after the closing parenthesis, which affects readability. Please add a space between checks). and > Required.

     * @param string|null $shopperIP The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).

* Sets threeDSAuthenticationOnly
*
* @param bool|null $threeDSAuthenticationOnly If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation.
* @param bool|null $threeDSAuthenticationOnly Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**.

Choose a reason for hiding this comment

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

medium

There's a minor formatting issue in the PHPDoc. A space is missing after the period, which affects readability. Please add a space between authorization. and Default:.

     * @param bool|null $threeDSAuthenticationOnly Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization. Default: **false**.

return $this->container['returnUrl'];
}

/**

Choose a reason for hiding this comment

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

medium

There's a minor formatting issue in the PHPDoc. A space is missing after the closing parenthesis, which affects readability. Please add a space between checks). and > Required.

     * @param string|null $shopperIP The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks). > Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).

return $this->container['threeDSAuthenticationOnly'];
}

/**

Choose a reason for hiding this comment

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

medium

There's a minor formatting issue in the PHPDoc. A space is missing after the period, which affects readability. Please add a space between authorization. and Default:.

     * @param bool|null $threeDSAuthenticationOnly Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorisation. Default: **false**.

/**
* Sets enhancedSchemeData
*
* @param \Adyen\Model\Checkout\EnhancedSchemeData|null $enhancedSchemeData enhancedSchemeData

Choose a reason for hiding this comment

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

medium

The PHPDoc for this parameter is not very descriptive. To improve maintainability, please provide a more detailed explanation of what this parameter is for.

     * @param \Adyen\Model\Checkout\EnhancedSchemeData|null $enhancedSchemeData Contains information for enhanced scheme data, such as airline data.

/**
* Sets enhancedSchemeData
*
* @param \Adyen\Model\Checkout\EnhancedSchemeData|null $enhancedSchemeData enhancedSchemeData

Choose a reason for hiding this comment

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

medium

The PHPDoc for this parameter is not very descriptive. To improve maintainability, please provide a more detailed explanation of what this parameter is for.

     * @param \Adyen\Model\Checkout\EnhancedSchemeData|null $enhancedSchemeData Contains information for enhanced scheme data, such as airline data.

* Sets addrMatch
*
* @param string|null $addrMatch Indicates whether the Cardholder Shipping Address and Cardholder Billing Address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address.
* @param string|null $addrMatch Indicates whether the cardholder shipping Address and cardholder billing address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address.

Choose a reason for hiding this comment

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

medium

There's a typo in the PHPDoc. shipping Address should be shipping address for consistency with the rest of the sentence.

     * @param string|null $addrMatch Indicates whether the cardholder shipping address and cardholder billing address are the same. Allowed values: * **Y** — Shipping address matches Billing Address. * **N** — Shipping Address does not match Billing Address.

@gcatanese gcatanese merged commit ecfe4ab into main Jul 24, 2025
7 checks passed
@gcatanese gcatanese deleted the update-checkout-models branch July 24, 2025 10:38
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants