/// <summary> /// Get the history of an account from the Accounts API, on behalf of a User. /// </summary> /// <param name="accountNumber">The account to be queried.</param> /// <param name="userCredentialsCallback">A delegate that, if invoked, returns the User's credentials.</param> /// <returns>The account history as list of signed doubles.</returns> /// public async Task <AccountHistory> GetAccountHistory(string accountNumber, UserCredentialsCallback userCredentialsCallback) { AccountHistory history; var accessToken = await GetCurrentAccessToken(userCredentialsCallback); using (var accountsApi = new AccountsApiClient(_accountsApiUrl, accessToken)) { history = await accountsApi.GetAccountHistory(accountNumber); } return(history); }