pwitab / visma

A Python Client library for integration to Visma eAccounting, Visma eEkonomi
http://visma.readthedocs.io
BSD 3-Clause "New" or "Revised" License
7 stars 4 forks source link

Validate input arguments. #3

Open Krolken opened 6 years ago

Krolken commented 6 years ago

It is possible to supply a model with wrong input arguments and this might lead to unexpected errors.

for exemple

invoice = CustomerInvoiceDraft(customer_id=customer.id,
                                       invoe_customer_name='test',
                                       invoice_postal_code='25459',
                                       invoice_city='Helsingborg',
                                       customer_is_private_person=False)

We should validate that all input arguments to creating of an object acctually exists as a field on the model.