Package com.agendabeleza.utils

Examples of com.agendabeleza.utils.HerokuClient


public class SyncController {

  public boolean existsOnHeroku(CompanyModel pCompanyModel) {

    HerokuClient client = new HerokuClient(Heroku.HOST + Heroku.COMPANY_SERVICES + pCompanyModel.getAzId());
    CompanyModel tCompany;

    try {
      tCompany = (CompanyModel) client.request(CompanyModel.class);
      if (tCompany.getId() == null) {
        return false;
      } else {
        pCompanyModel.setId(tCompany.getId());
        return true;
View Full Code Here


    }
  }

  public boolean createOnHeroku(CompanyModel pCompanyModel) {

    HerokuClient client = new HerokuClient(Heroku.HOST + Heroku.COMPANY_SERVICES);
    CompanyModel tCompany;

    try {
      client.setMethod(HerokuClient.POST);
      client.setParamsFromObject(pCompanyModel);
      tCompany = (CompanyModel) client.request(CompanyModel.class);

      if (tCompany.getId() == null) {
        return false;
      } else {
        pCompanyModel.setId(tCompany.getId());
View Full Code Here

TOP

Related Classes of com.agendabeleza.utils.HerokuClient

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.