-
Notifications
You must be signed in to change notification settings - Fork 24
Home
Ole Melhus edited this page Oct 31, 2016
·
8 revisions
This is an unofficial API Client for Visma.net Integrations. The library is compatible with .net45, Xamarin.iOS and MonoAndroid.
- Install Visma.net from the Nuget Package Manager
- Open "Package Management Console",
Install-Package Visma.net
Note that there are still some methods that are not async in the library. These methods, with some exceptions, will disappear before the release of v1.0.
- Step 1: Connecting with Visma.net
- Step 2: Customers
- Step 3: Customer Invoices
- Step 4: Create SalesOrder
All endpoints are available as read-only by using the dynamic keyword. Use the documentation from Visma to find the available endpoints and fields.
int contextId = 123456;
string token = "b38e817c-d0f1-a034-b4c3-2959934a7b02";
dynamic vismaNet = new VismaNet(contextId, token);
var accounts = await vismaNet.Account.All();
foreach(var account in accounts){
Console.WriteLine($"{account.accountCD}: {account.description}");
}
Parameters that are passed to the method All(), like numberToRead in this sample, will be passed as parameters to the endpoint.
int contextId = 123456;
string token = "b38e817c-d0f1-a034-b4c3-2959934a7b02";
dynamic vismaNet = new VismaNet(contextId, token);
var accounts = await vismaNet.Account.All(numberToRead: 5);
foreach(var account in accounts){
Console.WriteLine($"{account.accountCD}: {account.description}");
}
int contextId = 123456;
string token = "b38e817c-d0f1-a034-b4c3-2959934a7b02";
dynamic vismaNet = new VismaNet(contextId, token);
var account = await vismaNet.Account.Get("1920");
Console.WriteLine($"{account.accountCD}: {account.description}");