Bukimedia / PrestaSharp

CSharp .Net client library for the PrestaShop API via web service
GNU General Public License v3.0
154 stars 152 forks source link

Using newer version of Restsharp will make PrestaSharp stop working correctly. #396

Closed LuckyPed closed 3 years ago

LuckyPed commented 4 years ago

I've noticed that if you install the latest stable version from NuGet, which is version 1.1.0, Then it will works with Restsharp version 106.6.10.

But updating Restsharp to the newest version 106.11.4, will make Prestasharp only return null values for any request I tested.

I also tried using the current latest version from Github itself by downloading the project and attaching it to my solution, Which will actually fix some of the problems a bit by returning some values like dates and time, but still half of the data in the request, like the product/order id and status is all null.

I checked the change log for Restsharp and didn't find any big change that might have caused this so I made this post in case someone can find the problem and fix it.

I'm using Prestashop version 1.7.4.2

And basically any request I tried, gave me the same result, but as an example :

        OrderFactory CusOrder = new OrderFactory(SiteUrl, APIKey, Password);

        var CO = CusOrder.GetAll();

So "CO" will either be null or will contain null values for half of it's data.

As I don't have any reason to update my Restsharp, I can avoid this problem, but it would be nice if it can get fixed. Thanks.

oromand commented 4 years ago

I encountered this issue. I forked and published PrestaSharp.Extended in version 1.2.2 that allow newer versions of RestSharp to be run. Could you give it a try ?

oromand commented 3 years ago

Version 1.2.7 would fix the issue