Open jkaessens opened 2 years ago
You're right, Voucher is missing both the Storable
and the Updatable
trait. But at least according to the API docs, there's no way to delete an invoice.
Adding the such traits is pretty simple if the implementation is the default one. The generic example is the "Contacts" implementation. For most cases, adding an empty impl for the trait is enough.
To circumvent lexoffice's inability to create invoices for custom templates, I'm pulling invoice drafts from the API, use the invoice data to create a PDF and upload the PDF back to lexoffice as a file. With the crate, I created a new
Voucher
but I cannotPOST
it to the API. The very last step would be the removal of the invoice draft.It looks like
Voucher
would need aStorable
impl andInvoice
would need aDeletable
impl for this workflow.I'll try to implement it on my own and make a PR but maybe you can give a few hints.
Also, thanks for all the work!