ALMRestClient.ALMClient.Update C# (CSharp) Method

Update() private method

Update the item
private Update ( string id, ALMItem changes ) : bool
id string The item id to be updated
changes ALMItem The modified item to be updated
return bool
        private bool Update(string id, ALMItem changes)
        {
            var req = new RestRequest(clientConfig.EntityAddress);
            AddDomainAndProject(req);
            AddDefectAndId(id, req);

            req.Method = Method.PUT;

            req.AddHeader("Content-Type", "application/xml");
            req.AddHeader("Accept", "application/xml");
            req.AddParameter("application/xml", ConvertToFieldXml(changes.Fields), ParameterType.RequestBody);

            var response = Execute(req, "update");

            return response.StatusCode == HttpStatusCode.OK;
        }