我从Quickbooks在线获取帐户列表,并且所有AccountTypeEnum类型都设置为Asset。这个不对。是否有更好的方法可以使用正确的帐户类型(如收入和费用)获取此数据?
OAuthRequestValidator oauthValidator = Initializer.InitializeOAuthValidator(accessToken, accessTokenSecret, consumerKey, consumerSecret);
ServiceContext context = Initializer.InitializeServiceContext(oauthValidator, realmId, string.Empty, string.Empty, dataSourcetype);
DataServices commonService = new DataServices(context);
int currentPage = 1;
int itemListPageSize = 100;
Intuit.Ipp.Data.Qbo.AccountQuery qboAccQuery = new Intuit.Ipp.Data.Qbo.AccountQuery();
IEnumerable<Intuit.Ipp.Data.Qbo.Account> qboAccounts = commonService.FindAll(new Intuit.Ipp.Data.Qbo.Account(), currentPage, itemListPageSize) as IEnumerable<Intuit.Ipp.Data.Qbo.Account>;
答案 0 :(得分:2)
QBO不会返回帐户类型,只返回SubType。请参阅:
类型在QK帐户的DevKit中公开,但从未设置,这就是它始终为资产的原因。