Skip to content

Commit 258baa3

Browse files
authored
Merge pull request #10 from Moesif/add-direction-field-to-event
Add: direction field to Event Model
2 parents 4cc28b6 + 8e1f859 commit 258baa3

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

lib/Models/EventModel.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ var EventModel = function (obj) {
2121
this.userId = null;
2222
this.companyId = null;
2323
this.metadata = null;
24+
this.direction = null;
2425
//Append to variable dictionary
2526
this._variableDict['sessionToken'] = 'session_token';
2627
this._variableDict['userId'] = 'user_id';
@@ -33,6 +34,7 @@ var EventModel = function (obj) {
3334
this.userId = obj.userId;
3435
this.companyId = obj.companyId;
3536
this.metadata = obj.metadata;
37+
this.direction = obj.direction;
3638
//Append to variable dictionary
3739
this._variableDict['sessionToken'] = 'session_token';
3840
this._variableDict['userId'] = 'user_id';
@@ -170,5 +172,22 @@ EventModel.prototype.setMetadata = function(value) {
170172
this.metadata = value;
171173
};
172174

175+
/**
176+
* direction string
177+
*
178+
* @return {string|null}
179+
*/
180+
EventModel.prototype.getDirection = function() {
181+
return this.direction;
182+
};
183+
184+
/**
185+
* Setter for direction
186+
*
187+
* @param {string|null} value
188+
*/
189+
EventModel.prototype.setDirection = function(value) {
190+
this.direction = value;
191+
};
173192

174193
module.exports = EventModel;

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "moesifapi",
3-
"version": "2.0.5",
3+
"version": "2.0.6",
44
"description": "Collection/Data Ingestion API for Moesif",
55
"main": "./lib/index.js",
66
"keywords": [

0 commit comments

Comments
 (0)