简体   繁体   English

Intuit Quickbooks在线API-如何购买

[英]Intuit Quickbooks Online API - How to get purchases

I'm using Intuit's .NET SDK for QBO, and am attempting to get a list of purchases from my qbo account. 我正在将Intuit的.NET SDK用于QBO,并试图从我的qbo帐户中获取购买清单。 Here's my C# code... 这是我的C#代码...

var qboCashPurchaseQuery = new Intuit.Ipp.Data.Qbo.CashPurchaseQuery();
qboCashPurchaseQuery.PageNumber = 1;
qboCashPurchaseQuery.ResultsPerPage = 100;
var results = qboCashPurchaseQuery.ExecuteQuery<Intuit.Ipp.Data.Qbo.CashPurchase(context).ToList();
grdQuickBooksCustomers.DataSource = results;

I get a table with the number of records matching the number of purchases I expect, but the actual data returned is not what I need. 我得到一个表,记录的数量与我期望的购买数量相匹配,但是返回的实际数据不是我所需要的。

This is the columns and the first row of data I get back: (sorry for the formatting) 这是我得到的数据的列和第一行:(很抱歉格式化)

SyncToken   Synchronized   IdsType
0                          Intuit.Ipp.Data.Qbo

This bit of code returns the same kind of weird data for some other functions such as InvoiceQuery. 对于某些其他功能,例如InvoiceQuery,此代码段返回相同类型的怪异数据。 What am I doing wrong here to get this data? 我在这里获取数据时做错了什么? How might I actually return the detailed purchase data I need? 我实际上如何返回所需的详细购买数据?

string q = "Select * from Purchase Where PaymentType='Cash' STARTPOSITION 1 MAXRESULTS 100";
dynamic Purchaselist = purchaseQueryService.ExecuteIdsQuery(q);
CashPurchase cashpurchase = new CashPurchase();

foreach (CashPurchase oCash in Purchaselist) {
    //do something
}

var purchase = new Purchase();

var purchases = ds.FindAll(purchase, 0, 500);

That's how we query our datasets. 这就是我们查询数据集的方式。 You have to repeat the query if you've got more than 500 items. 如果您有500多个商品,则必须重复查询。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IntuIt QuickBooks付款API,如何使用IppDotNetSdkForQuickBooksApiV3软件包的servicecontext执行信用卡交易? - IntuIt QuickBooks payments API, How can I perform credit card transactions using servicecontext of IppDotNetSdkForQuickBooksApiV3 package? 无法在 Intuit quickbooks api C# 中设置 SalesItemLineDetail 税码 - Not able to set SalesItemLineDetail tax code in Intuit quickbooks api C# 如何在Intuit Partner Platform中使用QuickBooks处理公司文件 - How to work with company file using QuickBooks in Intuit Partner Platform 如何在 .NET Core (C#) 中获取访问令牌、刷新令牌,而无需在 QuickBooks Online API 中使用 SDK(手动)? - How to get access token, refresh token in .NET Core (C#) without using SDK (Manually) in QuickBooks Online API? 使用QuickBooks Online(QBO)Intuit合作伙伴平台(IPP)DevKit查询所有未结余额发票 - Query for All Invoices With Open Balances using QuickBooks Online (QBO) Intuit Partner Platform (IPP) DevKit QuickBooks Intuit IPP问题检查 - QuickBooks Intuit IPP Issue Check 从QuickBooks Online获取付款方式名称 - Get the Payment method name from QuickBooks Online 通过Intuit API访问quickBooks数据时,.NET中出现“ Unauthorized-401”错误 - Getting “Unauthorized-401” Error in .NET while accessing quickBooks data through Intuit API 如何在通过 QuickBooks Online API 添加客户之前检查客户是否存在? - How to check if a customer exists before adding them through the QuickBooks Online API? 如何在QuickBooks Online中创建日记条目 - How to create Journal entry in QuickBooks Online
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM