Skip to content

Commit

Permalink
Fix up docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Sep 15, 2021
1 parent 02c1312 commit 089e696
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# silverstripe-xero

## Maintainer Contact

* Will Rossiter <[email protected]>

## Installation

> composer require "fullscreeninteractive/silverstripe-xero"
## Documentation

Provides a lightweight wrapper around `calcinai/xero-php` with additional
Silverstripe support for authenication and connecting applications via oauth.

To setup register a Xero Application and define your clientId and clientSecret
as environment variables.

```
XERO_CLIENT_ID='123'
XERO_CLIENT_SECRET='123'
```

Once those API keys are available, a new tab under the `Settings` admin will
appear for connecting to Xero. Follow the prompts to link the selected account
to your Silverstripe website.

## Interacting with the API

```
/** @var \XeroPHP\Application **/
$app = XeroFactory::singleton()->getApplication();
```

Integrating with the API is done via https://github.com/calcinai/xero-php.
Consult that page for further information for creating invoices etc.

0 comments on commit 089e696

Please sign in to comment.