mindee
Version:
Mindee Client Library for Node.js
35 lines (34 loc) • 1.15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BankAccountDetailsV1Document = void 0;
const common_1 = require("../../../parsing/common");
const standard_1 = require("../../../parsing/standard");
/**
* Bank Account Details API version 1.0 document data.
*/
class BankAccountDetailsV1Document {
constructor(rawPrediction, pageId) {
this.accountHolderName = new standard_1.StringField({
prediction: rawPrediction["account_holder_name"],
pageId: pageId,
});
this.iban = new standard_1.StringField({
prediction: rawPrediction["iban"],
pageId: pageId,
});
this.swift = new standard_1.StringField({
prediction: rawPrediction["swift"],
pageId: pageId,
});
}
/**
* Default string representation.
*/
toString() {
const outStr = `:IBAN: ${this.iban}
:Account Holder's Name: ${this.accountHolderName}
:SWIFT Code: ${this.swift}`.trimEnd();
return (0, common_1.cleanOutString)(outStr);
}
}
exports.BankAccountDetailsV1Document = BankAccountDetailsV1Document;