VNS.GSPro 3.0.1

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

// Install VNS.GSPro as a Cake Tool
#tool nuget:?package=VNS.GSPro&version=3.0.1                

VNS GSPro

Simple integration to Gensam GSPro

Installation

Use the package manager nuget to install.

dotnet add package VNS.GSPro

Usage

// Set variables
string _url = "";
string _login = "";
string _password = "";

// Init GSPro Obj
var gs = new GSPro(_url, _login, _password);
        
// Forsikring
string _status = "TILBUD";
string _art = "";
int _frekvens = 1; // 1, 3, 6, 12

var forsikring = new VNS.GSPro.Forsikring() { Ikraft = DateTime.Now, Status = _status, Art = _art, Frekvens = _frekvens };

// Forsikring Forsikringstager Egenskaber
forsikring.Forsikringstager.Egenskaber.Add(string, string);

// Forsikringstager Adresse
forsikring.Forsikringstager.Adresse.Egenskaber.Add(string, string);

// Forsikrings Egenskaber
forsikring.Egenskaber.Add(string, string);
        
// Forsikrings Adresse Egenskaber
var adresse = new VNS.GSPro.Adresse();
adresse.Egenskaber.Add(string, string);
forsikring.Adresser.Add(adresse);
        
// Genstand 
var genstand = new VNS.GSPro.Genstand(string, string);
        
// Dækninger
genstand.Daekninger.Add(string, string);
        
// Egenskaber
genstand.Egenskaber.Add(string, string);
        
// Ydelser
genstand.Ydelser.Add(string, string);
        
// Add genstand to forsikring
forsikring.Genstande.Add(genstand);
        
// Calculate price
var calcResult = gs.BeregnPris(forsikring, out string payloadXml); // Payloadxml will return the full object as XML

// Result properties
Console.WriteLine(calcResult.StatusKode); // Get status code
Console.WriteLine(calcResult.StatusTekst); // Get status text
Console.WriteLine(calcResult.PoliceNummer); // Get police number
Console.WriteLine(calcResult.AftaleId); // Get aftale id
Console.WriteLine(calcResult.KundeNummer); // Get customer number
Console.WriteLine(calcResult.IndividId); // Get individ id
Console.WriteLine(calcResult.SamletPris); // Get total price

// calcResult.Priser will return a collection of prices
// calcResult.Omkostninger will return a collection of costs

Console.WriteLine(calcResult.ToXml()); // Will return the full XML

// Create forsikring
var createResult = gs.OpretAftale(forsikring, out string payloadXml); // Payloadxml will return the full object as XML

License

MIT

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

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
4.0.1 126 4/15/2024
4.0.0 124 12/14/2023
3.0.7 114 4/15/2024
3.0.6 158 10/10/2023
3.0.5 286 2/8/2023
3.0.4 273 2/8/2023
3.0.3 320 12/14/2022
3.0.2 308 12/14/2022
3.0.1 288 12/9/2022
3.0.0 290 12/6/2022
2.0.8 358 10/27/2022
2.0.7 516 9/13/2022
2.0.5 422 8/22/2022
2.0.4 454 7/11/2022
2.0.3 470 7/10/2022
2.0.2 454 7/10/2022
2.0.1 450 7/9/2022
2.0.0 466 6/29/2022