Skip to content

Instantly share code, notes, and snippets.

@tristanpendergrass
Created December 4, 2014 13:41
Show Gist options
  • Save tristanpendergrass/91bb587685bdb231fceb to your computer and use it in GitHub Desktop.
Save tristanpendergrass/91bb587685bdb231fceb to your computer and use it in GitHub Desktop.
module.exports = SkuItem = function SkuItem (initData) {
if (initData) {
this.populateFromNeoData(initData);
}
};
SkuItem.prototype.populateFromNeoData = function (data) {
this.price = '50';
this.name = 'foo bar';
this.data = data;
};
SkuItem.prototype.toJson = function () {
return {
price: this.price,
name: this.name,
data: this.data
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment