Package: python-billomat
Billomat (http://www.billomat.com/): Online service
for quoting, billing and more.Invoices, estimates, reminders, credit notes, order confirmations,
delivery notes,…The billomat[API] is an open data and programming interface which
enables you to access the data in your Billomat account.python-billomatcan be used in Google App Engine (GAE).English API Description:http://www.billomat.com/en/apiDeutsche API Beschreibung:http://www.billomat.com/apiFeaturesCan be used in Google App Engine (GAE)RecurringsRecurring-ItemsRecurring-TagsRecurring-Email-ReceiversInvoicesInvoice-ItemsInvoice-TagsInvoice-PaymentsClientsClient-PropertiesClient-TagsContactsArticlesArticle-PropertiesArticle-TagsRemindersReminder-ItemsReminder-TagsEmail-TemplatesReminder-TextsCustomfield for metadata for every Billomat objectCredit-NotesCredit-Note-ItemsCredit-Note-TagsInstallationpip install python-billomatExamplesClientsimportpybillomatconn=pybillomat.Connection(billomat_id="<BillomatId>",billomat_api_key="<BillomatApiKey",)# Load one clientclient=pybillomat.Client(conn=conn,id=422909)printclient# --> Client(id=422909, name=u'TESTFIRMA', ...)# Iterate over ALL clients.# It loads the clients gradually. In pages of 30 clients.clients_iterator=pybillomat.ClientsIterator(conn=conn)clients_iterator.search()forclientinclients_iterator:assertisinstance(client,pybillomat.Client)printclient.name# Iterate over the first 10 clientsclients_iterator=pybillomat.ClientsIterator(conn=conn,per_page=10)clients_iterator.search()forclientinclients_iterator[:10]:assertisinstance(client,pybillomat.Client)printclient.name# Create new clientclient=pybillomat.Client.create(conn=conn,name=u"TEST-CUSTOMER with Umlauts ÖÄÜ",zip=u"6020",city=u"Innsbruck",country_code=u"AT",first_name=u"TEST-FIRSTNAME",last_name=u"TEST-LASTNAME",www=u"http://halvar.at/")assertisinstance(client,pybillomat.Client)printclient.name,unicode(client.id)Invoicesimportpybillomatconn=pybillomat.Connection(billomat_id="<BillomatId>",billomat_api_key="<BillomatApiKey",)# Load one invoiceinvoice=pybillomat.Invoice(conn=conn,id=884447)printinvoice# --> Invoice(address=u'TESTADRESSE', status=u'PAID', ...)# Iterate over the last 10 invoicesinvoices_iterator=pybillomat.InvoicesIterator(conn=conn,per_page=10)invoices_iterator.search(order_by="id DESC")forinvoiceininvoices_iterator[:10]:assertisinstance(invoice,pybillomat.Invoice)printinvoice.invoice_number,invoice.status# Iterate over all DRAFT-invoicesinvoices_iterator=pybillomat.InvoicesIterator(conn=conn)invoices_iterator.search(status="DRAFT")forinvoiceininvoices_iterator:assertisinstance(invoice,pybillomat.Invoice)printinvoice.label,repr(invoice.address),invoice.open_amount## Iterate over all DRAFT-invoices and complete all of them#invoices_iterator=pybillomat.InvoicesIterator(conn=conn)# Search DRAFT-invoicesinvoices_iterator.search(status="DRAFT")print"Found :",len(invoices_iterator)# Complete all DRAFT-invoicesforinvoiceininvoices_iterator:assertisinstance(invoice,pybillomat.Invoice)invoice.complete()# Search remaining DRAFT-invoicesinvoices_iterator.search(status="DRAFT")print"Found:",len(invoices_iterator)LicensesGNU Library or Lesser General Public License (LGPL)MIT License