Skip to content

Commit 089e696

Browse files
committed
Fix up docs
1 parent 02c1312 commit 089e696

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# silverstripe-xero
2+
3+
## Maintainer Contact
4+
5+
* Will Rossiter <[email protected]>
6+
7+
## Installation
8+
9+
> composer require "fullscreeninteractive/silverstripe-xero"
10+
11+
## Documentation
12+
13+
Provides a lightweight wrapper around `calcinai/xero-php` with additional
14+
Silverstripe support for authenication and connecting applications via oauth.
15+
16+
To setup register a Xero Application and define your clientId and clientSecret
17+
as environment variables.
18+
19+
```
20+
XERO_CLIENT_ID='123'
21+
XERO_CLIENT_SECRET='123'
22+
```
23+
24+
Once those API keys are available, a new tab under the `Settings` admin will
25+
appear for connecting to Xero. Follow the prompts to link the selected account
26+
to your Silverstripe website.
27+
28+
## Interacting with the API
29+
30+
```
31+
/** @var \XeroPHP\Application **/
32+
$app = XeroFactory::singleton()->getApplication();
33+
```
34+
35+
Integrating with the API is done via https://github.com/calcinai/xero-php.
36+
Consult that page for further information for creating invoices etc.
37+

0 commit comments

Comments
 (0)