/// <summary> /// Updates the status of a notification. /// </summary> /// <param name="notificationId">the notification id to update</param> /// <param name="status">the status to update</param> /// <returns>task</returns> public Task UpdateNotificationStatus(string notificationId, Status status) { var request = new UpdateNotificationStatusRequest { NotificationId = notificationId, Status = status }; return(gateway(authenticationContext()) .UpdateNotificationStatusAsync(request).ToTask()); }
public IHttpActionResult UpdateNotificationStatus(UpdateNotificationStatusRequest request) { request.ValidateNotNull(); NotificationStatusDomain notificationStatus = _notificationStatusManipulation.GetNotificationStatusById(request.Id); if (notificationStatus == null) { return(NotFound()); } notificationStatus.Name = request.Name; notificationStatus.Code = request.Code; _notificationStatusManipulation.UpdateNotificationStatus(notificationStatus); return(Ok(new UpdateNotificationStatusResponse() { Success = Common.Enumerations.ResponseStatus.Succeeded })); }