UNPKG

afrimomo-sdk

Version:

A unified SDK for African payment providers

21 lines 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PawapayWallets = void 0; const serviceWrapper_1 = require("../../utils/serviceWrapper"); const logger_1 = require("../../utils/logger"); class PawapayWallets { network; constructor(network) { this.network = network; } async getAllBalances() { logger_1.logger.info("PawaPay: Getting all wallet balances"); return (0, serviceWrapper_1.wrapServiceCall)(() => this.network.get("/wallet-balances", "retrieving all wallet balances"), this.network.handleApiError.bind(this.network), "retrieving all wallet balances"); } async getCountryBalance(country) { logger_1.logger.info("PawaPay: Getting wallet balance", { country }); return (0, serviceWrapper_1.wrapServiceCall)(() => this.network.get(`/wallet-balances/${country}`, `retrieving wallet balance for ${country}`), this.network.handleApiError.bind(this.network), `retrieving wallet balance for ${country}`); } } exports.PawapayWallets = PawapayWallets; //# sourceMappingURL=wallets.js.map