blackoptic/xerobundle

Symfony2 Bundle that creates an Guzzle client for Xero

Installs: 465

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 3

Forks: 4

Open Issues: 4

Type:symfony-bundle

dev-master 2015-10-07 10:09 UTC

This package is not auto-updated.

Last update: 2024-04-09 03:26:52 UTC


README

XeroBundle makes it easy to communicate with the Xero api using the Guzzle library

How to get started

  1. Add the following to your composer.json file

        "require": {
            ...
            "blackoptic/xerobundle": "*"
            ...
        }
  2. Run php composer.phar update "blackoptic/xerobundle"

  3. Register the bundle in your app/AppKernel.php:

        <?php
        ...
        public function registerBundles()
        {
            $bundles = array(
                ...
                new BlackOptic\Bundle\XeroBundle\BlackOpticXeroBundle(),
                ...
            );
        ...
  4. Add the config for your account details:

     black_optic_xero:
         consumer_key: <Your Consumer Key>
         consumer_secret: <Your Consumer Secret>
         private_key: <Path to you private key>
  5. Request and use the service:

        $xeroClient = $this->get('blackoptic.xero.client');
        $response = $xeroClient->get('Invoices')->send();