import { Client } from './client.model'; import { Organization } from '../organization/organization.model'; export class ClientDeserializer { public deserialize(json: {[key: string]: any}): Client { const client: Client = new Client(); client.id = json['id']; client.name = json['name']; client.email = json['email']; client.phone = json['phone_number']; client.organization = new Organization(); client.organization.id = json['organization_id']; client.leads = []; return client; } }