Package zendeskapi.exception

Examples of zendeskapi.exception.ZendeskApiException


  public IndividualUserIdentityResponse sendUserVerificationRequest(long userId, long identityId) throws ZendeskApiException {
    User nullUser = new User();
    try {
      return genericPut(getUserIdentityIdUri(userId, identityId) + "/request_verification.json", nullUser, IndividualUserIdentityResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Sending of verification email for identity id " + identityId + " of user id " + userId + " failed", e);
    }
  }
View Full Code Here


  public boolean deleteUserIdentity(long userId, long identityId) throws ZendeskApiException {
    try {
      return genericDelete(getUserIdentityIdUri(userId, identityId) + ".json");
    } catch (Exception e) {
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

   */
  public CustomRoles getCustomRoles() throws ZendeskApiException {
    try {
      return genericGet("custom_roles.json", CustomRoles.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Getting custom roles failed", e);
    }
  }
View Full Code Here

    try {
      return client.execute(httpRequest);
    } catch (Exception e) {
      LOG.error(EXECUTION_OF_HTTP_METHOD + httpRequest.getMethod() + " failed", e);
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

        line = bufferedReader.readLine();
      }
      return stringBuilder.toString();
    } catch (Exception e) {
      LOG.error("Reading the http response failed", e);
      throw new ZendeskApiException(e);
    }
  }
View Full Code Here

   */
  public GroupMacroResponse getAllMacros() throws ZendeskApiException {
    try {
      return genericGet("macros.json", GroupMacroResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Failed to list all macros for current user", e);
    }
  }
View Full Code Here

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

   */
  public GroupMacroResponse getActiveMacros() throws ZendeskApiException {
    try {
      return genericGet("macros/active.json", GroupMacroResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Failed to list all active shared and personal macros for current user", e);
    }
  }
View Full Code Here

    IndividualMacroResponse individualMacroResponse = new IndividualMacroResponse();
    individualMacroResponse.setMacro(macro);
    try {
      return genericPost("macros.json", individualMacroResponse, IndividualMacroResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Creation of macro " + macro.getTitle() + " failed", e);
    }
  }
View Full Code Here

    IndividualMacroResponse individualMacroResponse = new IndividualMacroResponse();
    individualMacroResponse.setMacro(macro);
    try {
      return genericPut("macros/" + macro.getId() + ".json", individualMacroResponse, IndividualMacroResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Update of macro " + macro.getTitle() + " failed", 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.