Package zendeskapi

Examples of zendeskapi.RequestResult


   * @throws ZendeskApiException
   */
  public boolean markAuditAsTrusted(long ticketId, long auditId) throws ZendeskApiException {
    String resource = "tickets/" + ticketId + "/audits/" + auditId + "/trust.json";
    try {
      RequestResult res = runRequest(resource, RequestMethod.PUT, RequestResult.class);
      return res.isOk();
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here


   * @throws ZendeskApiException
   */
  public boolean recoverSuspendedTicket(long id) throws ZendeskApiException {
    String resource = "suspended_tickets/" + id + "/recover.json";
    try {
      RequestResult res = runRequest(resource, RequestMethod.PUT, RequestResult.class);
      return res.getHttpStatusCode() == HttpURLConnection.HTTP_OK;
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

    for (Long id : ids) {
      sb.append(id).append(",");
    }
    String resource = "suspended_tickets/recover_many.json?ids=" + sb.toString();
    try {
      RequestResult res = runRequest(resource, RequestMethod.PUT, RequestResult.class);
      return res.getHttpStatusCode() == HttpURLConnection.HTTP_OK;
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

TOP

Related Classes of zendeskapi.RequestResult

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.