add limit field to MessagesRequest
This commit is contained in:
commit
93924bf3b5
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user