private bool IsAffordableForBuyer(string id, IEnumerable <Transaction> transactions) { var moneyNeeded = transactions.Where(x => x.BuyerId == id).Sum(x => x.TotalCost + x.BuyerProvision); var depot = wallstreetClient.GetInvestorDepot(id, exchangeId); return(depot.Budget >= moneyNeeded); }
public InvestorDepot LoadInvestorInformation(string exchangeId) { if (email != null) { return(client.GetInvestorDepot(email, exchangeId)); } else { return(null); } }