public Kase Create(Kase kase) { var request = new RestRequest("kases.xml", Method.POST) { XmlSerializer = new XmlIgnoreSerializer() }; request.AddBody(kase); var response = _client.Execute<Kase>(request); return response.Data; }
public bool Update(Kase 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<Kase>(request); return response.StatusCode == HttpStatusCode.OK; }