export class Contact { constructor ( public id = null , public firstName = '' , public lastName = '' , public image = '' , public skype = '' , public twitter = '' , public notes = '' ) { } static fromJson ( json ) { if ( ! json ) return ; return new Contact ( json . id , json . first_name , json . last_name , json . image_url , json . skype , json . twitter , json . notes ) ; } toJson ( stringify ? ) { var doc = { id : this . id , first_name : this . firstName , last_name : this . lastName , image_url : this . image , skype : this . skype , twitter : this . twitter , notes : this . notes } ; return stringify ? JSON . stringify ( { resource : [ doc ] } ) : doc ; } }