zfr/zfr-quaderno

PHP library for interacting with the Quaderno REST API

v1.0.4 2015-02-09 15:22 UTC

This package is auto-updated.

Last update: 2024-10-29 04:59:07 UTC


README

Latest Stable Version

ZfrQuaderno is a modern PHP library based on Guzzle for Quaderno invoicing system.

Dependencies

If you are using ZF2, you can use the module that simplify its usage: ZfrQuadernoModule

Installation

Installation of ZfrQuaderno is only officially supported using Composer:

php composer.phar require zfr/zfr-quaderno:1.*

Tutorial

Currently, ZfrQuaderno only implements a very limited subset of the Quaderno API. It will be extended in the future.

First, you need to instantiate the Quaderno client, passing your account name and token (you can find those in your Quaderno dashboard). A third parameter can be passed to true to enable the client in sandbox mode.

$client = new QuadernoClient('account-name', 'my_token');
$client->createWebhook([
    'url'         => 'https://mylistener.com',
    'event_types' => ['invoice.created']
]);

Complete reference

Here is a complete list of all methods:

CONTACT RELATED METHODS:

  • array getContacts(array $args = array())
  • array getContact(array $args = array())
  • array getStripeContact(array $args = array())
  • array updateContact(array $args = array())

INVOICE RELATED METHODS:

  • array getInvoices(array $args = array())
  • array getInvoice(array $args = array())
  • array deliverInvoice(array $args = array())

WEBHOOK RELATED METHODS:

  • array getWebhooks(array $args = array())
  • array getWebhook(array $args = array())
  • array createWebhook(array $args = array())
  • array updateWebhook(array $args = array())
  • array deleteWebhook(array $args = array())

TAXES RELATED METHODS:

  • array calculateTaxes(array $args = array())