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