AccountQuery返回所有类型不正确的帐户

时间:2013-02-01 19:35:02

标签: quickbooks intuit-partner-platform quickbooks-online

我从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>;

1 个答案:

答案 0 :(得分:2)

QBO不会返回帐户类型,只返回SubType。请参阅:

https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0400_QuickBooks_Online/Account

类型在QK帐户的DevKit中公开,但从未设置,这就是它始终为资产的原因。