@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.
34 lines (28 loc) • 874 B
JavaScript
import { Authenticity } from "./Authenticity";
import { AuthenticityElement } from "./AuthenticityElement";
import { CheckResult } from "../status/CheckResult";
export class AuthenticityCheck {
type
status
pageIndex
elements
typeName
constructor() {
this.elements = []
}
static fromJson(jsonObject) {
if (jsonObject == null) return null
const result = new AuthenticityCheck()
result.type = jsonObject["type"]
result.status = jsonObject["status"]
result.typeName = jsonObject["typeName"]
result.pageIndex = jsonObject["pageIndex"]
for (const item of jsonObject["elements"]) {
const element = AuthenticityElement.fromJson(item)
if (element != null) {
result.elements.push(element)
}
}
return result
}
}