UNPKG

@hachther/mesomb

Version:

JS client for browser to perform mobile payment operation with MeSomb

46 lines (45 loc) 1.57 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Wallet model * * @property {number} id - The wallet's id generated by MeSomb * @property {string} number - The wallet's number * @property {string} country - The wallet's country * @property {string} status - The wallet's status * @property {Date} [lastActivity] - The wallet's last activity * @property {number} [balance] - The wallet's balance * @property {string} [firstName] - The wallet owner's first name * @property {string} lastName - The wallet owner's last name * @property {string} [email] - The wallet owner's email * @property {string} phoneNumber - The wallet owner's phone number * @property {'MAN' | 'WOMAN'} gender - The wallet owner's gender */ var Wallet = /** @class */ (function () { function Wallet(data) { this.data = data; this.id = data.identifier; this.status = data.status; this.firstName = data.first_name; this.lastName = data.last_name; this.email = data.email; this.phoneNumber = data.phone_number; this.country = data.country; this.gender = data.gender; this.number = data.number; if (data.last_activity) { this.lastActivity = new Date(data.last_activity); } this.balance = data.balance; } /** * @return: data from the server * * @returns {Record<string, any>} */ Wallet.prototype.getData = function () { return this.data; }; return Wallet; }()); exports.default = Wallet;