Sage100.ApiClient 1.9.0

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

// Install Sage100.ApiClient as a Cake Tool
#tool nuget:?package=Sage100.ApiClient&version=1.9.0

Example Code

using Microsoft.IdentityModel.Clients.ActiveDirectory;
using Sage100.ApiClient;
using Sage100.ApiClient.Models.Contact;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;

namespace Example
{
    class Program
    {
        /* Replace with the client id of your own Azure native application */
        private const string ClientId = "9012432f-43fe-4adf-9271-aa87d2c16e97";
        private const string RedirectUri = "https://localhost";
        private const string CompanyCode = "ABC";

        /// <summary>
        /// WinMain entry point.
        /// </summary>
        /// <param name="args">The command line arguments.</param>
        static void Main(string[] args)
        {
            var configuration = ServiceClient.GetConfiguration(ClientId, RedirectUri, new PlatformParameters(PromptBehavior.SelectAccount)).Result;
            var client = new ServiceClient(configuration, new Func<PlatformParameters>(() => { return new PlatformParameters(PromptBehavior.Auto); }));

            var name = client.V1.Companies[CompanyCode].Customers.FindAsync("american busin").Result.FirstOrDefault();

            Debug.WriteLine(name);

            var customer = client.V1.Companies[CompanyCode].Customers[name.Id].GetAsync();
            var contacts = client.V1.Companies[CompanyCode].Customers[name.Id].Contacts.GetAsync();
            var memos = client.V1.Companies[CompanyCode].Customers[name.Id].Memos.GetAsync();
            var invoices = client.V1.Companies[CompanyCode].Customers[name.Id].Invoices.GetAsync();
            var payments = client.V1.Companies[CompanyCode].Customers[name.Id].Payments.GetAsync();

            var tasks = new List<Task>
            {
                customer,
                contacts,
                memos,
                invoices,
                payments
            };

            Task.WaitAll(tasks.ToArray());

            var contact = contacts.Result.FirstOrDefault();
            var memo = memos.Result.FirstOrDefault();
            var invoice = invoices.Result.FirstOrDefault();
            var payment = payments.Result.FirstOrDefault();

            Debug.WriteLine(contact);
            Debug.WriteLine(memo);
            Debug.WriteLine(invoice);
            Debug.WriteLine(payment);

            tasks.Clear();

            tasks.Add(client.V1.Companies[CompanyCode].Customers[name.Id].Invoices[invoice.Id].GetAsync());
            tasks.Add(client.V1.Companies[CompanyCode].Customers[name.Id].Memos[memo.Id].GetAsync());
            tasks.Add(client.V1.Companies[CompanyCode].Customers[name.Id].Payments[payment.Id].GetAsync());
            tasks.Add(client.V1.Companies[CompanyCode].CustomerContacts[contact.Id].GetAsync());
            tasks.Add(client.V1.Companies[CompanyCode].CustomerMemos[memo.Id].GetAsync());
            tasks.Add(client.V1.Companies[CompanyCode].CustomerInvoices[invoice.Id].GetAsync());
            tasks.Add(client.V1.Companies[CompanyCode].CustomerPayments[payment.Id].GetAsync());
            tasks.Add(client.V1.Companies[CompanyCode].CustomerContacts[contact.Id].Memos.GetAsync());
            tasks.Add(client.V1.Companies[CompanyCode].CustomerContacts[contact.Id].Memos[memo.Id].GetAsync());

            Task.WaitAll(tasks.ToArray());

            var patch = new ContactPatchEntity()
            {
                Salutation = "Mr.",
                Title = "President"
            };

            patch.Extension.Add("FaxNo", "714-785-4718");

            var c = client.V1.Companies[contact.Company].CustomerContacts[contact.Id].UpdateAsync(patch).Result;
        }
    }
}
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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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
2.7.0 713 10/24/2019
2.4.0 657 1/30/2019
2.2.0 730 10/25/2018
1.9.0 868 9/19/2018

Initial release of the Sage 100 API service client.