QuickBooks Web Connector SDK (unofficial)
NOTE: WIP
make dev
- Make changes
make test
- Manually test changes (see below) against a QBWC
QBWC_USER=user QBWC_PASSWORD=password QBWC_HOST=http://host.com QBWC_PORT=8166 ./env/bin/ipython
import qbwc
<exercise code>
make xml
scraps api-reference site for qbwc from intuit.com and constructs and XML document per resource.
make xml
make types # types must be regenerated
[Re]Generates intermediate files from XML and produces types.py
make types
make test
- Inc version in setup.py according to semantic versioning rules in it's own commit
- Make PR and merge
- Checkout master
git tag <version in setup.py>
git push --tags
cp .pypirc.example ~/.pypirc
- Edit
~/.pypirc
, populate[soc]
section with credentials make deploy
- Done
make env
./env/bin/pip install -e . # editable install
QBWC_USER=user QBWC_PASSWORD=password QBWC_HOST=http://host.com QBWC_PORT=8166 ./env/bin/python
>>> import qbwc
>>> qbwc.rq({'CheckQueryRq': {'MaxReturned': 5}})
{'CheckQueryRs': {'CheckRet': [<Check>, <Check>]}}
>>> import qbwc
>>> qbwc.rq({'CheckQueryRq': [
{'TxnDateRangeFilter': {'DateMacro': 'ThisWeek'}},
{'TxnDateRangeFilter': {'DateMacro': 'LastWeek'}}
]})
{'CheckQueryRs': [{'CheckRet': [<Check>, <Check>]}, {'CheckRet': [<Check>, <Check>]}]}
>>> import qbwc
>>> qbwc.rq({
'CheckQueryRq': {
'TxnDateRangeFilter': {'DateMacro': 'ThisWeek'}
},
'PurchaseOrderQueryRq': {
'ItemInventoryQueryRq': {
'ActiveStatus': 'ActiveOnly'
}
}
})
{'CheckQueryRs': [{'CheckRet': [<Check>, <Check>]}],
'PurchaseOrderQueryRs': [{'PurchaseOrderRet': [<PurchaseOrder>, <PurchaseOrder>, <etc>]}]
For now, see:
qbwc/generated/types.py
ending with Rq to learn how to construct requests. Includes all supportedEnum
types and all cases ofUnion[val, List[val]]
where a param can be repeated.data/json/*.json
for Rq documentation showing nested params in a json format.data/xml/*.xml
documentation scraped and reconstructed from https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference. Also, used to generate python types.
_NOTE: In XML, comments that read <!-- options|required|may repeat -->
apply to param immediately above. Comments that read <!--