Skip to content

Commit d04c967

Browse files
author
Evan Borgstrom
committed
Adding initial files
0 parents  commit d04c967

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Copyright (c) 2011, FatBox Inc.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above copyright
9+
notice, this list of conditions and the following disclaimer in the
10+
documentation and/or other materials provided with the distribution.
11+
* Neither the name of the FatBox Inc. nor the
12+
names of its contributors may be used to endorse or promote products
13+
derived from this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18+
DISCLAIMED. IN NO EVENT SHALL FATBOX INC. BE LIABLE FOR ANY
19+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
XeroPy
2+
======
3+
4+
This is a ORM style implementation of the [Xero API](http://developer.xero.com).
5+
6+
Overview
7+
--------
8+
9+
```python
10+
>>> from XeroPy import Xero, XeroException
11+
>>> from datetime import datetime
12+
>>> xero = Xero(XERO_CONSUMER_KEY,
13+
XERO_CONSUMER_SECRET,
14+
XERO_PRIVATE_KEY_FILE)
15+
>>> xero.contacts.all()
16+
[{u'Addresses': ({u'AddressType': u'STREET'}, {u'AddressType': u'POBOX'}),
17+
u'ContactID': u'9568059d-a856-44f4-8961-0060a3dabc8f',
18+
u'ContactStatus': u'ACTIVE',
19+
u'EmailAddress': u'130979849416st@corpmail.net',
20+
u'FirstName': u'first name',
21+
u'IsCustomer': False,
22+
u'IsSupplier': False,
23+
u'LastName': u'last name',
24+
u'Name': u'[TEST] 130979849416st',
25+
u'Phones': ({u'PhoneType': u'DEFAULT'},
26+
{u'PhoneType': u'FAX'},
27+
{u'PhoneType': u'DDI'},
28+
{u'PhoneType': u'MOBILE'}),
29+
u'UpdatedDateUTC': datetime.datetime(2011, 7, 4, 16, 54, 57, 653000)},
30+
...]
31+
32+
>>> xero.contacts.get("9568059d-a856-44f4-8961-0060a3dabc8f")
33+
{u'Addresses': ({u'AddressType': u'STREET'}, {u'AddressType': u'POBOX'}),
34+
u'ContactID': u'9568059d-a856-44f4-8961-0060a3dabc8f',
35+
u'ContactStatus': u'ACTIVE',
36+
u'EmailAddress': u'130979849416st@corpmail.net',
37+
u'FirstName': u'first name',
38+
u'IsCustomer': False,
39+
u'IsSupplier': False,
40+
u'LastName': u'last name',
41+
u'Name': u'[TEST] 130979849416st',
42+
u'Phones': ({u'PhoneType': u'DEFAULT'},
43+
{u'PhoneType': u'FAX'},
44+
{u'PhoneType': u'DDI'},
45+
{u'PhoneType': u'MOBILE'}),
46+
u'UpdatedDateUTC': datetime.datetime(2011, 7, 4, 16, 54, 57, 653000)}
47+
48+
>>> xero.contacts.filter(Since=datetime(2011,7,1))
49+
[{u'Addresses': ({u'AddressType': u'STREET'}, {u'AddressType': u'POBOX'}),
50+
u'ContactID': u'9568059d-a856-44f4-8961-0060a3dabc8f',
51+
u'ContactStatus': u'ACTIVE',
52+
u'EmailAddress': u'130979849416st@corpmail.net',
53+
u'FirstName': u'first name',
54+
u'IsCustomer': False,
55+
u'IsSupplier': False,
56+
u'LastName': u'last name',
57+
u'Name': u'[TEST] 130979849416st',
58+
u'Phones': ({u'PhoneType': u'DEFAULT'},
59+
{u'PhoneType': u'FAX'},
60+
{u'PhoneType': u'DDI'},
61+
{u'PhoneType': u'MOBILE'}),
62+
u'UpdatedDateUTC': datetime.datetime(2011, 7, 4, 16, 54, 57, 653000)},
63+
...]
64+
```
65+
66+
TODO
67+
----
68+
More docs & tests
69+
70+
71+
Copyright (c) 2011 FatBox Inc.

0 commit comments

Comments
 (0)