public function authorized()
 {
     $headers = MoipHelper::getAllHeaders();
     $this->authorized = false;
     if (MoipHelper::isArray($headers) && array_key_exists('Authorization', $headers) && $this->obj->getNotificationToken() === $headers['Authorization']) {
         $this->authorized = true;
     }
     return $this->authorized;
 }
 protected function getParameters()
 {
     return MoipHelper::isArray($this->parameters);
 }
 public function getCredential()
 {
     return MoipHelper::isArray($this->credential) && $this->isValidToken($this->credential['token']) && $this->isValidKey($this->credential['key']) ? $this->credential['token'] . ':' . $this->credential['key'] : false;
 }
 public function get($url, $data = array())
 {
     curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'GET');
     curl_setopt($this->curl, CURLOPT_URL, MoipHelper::isArray($data) ? sprintf("%s?%s", $url, json_encode($data)) : $url);
     return $this->fetch();
 }