aleaforny / python-invoice-generator

Small and easy-to-use library to use Invoice Generator API with Python
GNU General Public License v3.0
36 stars 16 forks source link

Adding a custom field results in an error. #2

Closed nanthony21 closed 3 years ago

nanthony21 commented 3 years ago

The following code results in an error when trying to download.

inv = InvoiceGenerator("MyName", "CustomerName", number=1, payments_terms="Terms", notes="MyNotes")
inv.add_custom_field("Account", '123456789')
inv.add_item("Item1", 1, 120, "description")
inv.download('invoice.pdf')
Exception: Invoice download request returned response code: 400. {'error': "The option 'quantity' does not exist. Defined options are: 'name', 'value'."}

If I comment out the add_custom_field line then it works fine.