PHP code example of rentlio / api.lib.php

1. Go to this page and download the library: Download rentlio/api.lib.php 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/ */

    

rentlio / api.lib.php example snippets


use Rentlio\Api\Client;
    
$client = new Client("put your api key here");


use Rentlio\Api\Client;
use Rentlio\Api\Request\CreateInvoiceItemForReservationRequest;
use Rentlio\Api\Request\Data\InvoiceItem;

$client = new Client("put your api key here");

$request     = new CreateInvoiceItemForReservationRequest(45);
$invoiceItem = new InvoiceItem("cola", 13.99, 0.5);
$invoiceItem->addPDVTax(13);
$request->setInvoiceItem($invoiceItem);

$response = $client->send($request);


use Rentlio\Api\Client;

$client   = new Client("put your api key here");
$response = $client->listAllServicesPaymentTypes();

echo $response->getBody()->getContents();