将客户添加到 Quickbooks Online (qbXML)
我只想从我的 .NET 应用程序将客户添加到 Quickbooks Online。执行此操作的最佳方法是什么?代码会是什么样子?
I want to simply add a customer to Quickbooks Online from my .NET app. What is the best way to do this and what would the code look like?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有两种方法可以做到这一点:您可以使用QuickBooks SDK,构建添加客户XML 消息并将其发送到 QuickBooks Online Edition (QBOE)。由于您使用的是 .NET,您还可以使用 QBFC 库,它为您管理 XML 并提供比原始 XML 使用起来更容易、更安全的结构化 API。
或者,您可以使用 Intuit 合作伙伴平台 (IPP) 进行 REST 调用。我上次检查时,QBOE 的 REST API 仍处于 Beta 阶段,但这绝对是未来的发展方向,并且最终可能会对 QBOE 提供更全面的功能支持(与桌面相比,SDK 中 QBOE 支持的功能始终较少)版)。
在这两种情况下,您都必须处理身份验证。对于 SDK,您必须授权应用程序并获取连接票证。对于 IPP,您必须授权应用程序并与 SAML 网关协商。
如果您只是做一个自定义应用程序或闲逛,您可能会想要使用 SDK,因为它更容易,尤其是身份验证。如果您正在构建产品,IPP 值得认真关注。如果您正在构建产品,您应该知道 Microsoft 目前有一个名为 Frontrunner 的支持计划,如果您使用 IPP,它会提供一些好处。
There are 2 ways to do this: you can use the QuickBooks SDK, construct an add customer XML message and send it to QuickBooks Online Edition (QBOE). Since you're in .NET you can also use the QBFC library which manages the XML for you and provides a structured API which is easier and safer to use than raw XML.
Or you can make a REST call using the Intuit Partner Platform (IPP). The REST API for QBOE was still in Beta last I checked, but this is definitely the way of the future and will probably have more full featured support for QBOE eventually (There have always been fewer supported features for QBOE in the SDK vs. the desktop edition).
In both cases you'll have to deal with authentication. For the SDK, you have to authorize the app and get a connection ticket. For the IPP, you'll have to authorize the app and negotiate with the SAML gateway.
If you're just doing a custom application or messing around, you'll probably want to use the SDK because it's easier, particularly the authentication. If you're building a product, IPP is worth a serious look. If you are building a product, you should be aware that Microsoft currently has a support program called Frontrunner that provides some goodies if you use the IPP.
对于 QBOE,您可以发布 XML 来验证和添加客户。以下是入门链接:
QBOE 集成
您需要使用 QBXML v 6,不过您可以在此处获取 XML:
http://developer.intuit.com/qbsdk-current/common/newosr/index.html
您可以使用 XML 序列化来解析 XML到强类型类中,这样您就可以针对它们进行编程。
如果您有兴趣,我还提供用于 QB Desktop、QBOE 和 QBPOS 的 C# 套件。
For QBOE, you can post XML to authenticate and add customers. Here is a link to get started:
QBOE Integration
You'll need to use QBXML v 6, though you can get the XML here:
http://developer.intuit.com/qbsdk-current/common/newosr/index.html
You can use XML Serialization to parse the XML into strongly typed classes, so you can program against them.
I also offer C# kits for QB Desktop, QBOE, and QBPOS, if you are interested.