Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/Adyen/Model/Transfers/Amount.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function getCurrency()
/**
* Sets currency
*
* @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes).
* @param string $currency The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes) of the amount.
*
* @return self
*/
Expand All @@ -323,7 +323,7 @@ public function getValue()
/**
* Sets value
*
* @param int $value The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
* @param int $value The numeric value of the amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units).
*
* @return self
*/
Expand Down
43 changes: 37 additions & 6 deletions src/Adyen/Model/Transfers/BankAccountV3.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class BankAccountV3 implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPITypes = [
'accountHolder' => '\Adyen\Model\Transfers\PartyIdentification',
'accountIdentification' => '\Adyen\Model\Transfers\BankAccountV3AccountIdentification'
'accountIdentification' => '\Adyen\Model\Transfers\BankAccountV3AccountIdentification',
'storedPaymentMethodId' => 'string'
];

/**
Expand All @@ -54,7 +55,8 @@ class BankAccountV3 implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPIFormats = [
'accountHolder' => null,
'accountIdentification' => null
'accountIdentification' => null,
'storedPaymentMethodId' => null
];

/**
Expand All @@ -64,7 +66,8 @@ class BankAccountV3 implements ModelInterface, ArrayAccess, \JsonSerializable
*/
protected static $openAPINullables = [
'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

];

/**
Expand Down Expand Up @@ -154,7 +157,8 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $attributeMap = [
'accountHolder' => 'accountHolder',
'accountIdentification' => 'accountIdentification'
'accountIdentification' => 'accountIdentification',
'storedPaymentMethodId' => 'storedPaymentMethodId'
];

/**
Expand All @@ -164,7 +168,8 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $setters = [
'accountHolder' => 'setAccountHolder',
'accountIdentification' => 'setAccountIdentification'
'accountIdentification' => 'setAccountIdentification',
'storedPaymentMethodId' => 'setStoredPaymentMethodId'
];

/**
Expand All @@ -174,7 +179,8 @@ public function isNullableSetToNull(string $property): bool
*/
protected static $getters = [
'accountHolder' => 'getAccountHolder',
'accountIdentification' => 'getAccountIdentification'
'accountIdentification' => 'getAccountIdentification',
'storedPaymentMethodId' => 'getStoredPaymentMethodId'
];

/**
Expand Down Expand Up @@ -236,6 +242,7 @@ public function __construct(?array $data = null)
{
$this->setIfExists('accountHolder', $data ?? [], null);
$this->setIfExists('accountIdentification', $data ?? [], null);
$this->setIfExists('storedPaymentMethodId', $data ?? [], null);
}

/**
Expand Down Expand Up @@ -333,6 +340,30 @@ public function setAccountIdentification($accountIdentification)

return $this;
}

/**
* 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;
}
Comment on lines +345 to +366
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;
    }

/**
* Returns true if offset exists. False otherwise.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Adyen/Model/Transfers/BankCategoryData.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public function getPriority()
/**
* Sets priority
*
* @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN).
* @param string|null $priority The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: For normal, low-value transactions. * **fast**: A faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: The fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: For instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: For high-value transfers to a recipient in a different country. * **internal**: For transfers to an Adyen-issued business bank account (by bank account number/IBAN).
*
* @return self
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Adyen/Model/Transfers/ConfirmationTrackingData.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ public function getModelName()
}

public const STATUS_CREDITED = 'credited';
public const STATUS_ACCEPTED = 'accepted';
public const TYPE_CONFIRMATION = 'confirmation';

/**
Expand All @@ -230,6 +231,7 @@ public function getStatusAllowableValues()
{
return [
self::STATUS_CREDITED,
self::STATUS_ACCEPTED,
];
}
/**
Expand Down Expand Up @@ -341,7 +343,7 @@ public function getStatus()
/**
* 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.

*
* @return self
*/
Expand Down
Loading