Example #1
0
        public UpdateCupomCommandValidation(IeCommerceDbContextService contextservice, IRuleEngineService ruleEngineService)
        {
            _contextservice        = contextservice;
            this.ruleEngineService = ruleEngineService;
            RuleFor(c => c.Ambiente)
            .Must(EnviromentValidator.ValidateEnviromentInitials).WithMessage(EnviromentValidator.EnviromentInitialsValidationErrorMessage);

            RuleFor(c => c.Cupom.CodigoCupon)
            .MinimumLength(6);

            RuleFor(c => c.Cupom.CouponTypeId)
            .NotEmpty();

            RuleFor(c => c.Cupom.Bonificacion)
            .NotEmpty();

            RuleFor(c => c.Cupom.FechaInicioVigencia)
            .NotEmpty();

            RuleFor(c => c)
            .MustAsync(ValidateDuplicates).WithMessage("Este cupom já está ativo");

            RuleFor(c => c)
            .MustAsync(ValidateComission).WithMessage(ErrorMessage);
        }
 public EventBridgeLuaObject(IIoTService ioTService, ISchedulerService schedulerService, ICommandDispatcherService commandDispatcherService, IRuleEngineService ruleEngineService)
 {
     _ioTService               = ioTService;
     _schedulerService         = schedulerService;
     _commandDispatcherService = commandDispatcherService;
     _ruleEngineService        = ruleEngineService;
 }
Example #3
0
 public EventsScriptModule(IRuleEngineService ruleEngineService,
                           IIoTService ioTService,
                           ISchedulerService schedulerService,
                           CommonScriptModule commonScriptModule)
 {
     _ruleEngineService  = ruleEngineService;
     _ioTService         = ioTService;
     _schedulerService   = schedulerService;
     _commonScriptModule = commonScriptModule;
 }
Example #4
0
 public DataController(ILoggingService loggingService, IRuleEngineService ruleEngineService) : base(loggingService)
 {
     _ruleEngineService = ruleEngineService ?? throw new ArgumentNullException(nameof(ruleEngineService));
 }