/// <summary>
        /// Update a notification rule.
        /// </summary>
        /// <param name="ruleId">The notification rule ID.</param>
        /// <param name="update">Notification rule update to apply</param>
        /// <returns>An updated notification rule</returns>
        public Task <NotificationRule> UpdateNotificationRuleAsync(string ruleId, NotificationRuleUpdate update)
        {
            Arguments.CheckNonEmptyString(ruleId, nameof(ruleId));
            Arguments.CheckNotNull(update, nameof(update));

            return(_service.PatchNotificationRulesIDAsync(ruleId, update));
        }
        public void UpdateRuleNotExists()
        {
            var update = new NotificationRuleUpdate(name: "not exists name", description: "not exists update",
                                                    status: NotificationRuleUpdate.StatusEnum.Active);

            var ioe = Assert.ThrowsAsync <HttpException>(async() => await _notificationRulesApi
                                                         .UpdateNotificationRuleAsync("020f755c3c082000", update));

            Assert.AreEqual("notification rule not found", ioe.Message);
        }