public ApiFactory(IBasketApi basketApi, IOrderApi orderApi, IUsersApi usersApi, IProductApi productApi)
 {
     _basketApi  = basketApi;
     _orderApi   = orderApi;
     _usersApi   = usersApi;
     _productApi = productApi;
 }
Exemple #2
0
 public AddItemCommandHandler(ICartRepository cartRepository, IProductApi productApi, RetryStrategy retryStrategy, ILogger logger)
 {
     this.cartRepository = cartRepository;
     this.productApi     = productApi;
     this.retryStrategy  = retryStrategy;
     this.logger         = logger;
 }
Exemple #3
0
 public ProductDetailModel(IApiFactory factory, IWebHostEnvironment env, IMapper mapper)
 {
     _productApi  = factory.ProductApi ?? throw new ArgumentNullException(nameof(_productApi));
     _basketApi   = factory.BasketApi ?? throw new ArgumentNullException(nameof(_basketApi));
     _commentsApi = factory.CommentsApi ?? throw new ArgumentNullException(nameof(_commentsApi));
     _mapper      = mapper;
     _env         = env;
 }
        public ApiConnector(string country = "world", string locale = "en", bool useTestServer = false)
        {
            baseUri = Utils.BuildBaseUri(country, locale, useTestServer);
            client  = new HttpClient();

            loginApi   = new LoginApi(baseUri, ref client);
            productApi = new ProductApi(baseUri, ref client);
        }
 public Railway(ICatalogApi catalogApi,
                IProductApi productApi,
                IProductConverter productConverter)
 {
     this.catalogApi       = catalogApi;
     this.productApi       = productApi;
     this.productConverter = productConverter;
 }
        public ApiConnector(string country, string locale, bool useTestServer, ILoginApi loginApi, IProductApi productApi)
        {
            baseUri = Utils.BuildBaseUri(country, locale, useTestServer);
            client  = new HttpClient();

            this.loginApi   = loginApi;
            this.productApi = productApi;
        }
Exemple #7
0
 public SyncServerService(IProductApi productApi, IThemeApi themeApi, IShippingApi shippingApi, IPaymentApi paymentApi, IOrderApi orderApi)
 {
     _themeApi    = themeApi;
     _productApi  = productApi;
     _shippingApi = shippingApi;
     _paymentApi  = paymentApi;
     _orderApi    = orderApi;
 }
Exemple #8
0
 public ProductsViewModelService(
     ILoggerFactory loggerFactory,
     IMapper mapper,
     IProductApi productApi)
 {
     logger          = loggerFactory.CreateLogger <ProductsViewModelService>();
     this.mapper     = mapper;
     this.productApi = productApi;
 }
Exemple #9
0
 public ProductsViewModel(
     IPreferencesService preferencesService,
     ILoggingService loggingService,
     IRefitService refitService,
     ITaskHelperFactory taskHelperFactory)
 {
     this.preferencesService = preferencesService;
     this.loggingService     = loggingService;
     this.taskHelperFactory  = taskHelperFactory;
     this.productApi         = refitService.InitRefitInstance <IProductApi>(isAutenticated: true);
 }
 public SalesViewModel(IProductApi productApi,
                       IConfigHelper configHelper,
                       ISaleApi saleApi,
                       IMapper mapper,
                       IDialogService dialogService)
 {
     _productApi    = productApi;
     _configHelper  = configHelper;
     _saleApi       = saleApi;
     _mapper        = mapper;
     _dialogService = dialogService;
 }
 public HeroService(HttpClient httpClient, IProductApi productService, IPaxApi paxService,
                    ISearchApi searchApi, IScheduleApi scheduleApi, IProductPricingApi productPricingApi,
                    IPaymentApi paymentApi, IBookingApi bookingApi, IVoucherApi voucherApi)
 {
     _httpClient       = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
     ProductApi        = productService ?? throw new ArgumentNullException(nameof(productService));
     PaxApi            = paxService ?? throw new ArgumentNullException(nameof(paxService));
     SearchApi         = searchApi ?? throw new ArgumentNullException(nameof(searchApi));
     ScheduleApi       = scheduleApi ?? throw new ArgumentNullException(nameof(scheduleApi));
     ProductPricingApi = productPricingApi ?? throw new ArgumentNullException(nameof(productPricingApi));
     PaymentApi        = paymentApi ?? throw new ArgumentNullException(nameof(paymentApi));
     BookingApi        = bookingApi ?? throw new ArgumentNullException(nameof(bookingApi));
     VoucherApi        = voucherApi ?? throw new ArgumentNullException(nameof(voucherApi));
 }
        public ProductApiUnitTest()
        {
            var mockMapper = new Mock <IMapper>();

            mockMapper.Setup(x => x.Map <IEnumerable <ProductReadDto> >(It.IsAny <IEnumerable <Product> >()))
            .Returns((IEnumerable <Product> source) =>
            {
                return(source.Select(p => new ProductReadDto
                {
                    Name = p.Name,
                    Price = p.Price,
                    Source = p.Source,
                    SourceUrl = p.SourceUrl,
                    ImageUrl = p.ImageUrl
                }));
            });
            _productApi = new ProductApi(new StoreSiteAggregation(new StoreSiteConfiguration(new WebScrapper(), new HttpClient())), mockMapper.Object);
        }
Exemple #13
0
        /// <summary>
        /// This is the constructor. It is used to
        /// </summary>
        public ProductsController(IDistributedCache cache,
                                  IProductApi productMaintenanceApi,
                                  IDownloadTimesApi downloadTimesApi,
                                  IProductTypesApi productTypesApi,
                                  IManufacturersApi manufacturersApi,
                                  IInstallTypesApi installTypesApi,
                                  IMobileLookupApi mobileLookupApi,
                                  IBrandApi brandApi,
                                  IStringLocalizer <ProductsController> localizer)
        {
            this._cache = cache;

            this._productMaintenanceApi = productMaintenanceApi;

            this._downloadTimesApi = downloadTimesApi;
            this._productTypesApi  = productTypesApi;
            this._manufacturersApi = manufacturersApi;
            this._installTypesApi  = installTypesApi;
            this._mobileLookupApi  = mobileLookupApi;
            this._brandApi         = brandApi;

            this._localizer = localizer;
        }
 public IndexModel(IApiFactory factory)
 {
     _productApi = factory.ProductApi ?? throw new ArgumentNullException(nameof(_productApi));
     _basketApi  = factory.BasketApi ?? throw new ArgumentNullException(nameof(_basketApi));
 }
Exemple #15
0
        //private string Layout = "~/Views/Category/"; // Add Temp variable for call Layout2 Templates

        public CategoryController(ICategoryApi categoryApi, IProductApi productApi)
        {
            _categoryApi = categoryApi;
            _productApi  = productApi;
        }
 public BrowseSuppliersController(ISupplierApi supplierApi, IProductApi productApi, IOrderApi orderApi)
 {
     _supplierApi = supplierApi;
     _productApi  = productApi;
     _orderApi    = orderApi;
 }
Exemple #17
0
 public ProductDetailModel(IApiFactory factory, IWebHostEnvironment env)
 {
     _productApi = factory.ProductApi ?? throw new ArgumentNullException(nameof(_productApi));
     _basketApi  = factory.BasketApi ?? throw new ArgumentNullException(nameof(_basketApi));
     _env        = env;
 }
Exemple #18
0
 public ProductsController(ILogger <ProductsController> logger, IProductApi productApi, IMemoryCache cache)
 {
     _logger     = logger;
     _productApi = productApi;
     _cache      = cache;
 }
 public AddProductModel(IApiFactory factory, IMapper mapper, IWebHostEnvironment env)
 {
     _productApi = factory.ProductApi ?? throw new ArgumentNullException(nameof(_productApi));
     _mapper     = mapper;
     _env        = env;
 }
 public UpdateCommandHandler(IProductApi productApi, IUnitOfWork unitOfWork)
 {
     _productApi = productApi;
     _unitOfWork = unitOfWork;
 }
 public void Init()
 {
     api = new ProductApi(Resources.UrlAtTest, new JsonApiRequester());
 }
Exemple #22
0
 public RecomendationController(IProductApi productApi, IBasketApi basketApi)
 {
     _productApi = productApi;
     _basketApi  = basketApi;
 }
Exemple #23
0
 public SalesViewModel(IProductApi productApi)
 {
     _productApi = productApi;
 }
Exemple #24
0
 public ProductController(IProductApi productApi, IBrandApi brandApi, ISurveyApi surveyApi)
 {
     _productApi = productApi;
     _brandApi   = brandApi;
     _surveyApi  = surveyApi;
 }
 public SearchController(IProductApi productApi, ICollectionApi collectionApi, IBlogApi blogApi)
 {
     _productApi    = productApi;
     _collectionApi = collectionApi;
     _blogApi       = blogApi;
 }
Exemple #26
0
 public HttpTransferProduct(IProductApi productApi, ILoggerFactory logger)
 {
     this._ProductApi = productApi;
     this._logger     = logger.CreateLogger("HttpTransferProductModel");
     _logger.LogInformation($"{DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")} - HttpTransferProductModel em execução.");
 }
 public RetailerCommonController(ISupplierApi supplierApi, IProductApi productApi, IOrderApi orderApi)
 {
     _supplierApi = supplierApi;
     _productApi  = productApi;
     _orderApi    = orderApi;
 }