UNPKG

camtts

Version:
149 lines (148 loc) 6.09 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var Entry_1 = require("./Entry"); var Base_1 = require("./Base"); var Report = /** @class */ (function (_super) { __extends(Report, _super); function Report() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(Report.prototype, "id", { get: function () { var _a, _b; return (_b = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('Id')[0]) === null || _b === void 0 ? void 0 : _b.textContent; }, enumerable: true, configurable: true }); Object.defineProperty(Report.prototype, "electronicSequenceNumber", { get: function () { var _a, _b; return (_b = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('ElctrncSeqNb')[0]) === null || _b === void 0 ? void 0 : _b.textContent; }, enumerable: true, configurable: true }); Object.defineProperty(Report.prototype, "creationDateTime", { get: function () { var _a, _b; return (_b = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('CreDtTm')[0]) === null || _b === void 0 ? void 0 : _b.textContent; }, enumerable: true, configurable: true }); Object.defineProperty(Report.prototype, "account", { get: function () { var _a; return new Account((_a = this.element) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('Acct')[0]); }, enumerable: true, configurable: true }); Object.defineProperty(Report.prototype, "entries", { get: function () { var _a; var entries = []; var elements = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('Ntry'); if (typeof elements !== "undefined") { for (var i = 0; i < elements.length; i++) { var element = elements.item(i); if (element !== null) { entries.push(new Entry_1.Entry(element)); } } } return entries; }, enumerable: true, configurable: true }); return Report; }(Base_1.CAMTElement)); exports.Report = Report; var Account = /** @class */ (function (_super) { __extends(Account, _super); function Account() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(Account.prototype, "id", { get: function () { var _a, _b, _c; var idElem = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('Id')[0]; return { iban: (_c = (_b = idElem) === null || _b === void 0 ? void 0 : _b.getElementsByTagName('IBAN')[0]) === null || _c === void 0 ? void 0 : _c.textContent }; }, enumerable: true, configurable: true }); Object.defineProperty(Account.prototype, "currency", { get: function () { var _a, _b; return (_b = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('Ccy')[0]) === null || _b === void 0 ? void 0 : _b.textContent; }, enumerable: true, configurable: true }); Object.defineProperty(Account.prototype, "servicer", { get: function () { var _a; return new Servicer((_a = this.element) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('Svcr')[0]); }, enumerable: true, configurable: true }); return Account; }(Base_1.CAMTElement)); exports.Account = Account; var Servicer = /** @class */ (function (_super) { __extends(Servicer, _super); function Servicer() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(Servicer.prototype, "financialInstitutionId", { get: function () { var _a; return new FinancialInstitutionId((_a = this.element) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('FinInstnId')[0]); }, enumerable: true, configurable: true }); return Servicer; }(Base_1.CAMTElement)); exports.Servicer = Servicer; var FinancialInstitutionId = /** @class */ (function (_super) { __extends(FinancialInstitutionId, _super); function FinancialInstitutionId() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(FinancialInstitutionId.prototype, "bic", { get: function () { var _a, _b; return (_b = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('BIC')[0]) === null || _b === void 0 ? void 0 : _b.textContent; }, enumerable: true, configurable: true }); Object.defineProperty(FinancialInstitutionId.prototype, "name", { get: function () { var _a, _b; return (_b = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getElementsByTagName('Nm')[0]) === null || _b === void 0 ? void 0 : _b.textContent; }, enumerable: true, configurable: true }); return FinancialInstitutionId; }(Base_1.CAMTElement)); exports.FinancialInstitutionId = FinancialInstitutionId;