Added ChatBoostAdded
This commit is contained in:
parent
088eac6b88
commit
054f76d144
1 changed files with 40 additions and 0 deletions
40
src/TgBotLib/Objects/Telegram/ChatBoostAdded.php
Normal file
40
src/TgBotLib/Objects/Telegram/ChatBoostAdded.php
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace TgBotLib\Objects\Telegram;
|
||||||
|
|
||||||
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
|
|
||||||
|
class ChatBoostAdded implements ObjectTypeInterface
|
||||||
|
{
|
||||||
|
private int $boost_count;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of boosts added by the user
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function getBoostCount(): int
|
||||||
|
{
|
||||||
|
return $this->boost_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function toArray(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'boost_count' => $this->boost_count
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function fromArray(array $data): ObjectTypeInterface
|
||||||
|
{
|
||||||
|
$object = new self();
|
||||||
|
$object->boost_count = $data['boost_count'];
|
||||||
|
return $object;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue