LinnSystems / LinnworksNetSDK

Linnworks.net Developers
26 stars 41 forks source link

.NET: IEnumerable<T> should be used instead of List<T> #12

Closed wizzardmr42 closed 7 years ago

wizzardmr42 commented 7 years ago

There is no reason that the parameters/return types should require List - it is better practice to use as general purpose a type as possible, which would allow all other enumerable types to be passed/returned.

LinnSystems commented 7 years ago

Hi @wizzardmr42

The code that is available through the API SDK is automatically generated, and as such, the types are reflected directly through the returns types.

In regards to this, I can understand you would like the type to be this way, but at the moment it would not be suitable for us to make this change as it would require a change that is not feasible in our current development roadmap.

If you would like to change this yourself, please feel free. All request/responses are serialized as JSON, so you will be able to serialize/deserialize them into an IEnumerable or an Array depending on which you feel happy with.