revotale/checkbox-ua

A library to interact with https://checkbox.ua API.

0.0.6 2024-03-08 20:31 UTC

This package is auto-updated.

Last update: 2024-05-08 20:54:00 UTC


README

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()