public UsersController(IUsersService userService, IChargeAccountsService chargeAccountsService, IDepositsService depositsService, ICreditsService creditsService, IWalletsService walletsService) { _userService = userService; _chargeAccount = chargeAccountsService; _depositService = depositsService; _creditService = creditsService; _walletService = walletsService; }
public RecordsController( IRecordsService recordsService, IWalletsService walletsService, UserManager <ApplicationUser> userManager) { this.recordsService = recordsService; this.walletsService = walletsService; this.userManager = userManager; }
public CustomersController( IBalanceService balanceService, IWalletsService walletsService, IMapper mapper) { _balanceService = balanceService; _walletsService = walletsService; _mapper = mapper; }
public WalletsServiceTests() { this.recService = new Mock <IRecordsService>(); this.catService = new Mock <ICategoriesService>(); this.currService = new Mock <ICurrenciesService>(); this.optionsBuilder = new DbContextOptionsBuilder <ApplicationDbContext>() .UseInMemoryDatabase("walletsDatabase"); this.db = new ApplicationDbContext(this.optionsBuilder.Options); this.wallService = new WalletsService(this.db, this.recService.Object, this.currService.Object, this.catService.Object); }
public AdminController(IUsersService usersService, IDepositsService depositService, ICreditsService creditService, IWalletsService walletsService, IChargeAccountsService chargeAccountService, IDebitCardsService debitCardService, ISupportTicketsService supportTicketService) { _userService = usersService; _creditService = creditService; _walletService = walletsService; _depositService = depositService; _chargeAccountService = chargeAccountService; _debitCardService = debitCardService; _supportTicketService = supportTicketService; }
public WalletsController( IWalletsService walletsService, IRecordsService recordsService, ICurrenciesService currenciesService, UserManager <ApplicationUser> userManager) { this.walletsService = walletsService; this.recordsService = recordsService; this.currenciesService = currenciesService; this.userManager = userManager; }
public WalletsControllerTests() { this.optionsBuilder = new DbContextOptionsBuilder <ApplicationDbContext>() .UseInMemoryDatabase("walletsDatabase"); this.db = new ApplicationDbContext(this.optionsBuilder.Options); this.recordsService = new RecordsService(this.db); this.currenciesService = new CurrenciesService(this.db); this.categoriesService = new CategoriesService(this.db, this.recordsService); this.walletsService = new WalletsService(this.db, this.recordsService, this.currenciesService, this.categoriesService); this.userManager = new FakeUserManager(); this.controller = new WalletsController(this.walletsService, this.recordsService, this.currenciesService, this.userManager); }
public BonusService( IDeduplicationLogRepository <BonusRewardDeduplicationLogEntity> deduplicationLog, ITransactionScopeHandler transactionScopeHandler, ILogFactory logFactory, IOperationRequestsProducer operationRequestsProducer, IWalletsService walletsService, string walletCreationMasterWalletAddress) { _deduplicationLog = deduplicationLog; _transactionScopeHandler = transactionScopeHandler; _operationRequestsProducer = operationRequestsProducer; _walletsService = walletsService; _walletCreationMasterWalletAddress = walletCreationMasterWalletAddress; _log = logFactory.CreateLog(this); }
public TransferService( IWalletsService walletsService, ITransactionScopeHandler transactionScopeHandler, IBalanceService balanceService, IOperationRequestsProducer operationRequestsProducer, IDeduplicationLogRepository <TransferDeduplicationLogEntity> deduplicationLog, ILogFactory logFactory) { _walletsService = walletsService; _transactionScopeHandler = transactionScopeHandler; _balanceService = balanceService; _operationRequestsProducer = operationRequestsProducer; _deduplicationLog = deduplicationLog; _log = logFactory.CreateLog(this); }
public BalanceService( IQuorumOperationExecutorClient quorumOperationExecutorClient, IWalletsService walletsService, TimeSpan cacheExpirationPeriod, IOperationsFetcher operationsFetcher, IRabbitPublisher <CustomerBalanceUpdatedEvent> customerBalanceUpdatedPublisher, ILogFactory logFactory, IDistributedCache distributedCache) { _quorumOperationExecutorClient = quorumOperationExecutorClient; _walletsService = walletsService; _cacheExpirationPeriod = cacheExpirationPeriod; _operationsFetcher = operationsFetcher; _customerBalanceUpdatedPublisher = customerBalanceUpdatedPublisher; _distributedCache = distributedCache; _log = logFactory.CreateLog(this); }
public WalletsController(BankSystemContext context, IWalletsService walletService) { dbContext = context; _walletService = walletService; }
public CategoriesController(ICategoriesService categoriesService, IWalletsService walletsService, UserManager <ApplicationUser> userManager) { this.categoriesService = categoriesService; this.walletsService = walletsService; this.userManager = userManager; }
public WalletsController(IWalletsService walletsService, IMapper mapper) { _walletsService = walletsService; _mapper = mapper; }
public async Task <ActionResult <UserAccResponseModel> > GetAllUserBankAccounts(ClaimsPrincipal currentUser, string username, IChargeAccountsService chargeAccount, IDepositsService depositService, ICreditsService creditsService, IWalletsService walletsService) { var userAuthenticate = await dbContext.Users.FirstOrDefaultAsync(x => x.Username == username); if (currentUser.HasClaim(c => c.Type == "Roles")) { if (userAuthenticate != null) { var charges = await chargeAccount.GetBankAccountInfo(currentUser, username); var deposits = await depositService.GetDepositsInfo(currentUser, username); var wallets = await walletsService.GetWalletsInfo(currentUser, username); var credits = await creditsService.GetCreditInfo(currentUser, username); UserAccResponseModel userAcc = new UserAccResponseModel(); userAcc.UserChargeAcc = charges.Value; userAcc.UserCredits = credits.Value; userAcc.UserDeposits = deposits.Value; userAcc.UserWallets = wallets.Value; return(StatusCode(200, userAcc)); } responseMessage.Message = "User not found"; return(StatusCode(404, responseMessage)); } responseMessage.Message = "You are not logged in"; return(StatusCode(403, responseMessage)); }