Skip to content
Michael Newman edited this page Sep 24, 2018 · 6 revisions

Installation

Recommended installation is through Composer.

console:

composer require servality/xero:dev-master

or add to composer.json:

    {
      "require": {
      "servality/xero": "dev-master"
      }
    }

Basic Usage

$config = [
       'oauth' => [
           'consumer_key' => 'appication_consumer_key',
           'consumer_secret' => 'appication_consumer_secret',
           'private_key_file' => 'path/to/private_key.pem',
           'private_key_passphrase' => 'passphrase'
       ],
       'response' => 'json', //json or xml
       'user_agent' => 'application_name'
   ]

$xero = new XeroApplication($config);

$xero->invoices()->get(); //return all invoices

Request Parameters

Request parameters can be chained and must be followed by a get, create or update method to complete the request.

$xero = new XeroApplication($config);

$xero->contacts()-where()->page()->get();
Clone this wiki locally