public CardAccountAdminController(ICardAccountService cardAccountService)
 {
     if (cardAccountService == null)
     {
         throw new ArgumentNullException("cardAccountService");
     }
     _cardAccountService = cardAccountService;
 }
Example #2
0
 public CustomerCardAccountController(ICardAccountService cardAccountService)
 {
     if (cardAccountService == null)
     {
         throw new ArgumentNullException("cardAccountService");
     }
     _cardAccountService = cardAccountService;
 }
Example #3
0
 public CustomerCardController(ICardAccountService cardAccountService, IPaymentStatisticsService paymentStatisticsService)
 {
     Argument.NotNull(paymentStatisticsService, "paymentStatisticsService");
     if (cardAccountService == null)
     {
         throw new ArgumentNullException("cardAccountService");
     }
     _cardAccountService       = cardAccountService;
     _paymentStatisticsService = paymentStatisticsService;
 }
Example #4
0
 public CustomerCardController(ICardAccountService cardAccountService, IPaymentStatisticsService paymentStatisticsService)
 {
     Argument.NotNull(paymentStatisticsService, "paymentStatisticsService");
     if (cardAccountService == null)
     {
         throw new ArgumentNullException("cardAccountService");
     }
     _cardAccountService = cardAccountService;
     _paymentStatisticsService = paymentStatisticsService;
 }
Example #5
0
        public SubmitPaymentCommandValidator(
            ICardAccountService cardAccountService,
            IValidationService validationService,
            IRepository <PaymentOrderTemplate> paymentOrderTemplateRepository)
        {
            Argument.NotNull(cardAccountService, "cardAccountService");
            Argument.NotNull(validationService, "validationService");
            Argument.NotNull(paymentOrderTemplateRepository, "paymentOrderTemplateRepository");

            _cardAccountService             = cardAccountService;
            _validationService              = validationService;
            _paymentOrderTemplateRepository = paymentOrderTemplateRepository;

            CascadeMode = CascadeMode.StopOnFirstFailure;
            RuleFor(x => x.TemplateCode)
            .NotEmpty()
            .Must(OrderTemplateExists);
            RuleFor(x => x.FromCardId)
            .NotEqual(Guid.Empty);
            RuleFor(x => x.Amount)
            .GreaterThan(0)
            .Must(LessThenCardBalance)
            .WithLocalizedMessage(() => Messages.InsufficientFunds);
        }
Example #6
0
 public CardAccountController(ICardAccountService cardAccountService)
 {
     _cardAccountService = cardAccountService;
 }
Example #7
0
 public CardAdminController(ICardAccountService cardAccountService)
 {
     Argument.NotNull(cardAccountService, "cardAccountService");
     _cardAccountService = cardAccountService;
 }
Example #8
0
 public CardAccountController(ICardAccountService cardAccountService)
 {
     _cardAccountService = cardAccountService;
 }
Example #9
0
 public CardAdminController(ICardAccountService cardAccountService)
 {
     Argument.NotNull(cardAccountService, "cardAccountService");
     _cardAccountService = cardAccountService;
 }