예제 #1
0
        public ListGLAccountsCommand(
            IGLAccountService glaccountService,
            IInOutService utilities,
            ILogger <ListGLAccountsCommand> logger) :
            base("list", "Lists all known GLAccounts in a company")
        {
            _glaccountService = glaccountService;
            _utilities        = utilities;
            _logger           = logger;

            Add(new Option <string?>(new[] { "-c", "--company-id" }, () => null, "The company identifier under which the GLAccounts exists")
            {
                IsRequired = true
            });
            Add(new Option <string?>(new[] { "-q", "--query" }, () => null, Descriptions.QueryDescription));
            Add(new Option <EFormatType>(new[] { "-f", "--format" }, () => EFormatType.JSON, Descriptions.FormatDescription));
            Add(new Option <FileInfo?>(new[] { "-o", "--output" }, () => null, Descriptions.OutputDescription));

            Handler = CommandHandler.Create <string, string, EFormatType, FileInfo?>(ListGLAccountsHandler);
        }
예제 #2
0
        public SyncGLAccountsCommand(
            IGLAccountService glaccountService,
            IInOutService utilities,
            ILogger <SyncGLAccountsCommand> logger) :
            base("sync",
                 Descriptions.SyncGLAccountDescription)
        {
            _glaccountService = glaccountService;
            _utilities        = utilities;
            _logger           = logger;

            Add(new Option <FileInfo?>(new[] { "-i", "--input" }, () => null, Descriptions.InputGLAccountDescription)
            {
                IsRequired = true
            });
            Add(new Option <EFormatType>(new[] { "--input-format" }, () => EFormatType.JSON, Descriptions.InputFormatDescription)
            {
                IsRequired = true
            });
            Add(new Option <FileInfo?>(new[] { "-o", "--output" }, () => null, Descriptions.OutputDescription));
            Add(new Option <EFormatType>(new[] { "-f", "--format", "--output-format" }, () => EFormatType.JSON, Descriptions.FormatDescription));

            Handler = CommandHandler.Create <FileInfo, EFormatType, FileInfo?, EFormatType>(ImportGLAccountsHandler);
        }
예제 #3
0
 public AccountsController(IGLAccountService gLAccountService)
 {
     _gLAccountService = gLAccountService;
 }
 public CustomerAccountsController(IGLAccountService gLAccountService)
 {
     _gLAccountService = gLAccountService;
 }