Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
 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));
 }