使用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应该更改什么?
答案 0 :(得分:2)
V3 QBD可以返回最多500个结果,与V3 QBO不同,可以返回1000.请更改您的查询。我们有一个增强请求。