Add PreCheckoutQueryEvent handling
This commit is contained in:
parent
c57cdfe05c
commit
f1342e3f42
3 changed files with 36 additions and 0 deletions
29
src/TgBotLib/Events/PreCheckoutQueryEvent.php
Normal file
29
src/TgBotLib/Events/PreCheckoutQueryEvent.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Events;
|
||||
|
||||
use TgBotLib\Abstracts\UpdateEvent;
|
||||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\UpdateEventType;
|
||||
use TgBotLib\Objects\Payments\PreCheckoutQuery;
|
||||
|
||||
abstract class PreCheckoutQueryEvent extends UpdateEvent
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getEventType(): UpdateEventType
|
||||
{
|
||||
return UpdateEventType::PRE_CHECKOUT_QUERY;
|
||||
}
|
||||
|
||||
/**
|
||||
* New incoming pre-checkout query. Contains full information about checkout
|
||||
*
|
||||
* @return PreCheckoutQuery
|
||||
*/
|
||||
protected function getPreCheckoutQuery(): PreCheckoutQuery
|
||||
{
|
||||
return $this->update->getPreCheckoutQuery();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue