export enum ContactInfoTypes { home , work , mobile } export class ContactInfo { constructor ( public id = null , public contactId = null , public address = null , public city = null , public state = null , public zip = null , public country = null , public email = null , public infoType = null , public phone = null ) { } static fromJson ( json ) { if ( ! json ) return ; return new ContactInfo ( json . id , json . contact_id , json . address , json . city , json . state , json . zip , json . country , json . email , json . info_type , json . phone ) ; } toJson ( stringify ? ) { var doc = { id : this . id , contact_id : this . contactId , address : this . address , city : this . city , state : this . state , zip : this . zip , country : this . country , email : this . email , info_type : this . infoType , phone : this . phone } ; return stringify ? JSON . stringify ( { resource : [ doc ] } ) : doc ; } }