Class: Intrinio::CompanyInitialPublicOffering

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

Overview

A record of a company’s initial public offering (IPO). The act of "going public" is initiated by an IPO, at which point the company’s stock trades on a major stock exchange (such as NYSE or NASDAQ)

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CompanyInitialPublicOffering

Initializes the object

Parameters:

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

    Model attributes in the form of hash



164
165
166
167
168
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
209
210
211
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
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 164

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?(:'date')
    self.date = attributes[:'date']
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

end

Instance Attribute Details

#announcement_urlObject

The URL to the company’s announcement of the IPO



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

def announcement_url
  @announcement_url
end

#close_priceObject

The closing price at the end of the first trading day (only available for priced IPOs)



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

def close_price
  @close_price
end

#companyObject

The Company that is going public via the IPO



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

def company
  @company
end

#dateObject

The date of the IPO, when the stock first trades on a major exchange



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

def date
  @date
end

#day_changeObject

The percentage change between the open price and the close price on the first trading day (only available for priced IPOs)



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

def day_change
  @day_change
end

#exchangeObject

The acronym of the stock exchange that the company is going to trade publicly on. Typically NYSE or NASDAQ



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

def exchange
  @exchange
end

#idObject

The Intrinio ID for the IPO



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

def id
  @id
end

#month_changeObject

The percentage change between the open price on the first trading day and the close price approximately a month after the first trading day (only available for priced IPOs)



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

def month_change
  @month_change
end

#offer_amountObject

The total dollar amount of shares offered in the IPO. Typically this is share price * share count



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

def offer_amount
  @offer_amount
end

#open_priceObject

The opening price at the beginning of the first trading day (only available for priced IPOs)



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

def open_price
  @open_price
end

#sec_report_urlObject

The IRL to the company’s S-1, S-1/A, F-1, or F-1/A SEC filing, which is required to be filed before an IPO takes place.



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

def sec_report_url
  @sec_report_url
end

#securityObject

The primary Security for the Company that is going public via the IPO



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

def security
  @security
end

#share_countObject

The number of shares offered in the IPO



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

def share_count
  @share_count
end

#share_count_highestObject

The expected highest number of shares that will be offered in the IPO. Before an IPO is priced, companies typically provide a range of shares that they expect to offer in the IPO (typically available for upcoming IPOs)



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

def share_count_highest
  @share_count_highest
end

#share_count_lowestObject

The expected lowest number of shares that will be offered in the IPO. Before an IPO is priced, companies typically provide a range of shares that they expect to offer in the IPO (typically available for upcoming IPOs)



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

def share_count_lowest
  @share_count_lowest
end

#share_priceObject

The price per share at which the IPO was offered



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

def share_price
  @share_price
end

#share_price_highestObject

The expected highest price per share at which the IPO will be offered. Before an IPO is priced, companies typically provide a range of prices per share at which they expect to offer the IPO (typically available for upcoming IPOs)



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

def share_price_highest
  @share_price_highest
end

#share_price_lowestObject

The expected lowest price per share at which the IPO will be offered. Before an IPO is priced, companies typically provide a range of prices per share at which they expect to offer the IPO (typically available for upcoming IPOs)



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

def share_price_lowest
  @share_price_lowest
end

#statusObject

The status of the IPO. Upcoming IPOs have not taken place yet but are expected to. Priced IPOs have taken place. Withdrawn IPOs were expected to take place, but were subsequently withdrawn and did not take place



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

def status
  @status
end

#tickerObject

The ticker under which the Company will be traded after the IPO takes place



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

def ticker
  @ticker
end

#volumeObject

The volume at the end of the first trading day (only available for priced IPOs)



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

def volume
  @volume
end

#week_changeObject

The percentage change between the open price on the first trading day and the close price approximately a week after the first trading day (only available for priced IPOs)



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

def week_change
  @week_change
end

Class Method Details

.attribute_mapObject

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



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 107

def self.attribute_map
  {
    :'id' => :'id',
    :'ticker' => :'ticker',
    :'date' => :'date',
    :'status' => :'status',
    :'exchange' => :'exchange',
    :'offer_amount' => :'offer_amount',
    :'share_price' => :'share_price',
    :'share_price_lowest' => :'share_price_lowest',
    :'share_price_highest' => :'share_price_highest',
    :'share_count' => :'share_count',
    :'share_count_lowest' => :'share_count_lowest',
    :'share_count_highest' => :'share_count_highest',
    :'announcement_url' => :'announcement_url',
    :'sec_report_url' => :'sec_report_url',
    :'open_price' => :'open_price',
    :'close_price' => :'close_price',
    :'volume' => :'volume',
    :'day_change' => :'day_change',
    :'week_change' => :'week_change',
    :'month_change' => :'month_change',
    :'company' => :'company',
    :'security' => :'security'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 135

def self.swagger_types
  {
    :'id' => :'String',
    :'ticker' => :'String',
    :'date' => :'DateTime',
    :'status' => :'String',
    :'exchange' => :'String',
    :'offer_amount' => :'Float',
    :'share_price' => :'Float',
    :'share_price_lowest' => :'Float',
    :'share_price_highest' => :'Float',
    :'share_count' => :'Float',
    :'share_count_lowest' => :'Float',
    :'share_count_highest' => :'Float',
    :'announcement_url' => :'String',
    :'sec_report_url' => :'String',
    :'open_price' => :'Float',
    :'close_price' => :'Float',
    :'volume' => :'Float',
    :'day_change' => :'Float',
    :'week_change' => :'Float',
    :'month_change' => :'Float',
    :'company' => :'CompanySummary',
    :'security' => :'SecuritySummary'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 287

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      ticker == o.ticker &&
      date == o.date &&
      status == o.status &&
      exchange == o.exchange &&
      offer_amount == o.offer_amount &&
      share_price == o.share_price &&
      share_price_lowest == o.share_price_lowest &&
      share_price_highest == o.share_price_highest &&
      share_count == o.share_count &&
      share_count_lowest == o.share_count_lowest &&
      share_count_highest == o.share_count_highest &&
      announcement_url == o.announcement_url &&
      sec_report_url == o.sec_report_url &&
      open_price == o.open_price &&
      close_price == o.close_price &&
      volume == o.volume &&
      day_change == o.day_change &&
      week_change == o.week_change &&
      month_change == o.month_change &&
      company == o.company &&
      security == o.security
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



350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 350

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



416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 416

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



329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 329

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


316
317
318
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 316

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



322
323
324
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 322

def hash
  [id, ticker, date, status, exchange, offer_amount, share_price, share_price_lowest, share_price_highest, share_count, share_count_lowest, share_count_highest, announcement_url, sec_report_url, open_price, close_price, volume, day_change, week_change, month_change, company, security].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



262
263
264
265
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 262

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



396
397
398
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 396

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



402
403
404
405
406
407
408
409
410
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 402

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



390
391
392
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 390

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



269
270
271
272
273
# File 'lib/intrinio-sdk/models/company_initial_public_offering.rb', line 269

def valid?
  status_validator = EnumAttributeValidator.new('String', ["upcoming", "priced", "withdrawn"])
  return false unless status_validator.valid?(@status)
  return true
end