Skip to content

InsologyStudio/fatture-in-cloud

Repository files navigation

FattureInCloud

Latest Version on Packagist Total Downloads

Laravel Fatture in Cloud service. Take a look at contributing.md to see a to do list.

Installation

Via Composer

composer require insologystudio/fatture-in-cloud

In your .env file add FATTURE_CLOUD_API_SECRET and FATTURE_CLOUD_COMPANY_ID.

Usage

Please reference to fattureincloud.it api docs. You can get an *Api class instance from the FattureInCloud service by calling a method with the same *Api class name less the Api suffix. E.g. Retrive ClientsApi by calling $fattureInCloud->clients().

<?php
namespace App\Http\Controllers;

use FattureInCloud\Model\ListClientsResponse;
use InsologyStudio\FattureInCloud\FattureInCloud;

class ClientController extends Controller
{
    /**
     * @param FattureInCloud $fattureInCloud
     * @return ListClientsResponse 
     * @throws \FattureInCloud\ApiException
     */
    public function index(FattureInCloud $fattureInCloud): ListClientsResponse
    {
        $companyId = config('fatture-in-cloud.company_id');

        $clients = $fattureInCloud->clients()->listClients($companyId);
        
        return $clients;
    }
}

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

About

Fatture in cloud api integration

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages