public CreateBudgetTransaction(IBudgetPlannerService budgetPlannerService,
                                IMapperProvider mapperProvider,
                                ITransactionService transactionService,
                                ITransactionProvider transactionProvider,
                                ITransactionLedgerService transactionLedgerService)
 {
     _budgetPlannerService     = budgetPlannerService;
     _mapperProvider           = mapperProvider;
     _transactionService       = transactionService;
     _transactionProvider      = transactionProvider;
     _transactionLedgerService = transactionLedgerService;
 }
        public TransactionValidator(IAccountService accountService,
                                    IBudgetPlannerService budgetPlannerService)
            : base(accountService)
        {
            _budgetPlannerService = budgetPlannerService;
            RuleFor(model => model.AccountId)
            .MustAsync(BeAValidAccount);

            RuleFor(model => model.BudgetId)
            .MustAsync(BudgetPlannerExists);

            RuleFor(model => model.Amount)
            .GreaterThan(decimal.Zero);

            RuleFor(model => model.Description)
            .MaximumLength(320);
        }
Ejemplo n.º 3
0
        public BudgetPlannerValidator(IAccountService accountService, IBudgetPlannerService budgetPlannerService)
            : base(accountService)
        {
            _budgetPlannerService = budgetPlannerService;

            RuleFor(request => request.AccountId)
            .MustAsync(BeAValidAccount);

            RuleFor(request => request.Reference)
            .NotEmpty()
            .MinimumLength(5)
            .MaximumLength(200)
            .MustAsync(BeUnique)
            .WithMessage(request => string.Format("Reference must be unique.", request.Reference));

            RuleFor(request => request.Name)
            .NotEmpty()
            .MinimumLength(5)
            .MaximumLength(200)
            .MustAsync(BeUnique);
        }
 public RetrieveBudgetPlanners(IMapperProvider mapperProvider, IBudgetPlannerService budgetPlannerService)
 {
     _mapperProvider       = mapperProvider;
     _budgetPlannerService = budgetPlannerService;
 }
Ejemplo n.º 5
0
 public CreateBudgetPlanner(IMapperProvider mapperProvider, IBudgetPlannerService budgetPlannerService)
 {
     _mapperProvider       = mapperProvider;
     _budgetPlannerService = budgetPlannerService;
 }
Ejemplo n.º 6
0
 public CreateBudgetTransaction(IBudgetPlannerService budgetPlannerService)
 {
     _budgetPlannerService = budgetPlannerService;
 }
 public RetrieveBudgetPlannerStats(IBudgetPlannerService budgetPlannerService)
 {
     _budgetPlannerService = budgetPlannerService;
 }
Ejemplo n.º 8
0
 public ValidateBudgetPlannerReference(IBudgetPlannerService budgetPlannerService)
 {
     _budgetPlannerService = budgetPlannerService;
 }