+void ConvChangePolicy(const std::string & value, std::optional<STG::Tariff::ChangePolicy> & res)
+{
+std::string lowered = ToLower(value);
+if (lowered == "allow")
+ res = STG::Tariff::ALLOW;
+else if (lowered == "to_cheap")
+ res = STG::Tariff::TO_CHEAP;
+else if (lowered == "to_expensive")
+ res = STG::Tariff::TO_EXPENSIVE;
+else if (lowered == "deny")
+ res = STG::Tariff::DENY;
+else
+ throw SGCONF::ACTION::ERROR("Change policy should be 'allow', 'to_cheap', 'to_expensive' or 'deny'. Got: '" + value + "'");
+}
+
+void ConvChangePolicyTimeout(const std::string & value, std::optional<time_t> & res)
+{
+struct tm brokenTime;
+if (stg_strptime(value.c_str(), "%Y-%m-%d %H:%M:%S", &brokenTime) == NULL)
+ throw SGCONF::ACTION::ERROR("Credit expiration should be in format 'YYYY-MM-DD HH:MM:SS'. Got: '" + value + "'");
+res = stg_timegm(&brokenTime);
+}
+
+void ConvTraffType(const std::string & value, std::optional<STG::Tariff::TraffType> & res)