cecon-interfaces
Version:
Interfaces de Projetos Cecon
100 lines (99 loc) • 3.76 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TabCustomerEntity = exports.TabCustomerItemDiscountEntity = exports.TabCustomerNotificationPreferencesEntity = exports.TabCustomerNotificationChannelPreferencesEntity = void 0;
var general_1 = require("../../../general");
var tab_billing_cycle_enum_1 = require("../enums/tab-billing-cycle.enum");
var TabCustomerNotificationChannelPreferencesEntity = /** @class */ (function () {
function TabCustomerNotificationChannelPreferencesEntity(data) {
this.newSale = true;
this.payment = true;
this.dueDate = true;
if (data) {
for (var key in data) {
if (data.hasOwnProperty(key) && key in this) {
this[key] = data[key];
}
}
}
}
return TabCustomerNotificationChannelPreferencesEntity;
}());
exports.TabCustomerNotificationChannelPreferencesEntity = TabCustomerNotificationChannelPreferencesEntity;
var TabCustomerNotificationPreferencesEntity = /** @class */ (function () {
function TabCustomerNotificationPreferencesEntity(data) {
this.whatsapp = new TabCustomerNotificationChannelPreferencesEntity();
this.email = new TabCustomerNotificationChannelPreferencesEntity({
newSale: false,
payment: false,
dueDate: false,
});
if (data) {
for (var key in data) {
if (data.hasOwnProperty(key) && key in this) {
this[key] = data[key];
}
}
}
}
return TabCustomerNotificationPreferencesEntity;
}());
exports.TabCustomerNotificationPreferencesEntity = TabCustomerNotificationPreferencesEntity;
var TabCustomerItemDiscountEntity = /** @class */ (function () {
function TabCustomerItemDiscountEntity(data) {
this.productId = 0;
this.discountPercent = null;
this.discountAmount = null;
this.surchargePercent = null;
this.surchargeAmount = null;
if (data) {
for (var key in data) {
if (data.hasOwnProperty(key) && key in this) {
this[key] = data[key];
}
}
}
}
return TabCustomerItemDiscountEntity;
}());
exports.TabCustomerItemDiscountEntity = TabCustomerItemDiscountEntity;
var TabCustomerEntity = /** @class */ (function () {
function TabCustomerEntity(data) {
this.id = '';
this.containerId = '';
this.companyId = '';
this.name = '';
this.doc = '';
this.docType = general_1.EDocType.CPF;
this.externalRef = null;
this.email = null;
this.phoneNumber = null;
this.internationalCode = null;
this.address = null;
this.billingCycle = tab_billing_cycle_enum_1.ETabBillingCycle.MONTHLY;
this.creditLimit = 0;
this.requiresAuthCode = false;
this.authCodeHash = null;
this.blocked = false;
this.blockedReason = null;
this.discountPercent = 0;
this.surchargePercent = 0;
this.itemDiscounts = [];
this.notificationPreferences = new TabCustomerNotificationPreferencesEntity();
this.callbacks = [];
this.activeInvoiceId = null;
this.invoiceSequence = 0;
this.tags = [];
this.active = true;
this.createdAt = new Date();
this.updatedAt = new Date();
if (data) {
for (var key in data) {
if (data.hasOwnProperty(key) && key in this) {
this[key] = data[key];
}
}
}
}
return TabCustomerEntity;
}());
exports.TabCustomerEntity = TabCustomerEntity;