-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Michael Newman edited this page Sep 24, 2018
·
6 revisions
Recommended installation is through Composer.
console:
composer require servality/xero:dev-master
or add to composer.json:
{
"require": {
"servality/xero": "dev-master"
}
}
$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 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();