Conversation
Summary of ChangesHello @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
🧠 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 AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
| /// <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.sepadirectdebit.dueDate", EmitDefaultValue = false)] | ||
| public string SepadirectdebitSepadirectdebitDueDate { get; set; } |
There was a problem hiding this comment.
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"); |
| ( | ||
| this.SepadirectdebitSepadirectdebitDueDate == input.SepadirectdebitSepadirectdebitDueDate || | ||
| (this.SepadirectdebitSepadirectdebitDueDate != null && | ||
| this.SepadirectdebitSepadirectdebitDueDate.Equals(input.SepadirectdebitSepadirectdebitDueDate)) | ||
| ) && |
There was a problem hiding this comment.
| if (this.SepadirectdebitSepadirectdebitDueDate != null) | ||
| { | ||
| hashCode = (hashCode * 59) + this.SepadirectdebitSepadirectdebitDueDate.GetHashCode(); | ||
| } |
galesky-a
left a comment
There was a problem hiding this comment.
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 |
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
EXTERNALandONECLICK,RECURRING) to theContractEnuminRecurring.csto support additional recurring payment scenarios, and updated related documentation accordingly.sepadirectdebitSepadirectdebitDueDateattribute toResponseAdditionalDataSepaResponseAdditionalDataSwishclass