示例#1
0
        /// <summary>
        /// UpdateTicket a ticket or add comments to it. Keep in mind that somethings like the description can't be updated.
        /// </summary>
        /// <param name="ticket"></param>
        /// <param name="comment"></param>
        /// <returns></returns>
        public IndividualTicketResponse UpdateTicket(Ticket ticket, Comment comment=null)
        {
            if (comment != null)
                ticket.Comment = comment;
            var body = new { ticket };

            return GenericPut<IndividualTicketResponse>(string.Format("{0}/{1}.json", _tickets, ticket.Id), body);
        }
示例#2
0
 public IndividualRequestResponse UpdateRequest(long id, Comment comment)
 {
     var body = new { request = new { comment} };
     return GenericPut<IndividualRequestResponse>(string.Format("requests/{0}.json", id), body);
 }