public ListAgencyCommisionQueryValidation(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
     RuleFor(a => a.Ambiente)
     .NotEmpty()
     .Must(EnviromentValidator.ValidateEnviromentInitials).WithMessage(EnviromentValidator.EnviromentInitialsValidationErrorMessage);
 }
예제 #2
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 CancelVoucherRetroactSalesCommandValidation(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
     RuleFor(c => c.NrVoucher)
     .MinimumLength(12)
     .NotEmpty()
     .MustAsync(PoPolizaExists).WithMessage("Bilhete não existe");
 }
        public DeleteCupomCommandValidation(IeCommerceDbContextService contextService)
        {
            this.contextService = contextService;

            RuleFor(c => c.Ambiente)
            .Must(EnviromentValidator.ValidateEnviromentInitials).WithMessage(EnviromentValidator.EnviromentInitialsValidationErrorMessage);

            RuleFor(c => c)
            .MustAsync(CupomExists).WithMessage("Cupom não existe");
        }
예제 #5
0
        public GetBilheteQueryValidation(IeCommerceDbContextService contextService)
        {
            this.contextService = contextService;

            RuleFor(b => b.NrBilhete)
            .MinimumLength(12);

            RuleFor(b => b.NrBilhete)
            .Must(ValidateVoucher).WithMessage("Bilhete inválido.");

            RuleFor(b => b.NrBilhete)
            .MustAsync(VoucherExists).WithMessage("Bilhete não encontrado.");
        }
예제 #6
0
 public ListCupomCodeQueryHandler(IeCommerceDbContextService contextService, IMapper mapper)
 {
     _contextService = contextService;
     _mapper         = mapper;
 }
예제 #7
0
 public DeleteCupoomCommandHandler(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
 }
예제 #8
0
 public GetCadastroPessoaQueryHandler(IeCommerceDbContextService contextService, IMapper mapper)
 {
     this.contextService = contextService;
     this.mapper         = mapper;
 }
예제 #9
0
 public UpdateCadastroPessoaCommandHandler(IeCommerceDbContextService contextService, IMapper mapper)
 {
     this.contextService = contextService;
     this.mapper         = mapper;
 }
예제 #10
0
 public CancelVoucherBilheteHandler(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
 }
예제 #11
0
 public GetPareportQueryHandler(IeCommerceDbContextService _contextService)
 {
     contextService = _contextService;
 }
예제 #12
0
 public GetBilheteQueryHandler(IeCommerceDbContextService contextService, IMapper mapper)
 {
     this.contextService = contextService;
     this.mapper         = mapper;
 }
예제 #13
0
 public AtualizaCupomCommandHandler(IeCommerceDbContextService context, IMapper mapper)
 {
     _contextService = context;
     _mapper         = mapper;
 }
예제 #14
0
 public CancelVoucherRetroactHandler(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
 }
예제 #15
0
 public CancelSaleHandler(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
 }
예제 #16
0
 public GetAgencyCommisionQueryHandler(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
 }