intrinio-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +176 -0
- data/Rakefile +8 -0
- data/docs/ApiResponseCompanies.md +9 -0
- data/docs/ApiResponseCompanyFilings.md +10 -0
- data/docs/ApiResponseCompanyFundamentals.md +10 -0
- data/docs/ApiResponseCompanyHistoricalData.md +10 -0
- data/docs/ApiResponseCompanyNews.md +10 -0
- data/docs/ApiResponseCompanySecurities.md +10 -0
- data/docs/ApiResponseDataTags.md +9 -0
- data/docs/ApiResponseEconomicIndexHistoricalData.md +10 -0
- data/docs/ApiResponseEconomicIndices.md +9 -0
- data/docs/ApiResponseFilings.md +9 -0
- data/docs/ApiResponseHistoricalData.md +9 -0
- data/docs/ApiResponseNews.md +9 -0
- data/docs/ApiResponseReportedFinancials.md +10 -0
- data/docs/ApiResponseSICIndexHistoricalData.md +10 -0
- data/docs/ApiResponseSICIndices.md +9 -0
- data/docs/ApiResponseSecurities.md +9 -0
- data/docs/ApiResponseSecurityHistoricalData.md +10 -0
- data/docs/ApiResponseSecurityStockPriceAdjustments.md +10 -0
- data/docs/ApiResponseSecurityStockPrices.md +10 -0
- data/docs/ApiResponseStandardizedFinancials.md +10 -0
- data/docs/ApiResponseStockExchangeSecurities.md +10 -0
- data/docs/ApiResponseStockExchangeStockPriceAdjustments.md +10 -0
- data/docs/ApiResponseStockExchangeStockPrices.md +10 -0
- data/docs/ApiResponseStockExchanges.md +9 -0
- data/docs/ApiResponseStockMarketIndexHistoricalData.md +10 -0
- data/docs/ApiResponseStockMarketIndices.md +9 -0
- data/docs/Company.md +39 -0
- data/docs/CompanyApi.md +659 -0
- data/docs/CompanyFiling.md +17 -0
- data/docs/CompanyNews.md +13 -0
- data/docs/CompanyNewsSummary.md +12 -0
- data/docs/CompanySummary.md +12 -0
- data/docs/DataPointApi.md +96 -0
- data/docs/DataTag.md +17 -0
- data/docs/DataTagApi.md +184 -0
- data/docs/DataTagSummary.md +11 -0
- data/docs/EconomicIndex.md +19 -0
- data/docs/EconomicIndexSummary.md +18 -0
- data/docs/Filing.md +17 -0
- data/docs/FilingApi.md +142 -0
- data/docs/FilingSummary.md +16 -0
- data/docs/Fundamental.md +16 -0
- data/docs/FundamentalSummary.md +15 -0
- data/docs/FundamentalsApi.md +181 -0
- data/docs/HistoricalData.md +9 -0
- data/docs/HistoricalDataApi.md +64 -0
- data/docs/IndexApi.md +800 -0
- data/docs/ReportedFinancial.md +9 -0
- data/docs/ReportedTag.md +14 -0
- data/docs/SICIndex.md +12 -0
- data/docs/Security.md +34 -0
- data/docs/SecurityApi.md +420 -0
- data/docs/SecurityScreenClause.md +10 -0
- data/docs/SecurityScreenGroup.md +10 -0
- data/docs/SecurityScreenResult.md +9 -0
- data/docs/SecurityScreenResultData.md +10 -0
- data/docs/SecuritySummary.md +17 -0
- data/docs/StandardizedFinancial.md +9 -0
- data/docs/StockExchange.md +17 -0
- data/docs/StockExchangeApi.md +267 -0
- data/docs/StockMarketIndex.md +17 -0
- data/docs/StockMarketIndexSummary.md +16 -0
- data/docs/StockPrice.md +21 -0
- data/docs/StockPriceAdjustment.md +12 -0
- data/docs/StockPriceAdjustmentSummary.md +13 -0
- data/docs/StockPriceSummary.md +20 -0
- data/git_push.sh +55 -0
- data/intrinio-sdk.gemspec +45 -0
- data/lib/intrinio-sdk.rb +105 -0
- data/lib/intrinio-sdk/api/company_api.rb +885 -0
- data/lib/intrinio-sdk/api/data_point_api.rb +141 -0
- data/lib/intrinio-sdk/api/data_tag_api.rb +251 -0
- data/lib/intrinio-sdk/api/filing_api.rb +192 -0
- data/lib/intrinio-sdk/api/fundamentals_api.rb +261 -0
- data/lib/intrinio-sdk/api/historical_data_api.rb +100 -0
- data/lib/intrinio-sdk/api/index_api.rb +1079 -0
- data/lib/intrinio-sdk/api/security_api.rb +568 -0
- data/lib/intrinio-sdk/api/stock_exchange_api.rb +353 -0
- data/lib/intrinio-sdk/api_client.rb +389 -0
- data/lib/intrinio-sdk/api_error.rb +38 -0
- data/lib/intrinio-sdk/configuration.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_companies.rb +200 -0
- data/lib/intrinio-sdk/models/api_response_company_filings.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_company_fundamentals.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_company_historical_data.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_company_news.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_company_securities.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_data_tags.rb +200 -0
- data/lib/intrinio-sdk/models/api_response_economic_index_historical_data.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_economic_indices.rb +200 -0
- data/lib/intrinio-sdk/models/api_response_filings.rb +200 -0
- data/lib/intrinio-sdk/models/api_response_historical_data.rb +200 -0
- data/lib/intrinio-sdk/models/api_response_news.rb +200 -0
- data/lib/intrinio-sdk/models/api_response_reported_financials.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_securities.rb +200 -0
- data/lib/intrinio-sdk/models/api_response_security_historical_data.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_security_stock_price_adjustments.rb +211 -0
- data/lib/intrinio-sdk/models/api_response_security_stock_prices.rb +211 -0
- data/lib/intrinio-sdk/models/api_response_sic_index_historical_data.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_sic_indices.rb +200 -0
- data/lib/intrinio-sdk/models/api_response_standardized_financials.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_stock_exchange_securities.rb +211 -0
- data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_price_adjustments.rb +211 -0
- data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_prices.rb +211 -0
- data/lib/intrinio-sdk/models/api_response_stock_exchanges.rb +200 -0
- data/lib/intrinio-sdk/models/api_response_stock_market_index_historical_data.rb +209 -0
- data/lib/intrinio-sdk/models/api_response_stock_market_indices.rb +200 -0
- data/lib/intrinio-sdk/models/company.rb +498 -0
- data/lib/intrinio-sdk/models/company_filing.rb +278 -0
- data/lib/intrinio-sdk/models/company_news.rb +239 -0
- data/lib/intrinio-sdk/models/company_news_summary.rb +229 -0
- data/lib/intrinio-sdk/models/company_summary.rb +229 -0
- data/lib/intrinio-sdk/models/data_tag.rb +312 -0
- data/lib/intrinio-sdk/models/data_tag_summary.rb +219 -0
- data/lib/intrinio-sdk/models/economic_index.rb +299 -0
- data/lib/intrinio-sdk/models/economic_index_summary.rb +289 -0
- data/lib/intrinio-sdk/models/filing.rb +278 -0
- data/lib/intrinio-sdk/models/filing_summary.rb +269 -0
- data/lib/intrinio-sdk/models/fundamental.rb +302 -0
- data/lib/intrinio-sdk/models/fundamental_summary.rb +292 -0
- data/lib/intrinio-sdk/models/historical_data.rb +199 -0
- data/lib/intrinio-sdk/models/reported_financial.rb +198 -0
- data/lib/intrinio-sdk/models/reported_tag.rb +249 -0
- data/lib/intrinio-sdk/models/security.rb +453 -0
- data/lib/intrinio-sdk/models/security_screen_clause.rb +242 -0
- data/lib/intrinio-sdk/models/security_screen_group.rb +213 -0
- data/lib/intrinio-sdk/models/security_screen_result.rb +199 -0
- data/lib/intrinio-sdk/models/security_screen_result_data.rb +209 -0
- data/lib/intrinio-sdk/models/security_summary.rb +279 -0
- data/lib/intrinio-sdk/models/sic_index.rb +229 -0
- data/lib/intrinio-sdk/models/standardized_financial.rb +198 -0
- data/lib/intrinio-sdk/models/stock_exchange.rb +279 -0
- data/lib/intrinio-sdk/models/stock_market_index.rb +279 -0
- data/lib/intrinio-sdk/models/stock_market_index_summary.rb +269 -0
- data/lib/intrinio-sdk/models/stock_price.rb +352 -0
- data/lib/intrinio-sdk/models/stock_price_adjustment.rb +229 -0
- data/lib/intrinio-sdk/models/stock_price_adjustment_summary.rb +239 -0
- data/lib/intrinio-sdk/models/stock_price_summary.rb +342 -0
- data/lib/intrinio-sdk/version.rb +15 -0
- data/spec/api/company_api_spec.rb +233 -0
- data/spec/api/data_point_api_spec.rb +61 -0
- data/spec/api/data_tag_api_spec.rb +88 -0
- data/spec/api/filing_api_spec.rb +75 -0
- data/spec/api/fundamentals_api_spec.rb +86 -0
- data/spec/api/historical_data_api_spec.rb +53 -0
- data/spec/api/index_api_spec.rb +275 -0
- data/spec/api/security_api_spec.rb +161 -0
- data/spec/api/stock_exchange_api_spec.rb +113 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/api_response_companies_spec.rb +48 -0
- data/spec/models/api_response_company_filings_spec.rb +54 -0
- data/spec/models/api_response_company_fundamentals_spec.rb +54 -0
- data/spec/models/api_response_company_historical_data_spec.rb +54 -0
- data/spec/models/api_response_company_news_spec.rb +54 -0
- data/spec/models/api_response_company_securities_spec.rb +54 -0
- data/spec/models/api_response_data_tags_spec.rb +48 -0
- data/spec/models/api_response_economic_index_historical_data_spec.rb +54 -0
- data/spec/models/api_response_economic_indices_spec.rb +48 -0
- data/spec/models/api_response_filings_spec.rb +48 -0
- data/spec/models/api_response_historical_data_spec.rb +48 -0
- data/spec/models/api_response_news_spec.rb +48 -0
- data/spec/models/api_response_reported_financials_spec.rb +54 -0
- data/spec/models/api_response_securities_spec.rb +48 -0
- data/spec/models/api_response_security_historical_data_spec.rb +54 -0
- data/spec/models/api_response_security_stock_price_adjustments_spec.rb +54 -0
- data/spec/models/api_response_security_stock_prices_spec.rb +54 -0
- data/spec/models/api_response_sic_index_historical_data_spec.rb +54 -0
- data/spec/models/api_response_sic_indices_spec.rb +48 -0
- data/spec/models/api_response_standardized_financials_spec.rb +54 -0
- data/spec/models/api_response_stock_exchange_securities_spec.rb +54 -0
- data/spec/models/api_response_stock_exchange_stock_price_adjustments_spec.rb +54 -0
- data/spec/models/api_response_stock_exchange_stock_prices_spec.rb +54 -0
- data/spec/models/api_response_stock_exchanges_spec.rb +48 -0
- data/spec/models/api_response_stock_market_index_historical_data_spec.rb +54 -0
- data/spec/models/api_response_stock_market_indices_spec.rb +48 -0
- data/spec/models/company_filing_spec.rb +96 -0
- data/spec/models/company_news_spec.rb +72 -0
- data/spec/models/company_news_summary_spec.rb +66 -0
- data/spec/models/company_spec.rb +228 -0
- data/spec/models/company_summary_spec.rb +66 -0
- data/spec/models/data_tag_spec.rb +100 -0
- data/spec/models/data_tag_summary_spec.rb +60 -0
- data/spec/models/economic_index_spec.rb +108 -0
- data/spec/models/economic_index_summary_spec.rb +102 -0
- data/spec/models/filing_spec.rb +96 -0
- data/spec/models/filing_summary_spec.rb +90 -0
- data/spec/models/fundamental_spec.rb +94 -0
- data/spec/models/fundamental_summary_spec.rb +88 -0
- data/spec/models/historical_data_spec.rb +48 -0
- data/spec/models/reported_financial_spec.rb +48 -0
- data/spec/models/reported_tag_spec.rb +78 -0
- data/spec/models/security_screen_clause_spec.rb +58 -0
- data/spec/models/security_screen_group_spec.rb +54 -0
- data/spec/models/security_screen_result_data_spec.rb +54 -0
- data/spec/models/security_screen_result_spec.rb +48 -0
- data/spec/models/security_spec.rb +198 -0
- data/spec/models/security_summary_spec.rb +96 -0
- data/spec/models/sic_index_spec.rb +66 -0
- data/spec/models/standardized_financial_spec.rb +48 -0
- data/spec/models/stock_exchange_spec.rb +96 -0
- data/spec/models/stock_market_index_spec.rb +96 -0
- data/spec/models/stock_market_index_summary_spec.rb +90 -0
- data/spec/models/stock_price_adjustment_spec.rb +66 -0
- data/spec/models/stock_price_adjustment_summary_spec.rb +72 -0
- data/spec/models/stock_price_spec.rb +124 -0
- data/spec/models/stock_price_summary_spec.rb +118 -0
- data/spec/spec_helper.rb +111 -0
- metadata +509 -0
|
@@ -0,0 +1,453 @@
|
|
|
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.0.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 financial instrument representing shares of ownership in a publicly-traded company
|
|
17
|
+
class Security
|
|
18
|
+
# The Intrinio ID for the Security
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# The Intrinio ID for the company for which the Security is issued
|
|
22
|
+
attr_accessor :company_id
|
|
23
|
+
|
|
24
|
+
# The name of the Security
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# The Security's type
|
|
28
|
+
attr_accessor :type
|
|
29
|
+
|
|
30
|
+
# A 2-3 digit code classifying the Security
|
|
31
|
+
attr_accessor :code
|
|
32
|
+
|
|
33
|
+
# The Security's share class (if applicable)
|
|
34
|
+
attr_accessor :share_class
|
|
35
|
+
|
|
36
|
+
# The currency in which the Security is traded on the exchange
|
|
37
|
+
attr_accessor :currency
|
|
38
|
+
|
|
39
|
+
# The normal unit of trading
|
|
40
|
+
attr_accessor :round_lot_size
|
|
41
|
+
|
|
42
|
+
# The common ticker
|
|
43
|
+
attr_accessor :ticker
|
|
44
|
+
|
|
45
|
+
# The exchange-level ticker
|
|
46
|
+
attr_accessor :exchange_ticker
|
|
47
|
+
|
|
48
|
+
# The country-composite ticker
|
|
49
|
+
attr_accessor :composite_ticker
|
|
50
|
+
|
|
51
|
+
# Alternate formats of the common ticker
|
|
52
|
+
attr_accessor :alternate_tickers
|
|
53
|
+
|
|
54
|
+
# The exchange-level OpenFIGI identifier
|
|
55
|
+
attr_accessor :figi
|
|
56
|
+
|
|
57
|
+
# Central Index Key issued by the SEC, which is the unique identifier for all owner filings
|
|
58
|
+
attr_accessor :cik
|
|
59
|
+
|
|
60
|
+
# The country-composite OpenFIGI identifier
|
|
61
|
+
attr_accessor :composite_figi
|
|
62
|
+
|
|
63
|
+
# The global-composite OpenFIGI identifier
|
|
64
|
+
attr_accessor :share_class_figi
|
|
65
|
+
|
|
66
|
+
# The OpenFIGI unique ID
|
|
67
|
+
attr_accessor :figi_uniqueid
|
|
68
|
+
|
|
69
|
+
# If true, the Security is active and has been recently traded
|
|
70
|
+
attr_accessor :active
|
|
71
|
+
|
|
72
|
+
# If true, this Security is an ETF
|
|
73
|
+
attr_accessor :etf
|
|
74
|
+
|
|
75
|
+
# If true, the Security is no longer traded on the exchange
|
|
76
|
+
attr_accessor :delisted
|
|
77
|
+
|
|
78
|
+
# If true, the Security is the primary issue for the company, otherwise it is a secondary issue on a secondary stock exchange
|
|
79
|
+
attr_accessor :primary_listing
|
|
80
|
+
|
|
81
|
+
# If true, the Security is considered by Intrinio to be the primary Security for its company
|
|
82
|
+
attr_accessor :primary_security
|
|
83
|
+
|
|
84
|
+
# The date of the first recorded stock price
|
|
85
|
+
attr_accessor :first_stock_price
|
|
86
|
+
|
|
87
|
+
# The date of the last recorded stock price (or the most recent trading day)
|
|
88
|
+
attr_accessor :last_stock_price
|
|
89
|
+
|
|
90
|
+
# The date of the last stock price adjustment (dividend, split, etc)
|
|
91
|
+
attr_accessor :last_stock_price_adjustment
|
|
92
|
+
|
|
93
|
+
# The date of the last corporate action
|
|
94
|
+
attr_accessor :last_corporate_action
|
|
95
|
+
|
|
96
|
+
# Previous tickers used by this security
|
|
97
|
+
attr_accessor :previous_tickers
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
101
|
+
def self.attribute_map
|
|
102
|
+
{
|
|
103
|
+
:'id' => :'id',
|
|
104
|
+
:'company_id' => :'company_id',
|
|
105
|
+
:'name' => :'name',
|
|
106
|
+
:'type' => :'type',
|
|
107
|
+
:'code' => :'code',
|
|
108
|
+
:'share_class' => :'share_class',
|
|
109
|
+
:'currency' => :'currency',
|
|
110
|
+
:'round_lot_size' => :'round_lot_size',
|
|
111
|
+
:'ticker' => :'ticker',
|
|
112
|
+
:'exchange_ticker' => :'exchange_ticker',
|
|
113
|
+
:'composite_ticker' => :'composite_ticker',
|
|
114
|
+
:'alternate_tickers' => :'alternate_tickers',
|
|
115
|
+
:'figi' => :'figi',
|
|
116
|
+
:'cik' => :'cik',
|
|
117
|
+
:'composite_figi' => :'composite_figi',
|
|
118
|
+
:'share_class_figi' => :'share_class_figi',
|
|
119
|
+
:'figi_uniqueid' => :'figi_uniqueid',
|
|
120
|
+
:'active' => :'active',
|
|
121
|
+
:'etf' => :'etf',
|
|
122
|
+
:'delisted' => :'delisted',
|
|
123
|
+
:'primary_listing' => :'primary_listing',
|
|
124
|
+
:'primary_security' => :'primary_security',
|
|
125
|
+
:'first_stock_price' => :'first_stock_price',
|
|
126
|
+
:'last_stock_price' => :'last_stock_price',
|
|
127
|
+
:'last_stock_price_adjustment' => :'last_stock_price_adjustment',
|
|
128
|
+
:'last_corporate_action' => :'last_corporate_action',
|
|
129
|
+
:'previous_tickers' => :'previous_tickers'
|
|
130
|
+
}
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Attribute type mapping.
|
|
134
|
+
def self.swagger_types
|
|
135
|
+
{
|
|
136
|
+
:'id' => :'String',
|
|
137
|
+
:'company_id' => :'String',
|
|
138
|
+
:'name' => :'String',
|
|
139
|
+
:'type' => :'String',
|
|
140
|
+
:'code' => :'String',
|
|
141
|
+
:'share_class' => :'String',
|
|
142
|
+
:'currency' => :'String',
|
|
143
|
+
:'round_lot_size' => :'Float',
|
|
144
|
+
:'ticker' => :'String',
|
|
145
|
+
:'exchange_ticker' => :'String',
|
|
146
|
+
:'composite_ticker' => :'String',
|
|
147
|
+
:'alternate_tickers' => :'Array<String>',
|
|
148
|
+
:'figi' => :'String',
|
|
149
|
+
:'cik' => :'String',
|
|
150
|
+
:'composite_figi' => :'String',
|
|
151
|
+
:'share_class_figi' => :'String',
|
|
152
|
+
:'figi_uniqueid' => :'String',
|
|
153
|
+
:'active' => :'BOOLEAN',
|
|
154
|
+
:'etf' => :'BOOLEAN',
|
|
155
|
+
:'delisted' => :'BOOLEAN',
|
|
156
|
+
:'primary_listing' => :'BOOLEAN',
|
|
157
|
+
:'primary_security' => :'BOOLEAN',
|
|
158
|
+
:'first_stock_price' => :'Date',
|
|
159
|
+
:'last_stock_price' => :'Date',
|
|
160
|
+
:'last_stock_price_adjustment' => :'Date',
|
|
161
|
+
:'last_corporate_action' => :'Date',
|
|
162
|
+
:'previous_tickers' => :'Array<String>'
|
|
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?(:'id')
|
|
175
|
+
self.id = attributes[:'id']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.has_key?(:'company_id')
|
|
179
|
+
self.company_id = attributes[:'company_id']
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.has_key?(:'name')
|
|
183
|
+
self.name = attributes[:'name']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.has_key?(:'type')
|
|
187
|
+
self.type = attributes[:'type']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.has_key?(:'code')
|
|
191
|
+
self.code = attributes[:'code']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.has_key?(:'share_class')
|
|
195
|
+
self.share_class = attributes[:'share_class']
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.has_key?(:'currency')
|
|
199
|
+
self.currency = attributes[:'currency']
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.has_key?(:'round_lot_size')
|
|
203
|
+
self.round_lot_size = attributes[:'round_lot_size']
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if attributes.has_key?(:'ticker')
|
|
207
|
+
self.ticker = attributes[:'ticker']
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if attributes.has_key?(:'exchange_ticker')
|
|
211
|
+
self.exchange_ticker = attributes[:'exchange_ticker']
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if attributes.has_key?(:'composite_ticker')
|
|
215
|
+
self.composite_ticker = attributes[:'composite_ticker']
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if attributes.has_key?(:'alternate_tickers')
|
|
219
|
+
if (value = attributes[:'alternate_tickers']).is_a?(Array)
|
|
220
|
+
self.alternate_tickers = value
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if attributes.has_key?(:'figi')
|
|
225
|
+
self.figi = attributes[:'figi']
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
if attributes.has_key?(:'cik')
|
|
229
|
+
self.cik = attributes[:'cik']
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
if attributes.has_key?(:'composite_figi')
|
|
233
|
+
self.composite_figi = attributes[:'composite_figi']
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if attributes.has_key?(:'share_class_figi')
|
|
237
|
+
self.share_class_figi = attributes[:'share_class_figi']
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
if attributes.has_key?(:'figi_uniqueid')
|
|
241
|
+
self.figi_uniqueid = attributes[:'figi_uniqueid']
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
if attributes.has_key?(:'active')
|
|
245
|
+
self.active = attributes[:'active']
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if attributes.has_key?(:'etf')
|
|
249
|
+
self.etf = attributes[:'etf']
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if attributes.has_key?(:'delisted')
|
|
253
|
+
self.delisted = attributes[:'delisted']
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
if attributes.has_key?(:'primary_listing')
|
|
257
|
+
self.primary_listing = attributes[:'primary_listing']
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if attributes.has_key?(:'primary_security')
|
|
261
|
+
self.primary_security = attributes[:'primary_security']
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
if attributes.has_key?(:'first_stock_price')
|
|
265
|
+
self.first_stock_price = attributes[:'first_stock_price']
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
if attributes.has_key?(:'last_stock_price')
|
|
269
|
+
self.last_stock_price = attributes[:'last_stock_price']
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if attributes.has_key?(:'last_stock_price_adjustment')
|
|
273
|
+
self.last_stock_price_adjustment = attributes[:'last_stock_price_adjustment']
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
if attributes.has_key?(:'last_corporate_action')
|
|
277
|
+
self.last_corporate_action = attributes[:'last_corporate_action']
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
if attributes.has_key?(:'previous_tickers')
|
|
281
|
+
if (value = attributes[:'previous_tickers']).is_a?(Array)
|
|
282
|
+
self.previous_tickers = value
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
289
|
+
# @return Array for valid properties with the reasons
|
|
290
|
+
def list_invalid_properties
|
|
291
|
+
invalid_properties = Array.new
|
|
292
|
+
return invalid_properties
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Check to see if the all the properties in the model are valid
|
|
296
|
+
# @return true if the model is valid
|
|
297
|
+
def valid?
|
|
298
|
+
return true
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Checks equality by comparing each attribute.
|
|
302
|
+
# @param [Object] Object to be compared
|
|
303
|
+
def ==(o)
|
|
304
|
+
return true if self.equal?(o)
|
|
305
|
+
self.class == o.class &&
|
|
306
|
+
id == o.id &&
|
|
307
|
+
company_id == o.company_id &&
|
|
308
|
+
name == o.name &&
|
|
309
|
+
type == o.type &&
|
|
310
|
+
code == o.code &&
|
|
311
|
+
share_class == o.share_class &&
|
|
312
|
+
currency == o.currency &&
|
|
313
|
+
round_lot_size == o.round_lot_size &&
|
|
314
|
+
ticker == o.ticker &&
|
|
315
|
+
exchange_ticker == o.exchange_ticker &&
|
|
316
|
+
composite_ticker == o.composite_ticker &&
|
|
317
|
+
alternate_tickers == o.alternate_tickers &&
|
|
318
|
+
figi == o.figi &&
|
|
319
|
+
cik == o.cik &&
|
|
320
|
+
composite_figi == o.composite_figi &&
|
|
321
|
+
share_class_figi == o.share_class_figi &&
|
|
322
|
+
figi_uniqueid == o.figi_uniqueid &&
|
|
323
|
+
active == o.active &&
|
|
324
|
+
etf == o.etf &&
|
|
325
|
+
delisted == o.delisted &&
|
|
326
|
+
primary_listing == o.primary_listing &&
|
|
327
|
+
primary_security == o.primary_security &&
|
|
328
|
+
first_stock_price == o.first_stock_price &&
|
|
329
|
+
last_stock_price == o.last_stock_price &&
|
|
330
|
+
last_stock_price_adjustment == o.last_stock_price_adjustment &&
|
|
331
|
+
last_corporate_action == o.last_corporate_action &&
|
|
332
|
+
previous_tickers == o.previous_tickers
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# @see the `==` method
|
|
336
|
+
# @param [Object] Object to be compared
|
|
337
|
+
def eql?(o)
|
|
338
|
+
self == o
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
# Calculates hash code according to all attributes.
|
|
342
|
+
# @return [Fixnum] Hash code
|
|
343
|
+
def hash
|
|
344
|
+
[id, company_id, name, type, code, share_class, currency, round_lot_size, ticker, exchange_ticker, composite_ticker, alternate_tickers, figi, cik, composite_figi, share_class_figi, figi_uniqueid, active, etf, delisted, primary_listing, primary_security, first_stock_price, last_stock_price, last_stock_price_adjustment, last_corporate_action, previous_tickers].hash
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
# Builds the object from hash
|
|
348
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
349
|
+
# @return [Object] Returns the model itself
|
|
350
|
+
def build_from_hash(attributes)
|
|
351
|
+
return nil unless attributes.is_a?(Hash)
|
|
352
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
353
|
+
if type =~ /\AArray<(.*)>/i
|
|
354
|
+
# check to ensure the input is an array given that the the attribute
|
|
355
|
+
# is documented as an array but the input is not
|
|
356
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
357
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
358
|
+
end
|
|
359
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
360
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
361
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
self
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
# Deserializes the data based on type
|
|
368
|
+
# @param string type Data type
|
|
369
|
+
# @param string value Value to be deserialized
|
|
370
|
+
# @return [Object] Deserialized data
|
|
371
|
+
def _deserialize(type, value)
|
|
372
|
+
case type.to_sym
|
|
373
|
+
when :DateTime
|
|
374
|
+
DateTime.parse(value)
|
|
375
|
+
when :Date
|
|
376
|
+
Date.parse(value)
|
|
377
|
+
when :String
|
|
378
|
+
value.to_s
|
|
379
|
+
when :Integer
|
|
380
|
+
value.to_i
|
|
381
|
+
when :Float
|
|
382
|
+
value.to_f
|
|
383
|
+
when :BOOLEAN
|
|
384
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
385
|
+
true
|
|
386
|
+
else
|
|
387
|
+
false
|
|
388
|
+
end
|
|
389
|
+
when :Object
|
|
390
|
+
# generic object (usually a Hash), return directly
|
|
391
|
+
value
|
|
392
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
393
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
394
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
395
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
396
|
+
k_type = Regexp.last_match[:k_type]
|
|
397
|
+
v_type = Regexp.last_match[:v_type]
|
|
398
|
+
{}.tap do |hash|
|
|
399
|
+
value.each do |k, v|
|
|
400
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
401
|
+
end
|
|
402
|
+
end
|
|
403
|
+
else # model
|
|
404
|
+
temp_model = Intrinio.const_get(type).new
|
|
405
|
+
temp_model.build_from_hash(value)
|
|
406
|
+
end
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# Returns the string representation of the object
|
|
410
|
+
# @return [String] String presentation of the object
|
|
411
|
+
def to_s
|
|
412
|
+
to_hash.to_s
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
416
|
+
# @return [Hash] Returns the object in the form of hash
|
|
417
|
+
def to_body
|
|
418
|
+
to_hash
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
# Returns the object in the form of hash
|
|
422
|
+
# @return [Hash] Returns the object in the form of hash
|
|
423
|
+
def to_hash
|
|
424
|
+
hash = {}
|
|
425
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
426
|
+
value = self.send(attr)
|
|
427
|
+
next if value.nil?
|
|
428
|
+
hash[param] = _to_hash(value)
|
|
429
|
+
end
|
|
430
|
+
hash
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
# Outputs non-array value in the form of hash
|
|
434
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
435
|
+
# @param [Object] value Any valid value
|
|
436
|
+
# @return [Hash] Returns the value in the form of hash
|
|
437
|
+
def _to_hash(value)
|
|
438
|
+
if value.is_a?(Array)
|
|
439
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
440
|
+
elsif value.is_a?(Hash)
|
|
441
|
+
{}.tap do |hash|
|
|
442
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
443
|
+
end
|
|
444
|
+
elsif value.respond_to? :to_hash
|
|
445
|
+
value.to_hash
|
|
446
|
+
else
|
|
447
|
+
value
|
|
448
|
+
end
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
end
|
|
452
|
+
|
|
453
|
+
end
|