Skip to content

Commit

Permalink
add limit field to MessagesRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
Neur0toxine committed Oct 26, 2023
1 parent d92b89a commit 7dd570f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/Bot/Model/Request/MessagesRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -248,4 +257,20 @@ public function setType(string $type)
{
$this->type = $type;
}

/**
* @return int
*/
public function getLimit()
{
return $this->limit;
}

/**
* @param int $limit
*/
public function setLimit(int $limit)

Check failure on line 272 in src/Bot/Model/Request/MessagesRequest.php

View workflow job for this annotation

GitHub Actions / test (8.0)

Method RetailCrm\Mg\Bot\Model\Request\MessagesRequest::setLimit() has no return typehint specified.

Check failure on line 272 in src/Bot/Model/Request/MessagesRequest.php

View workflow job for this annotation

GitHub Actions / test (7.3)

Method RetailCrm\Mg\Bot\Model\Request\MessagesRequest::setLimit() has no return typehint specified.

Check failure on line 272 in src/Bot/Model/Request/MessagesRequest.php

View workflow job for this annotation

GitHub Actions / test (7.4)

Method RetailCrm\Mg\Bot\Model\Request\MessagesRequest::setLimit() has no return typehint specified.

Check failure on line 272 in src/Bot/Model/Request/MessagesRequest.php

View workflow job for this annotation

GitHub Actions / test (8.0)

Method RetailCrm\Mg\Bot\Model\Request\MessagesRequest::setLimit() has no return typehint specified.

Check failure on line 272 in src/Bot/Model/Request/MessagesRequest.php

View workflow job for this annotation

GitHub Actions / test (8.1)

Method RetailCrm\Mg\Bot\Model\Request\MessagesRequest::setLimit() has no return typehint specified.
{
$this->limit = $limit;
}
}
1 change: 1 addition & 0 deletions tests/Bot/Tests/ClientListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public function testMessages()
$request = new Request\MessagesRequest();
$request->setChannelType(Constants::CHANNEL_TYPE_INSTAGRAM);
$request->setType(Constants::MESSAGE_TYPE_TEXT);
$request->setLimit(1000);

$response = $client->messages($request);

Expand Down

0 comments on commit 7dd570f

Please sign in to comment.