/**
  *
  * @return CompanyEntity
  */
 public function getCampaigns()
 {
     $request = Request::get("{$this->getCompanyId()}/campaigns");
     $response = $this->getConnector()->sendRequest($request);
     $data = Json::decode($response->getContent());
     $json = new stdClass();
     $json->campaigns = $data;
     return new CampaignsEntity($json);
 }
 /**
  * 
  * @param string $email
  * @return UnsubscribersEntity
  */
 public function getUnsubscribersByEmail($email)
 {
     $request = Request::get("{$this->getCompanyId()}/unsubscribers/{$email}");
     $response = $this->getConnector()->sendRequest($request);
     $data = Json::decode($response->getContent());
     $json = new stdClass();
     $json->unsubscribers = $data;
     return new UnsubscribersEntity($json);
 }
Exemplo n.º 3
0
 /**
  *
  * @param int $userId
  * @return UserEntity
  */
 public function getUser($userId)
 {
     $request = Request::get("{$this->getCompanyId()}/users/{$userId}");
     $response = $this->getConnector()->sendRequest($request);
     return new UserEntity($response->getContent());
 }
 /**
  * @param int $senderEmailId
  * @return SenderEmailEntity
  */
 public function getSenderEmail($senderEmailId)
 {
     $request = Request::get("{$this->getCompanyId()}/sender-emails/{$senderEmailId}");
     $response = $this->getConnector()->sendRequest($request);
     return new SenderEmailEntity($response->getContent());
 }
 /**
  *
  * @param int $notificationId
  * @return NotificationEntity
  */
 public function getNotification($notificationId)
 {
     $request = Request::get("{$this->getCompanyId()}/notifications/{$notificationId}");
     $response = $this->getConnector()->sendRequest($request);
     return new NotificationEntity($response->getContent());
 }
 /**
  *
  * @return CompanyEntity
  */
 public function getCompany()
 {
     $request = Request::get("{$this->getCompanyId()}");
     $response = $this->getConnector()->sendRequest($request);
     return new CompanyEntity($response->getContent());
 }
 /**
  *
  * @param int $logMessageId
  * @return LogMessageEntity
  */
 public function getLogMessage($logMessageId)
 {
     $request = Request::get("{$this->getCompanyId()}/log-messages/{$logMessageId}");
     $response = $this->getConnector()->sendRequest($request);
     return new LogMessageEntity($response->getContent());
 }
 /**
  *
  * @param int $recipientsListId
  * @return RecipientsListEntity
  */
 public function getRecipientsList($recipientsListId)
 {
     $request = Request::get("{$this->getCompanyId()}/recipients-lists/{$recipientsListId}");
     $response = $this->getConnector()->sendRequest($request);
     return new RecipientsListEntity($response->getContent());
 }