package ru.bitel.bgbilling.modules.tv.dyn.smarty;

import bitel.billing.server.util.Config;
import ru.bitel.bgbilling.modules.tv.server.bean.enums.ModuleSetupKeys;
import ru.bitel.bgbilling.server.util.ModuleSetup;
import ru.bitel.bgbilling.server.util.Setup;

public class SmartyConf
    extends Config
{
    final String clientId, secretKey, serverUrl, modulePrefix;
    final int paramEmailId, paramPhoneId, paramFirstnameId, paramMiddlenameId, paramLastnameId, connectTimeout, readTimeout;
    
    public SmartyConf( int moduleId, ModuleSetup moduleSetup, Setup serverSetup )
    {
        clientId = moduleSetup.get( ModuleSetupKeys.OM_SMARTY_CLIENT_ID );
        modulePrefix = moduleSetup.get( ModuleSetupKeys.OM_SMARTY_MODULE_PREFIX );
        paramEmailId = moduleSetup.getInt( ModuleSetupKeys.OM_SMARTY_EMAIL_ID );
        paramPhoneId = moduleSetup.getInt( ModuleSetupKeys.OM_SMARTY_PHONE_ID );
        paramFirstnameId = moduleSetup.getInt( ModuleSetupKeys.OM_SMARTY_FIRSTNAME_ID );
        paramMiddlenameId = moduleSetup.getInt( ModuleSetupKeys.OM_SMARTY_MIDDLENAME_ID );
        paramLastnameId = moduleSetup.getInt( ModuleSetupKeys.OM_SMARTY_LASTNAME_ID );
        secretKey = moduleSetup.get( ModuleSetupKeys.OM_SMARTY_SECRET_KEY );
        serverUrl = moduleSetup.get( ModuleSetupKeys.OM_SMARTY_SERVER_URL );
        readTimeout = moduleSetup.getInt( ModuleSetupKeys.OM_SMARTY_READ_TIMEOUT );
        connectTimeout = moduleSetup.getInt( ModuleSetupKeys.OM_SMARTY_CONNECT_TIMEOUT );
    }
}