Celigo.ServiceManager.NetSuite 1.0.0

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

// Install Celigo.ServiceManager.NetSuite as a Cake Tool
#tool nuget:?package=Celigo.ServiceManager.NetSuite&version=1.0.0

Celigo ServiceManager for NetSuite is a wrapper around NetSuite's SuiteTalk Webservices API compatible with .NET Standard 2.0. It strips out unnecessary complexity of created by the wrappers generated by the WCF Connected Services and provides a simple API, much similar to the old Service Reference stubs.

Usage sample:

public class NetSuiteClientTests
{
    private readonly INetSuiteClient client;

    public NetSuiteClientTests()
    {
        var config = new TestConfiguration();
        var factory = new ClientFactory(config.ApplicationId);
        client = factory.CreateClient(config.PassportProvider);
    }

    [Fact]
    public async void Can_execute_a_parameterless_SuiteTalk_method()
    {
        
        var serverTimeResult = await client.getServerTimeAsync();
        Assert.True(serverTimeResult.status.isSuccess);
        Assert.Equal(DateTime.Now.Year, serverTimeResult.serverTime.Year);
    }

    [Fact]
    public async void Can_execute_a_parameterized_SuiteTalk_method()
    {
        var customizationResult = await client.getCustomizationIdAsync(new CustomizationType {
            getCustomizationType = GetCustomizationType.customRecordType,
            getCustomizationTypeSpecified = true
        }, false);
        Assert.True(customizationResult.status.isSuccess);
    }
}

class TestConfiguration
{
    public string ApplicationId { get; set; }
    public IPassportProvider PassportProvider { get; set; }

    public TestConfiguration()
    {
        this.ApplicationId = Environment.GetEnvironmentVariable("NS_APP_ID");
        this.PassportProvider = new EnvVariablePassportProvider();
    }
}

interface ITestPassportProvider: IPassportProvider
{
    string GetAuthString();
}

/// <summary>
/// Provides quick access to a Passport object constructed through NETSUITE_CREDS env variable.
/// </summary>
class EnvVariablePassportProvider : ITestPassportProvider
{
    private static readonly Regex authPattern = new Regex(@"(?<keyword>\w+)=(?<value>.*?)(,|$)", RegexOptions.Compiled);

    public string GetAuthString()
    {
        var creds = Environment.GetEnvironmentVariable("NETSUITE_CREDS");
        if (string.IsNullOrWhiteSpace(creds)) throw new InvalidOperationException("NETSUITE_CREDS environment variable should be configured");

        return creds;
    }

    public Passport GetPassport()
    {
        string authHeader = GetAuthString();

        var matches = authPattern.Matches(authHeader);
        if (matches.Count < 3) throw new InvalidOperationException("NETSUITE_CREDS have been misconfigured");

        var detailsMap = new Dictionary<string, string>(4);
        foreach (Match match in matches)
        {
            detailsMap.Add(match.Groups["keyword"].Value, match.Groups["value"].Value);
        }

        return new Passport {
            email = detailsMap["email"],
            password = detailsMap["password"],
            account = detailsMap["account"],
            role = new RecordRef { internalId = detailsMap["role"] }
        };
    }
}
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 (1)

Showing the top 1 NuGet packages that depend on Celigo.ServiceManager.NetSuite:

Package Downloads
Celigo.SuiteTalk.PassportProviders.EnvironmentVariables

This is a companion package for Celigo.SuiteTalk library. Not useful on its own.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.1.2 4,591 4/28/2023
7.1.1 822 4/3/2023
7.1.0 18,911 5/31/2022
7.0.1 650 5/24/2022
7.0.0 682 5/23/2022
6.0.0 25,496 4/4/2020
4.2.1 1,380 6/25/2020
4.2.0 5,051 10/9/2019
4.1.5 845 10/3/2019
3.4.3 840 9/27/2019
3.4.2 1,686 7/9/2019
3.4.1 837 7/9/2019
3.4.0 1,675 2/15/2019
3.3.0 914 2/13/2019
3.2.0 2,633 1/7/2019
3.1.0 947 12/12/2018
3.0.1 1,037 12/7/2018
3.0.0 1,286 11/8/2018
2.10.4 1,078 9/14/2018
2.10.0 1,108 8/2/2018
2.9.9 1,225 7/6/2018
2.9.8 1,134 6/19/2018
2.9.7 1,201 6/13/2018
2.7.3 1,304 5/30/2018
2.7.1 1,299 5/30/2018
2.7.0 1,297 5/30/2018
2.6.4 1,273 5/23/2018
2.5.0 1,414 4/20/2018
2.4.0-preview 1,219 4/20/2018
2.2.0-preview 1,159 4/12/2018
1.3.3 1,263 4/10/2018
1.3.1 1,282 4/6/2018
1.2.2 1,273 4/6/2018
1.2.0 1,266 4/4/2018
1.0.0 1,295 2/23/2018

Supports NetSuite SuiteTalk 2017.2