From 92a0eb0c0bff67dd06ac56a08d535d1f90d23e7d Mon Sep 17 00:00:00 2001 From: Neur0toxine Date: Wed, 16 Nov 2022 09:54:56 +0300 Subject: [PATCH 1/2] update ChatsRequest --- src/Bot/Model/Request/ChatsRequest.php | 24 +++++++++++++ src/Bot/Model/Request/PageLimit.php | 48 ++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 src/Bot/Model/Request/PageLimit.php diff --git a/src/Bot/Model/Request/ChatsRequest.php b/src/Bot/Model/Request/ChatsRequest.php index 2b0666c..14a6d92 100644 --- a/src/Bot/Model/Request/ChatsRequest.php +++ b/src/Bot/Model/Request/ChatsRequest.php @@ -23,6 +23,7 @@ use RetailCrm\Mg\Bot\Model\ModelInterface; class ChatsRequest implements ModelInterface { use CommonFields; + use PageLimit; /** * @Type("int") @@ -38,6 +39,13 @@ class ChatsRequest implements ModelInterface */ private $channelType; + /** + * @Type("int") + * @Accessor(getter="getCustomerId",setter="setCustomerId") + * @SkipWhenEmpty() + */ + private $customerId; + /** * @return int */ @@ -69,4 +77,20 @@ class ChatsRequest implements ModelInterface { $this->channelType = $channelType; } + + /** + * @return int|null + */ + public function getCustomerId(): ?int + { + return $this->customerId; + } + + /** + * @param int $customerId + */ + public function setCustomerId($customerId) + { + $this->customerId = $customerId; + } } diff --git a/src/Bot/Model/Request/PageLimit.php b/src/Bot/Model/Request/PageLimit.php new file mode 100644 index 0000000..ccd9e28 --- /dev/null +++ b/src/Bot/Model/Request/PageLimit.php @@ -0,0 +1,48 @@ +limit; + } + + /** + * @param int $limit + */ + public function setLimit($limit) + { + $this->limit = $limit; + } +} From 6476caf9b9c1daddec6150097364907b75422f4d Mon Sep 17 00:00:00 2001 From: Neur0toxine Date: Wed, 16 Nov 2022 09:57:29 +0300 Subject: [PATCH 2/2] fix for linter notifications --- src/Bot/Model/Request/ChatsRequest.php | 3 +++ src/Bot/Model/Request/PageLimit.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Bot/Model/Request/ChatsRequest.php b/src/Bot/Model/Request/ChatsRequest.php index 14a6d92..a35d78a 100644 --- a/src/Bot/Model/Request/ChatsRequest.php +++ b/src/Bot/Model/Request/ChatsRequest.php @@ -40,6 +40,8 @@ class ChatsRequest implements ModelInterface private $channelType; /** + * @var int $customerId + * * @Type("int") * @Accessor(getter="getCustomerId",setter="setCustomerId") * @SkipWhenEmpty() @@ -88,6 +90,7 @@ class ChatsRequest implements ModelInterface /** * @param int $customerId + * @return void */ public function setCustomerId($customerId) { diff --git a/src/Bot/Model/Request/PageLimit.php b/src/Bot/Model/Request/PageLimit.php index ccd9e28..8f78e94 100644 --- a/src/Bot/Model/Request/PageLimit.php +++ b/src/Bot/Model/Request/PageLimit.php @@ -22,7 +22,7 @@ use JMS\Serializer\Annotation\Type; trait PageLimit { /** - * @var int + * @var int $limit * * @Type("int") * @Accessor(getter="getLimit",setter="setLimit") @@ -40,6 +40,7 @@ trait PageLimit /** * @param int $limit + * @return void */ public function setLimit($limit) {