{ "info": { "author": "Mario Falcao", "author_email": "mario@bitsiders.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "==========================\nInvoiceXpress API - Python\n==========================\n\n.. image:: https://img.shields.io/pypi/v/invoicexpress_api.svg\n :alt: PyPI\n :target: https://pypi.python.org/pypi/invoicexpress_api\n\n.. image:: https://api.travis-ci.org/bitmario/invoicexpress-api-python.svg?branch=master\n :alt: Build Status\n :target: https://travis-ci.org/bitmario/invoicexpress-api-python\n\n.. image:: https://img.shields.io/badge/python-3.3%2C%203.4%2C%203.5%2C%203.6-blue.svg\n :alt: Python 3.3, 3.4, 3.5, 3.6\n :target: https://travis-ci.org/bitmario/invoicexpress-api-python\n\n.. image:: https://img.shields.io/badge/license-MIT-blue.svg\n :alt: MIT License\n :target: https://github.com/bitmario/invoicexpress-api-python/blob/master/LICENSE.txt\n\n\nThin Python 3 wrapper for the InvoiceXpress REST API. Currently rough and incomplete.\n\nAPI docs at: https://developers.invoicexpress.com/docs/versions/2.0.0/\n\nIncluded APIs\n-------------\n\n================== =========\nAPI Done in\n================== =========\nInvoices_ v0.1.0\nEstimates_ to-do\nGuides_ to-do\n`Purchase Orders`_ to-do\nClients_ v0.1.0\nItems_ to-do\nSequences_ to-do\nTaxes_ to-do\nAccounts_ to-do\nSAF-T_ to-do\n================== =========\n\n.. _Invoices: https://developers.invoicexpress.com/docs/versions/2.0.0/resources/invoices\n.. _Estimates: https://developers.invoicexpress.com/docs/versions/2.0.0/resources/estimates\n.. _Guides: https://developers.invoicexpress.com/docs/versions/2.0.0/resources/guides\n.. _`Purchase Orders`: https://developers.invoicexpress.com/docs/versions/2.0.0/resources/purchase-orders\n.. _Clients: https://developers.invoicexpress.com/docs/versions/2.0.0/resources/clients\n.. _Items: https://developers.invoicexpress.com/docs/versions/2.0.0/resources/items\n.. _Sequences: https://developers.invoicexpress.com/docs/versions/2.0.0/resources/sequences\n.. _Taxes: https://developers.invoicexpress.com/docs/versions/2.0.0/resources/taxes\n.. _Accounts: https://developers.invoicexpress.com/docs/versions/2.0.0/resources/accounts\n.. _SAF-T: https://developers.invoicexpress.com/docs/versions/2.0.0/resources/saf-t\n\nInstallation\n------------\n\nAutomatic install via pip:\n\n.. code-block:: bash\n\n $ pip install invoicexpress-api\n\n\nUsage\n-----\n\nSetup\n^^^^^\n.. code-block:: pycon\n\n >>> import invoicexpress_api as ie\n >>> c = ie.Client('my_account_name', 'my_api_key')\n\nCreate an invoice\n^^^^^^^^^^^^^^^^^\n.. code-block:: pycon\n\n >>> invoice_type = ie.invoices.Types.INVOICE_RECEIPT\n >>> invoice_data = {\n \"invoice\": {\n \"date\": \"17/04/2018\",\n \"due_date\": \"17/04/2018\",\n \"client\": {\n \"name\": \"John Doe\",\n \"code\": \"XYZ123\"\n },\n \"items\": [\n {\n \"name\": \"SRV1\",\n \"description\": \"Service 1\",\n \"unit_price\": 10.0,\n \"quantity\": 5.0,\n \"tax\": {\n \"name\": \"IVA23\"\n }\n }\n ]\n }\n }\n >>> ie.invoices.create(c, invoice_data, invoice_type)\n {\n 'invoice_receipt':{\n 'id':12345678,\n 'status':'draft',\n 'archived':False,\n 'type':'InvoiceReceipt',\n 'sequence_number':'rascunho',\n 'date':'17/04/2018',\n 'due_date':'17/04/2018',\n 'reference':None,\n 'observations':None,\n 'retention':None,\n 'permalink':'https://www.app.invoicexpress.com/documents/113a4152...',\n 'sum':50.0,\n 'discount':0.0,\n 'before_taxes':50.0,\n 'taxes':11.5,\n 'total':61.5,\n 'currency':'Euro',\n 'client':{\n 'id':1234567,\n 'name':'John Doe',\n 'code':'XYZ123'\n },\n 'items':[\n {\n 'name':'SRV1',\n 'description':'Service 1',\n 'unit_price':'10.0',\n 'unit':None,\n 'quantity':'5.0',\n 'tax':{\n 'id':123456,\n 'name':'IVA23',\n 'value':23.0\n },\n 'discount':0.0,\n 'subtotal':50.0,\n 'tax_amount':11.5,\n 'discount_amount':0.0,\n 'total':61.5\n }\n ]\n }\n }\n\nFetch and update an invoice\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n.. code-block:: pycon\n\n >>> inv = ie.invoices.get(c, 12345678, invoice_type)\n >>> inv[invoice_type]['items'][0]['unit_price'] = 150\n >>> ie.invoices.update(c, 12345678, inv, invoice_type)\n >>> ie.invoices.get(c, 12345678, invoice_type)\n {\n 'invoice_receipt':{\n 'id':12345678,\n 'status':'settled',\n 'archived':False,\n 'type':'InvoiceReceipt',\n 'sequence_number':'1/A',\n 'inverted_sequence_number':'A/1',\n 'sequence_id':123456,\n 'date':'17/04/2018',\n 'due_date':'17/04/2018',\n 'reference':None,\n 'observations':None,\n 'retention':None,\n 'permalink':'https://www.app.invoicexpress.com/documents/113a4152...',\n 'saft_hash':'iyuX',\n 'sum':750.0,\n 'discount':0.0,\n 'before_taxes':750.0,\n 'taxes':172.5,\n 'total':922.5,\n 'currency':'Euro',\n 'client':{\n 'id':1234567,\n 'name':'John Doe',\n 'code':'XYZ123',\n },\n 'items':[\n {\n 'name':'SRV1',\n 'description':'Service 1',\n 'unit_price':'150.0',\n 'unit':None,\n 'quantity':'5.0',\n 'tax':{\n 'id':123456,\n 'name':'IVA23',\n 'value':23.0\n },\n 'discount':0.0,\n 'subtotal':750.0,\n 'tax_amount':172.5,\n 'discount_amount':0.0,\n 'total':922.5\n }\n ]\n }\n }\n\n\nSet invoice state and send by e-mail\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n.. code-block:: pycon\n\n >>> ie.invoices.change_state(c, 12345678, ie.invoices.States.FINAL)\n >>> ie.invoices.send_email(c, 12345678, 'name@domain.tld',\n\t\t\t 'New invoice!',\n\t\t\t 'Hi John,\\r\\nHere is your invoice\\r\\nRegards,')\n\nLicense\n--------\n\nMIT License. See the `LICENSE \n`_ \nfile for details.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bitmario/invoicexpress-api-python", "keywords": "invoicexpress_api", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "invoicexpress-api", "package_url": "https://pypi.org/project/invoicexpress-api/", "platform": "", "project_url": "https://pypi.org/project/invoicexpress-api/", "project_urls": { "Homepage": "https://github.com/bitmario/invoicexpress-api-python" }, "release_url": "https://pypi.org/project/invoicexpress-api/0.1.2/", "requires_dist": [ "requests (>=2.0.1)" ], "requires_python": "", "summary": "Thin Python 3 wrapper for the InvoiceXpress REST API", "version": "0.1.2" }, "last_serial": 3777277, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a2b8793ce546b2e2b3dcb97c2eef91f8", "sha256": "9329da4eb6a82f8e34bdad93d0bd2681c158cfea3e2119e6f5001ce488a27db4" }, "downloads": -1, "filename": "invoicexpress_api-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a2b8793ce546b2e2b3dcb97c2eef91f8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3679, "upload_time": "2018-04-17T05:30:18", "url": "https://files.pythonhosted.org/packages/72/3b/5d15478ad6b5664dda4f4fe65bc1137da96aed80da2273411cb55ee7e781/invoicexpress_api-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "638f1af8bbb005d14a40297cec33b242", "sha256": "952239ea713ee6ddacc732d55d693160238ea029ba28a6e8d033eaff26673f13" }, "downloads": -1, "filename": "invoicexpress_api-0.1.0.tar.gz", "has_sig": false, "md5_digest": "638f1af8bbb005d14a40297cec33b242", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3498, "upload_time": "2018-04-17T05:30:19", "url": "https://files.pythonhosted.org/packages/c9/77/aba3e9d03ed2bb74eb2937ba5a7199d80fc7300eb56131213882d2ec2bb8/invoicexpress_api-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "972be30f86bde04c4a010a0805f5e5d1", "sha256": "3578e814f080b0bf010ec7ad050ecf411ed7451bd9624e1e8a010d80cd799cea" }, "downloads": -1, "filename": "invoicexpress_api-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "972be30f86bde04c4a010a0805f5e5d1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4295, "upload_time": "2018-04-17T15:43:12", "url": "https://files.pythonhosted.org/packages/60/64/4d2418e4c2c778f521ceac4d73a61890863d1a5c5eb316303592e4abd5fa/invoicexpress_api-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d3297a430dba9195c365a10189e9efa5", "sha256": "c10fc4486e08f66829216258374113127d4247e2fe0b53406ca1733f27b52b0b" }, "downloads": -1, "filename": "invoicexpress_api-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d3297a430dba9195c365a10189e9efa5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3678, "upload_time": "2018-04-17T15:43:13", "url": "https://files.pythonhosted.org/packages/7d/5a/842ca894daea13ee01ea9c6588ea79c2db488584ab0572aebd1308b4c426/invoicexpress_api-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "9eb7800c3e3ed11f3182be141e154142", "sha256": "bd525445cf9b0f9f4a01c45e70ecc273affde73ad9b62a2712b4ec7593ebe8ab" }, "downloads": -1, "filename": "invoicexpress_api-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9eb7800c3e3ed11f3182be141e154142", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5045, "upload_time": "2018-04-18T13:57:47", "url": "https://files.pythonhosted.org/packages/f5/ac/636b41c4672f94770884133d73cf222ec31b42bd5d757b3279211888b136/invoicexpress_api-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df626767af0e3a8ce0373d82333b639c", "sha256": "12dbdbb0cbb50e780420b5011846ac23dab26346908574810320ae9b33379f6d" }, "downloads": -1, "filename": "invoicexpress_api-0.1.2.tar.gz", "has_sig": false, "md5_digest": "df626767af0e3a8ce0373d82333b639c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4728, "upload_time": "2018-04-18T13:57:48", "url": "https://files.pythonhosted.org/packages/aa/6b/4725f6f0e12d445b25c9ee813c32e8e8562a2c1b2ec6c4b5c72355f12af9/invoicexpress_api-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9eb7800c3e3ed11f3182be141e154142", "sha256": "bd525445cf9b0f9f4a01c45e70ecc273affde73ad9b62a2712b4ec7593ebe8ab" }, "downloads": -1, "filename": "invoicexpress_api-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9eb7800c3e3ed11f3182be141e154142", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5045, "upload_time": "2018-04-18T13:57:47", "url": "https://files.pythonhosted.org/packages/f5/ac/636b41c4672f94770884133d73cf222ec31b42bd5d757b3279211888b136/invoicexpress_api-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df626767af0e3a8ce0373d82333b639c", "sha256": "12dbdbb0cbb50e780420b5011846ac23dab26346908574810320ae9b33379f6d" }, "downloads": -1, "filename": "invoicexpress_api-0.1.2.tar.gz", "has_sig": false, "md5_digest": "df626767af0e3a8ce0373d82333b639c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4728, "upload_time": "2018-04-18T13:57:48", "url": "https://files.pythonhosted.org/packages/aa/6b/4725f6f0e12d445b25c9ee813c32e8e8562a2c1b2ec6c4b5c72355f12af9/invoicexpress_api-0.1.2.tar.gz" } ] }