UNPKG

react-native-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS

283 lines (239 loc) 7.19 kB
/// Auto-generated. Modifications will be overwritten. /// Generated from core/document-schemas/CheckDocumentModel.yaml /// All possible root document types. export const CheckDocumentType = 'Check'; export const USACheckDocumentType = 'USACheck'; export const UAECheckDocumentType = 'UAECheck'; export const FRACheckDocumentType = 'FRACheck'; export const ISRCheckDocumentType = 'ISRCheck'; export const KWTCheckDocumentType = 'KWTCheck'; export const AUSCheckDocumentType = 'AUSCheck'; export const INDCheckDocumentType = 'INDCheck'; export const CANCheckDocumentType = 'CANCheck'; export const UnknownCheckDocumentType = 'UnknownCheck'; /** Check Document */ export class Check { get document() { return this._document; } constructor(document) { if (document.type.name !== this.requiredDocumentType()) { throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`); } this._document = document; } /** type of check font */ get fontType() { return this.document.fields.find(f => f.type.name === 'FontType'); } /** Detected raw string */ get rawString() { return this.document.fields.find(f => f.type.name === 'RawString'); } } /** A check compatible with the ASC X9 standard used in the USA */ export class USACheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return USACheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Auxiliary On-Us */ get auxiliaryOnUs() { return this.document.fields.find(f => f.type.name === 'AuxiliaryOnUs'); } /** Transit number */ get transitNumber() { return this.document.fields.find(f => f.type.name === 'TransitNumber'); } } /** A check format commonly used in the United Arab Emirates */ export class UAECheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return UAECheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Cheque number */ get chequeNumber() { return this.document.fields.find(f => f.type.name === 'ChequeNumber'); } /** Routing number */ get routingNumber() { return this.document.fields.find(f => f.type.name === 'RoutingNumber'); } } /** A check format commonly used in France */ export class FRACheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return FRACheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Cheque number */ get chequeNumber() { return this.document.fields.find(f => f.type.name === 'ChequeNumber'); } /** Routing number */ get routingNumber() { return this.document.fields.find(f => f.type.name === 'RoutingNumber'); } } /** A check format commonly used in Israel */ export class ISRCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return ISRCheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Bank number */ get bankNumber() { return this.document.fields.find(f => f.type.name === 'BankNumber'); } /** Branch number */ get branchNumber() { return this.document.fields.find(f => f.type.name === 'BranchNumber'); } /** Cheque number */ get chequeNumber() { return this.document.fields.find(f => f.type.name === 'ChequeNumber'); } } /** A check format commonly used in Kuwait */ export class KWTCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return KWTCheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Cheque number */ get chequeNumber() { return this.document.fields.find(f => f.type.name === 'ChequeNumber'); } /** Sort code */ get sortCode() { return this.document.fields.find(f => f.type.name === 'SortCode'); } } /** A check compatible with the Australian Paper Clearing System cheque standard */ export class AUSCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return AUSCheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Auxiliary domestic */ get auxDomestic() { return this.document.fields.find(f => f.type.name === 'AuxDomestic'); } /** BSB */ get bsb() { return this.document.fields.find(f => f.type.name === 'BSB'); } /** Extra auxiliary domestic */ get extraAuxDomestic() { return this.document.fields.find(f => f.type.name === 'ExtraAuxDomestic'); } /** Transaction code */ get transactionCode() { return this.document.fields.find(f => f.type.name === 'TransactionCode'); } } /** A check compatible with the CTS-2010 standard issued by the Reserve Bank of India in 2012 */ export class INDCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return INDCheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Serial number */ get serialNumber() { return this.document.fields.find(f => f.type.name === 'SerialNumber'); } /** Sort number */ get sortNumber() { return this.document.fields.find(f => f.type.name === 'SortNumber'); } /** Transaction code */ get transactionCode() { return this.document.fields.find(f => f.type.name === 'TransactionCode'); } } /** A check format commonly used in Canada */ export class CANCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return CANCheckDocumentType; } /** Account number */ get accountNumber() { return this.document.fields.find(f => f.type.name === 'AccountNumber'); } /** Bank number */ get bankNumber() { return this.document.fields.find(f => f.type.name === 'BankNumber'); } /** Cheque number */ get chequeNumber() { return this.document.fields.find(f => f.type.name === 'ChequeNumber'); } /** Designation number */ get designationNumber() { return this.document.fields.find(f => f.type.name === 'DesignationNumber'); } /** Transaction code */ get transactionCode() { return this.document.fields.find(f => f.type.name === 'TransactionCode'); } /** Transit number */ get transitNumber() { return this.document.fields.find(f => f.type.name === 'TransitNumber'); } } /** A check that doesn't conform to any supported standard */ export class UnknownCheck extends Check { constructor(document) { super(document); } requiredDocumentType() { return UnknownCheckDocumentType; } } //# sourceMappingURL=CheckDocumentModel.js.map