toUri
Builds the GS1 Digital Link URI for message.
The first primary key AI of the message (in element order) goes first in the path, followed by the longest allowed sequence of its qualifiers present in the message. The remaining AIs become query parameters, predefined-length AIs first.
Parameters
domain
scheme, domain and optional path prefix, e.g. https://example.com or https://example.com/gs1. An uppercase domain such as HTTPS://EXAMPLE.COM gives a smaller QR Code.
Throws
if there is no primary key or an AI cannot be a query parameter.