/// <summary> /// Initializes a new instance of the <see cref="WebHookHandler" /> class. /// </summary> /// <param name="applicationLogRepository">The application log repository.</param> /// <param name="subscriptionsLogRepository">The subscriptions log repository.</param> /// <param name="subscriptionsRepository">The subscriptions repository.</param> /// <param name="planRepository">The plan repository.</param> /// <param name="offersAttributeRepository">The offers attribute repository.</param> /// <param name="offersRepository">The offers repository.</param> /// <param name="fulfillApiClient">The fulfill API client.</param> /// <param name="usersRepository">The users repository.</param> /// <param name="loggerFactory">The logger factory.</param> /// <param name="emailService">The email service.</param> /// <param name="eventsRepository">The events repository.</param> /// <param name="applicationConfigRepository">The application configuration repository.</param> /// <param name="emailTemplateRepository">The email template repository.</param> /// <param name="planEventsMappingRepository">The plan events mapping repository.</param> public WebHookHandler(IApplicationLogRepository applicationLogRepository, ISubscriptionLogRepository subscriptionsLogRepository, ISubscriptionsRepository subscriptionsRepository, IPlansRepository planRepository, IOfferAttributesRepository offersAttributeRepository, IOffersRepository offersRepository, IFulfillmentApiClient fulfillApiClient, IUsersRepository usersRepository, ILoggerFactory loggerFactory, IEmailService emailService, IEventsRepository eventsRepository, IApplicationConfigRepository applicationConfigRepository, IEmailTemplateRepository emailTemplateRepository, IPlanEventsMappingRepository planEventsMappingRepository) { this.applicationLogRepository = applicationLogRepository; this.subscriptionsRepository = subscriptionsRepository; this.planRepository = planRepository; this.subscriptionsLogRepository = subscriptionsLogRepository; this.applicationLogService = new ApplicationLogService(this.applicationLogRepository); this.subscriptionService = new SubscriptionService(this.subscriptionsRepository, this.planRepository); this.emailService = emailService; this.loggerFactory = loggerFactory; this.usersRepository = usersRepository; this.eventsRepository = eventsRepository; this.offersAttributeRepository = offersAttributeRepository; this.fulfillApiClient = fulfillApiClient; this.applicationConfigRepository = applicationConfigRepository; this.emailTemplateRepository = emailTemplateRepository; this.planEventsMappingRepository = planEventsMappingRepository; this.offersRepository = offersRepository; this.notificationStatusHandlers = new NotificationStatusHandler( fulfillApiClient, planRepository, applicationConfigRepository, emailTemplateRepository, planEventsMappingRepository, offersAttributeRepository, eventsRepository, subscriptionsRepository, usersRepository, offersRepository, emailService, this.loggerFactory.CreateLogger <NotificationStatusHandler>()); }
/// <summary> /// Initializes a new instance of the <see cref="HomeController" /> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="apiClient">The API Client<see cref="IFulfilmentApiClient" />.</param> /// <param name="subscriptionRepo">The subscription repository.</param> /// <param name="planRepository">The plan repository.</param> /// <param name="userRepository">The user repository.</param> /// <param name="applicationLogRepository">The application log repository.</param> /// <param name="subscriptionLogsRepo">The subscription logs repository.</param> /// <param name="applicationConfigRepository">The application configuration repository.</param> /// <param name="emailTemplateRepository">The email template repository.</param> /// <param name="offersRepository">The offers repository.</param> /// <param name="planEventsMappingRepository">The plan events mapping repository.</param> /// <param name="offerAttributesRepository">The offer attributes repository.</param> /// <param name="eventsRepository">The events repository.</param> /// <param name="cloudConfigs">The cloud configs.</param> /// <param name="loggerFactory">The logger factory.</param> /// <param name="emailService">The email service.</param> public HomeController(ILogger <HomeController> logger, IFulfillmentApiClient apiClient, ISubscriptionsRepository subscriptionRepo, IPlansRepository planRepository, IUsersRepository userRepository, IApplicationLogRepository applicationLogRepository, ISubscriptionLogRepository subscriptionLogsRepo, IApplicationConfigRepository applicationConfigRepository, IEmailTemplateRepository emailTemplateRepository, IOffersRepository offersRepository, IPlanEventsMappingRepository planEventsMappingRepository, IOfferAttributesRepository offerAttributesRepository, IEventsRepository eventsRepository, ILoggerFactory loggerFactory, IEmailService emailService) { this.apiClient = apiClient; this.subscriptionRepository = subscriptionRepo; this.subscriptionLogRepository = subscriptionLogsRepo; this.applicationLogRepository = applicationLogRepository; this.planRepository = planRepository; this.userRepository = userRepository; this.userService = new UserService(this.userRepository); this.subscriptionService = new SubscriptionService(this.subscriptionRepository, this.planRepository); this.applicationLogService = new ApplicationLogService(this.applicationLogRepository); this.applicationConfigRepository = applicationConfigRepository; this.emailTemplateRepository = emailTemplateRepository; this.planEventsMappingRepository = planEventsMappingRepository; this.offerAttributesRepository = offerAttributesRepository; this.logger = logger; this.offersRepository = offersRepository; this.planService = new PlanService(this.planRepository, this.offerAttributesRepository, this.offersRepository); this.eventsRepository = eventsRepository; this.emailService = emailService; this.loggerFactory = loggerFactory; this.pendingActivationStatusHandlers = new PendingActivationStatusHandler( apiClient, subscriptionRepo, subscriptionLogsRepo, planRepository, userRepository, loggerFactory.CreateLogger <PendingActivationStatusHandler>()); this.pendingFulfillmentStatusHandlers = new PendingFulfillmentStatusHandler( apiClient, applicationConfigRepository, subscriptionRepo, subscriptionLogsRepo, planRepository, userRepository, this.loggerFactory.CreateLogger <PendingFulfillmentStatusHandler>()); this.notificationStatusHandlers = new NotificationStatusHandler( apiClient, planRepository, applicationConfigRepository, emailTemplateRepository, planEventsMappingRepository, offerAttributesRepository, eventsRepository, subscriptionRepo, userRepository, offersRepository, emailService, this.loggerFactory.CreateLogger <NotificationStatusHandler>()); this.unsubscribeStatusHandlers = new UnsubscribeStatusHandler( apiClient, subscriptionRepo, subscriptionLogsRepo, planRepository, userRepository, this.loggerFactory.CreateLogger <UnsubscribeStatusHandler>()); }
/// <summary> /// Initializes a new instance of the <see cref="HomeController" /> class. /// </summary> /// <param name="usersRepository">The users repository.</param> /// <param name="billingApiService">The billing API service.</param> /// <param name="logger">The logger.</param> /// <param name="subscriptionRepo">The subscription repo.</param> /// <param name="planRepository">The plan repository.</param> /// <param name="subscriptionUsageLogsRepository">The subscription usage logs repository.</param> /// <param name="dimensionsRepository">The dimensions repository.</param> /// <param name="subscriptionLogsRepo">The subscription logs repo.</param> /// <param name="applicationConfigRepository">The application configuration repository.</param> /// <param name="userRepository">The user repository.</param> /// <param name="fulfillApiService">The fulfill API client.</param> /// <param name="applicationLogRepository">The application log repository.</param> /// <param name="emailTemplateRepository">The email template repository.</param> /// <param name="planEventsMappingRepository">The plan events mapping repository.</param> /// <param name="eventsRepository">The events repository.</param> /// <param name="options">The options.</param> /// <param name="cloudConfigs">The cloud configs.</param> /// <param name="loggerFactory">The logger factory.</param> /// <param name="emailService">The email service.</param> /// <param name="offersRepository">The offers repository.</param> /// <param name="offersAttributeRepository">The offers attribute repository.</param> public HomeController( IUsersRepository usersRepository, IMeteredBillingApiService billingApiService, ILogger <HomeController> logger, ISubscriptionsRepository subscriptionRepo, IPlansRepository planRepository, ISubscriptionUsageLogsRepository subscriptionUsageLogsRepository, IMeteredDimensionsRepository dimensionsRepository, ISubscriptionLogRepository subscriptionLogsRepo, IApplicationConfigRepository applicationConfigRepository, IUsersRepository userRepository, IFulfillmentApiService fulfillApiService, IApplicationLogRepository applicationLogRepository, IEmailTemplateRepository emailTemplateRepository, IPlanEventsMappingRepository planEventsMappingRepository, IEventsRepository eventsRepository, IOptions <SaaSApiClientConfiguration> options, ILoggerFactory loggerFactory, IEmailService emailService, IOffersRepository offersRepository, IOfferAttributesRepository offersAttributeRepository) { this.billingApiService = billingApiService; this.subscriptionRepo = subscriptionRepo; this.subscriptionLogRepository = subscriptionLogsRepo; this.planRepository = planRepository; this.subscriptionUsageLogsRepository = subscriptionUsageLogsRepository; this.dimensionsRepository = dimensionsRepository; this.logger = logger; this.applicationConfigRepository = applicationConfigRepository; this.applicationConfigService = new ApplicationConfigService(this.applicationConfigRepository); this.userRepository = userRepository; this.userService = new UserService(userRepository); this.fulfillApiService = fulfillApiService; this.applicationLogRepository = applicationLogRepository; this.applicationLogService = new ApplicationLogService(this.applicationLogRepository); this.subscriptionRepository = this.subscriptionRepo; this.subscriptionService = new SubscriptionService(this.subscriptionRepository, this.planRepository); this.emailTemplateRepository = emailTemplateRepository; this.planEventsMappingRepository = planEventsMappingRepository; this.eventsRepository = eventsRepository; this.emailService = emailService; this.offersRepository = offersRepository; this.offersAttributeRepository = offersAttributeRepository; this.loggerFactory = loggerFactory; this.pendingActivationStatusHandlers = new PendingActivationStatusHandler( fulfillApiService, subscriptionRepo, subscriptionLogsRepo, planRepository, userRepository, loggerFactory.CreateLogger <PendingActivationStatusHandler>()); this.pendingFulfillmentStatusHandlers = new PendingFulfillmentStatusHandler( fulfillApiService, applicationConfigRepository, subscriptionRepo, subscriptionLogsRepo, planRepository, userRepository, this.loggerFactory.CreateLogger <PendingFulfillmentStatusHandler>()); this.notificationStatusHandlers = new NotificationStatusHandler( fulfillApiService, planRepository, applicationConfigRepository, emailTemplateRepository, planEventsMappingRepository, offersAttributeRepository, eventsRepository, subscriptionRepo, userRepository, offersRepository, emailService, this.loggerFactory.CreateLogger <NotificationStatusHandler>()); this.unsubscribeStatusHandlers = new UnsubscribeStatusHandler( fulfillApiService, subscriptionRepo, subscriptionLogsRepo, planRepository, userRepository, this.loggerFactory.CreateLogger <UnsubscribeStatusHandler>()); }