public ListAgencyCommisionQueryValidation(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
     RuleFor(a => a.Ambiente)
     .NotEmpty()
     .Must(EnviromentValidator.ValidateEnviromentInitials).WithMessage(EnviromentValidator.EnviromentInitialsValidationErrorMessage);
 }
Beispiel #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");
        }
Beispiel #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.");
        }
Beispiel #6
0
 public ListCupomCodeQueryHandler(IeCommerceDbContextService contextService, IMapper mapper)
 {
     _contextService = contextService;
     _mapper         = mapper;
 }
Beispiel #7
0
 public DeleteCupoomCommandHandler(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
 }
Beispiel #8
0
 public GetCadastroPessoaQueryHandler(IeCommerceDbContextService contextService, IMapper mapper)
 {
     this.contextService = contextService;
     this.mapper         = mapper;
 }
Beispiel #9
0
 public UpdateCadastroPessoaCommandHandler(IeCommerceDbContextService contextService, IMapper mapper)
 {
     this.contextService = contextService;
     this.mapper         = mapper;
 }
Beispiel #10
0
 public CancelVoucherBilheteHandler(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
 }
Beispiel #11
0
 public GetPareportQueryHandler(IeCommerceDbContextService _contextService)
 {
     contextService = _contextService;
 }
Beispiel #12
0
 public GetBilheteQueryHandler(IeCommerceDbContextService contextService, IMapper mapper)
 {
     this.contextService = contextService;
     this.mapper         = mapper;
 }
Beispiel #13
0
 public AtualizaCupomCommandHandler(IeCommerceDbContextService context, IMapper mapper)
 {
     _contextService = context;
     _mapper         = mapper;
 }
Beispiel #14
0
 public CancelVoucherRetroactHandler(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
 }
Beispiel #15
0
 public CancelSaleHandler(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
 }
Beispiel #16
0
 public GetAgencyCommisionQueryHandler(IeCommerceDbContextService contextService)
 {
     this.contextService = contextService;
 }