PHP code example of tdev-agency / checkbox-ua

1. Go to this page and download the library: Download tdev-agency/checkbox-ua library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tdev-agency / checkbox-ua example snippets


$entity = \TDevAgency\CheckboxUa\Entities\Requests\SignInRequestEntity::create([
            'login' => 'login',
            'password' => 'password',
            'license_key' => 'license_key'
]);

$entity = \TDevAgency\CheckboxUa\Entities\Requests\SignInRequestEntity::create([
            'pin_code' => 'pin_code',
            'license_key' => 'license_key'
]);

// For pin code sign in
$client = new CheckboxUa(CheckboxUa::DRIVER_SIGNIN_PIN_CODE, $entity);
// For sign in with login and password
$client = new CheckboxUa(CheckboxUa::DRIVER_SIGNIN, $entity);

 $client->getCashier()->signOut()
 

$client->getCashier()->me()
 
$client->getCashier()->shift()

$client->getCashier()->checkSignature()

$client->make(\TDevAgency\CheckboxUa\Tags\Organization::class)->receiptConfig()

$client->make(\TDevAgency\CheckboxUa\Tags\Organization::class)->logoPng()

$client->make(\TDevAgency\CheckboxUa\Tags\Organization::class)->textLogoPng()

$client->make(\TDevAgency\CheckboxUa\Tags\Shifts::class)->closeShift()

$entity = \TDevAgency\CheckboxUa\Entities\Requests\ShiftCloseRequestEntity::create($data)
$client->make(\TDevAgency\CheckboxUa\Tags\Shifts::class)->closeShift($entity)

$client->make(\TDevAgency\CheckboxUa\Tags\Shifts::class)->createShift($id, $fiscal_code, $fiscal_date)

$client->make(\TDevAgency\CheckboxUa\Tags\Shifts::class)->getShifts($statuses, $limit, $offset, $desc)
 
$client->make(\TDevAgency\CheckboxUa\Tags\Shifts::class)->getShift($id, $options)

$entity = \TDevAgency\CheckboxUa\Entities\Requests\ReceiptQueryRequestEntity::create($data)
$client->getReceipts()->index($requestEntity)