sharis-gmbh/debitoorapiclient

Provides an implementation of the debitoor api in a php client

dev-master 2019-10-15 15:29 UTC

This package is not auto-updated.

Last update: 2024-04-25 11:18:29 UTC


README

Debitoor php api clent library, Work in progress

Usage :

You can instantiate an api for each types of services :

  • Customers
  • DraftInvoices
  • Invoices
  • Expenses
  • Products
  • Quotes
  • etc.

Each service provides an interface to the methods provided in debitoor api, you can see what is in "Services/servicename.json" to check what parameters can be sent.

Example :

$customerService = DebitoorApiClient::getService('Customers', array('access_token' => $auth_token));

// list customers
$customerService->getCustomers();

// get customer by id
$customerService->getCustomer(array('customer_id' => 'your customer id'));


// create customer
$customerService->createCustomer(
    array(
        'name'          => 'your customer name',
        'address'       => 'customer address',
        'email'         => 'customer@debitoor',
        'phone'         => '000-000-00-00',
        ...
    )
);


// update customer
$customerService->updateCustomer(
    array(
        'customer_id'   => 'your customer id',
        'name'          => 'your customer name',
        'address'       => 'customer address',
        'email'         => 'customer@debitoor',
        'phone'         => '000-000-00-00',
        ...
    )
);