Class: Jigsaw::Company

Inherits:
Object
  • Object
show all
Defined in:
lib/jigsaw/company.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json_object) ⇒ Company

Returns a new instance of Company.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/jigsaw/company.rb', line 9

def initialize(json_object)
  @companyId        = json_object['companyId']  
  @name             = json_object['name']         
  @phone            = json_object['phone']        
  @website          = json_object['website']      
  @stockSymbol      = json_object['stockSymbol']  
  @stockExchange    = json_object['stockExchange']
  @ownership        = json_object['ownership']    
  @employeeCount    = json_object['employeeCount']
  @employeeRange    = json_object['employeeRange']
  @revenue          = json_object['revenue']      
  @revenueRange     = json_object['revenueRange'] 
  @industry1        = json_object['industry1']    
  @industry2        = json_object['industry2']    
  @industry3        = json_object['industry3']    
  @subIndustry1     = json_object['subIndustry1'] 
  @subIndustry2     = json_object['subIndustry2'] 
  @subIndustry3     = json_object['subIndustry3'] 
  @sicCode          = json_object['sicCode']      
  @address          = json_object['address']      
  @city             = json_object['city']         
  @state            = json_object['state']        
  @zip              = json_object['zip']          
  @country          = json_object['country']      
  @activeContact    = json_object['activeContact']
  @createdOn        = json_object['createdOn']    
  @linkInJigsaw     = json_object['linkInJigsaw'] 
  @graveyarded      = json_object['graveyarded']  
  @updatedDate      = json_object['updatedDate']  
  @currentWiki      = json_object['currentWiki']
  @currentLogo      = json_object['currentLogo']
end

Instance Attribute Details

#activeContactObject

Returns the value of attribute activeContact.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def activeContact
  @activeContact
end

#addressObject

Returns the value of attribute address.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def address
  @address
end

#cityObject

Returns the value of attribute city.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def city
  @city
end

#companyIdObject

Returns the value of attribute companyId.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def companyId
  @companyId
end

#countryObject

Returns the value of attribute country.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def country
  @country
end

#createdOnObject

Returns the value of attribute createdOn.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def createdOn
  @createdOn
end

#currentLogoObject

Returns the value of attribute currentLogo.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def 
  @currentLogo
end

#currentWikiObject

Returns the value of attribute currentWiki.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def currentWiki
  @currentWiki
end

#employeeCountObject

Returns the value of attribute employeeCount.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def employeeCount
  @employeeCount
end

#employeeRangeObject

Returns the value of attribute employeeRange.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def employeeRange
  @employeeRange
end

#graveyardedObject

Returns the value of attribute graveyarded.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def graveyarded
  @graveyarded
end

#industry1Object

Returns the value of attribute industry1.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def industry1
  @industry1
end

#industry2Object

Returns the value of attribute industry2.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def industry2
  @industry2
end

#industry3Object

Returns the value of attribute industry3.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def industry3
  @industry3
end

#linkInJigsawObject

Returns the value of attribute linkInJigsaw.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def linkInJigsaw
  @linkInJigsaw
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def name
  @name
end

#ownershipObject

Returns the value of attribute ownership.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def ownership
  @ownership
end

#phoneObject

Returns the value of attribute phone.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def phone
  @phone
end

#revenueObject

Returns the value of attribute revenue.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def revenue
  @revenue
end

#revenueRangeObject

Returns the value of attribute revenueRange.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def revenueRange
  @revenueRange
end

#sicCodeObject

Returns the value of attribute sicCode.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def sicCode
  @sicCode
end

#stateObject

Returns the value of attribute state.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def state
  @state
end

#stockExchangeObject

Returns the value of attribute stockExchange.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def stockExchange
  @stockExchange
end

#stockSymbolObject

Returns the value of attribute stockSymbol.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def stockSymbol
  @stockSymbol
end

#subIndustry1Object

Returns the value of attribute subIndustry1.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def subIndustry1
  @subIndustry1
end

#subIndustry2Object

Returns the value of attribute subIndustry2.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def subIndustry2
  @subIndustry2
end

#subIndustry3Object

Returns the value of attribute subIndustry3.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def subIndustry3
  @subIndustry3
end

#updatedDateObject

Returns the value of attribute updatedDate.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def updatedDate
  @updatedDate
end

#websiteObject

Returns the value of attribute website.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def website
  @website
end

#zipObject

Returns the value of attribute zip.



7
8
9
# File 'lib/jigsaw/company.rb', line 7

def zip
  @zip
end

Class Method Details

.find(api_key, id, options) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/jigsaw/company.rb', line 42

def self.find(api_key, id, options)
  
  options[:token] = api_key

  response = Request.company(id, options)

  company = self.new(response['companies'].first)
  
  # Return the hits info and the list of the company
  company
  
end