public Company Create(Company company) { var request = new RestRequest("companies.xml", Method.POST) { XmlSerializer = new XmlSerializer() }; request.AddBody(company); var response = _client.Execute<Company>(request); return response.Data; }
public Company Update(Company company) { var request = new RestRequest("companies/{id}.xml?reload=true", Method.PUT) { XmlSerializer = new XmlSerializer() }; request.AddParameter("id", company.Id, ParameterType.UrlSegment); request.AddBody(company); var response = _client.Execute<Company>(request); return response.Data; }