/// <summary> /// Used by Admin users to create a new account bound to the client specified by <c>clientId</c>. /// </summary> /// <param name="clientId">The account to be modified.</param> /// <param name="userCredentialsCallback">A delegate that, if invoked, returns the User's credentials.</param> /// <returns>The starting balance for the new account.</returns> /// public async Task <string> CreateAccount(string clientId, UserCredentialsCallback userCredentialsCallback) { string accountId; var accessToken = await GetCurrentAccessToken(userCredentialsCallback); using (var accountsApi = new AccountsApiClient(_accountsApiUrl, accessToken)) { accountId = await accountsApi.CreateAccount(clientId); } return(accountId); }