/// <summary> /// This will return all accounts given access token /// </summary> /// <returns></returns> public async Task <List <Account> > GetAccounts() { Dictionary <string, string> routeParams = new Dictionary <string, string>(); AccountsWrapper accountsWrapper = await Get <AccountsWrapper>(routeParams, null, _accountsRoute); return(accountsWrapper.Accounts); }
void AddTransfer() { AccountsWrapper accounts = window.ViewAccounts(); List <string> names = accounts.Accounts; string sel = accounts.SelectedAccount; if (sel != null) { names.Remove(sel); } if (names.Count == 0 || sel == null) { throw new Exception("There is a bug in the model, it should not have attempted to add a transfer at this time since there are not enough accounts"); } string transferTo = names[random.Next(0, names.Count)]; AssertSelectedTransaction(); selectedTransaction.SetPayee("Transfer to: " + transferTo); selectedTransaction.SetCategory(""); selectedTransaction.SetSalesTax(0); selectedTransaction.SetAmount(GetRandomDecimal(-500, 500)); }
void EnterAccounts() { accounts = window.ViewAccounts(); }
void ViewAccounts() { accounts = window.ViewAccounts(); }