invoice: added support for the Invoice API, however `invoice list' is quite messy and `invoice view' is currently unimplemented.