improvements to README

master
Marek Isalski 3 years ago
parent c74e2edb36
commit 2df82ce3c5

@ -34,17 +34,18 @@ sudo python setup.py install
**Get account details**
```python
from sipcentric import API, Partner, Customer
from sipcentric import API, Partner, Customer, ACCOUNTTYPE_BUSINESS
api = API(username="myusername", password="mypassword")
# Simwood Partners can interact with Sipcentric and create new Customers
partner = Partner(api)
for customer in partner.customers():
print(customer.data['name'])
print(customer.data['company'])
newcust = Customer(api)
newcust.create(company="Acme Ltd", firstName="Hayes", lastName="Murphy", email="hayes@example.com",
address1="24 Acacia Avenue", city="", postcode="FX5 7HQ", telephone="03069990000")
newcust.create(accountType=ACCOUNTTYPE_BUSINESS,
company="Acme Ltd", firstName="Hayes", lastName="Murphy", email="hayes@example.com",
address1="24 Acacia Avenue", city="Newton", postcode="FX5 7HQ", telephone="03069990000")
# if your API credentials are for a Customer account:
customer = Customer(api, "me")

Loading…
Cancel
Save