public void Test_Hooks_Update() { try { HookDTO hook = this.GetJohnsHook(); HookPutDTO hookPut = new HookPutDTO(); hookPut.Status = hook.Status; hookPut.Url = String.Format("http://test{0}.com", DateTime.Now.Ticks); HookDTO saveHook = this.Api.Hooks.Update(hookPut, hook.Id); Assert.AreEqual(saveHook.Id, hook.Id); Assert.AreEqual(hookPut.Url, saveHook.Url); } catch (Exception ex) { Assert.Fail(ex.Message); } }
/// <summary>Saves a hook.</summary> /// <param name="hook">Hook instance to save.</param> /// <param name="hookId">Hook identifier.</param> /// <returns>Hook instance returned from API.</returns> public HookDTO Update(HookPutDTO hook, String hookId) { return this.UpdateObject<HookDTO, HookPutDTO>(MethodKey.HooksSave, hook, hookId); }