Package br.com.postmon.jpostmon.exception

Examples of br.com.postmon.jpostmon.exception.PostmonAPIException


      if (response.getStatus() == 200) {
        Gson gson = new Gson();
        return gson.fromJson(response.readEntity(String.class),
            Endereco.class);
      } else {
        throw new PostmonAPIException("Erro ao buscar CEP: "
            + response.getStatus() + ": "
            + response.getStatusInfo());
      }
    } else {
      throw new UnsupportedOperationException();
View Full Code Here


          return gson.fromJson(response.readEntity(String.class),
              Rastreamento.class);
        } else if (response.getStatus() == 404) {
          return null;
        } else {
          throw new PostmonAPIException("Erro ao rastrear: "
              + response.getStatus() + ": "
              + response.getStatusInfo());
        }
      } else {
        throw new UnsupportedOperationException();
View Full Code Here

TOP

Related Classes of br.com.postmon.jpostmon.exception.PostmonAPIException

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.