class Puzzle::Contact

Attributes

address[RW]
area_code[RW]
city[RW]
company_id[RW]
company_name[RW]
country[RW]
email[RW]
firstname[RW]
graveyard_status[RW]
id[RW]
lastname[RW]
owned[RW]
owned_type[RW]
phone[RW]
state[RW]
title[RW]
updated_at[RW]
url[RW]
zip[RW]

Public Class Methods

find(options) click to toggle source

Return a list of contacts

> pageSize: The attribute specifies the maximum number of records to be returned in a request. The system limit and default value is 500.

> firstname: firstname of the contact to be searched

> lastname: last (or family) name of the contact to be searched

> levels: employee rank (e.g. VP, Staff)

> companyName: company for whom contact works (indexed to include Company Name, URL, and ticker symbol)

> email: full email address of the contact to be searched

> View developer.jigsaw.com/documentation/search_and_get_api_guide/6_Data_Keys_and_Values for available search parameter

# File lib/puzzle/contact.rb, line 54
def self.find(options)
  contacts = []
  results = {}
  result = Puzzle::Request.get("/searchContact", options)
  result["contacts"].each do |contact|
    contacts << new(contact)
  end
  results = {
    :total => result["totalHits"],
    :contacts => contacts
  }
end
new(contact_info) click to toggle source
# File lib/puzzle/contact.rb, line 24
def initialize(contact_info)
  @company_id = contact_info["companyId"]
  @id = contact_info["contactId"]
  @title = contact_info["title"]
  @company_name = contact_info["companyName"]
  @updated_at = contact_info["updatedDate"]
  @graveyard_status = contact_info["graveyardStatus"]
  @firstname = contact_info["firstname"]
  @lastname = contact_info["lastname"]
  @city = contact_info["city"]
  @state = contact_info["state"]
  @country = contact_info["country"]
  @zip = contact_info["zip"]
  @url = contact_info["contactURL"]
  @area_code = contact_info["areaCode"]
  @phone = contact_info["phone"]
  @email = contact_info["email"]
  @address = contact_info["address"]
  @owned = contact_info["owned"]
  @owned_type = contact_info["ownedType"]
end