-
Notifications
You must be signed in to change notification settings - Fork 114
LEM v4 #829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 the Legal Entity Management (LEM) services and models to align with version 4 of the Adyen API. This is a significant upgrade that introduces several new functionalities and modifies existing structures. The changes aim to provide more granular control and detailed information for legal entities, their business lines, and sources of funds, while also introducing some breaking changes that require attention. The update also includes new models for Highlights
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
|
@gemini-code-assist
gemini-code-assist
bot
left a comment
There was a problem hiding this 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 the Legal Entity Management API models to version 4. The changes are extensive and mostly involve auto-generated model updates to align with the new API specification. While the majority of the changes appear correct and consistent with the v4 API, I've identified a couple of issues. Specifically, the SoleProprietorship model is missing a property mentioned in the pull request description, and the SourceOfFunds model has an incorrect setter implementation for a nullable property. Addressing these points will improve the correctness and consistency of the generated code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setter for the nullable property assetMonthsHeld is not implemented correctly. It should handle cases where null is passed by updating the openAPINullablesSetToNull array. This is the standard pattern for nullable properties in this codebase (e.g., setDoingBusinessAsAbsent in Organization.php). Without this, setting the property to null may not be serialized correctly.
public function setAssetMonthsHeld($assetMonthsHeld) { if (is_null($assetMonthsHeld)) { array_push($this->openAPINullablesSetToNull, 'assetMonthsHeld'); } else { $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); $index = array_search('assetMonthsHeld', $nullablesSetToNull); if ($index !== false) { unset($nullablesSetToNull[$index]); $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } $this->container['assetMonthsHeld'] = $assetMonthsHeld; return $this; }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will create a ticket for the backlog (we should tackle those during the OpenAPI Generator upgrade).
09a1285 to
a40526d
Compare
Quality Gate Passed Quality Gate passed
Issues
5 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
57.1% Duplication on New Code
In this branch LEM services and models have been updated to support LEM v4.
See our documentation:
Note: generation of comments (attribute description) needs to be improved, to do in a different ticket.
Changes
Breaking Changes 🛠
BusinessLine: removecapabilitySourceOfFunds: removeacquiringBusinessLineIdSourceOfFunds: makeadyenProcessedFundsrequiredOther Changes 💎
Individual: addsupportOrganization: addsupport,doingBusinessAsAbsent,registrationNumberAbsentSoleProprietorship: adddoingBusinessAsAbsent,registrationNumberAbsentTrust: adddoingBusinessAsAbsentUnincorporatedPartnership: adddoingBusinessAsAbsentServiceEnum: add new value"issuing"SourceOfFunds: add several new attributes (amount,assetMonthsHeld, etc..)SourceOfFunds: add array ofFinancierSourceOfFunds. TypeEnum: add several new values ("employment","donations", etc..)TaxInformation: addnumberAbsentDocument: addproofOfDirector