/// <summary> /// Gets the date of the most recent tariff on the specified meter, used when creating a new tariff. /// </summary> /// <param name="meterId"></param> /// <returns>JSON representation of date string, wrapped in EMResponse</returns> public string getMinimumTariffDate(int meterId) { EMResponse response = new EMResponse(); try { tariffMgr = new TariffManager(); response.data = EMConverter.fromObjectToJSON(tariffMgr.getMinimumTariffDate(meterId)); response.status = ok; } catch (Exception e) { response.status = error; response.data = e.Message; } return EMConverter.fromObjectToJSON(response); }