TeknooSoftware / sellsy-client

PHP library to connect your applications to your Sellsy account account using the Sellsy API and build your websites and your platforms on the Sellsy technology.
https://teknoo.software/libraries/sellsy
MIT License
17 stars 16 forks source link

Supplier getList error #14

Closed clecocq closed 5 years ago

clecocq commented 5 years ago

Hello,

I'm not able to make this work with your library

return $this->sellsyClient->get()->Supplier()->getList(['pagination'=>['nbperpage'=>$nbPerpage, 'pagenum'=>$pageNum]])->getResponse();

I'm using exactly the same with clients and it's working, but in the case of suppliers it's not. I cannot find if the error comes from your library or from sellsy.

Teknoo\Sellsy\Client\Exception\ErrorException : Plugin support is not loaded

Thank you in advance,

Cyril

frenchcomp commented 5 years ago

Hello, ErrorException are thrown only when the server returns an error. (The message comes from Sellsy). Wthen the failure comes from the library, or the transport (guzzle or other), the exception is of type RequestFailureException.

Have a nice day.

clecocq commented 5 years ago

Hey,

After much investigations, there's a typo here : https://github.com/TeknooSoftware/sellsy-client/blob/master/definitions/Supplier.php#L48

It should be "Supplier" and not "Support".

Thanks,

frenchcomp commented 5 years ago

A patch has been released. 2.0.5. It's fine for you?

clecocq commented 5 years ago

Hey perfect thank you

frenchcomp commented 5 years ago

Thanks for the feed back. Happy new year