public Commerce5(IBillingProcessor billingProcessor, ICustomerProcessor customer, INotificationProcessor notifier, ILoggingProcessor logger)
 {
     _BillingProcessor = billingProcessor;
     _Customer = customer;
     _Notifier = notifier;
     _Logger = logger;
 }
 public Commerce2(IBillingProcessorLocator billingProcessorLocator, ICustomerProcessor customer, INotificationProcessor notifier, ILoggingProcessor logger)
 {
     _BillingProcessorLocator = billingProcessorLocator;
     _Customer = customer;
     _Notifier = notifier;
     _Logger   = logger;
 }
 public OrderProcessor(ILogger <OrderProcessor> logger, IBillingProcessor billingProcessor, ICustomerProcessor customerProcessor, INotifier notifier)
 {
     _logger            = logger;
     _billingProcessor  = billingProcessor;
     _customerProcessor = customerProcessor;
     _notifier          = notifier;
 }
        public void Setup()
        {
            mockblobUploader = new Mock <IBlobUploader>();
            mockblobUploader.Setup(x => x.UploadBlob(It.IsAny <CloudBlockBlob>(), It.IsAny <string>())).Returns("https://as206deunassetrtsdpystor.blob.core.windows.net/customerdata/2-Megha");

            customerProcessor = new CustomerProcessor(mockblobUploader.Object);
        }
 public Commerce(IBillingProcessor billingProcessor, ICustomerProcessor customerProcessor, INotifier notifier, ILogger logger)
 {
     _BillingProcessor  = billingProcessor;
     _CustomerProcessor = customerProcessor;
     _Notifier          = notifier;
     _Logger            = logger;
 }
 /// <summary>constructor</summary>
 public ReceiptFileImportProcessor(
     ICompanyProcessor companyProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     IImporterSettingProcessor importerSettingProcessor,
     IImporterSettingDetailProcessor importerSettingDetailProcessor,
     IGeneralSettingProcessor generalSettingProcessor,
     ICurrencyProcessor currencyProcessor,
     ICategoryProcessor categoryProcessor,
     ISectionProcessor sectionProcessor,
     ICustomerProcessor customerProcessor,
     IJuridicalPersonalityProcessor juridicalPersonalityProcessor,
     ICollationSettingProcessor collationSettingProcessor,
     IColumnNameSettingProcessor columnNameSettingProcessor,
     IImportDataProcessor importDataProcessor,
     IReceiptProcessor receiptProcessor
     )
 {
     this.companyProcessor               = companyProcessor;
     this.applicationControlProcessor    = applicationControlProcessor;
     this.importerSettingProcessor       = importerSettingProcessor;
     this.importerSettingDetailProcessor = importerSettingDetailProcessor;
     this.generalSettingProcessor        = generalSettingProcessor;
     this.currencyProcessor              = currencyProcessor;
     this.categoryProcessor              = categoryProcessor;
     this.sectionProcessor               = sectionProcessor;
     this.customerProcessor              = customerProcessor;
     this.juridicalPersonalityProcessor  = juridicalPersonalityProcessor;
     this.collationSettingProcessor      = collationSettingProcessor;
     this.columnNameSettingProcessor     = columnNameSettingProcessor;
     this.importDataProcessor            = importDataProcessor;
     this.receiptProcessor               = receiptProcessor;
     this.serializer = MessagePackSerializer.Get <ReceiptInput>(new SerializationContext {
         DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native
     });
 }
Exemple #7
0
 public Commerce5(IBillingProcessor billingProcessor, ICustomerProcessor customer, INotificationProcessor notifier, ILoggingProcessor logger)
 {
     _billingProcessor = billingProcessor;
     _customer         = customer;
     _notifier         = notifier;
     _logger           = logger;
 }
Exemple #8
0
        /// <summary>constructor</summary>
        public PaymentScheduleFileImportProcessor(
            ICompanyProcessor companyProcessor,
            IApplicationControlProcessor applicationControlProcessor,
            IImporterSettingProcessor importerSettingProcessor,
            IImporterSettingDetailProcessor importerSettingDetailProcessor,
            IGeneralSettingProcessor generalSettingProcessor,
            ICustomerProcessor customerProcessor,
            ICurrencyProcessor currencyProcessor,
            ICategoryProcessor categoryProcessor,
            IDepartmentProcessor departmentProcessor,
            IAccountTitleProcessor accountTitleProcessor,
            IBillingScheduledPaymentProcessor billingScheduledPaymentProcessor,
            IImportDataProcessor importDataProcessor
            )
        {
            this.companyProcessor                 = companyProcessor;
            this.applicationControlProcessor      = applicationControlProcessor;
            this.importerSettingProcessor         = importerSettingProcessor;
            this.importerSettingDetailProcessor   = importerSettingDetailProcessor;
            this.generalSettingProcessor          = generalSettingProcessor;
            this.customerProcessor                = customerProcessor;
            this.currencyProcessor                = currencyProcessor;
            this.categoryProcessor                = categoryProcessor;
            this.departmentProcessor              = departmentProcessor;
            this.accountTitleProcessor            = accountTitleProcessor;
            this.billingScheduledPaymentProcessor = billingScheduledPaymentProcessor;
            this.importDataProcessor              = importDataProcessor;

            serializerScheduledPaymentImport = MessagePackSerializer.Get <ScheduledPaymentImport>(new SerializationContext {
                DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native
            });
            serializerPaymentSchedule = MessagePackSerializer.Get <Models.Files.PaymentSchedule>(new SerializationContext {
                DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native
            });
        }
 public StorageController()
 {
     if (this.customerProcessor == null)
     {
         BlobUploader blobUploader = new BlobUploader();
         customerProcessor = new CustomerProcessor(blobUploader);
     }
 }
Exemple #10
0
 public SubscriptionProcessor(
     IPaymentProcessor paymentProcessor,
     ICustomerProcessor customerProcessor,
     INotifier notifier)
 {
     _paymentProcessor  = paymentProcessor;
     _customerProcessor = customerProcessor;
     _notifier          = notifier;
 }
Exemple #11
0
 public OrderProcessor(
     ICustomerProcessor customerProcessor,
     IBillingProcessor billingProcessor,
     INotifier notifier)
 {
     _customerProcessor = customerProcessor;
     _billingProcessor  = billingProcessor;
     _notifier          = notifier;
 }
Exemple #12
0
        public void ProcessSubscription(Subscription subscription)
        {
            IPaymentProcessor  paymentProcessor  = ServiceLocator.GetPaymentProcessor();
            ICustomerProcessor customerProcessor = ServiceLocator.GetCustomerProcessor();
            INotifier          notifier          = ServiceLocator.GetNotifier();

            paymentProcessor.ProcessPayment(subscription);
            customerProcessor.UpdateCustomerSubscriptions(subscription);
            notifier.SendReceipt(subscription);
        }
Exemple #13
0
 public CustomerMaster(IAuthorizationProcessor authorizationProcessor,
                       ICustomerProcessor customerProcessor,
                       ICustomerPaymentContractProcessor customerPaymentContractProcessor,
                       ICustomerDiscountProcessor customerDiscountProcessor,
                       ILogManager logManager)
 {
     this.authorizationProcessor           = authorizationProcessor;
     this.customerProcessor                = customerProcessor;
     this.customerPaymentContractProcessor = customerPaymentContractProcessor;
     this.customerDiscountProcessor        = customerDiscountProcessor;
     logger = logManager.GetLogger(typeof(CustomerMaster));
 }
Exemple #14
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 public CustomerController(
     ICustomerProcessor customerProcessor,
     ICustomerPaymentContractProcessor customerPaymentContractProcessor,
     ICustomerDiscountProcessor customerDiscountProcessor,
     ICustomerFileImportProcessor customerImportProcessor
     )
 {
     this.customerProcessor = customerProcessor;
     this.customerPaymentContractProcessor = customerPaymentContractProcessor;
     this.customerDiscountProcessor        = customerDiscountProcessor;
     this.customerImportProcessor          = customerImportProcessor;
 }
        /// <summary>constructor</summary>
        public BillingFileImportProcessor(
            ICompanyProcessor companyProcessor,
            IApplicationControlProcessor applicationControlProcessor,
            IImporterSettingProcessor importerSettingProcessor,
            IImporterSettingDetailProcessor importerSettingDetailProcessor,
            IGeneralSettingProcessor generalSettingProcessor,
            ICurrencyProcessor currencyProcessor,
            ICategoryProcessor categoryProcessor,
            ICustomerProcessor customerProcessor,
            IJuridicalPersonalityProcessor juridicalPersonalityProcessor,
            ITaxClassProcessor taxClassProcessor,
            IHolidayCalendarProcessor holidayCalendarProcessor,
            ICollationSettingProcessor collationSettingProcessor,
            IColumnNameSettingProcessor columnNameSettingProcessor,
            IDepartmentProcessor departmentProcessor,
            IAccountTitleProcessor accountTitleProcessor,
            IStaffProcessor staffProcessor,
            IInvoiceCommonSettingProcessor invoiceCommonSettingProcessor,
            IImportDataProcessor importDataProcessor,

            IBillingProcessor billingProcessor,
            IBillingImporterProcessor billingImporterProcessor,
            IBillingDivisionContractProcessor billingDivisionContractProcessor
            )
        {
            this.companyProcessor               = companyProcessor;
            this.applicationControlProcessor    = applicationControlProcessor;
            this.importerSettingProcessor       = importerSettingProcessor;
            this.importerSettingDetailProcessor = importerSettingDetailProcessor;
            this.generalSettingProcessor        = generalSettingProcessor;
            this.currencyProcessor              = currencyProcessor;
            this.categoryProcessor              = categoryProcessor;
            this.customerProcessor              = customerProcessor;
            this.juridicalPersonalityProcessor  = juridicalPersonalityProcessor;
            this.taxClassProcessor              = taxClassProcessor;
            this.holidayCalendarProcessor       = holidayCalendarProcessor;
            this.collationSettingProcessor      = collationSettingProcessor;
            this.columnNameSettingProcessor     = columnNameSettingProcessor;
            this.departmentProcessor            = departmentProcessor;
            this.accountTitleProcessor          = accountTitleProcessor;
            this.staffProcessor = staffProcessor;
            this.invoiceCommonSettingProcessor = invoiceCommonSettingProcessor;
            this.importDataProcessor           = importDataProcessor;

            this.billingProcessor                 = billingProcessor;
            this.billingImporterProcessor         = billingImporterProcessor;
            this.billingDivisionContractProcessor = billingDivisionContractProcessor;

            serializer = MessagePackSerializer.Get <BillingImport>(new SerializationContext {
                DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native
            });
        }
Exemple #16
0
 /// <summary>constructor</summary>
 public KanaHistoryCustomerFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     ICustomerProcessor customerProcessor,
     IKanaHistoryCustomerProcessor kanaHistoryCustomerProcessor
     )
 {
     this.companyProcessor             = companyProcessor;
     this.loginUserProcessor           = loginUserProcessor;
     this.applicationControlProcessor  = applicationControlProcessor;
     this.customerProcessor            = customerProcessor;
     this.kanaHistoryCustomerProcessor = kanaHistoryCustomerProcessor;
 }
Exemple #17
0
        public void ProcessOrder(OrderInfo orderInfo)
        {
            IBillingProcessor      billingProcessor      = _ProcessorLocator.GetProcessor <IBillingProcessor>();
            ICustomerProcessor     customerProcessor     = _ProcessorLocator.GetProcessor <ICustomerProcessor>();
            INotificationProcessor notificationProcessor = _ProcessorLocator.GetProcessor <INotificationProcessor>();
            ILoggingProcessor      loggingProcessor      = _ProcessorLocator.GetProcessor <ILoggingProcessor>();

            billingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
            loggingProcessor.Log("Billing processed");
            customerProcessor.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
            loggingProcessor.Log("Customer updated");
            notificationProcessor.SendReceipt(orderInfo);
            loggingProcessor.Log("Receipt sent");
        }
 /// <summary>constructor</summary>
 public CustomerGroupFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     ICustomerProcessor customerProcessor,
     ICustomerGroupProcessor customerGroupProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.customerProcessor           = customerProcessor;
     this.customerGroupProcessor      = customerGroupProcessor;
 }
 /// <summary>constructor</summary>
 public CustomerDiscountFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     ICustomerProcessor customerProcessor,
     IDepartmentProcessor departmentProcessor,
     IAccountTitleProcessor accountTitleProcessor,
     ICustomerDiscountProcessor customerDiscountProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.customerProcessor           = customerProcessor;
     this.departmentProcessor         = departmentProcessor;
     this.accountTitleProcessor       = accountTitleProcessor;
     this.customerDiscountProcessor   = customerDiscountProcessor;
 }
Exemple #20
0
 public MFBillingProcessor(IBillingProcessor billingProcessor,
                           ICustomerProcessor customerProcessor,
                           IStaffProcessor staffProcessor,
                           IBillingSaveProcessor billingSaveProcessor,
                           IMFBillingQueryProcessor mfBillingQueryProcessor,
                           IAddMFBillingQueryProcessor addMFBillingQueryProcessor,
                           IByCompanyGetEntitiesQueryProcessor <MFBilling> mfBillingByCompanyGetEntitiesQueryProcessor,
                           ITransactionScopeBuilder transactionScopeBuilder
                           )
 {
     this.billingProcessor           = billingProcessor;
     this.customerProcessor          = customerProcessor;
     this.staffProcessor             = staffProcessor;
     this.billingSaveProcessor       = billingSaveProcessor;
     this.mfBillingQueryProcessor    = mfBillingQueryProcessor;
     this.addMFBillingQueryProcessor = addMFBillingQueryProcessor;
     this.mfBillingByCompanyGetEntitiesQueryProcessor = mfBillingByCompanyGetEntitiesQueryProcessor;
     this.transactionScopeBuilder = transactionScopeBuilder;
 }
        public ApiResponse Create(List <CustomerParam> param)
        {
            CustomerProcessor = new CustomerProcessor();
            Response          = new ApiResponse();

            try
            {
                Response.text   = JsonConverter.JsonConverter.ObjToJson(CustomerProcessor.Create(param));
                Response.result = true;

                return(Response);
            }
            catch
            {
                Response.text   = "Something went wrong :(";
                Response.result = false;

                return(Response);
            }
        }
Exemple #22
0
        /// <summary>constructor</summary>
        public BillingController(
            IBillingProcessor billingProcessor,
            IBillingSaveProcessor billingSaveProcessor,
            IBillingSaveForInputProcessor billingSaveForInputProcessor,
            IBillingJournalizingProcessor billingJournalizingProcessor,
            IBillingSearchProcessor billingSearchProcessor,
            IBillingMemoProcessor billingMemoProcessor,
            IBillingDueAtModifyProcessor billingDueAtModifyProcessor,
            IBillingDivisionContractProcessor billingDivisionContractProcessor,
            IBillingDiscountProcessor billingDiscountProcessor,
            IBillingScheduledPaymentProcessor billingScheduledPaymentProcessor,
            IBillingAccountTransferProcessor billingAccountTransferProcessor,
            IImporterSettingDetailProcessor importerSettingDetailProcessor,
            ICustomerProcessor customerProcessor,

            IBillingFileImportProcessor billingFileImportProcessor,
            IPaymentScheduleFileImportProcessor paymentScheduleFileImportProcessor,

            IBillingAccountTransferFileImportProcessor billingAccountTransferFileImportProcessor
            )
        {
            this.billingProcessor                 = billingProcessor;
            this.billingSaveProcessor             = billingSaveProcessor;
            this.billingSaveForInputProcessor     = billingSaveForInputProcessor;
            this.billingJournalizingProcessor     = billingJournalizingProcessor;
            this.billingSearchProcessor           = billingSearchProcessor;
            this.billingMemoProcessor             = billingMemoProcessor;
            this.billingDueAtModifyProcessor      = billingDueAtModifyProcessor;
            this.billingDivisionContractProcessor = billingDivisionContractProcessor;
            this.billingDiscountProcessor         = billingDiscountProcessor;
            this.billingScheduledPaymentProcessor = billingScheduledPaymentProcessor;
            this.billingAccountTransferProcessor  = billingAccountTransferProcessor;
            this.importerSettingDetailProcessor   = importerSettingDetailProcessor;
            this.customerProcessor                = customerProcessor;


            this.billingFileImportProcessor         = billingFileImportProcessor;
            this.paymentScheduleFileImportProcessor = paymentScheduleFileImportProcessor;

            this.billingAccountTransferFileImportProcessor = billingAccountTransferFileImportProcessor;
        }
        public ApiResponse Update(long id, CustomerParam param)
        {
            CustomerProcessor = new CustomerProcessor();
            Response          = new ApiResponse();

            try
            {
                CustomerProcessor.Update(id, param);
                Response.text   = "Entity was successfully updated";
                Response.result = true;

                return(Response);
            }
            catch
            {
                Response.text   = "Unfortunately something went wrong :(";
                Response.result = false;

                return(Response);
            }
        }
        public ApiResponse Delete(List <long> idList)
        {
            CustomerProcessor = new CustomerProcessor();
            Response          = new ApiResponse();

            try
            {
                CustomerProcessor.Delete(idList);
                Response.text   = "Entity was successfully removed from the system.";
                Response.result = true;

                return(Response);
            }
            catch
            {
                Response.text   = "Unfortunately something went wrong. Try again later. :)";
                Response.result = false;

                return(Response);
            }
        }
        public ApiResponse DeleteById(long id)
        {
            CustomerProcessor = new CustomerProcessor();
            Response          = new ApiResponse();

            try
            {
                CustomerProcessor.Delete(id);
                Response.text   = "Entity was successfully removed from the system.";
                Response.result = true;

                return(Response);
            }
            catch
            {
                Response.text   = "Unfortunately something went wrong :(";
                Response.result = false;

                return(Response);
            }
        }
        public ApiResponse ListAll()
        {
            CustomerProcessor = new CustomerProcessor();
            Response          = new ApiResponse();

            try
            {
                CustomerProcessor.Find();
                Response.text   = JsonConverter.JsonConverter.ObjToJson(CustomerProcessor.Find());
                Response.result = true;

                return(Response);
            }
            catch
            {
                Response.text   = "Unfortunately something went wrong :(";
                Response.result = false;

                return(Response);
            }
        }
        public ApiResponse FindByPK(long id)
        {
            CustomerProcessor = new CustomerProcessor();
            Response          = new ApiResponse();

            try
            {
                CustomerProcessor.Find(id);
                Response.text   = "Account with this PK has been found" + Environment.NewLine + JsonConverter.JsonConverter.ObjToJson(CustomerProcessor.Find(id));
                Response.result = true;

                return(Response);
            }
            catch
            {
                Response.text   = "An account with this id does not exist";
                Response.result = false;

                return(Response);
            }
        }
        public ApiResponse Update(List <CustomerParam> param)
        {
            CustomerProcessor = new CustomerProcessor();
            Response          = new ApiResponse();

            try
            {
                CustomerProcessor.Update(param);

                Response.text   = "Entities were successfully updated.";
                Response.result = true;

                return(Response);
            }
            catch
            {
                Response.text   = "Unfortunately something went wrong :(";
                Response.result = false;

                return(Response);
            }
        }
Exemple #29
0
 /// <summary>constructor</summary>
 public CustomerFileImportProcessor(
     ICompanyProcessor companyProcessor,
     ILoginUserProcessor loginUserProcessor,
     IApplicationControlProcessor applicationControlProcessor,
     ICategoryProcessor categoryProcessor,
     IStaffProcessor staffProcessor,
     IJuridicalPersonalityProcessor juridicalPersonalityProcessor,
     IImporterSettingProcessor importerSettingProcessor,
     IImporterSettingDetailProcessor importerSettingDetailProcessor,
     IGeneralSettingProcessor generalSettingProcessor,
     ICustomerProcessor customerProcessor
     )
 {
     this.companyProcessor            = companyProcessor;
     this.loginUserProcessor          = loginUserProcessor;
     this.applicationControlProcessor = applicationControlProcessor;
     this.categoryProcessor           = categoryProcessor;
     this.staffProcessor = staffProcessor;
     this.juridicalPersonalityProcessor  = juridicalPersonalityProcessor;
     this.importerSettingProcessor       = importerSettingProcessor;
     this.importerSettingDetailProcessor = importerSettingDetailProcessor;
     this.generalSettingProcessor        = generalSettingProcessor;
     this.customerProcessor = customerProcessor;
 }
Exemple #30
0
        public void ProcessOrder(OrderInfo orderInfo)
        {
            IBillingProcessor      billingProcessor      = _processorLocator.GetProcessor <IBillingProcessor>();
            ICustomerProcessor     customerProcessor     = _processorLocator.GetProcessor <ICustomerProcessor>();
            INotificationProcessor notificationProcessor = _processorLocator.GetProcessor <INotificationProcessor>();
            ILoggingProcessor      loggingProcessor      = _processorLocator.GetProcessor <ILoggingProcessor>();

            billingProcessor.ProcessPayment(orderInfo.CustomerName, orderInfo.CreditCard, orderInfo.Price);
            loggingProcessor.Log("Billing processed");
            customerProcessor.UpdateCustomerOrder(orderInfo.CustomerName, orderInfo.Product);
            loggingProcessor.Log("Customer updated");
            notificationProcessor.SendReceipt(orderInfo);
            loggingProcessor.Log("Receipt sent");


            // Named Instance
            _plugin.DoSomething();

            // Regular Usage
            //foreach (IPostOrderPlugin plugin in _Plugins)
            //{
            //    plugin.DoSomething();
            //}
        }
Exemple #31
0
 public OrderManager(IBilling billing, ICustomerProcessor customerProcessor, INotification notification)
 {
     _Billing           = billing;
     _CustomerProcessor = customerProcessor;
     _Notification      = notification;
 }