Class: Intrinio::Company

Inherits:
Object
  • Object
show all
Defined in:
lib/intrinio-sdk/models/company.rb

Overview

A company that submits filings to the SEC and has a security traded primarily on a US exchange

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Company

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/intrinio-sdk/models/company.rb', line 212

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

  if attributes.has_key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.has_key?(:'ticker')
    self.ticker = attributes[:'ticker']
  end

  if attributes.has_key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.has_key?(:'lei')
    self.lei = attributes[:'lei']
  end

  if attributes.has_key?(:'legal_name')
    self.legal_name = attributes[:'legal_name']
  end

  if attributes.has_key?(:'stock_exchange')
    self.stock_exchange = attributes[:'stock_exchange']
  end

  if attributes.has_key?(:'sic')
    self.sic = attributes[:'sic']
  end

  if attributes.has_key?(:'short_description')
    self.short_description = attributes[:'short_description']
  end

  if attributes.has_key?(:'long_description')
    self.long_description = attributes[:'long_description']
  end

  if attributes.has_key?(:'ceo')
    self.ceo = attributes[:'ceo']
  end

  if attributes.has_key?(:'company_url')
    self.company_url = attributes[:'company_url']
  end

  if attributes.has_key?(:'business_address')
    self.business_address = attributes[:'business_address']
  end

  if attributes.has_key?(:'mailing_address')
    self.mailing_address = attributes[:'mailing_address']
  end

  if attributes.has_key?(:'business_phone_no')
    self.business_phone_no = attributes[:'business_phone_no']
  end

  if attributes.has_key?(:'hq_address1')
    self.hq_address1 = attributes[:'hq_address1']
  end

  if attributes.has_key?(:'hq_address2')
    self.hq_address2 = attributes[:'hq_address2']
  end

  if attributes.has_key?(:'hq_address_city')
    self.hq_address_city = attributes[:'hq_address_city']
  end

  if attributes.has_key?(:'hq_address_postal_code')
    self.hq_address_postal_code = attributes[:'hq_address_postal_code']
  end

  if attributes.has_key?(:'entity_legal_form')
    self.entity_legal_form = attributes[:'entity_legal_form']
  end

  if attributes.has_key?(:'cik')
    self.cik = attributes[:'cik']
  end

  if attributes.has_key?(:'latest_filing_date')
    self.latest_filing_date = attributes[:'latest_filing_date']
  end

  if attributes.has_key?(:'hq_state')
    self.hq_state = attributes[:'hq_state']
  end

  if attributes.has_key?(:'hq_country')
    self.hq_country = attributes[:'hq_country']
  end

  if attributes.has_key?(:'inc_state')
    self.inc_state = attributes[:'inc_state']
  end

  if attributes.has_key?(:'inc_country')
    self.inc_country = attributes[:'inc_country']
  end

  if attributes.has_key?(:'employees')
    self.employees = attributes[:'employees']
  end

  if attributes.has_key?(:'entity_status')
    self.entity_status = attributes[:'entity_status']
  end

  if attributes.has_key?(:'sector')
    self.sector = attributes[:'sector']
  end

  if attributes.has_key?(:'industry_category')
    self.industry_category = attributes[:'industry_category']
  end

  if attributes.has_key?(:'industry_group')
    self.industry_group = attributes[:'industry_group']
  end

  if attributes.has_key?(:'template')
    self.template = attributes[:'template']
  end

  if attributes.has_key?(:'standardized_active')
    self.standardized_active = attributes[:'standardized_active']
  end

  if attributes.has_key?(:'first_fundamental_date')
    self.first_fundamental_date = attributes[:'first_fundamental_date']
  end

  if attributes.has_key?(:'last_fundamental_date')
    self.last_fundamental_date = attributes[:'last_fundamental_date']
  end

  if attributes.has_key?(:'first_stock_price_date')
    self.first_stock_price_date = attributes[:'first_stock_price_date']
  end

  if attributes.has_key?(:'last_stock_price_date')
    self.last_stock_price_date = attributes[:'last_stock_price_date']
  end

end

Instance Attribute Details

#business_addressObject

The company’s business address



52
53
54
# File 'lib/intrinio-sdk/models/company.rb', line 52

def business_address
  @business_address
end

#business_phone_noObject

The phone number reported by the company



58
59
60
# File 'lib/intrinio-sdk/models/company.rb', line 58

def business_phone_no
  @business_phone_no
end

#ceoObject

The Chief Executive Officer of the company



46
47
48
# File 'lib/intrinio-sdk/models/company.rb', line 46

def ceo
  @ceo
end

#cikObject

The Central Index Key (CIK) assigned to the company by the SEC as a unique identifier, used in SEC filings



76
77
78
# File 'lib/intrinio-sdk/models/company.rb', line 76

def cik
  @cik
end

#company_urlObject

The URL of the company’s primary corporate website or primary internet property



49
50
51
# File 'lib/intrinio-sdk/models/company.rb', line 49

def company_url
  @company_url
end

#employeesObject

The number of employees working for the company



94
95
96
# File 'lib/intrinio-sdk/models/company.rb', line 94

def employees
  @employees
end

The company’s legal organization form



73
74
75
# File 'lib/intrinio-sdk/models/company.rb', line 73

def entity_legal_form
  @entity_legal_form
end

#entity_statusObject

Returns the value of attribute entity_status.



96
97
98
# File 'lib/intrinio-sdk/models/company.rb', line 96

def entity_status
  @entity_status
end

#first_fundamental_dateObject

The period end date of the company’s first reported fundamental



114
115
116
# File 'lib/intrinio-sdk/models/company.rb', line 114

def first_fundamental_date
  @first_fundamental_date
end

#first_stock_price_dateObject

The date of the company’s first stock price, based on the company’s primary security, which is typically traded on US exchages



120
121
122
# File 'lib/intrinio-sdk/models/company.rb', line 120

def first_stock_price_date
  @first_stock_price_date
end

#hq_address1Object

The company’s headquarters address - line 1



61
62
63
# File 'lib/intrinio-sdk/models/company.rb', line 61

def hq_address1
  @hq_address1
end

#hq_address2Object

The company’s headquarters address - line 2



64
65
66
# File 'lib/intrinio-sdk/models/company.rb', line 64

def hq_address2
  @hq_address2
end

#hq_address_cityObject

The company’s headquarters city



67
68
69
# File 'lib/intrinio-sdk/models/company.rb', line 67

def hq_address_city
  @hq_address_city
end

#hq_address_postal_codeObject

The company’s headquarters postal code



70
71
72
# File 'lib/intrinio-sdk/models/company.rb', line 70

def hq_address_postal_code
  @hq_address_postal_code
end

#hq_countryObject

The country where the company headquarters are located



85
86
87
# File 'lib/intrinio-sdk/models/company.rb', line 85

def hq_country
  @hq_country
end

#hq_stateObject

The state (US & Canada Only) where the company headquarters are located



82
83
84
# File 'lib/intrinio-sdk/models/company.rb', line 82

def hq_state
  @hq_state
end

#idObject

The Intrinio ID of the company



19
20
21
# File 'lib/intrinio-sdk/models/company.rb', line 19

def id
  @id
end

#inc_countryObject

The country where the company is incorporated



91
92
93
# File 'lib/intrinio-sdk/models/company.rb', line 91

def inc_country
  @inc_country
end

#inc_stateObject

The state (US & Canada Only) where the company is incorporated



88
89
90
# File 'lib/intrinio-sdk/models/company.rb', line 88

def inc_state
  @inc_state
end

#industry_categoryObject

The company’s operating industry category



102
103
104
# File 'lib/intrinio-sdk/models/company.rb', line 102

def industry_category
  @industry_category
end

#industry_groupObject

The company’s operating industry group



105
106
107
# File 'lib/intrinio-sdk/models/company.rb', line 105

def industry_group
  @industry_group
end

#last_fundamental_dateObject

The period end date of the company’s last reported fundamental



117
118
119
# File 'lib/intrinio-sdk/models/company.rb', line 117

def last_fundamental_date
  @last_fundamental_date
end

#last_stock_price_dateObject

The date of the company’s last stock price, based on the company’s primary security, which is typically traded on US exchages



123
124
125
# File 'lib/intrinio-sdk/models/company.rb', line 123

def last_stock_price_date
  @last_stock_price_date
end

#latest_filing_dateObject

The date of the company’s last filing with the SEC



79
80
81
# File 'lib/intrinio-sdk/models/company.rb', line 79

def latest_filing_date
  @latest_filing_date
end

The company’s official legal name



31
32
33
# File 'lib/intrinio-sdk/models/company.rb', line 31

def legal_name
  @legal_name
end

#leiObject

The Legal Entity Identifier (LEI) assigned to the company



28
29
30
# File 'lib/intrinio-sdk/models/company.rb', line 28

def lei
  @lei
end

#long_descriptionObject

A one paragraph description of the company’s operations and other corporate actions



43
44
45
# File 'lib/intrinio-sdk/models/company.rb', line 43

def long_description
  @long_description
end

#mailing_addressObject

The mailing address reported by the company



55
56
57
# File 'lib/intrinio-sdk/models/company.rb', line 55

def mailing_address
  @mailing_address
end

#nameObject

The company’s common name



25
26
27
# File 'lib/intrinio-sdk/models/company.rb', line 25

def name
  @name
end

#sectorObject

The company’s operating sector



99
100
101
# File 'lib/intrinio-sdk/models/company.rb', line 99

def sector
  @sector
end

#short_descriptionObject

A one or two sentence description of the company’s operations



40
41
42
# File 'lib/intrinio-sdk/models/company.rb', line 40

def short_description
  @short_description
end

#sicObject

The Standard Industrial Classification (SIC) determined by the company and filed with the SEC



37
38
39
# File 'lib/intrinio-sdk/models/company.rb', line 37

def sic
  @sic
end

#standardized_activeObject

If true, the company has standardized and as reported fundamental data via the Intrinio API; if false, the company has as-reported data only



111
112
113
# File 'lib/intrinio-sdk/models/company.rb', line 111

def standardized_active
  @standardized_active
end

#stock_exchangeObject

The Stock Exchange where the company’s common stock is primarily traded



34
35
36
# File 'lib/intrinio-sdk/models/company.rb', line 34

def stock_exchange
  @stock_exchange
end

#templateObject

The financial statement template used by Intrinio to standardize the as reported data



108
109
110
# File 'lib/intrinio-sdk/models/company.rb', line 108

def template
  @template
end

#tickerObject

The stock market ticker symbol associated with the company’s common stock securities



22
23
24
# File 'lib/intrinio-sdk/models/company.rb', line 22

def ticker
  @ticker
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/intrinio-sdk/models/company.rb', line 127

def self.attribute_map
  {
    :'id' => :'id',
    :'ticker' => :'ticker',
    :'name' => :'name',
    :'lei' => :'lei',
    :'legal_name' => :'legal_name',
    :'stock_exchange' => :'stock_exchange',
    :'sic' => :'sic',
    :'short_description' => :'short_description',
    :'long_description' => :'long_description',
    :'ceo' => :'ceo',
    :'company_url' => :'company_url',
    :'business_address' => :'business_address',
    :'mailing_address' => :'mailing_address',
    :'business_phone_no' => :'business_phone_no',
    :'hq_address1' => :'hq_address1',
    :'hq_address2' => :'hq_address2',
    :'hq_address_city' => :'hq_address_city',
    :'hq_address_postal_code' => :'hq_address_postal_code',
    :'entity_legal_form' => :'entity_legal_form',
    :'cik' => :'cik',
    :'latest_filing_date' => :'latest_filing_date',
    :'hq_state' => :'hq_state',
    :'hq_country' => :'hq_country',
    :'inc_state' => :'inc_state',
    :'inc_country' => :'inc_country',
    :'employees' => :'employees',
    :'entity_status' => :'entity_status',
    :'sector' => :'sector',
    :'industry_category' => :'industry_category',
    :'industry_group' => :'industry_group',
    :'template' => :'template',
    :'standardized_active' => :'standardized_active',
    :'first_fundamental_date' => :'first_fundamental_date',
    :'last_fundamental_date' => :'last_fundamental_date',
    :'first_stock_price_date' => :'first_stock_price_date',
    :'last_stock_price_date' => :'last_stock_price_date'
  }
end

.swagger_typesObject

Attribute type mapping.



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/intrinio-sdk/models/company.rb', line 169

def self.swagger_types
  {
    :'id' => :'String',
    :'ticker' => :'String',
    :'name' => :'String',
    :'lei' => :'String',
    :'legal_name' => :'String',
    :'stock_exchange' => :'String',
    :'sic' => :'String',
    :'short_description' => :'String',
    :'long_description' => :'String',
    :'ceo' => :'String',
    :'company_url' => :'String',
    :'business_address' => :'String',
    :'mailing_address' => :'String',
    :'business_phone_no' => :'String',
    :'hq_address1' => :'String',
    :'hq_address2' => :'String',
    :'hq_address_city' => :'String',
    :'hq_address_postal_code' => :'String',
    :'entity_legal_form' => :'String',
    :'cik' => :'String',
    :'latest_filing_date' => :'Date',
    :'hq_state' => :'String',
    :'hq_country' => :'String',
    :'inc_state' => :'String',
    :'inc_country' => :'String',
    :'employees' => :'Integer',
    :'entity_status' => :'String',
    :'sector' => :'String',
    :'industry_category' => :'String',
    :'industry_group' => :'String',
    :'template' => :'String',
    :'standardized_active' => :'BOOLEAN',
    :'first_fundamental_date' => :'Date',
    :'last_fundamental_date' => :'Date',
    :'first_stock_price_date' => :'Date',
    :'last_stock_price_date' => :'Date'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/intrinio-sdk/models/company.rb', line 379

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      ticker == o.ticker &&
      name == o.name &&
      lei == o.lei &&
      legal_name == o.legal_name &&
      stock_exchange == o.stock_exchange &&
      sic == o.sic &&
      short_description == o.short_description &&
      long_description == o.long_description &&
      ceo == o.ceo &&
      company_url == o.company_url &&
      business_address == o.business_address &&
      mailing_address == o.mailing_address &&
      business_phone_no == o.business_phone_no &&
      hq_address1 == o.hq_address1 &&
      hq_address2 == o.hq_address2 &&
      hq_address_city == o.hq_address_city &&
      hq_address_postal_code == o.hq_address_postal_code &&
      entity_legal_form == o.entity_legal_form &&
      cik == o.cik &&
      latest_filing_date == o.latest_filing_date &&
      hq_state == o.hq_state &&
      hq_country == o.hq_country &&
      inc_state == o.inc_state &&
      inc_country == o.inc_country &&
      employees == o.employees &&
      entity_status == o.entity_status &&
      sector == o.sector &&
      industry_category == o.industry_category &&
      industry_group == o.industry_group &&
      template == o.template &&
      standardized_active == o.standardized_active &&
      first_fundamental_date == o.first_fundamental_date &&
      last_fundamental_date == o.last_fundamental_date &&
      first_stock_price_date == o.first_stock_price_date &&
      last_stock_price_date == o.last_stock_price_date
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# File 'lib/intrinio-sdk/models/company.rb', line 456

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = Intrinio.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



522
523
524
525
526
527
528
529
530
531
532
533
534
# File 'lib/intrinio-sdk/models/company.rb', line 522

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map{ |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
# File 'lib/intrinio-sdk/models/company.rb', line 435

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


422
423
424
# File 'lib/intrinio-sdk/models/company.rb', line 422

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



428
429
430
# File 'lib/intrinio-sdk/models/company.rb', line 428

def hash
  [id, ticker, name, lei, legal_name, stock_exchange, sic, short_description, long_description, ceo, company_url, business_address, mailing_address, business_phone_no, hq_address1, hq_address2, hq_address_city, hq_address_postal_code, entity_legal_form, cik, latest_filing_date, hq_state, hq_country, inc_state, inc_country, employees, entity_status, sector, industry_category, industry_group, template, standardized_active, first_fundamental_date, last_fundamental_date, first_stock_price_date, last_stock_price_date].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



366
367
368
369
# File 'lib/intrinio-sdk/models/company.rb', line 366

def list_invalid_properties
  invalid_properties = Array.new
  return invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



502
503
504
# File 'lib/intrinio-sdk/models/company.rb', line 502

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



508
509
510
511
512
513
514
515
516
# File 'lib/intrinio-sdk/models/company.rb', line 508

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



496
497
498
# File 'lib/intrinio-sdk/models/company.rb', line 496

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



373
374
375
# File 'lib/intrinio-sdk/models/company.rb', line 373

def valid?
  return true
end