UNPKG

@regulaforensics/document-reader

Version:

This is an npm module for Regula Document Reader SDK. It allows you to read various kinds of identification documents using your phone's camera.

36 lines (29 loc) 847 B
import { PAAttribute } from "./PAAttribute"; export class PAResourcesIssuer { data friendlyName attributes constructor() { this.attributes = [] } static fromJson(jsonObject) { if (jsonObject == null) return null const result = new PAResourcesIssuer() result.data = jsonObject["data"] result.friendlyName = jsonObject["friendlyName"] for (const item of jsonObject["attributes"]) { const attribute = PAAttribute.fromJson(item) if (attribute != null) { result.attributes.push(attribute) } } return result } toJson() { return { "data": this.data, "friendlyName": this.friendlyName, "attributes": this.attributes?.map(e => e.toJson()), } } }