public function getJobsByTemplate(Template $template): array
    {
        try {
            $response = $this->client->getJobsByTemplate($template->getId());
        } catch (ClientException $ce) {
            $response = $ce->getResponse();

            throw ExceptionFactory::create($response, $ce);
        }

        $jobs = array_map(function (array $job) {
            return JobFactory::createFromAPIResponse($job);
        }, $response);

        return $jobs;
    }