public OntracComputationMethod(IMeasureService measureService,
                                       IShippingService shippingService,
                                       ISettingService settingService,
                                       OntracSettings ontracSettings,
                                       ICountryService countryService,
                                       ICurrencyService currencyService,
                                       CurrencySettings currencySettings,
                                       IOrderTotalCalculationService orderTotalCalculationService,
                                       ILogger logger,
                                       ILocalizationService localizationService,
                                       IWebHelper webHelper)
        {
            this._measureService               = measureService;
            this._shippingService              = shippingService;
            this._settingService               = settingService;
            this._ontracSettings               = ontracSettings;
            this._countryService               = countryService;
            this._currencyService              = currencyService;
            this._currencySettings             = currencySettings;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._logger = logger;
            this._localizationService = localizationService;
            this._webHelper           = webHelper;

            this._traceMessages = new StringBuilder();
        }
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new OntracSettings
            {
                Url = "https://www.shipontrac.net/OnTracWebServices/OnTracServices.svc/V1/175512/rates",
                CustomerClassification = OntracCustomerClassification.Retail,
                PickupType             = OntracPickupType.OneTimePickup,
                PackagingType          = OntracPackagingType.ExpressBox,
                PackingPackageVolume   = 5184,
                PackingType            = PackingType.PackByDimensions,
                PassDimensions         = true,
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.Url", "URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.Url.Hint", "Specify Ontrac URL.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.Password", "Password");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.Password.Hint", "Specify Ontrac password.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.AdditionalHandlingCharge", "Additional handling charge");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.AdditionalHandlingCharge.Hint", "Enter additional handling fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.InsurePackage", "Insure package");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.InsurePackage.Hint", "Check to insure packages.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.CustomerClassification", "Ontrac Customer Classification");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.CustomerClassification.Hint", "Choose customer classification.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.PickupType", "Ontrac Pickup Type");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.PickupType.Hint", "Choose Ontrac pickup type.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.PackagingType", "Ontrac Packaging Type");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.PackagingType.Hint", "Choose Ontrac packaging type.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.AvailableCarrierServices", "Carrier Services");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.AvailableCarrierServices.Hint", "Select the services you want to offer to customers.");
            //tracker events
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Tracker.Departed", "Departed");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Tracker.ExportScanned", "Export scanned");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Tracker.OriginScanned", "Origin scanned");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Tracker.Arrived", "Arrived");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Tracker.NotDelivered", "Not delivered");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Tracker.Booked", "Booked");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Tracker.Delivered", "Delivered");
            //packing
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.PassDimensions", "Pass dimensions");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.PassDimensions.Hint", "Check if you want to pass package dimensions when requesting rates.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.PackingType", "Packing type");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.PackingType.Hint", "Choose preferred packing type.");
            this.AddOrUpdatePluginLocaleResource("Enums.Nop.Plugin.Shipping.Ontrac.PackingType.PackByDimensions", "Pack by dimensions");
            this.AddOrUpdatePluginLocaleResource("Enums.Nop.Plugin.Shipping.Ontrac.PackingType.PackByOneItemPerPackage", "Pack by one item per package");
            this.AddOrUpdatePluginLocaleResource("Enums.Nop.Plugin.Shipping.Ontrac.PackingType.PackByVolume", "Pack by volume");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.PackingPackageVolume", "Package volume");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.PackingPackageVolume.Hint", "Enter your package volume.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.Tracing", "Tracing");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Ontrac.Fields.Tracing.Hint", "Check if you want to record plugin tracing in System Log. Warning: The entire request and response XML will be logged (including AccessKey/UserName,Password). Do not leave this enabled in a production environment.");

            base.Install();
        }