QuickBookSoap2Rest 1.0.0

Suggested Alternatives

RXN.AspNetCore.QuickBookSoap2Rest

Additional Details

Change namespace of project and support for enterprise

There is a newer version of this package available.
See the version list below for details.
dotnet add package QuickBookSoap2Rest --version 1.0.0
NuGet\Install-Package QuickBookSoap2Rest -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="QuickBookSoap2Rest" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add QuickBookSoap2Rest --version 1.0.0
#r "nuget: QuickBookSoap2Rest, 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 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 IWCWebMethodAsyncif 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

MIT

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 is compatible.  netcoreapp3.1 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.1.0 938 10/17/2019
1.0.0 735 10/17/2019