UNPKG

amberflo-metering-typescript

Version:
21 lines 726 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MeterMessage = void 0; const uuid_1 = require("uuid"); class MeterMessage { constructor(meterApiName, meterValue, meterTimeInMillis, customerId, dimensions) { this.uniqueId = (0, uuid_1.v1)(); this.meterApiName = meterApiName; this.meterValue = meterValue; this.meterTimeInMillis = meterTimeInMillis; this.customerId = customerId; if (dimensions) { this.dimensions = {}; dimensions.forEach((value, key) => { this.dimensions[key] = value; }); } } } exports.MeterMessage = MeterMessage; //# sourceMappingURL=meterMessage.js.map