Skip to content

Conversation

@gcatanese
Copy link
Contributor

Checkout checkout.recurring_api and Recurring recurring.recurring_api cannot be loaded at the same time, creating an error (conflict) during the initialization.

A similar issue #326 was addressed for Classic Payments.

Solution
Introduce a prefix Legacy for Recurring, to generate the class as LegacyRecurringApi, considering that Recurring is a legacy API for managing tokens.

Note: renaming Legacy services is necessary to avoid changing/affecting Checkout. This will be highlighted in the Release Notes.

Fix #330

@gcatanese gcatanese requested a review from a team as a code owner December 9, 2025 13:04
@gcatanese gcatanese added the Fix label Dec 9, 2025
@gcatanese gcatanese requested a review from a team as a code owner December 9, 2025 13:04
@gemini-code-assist
Copy link

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 resolves a critical class name conflict that previously hindered the concurrent use of checkout.recurring_api and recurring.recurring_api. By renaming the RecurringApi class in the recurring service to LegacyRecurringApi, the change ensures proper distinction and compatibility between different Adyen API versions, specifically for the legacy Recurring API. This update improves the library's stability and includes new tests to validate service identification and URL construction.

Highlights

  • Conflict Resolution: Addresses a class name conflict that prevented the simultaneous loading of checkout.recurring_api and recurring.recurring_api within the library.
  • Class Renaming: The RecurringApi class within the recurring service has been renamed to LegacyRecurringApi to explicitly differentiate it and avoid naming collisions, aligning with its status as a legacy API.
  • Enhanced Test Coverage: New RSpec tests have been added to verify the correct service identification for various Adyen APIs (Checkout, Recurring, Payment, Payout) and to confirm accurate URL generation for the Recurring API in the test environment.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

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 addresses a naming conflict by renaming the legacy RecurringApi to LegacyRecurringApi. The changes in the library code are correct and achieve the stated goal. The new tests in spec/client_spec.rb are a valuable addition for verifying the service resolution logic. My feedback focuses on improving the maintainability of these new tests by reducing code duplication, which will make them easier to manage in the future.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 9, 2025

@gcatanese gcatanese requested a review from galesky-a December 9, 2025 13:12
@gcatanese
Copy link
Contributor Author

@galesky-a I have fixed this using the same approach applied to Classic Payment. I have chosen the Legacy prefix as the Recurring API is considered a legacy API.
I will create the PR for the code generation (adding the prefix) later, once we confirm this is a valid approach.

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.

[Bug]: Incorrect Path for Checkout Recurring Endpoint

2 participants