private Order(int orderId,
               List <OrderLine> orderLines,
               int customerId,
               decimal totalCost,
               decimal shippingCost,
               Address billingAddress,
               Address shippingAddress,
               string promotionCode,
               DateTime datePlaced,
               List <TransitLocation> transitLocations,
               ICostCalculatorService costCalculatorService,
               IProductAvailabilityService productAvailabilityService,
               IOrderTrackingRepository orderTrackingRepository)
 {
     OrderId                     = orderId;
     OrderLines                  = orderLines;
     CustomerId                  = customerId;
     TotalCost                   = totalCost;
     ShippingCost                = shippingCost;
     PromotionCode               = promotionCode;
     BillingAddress              = billingAddress;
     ShippingAddress             = shippingAddress;
     DatePlaced                  = datePlaced;
     TransitLocations            = transitLocations;
     _costCalculatorService      = costCalculatorService;
     _orderTrackingRepository    = orderTrackingRepository;
     _productAvailabilityService = productAvailabilityService;
 }
Example #2
0
 public OrderService(IPublisher publisher, ICostCalculatorService costCalculatorService, IOrderRepository orderRepository, IOrderTrackingRepository orderTrackingRepository, IProductAvailabilityService productAvailabilityService)
 {
     _publisher                  = publisher;
     _costCalculatorService      = costCalculatorService;
     _orderRepository            = orderRepository;
     _orderTrackingRepository    = orderTrackingRepository;
     _productAvailabilityService = productAvailabilityService;
 }
Example #3
0
 public OrderService(ICostCalculatorService costCalculatorService,
                     IProductAvailabilityService productAvailabilityService,
                     IUnitOfWork unitOfWork,
                     IMapper mapper)
 {
     _costCalculatorService      = costCalculatorService;
     _unitOfWork                 = unitOfWork;
     _productAvailabilityService = productAvailabilityService;
     _mapper = mapper;
 }
 public PackageService(
     ShipmentsDbContext dbContext,
     IEventBus eventBus,
     IProductAvailabilityService productAvailabilityService
     )
 {
     this.dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
     this.eventBus  = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
     this.productAvailabilityService = productAvailabilityService ??
                                       throw new ArgumentNullException(nameof(productAvailabilityService));
 }
 public static Order Create(List <OrderLine> orderLines,
                            int customerId,
                            Address billingAddress,
                            Address shippingAddress,
                            string promotionCode,
                            DateTime datePlaced,
                            ICostCalculatorService costCalculatorService,
                            IProductAvailabilityService productAvailabilityService,
                            IOrderTrackingRepository orderTrackingRepository)
 {
     return(new Order(-1, orderLines, customerId, -1, -1, billingAddress, shippingAddress, promotionCode, datePlaced, null, costCalculatorService, productAvailabilityService, orderTrackingRepository));
 }
Example #6
0
 public CatalogSearchServiceImpl(
     Func <WorkContext> workContextFactory,
     ICatalogModuleApiClient catalogModuleApi,
     IInventoryModuleApiClient inventoryModuleApi,
     IPricingService pricingService,
     ICustomerService customerService,
     ISubscriptionModuleApiClient subscriptionApi,
     IProductAvailabilityService productAvailabilityService)
 {
     _workContextFactory         = workContextFactory;
     _catalogModuleApi           = catalogModuleApi;
     _pricingService             = pricingService;
     _inventoryModuleApi         = inventoryModuleApi;
     _customerService            = customerService;
     _subscriptionApi            = subscriptionApi;
     _productAvailabilityService = productAvailabilityService;
 }
Example #7
0
 public CartBuilder(
     Func <WorkContext> workContextFactory,
     ICartModuleApiClient cartApi,
     ICatalogSearchService catalogSearchService,
     ILocalCacheManager cacheManager,
     IPromotionEvaluator promotionEvaluator,
     ITaxEvaluator taxEvaluator,
     ISubscriptionModuleApiClient subscriptionApi,
     IProductAvailabilityService productAvailabilityService)
 {
     _cartApi = cartApi;
     _catalogSearchService       = catalogSearchService;
     _cacheManager               = cacheManager;
     _workContextFactory         = workContextFactory;
     _promotionEvaluator         = promotionEvaluator;
     _taxEvaluator               = taxEvaluator;
     _subscriptionApi            = subscriptionApi;
     _productAvailabilityService = productAvailabilityService;
 }
 public ProductAvailabilitiesController(IProductAvailabilityService productAvailabilityService, IProductService productService)
 {
     this._productAvailabilityService = productAvailabilityService;
     this._productService             = productService;
 }