@hachther/mesomb
Version:
JS client for browser to perform mobile payment operation with MeSomb
49 lines (48 loc) • 1.45 kB
TypeScript
/**
* 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
*/
export default class Wallet {
private readonly data;
id: number;
number: string;
country: string;
status: string;
lastActivity?: Date;
balance?: number;
firstName?: string;
lastName: string;
email?: string;
phoneNumber: string;
gender: 'MAN' | 'WOMAN';
constructor(data: {
identifier: number;
status: string;
first_name: string;
last_name: string;
email: string;
phone_number: string;
country: string;
gender: 'MAN' | 'WOMAN';
number: string;
last_activity?: string;
balance?: number;
});
/**
* @return: data from the server
*
* @returns {Record<string, any>}
*/
getData(): Record<string, any>;
}