PrintNode / PrintNode-PHP

PHP API Library For PrintNode Remote Printing Service
https://www.printnode.com
MIT License
83 stars 64 forks source link

createPrintJob can return object, but code to get object is incorrect #55

Open CaptainClueless opened 11 months ago

CaptainClueless commented 11 months ago
if ($returnObject) {
            return $this->viewPrintJobs(0, 1, $this->lastResponse->body);
        }

The code for getting the object for createPrintJob's response uses viewPrintJobs, but the first argument is 0, and the code inside viewPrintJobs requires the value to be greater than or equal to 1

CaptainClueless commented 11 months ago

Furthermore, the third argument of viewPrintJobs is expects a direction, either 'ASC' or 'DESC' yet the code is passing in the response number, which should be the 4th argument