2017 © Pedro Peláez
 

library fattureincloud

FattureInCloud API PHP SDK

image

silverbackstudio/fattureincloud

FattureInCloud API PHP SDK

  • Monday, July 30, 2018
  • by brandomeniconi
  • Repository
  • 1 Watchers
  • 2 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 80 % Grown

The README.md

PHP API for FattureInCloud.it

Classes are keep updated with the Documentation at https://api.fattureincloud.it/v1/documentation/dist/, (*1)

You can find your KEYS at https://secure.fattureincloud.it/api, (*2)

Available API Objects

Each API Method found in the API doc has its Class, here is a list of the currently available ones:, (*3)

more will be available as soon as we have time to map it. Make a PR if you need a missing one., (*4)

Usage

Create a simple invoice

use Svbk\FattureInCloud;
use Svbk\FattureInCloud\Struct\DocNuovoArticolo as Product;
use Svbk\FattureInCloud\Struct\DocNuovoRequest as Invoice;
use Svbk\FattureInCloud\Struct\DocNuovoPagamento as Payment;

$client = new FattureInCloud\Client( 'API_UID', 'API_KEY' );

$invoiceProduct = new Product(
  array(
    'nome' => 'Product Name',
    'prezzo_lordo' => 10,
    'cod_iva' => 0,
  )
);

$payment_date = FattureInCloud\Date::createFromFormat( 'Y-m-d H:i:s', date('Y-m-d H:i:s') ); //now
$expire_date = $payment_date;

$invoicePayment = new Payment(
  array(
    'data_scadenza' => $expire_date,
    'importo' => 'auto', //calculate invoice total automatically
    'metodo' => '{{wallet_id}}', //place here your wallet identifier
    'data_saldo' => $payment_date,
  )
);

$newInvoice = new Invoice( 
  array(
    // New Customer will be created by passing details directly.
    'nome' => 'Customer Name',
    'indirizzo_via' => 'Customer Address',
    'indirizzo_cap' => '50000',  //Postal Code
    'indirizzo_citta' => 'Customer City',
    'indirizzo_provincia' => 'Customer State/Province',
    'piva' => 'VATID000000', //vat ID
    'cf' => 'FISCALCODEXXXXX',
    'paese' => 'Customer Country', //must be obtained via $client->getInfoList( array( 'lista_paesi' ) );
    'lista_articoli' => array( $invoiceProduct ),
    'lista_pagamenti' => array( $invoicePayment ),
    'prezzi_ivati' => true, // VAT included
  )
);

$result = $client->createDoc( FattureInCloud\Client::TYPE_FATTURA, $newInvoice );

if ( $result && ! $result->error ) {
  $invoice_id = $result->new_id;
} else {
  die( sprintf( '[FattureInCloud] Can\'t create invoice. Error: %s', isset($result->error) ? $result->error : '' ) );   
}

The Versions

30/07 2018

dev-master

9999999-dev https://github.com/silverbackstudio/fattureincloud/

FattureInCloud API PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

api rest sdk client web service fattureincloud

30/07 2018

1.1.5

1.1.5.0 https://github.com/silverbackstudio/fattureincloud/

FattureInCloud API PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

api rest sdk client web service fattureincloud

07/06 2018

1.1.4

1.1.4.0 https://github.com/silverbackstudio/fattureincloud/

FattureInCloud API PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

api rest sdk client web service fattureincloud

26/01 2018

1.1.3

1.1.3.0 https://github.com/silverbackstudio/fattureincloud/

FattureInCloud API PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

api rest sdk client web service fattureincloud

11/12 2017

1.1.2

1.1.2.0 https://github.com/silverbackstudio/fattureincloud/

FattureInCloud API PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

api rest sdk client web service fattureincloud

08/08 2017

1.0

1.0.0.0 https://github.com/silverbackstudio/fattureincloud/

FattureInCloud API PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

api rest sdk client web service fattureincloud