@hachther/mesomb
Version:
JS client for browser to perform mobile payment operation with MeSomb
40 lines (39 loc) • 1.43 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* WalletTransaction model
*
* @property {string} id - The transaction's id
* @property {string} status - The transaction's status
* @property {string} type - The transaction's type
* @property {number} amount - The transaction's amount
* @property {-1 | 1} direction - The transaction's direction
* @property {string} wallet - The transaction's wallet
* @property {number} balanceAfter - The balance after the transaction
* @property {Date} date - The transaction's date
* @property {string} country - The transaction's country
* @property {string} finTrxId - The transaction's financial transaction id
*/
var WalletTransaction = /** @class */ (function () {
function WalletTransaction(data) {
this.data = data;
this.id = data.id;
this.status = data.status;
this.type = data.type;
this.amount = data.amount;
this.direction = data.direction;
this.wallet = data.wallet;
this.balanceAfter = data.balance_after;
this.date = new Date(data.ts);
this.country = data.country;
this.finTrxId = data.fin_trx_id;
}
/**
* @return {Record<string, any>} data from the server
*/
WalletTransaction.prototype.getData = function () {
return this.data;
};
return WalletTransaction;
}());
exports.default = WalletTransaction;