/// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new USPSSettings()
            {
                Url      = "http://production.shippingapis.com/ShippingAPI.dll",
                Username = "******",
                Password = "******",
                AdditionalHandlingCharge            = 0,
                ZipPostalCodeFrom                   = "10022",
                CarrierServicesOfferedDomestic      = "",
                CarrierServicesOfferedInternational = ""
            };

            _settingService.SaveSetting(settings);


            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Url", "URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Url.Hint", "Specify USPS URL.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Username", "Username");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Username.Hint", "Specify USPS username.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Password", "Password");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Password.Hint", "Specify USPS password.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AdditionalHandlingCharge", "Additional handling charge");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AdditionalHandlingCharge.Hint", "Enter additional handling fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.ZipPostalCodeFrom", "Shipped from zip");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.ZipPostalCodeFrom.Hint", "Specify origin zip code.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AvailableCarrierServicesDomestic", "Domestic Carrier Services");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AvailableCarrierServicesDomestic.Hint", "Select the services you want to offer to customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AvailableCarrierServicesInternational", "International Carrier Services");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AvailableCarrierServicesInternational.Hint", "Select the services you want to offer to customers.");

            base.Install();
        }
 public USPSComputationMethod(IMeasureService measureService,
     IShippingService shippingService, ISettingService settingService,
     USPSSettings uspsSettings, MeasureSettings measureSettings,
     IPriceCalculationService priceCalculationService)
 {
     this._measureService = measureService;
     this._shippingService = shippingService;
     this._settingService = settingService;
     this._uspsSettings = uspsSettings;
     this._measureSettings = measureSettings;
     this._priceCalculationService = priceCalculationService;
 }
 public USPSComputationMethod(IMeasureService measureService,
                              IShippingService shippingService, ISettingService settingService,
                              USPSSettings uspsSettings, MeasureSettings measureSettings,
                              IPriceCalculationService priceCalculationService)
 {
     this._measureService          = measureService;
     this._shippingService         = shippingService;
     this._settingService          = settingService;
     this._uspsSettings            = uspsSettings;
     this._measureSettings         = measureSettings;
     this._priceCalculationService = priceCalculationService;
 }
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new USPSSettings()
            {
                Url = "http://production.shippingapis.com/ShippingAPI.dll",
                Username = "******",
                Password = "******",
                AdditionalHandlingCharge = 0,
                ZipPostalCodeFrom = "10022",
                CarrierServicesOfferedDomestic = "",
                CarrierServicesOfferedInternational = ""
            };
            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Url", "URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Url.Hint", "Specify USPS URL.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Username", "Username");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Username.Hint", "Specify USPS username.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Password", "Password");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.Password.Hint", "Specify USPS password.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AdditionalHandlingCharge", "Additional handling charge");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AdditionalHandlingCharge.Hint", "Enter additional handling fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.ZipPostalCodeFrom", "Shipped from zip");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.ZipPostalCodeFrom.Hint", "Specify origin zip code.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AvailableCarrierServicesDomestic", "Domestic Carrier Services");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AvailableCarrierServicesDomestic.Hint", "Select the services you want to offer to customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AvailableCarrierServicesInternational", "International Carrier Services");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.USPS.Fields.AvailableCarrierServicesInternational.Hint", "Select the services you want to offer to customers.");

            base.Install();
        }