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

Updating CustomerInvoiceDraft not working #12

Closed Krolken closed 5 years ago

Krolken commented 6 years ago

The integration test of updating a CustomerInvoiceDraft is no longer passing.

Seems like it does not return the the updated object on PUT and GET on the object after update is also not reflecting the update.

I have so far only tested the field invoice_customer_name since the test is not for all fields but just for the updating flow. The PUT gets 200 OK. Ett av mina integrationstester för Customer invoice Drafts går inte längre igenom.

GET to receive the CustomerInvoiceDraft return:

{"Id":"bc441d97-2f43-4d99-bb25-cf9dd0fb76e3","CustomerId":"a4247bd2-45d7-4a98-a69f-af40830deb67","CreatedUtc":"2018-07-27T13:08:08.1534715Z","IsCreditInvoice":false,"RotReducedInvoicingType":0,"RotReducedInvoicingPropertyName":null,"RotReducedInvoicingOrgNumber":null,"RotReducedInvoicingAmount":0.0,"RotReducedInvoicingAutomaticDistribution":false,"RotPropertyType":null,"HouseWorkOtherCosts":null,"Rows":[],"Persons":[],"YourReference":null,"OurReference":null,"InvoiceCustomerName":"TestCustomer AB","InvoiceAddress1":null,"InvoiceAddress2":null,"InvoicePostalCode":"25234","InvoiceCity":"Helsingborg","InvoiceCountryCode":"SE","InvoiceCurrencyCode":"SEK","DeliveryCustomerName":null,"DeliveryAddress1":null,"DeliveryAddress2":null,"DeliveryPostalCode":null,"DeliveryCity":null,"DeliveryCountryCode":null,"DeliveryMethodName":null,"DeliveryTermName":null,"DeliveryMethodCode":null,"DeliveryTermCode":null,"EuThirdParty":false,"CustomerIsPrivatePerson":false,"ReverseChargeOnConstructionServices":false,"SalesDocumentAttachments":[],"InvoiceDate":"2018-07-27T13:08:08.1534715Z","DeliveryDate":null,"TotalAmount":0.0,"TotalVatAmount":0.0,"TotalRoundings":0.0,"TotalAmountBaseCurrency":0.0,"TotalVatAmountBaseCurrency":0.0,"CustomerNumber":"107","IncludesVat":false}

"InvoiceCustomerName":"TestCustomer AB"

PUT to updated object sent:

{"DeliveryPostalCode": null, "InvoiceDate": "2018-07-27T13:08:08+00:00", "DeliveryAddress1": null, "RotReducedInvoicingOrgNumber": null, "DeliveryAddress2": null, "InvoiceCity": "Helsingborg", "DeliveryTermName": null, "IsCreditInvoice": false, "Rows": [], "InvoiceAddress2": null, "CustomerId": "a4247bd2-45d7-4a98-a69f-af40830deb67", "EuThirdParty": false, "Persons": [], "RotReducedInvoicingType": 0, "CustomerIsPrivatePerson": false, "DeliveryMethodName": null, "DeliveryCity": null, "RotReducedInvoicingAutomaticDistribution": false, "InvoiceAddress1": null, "YourReference": null, "RotReducedInvoicingAmount": 0.0, "InvoiceCustomerName": "Updated Name", "RotReducedInvoicingPropertyName": null, "OurReference": null, "DeliveryDate": null, "RotPropertyType": null, "DeliveryCountryCode": null, "DeliveryCustomerName": null, "DeliveryMethodCode": null, "InvoiceCountryCode": "SE", "HouseWorkOtherCosts": null, "DeliveryTermCode": null, "InvoicePostalCode": "25234"}

"InvoiceCustomerName": "Updated Name"

PUT response:

{"Id":"bc441d97-2f43-4d99-bb25-cf9dd0fb76e3","CustomerId":"a4247bd2-45d7-4a98-a69f-af40830deb67","CreatedUtc":"2018-07-27T13:08:08.1534715Z","IsCreditInvoice":false,"RotReducedInvoicingType":0,"RotReducedInvoicingPropertyName":null,"RotReducedInvoicingOrgNumber":null,"RotReducedInvoicingAmount":0.0,"RotReducedInvoicingAutomaticDistribution":false,"RotPropertyType":null,"HouseWorkOtherCosts":null,"Rows":[],"Persons":[],"YourReference":null,"OurReference":null,"InvoiceCustomerName":"TestCustomer AB","InvoiceAddress1":null,"InvoiceAddress2":null,"InvoicePostalCode":"25234","InvoiceCity":"Helsingborg","InvoiceCountryCode":"SE","InvoiceCurrencyCode":"SEK","DeliveryCustomerName":null,"DeliveryAddress1":null,"DeliveryAddress2":null,"DeliveryPostalCode":null,"DeliveryCity":null,"DeliveryCountryCode":null,"DeliveryMethodName":null,"DeliveryTermName":null,"DeliveryMethodCode":null,"DeliveryTermCode":null,"EuThirdParty":false,"CustomerIsPrivatePerson":false,"ReverseChargeOnConstructionServices":false,"SalesDocumentAttachments":[],"InvoiceDate":"2018-07-27T13:11:00.9984772Z","DeliveryDate":null,"TotalAmount":0.0,"TotalVatAmount":0.0,"TotalRoundings":0.0,"TotalAmountBaseCurrency":0.0,"TotalVatAmountBaseCurrency":0.0,"CustomerNumber":"107","IncludesVat":false}

"InvoiceCustomerName":"TestCustomer AB"

New get on object to verify update:

{"Id":"bc441d97-2f43-4d99-bb25-cf9dd0fb76e3","CustomerId":"a4247bd2-45d7-4a98-a69f-af40830deb67","CreatedUtc":"2018-07-27T13:08:08.1534715Z","IsCreditInvoice":false,"RotReducedInvoicingType":0,"RotReducedInvoicingPropertyName":null,"RotReducedInvoicingOrgNumber":null,"RotReducedInvoicingAmount":0.0,"RotReducedInvoicingAutomaticDistribution":false,"RotPropertyType":null,"HouseWorkOtherCosts":null,"Rows":[],"Persons":[],"YourReference":null,"OurReference":null,"InvoiceCustomerName":"TestCustomer AB","InvoiceAddress1":null,"InvoiceAddress2":null,"InvoicePostalCode":"25234","InvoiceCity":"Helsingborg","InvoiceCountryCode":"SE","InvoiceCurrencyCode":"SEK","DeliveryCustomerName":null,"DeliveryAddress1":null,"DeliveryAddress2":null,"DeliveryPostalCode":null,"DeliveryCity":null,"DeliveryCountryCode":null,"DeliveryMethodName":null,"DeliveryTermName":null,"DeliveryMethodCode":null,"DeliveryTermCode":null,"EuThirdParty":false,"CustomerIsPrivatePerson":false,"ReverseChargeOnConstructionServices":false,"SalesDocumentAttachments":[],"InvoiceDate":"2018-07-27T13:13:00.2738546Z","DeliveryDate":null,"TotalAmount":0.0,"TotalVatAmount":0.0,"TotalRoundings":0.0,"TotalAmountBaseCurrency":0.0,"TotalVatAmountBaseCurrency":0.0,"CustomerNumber":"107","IncludesVat":false}

"InvoiceCustomerName":"TestCustomer AB"

So the update does not go through at all.

Have contacted Visma API support for debugging since the problem is on their side.