DeliveryNote.GenerateGroupQRCode Method

Generate a single QR Code for multiple Delivery Notes
Public Function GenerateGroupQRCode( _ 
ByVal QRUrls As List(Of String), _ 
Optional ByVal GreekErrors As Boolean = False _ 
) As Dictionary(Of String, String)
This language is not supported or no code example is available.
public Dictionary<string, string> GenerateGroupQRCode( 
List<string> QRUrls
bool GreekErrors = False 
)
This language is not supported or no code example is available.

Parameters

QRUrls
List<string>

The QR URLs that will be merged into one (at least 2), as List(Of String)

GreekErrors
bool

Determines if the error will be returned in Greek or not.

Return Value

Dictionary<string, string>

Returns a dictionary containing the fields: 
QRURL: The new QR URL that includes all the specified Delivery Notes. 
qrUrlsCount: The total count of the URLs that have been merged into one. 
expiresAt: The UTC date and time when this QR Code expires. 
 
or the dictionary will contain the corresponding errors.

Example
 
 DeliveryNote del = new DeliveryNote("AADEUserID", "OcpApimSubscriptionKey", "Arbitrans User", "Arbitrans Key", false);
 var qrs = new List<string>();
 qrs.Clear();
 qrs.Add("https://mydataapidev.aade.gr/TimologioQR/QRInfo?q=1jRnA50t2x%2b5GmIQx6d3Y%2fxAEc");
 qrs.Add("https://mydataapidev.aade.gr/TimologioQR/QRInfo?q=1jRnA50t2x%2b5GmIQx6d3YxHxMA8A");
 
 Dictionary<string, string> result = del.GenerateGroupQRCode(qrs);
 string exp = del.ExportDataForValidation();
 
 if (result.ContainsKey("QRURL")) // Verify that the new URL is created
 {
     string NewURL = result["QRURL"];
     int MergedURLS = Convert.ToInt32(result["qrUrlsCount"]);
     var ExpiresAt = DateTime.ParseExact(result["expiresAt"], "yyyy-MM-ddTHH:mm:ss'Z'", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal);
     var localDateTime = ExpiresAt.ToLocalTime(); // Convert the ExpiresAt DateTime to local time.
 }
 else
 {
     // Handle the errors accordingly.
 }
 					
This language is not supported or no code example is available.
 Dim del As DeliveryNote = New DeliveryNote("AADEUserID", "OcpApimSubscriptionKey", "Arbitrans User", "Arbitrans Key", False)
 Dim qrs As New List(Of String) 'Initialize a new List of String
 qrs.Clear() 'Clear the list
 'Add the URLs you want to merge
 qrs.Add("https://mydataapidev.aade.gr/TimologioQR/QRInfo?q=1jRnA50t2x%2b5GmIQx6d3Y%2fxAEc")
 qrs.Add("https://mydataapidev.aade.gr/TimologioQR/QRInfo?q=1jRnA50t2x%2b5GmIQx6d3YxHxMA8A")
 
 Dim result As Dictionary(Of String, String) = del.GenerateGroupQRCode(qrs)
 Dim exp As String = del.ExportDataForValidation()
 
 If result.ContainsKey("QRURL") Then 'Verify that the new URL is created
     Dim NewURL As String = result("QRURL")
     Dim MergedURLS As Integer = Convert.ToInt32(result("qrUrlsCount"))
     Dim ExpiresAt As DateTime = DateTime.ParseExact(result("expiresAt"), "yyyy-MM-ddTHH:mm:ss'Z'", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal Or DateTimeStyles.AdjustToUniversal)
     Dim localDateTime As DateTime = ExpiresAt.ToLocalTime() 'Convert the ExpiresAt DateTime to local time.
 Else
     'Handle the errors accordingly.
 End If
 					
This language is not supported or no code example is available.

.NET Framework

Supported in: 3.5 or newer

In this article

Definition