UNPKG

@magic.batua/recharge

Version:

The Recharge module manages all the mobile prepaid, datacard and DTH recharge functionalities of the Magic Batua platform.

35 lines 1.08 kB
"use strict"; /** * @module MobilePlan * @overview Defines the `MobilePlan` class. * * @author Animesh Mishra <hello@animesh.ltd> * @copyright © Animesh Ltd. All Rights Reserved. */ Object.defineProperty(exports, "__esModule", { value: true }); /** * A `MobilePlan` is a prepaid mobile plan that user may opt for * instead of a straight up account top-up. * * Plans are operator and circle-specific and are requested on the * customer's behalf before each recharge request. Plans are never * stored in our databases. */ class MobilePlan { constructor(json) { this.amount = Number(json.amount); this.type = json.plan_type; this.talktime = Number(json.talktime); this.validity = json.validity; this.details = json.remark; } static InitFromList(plans) { let mobilePlans = Array(); for (var plan of plans) { mobilePlans.push(new MobilePlan(plan)); } return mobilePlans; } } exports.MobilePlan = MobilePlan; //# sourceMappingURL=MobilePlan.js.map