softwerkab / fortnox-csharp-api-sdk

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

CurrencySearch should not have LastModified as search parameter #260

Open bpaolo71 opened 2 years ago

bpaolo71 commented 2 years ago

This work: https://api.fortnox.se/3/currencies?limit=500&page=1 but not this: https://api.fortnox.se/3/currencies?lastmodified=2022-11-23&limit=500&page=1 It returns "Ogiltig parameter i anropet."

Should api allow to do something that it is not allowed ?

richardrandak commented 2 years ago

Ideally, the SDK should not allow it.. unfortunately, the API documentation does not says what parameters are allowed for which endpoint. In the old documentation, there were several parameters defined as "global", so I have put them to a base search class to be available for all connectors. To fix this, we would have to discard the base search and put them to each of the resource specific search and then remove the parameters which cause the errors.. or in some cases, not cause errors but not having effect. It already causing pain in testing.

bpaolo71 commented 2 years ago

I understand your point of view. I will think about it and come back eventually with suggestions.