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.
Files changed (213) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +176 -0
  4. data/Rakefile +8 -0
  5. data/docs/ApiResponseCompanies.md +9 -0
  6. data/docs/ApiResponseCompanyFilings.md +10 -0
  7. data/docs/ApiResponseCompanyFundamentals.md +10 -0
  8. data/docs/ApiResponseCompanyHistoricalData.md +10 -0
  9. data/docs/ApiResponseCompanyNews.md +10 -0
  10. data/docs/ApiResponseCompanySecurities.md +10 -0
  11. data/docs/ApiResponseDataTags.md +9 -0
  12. data/docs/ApiResponseEconomicIndexHistoricalData.md +10 -0
  13. data/docs/ApiResponseEconomicIndices.md +9 -0
  14. data/docs/ApiResponseFilings.md +9 -0
  15. data/docs/ApiResponseHistoricalData.md +9 -0
  16. data/docs/ApiResponseNews.md +9 -0
  17. data/docs/ApiResponseReportedFinancials.md +10 -0
  18. data/docs/ApiResponseSICIndexHistoricalData.md +10 -0
  19. data/docs/ApiResponseSICIndices.md +9 -0
  20. data/docs/ApiResponseSecurities.md +9 -0
  21. data/docs/ApiResponseSecurityHistoricalData.md +10 -0
  22. data/docs/ApiResponseSecurityStockPriceAdjustments.md +10 -0
  23. data/docs/ApiResponseSecurityStockPrices.md +10 -0
  24. data/docs/ApiResponseStandardizedFinancials.md +10 -0
  25. data/docs/ApiResponseStockExchangeSecurities.md +10 -0
  26. data/docs/ApiResponseStockExchangeStockPriceAdjustments.md +10 -0
  27. data/docs/ApiResponseStockExchangeStockPrices.md +10 -0
  28. data/docs/ApiResponseStockExchanges.md +9 -0
  29. data/docs/ApiResponseStockMarketIndexHistoricalData.md +10 -0
  30. data/docs/ApiResponseStockMarketIndices.md +9 -0
  31. data/docs/Company.md +39 -0
  32. data/docs/CompanyApi.md +659 -0
  33. data/docs/CompanyFiling.md +17 -0
  34. data/docs/CompanyNews.md +13 -0
  35. data/docs/CompanyNewsSummary.md +12 -0
  36. data/docs/CompanySummary.md +12 -0
  37. data/docs/DataPointApi.md +96 -0
  38. data/docs/DataTag.md +17 -0
  39. data/docs/DataTagApi.md +184 -0
  40. data/docs/DataTagSummary.md +11 -0
  41. data/docs/EconomicIndex.md +19 -0
  42. data/docs/EconomicIndexSummary.md +18 -0
  43. data/docs/Filing.md +17 -0
  44. data/docs/FilingApi.md +142 -0
  45. data/docs/FilingSummary.md +16 -0
  46. data/docs/Fundamental.md +16 -0
  47. data/docs/FundamentalSummary.md +15 -0
  48. data/docs/FundamentalsApi.md +181 -0
  49. data/docs/HistoricalData.md +9 -0
  50. data/docs/HistoricalDataApi.md +64 -0
  51. data/docs/IndexApi.md +800 -0
  52. data/docs/ReportedFinancial.md +9 -0
  53. data/docs/ReportedTag.md +14 -0
  54. data/docs/SICIndex.md +12 -0
  55. data/docs/Security.md +34 -0
  56. data/docs/SecurityApi.md +420 -0
  57. data/docs/SecurityScreenClause.md +10 -0
  58. data/docs/SecurityScreenGroup.md +10 -0
  59. data/docs/SecurityScreenResult.md +9 -0
  60. data/docs/SecurityScreenResultData.md +10 -0
  61. data/docs/SecuritySummary.md +17 -0
  62. data/docs/StandardizedFinancial.md +9 -0
  63. data/docs/StockExchange.md +17 -0
  64. data/docs/StockExchangeApi.md +267 -0
  65. data/docs/StockMarketIndex.md +17 -0
  66. data/docs/StockMarketIndexSummary.md +16 -0
  67. data/docs/StockPrice.md +21 -0
  68. data/docs/StockPriceAdjustment.md +12 -0
  69. data/docs/StockPriceAdjustmentSummary.md +13 -0
  70. data/docs/StockPriceSummary.md +20 -0
  71. data/git_push.sh +55 -0
  72. data/intrinio-sdk.gemspec +45 -0
  73. data/lib/intrinio-sdk.rb +105 -0
  74. data/lib/intrinio-sdk/api/company_api.rb +885 -0
  75. data/lib/intrinio-sdk/api/data_point_api.rb +141 -0
  76. data/lib/intrinio-sdk/api/data_tag_api.rb +251 -0
  77. data/lib/intrinio-sdk/api/filing_api.rb +192 -0
  78. data/lib/intrinio-sdk/api/fundamentals_api.rb +261 -0
  79. data/lib/intrinio-sdk/api/historical_data_api.rb +100 -0
  80. data/lib/intrinio-sdk/api/index_api.rb +1079 -0
  81. data/lib/intrinio-sdk/api/security_api.rb +568 -0
  82. data/lib/intrinio-sdk/api/stock_exchange_api.rb +353 -0
  83. data/lib/intrinio-sdk/api_client.rb +389 -0
  84. data/lib/intrinio-sdk/api_error.rb +38 -0
  85. data/lib/intrinio-sdk/configuration.rb +209 -0
  86. data/lib/intrinio-sdk/models/api_response_companies.rb +200 -0
  87. data/lib/intrinio-sdk/models/api_response_company_filings.rb +209 -0
  88. data/lib/intrinio-sdk/models/api_response_company_fundamentals.rb +209 -0
  89. data/lib/intrinio-sdk/models/api_response_company_historical_data.rb +209 -0
  90. data/lib/intrinio-sdk/models/api_response_company_news.rb +209 -0
  91. data/lib/intrinio-sdk/models/api_response_company_securities.rb +209 -0
  92. data/lib/intrinio-sdk/models/api_response_data_tags.rb +200 -0
  93. data/lib/intrinio-sdk/models/api_response_economic_index_historical_data.rb +209 -0
  94. data/lib/intrinio-sdk/models/api_response_economic_indices.rb +200 -0
  95. data/lib/intrinio-sdk/models/api_response_filings.rb +200 -0
  96. data/lib/intrinio-sdk/models/api_response_historical_data.rb +200 -0
  97. data/lib/intrinio-sdk/models/api_response_news.rb +200 -0
  98. data/lib/intrinio-sdk/models/api_response_reported_financials.rb +209 -0
  99. data/lib/intrinio-sdk/models/api_response_securities.rb +200 -0
  100. data/lib/intrinio-sdk/models/api_response_security_historical_data.rb +209 -0
  101. data/lib/intrinio-sdk/models/api_response_security_stock_price_adjustments.rb +211 -0
  102. data/lib/intrinio-sdk/models/api_response_security_stock_prices.rb +211 -0
  103. data/lib/intrinio-sdk/models/api_response_sic_index_historical_data.rb +209 -0
  104. data/lib/intrinio-sdk/models/api_response_sic_indices.rb +200 -0
  105. data/lib/intrinio-sdk/models/api_response_standardized_financials.rb +209 -0
  106. data/lib/intrinio-sdk/models/api_response_stock_exchange_securities.rb +211 -0
  107. data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_price_adjustments.rb +211 -0
  108. data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_prices.rb +211 -0
  109. data/lib/intrinio-sdk/models/api_response_stock_exchanges.rb +200 -0
  110. data/lib/intrinio-sdk/models/api_response_stock_market_index_historical_data.rb +209 -0
  111. data/lib/intrinio-sdk/models/api_response_stock_market_indices.rb +200 -0
  112. data/lib/intrinio-sdk/models/company.rb +498 -0
  113. data/lib/intrinio-sdk/models/company_filing.rb +278 -0
  114. data/lib/intrinio-sdk/models/company_news.rb +239 -0
  115. data/lib/intrinio-sdk/models/company_news_summary.rb +229 -0
  116. data/lib/intrinio-sdk/models/company_summary.rb +229 -0
  117. data/lib/intrinio-sdk/models/data_tag.rb +312 -0
  118. data/lib/intrinio-sdk/models/data_tag_summary.rb +219 -0
  119. data/lib/intrinio-sdk/models/economic_index.rb +299 -0
  120. data/lib/intrinio-sdk/models/economic_index_summary.rb +289 -0
  121. data/lib/intrinio-sdk/models/filing.rb +278 -0
  122. data/lib/intrinio-sdk/models/filing_summary.rb +269 -0
  123. data/lib/intrinio-sdk/models/fundamental.rb +302 -0
  124. data/lib/intrinio-sdk/models/fundamental_summary.rb +292 -0
  125. data/lib/intrinio-sdk/models/historical_data.rb +199 -0
  126. data/lib/intrinio-sdk/models/reported_financial.rb +198 -0
  127. data/lib/intrinio-sdk/models/reported_tag.rb +249 -0
  128. data/lib/intrinio-sdk/models/security.rb +453 -0
  129. data/lib/intrinio-sdk/models/security_screen_clause.rb +242 -0
  130. data/lib/intrinio-sdk/models/security_screen_group.rb +213 -0
  131. data/lib/intrinio-sdk/models/security_screen_result.rb +199 -0
  132. data/lib/intrinio-sdk/models/security_screen_result_data.rb +209 -0
  133. data/lib/intrinio-sdk/models/security_summary.rb +279 -0
  134. data/lib/intrinio-sdk/models/sic_index.rb +229 -0
  135. data/lib/intrinio-sdk/models/standardized_financial.rb +198 -0
  136. data/lib/intrinio-sdk/models/stock_exchange.rb +279 -0
  137. data/lib/intrinio-sdk/models/stock_market_index.rb +279 -0
  138. data/lib/intrinio-sdk/models/stock_market_index_summary.rb +269 -0
  139. data/lib/intrinio-sdk/models/stock_price.rb +352 -0
  140. data/lib/intrinio-sdk/models/stock_price_adjustment.rb +229 -0
  141. data/lib/intrinio-sdk/models/stock_price_adjustment_summary.rb +239 -0
  142. data/lib/intrinio-sdk/models/stock_price_summary.rb +342 -0
  143. data/lib/intrinio-sdk/version.rb +15 -0
  144. data/spec/api/company_api_spec.rb +233 -0
  145. data/spec/api/data_point_api_spec.rb +61 -0
  146. data/spec/api/data_tag_api_spec.rb +88 -0
  147. data/spec/api/filing_api_spec.rb +75 -0
  148. data/spec/api/fundamentals_api_spec.rb +86 -0
  149. data/spec/api/historical_data_api_spec.rb +53 -0
  150. data/spec/api/index_api_spec.rb +275 -0
  151. data/spec/api/security_api_spec.rb +161 -0
  152. data/spec/api/stock_exchange_api_spec.rb +113 -0
  153. data/spec/api_client_spec.rb +226 -0
  154. data/spec/configuration_spec.rb +42 -0
  155. data/spec/models/api_response_companies_spec.rb +48 -0
  156. data/spec/models/api_response_company_filings_spec.rb +54 -0
  157. data/spec/models/api_response_company_fundamentals_spec.rb +54 -0
  158. data/spec/models/api_response_company_historical_data_spec.rb +54 -0
  159. data/spec/models/api_response_company_news_spec.rb +54 -0
  160. data/spec/models/api_response_company_securities_spec.rb +54 -0
  161. data/spec/models/api_response_data_tags_spec.rb +48 -0
  162. data/spec/models/api_response_economic_index_historical_data_spec.rb +54 -0
  163. data/spec/models/api_response_economic_indices_spec.rb +48 -0
  164. data/spec/models/api_response_filings_spec.rb +48 -0
  165. data/spec/models/api_response_historical_data_spec.rb +48 -0
  166. data/spec/models/api_response_news_spec.rb +48 -0
  167. data/spec/models/api_response_reported_financials_spec.rb +54 -0
  168. data/spec/models/api_response_securities_spec.rb +48 -0
  169. data/spec/models/api_response_security_historical_data_spec.rb +54 -0
  170. data/spec/models/api_response_security_stock_price_adjustments_spec.rb +54 -0
  171. data/spec/models/api_response_security_stock_prices_spec.rb +54 -0
  172. data/spec/models/api_response_sic_index_historical_data_spec.rb +54 -0
  173. data/spec/models/api_response_sic_indices_spec.rb +48 -0
  174. data/spec/models/api_response_standardized_financials_spec.rb +54 -0
  175. data/spec/models/api_response_stock_exchange_securities_spec.rb +54 -0
  176. data/spec/models/api_response_stock_exchange_stock_price_adjustments_spec.rb +54 -0
  177. data/spec/models/api_response_stock_exchange_stock_prices_spec.rb +54 -0
  178. data/spec/models/api_response_stock_exchanges_spec.rb +48 -0
  179. data/spec/models/api_response_stock_market_index_historical_data_spec.rb +54 -0
  180. data/spec/models/api_response_stock_market_indices_spec.rb +48 -0
  181. data/spec/models/company_filing_spec.rb +96 -0
  182. data/spec/models/company_news_spec.rb +72 -0
  183. data/spec/models/company_news_summary_spec.rb +66 -0
  184. data/spec/models/company_spec.rb +228 -0
  185. data/spec/models/company_summary_spec.rb +66 -0
  186. data/spec/models/data_tag_spec.rb +100 -0
  187. data/spec/models/data_tag_summary_spec.rb +60 -0
  188. data/spec/models/economic_index_spec.rb +108 -0
  189. data/spec/models/economic_index_summary_spec.rb +102 -0
  190. data/spec/models/filing_spec.rb +96 -0
  191. data/spec/models/filing_summary_spec.rb +90 -0
  192. data/spec/models/fundamental_spec.rb +94 -0
  193. data/spec/models/fundamental_summary_spec.rb +88 -0
  194. data/spec/models/historical_data_spec.rb +48 -0
  195. data/spec/models/reported_financial_spec.rb +48 -0
  196. data/spec/models/reported_tag_spec.rb +78 -0
  197. data/spec/models/security_screen_clause_spec.rb +58 -0
  198. data/spec/models/security_screen_group_spec.rb +54 -0
  199. data/spec/models/security_screen_result_data_spec.rb +54 -0
  200. data/spec/models/security_screen_result_spec.rb +48 -0
  201. data/spec/models/security_spec.rb +198 -0
  202. data/spec/models/security_summary_spec.rb +96 -0
  203. data/spec/models/sic_index_spec.rb +66 -0
  204. data/spec/models/standardized_financial_spec.rb +48 -0
  205. data/spec/models/stock_exchange_spec.rb +96 -0
  206. data/spec/models/stock_market_index_spec.rb +96 -0
  207. data/spec/models/stock_market_index_summary_spec.rb +90 -0
  208. data/spec/models/stock_price_adjustment_spec.rb +66 -0
  209. data/spec/models/stock_price_adjustment_summary_spec.rb +72 -0
  210. data/spec/models/stock_price_spec.rb +124 -0
  211. data/spec/models/stock_price_summary_spec.rb +118 -0
  212. data/spec/spec_helper.rb +111 -0
  213. metadata +509 -0
@@ -0,0 +1,498 @@
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 company that submits filings to the SEC and has a security traded primarily on a US exchange
17
+ class Company
18
+ # The Intrinio ID of the company
19
+ attr_accessor :id
20
+
21
+ # The stock market ticker symbol associated with the company's common stock securities
22
+ attr_accessor :ticker
23
+
24
+ # The company's common name
25
+ attr_accessor :name
26
+
27
+ # The Legal Entity Identifier (LEI) assigned to the company
28
+ attr_accessor :lei
29
+
30
+ # The company's official legal name
31
+ attr_accessor :legal_name
32
+
33
+ # The Stock Exchange where the company's common stock is primarily traded
34
+ attr_accessor :stock_exchange
35
+
36
+ # The Standard Industrial Classification (SIC) determined by the company and filed with the SEC
37
+ attr_accessor :sic
38
+
39
+ # A one or two sentence description of the company's operations
40
+ attr_accessor :short_description
41
+
42
+ # A one paragraph description of the company's operations and other corporate actions
43
+ attr_accessor :long_description
44
+
45
+ # The Chief Executive Officer of the company
46
+ attr_accessor :ceo
47
+
48
+ # The URL of the company's primary corporate website or primary internet property
49
+ attr_accessor :company_url
50
+
51
+ # The company's business address
52
+ attr_accessor :business_address
53
+
54
+ # The mailing address reported by the company
55
+ attr_accessor :mailing_address
56
+
57
+ # The phone number reported by the company
58
+ attr_accessor :business_phone_no
59
+
60
+ # The company's headquarters address - line 1
61
+ attr_accessor :hq_address1
62
+
63
+ # The company's headquarters address - line 2
64
+ attr_accessor :hq_address2
65
+
66
+ # The company's headquarters city
67
+ attr_accessor :hq_address_city
68
+
69
+ # The company's headquarters postal code
70
+ attr_accessor :hq_address_postal_code
71
+
72
+ # The company's legal organization form
73
+ attr_accessor :entity_legal_form
74
+
75
+ # The Central Index Key (CIK) assigned to the company by the SEC as a unique identifier, used in SEC filings
76
+ attr_accessor :cik
77
+
78
+ # The date of the company's last filing with the SEC
79
+ attr_accessor :latest_filing_date
80
+
81
+ # The state (US & Canada Only) where the company headquarters are located
82
+ attr_accessor :hq_state
83
+
84
+ # The country where the company headquarters are located
85
+ attr_accessor :hq_country
86
+
87
+ # The state (US & Canada Only) where the company is incorporated
88
+ attr_accessor :inc_state
89
+
90
+ # The country where the company is incorporated
91
+ attr_accessor :inc_country
92
+
93
+ # The number of employees working for the company
94
+ attr_accessor :employees
95
+
96
+ attr_accessor :entity_status
97
+
98
+ # The company's operating sector
99
+ attr_accessor :sector
100
+
101
+ # The company's operating industry category
102
+ attr_accessor :industry_category
103
+
104
+ # The company's operating industry group
105
+ attr_accessor :industry_group
106
+
107
+ # The financial statement template used by Intrinio to standardize the as reported data
108
+ attr_accessor :template
109
+
110
+ # If true, the company has standardized and as reported fundamental data via the Intrinio API; if false, the company has as-reported data only
111
+ attr_accessor :standardized_active
112
+
113
+
114
+ # Attribute mapping from ruby-style variable name to JSON key.
115
+ def self.attribute_map
116
+ {
117
+ :'id' => :'id',
118
+ :'ticker' => :'ticker',
119
+ :'name' => :'name',
120
+ :'lei' => :'lei',
121
+ :'legal_name' => :'legal_name',
122
+ :'stock_exchange' => :'stock_exchange',
123
+ :'sic' => :'sic',
124
+ :'short_description' => :'short_description',
125
+ :'long_description' => :'long_description',
126
+ :'ceo' => :'ceo',
127
+ :'company_url' => :'company_url',
128
+ :'business_address' => :'business_address',
129
+ :'mailing_address' => :'mailing_address',
130
+ :'business_phone_no' => :'business_phone_no',
131
+ :'hq_address1' => :'hq_address1',
132
+ :'hq_address2' => :'hq_address2',
133
+ :'hq_address_city' => :'hq_address_city',
134
+ :'hq_address_postal_code' => :'hq_address_postal_code',
135
+ :'entity_legal_form' => :'entity_legal_form',
136
+ :'cik' => :'cik',
137
+ :'latest_filing_date' => :'latest_filing_date',
138
+ :'hq_state' => :'hq_state',
139
+ :'hq_country' => :'hq_country',
140
+ :'inc_state' => :'inc_state',
141
+ :'inc_country' => :'inc_country',
142
+ :'employees' => :'employees',
143
+ :'entity_status' => :'entity_status',
144
+ :'sector' => :'sector',
145
+ :'industry_category' => :'industry_category',
146
+ :'industry_group' => :'industry_group',
147
+ :'template' => :'template',
148
+ :'standardized_active' => :'standardized_active'
149
+ }
150
+ end
151
+
152
+ # Attribute type mapping.
153
+ def self.swagger_types
154
+ {
155
+ :'id' => :'String',
156
+ :'ticker' => :'String',
157
+ :'name' => :'String',
158
+ :'lei' => :'String',
159
+ :'legal_name' => :'String',
160
+ :'stock_exchange' => :'String',
161
+ :'sic' => :'String',
162
+ :'short_description' => :'String',
163
+ :'long_description' => :'String',
164
+ :'ceo' => :'String',
165
+ :'company_url' => :'String',
166
+ :'business_address' => :'String',
167
+ :'mailing_address' => :'String',
168
+ :'business_phone_no' => :'String',
169
+ :'hq_address1' => :'String',
170
+ :'hq_address2' => :'String',
171
+ :'hq_address_city' => :'String',
172
+ :'hq_address_postal_code' => :'String',
173
+ :'entity_legal_form' => :'String',
174
+ :'cik' => :'String',
175
+ :'latest_filing_date' => :'Date',
176
+ :'hq_state' => :'String',
177
+ :'hq_country' => :'String',
178
+ :'inc_state' => :'String',
179
+ :'inc_country' => :'String',
180
+ :'employees' => :'Integer',
181
+ :'entity_status' => :'String',
182
+ :'sector' => :'String',
183
+ :'industry_category' => :'String',
184
+ :'industry_group' => :'String',
185
+ :'template' => :'String',
186
+ :'standardized_active' => :'BOOLEAN'
187
+ }
188
+ end
189
+
190
+ # Initializes the object
191
+ # @param [Hash] attributes Model attributes in the form of hash
192
+ def initialize(attributes = {})
193
+ return unless attributes.is_a?(Hash)
194
+
195
+ # convert string to symbol for hash key
196
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
197
+
198
+ if attributes.has_key?(:'id')
199
+ self.id = attributes[:'id']
200
+ end
201
+
202
+ if attributes.has_key?(:'ticker')
203
+ self.ticker = attributes[:'ticker']
204
+ end
205
+
206
+ if attributes.has_key?(:'name')
207
+ self.name = attributes[:'name']
208
+ end
209
+
210
+ if attributes.has_key?(:'lei')
211
+ self.lei = attributes[:'lei']
212
+ end
213
+
214
+ if attributes.has_key?(:'legal_name')
215
+ self.legal_name = attributes[:'legal_name']
216
+ end
217
+
218
+ if attributes.has_key?(:'stock_exchange')
219
+ self.stock_exchange = attributes[:'stock_exchange']
220
+ end
221
+
222
+ if attributes.has_key?(:'sic')
223
+ self.sic = attributes[:'sic']
224
+ end
225
+
226
+ if attributes.has_key?(:'short_description')
227
+ self.short_description = attributes[:'short_description']
228
+ end
229
+
230
+ if attributes.has_key?(:'long_description')
231
+ self.long_description = attributes[:'long_description']
232
+ end
233
+
234
+ if attributes.has_key?(:'ceo')
235
+ self.ceo = attributes[:'ceo']
236
+ end
237
+
238
+ if attributes.has_key?(:'company_url')
239
+ self.company_url = attributes[:'company_url']
240
+ end
241
+
242
+ if attributes.has_key?(:'business_address')
243
+ self.business_address = attributes[:'business_address']
244
+ end
245
+
246
+ if attributes.has_key?(:'mailing_address')
247
+ self.mailing_address = attributes[:'mailing_address']
248
+ end
249
+
250
+ if attributes.has_key?(:'business_phone_no')
251
+ self.business_phone_no = attributes[:'business_phone_no']
252
+ end
253
+
254
+ if attributes.has_key?(:'hq_address1')
255
+ self.hq_address1 = attributes[:'hq_address1']
256
+ end
257
+
258
+ if attributes.has_key?(:'hq_address2')
259
+ self.hq_address2 = attributes[:'hq_address2']
260
+ end
261
+
262
+ if attributes.has_key?(:'hq_address_city')
263
+ self.hq_address_city = attributes[:'hq_address_city']
264
+ end
265
+
266
+ if attributes.has_key?(:'hq_address_postal_code')
267
+ self.hq_address_postal_code = attributes[:'hq_address_postal_code']
268
+ end
269
+
270
+ if attributes.has_key?(:'entity_legal_form')
271
+ self.entity_legal_form = attributes[:'entity_legal_form']
272
+ end
273
+
274
+ if attributes.has_key?(:'cik')
275
+ self.cik = attributes[:'cik']
276
+ end
277
+
278
+ if attributes.has_key?(:'latest_filing_date')
279
+ self.latest_filing_date = attributes[:'latest_filing_date']
280
+ end
281
+
282
+ if attributes.has_key?(:'hq_state')
283
+ self.hq_state = attributes[:'hq_state']
284
+ end
285
+
286
+ if attributes.has_key?(:'hq_country')
287
+ self.hq_country = attributes[:'hq_country']
288
+ end
289
+
290
+ if attributes.has_key?(:'inc_state')
291
+ self.inc_state = attributes[:'inc_state']
292
+ end
293
+
294
+ if attributes.has_key?(:'inc_country')
295
+ self.inc_country = attributes[:'inc_country']
296
+ end
297
+
298
+ if attributes.has_key?(:'employees')
299
+ self.employees = attributes[:'employees']
300
+ end
301
+
302
+ if attributes.has_key?(:'entity_status')
303
+ self.entity_status = attributes[:'entity_status']
304
+ end
305
+
306
+ if attributes.has_key?(:'sector')
307
+ self.sector = attributes[:'sector']
308
+ end
309
+
310
+ if attributes.has_key?(:'industry_category')
311
+ self.industry_category = attributes[:'industry_category']
312
+ end
313
+
314
+ if attributes.has_key?(:'industry_group')
315
+ self.industry_group = attributes[:'industry_group']
316
+ end
317
+
318
+ if attributes.has_key?(:'template')
319
+ self.template = attributes[:'template']
320
+ end
321
+
322
+ if attributes.has_key?(:'standardized_active')
323
+ self.standardized_active = attributes[:'standardized_active']
324
+ end
325
+
326
+ end
327
+
328
+ # Show invalid properties with the reasons. Usually used together with valid?
329
+ # @return Array for valid properties with the reasons
330
+ def list_invalid_properties
331
+ invalid_properties = Array.new
332
+ return invalid_properties
333
+ end
334
+
335
+ # Check to see if the all the properties in the model are valid
336
+ # @return true if the model is valid
337
+ def valid?
338
+ return true
339
+ end
340
+
341
+ # Checks equality by comparing each attribute.
342
+ # @param [Object] Object to be compared
343
+ def ==(o)
344
+ return true if self.equal?(o)
345
+ self.class == o.class &&
346
+ id == o.id &&
347
+ ticker == o.ticker &&
348
+ name == o.name &&
349
+ lei == o.lei &&
350
+ legal_name == o.legal_name &&
351
+ stock_exchange == o.stock_exchange &&
352
+ sic == o.sic &&
353
+ short_description == o.short_description &&
354
+ long_description == o.long_description &&
355
+ ceo == o.ceo &&
356
+ company_url == o.company_url &&
357
+ business_address == o.business_address &&
358
+ mailing_address == o.mailing_address &&
359
+ business_phone_no == o.business_phone_no &&
360
+ hq_address1 == o.hq_address1 &&
361
+ hq_address2 == o.hq_address2 &&
362
+ hq_address_city == o.hq_address_city &&
363
+ hq_address_postal_code == o.hq_address_postal_code &&
364
+ entity_legal_form == o.entity_legal_form &&
365
+ cik == o.cik &&
366
+ latest_filing_date == o.latest_filing_date &&
367
+ hq_state == o.hq_state &&
368
+ hq_country == o.hq_country &&
369
+ inc_state == o.inc_state &&
370
+ inc_country == o.inc_country &&
371
+ employees == o.employees &&
372
+ entity_status == o.entity_status &&
373
+ sector == o.sector &&
374
+ industry_category == o.industry_category &&
375
+ industry_group == o.industry_group &&
376
+ template == o.template &&
377
+ standardized_active == o.standardized_active
378
+ end
379
+
380
+ # @see the `==` method
381
+ # @param [Object] Object to be compared
382
+ def eql?(o)
383
+ self == o
384
+ end
385
+
386
+ # Calculates hash code according to all attributes.
387
+ # @return [Fixnum] Hash code
388
+ def hash
389
+ [id, ticker, name, lei, legal_name, stock_exchange, sic, short_description, long_description, ceo, company_url, business_address, mailing_address, business_phone_no, hq_address1, hq_address2, hq_address_city, hq_address_postal_code, entity_legal_form, cik, latest_filing_date, hq_state, hq_country, inc_state, inc_country, employees, entity_status, sector, industry_category, industry_group, template, standardized_active].hash
390
+ end
391
+
392
+ # Builds the object from hash
393
+ # @param [Hash] attributes Model attributes in the form of hash
394
+ # @return [Object] Returns the model itself
395
+ def build_from_hash(attributes)
396
+ return nil unless attributes.is_a?(Hash)
397
+ self.class.swagger_types.each_pair do |key, type|
398
+ if type =~ /\AArray<(.*)>/i
399
+ # check to ensure the input is an array given that the the attribute
400
+ # is documented as an array but the input is not
401
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
402
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
403
+ end
404
+ elsif !attributes[self.class.attribute_map[key]].nil?
405
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
406
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
407
+ end
408
+
409
+ self
410
+ end
411
+
412
+ # Deserializes the data based on type
413
+ # @param string type Data type
414
+ # @param string value Value to be deserialized
415
+ # @return [Object] Deserialized data
416
+ def _deserialize(type, value)
417
+ case type.to_sym
418
+ when :DateTime
419
+ DateTime.parse(value)
420
+ when :Date
421
+ Date.parse(value)
422
+ when :String
423
+ value.to_s
424
+ when :Integer
425
+ value.to_i
426
+ when :Float
427
+ value.to_f
428
+ when :BOOLEAN
429
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
430
+ true
431
+ else
432
+ false
433
+ end
434
+ when :Object
435
+ # generic object (usually a Hash), return directly
436
+ value
437
+ when /\AArray<(?<inner_type>.+)>\z/
438
+ inner_type = Regexp.last_match[:inner_type]
439
+ value.map { |v| _deserialize(inner_type, v) }
440
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
441
+ k_type = Regexp.last_match[:k_type]
442
+ v_type = Regexp.last_match[:v_type]
443
+ {}.tap do |hash|
444
+ value.each do |k, v|
445
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
446
+ end
447
+ end
448
+ else # model
449
+ temp_model = Intrinio.const_get(type).new
450
+ temp_model.build_from_hash(value)
451
+ end
452
+ end
453
+
454
+ # Returns the string representation of the object
455
+ # @return [String] String presentation of the object
456
+ def to_s
457
+ to_hash.to_s
458
+ end
459
+
460
+ # to_body is an alias to to_hash (backward compatibility)
461
+ # @return [Hash] Returns the object in the form of hash
462
+ def to_body
463
+ to_hash
464
+ end
465
+
466
+ # Returns the object in the form of hash
467
+ # @return [Hash] Returns the object in the form of hash
468
+ def to_hash
469
+ hash = {}
470
+ self.class.attribute_map.each_pair do |attr, param|
471
+ value = self.send(attr)
472
+ next if value.nil?
473
+ hash[param] = _to_hash(value)
474
+ end
475
+ hash
476
+ end
477
+
478
+ # Outputs non-array value in the form of hash
479
+ # For object, use to_hash. Otherwise, just return the value
480
+ # @param [Object] value Any valid value
481
+ # @return [Hash] Returns the value in the form of hash
482
+ def _to_hash(value)
483
+ if value.is_a?(Array)
484
+ value.compact.map{ |v| _to_hash(v) }
485
+ elsif value.is_a?(Hash)
486
+ {}.tap do |hash|
487
+ value.each { |k, v| hash[k] = _to_hash(v) }
488
+ end
489
+ elsif value.respond_to? :to_hash
490
+ value.to_hash
491
+ else
492
+ value
493
+ end
494
+ end
495
+
496
+ end
497
+
498
+ end