PHP code example of drakakisgeo / billit

1. Go to this page and download the library: Download drakakisgeo/billit 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/ */

    

drakakisgeo / billit example snippets

 php
$client = resolve('billit');
 php
Billit::myAccount();
 php
use Drakakisgeo\Billit\Billit;

$client = new Billit('yourToken');
$client->contacts();
 php
$client->myAccount();
 php
$client->contacts();
 php
$client->contactCreate([
    'customerType' => 'company',
    'company' => 'Awesome S.A.',
    'inCharge' => 'Kalampakopoulos George',
    'lang' => 'el',
    'VatId'=>'075101010'
]);
 php
$client->contactUpdate([
    'customerType' => 'company',
    'company' => 'Awesome S.A.',
    'inCharge' => 'Kalampakopoulos George',
    'lang' => 'el',
    'VatId'=>'075101010'
]);
 php
$client->contactShow(1010);
 php
$client->contactDelete(1010);
 php
$client->invoiceCreate([
    "customerId"=>694,
    "sendMail"=> false,
    "excludeMydata"=> true,
    "invoiceDate"=>"2021-04-15",
    "invoiceTypeId"=>349,
    "isPaid" => true,
    "mydataInvoiceType" => "2.1",
    "taxes"=> [
        [
            "taxId"=> 514
        ],
        [
            "taxId"=> 524,
            "taxVatShow"=> 1
        ]
    ],
    "products"=> [
        [
            "productId"=> null,
            "details"=> "test",
            "measurementUnit"=> 1,
            "vatId" => 376,
            "price" => 123.32,
            "quantity"=> 1,
            "incomeClassificationCat"=>"category1_3",
            "incomeClassificationType"=>"E3_561_001"
        ]
    ],
    "tags" => ["billit","test-tag"],
    "mydataPayment"=>[
        "paidAmount"=> 0.32,
        "paymentMethod"=> 3,
        "epiPistosi"=> 10
    ]
]
);