상속: BaseModel
예제 #1
0
        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;
        }
예제 #2
0
        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;
        }