Class: Intrinio::EarningsRecord

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

Overview

An earnings record for the identifier

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ EarningsRecord

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 173

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

end

Instance Attribute Details

#board_of_directors_meeting_dateObject

Date of Board/Shareholder Meeting



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

def board_of_directors_meeting_date
  @board_of_directors_meeting_date
end

#board_of_directors_meeting_typeObject

The type of meeting - "B" indicates a Board of Directors meeting and "S" indicates a Shareholder meeting



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

def board_of_directors_meeting_type
  @board_of_directors_meeting_type
end

#broadcast_urlObject

Link for Conference Call recording



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

def broadcast_url
  @broadcast_url
end

#company_websiteObject

Website link for the company



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

def company_website
  @company_website
end

#conference_call_dateObject

Date of the conference call



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

def conference_call_date
  @conference_call_date
end

#conference_call_passcodeObject

Passcode for replay conference call



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

def conference_call_passcode
  @conference_call_passcode
end

#conference_call_phone_numberObject

Publicly available phone number for replay conference call



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

def conference_call_phone_number
  @conference_call_phone_number
end

#conference_call_timeObject

Published time of the conference call



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

def conference_call_time
  @conference_call_time
end

#last_confirmation_dateObject

Date of last earnings date update by a WSH analyst



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

def last_confirmation_date
  @last_confirmation_date
end

#next_earnings_dateObject

Next earnings date



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

def next_earnings_date
  @next_earnings_date
end

#next_earnings_fiscal_yearObject

The fiscal year associated with next earnings date and next earnings quarter



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

def next_earnings_fiscal_year
  @next_earnings_fiscal_year
end

#next_earnings_quarterObject

The quarter of the next earnings release



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

def next_earnings_quarter
  @next_earnings_quarter
end

#preliminary_earnings_dateObject

The release date of a preliminary earnings report



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

def preliminary_earnings_date
  @preliminary_earnings_date
end

#q1_dateObject

Earnings Date for 1st quarter



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

def q1_date
  @q1_date
end

#q2_dateObject

Earnings Date for 2nd quarter



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

def q2_date
  @q2_date
end

#q3_dateObject

Earnings Date for 3rd quarter



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

def q3_date
  @q3_date
end

#q4_dateObject

Earnings Date for 4th quarter



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

def q4_date
  @q4_date
end

#quarterObject

The letter “Q” followed by the quarter number the earnings information applies to



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

def quarter
  @quarter
end

#securityObject

Returns the value of attribute security.



87
88
89
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 87

def security
  @security
end

#time_of_dayObject

Indicates the time of the announcement



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

def time_of_day
  @time_of_day
end

#transcript_fiscal_yearObject

Fiscal year in YYYY format for the earnings transcript



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

def transcript_fiscal_year
  @transcript_fiscal_year
end

#transcript_quarterObject

The letter “Q” followed by the quarter number the earnings transcript applies to



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

def transcript_quarter
  @transcript_quarter
end

#transcript_urlObject

Link to the earnings release transcript



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

def transcript_url
  @transcript_url
end

#typeObject

The nature of the next reported earnings date - "V" indicates a Verified date, "T" indicates that the date was gathered from the company, but is still considered Tentative, and "I" indicates that the date is forecased or Inferred



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

def type
  @type
end

Class Method Details

.attribute_mapObject

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



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 112

def self.attribute_map
  {
    :'quarter' => :'quarter',
    :'time_of_day' => :'time_of_day',
    :'broadcast_url' => :'broadcast_url',
    :'transcript_url' => :'transcript_url',
    :'transcript_quarter' => :'transcript_quarter',
    :'transcript_fiscal_year' => :'transcript_fiscal_year',
    :'conference_call_date' => :'conference_call_date',
    :'conference_call_time' => :'conference_call_time',
    :'conference_call_phone_number' => :'conference_call_phone_number',
    :'conference_call_passcode' => :'conference_call_passcode',
    :'last_confirmation_date' => :'last_confirmation_date',
    :'board_of_directors_meeting_date' => :'board_of_directors_meeting_date',
    :'board_of_directors_meeting_type' => :'board_of_directors_meeting_type',
    :'company_website' => :'company_website',
    :'q1_date' => :'q1_date',
    :'q2_date' => :'q2_date',
    :'q3_date' => :'q3_date',
    :'q4_date' => :'q4_date',
    :'type' => :'type',
    :'next_earnings_date' => :'next_earnings_date',
    :'next_earnings_quarter' => :'next_earnings_quarter',
    :'next_earnings_fiscal_year' => :'next_earnings_fiscal_year',
    :'preliminary_earnings_date' => :'preliminary_earnings_date',
    :'security' => :'security'
  }
end

.swagger_typesObject

Attribute type mapping.



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
167
168
169
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 142

def self.swagger_types
  {
    :'quarter' => :'String',
    :'time_of_day' => :'String',
    :'broadcast_url' => :'String',
    :'transcript_url' => :'String',
    :'transcript_quarter' => :'String',
    :'transcript_fiscal_year' => :'String',
    :'conference_call_date' => :'Date',
    :'conference_call_time' => :'String',
    :'conference_call_phone_number' => :'String',
    :'conference_call_passcode' => :'String',
    :'last_confirmation_date' => :'Date',
    :'board_of_directors_meeting_date' => :'Date',
    :'board_of_directors_meeting_type' => :'String',
    :'company_website' => :'String',
    :'q1_date' => :'Date',
    :'q2_date' => :'Date',
    :'q3_date' => :'Date',
    :'q4_date' => :'Date',
    :'type' => :'String',
    :'next_earnings_date' => :'Date',
    :'next_earnings_quarter' => :'String',
    :'next_earnings_fiscal_year' => :'Integer',
    :'preliminary_earnings_date' => :'Date',
    :'security' => :'SecuritySummary'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      quarter == o.quarter &&
      time_of_day == o.time_of_day &&
      broadcast_url == o.broadcast_url &&
      transcript_url == o.transcript_url &&
      transcript_quarter == o.transcript_quarter &&
      transcript_fiscal_year == o.transcript_fiscal_year &&
      conference_call_date == o.conference_call_date &&
      conference_call_time == o.conference_call_time &&
      conference_call_phone_number == o.conference_call_phone_number &&
      conference_call_passcode == o.conference_call_passcode &&
      last_confirmation_date == o.last_confirmation_date &&
      board_of_directors_meeting_date == o.board_of_directors_meeting_date &&
      board_of_directors_meeting_type == o.board_of_directors_meeting_type &&
      company_website == o.company_website &&
      q1_date == o.q1_date &&
      q2_date == o.q2_date &&
      q3_date == o.q3_date &&
      q4_date == o.q4_date &&
      type == o.type &&
      next_earnings_date == o.next_earnings_date &&
      next_earnings_quarter == o.next_earnings_quarter &&
      next_earnings_fiscal_year == o.next_earnings_fiscal_year &&
      preliminary_earnings_date == o.preliminary_earnings_date &&
      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



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
419
420
421
422
423
424
425
426
427
428
429
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 393

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



459
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 459

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



372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 372

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


359
360
361
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 359

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



365
366
367
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 365

def hash
  [quarter, time_of_day, broadcast_url, transcript_url, transcript_quarter, transcript_fiscal_year, conference_call_date, conference_call_time, conference_call_phone_number, conference_call_passcode, last_confirmation_date, board_of_directors_meeting_date, board_of_directors_meeting_type, company_website, q1_date, q2_date, q3_date, q4_date, type, next_earnings_date, next_earnings_quarter, next_earnings_fiscal_year, preliminary_earnings_date, 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



279
280
281
282
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 279

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



439
440
441
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 439

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



445
446
447
448
449
450
451
452
453
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 445

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



433
434
435
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 433

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



286
287
288
289
290
291
292
293
294
# File 'lib/intrinio-sdk/models/earnings_record.rb', line 286

def valid?
  time_of_day_validator = EnumAttributeValidator.new('String', ["Before Market", "During Market", "After Market", "Unspecified"])
  return false unless time_of_day_validator.valid?(@time_of_day)
  board_of_directors_meeting_type_validator = EnumAttributeValidator.new('String', ["B", "S"])
  return false unless board_of_directors_meeting_type_validator.valid?(@board_of_directors_meeting_type)
  type_validator = EnumAttributeValidator.new('String', ["V", "T", "I"])
  return false unless type_validator.valid?(@type)
  return true
end