public Deal Create(Deal deal) { var request = new RestRequest("deals.xml", Method.POST) { XmlSerializer = new XmlIgnoreSerializer() }; request.AddBody(deal); var response = _client.Execute<Deal>(request); return response.Data; }
public bool Update(Deal deal) { var request = new RestRequest(String.Format("deals/{0}.xml", deal.Id), Method.PUT) { XmlSerializer = new XmlIgnoreSerializer() }; request.AddBody(deal); var response = _client.Execute<Deal>(request); return response.StatusCode == HttpStatusCode.OK; }