// Update coupon details by passing the coupon details
  @Override
  public ResponseMessage updateCoupon(ServiceExecutionContext ctx, CouponDetails couponsDetails)
      throws ExecException {

    response.setMessage("didnt get updated");
    response.setStatus("500");
    boolean msg = false;
    try {

      if (couponsDetails == null
          || couponsDetails.getCoupon() == null
          || couponsDetails.getCoupon().trim().isEmpty()
          || couponsDetails.getFromDate() == null
          || couponsDetails.getFromDate().trim().isEmpty()
          || couponsDetails.getToDate() == null
          || couponsDetails.getToDate().trim().isEmpty()) {
        throw new ExecException(ErrorCodes.MISSING_FIELD, null, "Mandatory Fields are missing");
      }
      // updating the coupons in the DB
      msg = couponDAO.updateCoupon(couponsDetails);
      if (msg == true) {
        response.setMessage("updated successfully");
        response.setStatus("200");
      }
    } catch (ExecException m) {
      logger.error("Error while updating the coupen" + m.getMessage());
      throw m;
    } catch (Exception e) {
      logger.error("Error while updating the coupen" + e.getMessage());
      throw new ExecException(ErrorCodes.APPLICATION_ERROR, e, e.getMessage());
    }
    return response;
  }