-
Notifications
You must be signed in to change notification settings - Fork 116
[transfers] Code generation: update services and models #862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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' | ||
| ]; | ||
|
|
||
| /** | ||
|
|
@@ -54,7 +55,8 @@ class BankAccountV3 implements ModelInterface, ArrayAccess, \JsonSerializable | |
| */ | ||
| protected static $openAPIFormats = [ | ||
| 'accountHolder' => null, | ||
| 'accountIdentification' => null | ||
| 'accountIdentification' => null, | ||
| 'storedPaymentMethodId' => null | ||
| ]; | ||
|
|
||
| /** | ||
|
|
@@ -64,7 +66,8 @@ class BankAccountV3 implements ModelInterface, ArrayAccess, \JsonSerializable | |
| */ | ||
| protected static $openAPINullables = [ | ||
| 'accountHolder' => false, | ||
| 'accountIdentification' => false | ||
| 'accountIdentification' => false, | ||
| 'storedPaymentMethodId' => false | ||
| ]; | ||
|
|
||
| /** | ||
|
|
@@ -154,7 +157,8 @@ public function isNullableSetToNull(string $property): bool | |
| */ | ||
| protected static $attributeMap = [ | ||
| 'accountHolder' => 'accountHolder', | ||
| 'accountIdentification' => 'accountIdentification' | ||
| 'accountIdentification' => 'accountIdentification', | ||
| 'storedPaymentMethodId' => 'storedPaymentMethodId' | ||
| ]; | ||
|
|
||
| /** | ||
|
|
@@ -164,7 +168,8 @@ public function isNullableSetToNull(string $property): bool | |
| */ | ||
| protected static $setters = [ | ||
| 'accountHolder' => 'setAccountHolder', | ||
| 'accountIdentification' => 'setAccountIdentification' | ||
| 'accountIdentification' => 'setAccountIdentification', | ||
| 'storedPaymentMethodId' => 'setStoredPaymentMethodId' | ||
| ]; | ||
|
|
||
| /** | ||
|
|
@@ -174,7 +179,8 @@ public function isNullableSetToNull(string $property): bool | |
| */ | ||
| protected static $getters = [ | ||
| 'accountHolder' => 'getAccountHolder', | ||
| 'accountIdentification' => 'getAccountIdentification' | ||
| 'accountIdentification' => 'getAccountIdentification', | ||
| 'storedPaymentMethodId' => 'getStoredPaymentMethodId' | ||
| ]; | ||
|
|
||
| /** | ||
|
|
@@ -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); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For better code clarity and type safety, please add scalar type hints to the newly added methods /**
* 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. | ||
| * | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -219,6 +219,7 @@ public function getModelName() | |
| } | ||
|
|
||
| public const STATUS_CREDITED = 'credited'; | ||
| public const STATUS_ACCEPTED = 'accepted'; | ||
| public const TYPE_CONFIRMATION = 'confirmation'; | ||
|
|
||
| /** | ||
|
|
@@ -230,6 +231,7 @@ public function getStatusAllowableValues() | |
| { | ||
| return [ | ||
| self::STATUS_CREDITED, | ||
| self::STATUS_ACCEPTED, | ||
| ]; | ||
| } | ||
| /** | ||
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There seems to be a formatting issue in the PHPDoc. A space is missing between the description for * @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 | ||
| */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an inconsistency regarding the nullability of the
storedPaymentMethodIdproperty. It's marked as non-nullable here, but the corresponding getter/setter PHPDocs and its initialization in the constructor suggest it can benull. To ensure consistency and prevent potential issues, this should be marked as nullable.'storedPaymentMethodId' => true