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

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

        $templates = array_map(function (array $template) {
            return TemplateFactory::createFromAPIResponse($template);
        }, $response);

        return $templates;
    }