Add support for ShippingQuery events

This commit is contained in:
netkas 2024-11-01 21:50:21 -04:00
parent f1342e3f42
commit e843c8ca4f
3 changed files with 37 additions and 0 deletions

View 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();
}
}