Added GiveawayCreated
This commit is contained in:
parent
3691445841
commit
93e408be17
1 changed files with 40 additions and 0 deletions
40
src/TgBotLib/Objects/Telegram/GiveawayCreated.php
Normal file
40
src/TgBotLib/Objects/Telegram/GiveawayCreated.php
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace TgBotLib\Objects\Telegram;
|
||||||
|
|
||||||
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
|
|
||||||
|
class GiveawayCreated implements ObjectTypeInterface
|
||||||
|
{
|
||||||
|
private int $prize_star_count;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function getPrizeStarCount(): int
|
||||||
|
{
|
||||||
|
return $this->prize_star_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public function toArray(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'prize_star_count' => $this->prize_star_count
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function fromArray(array $data): ObjectTypeInterface
|
||||||
|
{
|
||||||
|
$object = new self();
|
||||||
|
$object->prize_star_count = $data['prize_star_count'];
|
||||||
|
return $object;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue