public InvoiceService(IUnitOfWork unitOfWork, ICustomerRepository customerRepository, IInvoiceDomainService invoiceDomainService, IInvoiceRepository invoiceRepository) { _unitOfWork = unitOfWork; _invoiceRepository = invoiceRepository; _customerRepository = customerRepository; _invoiceDomainService = invoiceDomainService; }
public SubscriptionAppService(ISubscriptionRepository subscriptionRepository, IRepository <SubscriptionCycle, Guid> subscriptionCycleRepository, IRepository <SubscriptionCycleOrder, Guid> subscriptionCycleOrderRepository, IRepository <Plan, Guid> planRepository, IPlanPriceRepository planPriceRepository, IRepository <Order, Guid> orderRepository, IRepository <Invoice, Guid> invoiceRepository, IRepository <InvoicePaymentProvider, Guid> invoicePaymentProviderRepository, IOrderDomainService orderDomainService, ISubscriptionDomainService subscriptionDomainService, ISubscriptionCycleDomainService subscriptionCycleDomainService, ISubscriptionCycleOrderDomainService subscriptionCycleOrderDomainService, IInvoiceDomainService invoiceDomainService, IObjectMapper mapper, IPaypalService paypalService, IMobbexService mobbexService) { _subscriptionRepository = subscriptionRepository ?? throw new ArgumentNullException(nameof(subscriptionRepository)); _subscriptionCycleRepository = subscriptionCycleRepository ?? throw new ArgumentNullException(nameof(subscriptionCycleRepository)); _subscriptionCycleOrderRepository = subscriptionCycleOrderRepository ?? throw new ArgumentNullException(nameof(subscriptionCycleOrderRepository)); _planRepository = planRepository ?? throw new ArgumentNullException(nameof(planRepository)); _planPriceRepository = planPriceRepository ?? throw new ArgumentNullException(nameof(planPriceRepository)); _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository)); _invoiceRepository = invoiceRepository ?? throw new ArgumentNullException(nameof(invoiceRepository)); _invoicePaymentProviderRepository = invoicePaymentProviderRepository ?? throw new ArgumentNullException(nameof(invoicePaymentProviderRepository)); _orderDomainService = orderDomainService ?? throw new ArgumentNullException(nameof(orderDomainService)); _subscriptionDomainService = subscriptionDomainService ?? throw new ArgumentNullException(nameof(subscriptionDomainService)); _subscriptionCycleDomainService = subscriptionCycleDomainService ?? throw new ArgumentNullException(nameof(subscriptionCycleDomainService)); _subscriptionCycleOrderDomainService = subscriptionCycleOrderDomainService ?? throw new ArgumentNullException(nameof(subscriptionCycleOrderDomainService)); _invoiceDomainService = invoiceDomainService ?? throw new ArgumentNullException(nameof(invoiceDomainService)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _paypalService = paypalService ?? throw new ArgumentNullException(nameof(paypalService)); _mobbexService = mobbexService ?? throw new ArgumentNullException(nameof(mobbexService)); }
//public InvoiceFacadeService() //{ // try // { // ServiceLocator.Current.GetInstance<IInvoiceDomainService>(); // ServiceLocator.Current.GetInstance<IInvoiceApplicationService>(); // ServiceLocator.Current.GetInstance<IInvoiceToDtoMapper>(); // ServiceLocator.Current.GetInstance<IInvoiceItemToDtoMapper>(); // ServiceLocator.Current.GetInstance<IInvoiceRepository>(); // ServiceLocator.Current.GetInstance<IGoodUnitConvertorDomainService>(); // ServiceLocator.Current.GetInstance<IMainUnitVlaueTomainUnitVlaueDtoMapper>(); // ServiceLocator.Current.GetInstance<IUnitOfWorkScope>(); // ServiceLocator.Current.GetInstance<IInvoiceItemDomainService>(); // ServiceLocator.Current.GetInstance<IEffectiveFactorMapper>(); // ServiceLocator.Current.GetInstance<IInvoiceAdditionalPriceDomainService>(); // } // catch (Exception ex) // { // throw; // } //} public InvoiceFacadeService(IInvoiceDomainService invoiceDomainService, IInvoiceApplicationService invoiceAppService, IInvoiceToDtoMapper invoiceDtoMapper, IInvoiceItemToDtoMapper itemToDtoMapper, IInvoiceRepository invoiceRepository, IGoodUnitConvertorDomainService goodUnitConvertorDomainService, IMainUnitVlaueTomainUnitVlaueDtoMapper mainUnitVlaueTomainUnitVlaueDtoMapper, IInvoiceItemDomainService invoiceItemDomainService, IEffectiveFactorMapper effectiveFactorMapper, IInvoiceAdditionalPriceDomainService invoiceAdditionalPriceDomainService, IBalanceDomainService balanceDomainService ) { this.invoiceDomainService = invoiceDomainService; this.invoiceRepository = invoiceRepository; this.goodUnitConvertorDomainService = goodUnitConvertorDomainService; this.mainUnitVlaueTomainUnitVlaueDtoMapper = mainUnitVlaueTomainUnitVlaueDtoMapper; this.invoiceItemDomainService = invoiceItemDomainService; this.effectiveFactorMapper = effectiveFactorMapper; this.invoiceAdditionalPriceDomainService = invoiceAdditionalPriceDomainService; this.balanceDomainService = balanceDomainService; this.invoiceAppService = invoiceAppService; this.invoiceDtoMapper = invoiceDtoMapper; this.itemToDtoMapper = itemToDtoMapper; }
public OrderRenewSubscriptionPayedEventHandler(IOrderRepository orderRepository, ISubscriptionRepository subscriptionRepository, IRepository <SubscriptionCycle, Guid> subscriptionCycleRepository, IRepository <SubscriptionCycleOrder, Guid> subscriptionCycleOrderRepository, IPlanPriceRepository planPriceRepository, ISubscriptionDomainService subscriptionDomainService, ISubscriptionCycleDomainService subscriptionCycleDomainService, IOrderDomainService orderDomainService, IRepository <Notification, Guid> noticationRepository, IMapper mapper, IClientOptions clientOptions, IHttpClientFactory httpClientFactory, IBackgroundJobManager backgroundJobManager, IRepository <Invoice, Guid> invoiceRepository, IInvoiceDomainService invoiceDomainService, INotificationDomainService notificationDomainService) { _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository)); _subscriptionRepository = subscriptionRepository ?? throw new ArgumentNullException(nameof(subscriptionRepository)); _subscriptionCycleRepository = subscriptionCycleRepository ?? throw new ArgumentNullException(nameof(subscriptionCycleRepository)); _subscriptionCycleOrderRepository = subscriptionCycleOrderRepository ?? throw new ArgumentNullException(nameof(subscriptionCycleOrderRepository)); _planPriceRepository = planPriceRepository ?? throw new ArgumentNullException(nameof(planPriceRepository)); _subscriptionDomainService = subscriptionDomainService ?? throw new ArgumentNullException(nameof(subscriptionDomainService)); _subscriptionCycleDomainService = subscriptionCycleDomainService ?? throw new ArgumentNullException(nameof(subscriptionCycleDomainService)); _orderDomainService = orderDomainService ?? throw new ArgumentNullException(nameof(orderDomainService)); _notificationDomainService = notificationDomainService ?? throw new ArgumentNullException(nameof(notificationDomainService)); _noticationRepository = noticationRepository ?? throw new ArgumentNullException(nameof(noticationRepository)); _clientOptions = clientOptions ?? throw new ArgumentNullException(nameof(clientOptions)); _httpClient = httpClientFactory?.CreateClient() ?? throw new ArgumentNullException(nameof(httpClientFactory)); _backgroundJobManager = backgroundJobManager ?? throw new ArgumentNullException(nameof(backgroundJobManager)); _invoiceRepository = invoiceRepository ?? throw new ArgumentNullException(nameof(invoiceRepository)); _invoiceDomainService = invoiceDomainService ?? throw new ArgumentNullException(nameof(invoiceDomainService)); _eventBus = EventBus.Default; _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public Invoice(InvoiceTypes invoiceType, string invoiceNumber, Company owner, DateTime invoiceDate, DivisionMethods divisionMethod, AccountingTypes accountType, Invoice invoiceRefrence, List<Order> orderRefrences, Currency currency, bool isCreditor, Company transporter, Company supplier, string description, List<InvoiceItem> list, List<InvoiceAdditionalPrice> invoiceAdditionalPriceList, IEntityConfigurator<Invoice> invoiceConfigurator, IInvoiceDomainService invoiceDomainService, IInvoiceItemDomainService invoiceItemDomainService, IGoodUnitConvertorDomainService goodUnitConvertorDomainService, IInvoiceAdditionalPriceDomainService invoiceAdditionalPriceDomainService, IBalanceDomainService balanceDomainService) : this() { // TODO: Complete member initialization InvoiceType = invoiceType; InvoiceNumber = invoiceNumber; Owner = owner; InvoiceDate = invoiceDate; DivisionMethod = divisionMethod; AccountingType = accountType; InvoiceRefrence = invoiceRefrence; OrderRefrences = orderRefrences; Currency = currency; IsCreditor = isCreditor; Transporter = transporter; Supplier = supplier; TransporterId = Transporter == null ? (long?)null : Transporter.Id; SupplierId = Supplier == null ? (long?)null : Supplier.Id; InvoiceRefrenceId = InvoiceRefrence == null ? (long?)null : InvoiceRefrence.Id; Description = description; UpdateInvoiceItems(list, null, balanceDomainService); UpdateInvoiceAdditionalPrice(invoiceAdditionalPriceList, null); this.invoiceConfigurator = invoiceConfigurator; this.invoiceAdditionalPriceDomainService = invoiceAdditionalPriceDomainService; invoiceConfigurator.Configure(this); invoiceBaseType.ValidateType(this); checkInvoiceNumberToBeUnique(invoiceDomainService); CheckInvoiceHaveInvoiceItem(); invoiceBaseType.CheckInvoiceItemValidateQuantityAndRefrence(this, invoiceItemDomainService, goodUnitConvertorDomainService); invoiceAdditionalPriceDomainService.CalculateAdditionalPrice(this); }
public OrderAppService(IRepository <Order, Guid> repository, IRepository <Invoice, Guid> invoiceRepository, IRepository <InvoicePaymentProvider, Guid> invoicePaymentProviderRepository, IInvoiceDomainService invoiceDomainService, IObjectMapper mapper, IPaypalService paypalService, IMobbexService mobbexService) { _repository = repository ?? throw new ArgumentNullException(nameof(repository)); _invoiceRepository = invoiceRepository ?? throw new ArgumentNullException(nameof(invoiceRepository)); _invoicePaymentProviderRepository = invoicePaymentProviderRepository ?? throw new ArgumentNullException(nameof(invoicePaymentProviderRepository)); _invoiceDomainService = invoiceDomainService ?? throw new ArgumentNullException(nameof(invoiceDomainService)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _paypalService = paypalService ?? throw new ArgumentNullException(nameof(paypalService)); _mobbexService = mobbexService ?? throw new ArgumentNullException(nameof(mobbexService)); _eventBus = EventBus.Default; }
public InvoiceFactory( IEntityConfigurator<Invoice> invoiceConfigurator, IWorkflowRepository workflowRepository, IInvoiceDomainService invoiceDomainService, IInvoiceItemDomainService invoiceItemDomainService, IGoodUnitConvertorDomainService goodUnitConvertorDomainService, IInvoiceAdditionalPriceDomainService invoiceAdditionalPriceDomainService, IBalanceDomainService balanceDomainService) { this.invoiceConfigurator = invoiceConfigurator; this.workflowRepository = workflowRepository; this.invoiceDomainService = invoiceDomainService; this.invoiceItemDomainService = invoiceItemDomainService; this.goodUnitConvertorDomainService = goodUnitConvertorDomainService; this.invoiceAdditionalPriceDomainService = invoiceAdditionalPriceDomainService; this.balanceDomainService = balanceDomainService; }
// Constructors public ImportInvoiceCommandHandler( IInMemoryDefaultDomainNotificationHandler inMemoryDefaultDomainNotificationHandler, ITenantInfoValueObjectFactory tenantInfoValueObjectFactory, ICustomerDomainService customerDomainService, IProductDomainService productDomainService, IInvoiceDomainService invoiceDomainService, IInvoiceFactory invoiceFactory ) : base(tenantInfoValueObjectFactory, inMemoryDefaultDomainNotificationHandler) { _customerDomainService = customerDomainService; _productDomainService = productDomainService; _invoiceDomainService = invoiceDomainService; _invoiceFactory = invoiceFactory; }
public InvoiceWebhookAppService(IRepository <Invoice, Guid> invoiceRepository, IRepository <InvoiceWebhook, Guid> invoiceWebhookRepository, IRepository <InvoicePaymentProvider, Guid> invoicePaymentProviderRepository, IOrderDomainService orderDomainService, IInvoiceDomainService invoiceDomainService, IInvoiceWebhookDomainService invoiceWebhookDomainService, IPaypalService paypalService) { _invoiceRepository = invoiceRepository ?? throw new ArgumentNullException(nameof(invoiceRepository)); _invoiceWebhookRepository = invoiceWebhookRepository ?? throw new ArgumentNullException(nameof(invoiceWebhookRepository)); _invoiceDomainService = invoiceDomainService ?? throw new ArgumentNullException(nameof(invoiceDomainService)); _invoicePaymentProviderRepository = invoicePaymentProviderRepository ?? throw new ArgumentNullException(nameof(invoicePaymentProviderRepository)); _orderDomainService = orderDomainService ?? throw new ArgumentNullException(nameof(orderDomainService)); _invoiceWebhookDomainService = invoiceWebhookDomainService ?? throw new ArgumentNullException(nameof(invoiceWebhookDomainService)); _paypalService = paypalService ?? throw new ArgumentNullException(nameof(paypalService)); _eventBus = EventBus.Default; }
public InvoiceApplicationService(IInvoiceRepository invoiceRepository, IUnitOfWorkScope unitOfWorkScope, // IGoodPartyAssignmentDomainService goodPartyAssignmentDomainService, //IUserRepository userRepository, IVesselInCompanyDomainService vesselDomainService, IGoodDomainService goodDomainService, IInvoiceFactory invoiceFactory, ICompanyDomainService companyDomainService, IInvoiceDomainService invoiceDomainService, IInvoiceItemDomainService invoiceItemDomainService, IEffectiveFactorDomainService effectiveFactorDomainService, ICompanyRepository companyRepository //,IApprovableDomainService approvableDomainService , IOrderRepository orderRepository, IGoodRepository goodRepository, ICurrencyDomainService currencyDomainService, IInvoiceAdditionalPriceDomainService invoiceAdditionalPriceDomainService, IGoodUnitConvertorDomainService goodUnitConvertorDomainService, IBalanceDomainService balanceDomainService, IEntityConfigurator<Invoice> invoiceConfigurator) { this.invoiceRepository = invoiceRepository; this.vesselDomainService = vesselDomainService; this.goodDomainService = goodDomainService; this.invoiceFactory = invoiceFactory; this.unitOfWorkScope = unitOfWorkScope; this.companyDomainService = companyDomainService; this.invoiceDomainService = invoiceDomainService; this.invoiceItemDomainService = invoiceItemDomainService; this.effectiveFactorDomainService = effectiveFactorDomainService; this.companyRepository = companyRepository; this.orderRepository = orderRepository; this.goodRepository = goodRepository; this.currencyDomainService = currencyDomainService; this.invoiceAdditionalPriceDomainService = invoiceAdditionalPriceDomainService; this.goodUnitConvertorDomainService = goodUnitConvertorDomainService; this.balanceDomainService = balanceDomainService; this.invoiceConfigurator = invoiceConfigurator; // _approvableDomainService = approvableDomainService; // _goodPartyAssignmentDomainService = goodPartyAssignmentDomainService; }
public JobAppService(ISubscriptionRepository subscriptionRepository, ISubscriptionCycleRepository subscriptionCycleRepository, IRepository <SubscriptionCycleOrder, Guid> subscriptionCycleOrderRepository, IRepository <Notification, Guid> notificationRepository, INotificationDomainService notificationDomainService, IPlanPriceRepository planPriceRepository, IOrderRepository orderRepository, IRepository <Invoice, Guid> invoiceRepository, IRepository <InvoicePaymentProvider, Guid> invoicePaymentProviderRepository, IOrderDomainService orderDomainService, ISubscriptionDomainService subscriptionDomainService, ISubscriptionCycleDomainService subscriptionCycleDomainService, ISubscriptionCycleOrderDomainService subscriptionCycleOrderDomainService, IInvoiceDomainService invoiceDomainService, IObjectMapper mapper, IPaypalService paypalService, IMobbexService mobbexService, IClientOptions clientOptions, IHttpClientFactory httpClientFactory) { _subscriptionRepository = subscriptionRepository ?? throw new ArgumentNullException(nameof(subscriptionRepository)); _subscriptionCycleRepository = subscriptionCycleRepository ?? throw new ArgumentNullException(nameof(subscriptionCycleRepository)); _subscriptionCycleOrderRepository = subscriptionCycleOrderRepository ?? throw new ArgumentNullException(nameof(subscriptionCycleOrderRepository)); _noticationRepository = notificationRepository ?? throw new ArgumentNullException(nameof(notificationRepository)); _notificationDomainService = notificationDomainService ?? throw new ArgumentNullException(nameof(notificationDomainService)); _planPriceRepository = planPriceRepository ?? throw new ArgumentNullException(nameof(planPriceRepository)); _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository)); _invoiceRepository = invoiceRepository ?? throw new ArgumentNullException(nameof(invoiceRepository)); _invoicePaymentProviderRepository = invoicePaymentProviderRepository ?? throw new ArgumentNullException(nameof(invoicePaymentProviderRepository)); _orderDomainService = orderDomainService ?? throw new ArgumentNullException(nameof(orderDomainService)); _subscriptionDomainService = subscriptionDomainService ?? throw new ArgumentNullException(nameof(subscriptionDomainService)); _subscriptionCycleDomainService = subscriptionCycleDomainService ?? throw new ArgumentNullException(nameof(subscriptionCycleDomainService)); _subscriptionCycleOrderDomainService = subscriptionCycleOrderDomainService ?? throw new ArgumentNullException(nameof(subscriptionCycleOrderDomainService)); _invoiceDomainService = invoiceDomainService ?? throw new ArgumentNullException(nameof(invoiceDomainService)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _paypalService = paypalService ?? throw new ArgumentNullException(nameof(paypalService)); _mobbexService = mobbexService ?? throw new ArgumentNullException(nameof(mobbexService)); _clientOptions = clientOptions ?? throw new ArgumentNullException(nameof(clientOptions)); _httpClient = httpClientFactory?.CreateClient() ?? throw new ArgumentNullException(nameof(httpClientFactory)); }
//BR_IN3 private void checkInvoiceNumberToBeUnique(IInvoiceDomainService invoiceDomainService) { if (!invoiceDomainService.IsInvoiceNumberUniqueForCompnay(Id, InvoiceNumber, SupplierId, TransporterId)) throw new BusinessRuleException("BRIN3", "Invoice Number Must Be Unique For Company"); }
public void Update(string invoiceNumber, DateTime invoiceDate, DivisionMethods divisionMethod, Invoice invoiceRefrence, List<Order> orderRefrences, Currency currency, bool isCreditor, Company transporter, Company supplier, string description, List<InvoiceItem> invoiceItems, List<InvoiceAdditionalPrice> invoiceAdditionalPriceList, IInvoiceDomainService invoiceDomainService, IInvoiceItemDomainService invoiceItemDomainService, IGoodUnitConvertorDomainService goodUnitConvertorDomainService, IInvoiceAdditionalPriceDomainService invoiceAdditionalPriceDomainService, IBalanceDomainService balanceDomainService) { InvoiceNumber = invoiceNumber; InvoiceDate = invoiceDate; DivisionMethod = divisionMethod; InvoiceRefrence = invoiceRefrence; OrderRefrences = orderRefrences; Currency = currency; Transporter = transporter; Supplier = supplier; Description = description; IsCreditor = isCreditor; UpdateInvoiceItems(invoiceItems, invoiceItemDomainService, balanceDomainService); UpdateInvoiceAdditionalPrice(invoiceAdditionalPriceList, invoiceAdditionalPriceDomainService); TransporterId = Transporter == null ? (long?)null : Transporter.Id; SupplierId = Supplier == null ? (long?)null : Supplier.Id; InvoiceRefrenceId = InvoiceRefrence == null ? (long?)null : InvoiceRefrence.Id; // this.invoiceConfigurator = invoiceConfigurator; // invoiceConfigurator.Configure(this); checkInvoiceNumberToBeUnique(invoiceDomainService); CheckInvoiceHaveInvoiceItem(); invoiceBaseType.CheckInvoiceItemValidateQuantityAndRefrence(this, invoiceItemDomainService, goodUnitConvertorDomainService); invoiceBaseType.ValidateType(this); invoiceAdditionalPriceDomainService.CalculateAdditionalPrice(this); ApproveWorkFlows = new List<InvoiceWorkflowLog>(); }
public InvoiceApplicationService(IInvoiceDomainService invoiceDomainService) { InvoiceDomainService = invoiceDomainService; }