/** * 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; }
/** * 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; }