EConnect.Psb
0.1.20
See the version list below for details.
dotnet add package EConnect.Psb --version 0.1.20
NuGet\Install-Package EConnect.Psb -Version 0.1.20
<PackageReference Include="EConnect.Psb" Version="0.1.20" />
paket add EConnect.Psb --version 0.1.20
#r "nuget: EConnect.Psb, 0.1.20"
// Install EConnect.Psb as a Cake Addin #addin nuget:?package=EConnect.Psb&version=0.1.20 // Install EConnect.Psb as a Cake Tool #tool nuget:?package=EConnect.Psb&version=0.1.20
EConnect PSB .NET Client
A reference implementation meant as an example how to use the PSB api using C#.
The Procurement Service Bus (PSB) provides a cloud managed connection to eDelivery networks like the Peppol network.
Requirements
- .NET Core 2.0 or higher / .NET Framework 4.6.1 or higher
Install
Go through the Getting started documentation.
Install the package in your project, through nuget or another tool of choice.
Install-Package EConnect.Psb
API references
For the API you can refer to the following documentation.
Setup
Make sure to initialise the service and setup the proper authentication.
Hostbuilder
The recommended way to setup the PSB apis is by using the hostbuilder so you could get the advantages of the dependency injection framework.
builder.Services.AddPsbService(_ =>
{
_.Username = "{username}";
_.Password = "{password}";
_.PsbUrl = "{psbUrl}";
_.IdentityUrl = "{identityUrl}";
_.ClientId = "{clientId}";
_.ClientSecret = "{clientSecret}";
_.SubscriptionKey = "{SubscriptionKey}";
});
After the PsbService is intialized you can use the following apis:
- IPsbMeApi
- IPsbHookApi
- IPsbPeppolApi
- IPsbPurchaseInvoiceApi
- IPsbPurchaseOrderApi
- IPsbSalesInvoiceApi
- IPsbSalesOrderApi
- IPsbGenericApi
You could now for example inject the sales invoice api into your controller:
public YourController(IPsbSalesInvoiceApi salesInvoice)
{
_salesInvoice = salesInvoice;
}
All api interfaces are public which makes it possible to mock them.
Example (web) hostbuilder
An example of the hosthuilder can be found in the project EConnect.Psb.Web.Example
. In this project the .net client
can be used to send an invoice via Peppol
.
Additionally, the supplied webhook receiver
shows a simple implementation to receive invoices from Peppol
.
PsbServiceHost
Use the PsbServiceHost when you are not able to use a dependency framework.
using (var psb = PsbServiceHost.Create(_ =>
{
_.Username = "{username}";
_.Password = "{password}";
_.PsbUrl = "{psbUrl}";
_.IdentityUrl = "{identityUrl}";
_.ClientId = "{clientId}";
_.ClientSecret = "{clientSecret}";
_.SubscriptionKey = "{SubscriptionKey}";
}
))
{
// Example for QueryRecipientParty
var res = await psb.SalesInvoice.QueryRecipientParty("{senderPartyId}", new[] { "{receiverPartyId}" });
Console.WriteLine(res);
}
Example console application
An example of the PsbServiceHost can be found in the project EConnect.Psb.ConsoleNet.Example
.
Read more
If you want to know more about Peppol e-procurement or other procurement network the go to the Procurement Service Bus introduction page
.
Product | Versions 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. |
-
.NETStandard 2.0
- IdentityModel (>= 6.0.0)
- Microsoft.Extensions.Http (>= 6.0.0)
- Microsoft.Extensions.Options (>= 6.0.0)
- System.Net.Http.Json (>= 6.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on EConnect.Psb:
Package | Downloads |
---|---|
EConnect.Psb.AspNetCore.Mvc
The offical .NET C# API client for the eConnect Procurement Service Bus (PSB) for Asp.NetCore MVC |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.9.31 | 164 | 6/11/2024 |
0.9.30 | 139 | 6/8/2024 |
0.9.29 | 176 | 4/4/2024 |
0.9.28 | 174 | 3/7/2024 |
0.9.27 | 270 | 6/7/2023 |
0.9.26 | 448 | 2/1/2023 |
0.9.25 | 675 | 6/20/2022 |
0.9.24 | 661 | 5/4/2022 |
0.1.23 | 407 | 5/2/2022 |
0.1.22 | 423 | 4/10/2022 |
0.1.21 | 412 | 3/30/2022 |
0.1.20 | 390 | 3/21/2022 |
0.1.19 | 393 | 3/15/2022 |
0.1.18 | 413 | 3/14/2022 |
0.1.17 | 431 | 3/14/2022 |
0.1.16 | 411 | 3/11/2022 |