first commit

This commit is contained in:
2026-01-14 16:40:33 +03:00
commit f803480f7b
184 changed files with 5573 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace Gemini\AlfaBank\Requests\Webhooks;
use Gemini\AlfaBank\Data\WebhookCollectionData;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;
class GetWebhooksRequest extends Request
{
protected Method $method = Method::GET;
public function __construct(
protected ?int $offset = 0,
protected ?int $limit = 20,
protected ?string $object = null
) {}
public function resolveEndpoint(): string
{
return '/api/v2/webhooks';
}
protected function defaultQuery(): array
{
return array_filter([
'offset' => $this->offset,
'limit' => $this->limit,
'object' => $this->object,
]);
}
public function createDtoFromResponse(Response $response): WebhookCollectionData
{
return WebhookCollectionData::from($response->json());
}
}