Inheritance: BaseModel
Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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;
        }