public Case Create(Case kase) { var request = new RestRequest("kases.xml", Method.POST) { XmlSerializer = new XmlIgnoreSerializer() }; request.AddBody(kase); var response = _client.Execute<Case>(request); return response.Data; }
public bool Update(Case kase) { var request = new RestRequest("kases/{id}.xml", Method.PUT) { XmlSerializer = new XmlIgnoreSerializer() }; request.AddParameter("id", kase.Id, ParameterType.UrlSegment); request.AddBody(kase); var response = _client.Execute<Case>(request); return response.StatusCode == HttpStatusCode.OK; }