我正在尝试提取 QuickBooks Online 帐户的所有帐户。我的用户有 350 多个帐户可供提取。有没有办法一次把它们全部拉出来?如果没有,有没有办法确定要拉多少条记录,然后将它们拉到一个组中?这是我的代码:
//pull a list of all accounts. I can only pull 100 at a time, so I need to keep enumerating until I hit 0
Account acct = new Account();
_accounts = new List<Account>();
for (int i = 1; i < 4; i++)
{
var aList = dataServices.FindAll(acct, i, 100);
if (aList.Count() == 0)
{
break;
}
_accounts.AddRange(aList);
}
我猜我的客户的账户不超过 300 个。有没有办法可以替换 3 或更有效的代码?