Skip to content

[transfers] Code generation: update services and models - #913

Open
AdyenAutomationBot wants to merge 1 commit into
mainfrom
sdk-automation/transfers
Open

[transfers] Code generation: update services and models#913
AdyenAutomationBot wants to merge 1 commit into
mainfrom
sdk-automation/transfers

Conversation

@AdyenAutomationBot

Copy link
Copy Markdown
Collaborator

This PR contains the automated changes for the transfers service.

The commit history of this PR reflects the adyen-openapi commits that have been applied.

@AdyenAutomationBot
AdyenAutomationBot requested a review from a team as a code owner July 1, 2026 15:25

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 PHP Transfers SDK by introducing new models and APIs related to cashout operations, default error responses, and interchange data, while renaming the existing Capital API to a deprecated version. It also adds discriminator initialization logic across several models. The review feedback highlights two main issues: first, unconditionally overwriting the type discriminator in constructors (such as in BankAccountV3AccountIdentification, TransferCategoryData, TransferDataTracking, TransferEventEventsDataInner, and TransferEventTrackingData) discards custom values passed during instantiation; second, the validation logic in BankAccountV3AccountIdentification incorrectly requires all polymorphic fields to be non-null, which will cause validation failures for valid single bank account types.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +339 to +340
// Initialize discriminator property with the model name.
$this->container['type'] = static::$openAPIModelName;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Unconditionally overwriting $this->container['type'] with static::$openAPIModelName at the end of the constructor discards any custom type value passed via the $data array (e.g., during manual instantiation). It should only initialize the discriminator if it is not already set.

        // Initialize discriminator property with the model name if not already set.
        if (empty($this->container['type'])) {
            $this->container['type'] = static::$openAPIModelName;
        }

Comment on lines +332 to +333
// Initialize discriminator property with the model name.
$this->container['type'] = static::$openAPIModelName;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Unconditionally overwriting $this->container['type'] with static::$openAPIModelName at the end of the constructor discards any custom type value passed via the $data array (e.g., during manual instantiation). It should only initialize the discriminator if it is not already set.

        // Initialize discriminator property with the model name if not already set.
        if (empty($this->container['type'])) {
            $this->container['type'] = static::$openAPIModelName;
        }

Comment on lines +255 to +256
// Initialize discriminator property with the model name.
$this->container['type'] = static::$openAPIModelName;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Unconditionally overwriting $this->container['type'] with static::$openAPIModelName at the end of the constructor discards any custom type value passed via the $data array (e.g., during manual instantiation). It should only initialize the discriminator if it is not already set.

        // Initialize discriminator property with the model name if not already set.
        if (empty($this->container['type'])) {
            $this->container['type'] = static::$openAPIModelName;
        }

Comment on lines +255 to +256
// Initialize discriminator property with the model name.
$this->container['type'] = static::$openAPIModelName;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Unconditionally overwriting $this->container['type'] with static::$openAPIModelName at the end of the constructor discards any custom type value passed via the $data array (e.g., during manual instantiation). It should only initialize the discriminator if it is not already set.

        // Initialize discriminator property with the model name if not already set.
        if (empty($this->container['type'])) {
            $this->container['type'] = static::$openAPIModelName;
        }

Comment on lines +267 to +268
// Initialize discriminator property with the model name.
$this->container['type'] = static::$openAPIModelName;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Unconditionally overwriting $this->container['type'] with static::$openAPIModelName at the end of the constructor discards any custom type value passed via the $data array (e.g., during manual instantiation). It should only initialize the discriminator if it is not already set.

        // Initialize discriminator property with the model name if not already set.
        if (empty($this->container['type'])) {
            $this->container['type'] = static::$openAPIModelName;
        }

Comment on lines 393 to 404
if ($this->container['clearingCode'] === null) {
$invalidProperties[] = "'clearingCode' can't be null";
}
if ($this->container['iban'] === null) {
$invalidProperties[] = "'iban' can't be null";
}
if ($this->container['bic'] === null) {
$invalidProperties[] = "'bic' can't be null";
}
if ($this->container['iban'] === null) {
$invalidProperties[] = "'iban' can't be null";
}
if ($this->container['clearingNumber'] === null) {
$invalidProperties[] = "'clearingNumber' can't be null";
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Since BankAccountV3AccountIdentification is a polymorphic/union model representing different bank account types (such as IBAN, US local, UK local, etc.), requiring all fields (like clearingCode, bic, iban, clearingNumber, sortCode, routingNumber, etc.) to be non-null in listInvalidProperties() makes the validation fail for any valid single bank account type. These fields should be optional or conditionally validated based on the type discriminator.

@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch 5 times, most recently from 5c1357b to 02c5d9f Compare July 13, 2026 14:26
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch 7 times, most recently from df42f4b to 04ee774 Compare July 21, 2026 09:57
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch 4 times, most recently from 3896877 to 74e4566 Compare July 27, 2026 10:32
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch 3 times, most recently from b51b7bb to f404bf0 Compare August 4, 2026 17:18
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/transfers branch 3 times, most recently from c0cccd3 to a7a34cc Compare August 21, 2026 14:03
@ashwaniarya-adyen ashwaniarya-adyen added the breaking change Introduces a breaking API change (correlating with MAJOR in Semantic Versioning) label Aug 26, 2026
@ashwaniarya-adyen

ashwaniarya-adyen commented Aug 27, 2026

Copy link
Copy Markdown

Some issues in the PR -

Seems the changes here have Commit1, Commit2, Commit3 combined.
The issue originated here in PR1 which was merged and then reverted in PR2

@sonarqubecloud

sonarqubecloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces a breaking API change (correlating with MAJOR in Semantic Versioning)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants