UNPKG

cecon-interfaces

Version:
59 lines (58 loc) 2.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TransactionEntity = void 0; var general_1 = require("../../general"); var natipay_1 = require("../../natipay"); var enums_1 = require("../enums"); var TransactionEntity = /** @class */ (function () { function TransactionEntity(data) { this.balance = null; this.card = {}; this.createdAt = new Date(); this.dateApproved = null; this.dateCreated = new Date(); this.dateLastUpdated = new Date(); this.dateOfExpiration = null; this.description = ''; this.desenfilaInfo = new general_1.DesenfilaInfoEntity(); // TODO: Verificar se é necessário this.externalOrderReference = ''; this.feeDetails = []; this.feePayer = enums_1.EFeePayer.PLATFORM; this.from = general_1.EFrom.NATIPAY; this.id = ''; this.installments = 0; this.liveMode = true; this.mobyoInfo = new general_1.MobyoInfoEntity(); // TODO: Verificar se é necessário this.moneyReleaseDate = null; this.moneyReleaseStatus = enums_1.EReleaseStatus.PENDING; this.natiInfo = new general_1.InfoEntity(); this.operationType = enums_1.EOperationType.REGULAR_PAYMENT; this.payerInfo = new general_1.InfoEntity(); this.paymentMethod = null; this.paymentMethodId = enums_1.EPaymentMethodId.ACCOUNT_MONEY; this.posId = ''; this.provider = enums_1.ETransactionProvider.DEFAULT; this.referenceId = ''; this.resumeVersion = ''; this.saleChannel = natipay_1.ENatipaySaleChannel.NATI_PDV; this.stamped = null; this.status = enums_1.EMpStatus.PENDING; this.statusDetail = enums_1.EMpStatusDetail.ACCREDITED; this.total = null; this.transactionAmount = 0; this.transactionAmountRefunded = 0; this.transactionOperation = enums_1.ETransactionOperation.STAMP_NEEDED; this.transactionStatus = enums_1.ETransactionStatus.PROCESSING; this.transactionTraceIds = []; this.updatedAt = new Date(); if (data) { for (var key in data) { if (data.hasOwnProperty(key) && key in this) { this[key] = data[key]; } } } } return TransactionEntity; }()); exports.TransactionEntity = TransactionEntity;