/**
  * Sends a request to the API gateway for getting subscriber's personal
  * contact card.
  *
  * @return Contact contact information for subscriber
  * @throws ServiceException if request was not successful
  */
 public function updateMyInfo(ContactCommon $contact)
 {
     $endpoint = $this->getFqdn() . '/addressBook/v1/myInfo';
     $req = new RestfulRequest($endpoint);
     $req->setAuthorizationHeader($this->getToken())->setHeader('Accept', 'application/json')->setHeader('Content-Type', 'application/json');
     $body = json_encode(array('myInfo' => $contact->toArray()));
     $httpPatch = new HttpPatch($body);
     $result = $req->sendHttpPatch($httpPatch);
     $code = $result->getResponseCode();
     if ($code != 201 && $code != 204) {
         throw new ServiceException($code, $result->getResponseBody());
     }
 }