public IndividualTicketResponse CreateTicket(Ticket ticket) { var body = new {ticket}; return GenericPost<IndividualTicketResponse>(_tickets + ".json", body); }
/// <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); }