UNPKG

@magic.batua/points

Version:

The Points module powers the loyalty points features of the Magic Batua platform.

28 lines 879 B
"use strict"; // // Ledger.ts // Magic-Point // // Created on February 18, 2018 by Animesh Mishra <hello@animesh.ltd> // © 2018 Magic Batua. All Rights Reserved. // Object.defineProperty(exports, "__esModule", { value: true }); const Transaction_1 = require("./Transaction"); class Ledger { constructor(balanceInfo, transactions) { this.transactions = new Array(); this.issued = balanceInfo.issued; this.expired = balanceInfo.expired; this.available = balanceInfo.available; this.exhausted = balanceInfo.exhausted; this.redeemed = balanceInfo.redeemed; // this.InitTransactions(transactions) } InitTransactions(json) { for (let entry of json) { this.transactions.push(new Transaction_1.Transaction(entry)); } } } exports.Ledger = Ledger; //# sourceMappingURL=Ledger.js.map