예제 #1
0
 /**
  * Updates a ticket and resets the ticket entity with the returned field values.
  * @see \Malwarebytes\ZendeskBundle\DataModel\AbstractRepository::_create()
  * @param AbstractEntity $instance
  * @return Entity
  */
 protected function _update(AbstractEntity $instance)
 {
     $response = $this->_apiService->updateTicket($instance['id'], $instance->toArray());
     if (!empty($response['ticket'])) {
         $instance->setFields($response['ticket'], true);
     }
     return $instance;
 }
예제 #2
0
 /**
  * Makes the appropriate API call with the instance data
  * @see \Malwarebytes\ZendeskBundle\DataModel\AbstractRepository::_update()
  * @param Entity $instance
  * @return $instance
  */
 protected function _update(AbstractEntity $instance)
 {
     $response = $this->_apiService->updateGroup($instance['id'], $instance->toArray());
     if ($response['group']) {
         $instance->setFields($response['group']);
     }
     return $instance;
 }