UNPKG

cecon-interfaces

Version:
66 lines (65 loc) 2.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InvoiceEntity = void 0; var general_1 = require("../../general"); var enums_1 = require("../enums"); var invoice_payer_entity_1 = require("./invoice-payer.entity"); var InvoiceEntity = /** @class */ (function () { // #endregion Properties (43) // #region Constructors (1) function InvoiceEntity(data) { // #region Properties (43) this.addition = 0; this.bankSlip = null; this.bankSlipExtraDue = 3; this.ccEmails = []; this.companyId = ''; this.containerId = ''; this.createdAt = new Date(); this.creditCard = null; this.currency = 'BRL'; this.customerId = null; this.discount = 0; this.dueDateAt = new Date(Date.now() + 3 * 24 * 60 * 60 * 1000); this.email = ''; this.ensureDueOnWorkday = true; this.externalInvoiceId = ''; this.externalInvoiceUrl = ''; this.id = ''; this.items = []; this.logs = []; this.notes = ''; this.notificationUrl = ''; this.orderId = ''; this.orders = []; this.paidAt = null; this.partnerId = ''; this.password = null; this.payer = new invoice_payer_entity_1.InvoicePayerEntity(); this.paymentMethod = general_1.EPaymentType.NONE; this.paymentProvider = null; this.phoneNumbersNotification = []; this.pix = null; this.returnExpiredUrl = ''; this.returnUrl = ''; this.sandbox = false; this.status = enums_1.EInvoiceStatus.DRAFT; this.subTotal = 0; this.subscriptionId = ''; this.totalAmount = 0; this.totalFee = 0; this.totalOverPaid = 0; this.totalPaid = 0; this.totalRefunded = 0; this.updatedAt = new Date(); if (data) { for (var key in data) { if (data.hasOwnProperty(key) && key in this) { this[key] = data[key]; } } } } return InvoiceEntity; }()); exports.InvoiceEntity = InvoiceEntity;