QuickBookSoap2Rest 1.0.0
RXN.AspNetCore.QuickBookSoap2Rest
Additional DetailsChange namespace of project and support for enterprise
See the version list below for details.
dotnet add package QuickBookSoap2Rest --version 1.0.0
NuGet\Install-Package QuickBookSoap2Rest -Version 1.0.0
<PackageReference Include="QuickBookSoap2Rest" Version="1.0.0" />
paket add QuickBookSoap2Rest --version 1.0.0
#r "nuget: QuickBookSoap2Rest, 1.0.0"
// Install QuickBookSoap2Rest as a Cake Addin #addin nuget:?package=QuickBookSoap2Rest&version=1.0.0 // Install QuickBookSoap2Rest as a Cake Tool #tool nuget:?package=QuickBookSoap2Rest&version=1.0.0
QuickBookSoap2Rest
A simple library was written by C# ASP.Net Core web API application supported communicates with QBWebConnector (of QuickBooks)
Installation
Use Package Manager
to install it.
Install-Package RXN.AspNetCore.QuickBookSoap2Rest -Version 2.0.0
Or .NET cli
dotnet add package RXN.AspNetCore.QuickBookSoap2Rest --version 2.0.0
Or PackageReference
<PackageReference Include="RXN.AspNetCore.QuickBookSoap2Rest" Version="2.0.0" />
Or Paket CLI
paket add RXN.AspNetCore.QuickBookSoap2Rest --version 2.0.0
Usage
There are two interfaces for handling Request
of .Net core API
IWCWebMethod
and IWCWebMethodAsync
Implement from IWCWebMethod
if you just want to a synchronous function
Implement from IWCWebMethodAsync
if you just want to an asynchronous function
Example
- Implement
IWCWebMethod
using RXN.AspNetCore.QuickBookSoap2Rest.Interfaces;
// ...
// The handle class take care all business when QBWC requested to server
public class WCRequestHandler : IWCWebMethod
{
// must implement all methods supporting WC Connector
// In each method, you can write you business and return the type method need
public string serverVersion(string strVersion)
{
return _config.GetValue<string>("App:Version");
}
public string clientVersion(string strVersion)
{
// maybe save client version or check for update
return null;
}
// ...
}
- Implement
IWCWebMethodAsync
using RXN.AspNetCore.QuickBookSoap2Rest.Interfaces;
// ...
// The handle class take care all business when QBWC requested to server
public class WCRequestHandlerAsync : IWCWebMethodAsync
{
// must implement all methods supporting WC Connector
// In each method, you can write you business and return the type method need
public async Task<string> serverVersionAsync(string strVersion)
{
var assembly = System.Reflection.Assembly.GetExecutingAssembly();
var serviceVersion = assembly.GetName().Version.ToString();
return serviceVersion;
}
public async Task<string> clientVersionAsync(string strVersion)
{
// maybe save client version or check for update
return null;
}
// ...
}
Now in your Api Controller call WCController
and passing WC handler to it.
Example:
using Microsoft.AspNetCore.Mvc;
using RXN.AspNetCore.QuickBookSoap2Rest;
using RXN.AspNetCore.QuickBookSoap2Rest.Interfaces;
[Route("api")]
[ApiController]
[Produces("text/xml")]
public class SyncController : ControllerBase
{
[HttpPost]
public Task<XElement> Handle()
{
var wcController = new WCController(new WCRequestHandlerAsync());
// Request from AspNetCore <Microsoft.AspNetCore.Http.HttpRequest> Request
// a property of Controller Base
// Now all QBWC request will be handle and return at here
return wcController.HandleAsync(Request);
}
}
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Product | Versions 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 is compatible. netcoreapp3.1 was computed. |
-
.NETCoreApp 3.0
- Microsoft.AspNetCore.Http (>= 2.2.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.