intrinio-sdk 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +78 -52
- data/docs/ApiResponseFilingNotes.md +9 -0
- data/docs/ApiResponseFilingNotesSearch.md +8 -0
- data/docs/ApiResponseStockExchangeRealtimeStockPrices.md +9 -0
- data/docs/CompanyApi.md +34 -28
- data/docs/DataPointApi.md +4 -4
- data/docs/DataTagApi.md +5 -5
- data/docs/DividendRecord.md +17 -0
- data/docs/EarningsRecord.md +30 -0
- data/docs/FilingApi.md +273 -7
- data/docs/FilingNote.md +11 -0
- data/docs/FilingNoteFiling.md +11 -0
- data/docs/FilingNoteSummary.md +10 -0
- data/docs/FundamentalsApi.md +9 -9
- data/docs/HistoricalDataApi.md +2 -2
- data/docs/IndexApi.md +30 -30
- data/docs/RealtimeStockPrice.md +21 -0
- data/docs/RealtimeStockPriceSecurity.md +12 -0
- data/docs/SecurityApi.md +148 -17
- data/docs/StockExchangeApi.md +64 -15
- data/intrinio-sdk.gemspec +1 -1
- data/lib/intrinio-sdk.rb +11 -1
- data/lib/intrinio-sdk/api/company_api.rb +41 -35
- data/lib/intrinio-sdk/api/data_point_api.rb +5 -5
- data/lib/intrinio-sdk/api/data_tag_api.rb +7 -7
- data/lib/intrinio-sdk/api/filing_api.rb +364 -11
- data/lib/intrinio-sdk/api/fundamentals_api.rb +11 -11
- data/lib/intrinio-sdk/api/historical_data_api.rb +3 -3
- data/lib/intrinio-sdk/api/index_api.rb +31 -31
- data/lib/intrinio-sdk/api/security_api.rb +194 -23
- data/lib/intrinio-sdk/api/stock_exchange_api.rb +85 -23
- data/lib/intrinio-sdk/api_client.rb +1 -1
- data/lib/intrinio-sdk/api_error.rb +1 -1
- data/lib/intrinio-sdk/configuration.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_companies.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_company_filings.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_company_fundamentals.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_company_historical_data.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_company_news.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_company_securities.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_data_tags.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_economic_index_historical_data.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_economic_indices.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_filing_notes.rb +200 -0
- data/lib/intrinio-sdk/models/api_response_filing_notes_search.rb +190 -0
- data/lib/intrinio-sdk/models/api_response_filings.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_historical_data.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_news.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_reported_financials.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_securities.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_security_historical_data.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_security_stock_price_adjustments.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_security_stock_prices.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_sic_index_historical_data.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_sic_indices.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_standardized_financials.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_stock_exchange_realtime_stock_prices.rb +201 -0
- data/lib/intrinio-sdk/models/api_response_stock_exchange_securities.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_price_adjustments.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_prices.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_stock_exchanges.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_stock_market_index_historical_data.rb +1 -1
- data/lib/intrinio-sdk/models/api_response_stock_market_indices.rb +1 -1
- data/lib/intrinio-sdk/models/company.rb +1 -1
- data/lib/intrinio-sdk/models/company_filing.rb +1 -1
- data/lib/intrinio-sdk/models/company_news.rb +1 -1
- data/lib/intrinio-sdk/models/company_news_summary.rb +1 -1
- data/lib/intrinio-sdk/models/company_summary.rb +1 -1
- data/lib/intrinio-sdk/models/data_tag.rb +1 -1
- data/lib/intrinio-sdk/models/data_tag_summary.rb +1 -1
- data/lib/intrinio-sdk/models/dividend_record.rb +311 -0
- data/lib/intrinio-sdk/models/earnings_record.rb +465 -0
- data/lib/intrinio-sdk/models/economic_index.rb +1 -1
- data/lib/intrinio-sdk/models/economic_index_summary.rb +1 -1
- data/lib/intrinio-sdk/models/filing.rb +1 -1
- data/lib/intrinio-sdk/models/filing_note.rb +218 -0
- data/lib/intrinio-sdk/models/filing_note_filing.rb +219 -0
- data/lib/intrinio-sdk/models/filing_note_summary.rb +208 -0
- data/lib/intrinio-sdk/models/filing_summary.rb +1 -1
- data/lib/intrinio-sdk/models/fundamental.rb +1 -1
- data/lib/intrinio-sdk/models/fundamental_summary.rb +1 -1
- data/lib/intrinio-sdk/models/historical_data.rb +1 -1
- data/lib/intrinio-sdk/models/realtime_stock_price.rb +318 -0
- data/lib/intrinio-sdk/models/realtime_stock_price_security.rb +229 -0
- data/lib/intrinio-sdk/models/reported_financial.rb +1 -1
- data/lib/intrinio-sdk/models/reported_tag.rb +1 -1
- data/lib/intrinio-sdk/models/security.rb +1 -1
- data/lib/intrinio-sdk/models/security_screen_clause.rb +1 -1
- data/lib/intrinio-sdk/models/security_screen_group.rb +1 -1
- data/lib/intrinio-sdk/models/security_screen_result.rb +1 -1
- data/lib/intrinio-sdk/models/security_screen_result_data.rb +1 -1
- data/lib/intrinio-sdk/models/security_summary.rb +1 -1
- data/lib/intrinio-sdk/models/sic_index.rb +1 -1
- data/lib/intrinio-sdk/models/standardized_financial.rb +1 -1
- data/lib/intrinio-sdk/models/stock_exchange.rb +1 -1
- data/lib/intrinio-sdk/models/stock_market_index.rb +1 -1
- data/lib/intrinio-sdk/models/stock_market_index_summary.rb +1 -1
- data/lib/intrinio-sdk/models/stock_price.rb +1 -1
- data/lib/intrinio-sdk/models/stock_price_adjustment.rb +1 -1
- data/lib/intrinio-sdk/models/stock_price_adjustment_summary.rb +1 -1
- data/lib/intrinio-sdk/models/stock_price_summary.rb +1 -1
- data/lib/intrinio-sdk/version.rb +2 -2
- data/spec/models/api_response_filing_notes_search_spec.rb +42 -0
- data/spec/models/api_response_filing_notes_spec.rb +48 -0
- data/spec/models/api_response_stock_exchange_realtime_stock_prices_spec.rb +48 -0
- data/spec/models/dividend_record_spec.rb +100 -0
- data/spec/models/earnings_record_spec.rb +186 -0
- data/spec/models/filing_note_filing_spec.rb +60 -0
- data/spec/models/filing_note_spec.rb +60 -0
- data/spec/models/filing_note_summary_spec.rb +54 -0
- data/spec/models/realtime_stock_price_security_spec.rb +66 -0
- data/spec/models/realtime_stock_price_spec.rb +120 -0
- metadata +43 -3
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
5
|
|
6
|
-
OpenAPI spec version: 2.
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.0-SNAPSHOT
|
@@ -0,0 +1,311 @@
|
|
1
|
+
=begin
|
2
|
+
#Intrinio API
|
3
|
+
|
4
|
+
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Intrinio
|
16
|
+
# A dividend record for the identifier
|
17
|
+
class DividendRecord
|
18
|
+
# Amount of dividend in US dollars
|
19
|
+
attr_accessor :ex_dividend
|
20
|
+
|
21
|
+
# The 3-digit currency code the dividend amount was reported in
|
22
|
+
attr_accessor :currency
|
23
|
+
|
24
|
+
# Date dividend was announced
|
25
|
+
attr_accessor :announcement_date
|
26
|
+
|
27
|
+
# Date before which holders-of-record will receive the dividend
|
28
|
+
attr_accessor :record_date
|
29
|
+
|
30
|
+
# Date the divdiend was paid
|
31
|
+
attr_accessor :pay_date
|
32
|
+
|
33
|
+
# Identifies payment frequency of announced dividend
|
34
|
+
attr_accessor :frequency
|
35
|
+
|
36
|
+
# Status of the dividend
|
37
|
+
attr_accessor :status
|
38
|
+
|
39
|
+
# The forward dividend yield
|
40
|
+
attr_accessor :forward_yield
|
41
|
+
|
42
|
+
# The forward dividend rate
|
43
|
+
attr_accessor :forward_rate
|
44
|
+
|
45
|
+
attr_accessor :security
|
46
|
+
|
47
|
+
class EnumAttributeValidator
|
48
|
+
attr_reader :datatype
|
49
|
+
attr_reader :allowable_values
|
50
|
+
|
51
|
+
def initialize(datatype, allowable_values)
|
52
|
+
@allowable_values = allowable_values.map do |value|
|
53
|
+
case datatype.to_s
|
54
|
+
when /Integer/i
|
55
|
+
value.to_i
|
56
|
+
when /Float/i
|
57
|
+
value.to_f
|
58
|
+
else
|
59
|
+
value
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def valid?(value)
|
65
|
+
!value || allowable_values.include?(value)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
70
|
+
def self.attribute_map
|
71
|
+
{
|
72
|
+
:'ex_dividend' => :'ex_dividend',
|
73
|
+
:'currency' => :'currency',
|
74
|
+
:'announcement_date' => :'announcement_date',
|
75
|
+
:'record_date' => :'record_date',
|
76
|
+
:'pay_date' => :'pay_date',
|
77
|
+
:'frequency' => :'frequency',
|
78
|
+
:'status' => :'status',
|
79
|
+
:'forward_yield' => :'forward_yield',
|
80
|
+
:'forward_rate' => :'forward_rate',
|
81
|
+
:'security' => :'security'
|
82
|
+
}
|
83
|
+
end
|
84
|
+
|
85
|
+
# Attribute type mapping.
|
86
|
+
def self.swagger_types
|
87
|
+
{
|
88
|
+
:'ex_dividend' => :'Float',
|
89
|
+
:'currency' => :'String',
|
90
|
+
:'announcement_date' => :'Date',
|
91
|
+
:'record_date' => :'Date',
|
92
|
+
:'pay_date' => :'Date',
|
93
|
+
:'frequency' => :'String',
|
94
|
+
:'status' => :'String',
|
95
|
+
:'forward_yield' => :'Float',
|
96
|
+
:'forward_rate' => :'Float',
|
97
|
+
:'security' => :'SecuritySummary'
|
98
|
+
}
|
99
|
+
end
|
100
|
+
|
101
|
+
# Initializes the object
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
103
|
+
def initialize(attributes = {})
|
104
|
+
return unless attributes.is_a?(Hash)
|
105
|
+
|
106
|
+
# convert string to symbol for hash key
|
107
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
108
|
+
|
109
|
+
if attributes.has_key?(:'ex_dividend')
|
110
|
+
self.ex_dividend = attributes[:'ex_dividend']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.has_key?(:'currency')
|
114
|
+
self.currency = attributes[:'currency']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.has_key?(:'announcement_date')
|
118
|
+
self.announcement_date = attributes[:'announcement_date']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.has_key?(:'record_date')
|
122
|
+
self.record_date = attributes[:'record_date']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.has_key?(:'pay_date')
|
126
|
+
self.pay_date = attributes[:'pay_date']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.has_key?(:'frequency')
|
130
|
+
self.frequency = attributes[:'frequency']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.has_key?(:'status')
|
134
|
+
self.status = attributes[:'status']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.has_key?(:'forward_yield')
|
138
|
+
self.forward_yield = attributes[:'forward_yield']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.has_key?(:'forward_rate')
|
142
|
+
self.forward_rate = attributes[:'forward_rate']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'security')
|
146
|
+
self.security = attributes[:'security']
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
150
|
+
|
151
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
152
|
+
# @return Array for valid properties with the reasons
|
153
|
+
def list_invalid_properties
|
154
|
+
invalid_properties = Array.new
|
155
|
+
return invalid_properties
|
156
|
+
end
|
157
|
+
|
158
|
+
# Check to see if the all the properties in the model are valid
|
159
|
+
# @return true if the model is valid
|
160
|
+
def valid?
|
161
|
+
status_validator = EnumAttributeValidator.new('String', ["P", "X", "S", "R"])
|
162
|
+
return false unless status_validator.valid?(@status)
|
163
|
+
return true
|
164
|
+
end
|
165
|
+
|
166
|
+
# Custom attribute writer method checking allowed values (enum).
|
167
|
+
# @param [Object] status Object to be assigned
|
168
|
+
def status=(status)
|
169
|
+
validator = EnumAttributeValidator.new('String', ["P", "X", "S", "R"])
|
170
|
+
unless validator.valid?(status)
|
171
|
+
fail ArgumentError, "invalid value for 'status', must be one of #{validator.allowable_values}."
|
172
|
+
end
|
173
|
+
@status = status
|
174
|
+
end
|
175
|
+
|
176
|
+
# Checks equality by comparing each attribute.
|
177
|
+
# @param [Object] Object to be compared
|
178
|
+
def ==(o)
|
179
|
+
return true if self.equal?(o)
|
180
|
+
self.class == o.class &&
|
181
|
+
ex_dividend == o.ex_dividend &&
|
182
|
+
currency == o.currency &&
|
183
|
+
announcement_date == o.announcement_date &&
|
184
|
+
record_date == o.record_date &&
|
185
|
+
pay_date == o.pay_date &&
|
186
|
+
frequency == o.frequency &&
|
187
|
+
status == o.status &&
|
188
|
+
forward_yield == o.forward_yield &&
|
189
|
+
forward_rate == o.forward_rate &&
|
190
|
+
security == o.security
|
191
|
+
end
|
192
|
+
|
193
|
+
# @see the `==` method
|
194
|
+
# @param [Object] Object to be compared
|
195
|
+
def eql?(o)
|
196
|
+
self == o
|
197
|
+
end
|
198
|
+
|
199
|
+
# Calculates hash code according to all attributes.
|
200
|
+
# @return [Fixnum] Hash code
|
201
|
+
def hash
|
202
|
+
[ex_dividend, currency, announcement_date, record_date, pay_date, frequency, status, forward_yield, forward_rate, security].hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Builds the object from hash
|
206
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
207
|
+
# @return [Object] Returns the model itself
|
208
|
+
def build_from_hash(attributes)
|
209
|
+
return nil unless attributes.is_a?(Hash)
|
210
|
+
self.class.swagger_types.each_pair do |key, type|
|
211
|
+
if type =~ /\AArray<(.*)>/i
|
212
|
+
# check to ensure the input is an array given that the the attribute
|
213
|
+
# is documented as an array but the input is not
|
214
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
215
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
216
|
+
end
|
217
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
218
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
219
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
220
|
+
end
|
221
|
+
|
222
|
+
self
|
223
|
+
end
|
224
|
+
|
225
|
+
# Deserializes the data based on type
|
226
|
+
# @param string type Data type
|
227
|
+
# @param string value Value to be deserialized
|
228
|
+
# @return [Object] Deserialized data
|
229
|
+
def _deserialize(type, value)
|
230
|
+
case type.to_sym
|
231
|
+
when :DateTime
|
232
|
+
DateTime.parse(value)
|
233
|
+
when :Date
|
234
|
+
Date.parse(value)
|
235
|
+
when :String
|
236
|
+
value.to_s
|
237
|
+
when :Integer
|
238
|
+
value.to_i
|
239
|
+
when :Float
|
240
|
+
value.to_f
|
241
|
+
when :BOOLEAN
|
242
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
243
|
+
true
|
244
|
+
else
|
245
|
+
false
|
246
|
+
end
|
247
|
+
when :Object
|
248
|
+
# generic object (usually a Hash), return directly
|
249
|
+
value
|
250
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
251
|
+
inner_type = Regexp.last_match[:inner_type]
|
252
|
+
value.map { |v| _deserialize(inner_type, v) }
|
253
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
254
|
+
k_type = Regexp.last_match[:k_type]
|
255
|
+
v_type = Regexp.last_match[:v_type]
|
256
|
+
{}.tap do |hash|
|
257
|
+
value.each do |k, v|
|
258
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
259
|
+
end
|
260
|
+
end
|
261
|
+
else # model
|
262
|
+
temp_model = Intrinio.const_get(type).new
|
263
|
+
temp_model.build_from_hash(value)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
# Returns the string representation of the object
|
268
|
+
# @return [String] String presentation of the object
|
269
|
+
def to_s
|
270
|
+
to_hash.to_s
|
271
|
+
end
|
272
|
+
|
273
|
+
# to_body is an alias to to_hash (backward compatibility)
|
274
|
+
# @return [Hash] Returns the object in the form of hash
|
275
|
+
def to_body
|
276
|
+
to_hash
|
277
|
+
end
|
278
|
+
|
279
|
+
# Returns the object in the form of hash
|
280
|
+
# @return [Hash] Returns the object in the form of hash
|
281
|
+
def to_hash
|
282
|
+
hash = {}
|
283
|
+
self.class.attribute_map.each_pair do |attr, param|
|
284
|
+
value = self.send(attr)
|
285
|
+
next if value.nil?
|
286
|
+
hash[param] = _to_hash(value)
|
287
|
+
end
|
288
|
+
hash
|
289
|
+
end
|
290
|
+
|
291
|
+
# Outputs non-array value in the form of hash
|
292
|
+
# For object, use to_hash. Otherwise, just return the value
|
293
|
+
# @param [Object] value Any valid value
|
294
|
+
# @return [Hash] Returns the value in the form of hash
|
295
|
+
def _to_hash(value)
|
296
|
+
if value.is_a?(Array)
|
297
|
+
value.compact.map{ |v| _to_hash(v) }
|
298
|
+
elsif value.is_a?(Hash)
|
299
|
+
{}.tap do |hash|
|
300
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
301
|
+
end
|
302
|
+
elsif value.respond_to? :to_hash
|
303
|
+
value.to_hash
|
304
|
+
else
|
305
|
+
value
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
end
|
310
|
+
|
311
|
+
end
|
@@ -0,0 +1,465 @@
|
|
1
|
+
=begin
|
2
|
+
#Intrinio API
|
3
|
+
|
4
|
+
#Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner.
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.1.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Intrinio
|
16
|
+
# An earnings record for the identifier
|
17
|
+
class EarningsRecord
|
18
|
+
# The letter “Q” followed by the quarter number the earnings information applies to
|
19
|
+
attr_accessor :quarter
|
20
|
+
|
21
|
+
# Indicates the time of the announcement
|
22
|
+
attr_accessor :time_of_day
|
23
|
+
|
24
|
+
# Link for Conference Call recording
|
25
|
+
attr_accessor :broadcast_url
|
26
|
+
|
27
|
+
# Link to the earnings release transcript
|
28
|
+
attr_accessor :transcript_url
|
29
|
+
|
30
|
+
# The letter “Q” followed by the quarter number the earnings transcript applies to
|
31
|
+
attr_accessor :transcript_quarter
|
32
|
+
|
33
|
+
# Fiscal year in YYYY format for the earnings transcript
|
34
|
+
attr_accessor :transcript_fiscal_year
|
35
|
+
|
36
|
+
# Date of the conference call
|
37
|
+
attr_accessor :conference_call_date
|
38
|
+
|
39
|
+
# Published time of the conference call
|
40
|
+
attr_accessor :conference_call_time
|
41
|
+
|
42
|
+
# Publicly available phone number for replay conference call
|
43
|
+
attr_accessor :conference_call_phone_number
|
44
|
+
|
45
|
+
# Passcode for replay conference call
|
46
|
+
attr_accessor :conference_call_passcode
|
47
|
+
|
48
|
+
# Date of last earnings date update by a WSH analyst
|
49
|
+
attr_accessor :last_confirmation_date
|
50
|
+
|
51
|
+
# Date of Board/Shareholder Meeting
|
52
|
+
attr_accessor :board_of_directors_meeting_date
|
53
|
+
|
54
|
+
# The type of meeting - \"B\" indicates a Board of Directors meeting and \"S\" indicates a Shareholder meeting
|
55
|
+
attr_accessor :board_of_directors_meeting_type
|
56
|
+
|
57
|
+
# Website link for the company
|
58
|
+
attr_accessor :company_website
|
59
|
+
|
60
|
+
# Earnings Date for 1st quarter
|
61
|
+
attr_accessor :q1_date
|
62
|
+
|
63
|
+
# Earnings Date for 2nd quarter
|
64
|
+
attr_accessor :q2_date
|
65
|
+
|
66
|
+
# Earnings Date for 3rd quarter
|
67
|
+
attr_accessor :q3_date
|
68
|
+
|
69
|
+
# Earnings Date for 4th quarter
|
70
|
+
attr_accessor :q4_date
|
71
|
+
|
72
|
+
# 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
|
+
attr_accessor :type
|
74
|
+
|
75
|
+
# Next earnings date
|
76
|
+
attr_accessor :next_earnings_date
|
77
|
+
|
78
|
+
# The quarter of the next earnings release
|
79
|
+
attr_accessor :next_earnings_quarter
|
80
|
+
|
81
|
+
# The fiscal year associated with next earnings date and next earnings quarter
|
82
|
+
attr_accessor :next_earnings_fiscal_year
|
83
|
+
|
84
|
+
attr_accessor :security
|
85
|
+
|
86
|
+
class EnumAttributeValidator
|
87
|
+
attr_reader :datatype
|
88
|
+
attr_reader :allowable_values
|
89
|
+
|
90
|
+
def initialize(datatype, allowable_values)
|
91
|
+
@allowable_values = allowable_values.map do |value|
|
92
|
+
case datatype.to_s
|
93
|
+
when /Integer/i
|
94
|
+
value.to_i
|
95
|
+
when /Float/i
|
96
|
+
value.to_f
|
97
|
+
else
|
98
|
+
value
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def valid?(value)
|
104
|
+
!value || allowable_values.include?(value)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
109
|
+
def self.attribute_map
|
110
|
+
{
|
111
|
+
:'quarter' => :'quarter',
|
112
|
+
:'time_of_day' => :'time_of_day',
|
113
|
+
:'broadcast_url' => :'broadcast_url',
|
114
|
+
:'transcript_url' => :'transcript_url',
|
115
|
+
:'transcript_quarter' => :'transcript_quarter',
|
116
|
+
:'transcript_fiscal_year' => :'transcript_fiscal_year',
|
117
|
+
:'conference_call_date' => :'conference_call_date',
|
118
|
+
:'conference_call_time' => :'conference_call_time',
|
119
|
+
:'conference_call_phone_number' => :'conference_call_phone_number',
|
120
|
+
:'conference_call_passcode' => :'conference_call_passcode',
|
121
|
+
:'last_confirmation_date' => :'last_confirmation_date',
|
122
|
+
:'board_of_directors_meeting_date' => :'board_of_directors_meeting_date',
|
123
|
+
:'board_of_directors_meeting_type' => :'board_of_directors_meeting_type',
|
124
|
+
:'company_website' => :'company_website',
|
125
|
+
:'q1_date' => :'q1_date',
|
126
|
+
:'q2_date' => :'q2_date',
|
127
|
+
:'q3_date' => :'q3_date',
|
128
|
+
:'q4_date' => :'q4_date',
|
129
|
+
:'type' => :'type',
|
130
|
+
:'next_earnings_date' => :'next_earnings_date',
|
131
|
+
:'next_earnings_quarter' => :'next_earnings_quarter',
|
132
|
+
:'next_earnings_fiscal_year' => :'next_earnings_fiscal_year',
|
133
|
+
:'security' => :'security'
|
134
|
+
}
|
135
|
+
end
|
136
|
+
|
137
|
+
# Attribute type mapping.
|
138
|
+
def self.swagger_types
|
139
|
+
{
|
140
|
+
:'quarter' => :'String',
|
141
|
+
:'time_of_day' => :'String',
|
142
|
+
:'broadcast_url' => :'String',
|
143
|
+
:'transcript_url' => :'String',
|
144
|
+
:'transcript_quarter' => :'String',
|
145
|
+
:'transcript_fiscal_year' => :'String',
|
146
|
+
:'conference_call_date' => :'Date',
|
147
|
+
:'conference_call_time' => :'String',
|
148
|
+
:'conference_call_phone_number' => :'String',
|
149
|
+
:'conference_call_passcode' => :'String',
|
150
|
+
:'last_confirmation_date' => :'Date',
|
151
|
+
:'board_of_directors_meeting_date' => :'Date',
|
152
|
+
:'board_of_directors_meeting_type' => :'String',
|
153
|
+
:'company_website' => :'String',
|
154
|
+
:'q1_date' => :'Date',
|
155
|
+
:'q2_date' => :'Date',
|
156
|
+
:'q3_date' => :'Date',
|
157
|
+
:'q4_date' => :'Date',
|
158
|
+
:'type' => :'String',
|
159
|
+
:'next_earnings_date' => :'Date',
|
160
|
+
:'next_earnings_quarter' => :'String',
|
161
|
+
:'next_earnings_fiscal_year' => :'Integer',
|
162
|
+
:'security' => :'SecuritySummary'
|
163
|
+
}
|
164
|
+
end
|
165
|
+
|
166
|
+
# Initializes the object
|
167
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
168
|
+
def initialize(attributes = {})
|
169
|
+
return unless attributes.is_a?(Hash)
|
170
|
+
|
171
|
+
# convert string to symbol for hash key
|
172
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
173
|
+
|
174
|
+
if attributes.has_key?(:'quarter')
|
175
|
+
self.quarter = attributes[:'quarter']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes.has_key?(:'time_of_day')
|
179
|
+
self.time_of_day = attributes[:'time_of_day']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes.has_key?(:'broadcast_url')
|
183
|
+
self.broadcast_url = attributes[:'broadcast_url']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes.has_key?(:'transcript_url')
|
187
|
+
self.transcript_url = attributes[:'transcript_url']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.has_key?(:'transcript_quarter')
|
191
|
+
self.transcript_quarter = attributes[:'transcript_quarter']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.has_key?(:'transcript_fiscal_year')
|
195
|
+
self.transcript_fiscal_year = attributes[:'transcript_fiscal_year']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.has_key?(:'conference_call_date')
|
199
|
+
self.conference_call_date = attributes[:'conference_call_date']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.has_key?(:'conference_call_time')
|
203
|
+
self.conference_call_time = attributes[:'conference_call_time']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.has_key?(:'conference_call_phone_number')
|
207
|
+
self.conference_call_phone_number = attributes[:'conference_call_phone_number']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.has_key?(:'conference_call_passcode')
|
211
|
+
self.conference_call_passcode = attributes[:'conference_call_passcode']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.has_key?(:'last_confirmation_date')
|
215
|
+
self.last_confirmation_date = attributes[:'last_confirmation_date']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.has_key?(:'board_of_directors_meeting_date')
|
219
|
+
self.board_of_directors_meeting_date = attributes[:'board_of_directors_meeting_date']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.has_key?(:'board_of_directors_meeting_type')
|
223
|
+
self.board_of_directors_meeting_type = attributes[:'board_of_directors_meeting_type']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.has_key?(:'company_website')
|
227
|
+
self.company_website = attributes[:'company_website']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.has_key?(:'q1_date')
|
231
|
+
self.q1_date = attributes[:'q1_date']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.has_key?(:'q2_date')
|
235
|
+
self.q2_date = attributes[:'q2_date']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.has_key?(:'q3_date')
|
239
|
+
self.q3_date = attributes[:'q3_date']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.has_key?(:'q4_date')
|
243
|
+
self.q4_date = attributes[:'q4_date']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.has_key?(:'type')
|
247
|
+
self.type = attributes[:'type']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.has_key?(:'next_earnings_date')
|
251
|
+
self.next_earnings_date = attributes[:'next_earnings_date']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes.has_key?(:'next_earnings_quarter')
|
255
|
+
self.next_earnings_quarter = attributes[:'next_earnings_quarter']
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes.has_key?(:'next_earnings_fiscal_year')
|
259
|
+
self.next_earnings_fiscal_year = attributes[:'next_earnings_fiscal_year']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes.has_key?(:'security')
|
263
|
+
self.security = attributes[:'security']
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|
267
|
+
|
268
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
269
|
+
# @return Array for valid properties with the reasons
|
270
|
+
def list_invalid_properties
|
271
|
+
invalid_properties = Array.new
|
272
|
+
return invalid_properties
|
273
|
+
end
|
274
|
+
|
275
|
+
# Check to see if the all the properties in the model are valid
|
276
|
+
# @return true if the model is valid
|
277
|
+
def valid?
|
278
|
+
time_of_day_validator = EnumAttributeValidator.new('String', ["Before Market", "During Market", "After Market", "Unspecified"])
|
279
|
+
return false unless time_of_day_validator.valid?(@time_of_day)
|
280
|
+
board_of_directors_meeting_type_validator = EnumAttributeValidator.new('String', ["B", "S"])
|
281
|
+
return false unless board_of_directors_meeting_type_validator.valid?(@board_of_directors_meeting_type)
|
282
|
+
type_validator = EnumAttributeValidator.new('String', ["V", "T", "I"])
|
283
|
+
return false unless type_validator.valid?(@type)
|
284
|
+
return true
|
285
|
+
end
|
286
|
+
|
287
|
+
# Custom attribute writer method checking allowed values (enum).
|
288
|
+
# @param [Object] time_of_day Object to be assigned
|
289
|
+
def time_of_day=(time_of_day)
|
290
|
+
validator = EnumAttributeValidator.new('String', ["Before Market", "During Market", "After Market", "Unspecified"])
|
291
|
+
unless validator.valid?(time_of_day)
|
292
|
+
fail ArgumentError, "invalid value for 'time_of_day', must be one of #{validator.allowable_values}."
|
293
|
+
end
|
294
|
+
@time_of_day = time_of_day
|
295
|
+
end
|
296
|
+
|
297
|
+
# Custom attribute writer method checking allowed values (enum).
|
298
|
+
# @param [Object] board_of_directors_meeting_type Object to be assigned
|
299
|
+
def board_of_directors_meeting_type=(board_of_directors_meeting_type)
|
300
|
+
validator = EnumAttributeValidator.new('String', ["B", "S"])
|
301
|
+
unless validator.valid?(board_of_directors_meeting_type)
|
302
|
+
fail ArgumentError, "invalid value for 'board_of_directors_meeting_type', must be one of #{validator.allowable_values}."
|
303
|
+
end
|
304
|
+
@board_of_directors_meeting_type = board_of_directors_meeting_type
|
305
|
+
end
|
306
|
+
|
307
|
+
# Custom attribute writer method checking allowed values (enum).
|
308
|
+
# @param [Object] type Object to be assigned
|
309
|
+
def type=(type)
|
310
|
+
validator = EnumAttributeValidator.new('String', ["V", "T", "I"])
|
311
|
+
unless validator.valid?(type)
|
312
|
+
fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
|
313
|
+
end
|
314
|
+
@type = type
|
315
|
+
end
|
316
|
+
|
317
|
+
# Checks equality by comparing each attribute.
|
318
|
+
# @param [Object] Object to be compared
|
319
|
+
def ==(o)
|
320
|
+
return true if self.equal?(o)
|
321
|
+
self.class == o.class &&
|
322
|
+
quarter == o.quarter &&
|
323
|
+
time_of_day == o.time_of_day &&
|
324
|
+
broadcast_url == o.broadcast_url &&
|
325
|
+
transcript_url == o.transcript_url &&
|
326
|
+
transcript_quarter == o.transcript_quarter &&
|
327
|
+
transcript_fiscal_year == o.transcript_fiscal_year &&
|
328
|
+
conference_call_date == o.conference_call_date &&
|
329
|
+
conference_call_time == o.conference_call_time &&
|
330
|
+
conference_call_phone_number == o.conference_call_phone_number &&
|
331
|
+
conference_call_passcode == o.conference_call_passcode &&
|
332
|
+
last_confirmation_date == o.last_confirmation_date &&
|
333
|
+
board_of_directors_meeting_date == o.board_of_directors_meeting_date &&
|
334
|
+
board_of_directors_meeting_type == o.board_of_directors_meeting_type &&
|
335
|
+
company_website == o.company_website &&
|
336
|
+
q1_date == o.q1_date &&
|
337
|
+
q2_date == o.q2_date &&
|
338
|
+
q3_date == o.q3_date &&
|
339
|
+
q4_date == o.q4_date &&
|
340
|
+
type == o.type &&
|
341
|
+
next_earnings_date == o.next_earnings_date &&
|
342
|
+
next_earnings_quarter == o.next_earnings_quarter &&
|
343
|
+
next_earnings_fiscal_year == o.next_earnings_fiscal_year &&
|
344
|
+
security == o.security
|
345
|
+
end
|
346
|
+
|
347
|
+
# @see the `==` method
|
348
|
+
# @param [Object] Object to be compared
|
349
|
+
def eql?(o)
|
350
|
+
self == o
|
351
|
+
end
|
352
|
+
|
353
|
+
# Calculates hash code according to all attributes.
|
354
|
+
# @return [Fixnum] Hash code
|
355
|
+
def hash
|
356
|
+
[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, security].hash
|
357
|
+
end
|
358
|
+
|
359
|
+
# Builds the object from hash
|
360
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
361
|
+
# @return [Object] Returns the model itself
|
362
|
+
def build_from_hash(attributes)
|
363
|
+
return nil unless attributes.is_a?(Hash)
|
364
|
+
self.class.swagger_types.each_pair do |key, type|
|
365
|
+
if type =~ /\AArray<(.*)>/i
|
366
|
+
# check to ensure the input is an array given that the the attribute
|
367
|
+
# is documented as an array but the input is not
|
368
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
369
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
370
|
+
end
|
371
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
372
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
373
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
374
|
+
end
|
375
|
+
|
376
|
+
self
|
377
|
+
end
|
378
|
+
|
379
|
+
# Deserializes the data based on type
|
380
|
+
# @param string type Data type
|
381
|
+
# @param string value Value to be deserialized
|
382
|
+
# @return [Object] Deserialized data
|
383
|
+
def _deserialize(type, value)
|
384
|
+
case type.to_sym
|
385
|
+
when :DateTime
|
386
|
+
DateTime.parse(value)
|
387
|
+
when :Date
|
388
|
+
Date.parse(value)
|
389
|
+
when :String
|
390
|
+
value.to_s
|
391
|
+
when :Integer
|
392
|
+
value.to_i
|
393
|
+
when :Float
|
394
|
+
value.to_f
|
395
|
+
when :BOOLEAN
|
396
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
397
|
+
true
|
398
|
+
else
|
399
|
+
false
|
400
|
+
end
|
401
|
+
when :Object
|
402
|
+
# generic object (usually a Hash), return directly
|
403
|
+
value
|
404
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
405
|
+
inner_type = Regexp.last_match[:inner_type]
|
406
|
+
value.map { |v| _deserialize(inner_type, v) }
|
407
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
408
|
+
k_type = Regexp.last_match[:k_type]
|
409
|
+
v_type = Regexp.last_match[:v_type]
|
410
|
+
{}.tap do |hash|
|
411
|
+
value.each do |k, v|
|
412
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
413
|
+
end
|
414
|
+
end
|
415
|
+
else # model
|
416
|
+
temp_model = Intrinio.const_get(type).new
|
417
|
+
temp_model.build_from_hash(value)
|
418
|
+
end
|
419
|
+
end
|
420
|
+
|
421
|
+
# Returns the string representation of the object
|
422
|
+
# @return [String] String presentation of the object
|
423
|
+
def to_s
|
424
|
+
to_hash.to_s
|
425
|
+
end
|
426
|
+
|
427
|
+
# to_body is an alias to to_hash (backward compatibility)
|
428
|
+
# @return [Hash] Returns the object in the form of hash
|
429
|
+
def to_body
|
430
|
+
to_hash
|
431
|
+
end
|
432
|
+
|
433
|
+
# Returns the object in the form of hash
|
434
|
+
# @return [Hash] Returns the object in the form of hash
|
435
|
+
def to_hash
|
436
|
+
hash = {}
|
437
|
+
self.class.attribute_map.each_pair do |attr, param|
|
438
|
+
value = self.send(attr)
|
439
|
+
next if value.nil?
|
440
|
+
hash[param] = _to_hash(value)
|
441
|
+
end
|
442
|
+
hash
|
443
|
+
end
|
444
|
+
|
445
|
+
# Outputs non-array value in the form of hash
|
446
|
+
# For object, use to_hash. Otherwise, just return the value
|
447
|
+
# @param [Object] value Any valid value
|
448
|
+
# @return [Hash] Returns the value in the form of hash
|
449
|
+
def _to_hash(value)
|
450
|
+
if value.is_a?(Array)
|
451
|
+
value.compact.map{ |v| _to_hash(v) }
|
452
|
+
elsif value.is_a?(Hash)
|
453
|
+
{}.tap do |hash|
|
454
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
455
|
+
end
|
456
|
+
elsif value.respond_to? :to_hash
|
457
|
+
value.to_hash
|
458
|
+
else
|
459
|
+
value
|
460
|
+
end
|
461
|
+
end
|
462
|
+
|
463
|
+
end
|
464
|
+
|
465
|
+
end
|