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

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 WinkConf
    extends Config
{
    final int chargeTypeId;
    final boolean testMode;
    final String username;
    final String password;
    final String providerURL;
    final String providerURLPrefix;
    final String partnerRegionId;
    final String ottTvCodePattern;
    
    public WinkConf( int moduleId, ModuleSetup moduleSetup, Setup serverSetup )
    {
        this.username = moduleSetup.get( ModuleSetupKeys.OM_WINK_PROVIDER_USERNAME );
        this.password = moduleSetup.get( ModuleSetupKeys.OM_WINK_PROVIDER_PASSWORD );
        this.providerURL = moduleSetup.get( ModuleSetupKeys.OM_WINK_PROVIDER_URL );
        this.providerURLPrefix = moduleSetup.get( ModuleSetupKeys.OM_WINK_PROVIDER_URL_PREFIX );
        this.partnerRegionId = moduleSetup.get( ModuleSetupKeys.OM_WINK_PARTNER_REGION_ID );
        this.ottTvCodePattern = moduleSetup.get( ModuleSetupKeys.OM_WINK_OTT_TV_CODE_PATTERN );
        this.testMode = moduleSetup.getBoolean( ModuleSetupKeys.OM_WINK_TEST_MODE );
        this.chargeTypeId = moduleSetup.getInt( ModuleSetupKeys.OM_WINK_CHARGE_TYPE_ID );
    }
}
