public MessageTokenProvider(ILanguageService languageService,
            ILocalizationService localizationService,
            IDateTimeHelper dateTimeHelper,
            IPriceFormatter priceFormatter,
            ICurrencyService currencyService,
            IWorkContext workContext,
            IDownloadService downloadService,
            IOrderService orderService,
            IPaymentService paymentService,
            IStoreService storeService,
            IStoreContext storeContext,
            IProductAttributeParser productAttributeParser,
            IAddressAttributeFormatter addressAttributeFormatter,
            MessageTemplatesSettings templatesSettings,
            CatalogSettings catalogSettings,
            TaxSettings taxSettings,
            CurrencySettings currencySettings,
            ShippingSettings shippingSettings,
            IEventPublisher eventPublisher,
            PromoSettings promoSettings,
            IPromoOrderService promoOrderService
            )
            : base(languageService, localizationService,
            dateTimeHelper, priceFormatter, currencyService, workContext,
            downloadService, orderService, paymentService, storeService,
            storeContext, productAttributeParser,
            addressAttributeFormatter, templatesSettings, catalogSettings,
            taxSettings, currencySettings, shippingSettings, eventPublisher)
        {
            this._languageService = languageService;
            this._localizationService = localizationService;
            this._dateTimeHelper = dateTimeHelper;
            this._priceFormatter = priceFormatter;
            this._currencyService = currencyService;
            this._workContext = workContext;
            this._downloadService = downloadService;
            this._orderService = orderService;
            this._paymentService = paymentService;
            this._productAttributeParser = productAttributeParser;
            this._addressAttributeFormatter = addressAttributeFormatter;
            this._storeService = storeService;
            this._storeContext = storeContext;

            this._templatesSettings = templatesSettings;
            this._catalogSettings = catalogSettings;
            this._taxSettings = taxSettings;
            this._currencySettings = currencySettings;
            this._shippingSettings = shippingSettings;
            this._eventPublisher = eventPublisher;

            this._promoSettings = promoSettings;
            this._promoOrderService = promoOrderService;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Ctor
 /// </summary>
 public ShippingService(
     IRepository <ShippingMethod> shippingMethodRepository,
     IRepository <DeliveryDate> deliveryDateRepository,
     IRepository <Warehouse> warehouseRepository,
     IRepository <PickupPoint> pickupPointsRepository,
     ILogger logger,
     IProductService productService,
     IProductAttributeParser productAttributeParser,
     ICheckoutAttributeParser checkoutAttributeParser,
     ILocalizationService localizationService,
     IAddressService addressService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     IPluginFinder pluginFinder,
     IMediator mediator,
     ICurrencyService currencyService,
     ICacheManager cacheManager,
     ShoppingCartSettings shoppingCartSettings,
     ShippingSettings shippingSettings)
 {
     _shippingMethodRepository = shippingMethodRepository;
     _deliveryDateRepository   = deliveryDateRepository;
     _warehouseRepository      = warehouseRepository;
     _pickupPointsRepository   = pickupPointsRepository;
     _logger                  = logger;
     _productService          = productService;
     _productAttributeParser  = productAttributeParser;
     _checkoutAttributeParser = checkoutAttributeParser;
     _localizationService     = localizationService;
     _addressService          = addressService;
     _countryService          = countryService;
     _stateProvinceService    = stateProvinceService;
     _pluginFinder            = pluginFinder;
     _currencyService         = currencyService;
     _mediator                = mediator;
     _cacheManager            = cacheManager;
     _shoppingCartSettings    = shoppingCartSettings;
     _shippingSettings        = shippingSettings;
 }
 public ShipmentViewModelService(
     IOrderService orderService,
     IWorkContext workContext,
     IGroupService groupService,
     IProductService productService,
     IShipmentService shipmentService,
     IWarehouseService warehouseService,
     IMeasureService measureService,
     IDateTimeService dateTimeService,
     IProductAttributeParser productAttributeParser,
     ICountryService countryService,
     ICustomerActivityService customerActivityService,
     ITranslationService translationService,
     IDownloadService downloadService,
     IShippingService shippingService,
     IStockQuantityService stockQuantityService,
     MeasureSettings measureSettings,
     ShippingSettings shippingSettings,
     ShippingProviderSettings shippingProviderSettings)
 {
     _orderService             = orderService;
     _workContext              = workContext;
     _groupService             = groupService;
     _productService           = productService;
     _shipmentService          = shipmentService;
     _warehouseService         = warehouseService;
     _measureService           = measureService;
     _dateTimeService          = dateTimeService;
     _productAttributeParser   = productAttributeParser;
     _countryService           = countryService;
     _customerActivityService  = customerActivityService;
     _translationService       = translationService;
     _downloadService          = downloadService;
     _shippingService          = shippingService;
     _stockQuantityService     = stockQuantityService;
     _measureSettings          = measureSettings;
     _shippingSettings         = shippingSettings;
     _shippingProviderSettings = shippingProviderSettings;
 }
Exemplo n.º 4
0
        private readonly ICheckoutAttributeFormatter _checkoutAttributeFormatter; //codehint: sm-add
        #endregion

        #region Constructors

        public OrderController(IOrderService orderService,
                               IShipmentService shipmentService, IWorkContext workContext,
                               ICurrencyService currencyService, IPriceFormatter priceFormatter,
                               IOrderProcessingService orderProcessingService, IDateTimeHelper dateTimeHelper,
                               IPaymentService paymentService, ILocalizationService localizationService,
                               IPdfService pdfService, IShippingService shippingService,
                               ICountryService countryService, IWebHelper webHelper,
                               CatalogSettings catalogSettings, OrderSettings orderSettings,
                               TaxSettings taxSettings, PdfSettings pdfSettings,
                               ShippingSettings shippingSettings, AddressSettings addressSettings,
                               ICheckoutAttributeFormatter checkoutAttributeFormatter,
                               IProductService productService,
                               IProductAttributeFormatter productAttributeFormatter)
        {
            this._orderService           = orderService;
            this._shipmentService        = shipmentService;
            this._workContext            = workContext;
            this._currencyService        = currencyService;
            this._priceFormatter         = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._dateTimeHelper         = dateTimeHelper;
            this._paymentService         = paymentService;
            this._localizationService    = localizationService;
            this._pdfService             = pdfService;
            this._shippingService        = shippingService;
            this._countryService         = countryService;
            this._webHelper                 = webHelper;
            this._productService            = productService;
            this._productAttributeFormatter = productAttributeFormatter;

            this._catalogSettings  = catalogSettings;
            this._orderSettings    = orderSettings;
            this._taxSettings      = taxSettings;
            this._pdfSettings      = pdfSettings;
            this._shippingSettings = shippingSettings;
            this._addressSettings  = addressSettings;

            this._checkoutAttributeFormatter = checkoutAttributeFormatter;  //codehint: sm-add
        }
Exemplo n.º 5
0
 public ShoppingCartModelMapper(
     SmartDbContext db,
     ITaxService taxService,
     ICommonServices services,
     IMediaService mediaService,
     IPaymentService paymentService,
     IDiscountService discountService,
     ICurrencyService currencyService,
     IHttpContextAccessor httpContextAccessor,
     IShoppingCartValidator shoppingCartValidator,
     IOrderCalculationService orderCalculationService,
     ICheckoutAttributeFormatter checkoutAttributeFormatter,
     ICheckoutAttributeMaterializer checkoutAttributeMaterializer,
     ShoppingCartSettings shoppingCartSettings,
     CatalogSettings catalogSettings,
     MediaSettings mediaSettings,
     OrderSettings orderSettings,
     MeasureSettings measureSettings,
     ShippingSettings shippingSettings,
     RewardPointsSettings rewardPointsSettings,
     Localizer T)
     : base(services, shoppingCartSettings, catalogSettings, mediaSettings, T)
 {
     _db                            = db;
     _taxService                    = taxService;
     _mediaService                  = mediaService;
     _paymentService                = paymentService;
     _discountService               = discountService;
     _currencyService               = currencyService;
     _httpContextAccessor           = httpContextAccessor;
     _shoppingCartValidator         = shoppingCartValidator;
     _orderCalculationService       = orderCalculationService;
     _checkoutAttributeFormatter    = checkoutAttributeFormatter;
     _checkoutAttributeMaterializer = checkoutAttributeMaterializer;
     _shippingSettings              = shippingSettings;
     _orderSettings                 = orderSettings;
     _measureSettings               = measureSettings;
     _rewardPointsSettings          = rewardPointsSettings;
 }
Exemplo n.º 6
0
        public OrderCalculationService(
            SmartDbContext db,
            IPriceCalculationService priceCalculationService,
            IDiscountService discountService,
            IShippingService shippingService,
            IGiftCardService giftCardService,
            ICurrencyService currencyService,
            IProviderManager providerManager,
            IProductAttributeMaterializer productAttributeMaterializer,
            ICheckoutAttributeMaterializer checkoutAttributeMaterializer,
            IWorkContext workContext,
            IStoreContext storeContext,
            ITaxService taxService,
            TaxSettings taxSettings,
            RewardPointsSettings rewardPointsSettings,
            CatalogSettings catalogSettings,
            ShippingSettings shippingSettings)
        {
            _db = db;
            _priceCalculationService       = priceCalculationService;
            _discountService               = discountService;
            _shippingService               = shippingService;
            _giftCardService               = giftCardService;
            _currencyService               = currencyService;
            _providerManager               = providerManager;
            _productAttributeMaterializer  = productAttributeMaterializer;
            _checkoutAttributeMaterializer = checkoutAttributeMaterializer;
            _workContext          = workContext;
            _storeContext         = storeContext;
            _taxService           = taxService;
            _taxSettings          = taxSettings;
            _rewardPointsSettings = rewardPointsSettings;
            _catalogSettings      = catalogSettings;
            _shippingSettings     = shippingSettings;

            _primaryCurrency = currencyService.PrimaryCurrency;
            _workingCurrency = workContext.WorkingCurrency;
        }
Exemplo n.º 7
0
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="workContext">Work context</param>
        /// <param name="storeContext">Store context</param>
        /// <param name="priceCalculationService">Price calculation service</param>
        /// <param name="taxService">Tax service</param>
        /// <param name="shippingService">Shipping service</param>
        /// <param name="paymentService">Payment service</param>
        /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
        /// <param name="discountService">Discount service</param>
        /// <param name="giftCardService">Gift card service</param>
        /// <param name="genericAttributeService">Generic attribute service</param>
        /// <param name="rewardPointsService">Reward points service</param>
        /// <param name="taxSettings">Tax settings</param>
        /// <param name="rewardPointsSettings">Reward points settings</param>
        /// <param name="shippingSettings">Shipping settings</param>
        /// <param name="shoppingCartSettings">Shopping cart settings</param>
        /// <param name="catalogSettings">Catalog settings</param>
        public OrderTotalCalculationService(
            IWorkContext workContext,
            IStoreContext storeContext,
            IPriceCalculationService priceCalculationService,
            ITaxService taxService,
            IShippingService shippingService,
            IPaymentService paymentService,
            ICheckoutAttributeParser checkoutAttributeParser,
            IDiscountService discountService,
            IGiftCardService giftCardService,
            IGenericAttributeService genericAttributeService,
            IRewardPointsService rewardPointsService,

            TaxSettings taxSettings,
            RewardPointsSettings rewardPointsSettings,
            ShippingSettings shippingSettings,
            ShoppingCartSettings shoppingCartSettings,
            CatalogSettings catalogSettings
            )
        {
            this._workContext             = workContext;
            this._storeContext            = storeContext;
            this._priceCalculationService = priceCalculationService;
            this._taxService              = taxService;
            this._shippingService         = shippingService;
            this._paymentService          = paymentService;
            this._checkoutAttributeParser = checkoutAttributeParser;
            this._discountService         = discountService;
            this._giftCardService         = giftCardService;
            this._genericAttributeService = genericAttributeService;
            this._rewardPointsService     = rewardPointsService;

            this._taxSettings          = taxSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._shippingSettings     = shippingSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._catalogSettings      = catalogSettings;
        }
        public ShoppingCartViewComponent(
            IProductService productService,
            IStoreContext storeContext,
            IWorkContext workContext,
            IShoppingCartService shoppingCartService,
            IPermissionService permissionService,
            IShoppingCartWebService shoppingCartWebService,
            IHttpContextAccessor httpContextAccessor,

            MediaSettings mediaSettings,
            ShoppingCartSettings shoppingCartSettings,
            CatalogSettings catalogSettings,
            OrderSettings orderSettings,
            ShippingSettings shippingSettings,
            TaxSettings taxSettings,
            CaptchaSettings captchaSettings,
            AddressSettings addressSettings,
            RewardPointsSettings rewardPointsSettings
            )
        {
            this._productService      = productService;
            this._workContext         = workContext;
            this._storeContext        = storeContext;
            this._shoppingCartService = shoppingCartService;
            this._permissionService   = permissionService;

            this._shoppingCartWebService = shoppingCartWebService;

            this._mediaSettings        = mediaSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._catalogSettings      = catalogSettings;
            this._orderSettings        = orderSettings;
            this._shippingSettings     = shippingSettings;
            this._taxSettings          = taxSettings;
            this._captchaSettings      = captchaSettings;
            this._addressSettings      = addressSettings;
            this._rewardPointsSettings = rewardPointsSettings;
        }
Exemplo n.º 9
0
        public new void SetUp()
        {
            _taxSettings = new TaxSettings
            {
                DefaultTaxAddressId = 10
            };

            _workContext  = null;
            _storeContext = new Mock <IStoreContext>();
            _storeContext.Setup(x => x.CurrentStore).Returns(new Store {
                Id = 1
            });

            _addressService = new Mock <IAddressService>();
            //default tax address
            _addressService.Setup(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Returns(new Address {
                Id = _taxSettings.DefaultTaxAddressId
            });

            _eventPublisher = new Mock <IEventPublisher>();
            _eventPublisher.Setup(x => x.Publish(It.IsAny <object>()));

            var pluginFinder = new PluginFinder(_eventPublisher.Object);

            _geoLookupService     = new Mock <IGeoLookupService>();
            _countryService       = new Mock <ICountryService>();
            _stateProvinceService = new Mock <IStateProvinceService>();
            _logger    = new Mock <ILogger>();
            _webHelper = new Mock <IWebHelper>();

            _customerSettings = new CustomerSettings();
            _shippingSettings = new ShippingSettings();
            _addressSettings  = new AddressSettings();

            _taxService = new TaxService(_addressService.Object, _workContext, _storeContext.Object, _taxSettings,
                                         pluginFinder, _geoLookupService.Object, _countryService.Object, _stateProvinceService.Object, _logger.Object, _webHelper.Object,
                                         _customerSettings, _shippingSettings, _addressSettings);
        }
Exemplo n.º 10
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="shippingMethodRepository">Shipping method repository</param>
 /// <param name="deliveryDateRepository">Delivery date repository</param>
 /// <param name="warehouseRepository">Warehouse repository</param>
 /// <param name="pickupPointsRepository">Pickup points repository</param>
 /// <param name="logger">Logger</param>
 /// <param name="productService">Product service</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
 /// <param name="genericAttributeService">Generic attribute service</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="addressService">Address service</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="pluginFinder">Plugin finder</param>
 /// <param name="storeContext">Store context</param>
 /// <param name="eventPublisher">Event published</param>
 /// <param name="shoppingCartSettings">Shopping cart settings</param>
 /// <param name="cacheManager">Cache manager</param>
 public ShippingService(IRepository <ShippingMethod> shippingMethodRepository,
                        IRepository <DeliveryDate> deliveryDateRepository,
                        IRepository <Warehouse> warehouseRepository,
                        IRepository <PickupPoint> pickupPointsRepository,
                        ILogger logger,
                        IProductService productService,
                        IProductAttributeParser productAttributeParser,
                        ICheckoutAttributeParser checkoutAttributeParser,
                        IGenericAttributeService genericAttributeService,
                        ILocalizationService localizationService,
                        IAddressService addressService,
                        ShippingSettings shippingSettings,
                        IPluginFinder pluginFinder,
                        IStoreContext storeContext,
                        IEventPublisher eventPublisher,
                        ShoppingCartSettings shoppingCartSettings,
                        ICacheManager cacheManager,
                        IRepository <Product> productRepository)
 {
     this._shippingMethodRepository = shippingMethodRepository;
     this._deliveryDateRepository   = deliveryDateRepository;
     this._warehouseRepository      = warehouseRepository;
     this._pickupPointsRepository   = pickupPointsRepository;
     this._logger                  = logger;
     this._productService          = productService;
     this._productAttributeParser  = productAttributeParser;
     this._checkoutAttributeParser = checkoutAttributeParser;
     this._genericAttributeService = genericAttributeService;
     this._localizationService     = localizationService;
     this._addressService          = addressService;
     this._shippingSettings        = shippingSettings;
     this._pluginFinder            = pluginFinder;
     this._storeContext            = storeContext;
     this._eventPublisher          = eventPublisher;
     this._shoppingCartSettings    = shoppingCartSettings;
     this._cacheManager            = cacheManager;
     this._productRepository       = productRepository;
 }
Exemplo n.º 11
0
 public PluginController(ExternalAuthenticationSettings externalAuthenticationSettings,
                         ICustomerActivityService customerActivityService,
                         IEventPublisher eventPublisher,
                         IExternalAuthenticationService externalAuthenticationService,
                         ILocalizationService localizationService,
                         IPaymentService paymentService,
                         IPermissionService permissionService,
                         IPluginFinder pluginFinder,
                         IPluginModelFactory pluginModelFactory,
                         ISettingService settingService,
                         IShippingService shippingService,
                         IUploadService uploadService,
                         IWebHelper webHelper,
                         IWidgetService widgetService,
                         PaymentSettings paymentSettings,
                         ShippingSettings shippingSettings,
                         TaxSettings taxSettings,
                         WidgetSettings widgetSettings)
 {
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._customerActivityService        = customerActivityService;
     this._eventPublisher = eventPublisher;
     this._externalAuthenticationService = externalAuthenticationService;
     this._localizationService           = localizationService;
     this._paymentService     = paymentService;
     this._permissionService  = permissionService;
     this._pluginFinder       = pluginFinder;
     this._pluginModelFactory = pluginModelFactory;
     this._settingService     = settingService;
     this._shippingService    = shippingService;
     this._uploadService      = uploadService;
     this._webHelper          = webHelper;
     this._widgetService      = widgetService;
     this._paymentSettings    = paymentSettings;
     this._shippingSettings   = shippingSettings;
     this._taxSettings        = taxSettings;
     this._widgetSettings     = widgetSettings;
 }
        private BringRatesSampleBlockView Search(BringRatesSampleBlockView formData)
        {
            var user = "******";
            var key  = "81ab897a-2c94-4f10-8f20-2b04a0b1cae1";

            var settings = new ShippingSettings(GetBaseUri(), user, key);
            var client   = new ShippingClient(settings);

            var shipmentLeg          = ParameterMapper.GetShipmentLeg(formData);
            var packageSize          = ParameterMapper.GetPackageSize(formData);
            var additionalParameters = ParameterMapper.GetAdditionalParameters(formData);

            var query  = new EstimateQuery(shipmentLeg, packageSize, additionalParameters);
            var result = client.FindAsync <ShipmentEstimate>(query).Result;

            var estimateGroups = result.Estimates
                                 .GroupBy(x => x.GuiInformation.MainDisplayCategory)
                                 .Select(x => new BringRatesSampleBlockView.EstimateGroup(x.Key, x));

            var model = new BringRatesSampleBlockView(estimateGroups);

            return(model);
        }
Exemplo n.º 13
0
 public GetShippingAddressHandler(
     IShippingService shippingService,
     IPickupPointService pickupPointService,
     ITaxService taxService,
     ICurrencyService currencyService,
     IPriceFormatter priceFormatter,
     ITranslationService translationService,
     ICountryService countryService,
     IAclService aclService,
     IMediator mediator,
     ShippingSettings shippingSettings)
 {
     _shippingService    = shippingService;
     _pickupPointService = pickupPointService;
     _taxService         = taxService;
     _currencyService    = currencyService;
     _priceFormatter     = priceFormatter;
     _translationService = translationService;
     _countryService     = countryService;
     _aclService         = aclService;
     _mediator           = mediator;
     _shippingSettings   = shippingSettings;
 }
Exemplo n.º 14
0
 public GetShippingAddressHandler(
     IShippingService shippingService,
     IPickupPointService pickupPointService,
     ITaxService taxService,
     ICurrencyService currencyService,
     IPriceFormatter priceFormatter,
     ILocalizationService localizationService,
     ICountryService countryService,
     IStoreMappingService storeMappingService,
     IMediator mediator,
     ShippingSettings shippingSettings)
 {
     _shippingService     = shippingService;
     _pickupPointService  = pickupPointService;
     _taxService          = taxService;
     _currencyService     = currencyService;
     _priceFormatter      = priceFormatter;
     _localizationService = localizationService;
     _countryService      = countryService;
     _storeMappingService = storeMappingService;
     _mediator            = mediator;
     _shippingSettings    = shippingSettings;
 }
Exemplo n.º 15
0
 public WebWorkContext(
     HttpContextBase httpContext,
     IAccountService accountService,
     IUtilityService utilityService,
     IShippingService shippingService,
     IAuthenticationService authenticationService,
     IUserAgentHelper userAgentHelper,
     //ILogBuilder logBuilder,
     TaxSettings taxSettings,
     CurrencySettings currencySettings,
     ShippingSettings shippingSettings)
 {
     _httpContext           = httpContext;
     _accountService        = accountService;
     _utilityService        = utilityService;
     _shippingService       = shippingService;
     _taxSettings           = taxSettings;
     _currencySettings      = currencySettings;
     _shippingSettings      = shippingSettings;
     _authenticationService = authenticationService;
     _userAgentHelper       = userAgentHelper;
     //_logger = logBuilder.CreateLogger(typeof(WebWorkContext).FullName);
 }
Exemplo n.º 16
0
 private void PrintShippingSettings(ShippingSettings settings)
 {
     Console.WriteLine("Shipping settings for account {0}:", settings.AccountId);
     if (settings.PostalCodeGroups == null || settings.PostalCodeGroups.Count == 0)
     {
         Console.WriteLine("- No postal code groups.");
     }
     else
     {
         Console.WriteLine("- {0} postal code group(s):", settings.PostalCodeGroups.Count);
         foreach (var group in settings.PostalCodeGroups)
         {
             Console.WriteLine("  Postal code group \"{0}\":", group.Name);
             Console.WriteLine("  - Country: {0}", group.Country);
             Console.WriteLine("  - Contains {0} postal code ranges.", group.PostalCodeRanges.Count);
         }
     }
     if (settings.Services == null || settings.Services.Count == 0)
     {
         Console.WriteLine("- No shipping services.");
     }
     else
     {
         Console.WriteLine("- {0} shipping service(s):", settings.Services.Count);
         foreach (var service in settings.Services)
         {
             Console.WriteLine("  Service \"{0}\":", service.Name);
             Console.WriteLine("  - Active: {0}", service.Active);
             Console.WriteLine("  - Country: {0}", service.DeliveryCountry);
             Console.WriteLine("  - Currency: {0}", service.Currency);
             Console.WriteLine("  - Delivery time: {0} - {1} days",
                               service.DeliveryTime.MinTransitTimeInDays,
                               service.DeliveryTime.MaxTransitTimeInDays);
             Console.WriteLine("  - {0} rate group(s) in this service.", service.RateGroups.Count);
         }
     }
 }
        public new void SetUp()
        {
            _shippingSettings = new ShippingSettings();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");

            _shippingMethodRepository = MockRepository.GenerateMock <IRepository <ShippingMethod> >();
            _logger = new NullLogger();
            _productAttributeParser  = MockRepository.GenerateMock <IProductAttributeParser>();
            _productService          = MockRepository.GenerateMock <IProductService>();
            _checkoutAttributeParser = MockRepository.GenerateMock <ICheckoutAttributeParser>();

            var cacheManager = new NullCache();

            var pluginFinder = new PluginFinder();

            _eventPublisher = MockRepository.GenerateMock <IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything));

            _localizationService     = MockRepository.GenerateMock <ILocalizationService>();
            _genericAttributeService = MockRepository.GenerateMock <IGenericAttributeService>();
            _settingService          = MockRepository.GenerateMock <ISettingService>();

            _shoppingCartSettings = new ShoppingCartSettings();
            _shippingService      = new ShippingService(cacheManager,
                                                        _shippingMethodRepository,
                                                        _logger,
                                                        _productAttributeParser,
                                                        _productService,
                                                        _checkoutAttributeParser,
                                                        _genericAttributeService,
                                                        _localizationService,
                                                        _shippingSettings, pluginFinder, _eventPublisher,
                                                        _shoppingCartSettings,
                                                        _settingService,
                                                        this.ProviderManager);
        }
Exemplo n.º 18
0
        public OrderController(IOrderService orderService,
                               IShipmentService shipmentService, IWorkContext workContext,
                               ICurrencyService currencyService, IPriceFormatter priceFormatter,
                               IOrderProcessingService orderProcessingService,
                               IDateTimeHelper dateTimeHelper, IMeasureService measureService,
                               IPaymentService paymentService, ILocalizationService localizationService,
                               IPdfService pdfService, ICustomerService customerService,
                               IWorkflowMessageService workflowMessageService, IShippingService shippingService,
                               ICountryService countryService, LocalizationSettings localizationSettings,
                               MeasureSettings measureSettings, CatalogSettings catalogSettings,
                               OrderSettings orderSettings, TaxSettings taxSettings, PdfSettings pdfSettings,
                               ShippingSettings shippingSettings)
        {
            this._orderService           = orderService;
            this._shipmentService        = shipmentService;
            this._workContext            = workContext;
            this._currencyService        = currencyService;
            this._priceFormatter         = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._dateTimeHelper         = dateTimeHelper;
            this._measureService         = measureService;
            this._paymentService         = paymentService;
            this._localizationService    = localizationService;
            this._pdfService             = pdfService;
            this._customerService        = customerService;
            this._workflowMessageService = workflowMessageService;
            this._shippingService        = shippingService;
            this._countryService         = countryService;

            this._localizationSettings = localizationSettings;
            this._measureSettings      = measureSettings;
            this._catalogSettings      = catalogSettings;
            this._orderSettings        = orderSettings;
            this._taxSettings          = taxSettings;
            this._pdfSettings          = pdfSettings;
            this._shippingSettings     = shippingSettings;
        }
Exemplo n.º 19
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="addressService">Address service</param>
 /// <param name="workContext">Work context</param>
 /// <param name="storeContext">Store context</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="pluginFinder">Plugin finder</param>
 /// <param name="geoLookupService">GEO lookup service</param>
 /// <param name="countryService">Country service</param>
 /// <param name="stateProvinceService">State province service</param>
 /// <param name="logger">Logger service</param>
 /// <param name="customerSettings">Customer settings</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="addressSettings">Address settings</param>
 public WB_TaxService(IAddressService addressService,
                      IWorkContext workContext,
                      IStoreContext storeContext,
                      TaxSettings taxSettings,
                      IPluginFinder pluginFinder,
                      IGeoLookupService geoLookupService,
                      ICountryService countryService,
                      IStateProvinceService stateProvinceService,
                      ILogger logger,
                      CustomerSettings customerSettings,
                      ShippingSettings shippingSettings,
                      AddressSettings addressSettings) : base(addressService,
                                                              workContext,
                                                              storeContext,
                                                              taxSettings,
                                                              pluginFinder,
                                                              geoLookupService,
                                                              countryService,
                                                              stateProvinceService,
                                                              logger,
                                                              customerSettings,
                                                              shippingSettings,
                                                              addressSettings)
 {
     this._addressService       = addressService;
     this._workContext          = workContext;
     this._storeContext         = storeContext;
     this._taxSettings          = taxSettings;
     this._pluginFinder         = pluginFinder;
     this._geoLookupService     = geoLookupService;
     this._countryService       = countryService;
     this._stateProvinceService = stateProvinceService;
     this._logger           = logger;
     this._customerSettings = customerSettings;
     this._shippingSettings = shippingSettings;
     this._addressSettings  = addressSettings;
 }
Exemplo n.º 20
0
 public PluginController(IPluginFinder pluginFinder,
                         IOfficialFeedManager officialFeedManager,
                         ILocalizationService localizationService,
                         IWebHelper webHelper,
                         IPermissionService permissionService,
                         ILanguageService languageService,
                         ISettingService settingService,
                         IStoreService storeService,
                         PaymentSettings paymentSettings,
                         ShippingSettings shippingSettings,
                         TaxSettings taxSettings,
                         ExternalAuthenticationSettings externalAuthenticationSettings,
                         WidgetSettings widgetSettings,
                         ICustomerActivityService customerActivityService,
                         ICustomerService customerService,
                         IUploadService uploadService,
                         IEventPublisher eventPublisher)
 {
     this._pluginFinder                   = pluginFinder;
     this._officialFeedManager            = officialFeedManager;
     this._localizationService            = localizationService;
     this._webHelper                      = webHelper;
     this._permissionService              = permissionService;
     this._languageService                = languageService;
     this._settingService                 = settingService;
     this._storeService                   = storeService;
     this._paymentSettings                = paymentSettings;
     this._shippingSettings               = shippingSettings;
     this._taxSettings                    = taxSettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._widgetSettings                 = widgetSettings;
     this._customerActivityService        = customerActivityService;
     this._customerService                = customerService;
     this._uploadService                  = uploadService;
     this._eventPublisher                 = eventPublisher;
 }
Exemplo n.º 21
0
 public ShippingController(IAddressService addressService,
                           ICountryService countryService,
                           ICustomerActivityService customerActivityService,
                           IDateRangeService dateRangeService,
                           IEventPublisher eventPublisher,
                           ILocalizationService localizationService,
                           ILocalizedEntityService localizedEntityService,
                           INotificationService notificationService,
                           IPermissionService permissionService,
                           IPickupPluginManager pickupPluginManager,
                           ISettingService settingService,
                           IShippingModelFactory shippingModelFactory,
                           IShippingPluginManager shippingPluginManager,
                           IShippingService shippingService,
                           IGenericAttributeService genericAttributeService,
                           IWorkContext workContext,
                           ShippingSettings shippingSettings)
 {
     _addressService          = addressService;
     _countryService          = countryService;
     _customerActivityService = customerActivityService;
     _dateRangeService        = dateRangeService;
     _eventPublisher          = eventPublisher;
     _localizationService     = localizationService;
     _localizedEntityService  = localizedEntityService;
     _notificationService     = notificationService;
     _permissionService       = permissionService;
     _pickupPluginManager     = pickupPluginManager;
     _settingService          = settingService;
     _shippingModelFactory    = shippingModelFactory;
     _shippingPluginManager   = shippingPluginManager;
     _shippingService         = shippingService;
     _genericAttributeService = genericAttributeService;
     _workContext             = workContext;
     _shippingSettings        = shippingSettings;
 }
Exemplo n.º 22
0
 public ShippingController(IShippingService shippingService,
                           ShippingSettings shippingSettings,
                           ISettingService settingService,
                           IAddressService addressService,
                           ICountryService countryService,
                           IStateProvinceService stateProvinceService,
                           ILocalizationService localizationService,
                           IPermissionService permissionService,
                           ILanguageService languageService,
                           IPluginFinder pluginFinder,
                           IWebHelper webHelper)
 {
     this._shippingService      = shippingService;
     this._shippingSettings     = shippingSettings;
     this._settingService       = settingService;
     this._addressService       = addressService;
     this._countryService       = countryService;
     this._stateProvinceService = stateProvinceService;
     this._localizationService  = localizationService;
     this._permissionService    = permissionService;
     this._languageService      = languageService;
     this._pluginFinder         = pluginFinder;
     this._webHelper            = webHelper;
 }
Exemplo n.º 23
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="shippingMethodRepository">Shipping method repository</param>
 /// <param name="logger">Logger</param>
 /// <param name="productService">Product service</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
 /// <param name="genericAttributeService">Generic attribute service</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="pluginFinder">Plugin finder</param>
 /// <param name="eventPublisher">Event published</param>
 /// <param name="shoppingCartSettings">Shopping cart settings</param>
 public ShippingService(IRepository <ShippingMethod> shippingMethodRepository,
                        ILogger logger,
                        IProductService productService,
                        IProductAttributeParser productAttributeParser,
                        ICheckoutAttributeParser checkoutAttributeParser,
                        IGenericAttributeService genericAttributeService,
                        ILocalizationService localizationService,
                        ShippingSettings shippingSettings,
                        IPluginFinder pluginFinder,
                        IEventPublisher eventPublisher,
                        ShoppingCartSettings shoppingCartSettings)
 {
     this._shippingMethodRepository = shippingMethodRepository;
     this._logger                  = logger;
     this._productService          = productService;
     this._productAttributeParser  = productAttributeParser;
     this._checkoutAttributeParser = checkoutAttributeParser;
     this._genericAttributeService = genericAttributeService;
     this._localizationService     = localizationService;
     this._shippingSettings        = shippingSettings;
     this._pluginFinder            = pluginFinder;
     this._eventPublisher          = eventPublisher;
     this._shoppingCartSettings    = shoppingCartSettings;
 }
Exemplo n.º 24
0
 public ShippingsController(IJsonFieldsSerializer jsonFieldsSerializer,
                            ISettingService settingService,
                            IStoreContext storeContext,
                            IProductApiService productApiService,
                            ICustomerActivityService customerActivityService,
                            ILocalizationService localizationService,
                            IAclService aclService,
                            IStoreMappingService storeMappingService,
                            IStoreService storeService,
                            ICustomerService customerService,
                            IDiscountService discountService,
                            IPictureService pictureService,
                            IShippingService shippingService,
                            ICountryService countryService,
                            IStateProvinceService stateProvinceService,
                            IWorkContext workContext,
                            IOrderTotalCalculationService orderTotalCalculationService,
                            ITaxService taxService,
                            ICurrencyService currencyService,
                            IPriceFormatter priceFormatter,
                            ShippingSettings shippingSettings,
                            IDTOHelper dtoHelper) : base(jsonFieldsSerializer, aclService, customerService, storeMappingService, storeService, discountService, customerActivityService, localizationService, pictureService)
 {
     _settingService               = settingService;
     _storeContext                 = storeContext;
     _productApiService            = productApiService;
     _shippingService              = shippingService;
     _countryService               = countryService;
     _stateProvinceService         = stateProvinceService;
     _workContext                  = workContext;
     _orderTotalCalculationService = orderTotalCalculationService;
     _taxService          = taxService;
     _currencyService     = currencyService;
     _localizationService = localizationService;
     _shippingSettings    = shippingSettings;
 }
Exemplo n.º 25
0
        public ConfigModel()
        {
            /// all the objects in the class have been initialized with an empty object to avoid
            /// throwing Object reference error even in all circumstances.
            /// these objects SHOULD be initialized with some default values - possibly from web.config for worst case scenarios.

            ConfigSettings    = new List <ConfigSettingModel>();
            BasketSettings    = new BasketSettings();
            B2BSettings       = new B2BSettings();
            CatalogSettings   = new CatalogSettings();
            DomainSettings    = new DomainSettings();
            OrderSettings     = new OrderSettings();
            SearchSettings    = new SearchSettings();
            SeoSettings       = new SeoSettings();
            ShippingSettings  = new ShippingSettings();
            SocialSettings    = new SocialSettings();
            Currencies        = new List <CurrencyModel>();
            ShippingCountries = new List <CountryModel>();
            BillingCountries  = new List <CountryModel>();
            Languages         = new List <LanguageModel>();
            RegionalSettings  = new RegionalSettings();
            ReviewSettings    = new List <ProductReviewSection>();
            GeoLocators       = new List <GeoLocatorModel>();
        }
Exemplo n.º 26
0
 public PluginController(IPluginFinder pluginFinder,
                         IPermissionService permissionService,
                         ILanguageService languageService,
                         PaymentSettings paymentSettings,
                         ShippingSettings shippingSettings,
                         TaxSettings taxSettings,
                         ExternalAuthenticationSettings externalAuthenticationSettings,
                         WidgetSettings widgetSettings,
                         IProviderManager providerManager,
                         PluginMediator pluginMediator,
                         ICommonServices services)
 {
     this._pluginFinder      = pluginFinder;
     this._permissionService = permissionService;
     this._languageService   = languageService;
     this._paymentSettings   = paymentSettings;
     this._shippingSettings  = shippingSettings;
     this._taxSettings       = taxSettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._widgetSettings  = widgetSettings;
     this._providerManager = providerManager;
     this._pluginMediator  = pluginMediator;
     this._services        = services;
 }
Exemplo n.º 27
0
        public new void SetUp()
        {
            _shippingSettings = new ShippingSettings();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");

            _shippingMethodRepository = MockRepository.GenerateMock <IRepository <ShippingMethod> >();
            _storeMappingRepository   = MockRepository.GenerateMock <IRepository <StoreMapping> >();
            _productAttributeParser   = MockRepository.GenerateMock <IProductAttributeParser>();
            _productService           = MockRepository.GenerateMock <IProductService>();
            _checkoutAttributeParser  = MockRepository.GenerateMock <ICheckoutAttributeParser>();
            _services = MockRepository.GenerateMock <ICommonServices>();

            _eventPublisher = MockRepository.GenerateMock <IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything));

            _genericAttributeService = MockRepository.GenerateMock <IGenericAttributeService>();
            _settingService          = MockRepository.GenerateMock <ISettingService>();
            _typeFinder = MockRepository.GenerateMock <ITypeFinder>();

            _shoppingCartSettings = new ShoppingCartSettings();
            _shippingService      = new ShippingService(
                _shippingMethodRepository,
                _storeMappingRepository,
                _productAttributeParser,
                _productService,
                _checkoutAttributeParser,
                _genericAttributeService,
                _shippingSettings,
                _eventPublisher,
                _shoppingCartSettings,
                _settingService,
                this.ProviderManager,
                _typeFinder,
                _services);
        }
Exemplo n.º 28
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="workContext">Work context</param>
 /// <param name="priceCalculationService">Price calculation service</param>
 /// <param name="taxService">Tax service</param>
 /// <param name="shippingService">Shipping service</param>
 /// <param name="paymentService">Payment service</param>
 /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
 /// <param name="discountService">Discount service</param>
 /// <param name="giftVoucherService">Gift voucher service</param>
 /// <param name="loyaltyPointsService">Loyalty points service</param>
 /// <param name="productService">Product service</param>
 /// <param name="currencyService">Currency service</param>
 /// <param name="groupService">Group</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="loyaltyPointsSettings">Loyalty points settings</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="shoppingCartSettings">Shopping cart settings</param>
 /// <param name="catalogSettings">Catalog settings</param>
 public OrderCalculationService(IWorkContext workContext,
                                IPricingService priceCalculationService,
                                ITaxService taxService,
                                IShippingService shippingService,
                                IPaymentService paymentService,
                                ICheckoutAttributeParser checkoutAttributeParser,
                                IDiscountService discountService,
                                IGiftVoucherService giftVoucherService,
                                ILoyaltyPointsService loyaltyPointsService,
                                IProductService productService,
                                ICurrencyService currencyService,
                                IGroupService groupService,
                                TaxSettings taxSettings,
                                LoyaltyPointsSettings loyaltyPointsSettings,
                                ShippingSettings shippingSettings,
                                ShoppingCartSettings shoppingCartSettings,
                                CatalogSettings catalogSettings)
 {
     _workContext             = workContext;
     _pricingService          = priceCalculationService;
     _taxService              = taxService;
     _shippingService         = shippingService;
     _paymentService          = paymentService;
     _checkoutAttributeParser = checkoutAttributeParser;
     _discountService         = discountService;
     _giftVoucherService      = giftVoucherService;
     _loyaltyPointsService    = loyaltyPointsService;
     _productService          = productService;
     _currencyService         = currencyService;
     _groupService            = groupService;
     _taxSettings             = taxSettings;
     _loyaltyPointsSettings   = loyaltyPointsSettings;
     _shippingSettings        = shippingSettings;
     _shoppingCartSettings    = shoppingCartSettings;
     _catalogSettings         = catalogSettings;
 }
Exemplo n.º 29
0
 public ShippingService(IAddressService addressService,
                        ICacheManager cacheManager,
                        ICheckoutAttributeParser checkoutAttributeParser,
                        IEventPublisher eventPublisher,
                        IGenericAttributeService genericAttributeService,
                        ILocalizationService localizationService,
                        ILogger logger,
                        IPickupPluginManager pickupPluginManager,
                        IPriceCalculationService priceCalculationService,
                        IProductAttributeParser productAttributeParser,
                        IProductService productService,
                        IRepository <ShippingMethod> shippingMethodRepository,
                        IRepository <Warehouse> warehouseRepository,
                        IShippingPluginManager shippingPluginManager,
                        IStoreContext storeContext,
                        ShippingSettings shippingSettings,
                        ShoppingCartSettings shoppingCartSettings)
 {
     _addressService          = addressService;
     _cacheManager            = cacheManager;
     _checkoutAttributeParser = checkoutAttributeParser;
     _eventPublisher          = eventPublisher;
     _genericAttributeService = genericAttributeService;
     _localizationService     = localizationService;
     _logger = logger;
     _pickupPluginManager      = pickupPluginManager;
     _priceCalculationService  = priceCalculationService;
     _productAttributeParser   = productAttributeParser;
     _productService           = productService;
     _shippingMethodRepository = shippingMethodRepository;
     _warehouseRepository      = warehouseRepository;
     _shippingPluginManager    = shippingPluginManager;
     _storeContext             = storeContext;
     _shippingSettings         = shippingSettings;
     _shoppingCartSettings     = shoppingCartSettings;
 }
Exemplo n.º 30
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="workContext">Work context</param>
 /// <param name="storeContext">Store context</param>
 /// <param name="priceCalculationService">Price calculation service</param>
 /// <param name="taxService">Tax service</param>
 /// <param name="shippingService">Shipping service</param>
 /// <param name="paymentService">Payment service</param>
 /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
 /// <param name="discountService">Discount service</param>
 /// <param name="giftCardService">Gift card service</param>
 /// <param name="rewardPointsService">Reward points service</param>
 /// <param name="currencyService">Currency service</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="shoppingCartSettings">Shopping cart settings</param>
 /// <param name="catalogSettings">Catalog settings</param>
 public OrderTotalCalculationService(IWorkContext workContext,
                                     IStoreContext storeContext,
                                     IPriceCalculationService priceCalculationService,
                                     ITaxService taxService,
                                     IShippingService shippingService,
                                     IPaymentService paymentService,
                                     ICheckoutAttributeParser checkoutAttributeParser,
                                     IDiscountService discountService,
                                     IGiftCardService giftCardService,
                                     IRewardPointsService rewardPointsService,
                                     IProductService productService,
                                     ICurrencyService currencyService,
                                     TaxSettings taxSettings,
                                     RewardPointsSettings rewardPointsSettings,
                                     ShippingSettings shippingSettings,
                                     ShoppingCartSettings shoppingCartSettings,
                                     CatalogSettings catalogSettings)
 {
     _workContext             = workContext;
     _storeContext            = storeContext;
     _priceCalculationService = priceCalculationService;
     _taxService              = taxService;
     _shippingService         = shippingService;
     _paymentService          = paymentService;
     _checkoutAttributeParser = checkoutAttributeParser;
     _discountService         = discountService;
     _giftCardService         = giftCardService;
     _rewardPointsService     = rewardPointsService;
     _productService          = productService;
     _currencyService         = currencyService;
     _taxSettings             = taxSettings;
     _rewardPointsSettings    = rewardPointsSettings;
     _shippingSettings        = shippingSettings;
     _shoppingCartSettings    = shoppingCartSettings;
     _catalogSettings         = catalogSettings;
 }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="orderService">Order service</param>
 /// <param name="webHelper">Web helper</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="languageService">Language service</param>
 /// <param name="productService">Product service</param>
 /// <param name="paymentService">Payment service</param>
 /// <param name="logger">Logger</param>
 /// <param name="orderTotalCalculationService">Order total calculationservice</param>
 /// <param name="priceCalculationService">Price calculation service</param>
 /// <param name="priceFormatter">Price formatter</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="productAttributeFormatter">Product attribute formatter</param>
 /// <param name="giftCardService">Gift card service</param>
 /// <param name="shoppingCartService">Shopping cart service</param>
 /// <param name="checkoutAttributeFormatter">Checkout attribute service</param>
 /// <param name="shippingService">Shipping service</param>
 /// <param name="shipmentService">Shipment service</param>
 /// <param name="taxService">Tax service</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="discountService">Discount service</param>
 /// <param name="encryptionService">Encryption service</param>
 /// <param name="workContext">Work context</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="vendorService">Vendor service</param>
 /// <param name="customerActivityService">Customer activity service</param>
 /// <param name="currencyService">Currency service</param>
 /// <param name="affiliateService">Affiliate service</param>
 /// <param name="eventPublisher">Event published</param>
 /// <param name="pdfService">PDF service</param>
 /// <param name="paymentSettings">Payment settings</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="orderSettings">Order settings</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="currencySettings">Currency settings</param>
 public OrderProcessingService(IOrderService orderService,
     IWebHelper webHelper,
     ILocalizationService localizationService,
     ILanguageService languageService,
     IProductService productService,
     IPaymentService paymentService,
     ILogger logger,
     IOrderTotalCalculationService orderTotalCalculationService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     IProductAttributeParser productAttributeParser,
     IProductAttributeFormatter productAttributeFormatter,
     IGiftCardService giftCardService,
     IShoppingCartService shoppingCartService,
     ICheckoutAttributeFormatter checkoutAttributeFormatter,
     IShippingService shippingService,
     IShipmentService shipmentService,
     ITaxService taxService,
     ICustomerService customerService,
     IDiscountService discountService,
     IEncryptionService encryptionService,
     IWorkContext workContext,
     IWorkflowMessageService workflowMessageService,
     IVendorService vendorService,
     ICustomerActivityService customerActivityService,
     ICurrencyService currencyService,
     IAffiliateService affiliateService,
     IEventPublisher eventPublisher,
     IPdfService pdfService,
     ShippingSettings shippingSettings,
     PaymentSettings paymentSettings,
     RewardPointsSettings rewardPointsSettings,
     OrderSettings orderSettings,
     TaxSettings taxSettings,
     LocalizationSettings localizationSettings,
     CurrencySettings currencySettings,
     IGenericAttributeService genericAttributeService,
     PromoSettings promoSettings,
     IPromoUtilities promoUtilities,
     IPromoOrderService promoOrderService,
     IPromoService promoService,
     IStoreContext storeContext)
     : base(orderService, webHelper, localizationService, languageService, productService, paymentService,
                                                 logger, orderTotalCalculationService, priceCalculationService, priceFormatter, productAttributeParser,
                                                 productAttributeFormatter, giftCardService, shoppingCartService, checkoutAttributeFormatter, shippingService,
                                                 shipmentService, taxService, customerService, discountService, encryptionService, workContext, workflowMessageService,
                                                 vendorService, customerActivityService, currencyService, affiliateService, eventPublisher, pdfService,
                                                 shippingSettings, paymentSettings, rewardPointsSettings, orderSettings, taxSettings,
                                                 localizationSettings, currencySettings)
 {
     this._orderService = orderService;
     this._webHelper = webHelper;
     this._localizationService = localizationService;
     this._languageService = languageService;
     this._productService = productService;
     this._paymentService = paymentService;
     this._logger = logger;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._priceCalculationService = priceCalculationService;
     this._priceFormatter = priceFormatter;
     this._productAttributeParser = productAttributeParser;
     this._productAttributeFormatter = productAttributeFormatter;
     this._giftCardService = giftCardService;
     this._shoppingCartService = shoppingCartService;
     this._checkoutAttributeFormatter = checkoutAttributeFormatter;
     this._workContext = workContext;
     this._workflowMessageService = workflowMessageService;
     this._vendorService = vendorService;
     this._shippingService = shippingService;
     this._shipmentService = shipmentService;
     this._taxService = taxService;
     this._customerService = customerService;
     this._discountService = discountService;
     this._encryptionService = encryptionService;
     this._customerActivityService = customerActivityService;
     this._currencyService = currencyService;
     this._affiliateService = affiliateService;
     this._eventPublisher = eventPublisher;
     this._pdfService = pdfService;
     this._paymentSettings = paymentSettings;
     this._shippingSettings = shippingSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._orderSettings = orderSettings;
     this._taxSettings = taxSettings;
     this._localizationSettings = localizationSettings;
     this._currencySettings = currencySettings;
     this._genericAttributeService = genericAttributeService;
     this._promoSettings = promoSettings;
     this._promoUtilities = promoUtilities;
     this._promoOrderService = promoOrderService;
     this._promoService = promoService;
     this._storeContext = storeContext;
 }
Exemplo n.º 32
0
        /// <summary>
        /// Updates the shipping settings of the account. This method can only be called for accounts to which the managing account has access: either the managing account itself for any Merchant Center account, or any sub-account when the managing account is a multi-client account.
        /// Documentation https://developers.google.com/shoppingcontent/v2/reference/shippingsettings/update
        /// Generation Note: This does not always build corectly.  Google needs to standardise things I need to figuer out which ones are wrong.
        /// </summary>
        /// <param name="service">Authenticated Shoppingcontent service.</param>
        /// <param name="merchantId">The ID of the managing account.</param>
        /// <param name="accountId">The ID of the account for which to get/update shipping settings.</param>
        /// <param name="body">A valid Shoppingcontent v2 body.</param>
        /// <param name="optional">Optional paramaters.</param>
        /// <returns>ShippingSettingsResponse</returns>
        public static ShippingSettings Update(ShoppingcontentService service, string merchantId, string accountId, ShippingSettings body, ShippingsettingsUpdateOptionalParms optional = null)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (body == null)
                {
                    throw new ArgumentNullException("body");
                }
                if (merchantId == null)
                {
                    throw new ArgumentNullException(merchantId);
                }
                if (accountId == null)
                {
                    throw new ArgumentNullException(accountId);
                }

                // Building the initial request.
                var request = service.Shippingsettings.Update(body, merchantId, accountId);

                // Applying optional parameters to the request.
                request = (ShippingsettingsResource.UpdateRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Shippingsettings.Update failed.", ex);
            }
        }
 public OrderTotalCalculationService(IWorkContext workContext,
     IStoreContext storeContext,
     IPromosPriceCalculationService promosPriceCalculationService,
     IPriceCalculationService priceCalculationService,
     ITaxService taxService,
     IShippingService shippingService,
     IPaymentService paymentService,
     ICheckoutAttributeParser checkoutAttributeParser,
     IDiscountService discountService,
     IGiftCardService giftCardService,
     IGenericAttributeService genericAttributeService,
     TaxSettings taxSettings,
     RewardPointsSettings rewardPointsSettings,
     ShippingSettings shippingSettings,
     ShoppingCartSettings shoppingCartSettings,
     CatalogSettings catalogSettings,
     IPromoUtilities promoUtilities,
     PromoSettings promoSettings,
     IPromoService promoService,
     IAttributeValueService attributeValueService,
     ITaxServiceExtensions taxServiceExtensions,
     ICurrencyService currencyService)
     : base(workContext,
         storeContext,
         priceCalculationService,
         taxService,
         shippingService,
         paymentService,
         checkoutAttributeParser,
         discountService,
         giftCardService,
         genericAttributeService,
         taxSettings,
         rewardPointsSettings,
         shippingSettings,
         shoppingCartSettings,
         catalogSettings)
 {
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._promosPriceCalculationService = promosPriceCalculationService;
     this._taxService = taxService;
     this._shippingService = shippingService;
     this._paymentService = paymentService;
     this._checkoutAttributeParser = checkoutAttributeParser;
     this._discountService = discountService;
     this._giftCardService = giftCardService;
     this._genericAttributeService = genericAttributeService;
     this._taxSettings = taxSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._shippingSettings = shippingSettings;
     this._shoppingCartSettings = shoppingCartSettings;
     this._catalogSettings = catalogSettings;
     this._promoUtilities = promoUtilities;
     this._promoSettings = promoSettings;
     this._promoService = promoService;
     this._priceCalculationService = priceCalculationService;
     this._attributeValueService = attributeValueService;
     this._taxServiceExtensions = taxServiceExtensions;
     this._currencyService = currencyService;
 }