improvements to README
This commit is contained in:
parent
c74e2edb36
commit
2df82ce3c5
@ -34,17 +34,18 @@ sudo python setup.py install
|
|||||||
**Get account details**
|
**Get account details**
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from sipcentric import API, Partner, Customer
|
from sipcentric import API, Partner, Customer, ACCOUNTTYPE_BUSINESS
|
||||||
|
|
||||||
api = API(username="myusername", password="mypassword")
|
api = API(username="myusername", password="mypassword")
|
||||||
|
|
||||||
# Simwood Partners can interact with Sipcentric and create new Customers
|
# Simwood Partners can interact with Sipcentric and create new Customers
|
||||||
partner = Partner(api)
|
partner = Partner(api)
|
||||||
for customer in partner.customers():
|
for customer in partner.customers():
|
||||||
print(customer.data['name'])
|
print(customer.data['company'])
|
||||||
newcust = Customer(api)
|
newcust = Customer(api)
|
||||||
newcust.create(company="Acme Ltd", firstName="Hayes", lastName="Murphy", email="hayes@example.com",
|
newcust.create(accountType=ACCOUNTTYPE_BUSINESS,
|
||||||
address1="24 Acacia Avenue", city="", postcode="FX5 7HQ", telephone="03069990000")
|
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:
|
# if your API credentials are for a Customer account:
|
||||||
customer = Customer(api, "me")
|
customer = Customer(api, "me")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user