Skip to content

Conversation

@Kwok-he-Chu
Copy link
Member

@Kwok-he-Chu Kwok-he-Chu commented Nov 18, 2025

PR-3 of #1204

Description

This PR moves the original TerminalApi classes to its own folder. This is needed as the TerminalApi models are not part of the Adyen OpenAPI Specifications. Ive moved this classes to its own folder in preparation for the upgrade of the OpenApiGenerator to v7.16.0 used in the Adyen sdk-automation to generate .NET models & services from the Adyen OpenAPI Specifications.

  • Moved all Terminal classes to new /TerminalAPI folder
  • Removed the old Models/Services and tests. This prepares the structure to be more in-line with the new library structure, grouping the APIs in one folder. Rather than having them separated across different folders.

The new library structure (with the exception of TerminalAPi) will now have a structure of:

(After)

  • /Adyen/ + {{ApiName}} + /Models
  • /Adyen/ + {{ApiName}} + /Services
    Example: /Adyen/Checkout/Models or /Adyen/BalancePlatform/Services

(Before)

  • /Adyen/Model + {{ApiName}}
  • /Adyen/Service + {{ApiName}}
    Example: Adyen/Model/Checkout

@Kwok-he-Chu Kwok-he-Chu requested review from a team as code owners November 18, 2025 16:32
@Kwok-he-Chu Kwok-he-Chu changed the base branch from main to v7-generator/2-add-mustache-templates November 18, 2025 16:34
@gemini-code-assist
Copy link

Summary of Changes

Hello @Kwok-he-Chu, 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 undertakes a significant internal restructuring and modernization of the Adyen .NET library. The primary goal is to prepare the codebase for an upcoming OpenApiGenerator upgrade by isolating TerminalApi components, which are not part of the standard OpenAPI specifications, into their own dedicated namespace. Simultaneously, the PR introduces a suite of modern .NET features for improved HTTP client management, robust API interaction, and streamlined configuration, enhancing the library's maintainability, performance, and future extensibility.

Highlights

  • Terminal API Refactoring: All classes related to the Terminal API (serialization, models, clients, constants, and HTTP client wrappers) have been moved into a dedicated Adyen/TerminalApi folder structure. This separation is crucial for the upcoming OpenApiGenerator upgrade, as Terminal API components are not part of the standard OpenAPI specifications.
  • Target Framework Consolidation: The project target frameworks have been updated and consolidated to net8.0 across the Adyen.IntegrationTest, Adyen.Test, and Adyen projects, streamlining the build process and leveraging the latest .NET features.
  • Enhanced HTTP Client Resilience: The library now integrates Polly for robust HTTP client resilience, including retry, timeout, and circuit breaker policies. This is coupled with updated Microsoft.Extensions.Http dependencies, significantly improving the reliability of API interactions.
  • Modern JSON Serialization: Custom System.Text.Json converters have been introduced for ByteArray, DateOnly, and DateTime types, indicating a strategic shift towards modern .NET JSON serialization for better performance and consistency.
  • Centralized Configuration and Utilities: New core components such as AdyenOptions for API configuration, TokenBase and TokenProvider for token management, ApiResponse for standardized response handling, HttpRequestMessageExtensions for user-agent headers, UrlBuilderExtensions for dynamic URL construction, and HmacValidatorUtility for webhook signature validation have been added. An AbstractService base class was also introduced for common service logic.
  • New Terminal API Models: Several new models have been added within the Adyen/TerminalApi/Models namespace, including ApplicationInfo, SaleToAcquirerData, Split, SplitItem, and SplitItemType, enhancing the functionality for payment splitting and application information within Terminal API requests.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/build-net6.0.yml
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 successfully refactors the project by moving Terminal API related classes into a dedicated folder, which improves the overall structure. My review includes suggestions to enhance code style, consistency, and readability. I've pointed out some incorrect Obsolete messages, a missing property in a ToString() method, and recommended using constants over magic strings. Additionally, a number of newly added files are missing a final newline character, which I've flagged for consistency.

@Kwok-he-Chu Kwok-he-Chu force-pushed the v7-generator/2-add-mustache-templates branch from 6d99b32 to 2e33dc4 Compare November 26, 2025 15:26
@Kwok-he-Chu Kwok-he-Chu force-pushed the v7-generator/3-move-terminal-api-classes-to-own-folder branch from 775c0e1 to e754d29 Compare November 26, 2025 15:27
Removed old /Adyen/Model using the previous models/services
Removed old /Adyen/Service using the previous models/services
Removed old /Adyen/Service.Test using the previous models/services
Removed old /IntegrationTests using the previous models/services
@Kwok-he-Chu Kwok-he-Chu changed the base branch from v7-generator/2-add-mustache-templates to v7-generator/development-branch November 26, 2025 15:51
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