1
0
mirror of synced 2024-11-22 11:56:03 +03:00

add limit field to MessagesRequest

This commit is contained in:
Pavel 2023-10-26 10:16:31 +03:00 committed by GitHub
commit 93924bf3b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 0 deletions

View File

@ -1450,6 +1450,11 @@ parameters:
count: 1
path: src/Bot/Model/Request/MessagesRequest.php
-
message: "#^Method RetailCrm\\\\Mg\\\\Bot\\\\Model\\\\Request\\\\MessagesRequest\\:\\:setLimit\\(\\) has no return typehint specified\\.$#"
count: 1
path: src/Bot/Model/Request/MessagesRequest.php
-
message: "#^Method RetailCrm\\\\Mg\\\\Bot\\\\Model\\\\Request\\\\MessagesRequest\\:\\:setChannelId\\(\\) has no return typehint specified\\.$#"
count: 1

View File

@ -105,6 +105,15 @@ class MessagesRequest implements ModelInterface
*/
private $type;
/**
* @var int $limit
*
* @Type("int")
* @Accessor(getter="getLimit",setter="setLimit")
* @SkipWhenEmpty()
*/
private $limit;
/**
* @return int
*/
@ -248,4 +257,20 @@ class MessagesRequest implements ModelInterface
{
$this->type = $type;
}
/**
* @return int
*/
public function getLimit()
{
return $this->limit;
}
/**
* @param int $limit
*/
public function setLimit(int $limit)
{
$this->limit = $limit;
}
}

View File

@ -135,6 +135,7 @@ class ClientListTest extends TestCase
$request = new Request\MessagesRequest();
$request->setChannelType(Constants::CHANNEL_TYPE_INSTAGRAM);
$request->setType(Constants::MESSAGE_TYPE_TEXT);
$request->setLimit(1000);
$response = $client->messages($request);