PHP code example of webleit / revisoapi

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

    

webleit / revisoapi example snippets



$reviso = new \Webleit\RevisoApi\Reviso($appSecretToken, $agreementGrantToken);


$reviso = new \Webleit\RevisoApi\Reviso($appSecretToken, $agreementGrantToken, $yourHttpClient);

$reviso = new \Webleit\RevisoApi\Reviso();
 
$reviso->getEndpoints();

$customers = $reviso->customers->get();

$groups = $reviso->customerGroups->get();

$customers = $reviso->customers->get();

$customers = $reviso->customers->page(1)->perPage(100)->get();

$customers = $reviso->customers->where('corporateIdentificationNumber', '=', '123456789')->get();

$customers = $reviso->customers->page(1)->perPage(100)->get();

$customers = $reviso->customers->get();

$data = $customers->toArray();
$json = $customers->toJson();

// After fetch filtering in php
$filtered = $customers->where('accountNumber', '>', 200);

// Grouping
$filtered = $customers->groupBy('country');


$customer = $reviso->customers->get($accuntNumber);
$data = $customer->toArray();
$name = $customer->name;


$data = [
    /** Data of the customer */
];
$customer = $reviso->customers->create($data);

$customer = $reviso->customers->find($accountNumber);

$data = [
    /** Data of the customer */
];
$customer = $reviso->customers->find($accountNumber);
$customer->save($data);

$data = [
    /** Data of the customer */
];
$customer = $reviso->customers->find($accountNumber);
$customer->delete();