softwerkab / fortnox-csharp-api-sdk

.NET SDK for Fortnox API.
MIT License
53 stars 65 forks source link

DeliveryState and WarehouseReady to Order. #235

Closed TeroMalmberg88 closed 2 years ago

TeroMalmberg88 commented 2 years ago

Fortnox has added these fields to the order model in the GET/PUT API. Could these be added to this project ASAP. These fields seems to indicate whether the order is ready for delivery or not. And this is very critical in deciding what orders to fulfill.

richardrandak commented 2 years ago

I tried to add it as part a result of #229 and got stopped by an issue with the DeliveryState, which would break the functionality for those who does not have warehouse enabled. What I think I could do, is to add the properties but making DeliveryState read-only. Would that be enough for you, or do you need to set/update this property as well?

TeroMalmberg88 commented 2 years ago

We need to set/update it as well.

richardrandak commented 2 years ago

I could think of some workaround to enable updating the property separately as an alternative to the common Update method

richardrandak commented 2 years ago

I have created a pre-release NuGet with additional Order properties as well as action to make the order "warehouse ready". Please check it out - https://www.nuget.org/packages/Fortnox.NET.SDK/4.3.2-warehouse-rc

When creating FortnoxClient, set its property WarehouseEnabled to true, which will enable changing the DeliveryState of the order. In other case, the property won't be serialized.

Let me know if you have any issues.

TeroMalmberg88 commented 2 years ago

Quick test indicated that it works fine. Thank you.