novoxpro / restopulse-php-sdk
PHP SDK for RestoPulse REST API
1.0.1
2026-09-02 14:21 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.9
- psr/log: ^3.0
Requires (Dev)
- phpunit/phpunit: ^10.5|^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-07 13:11:48 UTC
README
Официальная PHP-библиотека для работы с Public API платформы RestoPulse.
Установка
composer require novoxpro/restopulse-php-sdk
Быстрый старт
use Restopulse\PhpSdk\Client\Client; use Restopulse\PhpSdk\Configuration\Configuration; use Restopulse\PhpSdk\DTO\Request\EventDto; use Restopulse\PhpSdk\DTO\Request\EventFieldDto; $config = new Configuration(apiKey: 'ваш-api-key'); $client = new Client($config); // Получение филиалов $branches = $client->branches()->all(); // Отправка события $event = new EventDto( branchIds: [47], eventType: 'order.created', externalId: 'ORD-100500', eventDate: new DateTimeImmutable('now'), title: 'Новый заказ', preview: 'Заказ оформлен на сайте', message: 'Создан заказ №100500.', fields: [new EventFieldDto('Номер заказа', '100500')], ); $eventId = $client->events()->send($event)->getId();
Конфигурация
$config = new Configuration( apiKey: 'ваш-api-key', baseUrl: 'https://restopulse.ru', requestTimeout: 10.0, connectTimeout: 5.0, logger: $logger, maxRetries: 2, retryDelayMs: 1000, maxExecutionTime: 30.0, );
Документация
Подробная документация: https://docs.novox.ru/share/ixjas2zkvu/p/dokumentatsiya-resto-pulse-php-sdk-OQnGdfha3r
Лицензия
MIT