Checkbox.ua has an OpenAPI specification (https://api.checkbox.in.ua/api/openapi.json) that is incorrectly described in many places. For example, lack of nullable union types and different datetime formats for semantically same fields. This causes generated client libraries to throw unexpected errors.
Initial library code was generated by JanePHP. That code was modified manually to add nullables and handle specific date formats for different fields.
General logic is still handled by JanePHP runtime.
composer require revotale/checkbox-uaExample with signing in cashier with pin code and licence key:
<?php
declare(strict_types=1);
use RevoTale\CheckboxUA\ClientFactory;
use RevoTale\CheckboxUA\Model\CashierSignInPinCode;
$client = ClientFactory::createClient(
clientName: 'MyApp',
clientVersion: '1.0.0',
token: $token // optional, for secure API endpoints
);
$payload = new CashierSignInPinCode();
$payload->setPinCode($pinCode);
$response = $client->signInCashierApiV1CashierSigninPost($payload);