public function exec() { $response = curl_exec($this->_ch); if (curl_error($this->_ch)) { throw new \RuntimeException("Communication with the API failed: " . curl_error($this->_ch)); } return $response; }