Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions sdk-generation-log/transfers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"service": "transfers",
"project": "php",
"generatedAt": "2026-09-04T09:50:56Z",
"openapiCommitSha": "f82d1fe674e536cc2c6b0d7946e0e827873a4fbf",
"automationCommitSha": "712ab8db80d60bee9054458ea1522cae0073333a",
"libraryCommitSha": "077f8fe9bba23381af53c625b18db85e7887c50f"
}
71 changes: 37 additions & 34 deletions src/Adyen/Model/Transfers/BankAccountV3AccountIdentification.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
public const DISCRIMINATOR = 'type';

/**
* The original name of the model.
Expand All @@ -53,9 +53,9 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess,
'institutionNumber' => 'string',
'transitNumber' => 'string',
'clearingCode' => 'string',
'bic' => 'string',
'iban' => 'string',
'additionalBankIdentification' => '\Adyen\Model\Transfers\AdditionalBankIdentification',
'bic' => 'string',
'clearingNumber' => 'string',
'sortCode' => 'string',
'routingNumber' => 'string'
Expand All @@ -79,9 +79,9 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess,
'institutionNumber' => null,
'transitNumber' => null,
'clearingCode' => null,
'bic' => null,
'iban' => null,
'additionalBankIdentification' => null,
'bic' => null,
'clearingNumber' => null,
'sortCode' => null,
'routingNumber' => null
Expand All @@ -103,9 +103,9 @@ class BankAccountV3AccountIdentification implements ModelInterface, ArrayAccess,
'institutionNumber' => false,
'transitNumber' => false,
'clearingCode' => false,
'bic' => false,
'iban' => false,
'additionalBankIdentification' => false,
'bic' => false,
'clearingNumber' => false,
'sortCode' => false,
'routingNumber' => false
Expand Down Expand Up @@ -207,9 +207,9 @@ public function isNullableSetToNull(string $property): bool
'institutionNumber' => 'institutionNumber',
'transitNumber' => 'transitNumber',
'clearingCode' => 'clearingCode',
'bic' => 'bic',
'iban' => 'iban',
'additionalBankIdentification' => 'additionalBankIdentification',
'bic' => 'bic',
'clearingNumber' => 'clearingNumber',
'sortCode' => 'sortCode',
'routingNumber' => 'routingNumber'
Expand All @@ -231,9 +231,9 @@ public function isNullableSetToNull(string $property): bool
'institutionNumber' => 'setInstitutionNumber',
'transitNumber' => 'setTransitNumber',
'clearingCode' => 'setClearingCode',
'bic' => 'setBic',
'iban' => 'setIban',
'additionalBankIdentification' => 'setAdditionalBankIdentification',
'bic' => 'setBic',
'clearingNumber' => 'setClearingNumber',
'sortCode' => 'setSortCode',
'routingNumber' => 'setRoutingNumber'
Expand All @@ -255,9 +255,9 @@ public function isNullableSetToNull(string $property): bool
'institutionNumber' => 'getInstitutionNumber',
'transitNumber' => 'getTransitNumber',
'clearingCode' => 'getClearingCode',
'bic' => 'getBic',
'iban' => 'getIban',
'additionalBankIdentification' => 'getAdditionalBankIdentification',
'bic' => 'getBic',
'clearingNumber' => 'getClearingNumber',
'sortCode' => 'getSortCode',
'routingNumber' => 'getRoutingNumber'
Expand Down Expand Up @@ -329,12 +329,15 @@ public function __construct(?array $data = null)
$this->setIfExists('institutionNumber', $data ?? [], null);
$this->setIfExists('transitNumber', $data ?? [], null);
$this->setIfExists('clearingCode', $data ?? [], null);
$this->setIfExists('bic', $data ?? [], null);
$this->setIfExists('iban', $data ?? [], null);
$this->setIfExists('additionalBankIdentification', $data ?? [], null);
$this->setIfExists('bic', $data ?? [], null);
$this->setIfExists('clearingNumber', $data ?? [], null);
$this->setIfExists('sortCode', $data ?? [], null);
$this->setIfExists('routingNumber', $data ?? [], null);

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

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

}

/**
Expand Down Expand Up @@ -390,12 +393,12 @@ public function listInvalidProperties()
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";
}
Comment on lines 393 to 404

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.

Expand Down Expand Up @@ -661,73 +664,73 @@ public function setClearingCode($clearingCode)
}

/**
* Gets iban
* Gets bic
*
* @return string
*/
public function getIban()
public function getBic()
{
return $this->container['iban'];
return $this->container['bic'];
}

/**
* Sets iban
* Sets bic
*
* @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard.
* @param string $bic The bank's 8- or 11-character BIC or SWIFT code.
*
* @return self
*/
public function setIban($iban)
public function setBic($bic)
{
$this->container['iban'] = $iban;
$this->container['bic'] = $bic;

return $this;
}

/**
* Gets additionalBankIdentification
* Gets iban
*
* @return \Adyen\Model\Transfers\AdditionalBankIdentification|null
* @return string
*/
public function getAdditionalBankIdentification()
public function getIban()
{
return $this->container['additionalBankIdentification'];
return $this->container['iban'];
}

/**
* Sets additionalBankIdentification
* Sets iban
*
* @param \Adyen\Model\Transfers\AdditionalBankIdentification|null $additionalBankIdentification additionalBankIdentification
* @param string $iban The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard.
*
* @return self
*/
public function setAdditionalBankIdentification($additionalBankIdentification)
public function setIban($iban)
{
$this->container['additionalBankIdentification'] = $additionalBankIdentification;
$this->container['iban'] = $iban;

return $this;
}

/**
* Gets bic
* Gets additionalBankIdentification
*
* @return string
* @return \Adyen\Model\Transfers\AdditionalBankIdentification|null
*/
public function getBic()
public function getAdditionalBankIdentification()
{
return $this->container['bic'];
return $this->container['additionalBankIdentification'];
}

/**
* Sets bic
* Sets additionalBankIdentification
*
* @param string $bic The bank's 8- or 11-character BIC or SWIFT code.
* @param \Adyen\Model\Transfers\AdditionalBankIdentification|null $additionalBankIdentification additionalBankIdentification
*
* @return self
*/
public function setBic($bic)
public function setAdditionalBankIdentification($additionalBankIdentification)
{
$this->container['bic'] = $bic;
$this->container['additionalBankIdentification'] = $additionalBankIdentification;

return $this;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Adyen/Model/Transfers/CapitalGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class CapitalGrant implements ModelInterface, ArrayAccess, \JsonSerializable
protected static $openAPITypes = [
'amount' => '\Adyen\Model\Transfers\Amount',
'balances' => '\Adyen\Model\Transfers\CapitalBalance',
'counterparty' => '\Adyen\Model\Transfers\Counterparty',
'counterparty' => '\Adyen\Model\Transfers\GrantCounterparty',
'fee' => '\Adyen\Model\Transfers\Fee',
'grantAccountId' => 'string',
'grantOfferId' => 'string',
Expand Down Expand Up @@ -426,7 +426,7 @@ public function setBalances($balances)
/**
* Gets counterparty
*
* @return \Adyen\Model\Transfers\Counterparty|null
* @return \Adyen\Model\Transfers\GrantCounterparty|null
*/
public function getCounterparty()
{
Expand All @@ -436,7 +436,7 @@ public function getCounterparty()
/**
* Sets counterparty
*
* @param \Adyen\Model\Transfers\Counterparty|null $counterparty counterparty
* @param \Adyen\Model\Transfers\GrantCounterparty|null $counterparty counterparty
*
* @return self
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Adyen/Model/Transfers/CapitalGrantInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class CapitalGrantInfo implements ModelInterface, ArrayAccess, \JsonSerializable
* @var string[]
*/
protected static $openAPITypes = [
'counterparty' => '\Adyen\Model\Transfers\Counterparty',
'counterparty' => '\Adyen\Model\Transfers\GrantInfoCounterparty',
'grantAccountId' => 'string',
'grantOfferId' => 'string'
];
Expand Down Expand Up @@ -296,7 +296,7 @@ public function valid()
/**
* Gets counterparty
*
* @return \Adyen\Model\Transfers\Counterparty|null
* @return \Adyen\Model\Transfers\GrantInfoCounterparty|null
*/
public function getCounterparty()
{
Expand All @@ -306,7 +306,7 @@ public function getCounterparty()
/**
* Sets counterparty
*
* @param \Adyen\Model\Transfers\Counterparty|null $counterparty counterparty
* @param \Adyen\Model\Transfers\GrantInfoCounterparty|null $counterparty counterparty
*
* @return self
*/
Expand Down
Loading
Loading