UNPKG

ogenzo-widgets

Version:
28 lines (27 loc) 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OgenzoWidgets = void 0; const payments_1 = require("./payments"); const sms_1 = require("./sms"); const email_1 = require("./email"); class OgenzoWidgets { constructor(widgetsConfig) { if (widgetsConfig.paymentConfig) { this.email = widgetsConfig.paymentConfig.email; this.password = widgetsConfig.paymentConfig.password; this.airtelWallet = widgetsConfig.paymentConfig.airtelWallet; this.mtnWallet = widgetsConfig.paymentConfig.mtnWallet; this.payments = new payments_1.OgenzoPayment(widgetsConfig.paymentConfig.email, widgetsConfig.paymentConfig.password, widgetsConfig.paymentConfig.airtelWallet, widgetsConfig.paymentConfig.mtnWallet); } if (widgetsConfig.smsConfig) { this.username = widgetsConfig.smsConfig.username; this.smsApiKey = widgetsConfig.smsConfig.apiKey; this.sms = new sms_1.OgenzoSMS(widgetsConfig.smsConfig.username, widgetsConfig.smsConfig.apiKey); } if (widgetsConfig.emailConfig) { this.emailApiKey = widgetsConfig.emailConfig.apiKey; this.mail = new email_1.OgenzoMail(this.emailApiKey); } } } exports.OgenzoWidgets = OgenzoWidgets;