class Intrinio::EarningsRecord
An earnings record for the identifier
Attributes
Date of Board/Shareholder Meeting
The type of meeting - "B" indicates a Board of Directors meeting and "S" indicates a Shareholder meeting
Link for Conference Call recording
Website link for the company
Date of the conference call
Passcode for replay conference call
Publicly available phone number for replay conference call
Published time of the conference call
Date of last earnings date update by a WSH analyst
Next earnings date
The fiscal year associated with next earnings date and next earnings quarter
The quarter of the next earnings release
The release date of a preliminary earnings report
Earnings Date for 1st quarter
Earnings Date for 2nd quarter
Earnings Date for 3rd quarter
Earnings Date for 4th quarter
The letter “Q” followed by the quarter number the earnings information applies to
Indicates the time of the announcement
Fiscal year in YYYY format for the earnings transcript
The letter “Q” followed by the quarter number the earnings transcript applies to
Link to the earnings release transcript
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
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# 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
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# 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
Attribute type mapping.
# 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
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# 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
Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data
# 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
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# 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
Custom attribute writer method checking allowed values (enum). @param [Object] board_of_directors_meeting_type
Object to be assigned
# File lib/intrinio-sdk/models/earnings_record.rb, line 308 def board_of_directors_meeting_type=(board_of_directors_meeting_type) validator = EnumAttributeValidator.new('String', ["B", "S"]) unless validator.valid?(board_of_directors_meeting_type) fail ArgumentError, "invalid value for 'board_of_directors_meeting_type', must be one of #{validator.allowable_values}." end @board_of_directors_meeting_type = board_of_directors_meeting_type end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# 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
@see the `==` method @param [Object] Object to be compared
# File lib/intrinio-sdk/models/earnings_record.rb, line 359 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# 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
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
# File lib/intrinio-sdk/models/earnings_record.rb, line 279 def list_invalid_properties invalid_properties = Array.new return invalid_properties end
Custom attribute writer method checking allowed values (enum). @param [Object] time_of_day
Object to be assigned
# File lib/intrinio-sdk/models/earnings_record.rb, line 298 def time_of_day=(time_of_day) validator = EnumAttributeValidator.new('String', ["Before Market", "During Market", "After Market", "Unspecified"]) unless validator.valid?(time_of_day) fail ArgumentError, "invalid value for 'time_of_day', must be one of #{validator.allowable_values}." end @time_of_day = time_of_day end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# 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
Returns the string representation of the object @return [String] String presentation of the object
# File lib/intrinio-sdk/models/earnings_record.rb, line 433 def to_s to_hash.to_s end
Custom attribute writer method checking allowed values (enum). @param [Object] type Object to be assigned
# File lib/intrinio-sdk/models/earnings_record.rb, line 318 def type=(type) validator = EnumAttributeValidator.new('String', ["V", "T", "I"]) unless validator.valid?(type) fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}." end @type = type end
Check to see if the all the properties in the model are valid @return true if the model is valid
# 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