Intuit API 请求在连接到桌面时失败并出现一般错误,但适用于联机



使用 IPP.NET SDK v2.0.1,存在简单请求失败并显示一般错误消息的问题,特别是在连接到 QuickBooks Desktop 实例时。

在线工作正常。

连接方式:

    public QBClient(string appToken, string companyId, string accessToken, string accessTokenSecret, string consumerKey, string consumerSecret, ServiceType qbService)
    {
        AppToken = appToken;
        CompanyID = companyId;
        AccessToken = accessToken;
        AccessTokenSecret = accessTokenSecret;
        ConsumerKey = consumerKey;
        ConsumerSecret = consumerSecret;
        IntuitServicesType ist = IntuitServicesType.QBO;
        if (qbService == ServiceType.QBDesktop)
        {
            ist = IntuitServicesType.QBD;
        }
        _oAuthValidator = new OAuthRequestValidator(AccessToken, AccessTokenSecret, ConsumerKey, ConsumerSecret);
        _serviceContext = new ServiceContext(AppToken, CompanyID, ist, _oAuthValidator);
        string ticket = _serviceContext.Ticket;
        this.DataService = new Intuit.Ipp.DataService.DataService(_serviceContext);
    }

上面的连接方法不会引发任何异常。但是,以下调用:

DataService.FindAll<Intuit.Ipp.Data.Customer>(customer, 1, 1000);

生成在 Fiddler 中捕获的以下请求/响应:

请求:

网址: POST https://quickbooks.api.intuit.com/v3/company/COMPANY-ID-REMOVED/query

身体: select * from Customer startPosition 1 maxResults 1000

响应:

{"Fault":{"Error":[{"Message":"Operation failed, see details for error","code":"1000"}],"type":"Validation"},"time":"2013-11-16T00:20:30.739Z"}

要成功查询 QuickBooks Desktop,应该更改哪些内容?

V3 QBD 一次最多可以返回 500 个结果,而 V3 QBO 可以返回 1000 个结果。请更改您的查询。我们对此提出了增强请求。

相关内容

最新更新