Add support for ShippingQuery events
This commit is contained in:
parent
f1342e3f42
commit
e843c8ca4f
3 changed files with 37 additions and 0 deletions
30
src/TgBotLib/Events/ShippingQueryEvent.php
Normal file
30
src/TgBotLib/Events/ShippingQueryEvent.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace TgBotLib\Events;
|
||||
|
||||
use TgBotLib\Abstracts\UpdateEvent;
|
||||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\Types\EventType;
|
||||
use TgBotLib\Enums\UpdateEventType;
|
||||
use TgBotLib\Objects\Payments\ShippingQuery;
|
||||
|
||||
abstract class ShippingQueryEvent extends UpdateEvent
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function getEventType(): UpdateEventType
|
||||
{
|
||||
return UpdateEventType::SHIPPING_QUERY;
|
||||
}
|
||||
|
||||
/**
|
||||
* New incoming shipping query. Only for invoices with flexible price
|
||||
*
|
||||
* @return ShippingQuery
|
||||
*/
|
||||
protected function getShippingQuery(): ShippingQuery
|
||||
{
|
||||
return $this->update->getShippingQuery();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue