예제 #1
0
 public FedexComputationMethod(IMeasureService measureService,
     IShippingService shippingService, ISettingService settingService,
     FedexSettings fedexSettings, IOrderTotalCalculationService orderTotalCalculationService,
     ICurrencyService currencyService, CurrencySettings currencySettings,
     ILogger logger)
 {
     this._measureService = measureService;
     this._shippingService = shippingService;
     this._settingService = settingService;
     this._fedexSettings = fedexSettings;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._currencyService = currencyService;
     this._currencySettings = currencySettings;
     this._logger = logger;
 }
예제 #2
0
 public FedexShipmentTracker(ILogger logger, FedexSettings fedexSettings)
 {
     this._logger        = logger;
     this._fedexSettings = fedexSettings;
 }
예제 #3
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new FedexSettings()
            {
                Url = "https://gatewaybeta.fedex.com:443/web-services/rate",
                DropoffType = Nas.Plugin.Shipping.Fedex.DropoffType.BusinessServiceCenter,
                Street = "Sender Address Line 1",
                City = "Memphis",
                StateOrProvinceCode = "TN",
                PostalCode = "38115",
                CountryCode = "US",
                PackingPackageVolume = 5184
            };
            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Url", "URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Url.Hint", "Specify FedEx URL.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Key", "Key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Key.Hint", "Specify FedEx key.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Password", "Password");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Password.Hint", "Specify FedEx password.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AccountNumber", "Account number");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AccountNumber.Hint", "Specify FedEx account number.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.MeterNumber", "Meter number");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.MeterNumber.Hint", "Specify FedEx meter number.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.UseResidentialRates", "Use residential rates");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.UseResidentialRates.Hint", "Check to use residential rates.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.ApplyDiscounts", "Use discounted rates");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.ApplyDiscounts.Hint", "Check to use discounted rates (instead of list rates).");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AdditionalHandlingCharge", "Additional handling charge");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.AdditionalHandlingCharge.Hint", "Enter additional handling fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CarrierServices", "Carrier Services Offered");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CarrierServices.Hint", "Select the services you want to offer to customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Street", "Shipping origin. Street");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.Street.Hint", "Specify origin street.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.City", "Shipping origin. City");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.City.Hint", "Specify origin city.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.StateOrProvinceCode", "Shipping origin. State code (2 characters)");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.StateOrProvinceCode.Hint", "Specify origin state code (2 characters).");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PostalCode", "Shipping origin. Zip");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PostalCode.Hint", "Specify origin zip code.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CountryCode", "Shipping origin. Country code");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.CountryCode.Hint", "Specify origin country code.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PassDimensions", "Pass dimensions");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PassDimensions.Hint", "Check if you want to pass package dimensions when requesting rates.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PackingType", "Packing type");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PackingType.Hint", "Choose preferred packing type.");
            this.AddOrUpdatePluginLocaleResource("Enums.Nas.Plugin.Shipping.Fedex.PackingType.PackByDimensions", "Pack by dimensions");
            this.AddOrUpdatePluginLocaleResource("Enums.Nas.Plugin.Shipping.Fedex.PackingType.PackByOneItemPerPackage", "Pack by one item per package");
            this.AddOrUpdatePluginLocaleResource("Enums.Nas.Plugin.Shipping.Fedex.PackingType.PackByVolume", "Pack by volume");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PackingPackageVolume", "Package volume");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.PackingPackageVolume.Hint", "Enter your package volume.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.DropoffType", "Dropoff Type");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Fedex.Fields.DropoffType.Hint", "Choose preferred dropoff type.");
            this.AddOrUpdatePluginLocaleResource("Enums.Nas.Plugin.Shipping.Fedex.DropoffType.BusinessServiceCenter", "Business service center");
            this.AddOrUpdatePluginLocaleResource("Enums.Nas.Plugin.Shipping.Fedex.DropoffType.DropBox", "Drop box");
            this.AddOrUpdatePluginLocaleResource("Enums.Nas.Plugin.Shipping.Fedex.DropoffType.RegularPickup", "Regular pickup");
            this.AddOrUpdatePluginLocaleResource("Enums.Nas.Plugin.Shipping.Fedex.DropoffType.RequestCourier", "Request courier");
            this.AddOrUpdatePluginLocaleResource("Enums.Nas.Plugin.Shipping.Fedex.DropoffType.Station", "Station");

            base.Install();
        }
예제 #4
0
 public FedexShipmentTracker(ILogger logger, FedexSettings fedexSettings)
 {
     this._logger = logger;
     this._fedexSettings = fedexSettings;
 }