Skip to content

RevoTale/php-checkbox-ua

Repository files navigation

About

Checkbox.ua have 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 format for the semantically same type of field. That causes generated client libraries to throw unexpected error.

Initial library code was generated by JanePHP (Thanks, for a great project!)

That code was modified manually, nullables was added and a specific date format used for different fields.

General logic is still handled by JanePHP runtime

Installation

composer install revotale/checkbox-ua

Usage

Example 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();//You can provide a token in case of secure API endpoint
$payload = new CashierSignInPinCode();
$payload->setPinCode($pinCode);
$client->signInCashierApiV1CashierSigninPost()