QbModels 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package QbModels --version 1.0.0
NuGet\Install-Package QbModels -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="QbModels" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add QbModels --version 1.0.0
#r "nuget: QbModels, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install QbModels as a Cake Addin
#addin nuget:?package=QbModels&version=1.0.0

// Install QbModels as a Cake Tool
#tool nuget:?package=QbModels&version=1.0.0

QBXML-Object-Models

Quickbooks C# object models to generate QBXML without writing XML code

This is part of a personal pet project I've been working on to help update and improve my C# coding skills and experience. This dll allows me to generate the QBXML to call Quickbooks Desktop API without having to write XML code. <br /><br/> For example, the following C# code:

#region Create customer query request with a maximum of 50 responses
CustomerQueryRq customerRq = new() { MaxReturned = 50, Iterator = "Start" };
Console.WriteLine(customerRq.ToString());
#endregion

Produces the following output:

<?xml version="1.0" encoding="utf-16"?>
<?qbxml version="13.0"?>
<QBXML>
  <QBXMLMsgsRq onError="stopOnError">
    <CustomerQueryRq iterator="Start">
      <MaxReturned>50</MaxReturned>
    </CustomerQueryRq>
  </QBXMLMsgsRq>
</QBXML>

I've also added a couple of validation extensions using DataAnnotations and custom ValidationAttributes to be able to call IsEntityValid() and/or GetErrorsList() on the object.

if(customerRq.IsEntityValid())
{
  ...Your code here
}
else
{
  foreach(string s in customerRq.GetErrorsList())
  {
    ...Your code here
  }
}

I have objects for the majority of QBXML calls but have only used and tested a few since that's all I need. While it is not complete, I am continuing to make updates and changes. Have completed the majority of the Unit Tests for generating the QBXML as well as sending the QBXML to the request processor. I have covered the majority of QBXML requests in my unit testing but there are still bugs to be found. If you do use this, please report these bugs so that I can look into why it's not working. Look at the included unit test code I uploaded for testing the InvoiceQueryRq/InvoiceAddRq/InvoiceModRq QBXML calls to see how I use the dll to generate the QBXML and then convert the QBXML result string back into a C# object (in this case QbInvoicesView).

Another note, I changed the target framework from netcoreapp3.1 to netstandard2.1. This should make it more compatible with any projects you incorporate this into. Theoretically, this should make it compatible with other types of projects beyond Windows apps.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.13 117 2/20/2024
1.2.13-beta01 65 2/20/2024
1.2.12 86 2/19/2024
1.2.11 87 2/16/2024
1.2.11-beta01 71 2/16/2024
1.2.10 89 1/30/2024
1.2.9 75 1/30/2024
1.2.9-beta-01 63 1/29/2024
1.2.7 143 12/29/2023
1.2.6 98 12/22/2023
1.2.5 97 12/21/2023
1.2.1 1,421 5/19/2022
1.2.0 420 4/18/2022
1.0.5 399 4/12/2022
1.0.4 383 4/10/2022
1.0.3 405 4/7/2022
1.0.2 415 4/3/2022
1.0.1 380 3/31/2022
1.0.0 387 3/30/2022