Skip to content

RevoTale/php-checkbox-ua

Repository files navigation

About

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.

Installation

composer require 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(
    clientName: 'MyApp',
    clientVersion: '1.0.0',
    token: $token // optional, for secure API endpoints
);

$payload = new CashierSignInPinCode();
$payload->setPinCode($pinCode);

$response = $client->signInCashierApiV1CashierSigninPost($payload);

About

PHP SDK to interact with checkbox.ua (https://api.checkbox.in.ua/api/docs) service.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages