Exemplo n.º 1
0
 /**
  * Scopes: role_owner, role_admin, www
  *
  * @param array $optional
  * @return \Aikidesk\SDK\Instance\Contracts\ResponseInterface
  */
 public function get($optional = [])
 {
     $oauthId = $this->getOAuthId();
     $input = [];
     if (isset($optional['with'])) {
         $input['with'] = $optional['with'];
     }
     return $this->request->get(sprintf('oauth/%1d', $oauthId), $input);
 }
Exemplo n.º 2
0
 /**
  * Scopes: role_owner, role_admin
  *
  * @param array $optional
  * @return \Aikidesk\SDK\Instance\Contracts\ResponseInterface
  */
 public function invites($optional = [])
 {
     $input = [];
     if (isset($optional['page'])) {
         $input['page'] = $optional['page'];
     }
     return $this->request->get('staff/invite', $input);
 }
Exemplo n.º 3
0
 /**
  * Scopes: role_admin, role_owner
  *
  * @param array $optional
  * @return \Aikidesk\SDK\Instance\Contracts\ResponseInterface
  */
 public function get($optional = [])
 {
     $departmentId = $this->getId();
     $input = [];
     if (isset($optional['with'])) {
         $input['with'] = $optional['with'];
     }
     return $this->request->get(sprintf('department/%1d', $departmentId), $input);
 }
Exemplo n.º 4
0
 /**
  * Scopes: role_customer, role_operator, role_admin, role_owner
  *
  * @param array $optional
  * @return \Aikidesk\SDK\Instance\Contracts\ResponseInterface
  */
 public function get($optional = [])
 {
     $customerId = $this->getId();
     $input = [];
     if (isset($optional['with'])) {
         $input['with'] = $optional['with'];
     }
     return $this->request->get(sprintf('ticket/%1d', $customerId), $input);
 }
Exemplo n.º 5
0
 /**
  * Scopes: role_operator, role_admin, role_owner
  *
  * @param array $optional
  * @return \Aikidesk\SDK\Instance\Contracts\ResponseInterface
  */
 public function get($optional = [])
 {
     $customerId = $this->getCustomerId();
     $emailId = $this->getEmailId();
     $input = [];
     if (isset($optional['with'])) {
         $input['with'] = $optional['with'];
     }
     return $this->request->get(sprintf('customer/%1d/email/%1d', $customerId, $emailId), $input);
 }
 /**
  * Scopes: role_operator, role_admin, role_owner, customer_autologin
  *
  * @param array $optional
  * @return \Aikidesk\SDK\Instance\Contracts\ResponseInterface
  */
 public function get($optional = [])
 {
     $customerId = $this->getCustomerId();
     $autologinId = $this->getAutoLoginId();
     $input = [];
     if (isset($optional['with'])) {
         $input['with'] = $optional['with'];
     }
     return $this->request->get(sprintf('customer/%1d/autologin/%1d', $customerId, $autologinId), $input);
 }
Exemplo n.º 7
0
 /**
  * Scopes: role_customer, role_operator, role_admin, role_owner
  *
  * @param array $optional
  * @return \Aikidesk\SDK\Instance\Contracts\ResponseInterface
  */
 public function get($optional = [])
 {
     $ticketId = $this->getTicketId();
     $messageId = $this->getMessageId();
     $input = [];
     if (isset($optional['with'])) {
         $input['with'] = $optional['with'];
     }
     return $this->request->get(sprintf('ticket/%1d/message/%1d', $ticketId, $messageId), $input);
 }
Exemplo n.º 8
0
 /**
  * @return \Aikidesk\SDK\Instance\Contracts\ResponseInterface
  */
 public function current()
 {
     return $this->request->get('test');
 }
Exemplo n.º 9
0
 /**
  * Scopes: role_owner, role_admin
  *
  * @param array $optional
  * @return \Aikidesk\SDK\Instance\Contracts\ResponseInterface
  */
 public function getBase($optional = [])
 {
     $input = [];
     return $this->request->get('setting/base', $input);
 }
Exemplo n.º 10
0
 /**
  * Scopes: role_operator, role_owner, role_admin
  *
  * @param string $email
  *
  * @return \Aikidesk\SDK\Instance\Contracts\ResponseInterface
  * @throws \Aikidesk\SDK\Instance\Exceptions\ApiException
  */
 public function searchByEmail($email)
 {
     return $this->request->get('customer/email', ['email' => $email]);
 }
Exemplo n.º 11
0
 /**
  * Scopes: stats_unread_messages, role_operator, role_owner, role_admin
  *
  * @param int $customerId
  * @return \Aikidesk\SDK\Instance\Contracts\ResponseInterface
  */
 public function unreadMessages($customerId)
 {
     return $this->request->get(sprintf('stats/unreadMessages/%1d', $customerId));
 }