Package com.connectifier.xeroclient.models

Examples of com.connectifier.xeroclient.models.ApiException


      }
    }
    service.signRequest(token, request);
    Response response = request.send();
    if (response.getCode() != 200) {
      ApiException exception = null;
      try {
        exception = unmarshallResponse(response, ApiException.class);
      } catch (Exception e) { 
      }
      if (exception == null) {
        throw new XeroApiException(response.getCode());
      } else {
        throw new XeroApiException(response.getCode(), "Error number "
            + exception.getErrorNumber() + ". " + exception.getMessage());       
      }
    }
    return unmarshallResponse(response, ResponseType.class);
  }
View Full Code Here


    String contents = marshallRequest(object);
    request.addPayload(contents);
    service.signRequest(token, request);
    Response response = request.send();
    if (response.getCode() != 200) {
      ApiException exception = unmarshallResponse(response, ApiException.class);
      throw new XeroApiException(response.getCode(), "Error number "
          + exception.getErrorNumber() + ". " + exception.getMessage());       
    }
    return unmarshallResponse(response, ResponseType.class);
  }
View Full Code Here

      }
    }
    service.signRequest(token, request);
    Response response = request.send();
    if (response.getCode() != 200) {
      ApiException exception = unmarshallResponse(response, ApiException.class);
      throw new XeroApiException(response.getCode() + " response: Error number "
          + exception.getErrorNumber() + ". " + exception.getMessage());       
    }
    return unmarshallResponse(response, ResponseType.class);
  }
View Full Code Here

TOP

Related Classes of com.connectifier.xeroclient.models.ApiException

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.