SampleMdl

constructor(givenName: String?, familyName: String?, birthDate: String?, documentNumber: String?, issuingAuthority: String?, issuingCountry: String?, portrait: ByteArray?)

The holder's main fields only (Swift: SampleMdl(givenName:familyName:birthDate:documentNumber:issuingAuthority:issuingCountry:portrait:)).


constructor(givenName: String? = null, familyName: String? = null, birthDate: String? = null, documentNumber: String? = null, issuingAuthority: String? = null, issuingCountry: String? = null, portrait: ByteArray? = null, values: Map<String, String> = emptyMap(), signature: ByteArray? = null)

Parameters

givenName

the holder's given names (given_name).

familyName

the holder's family name (family_name).

birthDate

date of birth as YYYY-MM-DD (birth_date); the age elements follow it.

documentNumber

the licence number printed on the card (document_number).

issuingAuthority

who issued it, e.g. a licensing authority's name (issuing_authority).

issuingCountry

ISO 3166-1 alpha-2 code, e.g. "SG" (issuing_country).

portrait

the holder's photo as JPEG bytes (portrait).

values

any other org.iso.18013.5.1 element by its ISO name, as text, e.g. "nationality", "resident_city", "sex" ("1" male, "2" female), "given_name_national_character" (the name in the holder's own script, e.g. Arabic). Each is stored as the element's kind, like addSampleCredential values; an unknown element or a value that doesn't parse fails with PARSE. Applied last, so they also override the fields above and the age elements.

signature

the holder's signature image as PNG or JPEG bytes (signature_usual_mark).