Package zendeskapi.models.tickets

Examples of zendeskapi.models.tickets.IndividualTicketResponse


   * @param ticket
   * @return IndividualTicketResponse
   * @throws ZendeskApiException
   */
  public IndividualTicketResponse createTicket(Ticket ticket) throws ZendeskApiException {
    IndividualTicketResponse individualTicketResponse = new IndividualTicketResponse();
    individualTicketResponse.setTicket(ticket);
    try {
      return genericPost("tickets.json", individualTicketResponse, IndividualTicketResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
View Full Code Here


   */
  public IndividualTicketResponse updateTicket(Ticket ticket, Comment comment) throws ZendeskApiException {
    if (comment != null) {
      ticket.setComment(comment);
    }
    IndividualTicketResponse individualTicketResponse = new IndividualTicketResponse();
    individualTicketResponse.setTicket(ticket);
    try {
      return genericPut("tickets/" + ticket.getId() + ".json", individualTicketResponse, IndividualTicketResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
View Full Code Here

//    ticket.setCollaboratorEmails(collaboratorEmails);
    String body = "Got it, thanks";
    Comment newComment = new Comment();
    newComment.setBody(body);
    newComment.setPublicComment(true);
    IndividualTicketResponse res = API.getTickets().updateTicket(ticket, newComment);
    Ticket updatedTicket = res.getTicket();
    Assert.assertNotNull(updatedTicket);
    Assert.assertEquals(res.getAudit().getEvents().get(0).getBody(), body);

    //Delete
    Assert.assertTrue(API.getTickets().delete(createdTicket.getId()));
  }
View Full Code Here

TOP

Related Classes of zendeskapi.models.tickets.IndividualTicketResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.