/// <summary>
        /// Construct a new instance
        /// </summary>
        public CategoryProductsProvider(ApiProductsProvider apiProductsProvider, ProductMapper productMapper)
        {
            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            if (productMapper == null)
            {
                throw new ArgumentNullException("productMapper");
            }

            this.apiProductsProvider = apiProductsProvider;
            this.productMapper = productMapper;
        }
        /// <summary>
        /// Construct a new instance
        /// </summary>
        public CategoryProductsProvider(ApiProductsProvider apiProductsProvider, ProductMapper productMapper)
        {
            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            if (productMapper == null)
            {
                throw new ArgumentNullException("productMapper");
            }

            this.apiProductsProvider = apiProductsProvider;
            this.productMapper       = productMapper;
        }
        /// <summary>
        /// Create new instance wrapping the base service.
        /// </summary>
        public SetupFeeCartPricingService(ICartPricingService baseCartPricingService, ApiProductsProvider apiProductsProvider)
        {
            if (baseCartPricingService == null)
            {
                throw new ArgumentNullException("baseCartPricingService");
            }

            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            this.baseCartPricingService = baseCartPricingService;
            this.apiProductsProvider    = apiProductsProvider;
        }
        /// <summary>
        /// Create new instance wrapping the base service.
        /// </summary>
        public SetupFeeCartPricingService(ICartPricingService baseCartPricingService, ApiProductsProvider apiProductsProvider)
        {
            if (baseCartPricingService == null)
            {
                throw new ArgumentNullException("baseCartPricingService");
            }

            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            this.baseCartPricingService = baseCartPricingService;
            this.apiProductsProvider = apiProductsProvider;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Construct a new instance
        /// </summary>
        public DomainsProvider(
            IResellerDataProvider resellerDataProvider,
            ICurrencyPreferenceProvider currencyPreferenceProvider,
            ApiProductsProvider apiProductsProvider,
            ProductMapper productMapper,
            PublicBillingApiProxy billingApi,
            IShopNameProvider shopNameProvider) : base(billingApi)
        {
            if (resellerDataProvider == null)
            {
                throw new ArgumentException("resellerDataProvider");
            }

            if (currencyPreferenceProvider == null)
            {
                throw new ArgumentException("currencyPreferenceProvider");
            }

            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            if (productMapper == null)
            {
                throw new ArgumentNullException("productMapper");
            }

            if (shopNameProvider == null)
            {
                throw new ArgumentNullException("shopNameProvider");
            }

            var resellerData = resellerDataProvider.GetResellerAccountData();

            this.resellerId       = resellerData.Id;
            this.countryCode      = resellerData.DefaultCountry.Code;
            this.currencyCode     = currencyPreferenceProvider.GetCurrentCurrency().Code;
            this.productMapper    = productMapper;
            this.shopNameProvider = shopNameProvider;

            this.tldProducts = apiProductsProvider.GetProductsByCategories(new List <string> {
                "TLD"
            });
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Construct a new instance
        /// </summary>
        public DomainsProvider(
            IResellerDataProvider resellerDataProvider, 
            ICurrencyPreferenceProvider currencyPreferenceProvider, 
            ApiProductsProvider apiProductsProvider, 
            ProductMapper productMapper,
            PublicBillingApiProxy billingApi,
            IShopNameProvider shopNameProvider) : base(billingApi)
        {
            if (resellerDataProvider == null)
            {
                throw new ArgumentException("resellerDataProvider");
            }

            if (currencyPreferenceProvider == null)
            {
                throw new ArgumentException("currencyPreferenceProvider");
            }

            if (apiProductsProvider == null)
            {
                throw new ArgumentNullException("apiProductsProvider");
            }

            if (productMapper == null)
            {
                throw new ArgumentNullException("productMapper");
            }

            if (shopNameProvider == null)
            {
                throw new ArgumentNullException("shopNameProvider");
            }

            var resellerData = resellerDataProvider.GetResellerAccountData();

            this.resellerId = resellerData.Id;
            this.countryCode = resellerData.DefaultCountry.Code;
            this.currencyCode = currencyPreferenceProvider.GetCurrentCurrency().Code;
            this.productMapper = productMapper;
            this.shopNameProvider = shopNameProvider;

            this.tldProducts = apiProductsProvider.GetProductsByCategories(new List<string> { "TLD" });
        }