Class: Jigsaw::Company
- Inherits:
-
Object
- Object
- Jigsaw::Company
- Defined in:
- lib/jigsaw/company.rb
Instance Attribute Summary collapse
-
#activeContact ⇒ Object
Returns the value of attribute activeContact.
-
#address ⇒ Object
Returns the value of attribute address.
-
#city ⇒ Object
Returns the value of attribute city.
-
#companyId ⇒ Object
Returns the value of attribute companyId.
-
#country ⇒ Object
Returns the value of attribute country.
-
#createdOn ⇒ Object
Returns the value of attribute createdOn.
-
#currentLogo ⇒ Object
Returns the value of attribute currentLogo.
-
#currentWiki ⇒ Object
Returns the value of attribute currentWiki.
-
#employeeCount ⇒ Object
Returns the value of attribute employeeCount.
-
#employeeRange ⇒ Object
Returns the value of attribute employeeRange.
-
#graveyarded ⇒ Object
Returns the value of attribute graveyarded.
-
#industry1 ⇒ Object
Returns the value of attribute industry1.
-
#industry2 ⇒ Object
Returns the value of attribute industry2.
-
#industry3 ⇒ Object
Returns the value of attribute industry3.
-
#linkInJigsaw ⇒ Object
Returns the value of attribute linkInJigsaw.
-
#name ⇒ Object
Returns the value of attribute name.
-
#ownership ⇒ Object
Returns the value of attribute ownership.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#revenue ⇒ Object
Returns the value of attribute revenue.
-
#revenueRange ⇒ Object
Returns the value of attribute revenueRange.
-
#sicCode ⇒ Object
Returns the value of attribute sicCode.
-
#state ⇒ Object
Returns the value of attribute state.
-
#stockExchange ⇒ Object
Returns the value of attribute stockExchange.
-
#stockSymbol ⇒ Object
Returns the value of attribute stockSymbol.
-
#subIndustry1 ⇒ Object
Returns the value of attribute subIndustry1.
-
#subIndustry2 ⇒ Object
Returns the value of attribute subIndustry2.
-
#subIndustry3 ⇒ Object
Returns the value of attribute subIndustry3.
-
#updatedDate ⇒ Object
Returns the value of attribute updatedDate.
-
#website ⇒ Object
Returns the value of attribute website.
-
#zip ⇒ Object
Returns the value of attribute zip.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json_object) ⇒ Company
constructor
A new instance of Company.
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
#activeContact ⇒ Object
Returns the value of attribute activeContact.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def activeContact @activeContact end |
#address ⇒ Object
Returns the value of attribute address.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def address @address end |
#city ⇒ Object
Returns the value of attribute city.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def city @city end |
#companyId ⇒ Object
Returns the value of attribute companyId.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def companyId @companyId end |
#country ⇒ Object
Returns the value of attribute country.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def country @country end |
#createdOn ⇒ Object
Returns the value of attribute createdOn.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def createdOn @createdOn end |
#currentLogo ⇒ Object
Returns the value of attribute currentLogo.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def currentLogo @currentLogo end |
#currentWiki ⇒ Object
Returns the value of attribute currentWiki.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def currentWiki @currentWiki end |
#employeeCount ⇒ Object
Returns the value of attribute employeeCount.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def employeeCount @employeeCount end |
#employeeRange ⇒ Object
Returns the value of attribute employeeRange.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def employeeRange @employeeRange end |
#graveyarded ⇒ Object
Returns the value of attribute graveyarded.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def graveyarded @graveyarded end |
#industry1 ⇒ Object
Returns the value of attribute industry1.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def industry1 @industry1 end |
#industry2 ⇒ Object
Returns the value of attribute industry2.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def industry2 @industry2 end |
#industry3 ⇒ Object
Returns the value of attribute industry3.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def industry3 @industry3 end |
#linkInJigsaw ⇒ Object
Returns the value of attribute linkInJigsaw.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def linkInJigsaw @linkInJigsaw end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def name @name end |
#ownership ⇒ Object
Returns the value of attribute ownership.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def ownership @ownership end |
#phone ⇒ Object
Returns the value of attribute phone.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def phone @phone end |
#revenue ⇒ Object
Returns the value of attribute revenue.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def revenue @revenue end |
#revenueRange ⇒ Object
Returns the value of attribute revenueRange.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def revenueRange @revenueRange end |
#sicCode ⇒ Object
Returns the value of attribute sicCode.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def sicCode @sicCode end |
#state ⇒ Object
Returns the value of attribute state.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def state @state end |
#stockExchange ⇒ Object
Returns the value of attribute stockExchange.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def stockExchange @stockExchange end |
#stockSymbol ⇒ Object
Returns the value of attribute stockSymbol.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def stockSymbol @stockSymbol end |
#subIndustry1 ⇒ Object
Returns the value of attribute subIndustry1.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def subIndustry1 @subIndustry1 end |
#subIndustry2 ⇒ Object
Returns the value of attribute subIndustry2.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def subIndustry2 @subIndustry2 end |
#subIndustry3 ⇒ Object
Returns the value of attribute subIndustry3.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def subIndustry3 @subIndustry3 end |
#updatedDate ⇒ Object
Returns the value of attribute updatedDate.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def updatedDate @updatedDate end |
#website ⇒ Object
Returns the value of attribute website.
7 8 9 |
# File 'lib/jigsaw/company.rb', line 7 def website @website end |
#zip ⇒ Object
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, ) [:token] = api_key response = Request.company(id, ) company = self.new(response['companies'].first) # Return the hits info and the list of the company company end |