Code :
Intuit.Ipp.Data.Qbo.AccountQuery qboAccQuery = new Intuit.Ipp.Data.Qbo.AccountQuery();
qboAccQuery.CreateTime = DateTime.Now.Date.AddDays(-20);
qboAccQuery.SpecifyOperatorOption(Intuit.Ipp.Data.Qbo.FilterProperty.CreateTime,
Intuit.Ipp.Data.Qbo.FilterOperatorType.AFTER);
qboAccQuery.CreateTime = DateTime.Now.Date;
qboAccQuery.SpecifyOperatorOption(Intuit.Ipp.Data.Qbo.FilterProperty.CreateTime,
Intuit.Ipp.Data.Qbo.FilterOperatorType.BEFORE);
qboAccQuery.PageNumber = 1;
qboAccQuery.ResultsPerPage = 15;
List<Intuit.Ipp.Data.Qbo.Account> qboAccounts =
qboAccQuery.ExecuteQuery<Intuit.Ipp.Data.Qbo.Account> (co ntext).ToList<Intuit.Ipp.Data.Qbo.Account>();
获取此请求正文 Filter=CreateTime :AFTER: 2013-06-19T15:28:56+05:30 & Sort=CreateTime AToZ&PageNum=1&ResultsPerPage=100
但它会产生异常 InvalidTokenException : {"Unauthorized"}
Exception :
Intuit.Ipp.Exception.InvalidTokenException was caught
HResult=-2146233088
Message=Unauthorized
Source=System
ErrorCode=401
StackTrace:
at Intuit.Ipp.Exception.IdsExceptionManager.HandleException(IdsException idsException)
at Intuit.Ipp.Services.QboService.Get[T](IQboQuery qboQuery, String simpleQuery, Boolean isQuerySpecified)
at Intuit.Ipp.Services.ServiceExtensions.ExecuteQuery[T](IQuery query, ServiceContext serviceContext)
at QbSync.QuickBooksCustomers.Page_Load(Object sender, EventArgs e)