Example #1
0
 /**
  * Upload a file
  *
  * @param string The relative path on the server of the file to upload.
  * @param string The mime type of the file
  * @return array
  */
 public function uploadFiles($file, $type)
 {
     //argument test
     Eden_ZenDesk_Error::i()->argument(1, 'string')->argument(2, 'string');
     //argument 2 must be a string
     $this->_query['filename'] = $file;
     return $this->_upload(sprintf(self::TICKETS_UPLOAD_FILES, $this->_subdomain), $this->_query, $type);
 }
Example #2
0
 public function __construct($subdomain, $email, $token)
 {
     //argument test
     Eden_ZenDesk_Error::i()->argument(1, 'string')->argument(2, 'string')->argument(3, 'string');
     //argument 3 must be a string
     $this->_subdomain = $subdomain;
     $this->_email = $email;
     $this->_token = $token;
 }
Example #3
0
 /**
  * Set picture for a user, use the attachement uploadFile() to get
  * upload token
  *
  * @param string 
  * @return this
  */
 public function setPicture($uploadToken)
 {
     //argument 1 must be a string
     Eden_ZenDesk_Error::i()->argument(1, 'string');
     $this->_query['user']['photo'] = $uploadToken;
     return $this;
 }
Example #4
0
 /**
  * The group this ticket is assigned to
  *
  * @param integer
  * @return this
  */
 public function setGroupId($groupId)
 {
     //argument 1 must be a integer
     Eden_ZenDesk_Error::i()->argument(1, 'int');
     $this->_query['ticket']['group_id'] = $groupId;
     return $this;
 }
Example #5
0
 /**
  * The state of the request, "new", "open", "pending", "hold",
  * "solved", "closed"
  *
  * @param string 
  * @return this
  */
 public function setStatus($status)
 {
     //argument 1 must be a string
     Eden_ZenDesk_Error::i()->argument(1, 'string');
     $this->_query['request']['status'] = $status;
     return $this;
 }
Example #6
0
 /**
  * Set google account
  *
  * @param string
  * @return this
  */
 public function setGoogle($email)
 {
     //argument 1 must be a string
     Eden_ZenDesk_Error::i()->argument(1, 'string');
     $this->_query['identity']['type'] = 'google';
     $this->_query['identity']['value'] = $email;
     return $this;
 }