Package zendeskapi.exception

Examples of zendeskapi.exception.ZendeskApiException


   */
  public IndividualSatisfactionResponse getSatisfactionRatingById(long id) throws ZendeskApiException {
    try {
      return genericGet("satisfaction_ratings/" + id + ".json", IndividualSatisfactionResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Getting satisfaction rating for id " + id + " failed", e);
    }
  }
View Full Code Here


    IndividualSatisfactionResponse individualSatisfactionResponse = new IndividualSatisfactionResponse();
    individualSatisfactionResponse.setSatisfactionRating(satisfactionRating);
    try {
      return genericPost("tickets/" + ticketId + "/satisfaction_rating.json", satisfactionRating, IndividualSatisfactionResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Creating satisfaction rating " + satisfactionRating.getComment() + " faile", e);
    }
  }
View Full Code Here

  public IndividualUserResponse getCurrentUser() throws ZendeskApiException {
    try {
      return genericGet("users/me.json", IndividualUserResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

  public GroupUserResponse getAllUsers() throws ZendeskApiException {
    try {
      return genericGet("users.json", GroupUserResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

  public IndividualUserResponse getUser(long id) throws ZendeskApiException {
    try {
      return genericGet("users/" + id + ".json", IndividualUserResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

  public GroupUserResponse searchByEmail(String email) throws ZendeskApiException {
    try {
      return genericGet("users/search.json?query=" + email, GroupUserResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

  public GroupUserResponse searchByExternalId(String externalId) throws ZendeskApiException {
    try {
      return genericGet("users/search.json?external_id=" + externalId, GroupUserResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

  public GroupUserResponse getUsersInGroup(long id) throws ZendeskApiException {
    try {
      return genericGet("groups/" + id + "/users.json", GroupUserResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

  public GroupUserResponse getUsersInOrganization(long id) throws ZendeskApiException {
    try {
      return genericGet("organizations/" + id + "/users.json", GroupUserResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

    IndividualUserResponse body = new IndividualUserResponse();
    body.setUser(user);
    try {
      return genericPost("users.json", body, IndividualUserResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Failed to create user " + user.getName(), e);
    }
  }
View Full Code Here

TOP

Related Classes of zendeskapi.exception.ZendeskApiException

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.