Skip to content

[transfers] Code generation: update services and models#862

Merged
gcatanese merged 1 commit intomainfrom
sdk-automation/transfers
Jan 23, 2026
Merged

[transfers] Code generation: update services and models#862
gcatanese merged 1 commit intomainfrom
sdk-automation/transfers

Conversation

@AdyenAutomationBot
Copy link
Collaborator

@AdyenAutomationBot AdyenAutomationBot commented Jan 13, 2026

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.

Transfers API

  • Add attribute storedPaymentMethodId in BankAccountV3
  • Add enum value STATUS_ACCEPTED in ConfirmationTrackingData
  • Add attribute fundingInstrument in UltimatePartyIdentification
  • Add enum value PLATFORM_PAYMENT_TYPE_DCC_MARKUP in PlatformPayment
  • Add several enum values in TransferData, TransferDataCategoryData, TransferEvent

@AdyenAutomationBot AdyenAutomationBot requested review from a team as code owners January 13, 2026 14:59
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @AdyenAutomationBot, 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 introduces automated code updates for the transfers service, focusing on model enhancements and the addition of a new FundingInstrument model. These changes aim to improve the clarity, functionality, and tracking capabilities of the Transfers API.

Highlights

  • Code Generation Update: This PR includes automated code generation updates for the transfers service, incorporating changes from the adyen-openapi repository.
  • Model Enhancements: Several models have been updated with new properties and refined descriptions, improving the clarity and functionality of the Transfers API.
  • New Model Addition: A new FundingInstrument model has been added, providing more detailed information about the funding sources used in transfers.
  • Status Value Added: The ConfirmationTrackingData model now includes an accepted status, expanding the range of transfer statuses that can be tracked.

🧠 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
Contributor

@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 contains automated changes to update services and models for the transfers service. The changes primarily involve adding new properties, constants, and updating PHPDoc comments. My review focuses on improving the quality of the generated code. I've identified several inconsistencies in property nullability definitions versus their usage, which could lead to runtime errors. I've also suggested adding PHP type hints to new methods for better type safety and code clarity, improving validation logic to be more robust, and fixing minor formatting issues in documentation.

Comment on lines +412 to +420
if (!in_array($sourceOfFunds, $allowedValues, true)) {
error_log(
sprintf(
"sourceOfFunds: unexpected enum value '%s' - Supported values are [%s]",
$sourceOfFunds,
implode(', ', $allowedValues)
)
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

high

Using error_log for invalid enum values can lead to silent failures and makes debugging harder. It's better to throw an InvalidArgumentException to enforce valid data at the time of setting the property. This ensures the object is always in a valid state.

        if (!is_null($sourceOfFunds) && !in_array($sourceOfFunds, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'sourceOfFunds', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }

'accountHolder' => false,
'accountIdentification' => false
'accountIdentification' => false,
'storedPaymentMethodId' => false
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's an inconsistency regarding the nullability of the storedPaymentMethodId property. It's marked as non-nullable here, but the corresponding getter/setter PHPDocs and its initialization in the constructor suggest it can be null. To ensure consistency and prevent potential issues, this should be marked as nullable.

        'storedPaymentMethodId' => true

Comment on lines +345 to +366
* Gets storedPaymentMethodId
*
* @return string|null
*/
public function getStoredPaymentMethodId()
{
return $this->container['storedPaymentMethodId'];
}

/**
* Sets storedPaymentMethodId
*
* @param string|null $storedPaymentMethodId The unique token that identifies the stored bank account details of the counterparty for a payout.
*
* @return self
*/
public function setStoredPaymentMethodId($storedPaymentMethodId)
{
$this->container['storedPaymentMethodId'] = $storedPaymentMethodId;

return $this;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better code clarity and type safety, please add scalar type hints to the newly added methods getStoredPaymentMethodId and setStoredPaymentMethodId. This aligns with modern PHP best practices and improves consistency with other methods in the class that already use type hints.

    /**
     * Gets storedPaymentMethodId
     *
     * @return string|null
     */
    public function getStoredPaymentMethodId(): ?string
    {
        return $this->container['storedPaymentMethodId'];
    }

    /**
     * Sets storedPaymentMethodId
     *
     * @param string|null $storedPaymentMethodId The unique token that identifies the stored bank account details of the counterparty for a payout.
     *
     * @return self
     */
    public function setStoredPaymentMethodId(?string $storedPaymentMethodId): self
    {
        $this->container['storedPaymentMethodId'] = $storedPaymentMethodId;

        return $this;
    }

* Sets status
*
* @param string $status The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account.
* @param string $status The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account.- **accepted**: the request is accepted by the integration.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There seems to be a formatting issue in the PHPDoc. A space is missing between the description for credited and the new accepted status, which makes it harder to read.

     * @param string $status The status of the transfer.  Possible values:   - **credited**: the funds are credited to your user's transfer instrument or bank account. - **accepted**: the request is accepted by the integration.

Comment on lines +69 to +74
protected static $openAPINullables = [
'cardIdentification' => false,
'networkPaymentReference' => false,
'reference' => false,
'sourceOfFunds' => false
];
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The properties in this model are marked as non-nullable, but their PHPDocs and usage in the constructor suggest they can be null. This inconsistency can lead to unexpected behavior. Please update the nullability settings to reflect that they are optional.

    protected static $openAPINullables = [
        'cardIdentification' => true,
        'networkPaymentReference' => true,
        'reference' => true,
        'sourceOfFunds' => true
    ];

Comment on lines +325 to +424
public function getCardIdentification()
{
return $this->container['cardIdentification'];
}

/**
* Sets cardIdentification
*
* @param \Adyen\Model\Transfers\CardIdentification|null $cardIdentification cardIdentification
*
* @return self
*/
public function setCardIdentification($cardIdentification)
{
$this->container['cardIdentification'] = $cardIdentification;

return $this;
}

/**
* Gets networkPaymentReference
*
* @return string|null
*/
public function getNetworkPaymentReference()
{
return $this->container['networkPaymentReference'];
}

/**
* Sets networkPaymentReference
*
* @param string|null $networkPaymentReference The unique reference assigned by the card network for the pay-in transaction.
*
* @return self
*/
public function setNetworkPaymentReference($networkPaymentReference)
{
$this->container['networkPaymentReference'] = $networkPaymentReference;

return $this;
}

/**
* Gets reference
*
* @return string|null
*/
public function getReference()
{
return $this->container['reference'];
}

/**
* Sets reference
*
* @param string|null $reference Your internal reference that identifies this funding instrument. Required if `sourceOfFunds` is **DEPOSIT_ACCOUNT**.
*
* @return self
*/
public function setReference($reference)
{
$this->container['reference'] = $reference;

return $this;
}

/**
* Gets sourceOfFunds
*
* @return string|null
*/
public function getSourceOfFunds()
{
return $this->container['sourceOfFunds'];
}

/**
* Sets sourceOfFunds
*
* @param string|null $sourceOfFunds Indicates where the funds used for the transfer originated. Possible values are: - **DEBIT** for card-to-card transfers. - **DEPOSIT_ACCOUNT** for wallet-to-card transfers.
*
* @return self
*/
public function setSourceOfFunds($sourceOfFunds)
{
$allowedValues = $this->getSourceOfFundsAllowableValues();
if (!in_array($sourceOfFunds, $allowedValues, true)) {
error_log(
sprintf(
"sourceOfFunds: unexpected enum value '%s' - Supported values are [%s]",
$sourceOfFunds,
implode(', ', $allowedValues)
)
);
}
$this->container['sourceOfFunds'] = $sourceOfFunds;

return $this;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To improve code quality and prevent type-related errors, please add scalar type hints to the method signatures for all getters and setters in this class. This aligns with modern PHP best practices.

For example:

public function getCardIdentification(): ?\Adyen\Model\Transfers\CardIdentification
{
    // ...
}

public function setCardIdentification(?\Adyen\Model\Transfers\CardIdentification $cardIdentification): self
{
    // ...
}

This should be applied to all new getter/setter methods in this file.

'email' => false,
'firstName' => false,
'fullName' => false,
'fundingInstrument' => false,
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's an inconsistency regarding the nullability of the fundingInstrument property. It's marked as non-nullable here, but the corresponding getter/setter PHPDocs and its initialization in the constructor suggest it can be null. To ensure consistency and prevent potential issues, this should be marked as nullable.

        'fundingInstrument' => true,

Comment on lines +485 to +506
* Gets fundingInstrument
*
* @return \Adyen\Model\Transfers\FundingInstrument|null
*/
public function getFundingInstrument()
{
return $this->container['fundingInstrument'];
}

/**
* Sets fundingInstrument
*
* @param \Adyen\Model\Transfers\FundingInstrument|null $fundingInstrument fundingInstrument
*
* @return self
*/
public function setFundingInstrument($fundingInstrument)
{
$this->container['fundingInstrument'] = $fundingInstrument;

return $this;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better code clarity and type safety, please add scalar type hints to the newly added methods getFundingInstrument and setFundingInstrument. This aligns with modern PHP best practices and improves consistency with other methods in the class that already use type hints.

    /**
     * Gets fundingInstrument
     *
     * @return \Adyen\Model\Transfers\FundingInstrument|null
     */
    public function getFundingInstrument(): ?\Adyen\Model\Transfers\FundingInstrument
    {
        return $this->container['fundingInstrument'];
    }

    /**
     * Sets fundingInstrument
     *
     * @param \Adyen\Model\Transfers\FundingInstrument|null $fundingInstrument fundingInstrument
     *
     * @return self
     */
    public function setFundingInstrument(?\Adyen\Model\Transfers\FundingInstrument $fundingInstrument): self
    {
        $this->container['fundingInstrument'] = $fundingInstrument;

        return $this;
    }

@AdyenAutomationBot AdyenAutomationBot force-pushed the sdk-automation/transfers branch 4 times, most recently from ab558b8 to 487d97b Compare January 16, 2026 12:55
@sonarqubecloud
Copy link

@gcatanese gcatanese added this pull request to the merge queue Jan 23, 2026
Merged via the queue into main with commit 1eeee48 Jan 23, 2026
9 checks passed
@gcatanese gcatanese deleted the sdk-automation/transfers branch January 23, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants