Class: SecApi::Objects::FulltextResult
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- SecApi::Objects::FulltextResult
- Defined in:
- lib/sec_api/objects/fulltext_result.rb
Overview
Represents a full-text search result from SEC EDGAR filings.
FulltextResult objects are returned from full-text search queries and contain metadata about filings that match search terms. All instances are immutable (frozen).
Class Method Summary collapse
-
.from_api(data) ⇒ FulltextResult
Creates a FulltextResult from API response data.
Class Method Details
.from_api(data) ⇒ FulltextResult
Creates a FulltextResult from API response data.
Normalizes camelCase keys from the API to snake_case format.
56 57 58 59 60 61 62 63 |
# File 'lib/sec_api/objects/fulltext_result.rb', line 56 def self.from_api(data) data[:company_name_long] = data.delete(:companyNameLong) if data.key?(:companyNameLong) data[:form_type] = data.delete(:formType) if data.key?(:formType) data[:url] = data.delete(:filingUrl) if data.key?(:filingUrl) data[:filed_on] = data.delete(:filedAt) if data.key?(:filedAt) new(data) end |