Skip to content

Recurring API: Generate models#1219

Merged
gcatanese merged 1 commit intomainfrom
generate-recurring-api-jan-2026
Jan 6, 2026
Merged

Recurring API: Generate models#1219
gcatanese merged 1 commit intomainfrom
generate-recurring-api-jan-2026

Conversation

@gcatanese
Copy link
Contributor

This pull request updates several model classes to improve documentation clarity and support new features in the Adyen payout integration. The most significant changes include adding new contract types for recurring payments, clarifying field requirements for 3D Secure 2 transactions, and improving the descriptions for amount and fraud risk level fields.

Recurring API

  • Added new contract types (EXTERNAL and ONECLICK,RECURRING) to the ContractEnum in Recurring.cs to support additional recurring payment scenarios, and updated related documentation accordingly.
  • Added sepadirectdebitSepadirectdebitDueDate attribute to ResponseAdditionalDataSepa
  • Added ResponseAdditionalDataSwish class

@gcatanese gcatanese requested review from a team as code owners January 6, 2026 12:08
@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 updates several Adyen Payout API model classes to improve documentation clarity and support new features. The changes aim to provide more precise guidance for developers integrating with the API, particularly for recurring payments and 3D Secure 2 transactions, while also expanding support for specific payment methods like SEPA Direct Debit and Swish. This ensures the API models are more robust and easier to use.

Highlights

  • Documentation Clarity: Enhanced documentation across several model classes to provide clearer descriptions for parameters and properties, improving developer understanding.
  • New Recurring Contract Types: Introduced new contract types, 'EXTERNAL' and 'ONECLICK,RECURRING', to the Recurring model, expanding the supported scenarios for recurring payments.
  • 3D Secure 2 Field Requirements: Clarified the requirements for shopperEmail and telephoneNumber in PayoutRequest specifically for 3D Secure 2 transactions, including phone number formatting guidelines.
  • SEPA Direct Debit Enhancements: Added the sepadirectdebitSepadirectdebitDueDate attribute to ResponseAdditionalDataSepa, providing more detail for SEPA direct debit responses.
  • New Swish Payment Model: A new model, ResponseAdditionalDataSwish, has been added to handle additional data specific to Swish payments.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 updates several model classes, primarily improving documentation and adding new features. The changes in Amount.cs, PayoutRequest.cs, and ResponseAdditionalDataCommon.cs are good documentation improvements. The additions to Recurring.cs and the new ResponseAdditionalDataSwish.cs class also look fine. However, there is a critical issue in ResponseAdditionalDataSepa.cs where a new property has a duplicated prefix in its name and its DataMember attribute, which will likely cause serialization issues and makes the code harder to use. I've left specific comments with suggestions to fix this.

Comment on lines +64 to +69
/// <summary>
/// The date that the the shopper&#39;s bank account is charged.
/// </summary>
/// <value>The date that the the shopper&#39;s bank account is charged.</value>
[DataMember(Name = "sepadirectdebit.sepadirectdebit.dueDate", EmitDefaultValue = false)]
public string SepadirectdebitSepadirectdebitDueDate { get; set; }

Choose a reason for hiding this comment

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

critical

The property name SepadirectdebitSepadirectdebitDueDate and its DataMember name sepadirectdebit.sepadirectdebit.dueDate appear to have a redundant sepadirectdebit prefix. This makes the property name unnecessarily long and hard to use, and the DataMember name is likely incorrect for JSON serialization.

It should probably be SepadirectdebitDueDate with a DataMember name of sepadirectdebit.dueDate to be consistent with other properties in this class like SepadirectdebitDateOfSignature.

Please apply this correction here and in all other places where this property is used throughout the class (constructor, ToString(), Equals(), and GetHashCode()). I'll add suggestions on the other locations.

        /// <summary>
        /// The date that the the shopper's bank account is charged.
        /// </summary>
        /// <value>The date that the the shopper's bank account is charged.</value>
        [DataMember(Name = "sepadirectdebit.dueDate", EmitDefaultValue = false)]
        public string SepadirectdebitDueDate { get; set; }

sb.Append("class ResponseAdditionalDataSepa {\n");
sb.Append(" SepadirectdebitDateOfSignature: ").Append(SepadirectdebitDateOfSignature).Append("\n");
sb.Append(" SepadirectdebitMandateId: ").Append(SepadirectdebitMandateId).Append("\n");
sb.Append(" SepadirectdebitSepadirectdebitDueDate: ").Append(SepadirectdebitSepadirectdebitDueDate).Append("\n");

Choose a reason for hiding this comment

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

critical

The ToString() method needs to be updated with the corrected property name SepadirectdebitDueDate.

            sb.Append("  SepadirectdebitDueDate: ").Append(SepadirectdebitDueDate).Append("\n");

Comment on lines +135 to +139
(
this.SepadirectdebitSepadirectdebitDueDate == input.SepadirectdebitSepadirectdebitDueDate ||
(this.SepadirectdebitSepadirectdebitDueDate != null &&
this.SepadirectdebitSepadirectdebitDueDate.Equals(input.SepadirectdebitSepadirectdebitDueDate))
) &&

Choose a reason for hiding this comment

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

critical

The Equals() method needs to be updated with the corrected property name SepadirectdebitDueDate.

                (
                    this.SepadirectdebitDueDate == input.SepadirectdebitDueDate ||
                    (this.SepadirectdebitDueDate != null &&
                    this.SepadirectdebitDueDate.Equals(input.SepadirectdebitDueDate))
                ) && 

Comment on lines +164 to +167
if (this.SepadirectdebitSepadirectdebitDueDate != null)
{
hashCode = (hashCode * 59) + this.SepadirectdebitSepadirectdebitDueDate.GetHashCode();
}

Choose a reason for hiding this comment

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

critical

The GetHashCode() method needs to be updated with the corrected property name SepadirectdebitDueDate.

                if (this.SepadirectdebitDueDate != null)
                {
                    hashCode = (hashCode * 59) + this.SepadirectdebitDueDate.GetHashCode();
                }

Copy link
Contributor

@galesky-a galesky-a left a comment

Choose a reason for hiding this comment

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

The SepadirectdebitDueDate object is very verbose but it does comply with the rest of the fields on this class (and the rest of the SDK)

@gcatanese
Copy link
Contributor Author

The SepadirectdebitDueDate object is very verbose but it does comply with the rest of the fields on this class (and the rest of the SDK)

Yes, I really hope the next release (with the OpenAPI Generator upgrade) will address all of those issues

@gcatanese gcatanese merged commit 73803a9 into main Jan 6, 2026
4 checks passed
@gcatanese gcatanese deleted the generate-recurring-api-jan-2026 branch January 6, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants