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
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public function getProblems()
/**
* Sets problems
*
* @param \Adyen\Model\ManagementWebhooks\CapabilityProblem[]|null $problems List of entities that has problems with verification. The information includes the details of the errors and the actions that you can take to resolve them.
* @param \Adyen\Model\ManagementWebhooks\CapabilityProblem[]|null $problems List of entities that have problems with verification. The information includes the details of the errors and the actions that you can take to resolve them.
*
* @return self
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class TerminalAssignmentNotificationRequest implements ModelInterface, ArrayAcce
protected static $openAPITypes = [
'assignedToAccount' => 'string',
'assignedToStore' => 'string',
'assignedToStoreId' => 'string',
'eventDate' => 'string',
'pspReference' => 'string',
'uniqueTerminalId' => 'string'
Expand All @@ -58,6 +59,7 @@ class TerminalAssignmentNotificationRequest implements ModelInterface, ArrayAcce
protected static $openAPIFormats = [
'assignedToAccount' => null,
'assignedToStore' => null,
'assignedToStoreId' => null,
'eventDate' => null,
'pspReference' => null,
'uniqueTerminalId' => null
Expand All @@ -71,6 +73,7 @@ class TerminalAssignmentNotificationRequest implements ModelInterface, ArrayAcce
protected static $openAPINullables = [
'assignedToAccount' => false,
'assignedToStore' => false,
'assignedToStoreId' => 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 for the assignedToStoreId property. It's marked as non-nullable here (false), but the getter/setter methods allow null values (docblock string|null), and listInvalidProperties doesn't validate against null. This could lead to an invalid model state being considered valid.

If assignedToStoreId is required and not nullable, it should be checked for null in listInvalidProperties. If it's nullable, this value should be true.

This seems to follow a pattern already present for assignedToStore, which has the same inconsistency. It would be good to clarify the nullability and requirement constraints for both properties.

'eventDate' => false,
'pspReference' => false,
'uniqueTerminalId' => false
Expand Down Expand Up @@ -164,6 +167,7 @@ public function isNullableSetToNull(string $property): bool
protected static $attributeMap = [
'assignedToAccount' => 'assignedToAccount',
'assignedToStore' => 'assignedToStore',
'assignedToStoreId' => 'assignedToStoreId',
'eventDate' => 'eventDate',
'pspReference' => 'pspReference',
'uniqueTerminalId' => 'uniqueTerminalId'
Expand All @@ -177,6 +181,7 @@ public function isNullableSetToNull(string $property): bool
protected static $setters = [
'assignedToAccount' => 'setAssignedToAccount',
'assignedToStore' => 'setAssignedToStore',
'assignedToStoreId' => 'setAssignedToStoreId',
'eventDate' => 'setEventDate',
'pspReference' => 'setPspReference',
'uniqueTerminalId' => 'setUniqueTerminalId'
Expand All @@ -190,6 +195,7 @@ public function isNullableSetToNull(string $property): bool
protected static $getters = [
'assignedToAccount' => 'getAssignedToAccount',
'assignedToStore' => 'getAssignedToStore',
'assignedToStoreId' => 'getAssignedToStoreId',
'eventDate' => 'getEventDate',
'pspReference' => 'getPspReference',
'uniqueTerminalId' => 'getUniqueTerminalId'
Expand Down Expand Up @@ -254,6 +260,7 @@ public function __construct(?array $data = null)
{
$this->setIfExists('assignedToAccount', $data ?? [], null);
$this->setIfExists('assignedToStore', $data ?? [], null);
$this->setIfExists('assignedToStoreId', $data ?? [], null);
$this->setIfExists('eventDate', $data ?? [], null);
$this->setIfExists('pspReference', $data ?? [], null);
$this->setIfExists('uniqueTerminalId', $data ?? [], null);
Expand Down Expand Up @@ -350,7 +357,7 @@ public function getAssignedToStore()
/**
* Sets assignedToStore
*
* @param string|null $assignedToStore The unique identifier of the store to which the terminal is assigned.
* @param string|null $assignedToStore The store that the terminal is assigned to, identified by the store reference (also known as store code).
*
* @return self
*/
Expand All @@ -361,6 +368,30 @@ public function setAssignedToStore($assignedToStore)
return $this;
}

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

/**
* Sets assignedToStoreId
*
* @param string|null $assignedToStoreId The unique identifier of the store to which the terminal is assigned.
*
* @return self
*/
public function setAssignedToStoreId($assignedToStoreId)
{
$this->container['assignedToStoreId'] = $assignedToStoreId;

return $this;
}

/**
* Gets eventDate
*
Expand Down
2 changes: 2 additions & 0 deletions src/Adyen/Model/ManagementWebhooks/VerificationError.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ public function getModelName()
}

public const TYPE_DATA_MISSING = 'dataMissing';
public const TYPE_DATA_REVIEW = 'dataReview';
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

With the addition of the new TYPE_DATA_REVIEW constant, the PHPDoc for the setType method on line 440 has become outdated. Please update it to include dataReview in the list of possible values to ensure documentation stays in sync with the code.

public const TYPE_INVALID_INPUT = 'invalidInput';
public const TYPE_PENDING_STATUS = 'pendingStatus';

Expand All @@ -249,6 +250,7 @@ public function getTypeAllowableValues()
{
return [
self::TYPE_DATA_MISSING,
self::TYPE_DATA_REVIEW,
self::TYPE_INVALID_INPUT,
self::TYPE_PENDING_STATUS,
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ public function getModelName()
}

public const TYPE_DATA_MISSING = 'dataMissing';
public const TYPE_DATA_REVIEW = 'dataReview';
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

With the addition of the new TYPE_DATA_REVIEW constant, the PHPDoc for the setType method on line 385 has become outdated. Please update it to include dataReview in the list of possible values to ensure documentation stays in sync with the code.

public const TYPE_INVALID_INPUT = 'invalidInput';
public const TYPE_PENDING_STATUS = 'pendingStatus';

Expand All @@ -243,6 +244,7 @@ public function getTypeAllowableValues()
{
return [
self::TYPE_DATA_MISSING,
self::TYPE_DATA_REVIEW,
self::TYPE_INVALID_INPUT,
self::TYPE_PENDING_STATUS,
];
Expand Down