Toolkit Nuget Config

It will be useful to the developers to configure the nuget package to their integrations.

Nuget Installation Nuget Usage

Overview

Toolkit NuGet is a package manager that delivers compiled source code (DLLs) and other files (scripts and images) related to code. This makes adding, updating, and removing libraries easily in Visual Studio applications. Using NuGet package manager to install and update packages, it reduces the manual work of configuring third-party libraries in an application by installing a setup or extracting a zip file and adding the required assemblies to reference it.
To configure Nuget package in your application, you need to follow below steps.
Step 1:
Create your own .Net application, which will consume the nuget package.

To see an example on how to use the nuget package, Download this Sample Application and extract it to your desired windows location.

Step 2:
Sample Prod configuration url’s filled here.
Click here to know more about other environment’s and their configuration url’s.
Here are the details of the config attributes and the sample inputs
Add configuration section to appsettings.json
PosSerialNumber - This config value to be filled with your POS Serial number value and it should be the equal value in all the configurations.
Toolkit will only support single point of sale integration not for the multiple point of sale integrations.

LocalConnectionsString - connection string of sqlite database
IdentityServiceUrl - EtaConfig identity service url to acquire access token
InvoicingServiceBaseUrl - EtaConfig invoicing service base url, will be used while submission and syncing receipts
InvoicingPortalBaseUrl - EtaConfig invoicing portal base url, will be used while generation of QR codes
InvoicingServiceVersion - EtaConfig version of invoicing service
PosSerial - EtaConfig mapped POS Serial number while integration
 "ToolkitConfig":
 {
  "LocalConnectionsString": "Data Source=D:\LocalReceipts.db;",
 "EtaConfig":
 {
   "IdentityServiceUrl": "https://id.eta.gov.eg/connect/token",
   "InvoicingServiceBaseUrl": "https://api.invoicing.eta.gov.eg",
   "InvoicingPortalBaseUrl": "https://invoicing.eta.gov.eg",
   "InvoicingServiceVersion": "1",
   "PosSerial": "__PosSerialNumber__"
 }
 }

Note! appsettings config values need to be modified as per the environment.

By default, Visual Studio is configured with the Public NuGet feed link.
Step 3:
In Visual Studio, go to Tools > Nuget Package Manager > Manage NuGet Pacakages for Solution… and then select ETA.eReceipt.IntegrationToolkit from browse tab which is under the NuGet Package Manager windows.

Reference toolkit package
Step 4:

Find the ETA.eReceipt.IntegrationToolkit toolkit package from Package manager

Reference toolkit package

Once the package successfully referenced to the project, it can be identified from Dependencies > Packages > ETA.eReceipt.IntegrationToolkit package

Referenced toolkit package