Skip to content

Conversation

@gcatanese
Copy link
Contributor

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: remove capability
  • SourceOfFunds: remove acquiringBusinessLineId
  • SourceOfFunds: make adyenProcessedFunds required

Other Changes 💎

  • Individual: add support
  • Organization: add support , doingBusinessAsAbsent, registrationNumberAbsent
  • SoleProprietorship: add doingBusinessAsAbsent, registrationNumberAbsent
  • Trust: add doingBusinessAsAbsent
  • UnincorporatedPartnership: add doingBusinessAsAbsent
  • ServiceEnum: add new value"issuing"
  • SourceOfFunds: add several new attributes (amount, assetMonthsHeld, etc..)
  • SourceOfFunds: add array of Financier
  • SourceOfFunds. TypeEnum: add several new values ("employment", "donations", etc..)
  • TaxInformation: add numberAbsent
  • Document: add proofOfDirector

@gcatanese gcatanese requested review from a team as code owners October 16, 2025 08:18
@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 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 Financier and Support to accommodate the expanded data requirements.

Highlights

  • API Version Upgrade: The Legal Entity Management (LEM) API has been upgraded from v3 to v4, introducing several new features and breaking changes across various models and services.
  • Breaking Changes: The capability field has been removed from BusinessLine and BusinessLineInfo models. The acquiringBusinessLineId field has been removed from the SourceOfFunds model, and adyenProcessedFunds in SourceOfFunds is now a required boolean.
  • New Fields for Legal Entities: Individual now includes a support field. Organization has new fields such as doingBusinessAsAbsent, registrationNumberAbsent, economicSector, globalLegalEntityIdentifier, institutionalSector, legalForm, dateOfInitiationOfLegalProceeding, statusOfLegalProceeding, and support. SoleProprietorship, Trust, and UnincorporatedPartnership models now include doingBusinessAsAbsent, with SoleProprietorship also gaining registrationNumberAbsent.
  • Expanded Source of Funds: The SourceOfFunds model has been significantly expanded with new attributes like amount, assetMonthsHeld, cryptocurrencyExchange, dateOfFundsReceived, dateOfSourceEvent, originatorLegalEntityId, purpose, relationship, website, and an array of Financier objects. The TypeEnum for Source of Funds now includes many new values (e.g., "employment", "donations", "inheritance").
  • Document and Tax Information Enhancements: The Document model now supports proofOfDirector as a document type. TaxInformation includes a new numberAbsent field.
  • New Models Introduced: New Financier and Support models have been added to accommodate the expanded data requirements for SourceOfFunds and legal entity types, respectively.
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 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.

Comment on lines +477 to +482
public function setAssetMonthsHeld($assetMonthsHeld)
{
$this->container['assetMonthsHeld'] = $assetMonthsHeld;

return $this;
}

Choose a reason for hiding this comment

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

medium

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;
    }

Copy link
Contributor Author

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).

@sonarqubecloud
Copy link

@gcatanese gcatanese merged commit 9f871f9 into main Oct 16, 2025
9 checks passed
@gcatanese gcatanese deleted the lem-v4 branch October 16, 2025 12:53
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.

3 participants