UNPKG

mindee

Version:

Mindee Client Library for Node.js

41 lines (40 loc) 1.47 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BankAccountDetailsV2Document = void 0; const common_1 = require("../../../parsing/common"); const bankAccountDetailsV2Bban_1 = require("./bankAccountDetailsV2Bban"); const standard_1 = require("../../../parsing/standard"); /** * Bank Account Details API version 2.0 document data. */ class BankAccountDetailsV2Document { constructor(rawPrediction, pageId) { this.accountHoldersNames = new standard_1.StringField({ prediction: rawPrediction["account_holders_names"], pageId: pageId, }); this.bban = new bankAccountDetailsV2Bban_1.BankAccountDetailsV2Bban({ prediction: rawPrediction["bban"], pageId: pageId, }); this.iban = new standard_1.StringField({ prediction: rawPrediction["iban"], pageId: pageId, }); this.swiftCode = new standard_1.StringField({ prediction: rawPrediction["swift_code"], pageId: pageId, }); } /** * Default string representation. */ toString() { const outStr = `:Account Holder's Names: ${this.accountHoldersNames} :Basic Bank Account Number: ${this.bban.toFieldList()} :IBAN: ${this.iban} :SWIFT Code: ${this.swiftCode}`.trimEnd(); return (0, common_1.cleanOutString)(outStr); } } exports.BankAccountDetailsV2Document = BankAccountDetailsV2Document;