intrinio-sdk 1.1.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -8
  3. data/docs/ApiResponseCompaniesSearch.md +8 -0
  4. data/docs/ApiResponseDataTagsSearch.md +8 -0
  5. data/docs/ApiResponseEconomicIndicesSearch.md +8 -0
  6. data/docs/ApiResponseMunicipalities.md +9 -0
  7. data/docs/ApiResponseMunicipalitiyFinancials.md +9 -0
  8. data/docs/ApiResponseSICIndicesSearch.md +8 -0
  9. data/docs/ApiResponseSecuritiesSearch.md +8 -0
  10. data/docs/ApiResponseSecurityIntradayPrices.md +11 -0
  11. data/docs/ApiResponseStockMarketIndicesSearch.md +8 -0
  12. data/docs/CompanyApi.md +44 -115
  13. data/docs/DataTagApi.md +15 -51
  14. data/docs/FilingApi.md +19 -97
  15. data/docs/FundamentalSummary.md +1 -1
  16. data/docs/HistoricalDataApi.md +2 -0
  17. data/docs/IndexApi.md +33 -9
  18. data/docs/IntradayStockPrice.md +15 -0
  19. data/docs/Municipality.md +26 -0
  20. data/docs/MunicipalityApi.md +158 -0
  21. data/docs/MunicipalityFinancial.md +49 -0
  22. data/docs/RealtimeStockPrice.md +1 -1
  23. data/docs/SecurityApi.md +71 -4
  24. data/docs/StockExchangeApi.md +17 -42
  25. data/intrinio-sdk.gemspec +1 -1
  26. data/lib/intrinio-sdk.rb +14 -1
  27. data/lib/intrinio-sdk/api/company_api.rb +97 -154
  28. data/lib/intrinio-sdk/api/data_point_api.rb +1 -1
  29. data/lib/intrinio-sdk/api/data_tag_api.rb +27 -63
  30. data/lib/intrinio-sdk/api/filing_api.rb +42 -121
  31. data/lib/intrinio-sdk/api/fundamentals_api.rb +1 -1
  32. data/lib/intrinio-sdk/api/historical_data_api.rb +8 -1
  33. data/lib/intrinio-sdk/api/index_api.rb +73 -10
  34. data/lib/intrinio-sdk/api/municipality_api.rb +221 -0
  35. data/lib/intrinio-sdk/api/security_api.rb +117 -4
  36. data/lib/intrinio-sdk/api/stock_exchange_api.rb +45 -57
  37. data/lib/intrinio-sdk/api_client.rb +1 -1
  38. data/lib/intrinio-sdk/api_error.rb +1 -1
  39. data/lib/intrinio-sdk/configuration.rb +1 -1
  40. data/lib/intrinio-sdk/models/api_response_companies.rb +1 -1
  41. data/lib/intrinio-sdk/models/api_response_companies_search.rb +190 -0
  42. data/lib/intrinio-sdk/models/api_response_company_filings.rb +1 -1
  43. data/lib/intrinio-sdk/models/api_response_company_fundamentals.rb +1 -1
  44. data/lib/intrinio-sdk/models/api_response_company_historical_data.rb +1 -1
  45. data/lib/intrinio-sdk/models/api_response_company_news.rb +1 -1
  46. data/lib/intrinio-sdk/models/api_response_company_securities.rb +1 -1
  47. data/lib/intrinio-sdk/models/api_response_data_tags.rb +1 -1
  48. data/lib/intrinio-sdk/models/api_response_data_tags_search.rb +190 -0
  49. data/lib/intrinio-sdk/models/api_response_economic_index_historical_data.rb +1 -1
  50. data/lib/intrinio-sdk/models/api_response_economic_indices.rb +1 -1
  51. data/lib/intrinio-sdk/models/api_response_economic_indices_search.rb +190 -0
  52. data/lib/intrinio-sdk/models/api_response_filing_notes.rb +1 -1
  53. data/lib/intrinio-sdk/models/api_response_filing_notes_search.rb +1 -1
  54. data/lib/intrinio-sdk/models/api_response_filings.rb +1 -1
  55. data/lib/intrinio-sdk/models/api_response_historical_data.rb +1 -1
  56. data/lib/intrinio-sdk/models/api_response_municipalities.rb +200 -0
  57. data/lib/intrinio-sdk/models/api_response_municipalitiy_financials.rb +199 -0
  58. data/lib/intrinio-sdk/models/api_response_news.rb +1 -1
  59. data/lib/intrinio-sdk/models/api_response_reported_financials.rb +1 -1
  60. data/lib/intrinio-sdk/models/api_response_securities.rb +1 -1
  61. data/lib/intrinio-sdk/models/api_response_securities_search.rb +190 -0
  62. data/lib/intrinio-sdk/models/api_response_security_historical_data.rb +1 -1
  63. data/lib/intrinio-sdk/models/api_response_security_intraday_prices.rb +254 -0
  64. data/lib/intrinio-sdk/models/api_response_security_stock_price_adjustments.rb +1 -1
  65. data/lib/intrinio-sdk/models/api_response_security_stock_prices.rb +1 -1
  66. data/lib/intrinio-sdk/models/api_response_sic_index_historical_data.rb +1 -1
  67. data/lib/intrinio-sdk/models/api_response_sic_indices.rb +1 -1
  68. data/lib/intrinio-sdk/models/api_response_sic_indices_search.rb +190 -0
  69. data/lib/intrinio-sdk/models/api_response_standardized_financials.rb +1 -1
  70. data/lib/intrinio-sdk/models/api_response_stock_exchange_realtime_stock_prices.rb +1 -1
  71. data/lib/intrinio-sdk/models/api_response_stock_exchange_securities.rb +1 -1
  72. data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_price_adjustments.rb +1 -1
  73. data/lib/intrinio-sdk/models/api_response_stock_exchange_stock_prices.rb +1 -1
  74. data/lib/intrinio-sdk/models/api_response_stock_exchanges.rb +1 -1
  75. data/lib/intrinio-sdk/models/api_response_stock_market_index_historical_data.rb +1 -1
  76. data/lib/intrinio-sdk/models/api_response_stock_market_indices.rb +1 -1
  77. data/lib/intrinio-sdk/models/api_response_stock_market_indices_search.rb +190 -0
  78. data/lib/intrinio-sdk/models/company.rb +1 -1
  79. data/lib/intrinio-sdk/models/company_filing.rb +1 -1
  80. data/lib/intrinio-sdk/models/company_news.rb +1 -1
  81. data/lib/intrinio-sdk/models/company_news_summary.rb +1 -1
  82. data/lib/intrinio-sdk/models/company_summary.rb +1 -1
  83. data/lib/intrinio-sdk/models/data_tag.rb +1 -1
  84. data/lib/intrinio-sdk/models/data_tag_summary.rb +1 -1
  85. data/lib/intrinio-sdk/models/dividend_record.rb +1 -1
  86. data/lib/intrinio-sdk/models/earnings_record.rb +1 -1
  87. data/lib/intrinio-sdk/models/economic_index.rb +1 -1
  88. data/lib/intrinio-sdk/models/economic_index_summary.rb +1 -1
  89. data/lib/intrinio-sdk/models/filing.rb +1 -1
  90. data/lib/intrinio-sdk/models/filing_note.rb +1 -1
  91. data/lib/intrinio-sdk/models/filing_note_filing.rb +1 -1
  92. data/lib/intrinio-sdk/models/filing_note_summary.rb +1 -1
  93. data/lib/intrinio-sdk/models/filing_summary.rb +1 -1
  94. data/lib/intrinio-sdk/models/fundamental.rb +1 -1
  95. data/lib/intrinio-sdk/models/fundamental_summary.rb +2 -2
  96. data/lib/intrinio-sdk/models/historical_data.rb +1 -1
  97. data/lib/intrinio-sdk/models/intraday_stock_price.rb +259 -0
  98. data/lib/intrinio-sdk/models/municipality.rb +369 -0
  99. data/lib/intrinio-sdk/models/municipality_financial.rb +599 -0
  100. data/lib/intrinio-sdk/models/realtime_stock_price.rb +2 -2
  101. data/lib/intrinio-sdk/models/realtime_stock_price_security.rb +1 -1
  102. data/lib/intrinio-sdk/models/reported_financial.rb +1 -1
  103. data/lib/intrinio-sdk/models/reported_tag.rb +1 -1
  104. data/lib/intrinio-sdk/models/security.rb +1 -1
  105. data/lib/intrinio-sdk/models/security_screen_clause.rb +1 -1
  106. data/lib/intrinio-sdk/models/security_screen_group.rb +1 -1
  107. data/lib/intrinio-sdk/models/security_screen_result.rb +1 -1
  108. data/lib/intrinio-sdk/models/security_screen_result_data.rb +1 -1
  109. data/lib/intrinio-sdk/models/security_summary.rb +1 -1
  110. data/lib/intrinio-sdk/models/sic_index.rb +1 -1
  111. data/lib/intrinio-sdk/models/standardized_financial.rb +1 -1
  112. data/lib/intrinio-sdk/models/stock_exchange.rb +1 -1
  113. data/lib/intrinio-sdk/models/stock_market_index.rb +1 -1
  114. data/lib/intrinio-sdk/models/stock_market_index_summary.rb +1 -1
  115. data/lib/intrinio-sdk/models/stock_price.rb +1 -1
  116. data/lib/intrinio-sdk/models/stock_price_adjustment.rb +1 -1
  117. data/lib/intrinio-sdk/models/stock_price_adjustment_summary.rb +1 -1
  118. data/lib/intrinio-sdk/models/stock_price_summary.rb +1 -1
  119. data/lib/intrinio-sdk/version.rb +2 -2
  120. data/spec/api/company_api_spec.rb +37 -54
  121. data/spec/api/data_point_api_spec.rb +3 -3
  122. data/spec/api/data_tag_api_spec.rb +9 -19
  123. data/spec/api/filing_api_spec.rb +73 -12
  124. data/spec/api/fundamentals_api_spec.rb +6 -6
  125. data/spec/api/historical_data_api_spec.rb +3 -2
  126. data/spec/api/index_api_spec.rb +28 -19
  127. data/spec/api/municipality_api_spec.rb +84 -0
  128. data/spec/api/security_api_spec.rb +74 -13
  129. data/spec/api/stock_exchange_api_spec.rb +31 -23
  130. data/spec/api_client_spec.rb +1 -1
  131. data/spec/configuration_spec.rb +1 -1
  132. data/spec/models/api_response_companies_search_spec.rb +42 -0
  133. data/spec/models/api_response_companies_spec.rb +1 -1
  134. data/spec/models/api_response_company_filings_spec.rb +1 -1
  135. data/spec/models/api_response_company_fundamentals_spec.rb +1 -1
  136. data/spec/models/api_response_company_historical_data_spec.rb +1 -1
  137. data/spec/models/api_response_company_news_spec.rb +1 -1
  138. data/spec/models/api_response_company_securities_spec.rb +1 -1
  139. data/spec/models/api_response_data_tags_search_spec.rb +42 -0
  140. data/spec/models/api_response_data_tags_spec.rb +1 -1
  141. data/spec/models/api_response_economic_index_historical_data_spec.rb +1 -1
  142. data/spec/models/api_response_economic_indices_search_spec.rb +42 -0
  143. data/spec/models/api_response_economic_indices_spec.rb +1 -1
  144. data/spec/models/api_response_filings_spec.rb +1 -1
  145. data/spec/models/api_response_historical_data_spec.rb +1 -1
  146. data/spec/models/api_response_municipalities_spec.rb +48 -0
  147. data/spec/models/api_response_municipalitiy_financials_spec.rb +48 -0
  148. data/spec/models/api_response_news_spec.rb +1 -1
  149. data/spec/models/api_response_reported_financials_spec.rb +1 -1
  150. data/spec/models/api_response_securities_search_spec.rb +42 -0
  151. data/spec/models/api_response_securities_spec.rb +1 -1
  152. data/spec/models/api_response_security_historical_data_spec.rb +1 -1
  153. data/spec/models/api_response_security_intraday_prices_spec.rb +64 -0
  154. data/spec/models/api_response_security_stock_price_adjustments_spec.rb +1 -1
  155. data/spec/models/api_response_security_stock_prices_spec.rb +1 -1
  156. data/spec/models/api_response_sic_index_historical_data_spec.rb +1 -1
  157. data/spec/models/api_response_sic_indices_search_spec.rb +42 -0
  158. data/spec/models/api_response_sic_indices_spec.rb +1 -1
  159. data/spec/models/api_response_standardized_financials_spec.rb +1 -1
  160. data/spec/models/api_response_stock_exchange_securities_spec.rb +1 -1
  161. data/spec/models/api_response_stock_exchange_stock_price_adjustments_spec.rb +1 -1
  162. data/spec/models/api_response_stock_exchange_stock_prices_spec.rb +1 -1
  163. data/spec/models/api_response_stock_exchanges_spec.rb +1 -1
  164. data/spec/models/api_response_stock_market_index_historical_data_spec.rb +1 -1
  165. data/spec/models/api_response_stock_market_indices_search_spec.rb +42 -0
  166. data/spec/models/api_response_stock_market_indices_spec.rb +1 -1
  167. data/spec/models/company_filing_spec.rb +1 -1
  168. data/spec/models/company_news_spec.rb +1 -1
  169. data/spec/models/company_news_summary_spec.rb +1 -1
  170. data/spec/models/company_spec.rb +1 -1
  171. data/spec/models/company_summary_spec.rb +1 -1
  172. data/spec/models/data_tag_spec.rb +1 -1
  173. data/spec/models/data_tag_summary_spec.rb +1 -1
  174. data/spec/models/economic_index_spec.rb +1 -1
  175. data/spec/models/economic_index_summary_spec.rb +1 -1
  176. data/spec/models/filing_spec.rb +1 -1
  177. data/spec/models/filing_summary_spec.rb +1 -1
  178. data/spec/models/fundamental_spec.rb +1 -1
  179. data/spec/models/fundamental_summary_spec.rb +1 -1
  180. data/spec/models/historical_data_spec.rb +1 -1
  181. data/spec/models/intraday_stock_price_spec.rb +84 -0
  182. data/spec/models/municipality_financial_spec.rb +288 -0
  183. data/spec/models/municipality_spec.rb +150 -0
  184. data/spec/models/reported_financial_spec.rb +1 -1
  185. data/spec/models/reported_tag_spec.rb +1 -1
  186. data/spec/models/security_screen_clause_spec.rb +1 -1
  187. data/spec/models/security_screen_group_spec.rb +1 -1
  188. data/spec/models/security_screen_result_data_spec.rb +1 -1
  189. data/spec/models/security_screen_result_spec.rb +1 -1
  190. data/spec/models/security_spec.rb +1 -1
  191. data/spec/models/security_summary_spec.rb +1 -1
  192. data/spec/models/sic_index_spec.rb +1 -1
  193. data/spec/models/standardized_financial_spec.rb +1 -1
  194. data/spec/models/stock_exchange_spec.rb +1 -1
  195. data/spec/models/stock_market_index_spec.rb +1 -1
  196. data/spec/models/stock_market_index_summary_spec.rb +1 -1
  197. data/spec/models/stock_price_adjustment_spec.rb +7 -1
  198. data/spec/models/stock_price_adjustment_summary_spec.rb +1 -7
  199. data/spec/models/stock_price_spec.rb +1 -1
  200. data/spec/models/stock_price_summary_spec.rb +1 -1
  201. data/spec/spec_helper.rb +1 -1
  202. metadata +54 -3
  203. data/intrinio-sdk-1.1.0.gem +0 -0
@@ -0,0 +1,369 @@
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.1
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 local Municipality
17
+ class Municipality
18
+ # The Intrinio ID for Municipality
19
+ attr_accessor :id
20
+
21
+ # The ID for the census
22
+ attr_accessor :census_id
23
+
24
+ # The government name of the Municipality
25
+ attr_accessor :government_name
26
+
27
+ # The type of government of the Municipality
28
+ attr_accessor :government_type
29
+
30
+ # The primary contact type of the Municipality
31
+ attr_accessor :primary_contact_type
32
+
33
+ # The first line of the address
34
+ attr_accessor :address1
35
+
36
+ # The second line of the address (i.e. suite number)
37
+ attr_accessor :address2
38
+
39
+ # The city in which the Municipality is located in
40
+ attr_accessor :city
41
+
42
+ # The state in which the Municipality is located in
43
+ attr_accessor :state
44
+
45
+ # The zip code in which the Municipality is located in
46
+ attr_accessor :zip
47
+
48
+ # The web site of the Municipality
49
+ attr_accessor :web_site
50
+
51
+ # The population of the Municipality
52
+ attr_accessor :population
53
+
54
+ # The year from which the population of the Municipality was measured
55
+ attr_accessor :population_as_of_year
56
+
57
+ # The enrollment of the Municipality
58
+ attr_accessor :enrollment
59
+
60
+ # The year from which the enrollment of the Municipality was measured
61
+ attr_accessor :enrollment_as_of_year
62
+
63
+ # The name of the area of the Municipality
64
+ attr_accessor :area_name
65
+
66
+ # The type of area of the Municipality
67
+ attr_accessor :area_type
68
+
69
+ # The latitude of the location of the Municipality
70
+ attr_accessor :latitude
71
+
72
+ # The longitude of the location of the Municipality
73
+ attr_accessor :longitude
74
+
75
+
76
+ # Attribute mapping from ruby-style variable name to JSON key.
77
+ def self.attribute_map
78
+ {
79
+ :'id' => :'id',
80
+ :'census_id' => :'census_id',
81
+ :'government_name' => :'government_name',
82
+ :'government_type' => :'government_type',
83
+ :'primary_contact_type' => :'primary_contact_type',
84
+ :'address1' => :'address1',
85
+ :'address2' => :'address2',
86
+ :'city' => :'city',
87
+ :'state' => :'state',
88
+ :'zip' => :'zip',
89
+ :'web_site' => :'web_site',
90
+ :'population' => :'population',
91
+ :'population_as_of_year' => :'population_as_of_year',
92
+ :'enrollment' => :'enrollment',
93
+ :'enrollment_as_of_year' => :'enrollment_as_of_year',
94
+ :'area_name' => :'area_name',
95
+ :'area_type' => :'area_type',
96
+ :'latitude' => :'latitude',
97
+ :'longitude' => :'longitude'
98
+ }
99
+ end
100
+
101
+ # Attribute type mapping.
102
+ def self.swagger_types
103
+ {
104
+ :'id' => :'String',
105
+ :'census_id' => :'Float',
106
+ :'government_name' => :'String',
107
+ :'government_type' => :'String',
108
+ :'primary_contact_type' => :'String',
109
+ :'address1' => :'String',
110
+ :'address2' => :'String',
111
+ :'city' => :'String',
112
+ :'state' => :'String',
113
+ :'zip' => :'String',
114
+ :'web_site' => :'String',
115
+ :'population' => :'Float',
116
+ :'population_as_of_year' => :'Float',
117
+ :'enrollment' => :'Float',
118
+ :'enrollment_as_of_year' => :'Float',
119
+ :'area_name' => :'String',
120
+ :'area_type' => :'String',
121
+ :'latitude' => :'Float',
122
+ :'longitude' => :'Float'
123
+ }
124
+ end
125
+
126
+ # Initializes the object
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ def initialize(attributes = {})
129
+ return unless attributes.is_a?(Hash)
130
+
131
+ # convert string to symbol for hash key
132
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
133
+
134
+ if attributes.has_key?(:'id')
135
+ self.id = attributes[:'id']
136
+ end
137
+
138
+ if attributes.has_key?(:'census_id')
139
+ self.census_id = attributes[:'census_id']
140
+ end
141
+
142
+ if attributes.has_key?(:'government_name')
143
+ self.government_name = attributes[:'government_name']
144
+ end
145
+
146
+ if attributes.has_key?(:'government_type')
147
+ self.government_type = attributes[:'government_type']
148
+ end
149
+
150
+ if attributes.has_key?(:'primary_contact_type')
151
+ self.primary_contact_type = attributes[:'primary_contact_type']
152
+ end
153
+
154
+ if attributes.has_key?(:'address1')
155
+ self.address1 = attributes[:'address1']
156
+ end
157
+
158
+ if attributes.has_key?(:'address2')
159
+ self.address2 = attributes[:'address2']
160
+ end
161
+
162
+ if attributes.has_key?(:'city')
163
+ self.city = attributes[:'city']
164
+ end
165
+
166
+ if attributes.has_key?(:'state')
167
+ self.state = attributes[:'state']
168
+ end
169
+
170
+ if attributes.has_key?(:'zip')
171
+ self.zip = attributes[:'zip']
172
+ end
173
+
174
+ if attributes.has_key?(:'web_site')
175
+ self.web_site = attributes[:'web_site']
176
+ end
177
+
178
+ if attributes.has_key?(:'population')
179
+ self.population = attributes[:'population']
180
+ end
181
+
182
+ if attributes.has_key?(:'population_as_of_year')
183
+ self.population_as_of_year = attributes[:'population_as_of_year']
184
+ end
185
+
186
+ if attributes.has_key?(:'enrollment')
187
+ self.enrollment = attributes[:'enrollment']
188
+ end
189
+
190
+ if attributes.has_key?(:'enrollment_as_of_year')
191
+ self.enrollment_as_of_year = attributes[:'enrollment_as_of_year']
192
+ end
193
+
194
+ if attributes.has_key?(:'area_name')
195
+ self.area_name = attributes[:'area_name']
196
+ end
197
+
198
+ if attributes.has_key?(:'area_type')
199
+ self.area_type = attributes[:'area_type']
200
+ end
201
+
202
+ if attributes.has_key?(:'latitude')
203
+ self.latitude = attributes[:'latitude']
204
+ end
205
+
206
+ if attributes.has_key?(:'longitude')
207
+ self.longitude = attributes[:'longitude']
208
+ end
209
+
210
+ end
211
+
212
+ # Show invalid properties with the reasons. Usually used together with valid?
213
+ # @return Array for valid properties with the reasons
214
+ def list_invalid_properties
215
+ invalid_properties = Array.new
216
+ return invalid_properties
217
+ end
218
+
219
+ # Check to see if the all the properties in the model are valid
220
+ # @return true if the model is valid
221
+ def valid?
222
+ return true
223
+ end
224
+
225
+ # Checks equality by comparing each attribute.
226
+ # @param [Object] Object to be compared
227
+ def ==(o)
228
+ return true if self.equal?(o)
229
+ self.class == o.class &&
230
+ id == o.id &&
231
+ census_id == o.census_id &&
232
+ government_name == o.government_name &&
233
+ government_type == o.government_type &&
234
+ primary_contact_type == o.primary_contact_type &&
235
+ address1 == o.address1 &&
236
+ address2 == o.address2 &&
237
+ city == o.city &&
238
+ state == o.state &&
239
+ zip == o.zip &&
240
+ web_site == o.web_site &&
241
+ population == o.population &&
242
+ population_as_of_year == o.population_as_of_year &&
243
+ enrollment == o.enrollment &&
244
+ enrollment_as_of_year == o.enrollment_as_of_year &&
245
+ area_name == o.area_name &&
246
+ area_type == o.area_type &&
247
+ latitude == o.latitude &&
248
+ longitude == o.longitude
249
+ end
250
+
251
+ # @see the `==` method
252
+ # @param [Object] Object to be compared
253
+ def eql?(o)
254
+ self == o
255
+ end
256
+
257
+ # Calculates hash code according to all attributes.
258
+ # @return [Fixnum] Hash code
259
+ def hash
260
+ [id, census_id, government_name, government_type, primary_contact_type, address1, address2, city, state, zip, web_site, population, population_as_of_year, enrollment, enrollment_as_of_year, area_name, area_type, latitude, longitude].hash
261
+ end
262
+
263
+ # Builds the object from hash
264
+ # @param [Hash] attributes Model attributes in the form of hash
265
+ # @return [Object] Returns the model itself
266
+ def build_from_hash(attributes)
267
+ return nil unless attributes.is_a?(Hash)
268
+ self.class.swagger_types.each_pair do |key, type|
269
+ if type =~ /\AArray<(.*)>/i
270
+ # check to ensure the input is an array given that the the attribute
271
+ # is documented as an array but the input is not
272
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
273
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
274
+ end
275
+ elsif !attributes[self.class.attribute_map[key]].nil?
276
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
277
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
278
+ end
279
+
280
+ self
281
+ end
282
+
283
+ # Deserializes the data based on type
284
+ # @param string type Data type
285
+ # @param string value Value to be deserialized
286
+ # @return [Object] Deserialized data
287
+ def _deserialize(type, value)
288
+ case type.to_sym
289
+ when :DateTime
290
+ DateTime.parse(value)
291
+ when :Date
292
+ Date.parse(value)
293
+ when :String
294
+ value.to_s
295
+ when :Integer
296
+ value.to_i
297
+ when :Float
298
+ value.to_f
299
+ when :BOOLEAN
300
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
301
+ true
302
+ else
303
+ false
304
+ end
305
+ when :Object
306
+ # generic object (usually a Hash), return directly
307
+ value
308
+ when /\AArray<(?<inner_type>.+)>\z/
309
+ inner_type = Regexp.last_match[:inner_type]
310
+ value.map { |v| _deserialize(inner_type, v) }
311
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
312
+ k_type = Regexp.last_match[:k_type]
313
+ v_type = Regexp.last_match[:v_type]
314
+ {}.tap do |hash|
315
+ value.each do |k, v|
316
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
317
+ end
318
+ end
319
+ else # model
320
+ temp_model = Intrinio.const_get(type).new
321
+ temp_model.build_from_hash(value)
322
+ end
323
+ end
324
+
325
+ # Returns the string representation of the object
326
+ # @return [String] String presentation of the object
327
+ def to_s
328
+ to_hash.to_s
329
+ end
330
+
331
+ # to_body is an alias to to_hash (backward compatibility)
332
+ # @return [Hash] Returns the object in the form of hash
333
+ def to_body
334
+ to_hash
335
+ end
336
+
337
+ # Returns the object in the form of hash
338
+ # @return [Hash] Returns the object in the form of hash
339
+ def to_hash
340
+ hash = {}
341
+ self.class.attribute_map.each_pair do |attr, param|
342
+ value = self.send(attr)
343
+ next if value.nil?
344
+ hash[param] = _to_hash(value)
345
+ end
346
+ hash
347
+ end
348
+
349
+ # Outputs non-array value in the form of hash
350
+ # For object, use to_hash. Otherwise, just return the value
351
+ # @param [Object] value Any valid value
352
+ # @return [Hash] Returns the value in the form of hash
353
+ def _to_hash(value)
354
+ if value.is_a?(Array)
355
+ value.compact.map{ |v| _to_hash(v) }
356
+ elsif value.is_a?(Hash)
357
+ {}.tap do |hash|
358
+ value.each { |k, v| hash[k] = _to_hash(v) }
359
+ end
360
+ elsif value.respond_to? :to_hash
361
+ value.to_hash
362
+ else
363
+ value
364
+ end
365
+ end
366
+
367
+ end
368
+
369
+ end
@@ -0,0 +1,599 @@
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.1
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
+ # Financial statement data for a Municipality and a Fiscal Year
17
+ class MunicipalityFinancial
18
+ # The fiscal year from which the financial data came from
19
+ attr_accessor :fiscal_year
20
+
21
+ # Government-wide holdings that can be liquidated on short notice
22
+ attr_accessor :current_assets
23
+
24
+ # Government-wide holdings not intended for near-term liquidation
25
+ attr_accessor :non_current_assets
26
+
27
+ # Government-wide consumptions of net position applicable to a future year
28
+ attr_accessor :deferred_outflows
29
+
30
+ # Government-wide holdings
31
+ attr_accessor :total_assets
32
+
33
+ # Sum of government-wide total assets and deferred outflows of resources
34
+ attr_accessor :total_assets_plus_deferred_outflows
35
+
36
+ # Government-wide liabilities that typically become due within one year
37
+ attr_accessor :current_liabilities
38
+
39
+ # Government-wide portion of long term obligations, such as bond and loan debt coming due within the next year
40
+ attr_accessor :current_portion_of_long_term_debt
41
+
42
+ # Government-wide liability for employee pensions net of the fiduciary net position of pension plans in which the government has an interest
43
+ attr_accessor :net_pension_liability
44
+
45
+ # Government-wide liability for other postemployment benefits (OPEB). These are benefits (such as death benefits, life insurance, disability, and long-term care) that are paid in the period after employment and that are provided separately from a pension plan, as well as healthcare benefits paid in the period after employment, regardless of the manner in which they are provided. OPEB does not include termination benefits or termination payments for sick leave. Liability is reported net of any OPEB assets the government may control.
46
+ attr_accessor :net_opeb_liability
47
+
48
+ # Government-wide liabilities not elsewhere classified
49
+ attr_accessor :all_other_long_term_debt
50
+
51
+ # The sum of the Municipality's all other long term debt, net open liability, net pension liability, and current portion of long term debt
52
+ attr_accessor :total_liabilities
53
+
54
+ # Government-wide acquisitions of net position applicable to a future year
55
+ attr_accessor :deferred_inflows
56
+
57
+ # Sum of government-wide liabilities and deferred inflows of resources
58
+ attr_accessor :total_liabilities_plus_deferred_inflows
59
+
60
+ # Government-wide assets and deferred outflows less government-wide liabilities and deferred inflows
61
+ attr_accessor :total_net_position
62
+
63
+ # Net amount of government-wide assets, deferred outflows of resources, liabilities, and deferred inflows of resources that are not included in the determination of net investment in capital assets or the restricted components of net position
64
+ attr_accessor :total_unrestricted_net_position
65
+
66
+ # Decreases in net position that occurred during the past year, government-wide
67
+ attr_accessor :total_expenses
68
+
69
+ # Charges for services is the term used for a broad category of program revenues that arise from charges to customers, applicants, or others who purchase, use, or directly benefit from the goods, services, or privileges provided, or are otherwise directly affected by the services. Revenues in this category include fees charged for specific services, such as water use or garbage collection; licenses and permits, such as dog licenses, liquor licenses, and building permits; operating special assessments, such as for street cleaning or special street lighting; and any other amounts charged to service recipients. Fines and forfeitures are also included in this category because they result from direct charges to those who are otherwise directly affected by a program or service, even though they receive no benefit. Payments from other governments for goods or services should be reported in this category.
70
+ attr_accessor :charges_for_services
71
+
72
+ # Program-specific grants and contributions - includes revenues arising from mandatory and voluntary nonexchange transactions with other governments, organizations, or individuals that are restricted for use in a particular program. Some grants and contributions consist of capital assets or resources that are restricted for capital purposes—to purchase, construct, or renovate capital assets associated with a specific program. These should be reported separately from grants and contributions that may be used either for operating expenses or for capital expenditures of the program at the discretion of the reporting government. These categories of program revenue are specifically attributable to a program and reduce the net expense of that program to the reporting government. For example, a state may provide an operating grant to a county sheriff's department for a drug-awareness-and-enforcement program.
73
+ attr_accessor :operating_grants_and_contributions
74
+
75
+ # Program-specific grants and contributions - includes revenues arising from mandatory and voluntary nonexchange transactions with other governments, organizations, or individuals that are restricted for use in a particular program. Some grants and contributions consist of capital assets or resources that are restricted for capital purposes—to purchase, construct, or renovate capital assets associated with a specific program. These should be reported separately from grants and contributions that may be used either for operating expenses or for capital expenditures of the program at the discretion of the reporting government. These categories of program revenue are specifically attributable to a program and reduce the net expense of that program to the reporting government. For example, a state may provide a capital grant to finance construction of a new jail.
76
+ attr_accessor :capital_grants_and_contributions
77
+
78
+ # All revenues are general revenues unless they are required to be reported as program revenues. All taxes, even those that are levied for a specific purpose, are general revenues and should be reported by type of tax—for example, sales tax, property tax, franchise tax, income tax. All other nontax revenues (including interest, grants, and contributions) that do not meet the criteria to be reported as program revenues should also be reported as general revenues. General revenues should be reported after total net expense of the government's functions.
79
+ attr_accessor :general_revenues
80
+
81
+ # Government-wide revenues not elsewhere classified
82
+ attr_accessor :other_revenues
83
+
84
+ # Increases in net position that occurred during the past year, government-wide
85
+ attr_accessor :total_revenues
86
+
87
+ # Difference between the government's net position at the end of the fiscal year and the government's net position at the beginning of the fiscal year
88
+ attr_accessor :change_in_net_assets
89
+
90
+ # The portion of general fund balance classified as nonspendable. The nonspendable fund balance classification includes amounts that cannot be spent because they are either (a) not in spendable form or (b) legally or contractually required to be maintained intact. The “not in spendable form” criterion includes items that are not expected to be converted to cash, for example, inventories and prepaid amounts. It also includes the long-term amount of loans and notes receivable, as well as property acquired for resale. However, if the use of the proceeds from the collection of those receivables or from the sale of those properties is restricted, committed, or assigned, then they should be included in the appropriate fund balance classification (restricted, committed, or assigned), rather than nonspendable fund balance. The corpus (or principal) of a permanent fund is an example of an amount that is legally or contractually required to be maintained intact.
91
+ attr_accessor :non_spendable_general_fund_balance
92
+
93
+ # The portion of general fund balance classified as restricted. Fund balance should be reported as restricted when constraints placed on the use of resources are either (a) Externally imposed by creditors (such as through debt covenants), grantors, contributors, or laws or regulations of other governments or (b) Imposed by law through constitutional provisions or enabling legislation.
94
+ attr_accessor :restricted_general_fund_balance
95
+
96
+ # The portion of general fund balance classified as committed. Amounts that can only be used for specific purposes pursuant to constraints imposed by formal action of the government’s highest level of decision-making authority should be reported as committed fund balance. Those committed amounts cannot be used for any other purpose unless the government removes or changes the specified use by taking the same type of action (for example, legislation, resolution, ordinance) it employed to previously commit those amounts. The authorization specifying the purposes for which amounts can be used should have the consent of both the legislative and executive branches of the government, if applicable. Committed fund balance also should incorporate contractual obligations to the extent that existing resources in the fund have been specifically committed for use in satisfying those contractual requirements.
97
+ attr_accessor :committed_general_fund_balance
98
+
99
+ # The portion of general fund balance classified as unassigned. Unassigned fund balance is the residual classification for the general fund. This classification represents fund balance that has not been assigned to other funds and that has not been restricted, committed, or assigned to specific purposes within the general fund. The general fund should be the only fund that reports a positive unassigned fund balance amount. In other governmental funds, if expenditures incurred for specific purposes exceeded the amounts restricted, committed, or assigned to those purposes, it may be necessary to report a negative unassigned fund balance.
100
+ attr_accessor :unassigned_general_fund_balance
101
+
102
+ # The portion of general fund balance classified as assigned. Amounts that are constrained by the government’s intent to be used for specific purposes, but are neither restricted nor committed, should be reported as assigned fund balance, except for stabilization arrangements.. Intent should be expressed by (a) the governing body itself or (b) a body (a budget or finance committee, for example) or official to which the governing body has delegated the authority to assign amounts to be used for specific purposes.
103
+ attr_accessor :assigned_general_fund_balance
104
+
105
+ # General fund balance in all classifications. Fund balance is the difference between governmental fund assets and deferred outflows of resources, and liabilities and deferred inflows of resources. It is sometimes referred to as fund equity. The general fund is used to account for and report all financial resources not accounted for and reported in another governmental fund.
106
+ attr_accessor :total_general_fund_balance
107
+
108
+ # For all governmental funds, the aggregate of fund balances that are classified as nonspendable. The nonspendable fund balance classification includes amounts that cannot be spent because they are either (a) not in spendable form or (b) legally or contractually required to be maintained intact. The “not in spendable form” criterion includes items that are not expected to be converted to cash, for example, inventories and prepaid amounts. It also includes the long-term amount of loans and notes receivable, as well as property acquired for resale. However, if the use of the proceeds from the collection of those receivables or from the sale of those properties is restricted, committed, or assigned, then they should be included in the appropriate fund balance classification (restricted, committed, or assigned), rather than nonspendable fund balance.
109
+ attr_accessor :non_spendable_governmental_fund_balance
110
+
111
+ # For all governmental funds, the aggregate of fund balances that are classified as restricted. Fund balance should be reported as restricted when constraints placed on the use of resources are either (a) Externally imposed by creditors (such as through debt covenants), grantors, contributors, or laws or regulations of other governments; or (b) Imposed by law through constitutional provisions or enabling legislation.
112
+ attr_accessor :restricted_governmental_fund_balance
113
+
114
+ # For all governmental funds, the aggregate of fund balances that are classified as committed. Amounts that can only be used for specific purposes pursuant to constraints imposed by formal action of the government’s highest level of decision-making authority should be reported as committed fund balance. Those committed amounts cannot be used for any other purpose unless the government removes or changes the specified use by taking the same type of action (for example, legislation, resolution, ordinance) it employed to previously commit those amounts. The authorization specifying the purposes for which amounts can be used should have the consent of both the legislative and executive branches of the government, if applicable. Committed fund balance also should incorporate contractual obligations to the extent that existing resources in the fund have been specifically committed for use in satisfying those contractual requirements.
115
+ attr_accessor :committed_governmental_fund_balance
116
+
117
+ # For all governmental funds, the aggregate of fund balances that are classified as unassigned. Unassigned fund balance is the residual classification for the general fund. This classification represents fund balance that has not been assigned to other funds and that has not been restricted, committed, or assigned to specific purposes within the general fund. The general fund should be the only fund that reports a positive unassigned fund balance amount. In other governmental funds, if expenditures incurred for specific purposes exceeded the amounts restricted, committed, or assigned to those purposes, it may be necessary to report a negative unassigned fund balance.
118
+ attr_accessor :unassigned_governmental_fund_balance
119
+
120
+ # For all governmental funds, the aggregate of fund balances that are classified as assigned. Amounts that are constrained by the government’s intent to be used for specific purposes, but are neither restricted nor committed, should be reported as assigned fund balance, except for stabilization arrangements.. Intent should be expressed by (a) the governing body itself or (b) a body (a budget or finance committee, for example) or official to which the governing body has delegated the authority to assign amounts to be used for specific purposes.
121
+ attr_accessor :assigned_governmental_fund_balance
122
+
123
+ # For all governmental funds, the aggregate of all fund balances in any classification. Fund balance is the difference between governmental fund assets and deferred outflows of resources, and liabilities and deferred inflows of resources. It is sometimes referred to as fund equity. Governmental funds are used to account for general government activities that are financed primarily through taxes, intergovernmental revenues, and other nonexchange revenues.
124
+ attr_accessor :total_governmental_fund_balance
125
+
126
+ # Increases in financial resources attributable to the general fund. The general fund is used to account for and report all financial resources not accounted for and reported in another governmental fund.
127
+ attr_accessor :general_fund_revenues
128
+
129
+ # Decreases in financial resources attributable to the general fund. The general fund is used to account for and report all financial resources not accounted for and reported in another governmental fund.
130
+ attr_accessor :general_fund_expenditures
131
+
132
+ # Difference between general fund revenues and expenditures. If positive, this amount is called a surplus. If negative, it represents a deficit. The general fund is used to account for and report all financial resources not accounted for and reported in another governmental fund.
133
+ attr_accessor :general_fund_revenues_over_under_expenditure
134
+
135
+ # Increases in financial resources attributable to any governmental fund. Governmental funds are used to account for general government activities that are financed primarily through taxes, intergovernmental revenues, and other nonexchange revenues.
136
+ attr_accessor :governmental_fund_revenues
137
+
138
+ # Decreases in financial resources attributable to any governmental fund. Governmental funds are used to account for general government activities that are financed primarily through taxes, intergovernmental revenues, and other nonexchange revenues.
139
+ attr_accessor :governmental_fund_expenditures
140
+
141
+ # Difference between revenues and expenditures attributable to all governmental funds. If positive, this amount is called a surplus. If negative, it represents a deficit. Governmental funds are used to account for general government activities that are financed primarily through taxes, intergovernmental revenues, and other nonexchange revenues.
142
+ attr_accessor :governmental_fund_revenues_over_under_expenditure
143
+
144
+
145
+ # Attribute mapping from ruby-style variable name to JSON key.
146
+ def self.attribute_map
147
+ {
148
+ :'fiscal_year' => :'fiscal_year',
149
+ :'current_assets' => :'current_assets',
150
+ :'non_current_assets' => :'non_current_assets',
151
+ :'deferred_outflows' => :'deferred_outflows',
152
+ :'total_assets' => :'total_assets',
153
+ :'total_assets_plus_deferred_outflows' => :'total_assets_plus_deferred_outflows',
154
+ :'current_liabilities' => :'current_liabilities',
155
+ :'current_portion_of_long_term_debt' => :'current_portion_of_long_term_debt',
156
+ :'net_pension_liability' => :'net_pension_liability',
157
+ :'net_opeb_liability' => :'net_opeb_liability',
158
+ :'all_other_long_term_debt' => :'all_other_long_term_debt',
159
+ :'total_liabilities' => :'total_liabilities',
160
+ :'deferred_inflows' => :'deferred_inflows',
161
+ :'total_liabilities_plus_deferred_inflows' => :'total_liabilities_plus_deferred_inflows',
162
+ :'total_net_position' => :'total_net_position',
163
+ :'total_unrestricted_net_position' => :'total_unrestricted_net_position',
164
+ :'total_expenses' => :'total_expenses',
165
+ :'charges_for_services' => :'charges_for_services',
166
+ :'operating_grants_and_contributions' => :'operating_grants_and_contributions',
167
+ :'capital_grants_and_contributions' => :'capital_grants_and_contributions',
168
+ :'general_revenues' => :'general_revenues',
169
+ :'other_revenues' => :'other_revenues',
170
+ :'total_revenues' => :'total_revenues',
171
+ :'change_in_net_assets' => :'change_in_net_assets',
172
+ :'non_spendable_general_fund_balance' => :'non_spendable_general_fund_balance',
173
+ :'restricted_general_fund_balance' => :'restricted_general_fund_balance',
174
+ :'committed_general_fund_balance' => :'committed_general_fund_balance',
175
+ :'unassigned_general_fund_balance' => :'unassigned_general_fund_balance',
176
+ :'assigned_general_fund_balance' => :'assigned_general_fund_balance',
177
+ :'total_general_fund_balance' => :'total_general_fund_balance',
178
+ :'non_spendable_governmental_fund_balance' => :'non_spendable_governmental_fund_balance',
179
+ :'restricted_governmental_fund_balance' => :'restricted_governmental_fund_balance',
180
+ :'committed_governmental_fund_balance' => :'committed_governmental_fund_balance',
181
+ :'unassigned_governmental_fund_balance' => :'unassigned_governmental_fund_balance',
182
+ :'assigned_governmental_fund_balance' => :'assigned_governmental_fund_balance',
183
+ :'total_governmental_fund_balance' => :'total_governmental_fund_balance',
184
+ :'general_fund_revenues' => :'general_fund_revenues',
185
+ :'general_fund_expenditures' => :'general_fund_expenditures',
186
+ :'general_fund_revenues_over_under_expenditure' => :'general_fund_revenues_over_under_expenditure',
187
+ :'governmental_fund_revenues' => :'governmental_fund_revenues',
188
+ :'governmental_fund_expenditures' => :'governmental_fund_expenditures',
189
+ :'governmental_fund_revenues_over_under_expenditure' => :'governmental_fund_revenues_over_under_expenditure'
190
+ }
191
+ end
192
+
193
+ # Attribute type mapping.
194
+ def self.swagger_types
195
+ {
196
+ :'fiscal_year' => :'Float',
197
+ :'current_assets' => :'Float',
198
+ :'non_current_assets' => :'Float',
199
+ :'deferred_outflows' => :'Float',
200
+ :'total_assets' => :'Float',
201
+ :'total_assets_plus_deferred_outflows' => :'Float',
202
+ :'current_liabilities' => :'Float',
203
+ :'current_portion_of_long_term_debt' => :'Float',
204
+ :'net_pension_liability' => :'Float',
205
+ :'net_opeb_liability' => :'Float',
206
+ :'all_other_long_term_debt' => :'Float',
207
+ :'total_liabilities' => :'Float',
208
+ :'deferred_inflows' => :'Float',
209
+ :'total_liabilities_plus_deferred_inflows' => :'Float',
210
+ :'total_net_position' => :'Float',
211
+ :'total_unrestricted_net_position' => :'Float',
212
+ :'total_expenses' => :'Float',
213
+ :'charges_for_services' => :'Float',
214
+ :'operating_grants_and_contributions' => :'Float',
215
+ :'capital_grants_and_contributions' => :'Float',
216
+ :'general_revenues' => :'Float',
217
+ :'other_revenues' => :'Float',
218
+ :'total_revenues' => :'Float',
219
+ :'change_in_net_assets' => :'Float',
220
+ :'non_spendable_general_fund_balance' => :'Float',
221
+ :'restricted_general_fund_balance' => :'Float',
222
+ :'committed_general_fund_balance' => :'Float',
223
+ :'unassigned_general_fund_balance' => :'Float',
224
+ :'assigned_general_fund_balance' => :'Float',
225
+ :'total_general_fund_balance' => :'Float',
226
+ :'non_spendable_governmental_fund_balance' => :'Float',
227
+ :'restricted_governmental_fund_balance' => :'Float',
228
+ :'committed_governmental_fund_balance' => :'Float',
229
+ :'unassigned_governmental_fund_balance' => :'Float',
230
+ :'assigned_governmental_fund_balance' => :'Float',
231
+ :'total_governmental_fund_balance' => :'Float',
232
+ :'general_fund_revenues' => :'Float',
233
+ :'general_fund_expenditures' => :'Float',
234
+ :'general_fund_revenues_over_under_expenditure' => :'Float',
235
+ :'governmental_fund_revenues' => :'Float',
236
+ :'governmental_fund_expenditures' => :'Float',
237
+ :'governmental_fund_revenues_over_under_expenditure' => :'Float'
238
+ }
239
+ end
240
+
241
+ # Initializes the object
242
+ # @param [Hash] attributes Model attributes in the form of hash
243
+ def initialize(attributes = {})
244
+ return unless attributes.is_a?(Hash)
245
+
246
+ # convert string to symbol for hash key
247
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
248
+
249
+ if attributes.has_key?(:'fiscal_year')
250
+ self.fiscal_year = attributes[:'fiscal_year']
251
+ end
252
+
253
+ if attributes.has_key?(:'current_assets')
254
+ self.current_assets = attributes[:'current_assets']
255
+ end
256
+
257
+ if attributes.has_key?(:'non_current_assets')
258
+ self.non_current_assets = attributes[:'non_current_assets']
259
+ end
260
+
261
+ if attributes.has_key?(:'deferred_outflows')
262
+ self.deferred_outflows = attributes[:'deferred_outflows']
263
+ end
264
+
265
+ if attributes.has_key?(:'total_assets')
266
+ self.total_assets = attributes[:'total_assets']
267
+ end
268
+
269
+ if attributes.has_key?(:'total_assets_plus_deferred_outflows')
270
+ self.total_assets_plus_deferred_outflows = attributes[:'total_assets_plus_deferred_outflows']
271
+ end
272
+
273
+ if attributes.has_key?(:'current_liabilities')
274
+ self.current_liabilities = attributes[:'current_liabilities']
275
+ end
276
+
277
+ if attributes.has_key?(:'current_portion_of_long_term_debt')
278
+ self.current_portion_of_long_term_debt = attributes[:'current_portion_of_long_term_debt']
279
+ end
280
+
281
+ if attributes.has_key?(:'net_pension_liability')
282
+ self.net_pension_liability = attributes[:'net_pension_liability']
283
+ end
284
+
285
+ if attributes.has_key?(:'net_opeb_liability')
286
+ self.net_opeb_liability = attributes[:'net_opeb_liability']
287
+ end
288
+
289
+ if attributes.has_key?(:'all_other_long_term_debt')
290
+ self.all_other_long_term_debt = attributes[:'all_other_long_term_debt']
291
+ end
292
+
293
+ if attributes.has_key?(:'total_liabilities')
294
+ self.total_liabilities = attributes[:'total_liabilities']
295
+ end
296
+
297
+ if attributes.has_key?(:'deferred_inflows')
298
+ self.deferred_inflows = attributes[:'deferred_inflows']
299
+ end
300
+
301
+ if attributes.has_key?(:'total_liabilities_plus_deferred_inflows')
302
+ self.total_liabilities_plus_deferred_inflows = attributes[:'total_liabilities_plus_deferred_inflows']
303
+ end
304
+
305
+ if attributes.has_key?(:'total_net_position')
306
+ self.total_net_position = attributes[:'total_net_position']
307
+ end
308
+
309
+ if attributes.has_key?(:'total_unrestricted_net_position')
310
+ self.total_unrestricted_net_position = attributes[:'total_unrestricted_net_position']
311
+ end
312
+
313
+ if attributes.has_key?(:'total_expenses')
314
+ self.total_expenses = attributes[:'total_expenses']
315
+ end
316
+
317
+ if attributes.has_key?(:'charges_for_services')
318
+ self.charges_for_services = attributes[:'charges_for_services']
319
+ end
320
+
321
+ if attributes.has_key?(:'operating_grants_and_contributions')
322
+ self.operating_grants_and_contributions = attributes[:'operating_grants_and_contributions']
323
+ end
324
+
325
+ if attributes.has_key?(:'capital_grants_and_contributions')
326
+ self.capital_grants_and_contributions = attributes[:'capital_grants_and_contributions']
327
+ end
328
+
329
+ if attributes.has_key?(:'general_revenues')
330
+ self.general_revenues = attributes[:'general_revenues']
331
+ end
332
+
333
+ if attributes.has_key?(:'other_revenues')
334
+ self.other_revenues = attributes[:'other_revenues']
335
+ end
336
+
337
+ if attributes.has_key?(:'total_revenues')
338
+ self.total_revenues = attributes[:'total_revenues']
339
+ end
340
+
341
+ if attributes.has_key?(:'change_in_net_assets')
342
+ self.change_in_net_assets = attributes[:'change_in_net_assets']
343
+ end
344
+
345
+ if attributes.has_key?(:'non_spendable_general_fund_balance')
346
+ self.non_spendable_general_fund_balance = attributes[:'non_spendable_general_fund_balance']
347
+ end
348
+
349
+ if attributes.has_key?(:'restricted_general_fund_balance')
350
+ self.restricted_general_fund_balance = attributes[:'restricted_general_fund_balance']
351
+ end
352
+
353
+ if attributes.has_key?(:'committed_general_fund_balance')
354
+ self.committed_general_fund_balance = attributes[:'committed_general_fund_balance']
355
+ end
356
+
357
+ if attributes.has_key?(:'unassigned_general_fund_balance')
358
+ self.unassigned_general_fund_balance = attributes[:'unassigned_general_fund_balance']
359
+ end
360
+
361
+ if attributes.has_key?(:'assigned_general_fund_balance')
362
+ self.assigned_general_fund_balance = attributes[:'assigned_general_fund_balance']
363
+ end
364
+
365
+ if attributes.has_key?(:'total_general_fund_balance')
366
+ self.total_general_fund_balance = attributes[:'total_general_fund_balance']
367
+ end
368
+
369
+ if attributes.has_key?(:'non_spendable_governmental_fund_balance')
370
+ self.non_spendable_governmental_fund_balance = attributes[:'non_spendable_governmental_fund_balance']
371
+ end
372
+
373
+ if attributes.has_key?(:'restricted_governmental_fund_balance')
374
+ self.restricted_governmental_fund_balance = attributes[:'restricted_governmental_fund_balance']
375
+ end
376
+
377
+ if attributes.has_key?(:'committed_governmental_fund_balance')
378
+ self.committed_governmental_fund_balance = attributes[:'committed_governmental_fund_balance']
379
+ end
380
+
381
+ if attributes.has_key?(:'unassigned_governmental_fund_balance')
382
+ self.unassigned_governmental_fund_balance = attributes[:'unassigned_governmental_fund_balance']
383
+ end
384
+
385
+ if attributes.has_key?(:'assigned_governmental_fund_balance')
386
+ self.assigned_governmental_fund_balance = attributes[:'assigned_governmental_fund_balance']
387
+ end
388
+
389
+ if attributes.has_key?(:'total_governmental_fund_balance')
390
+ self.total_governmental_fund_balance = attributes[:'total_governmental_fund_balance']
391
+ end
392
+
393
+ if attributes.has_key?(:'general_fund_revenues')
394
+ self.general_fund_revenues = attributes[:'general_fund_revenues']
395
+ end
396
+
397
+ if attributes.has_key?(:'general_fund_expenditures')
398
+ self.general_fund_expenditures = attributes[:'general_fund_expenditures']
399
+ end
400
+
401
+ if attributes.has_key?(:'general_fund_revenues_over_under_expenditure')
402
+ self.general_fund_revenues_over_under_expenditure = attributes[:'general_fund_revenues_over_under_expenditure']
403
+ end
404
+
405
+ if attributes.has_key?(:'governmental_fund_revenues')
406
+ self.governmental_fund_revenues = attributes[:'governmental_fund_revenues']
407
+ end
408
+
409
+ if attributes.has_key?(:'governmental_fund_expenditures')
410
+ self.governmental_fund_expenditures = attributes[:'governmental_fund_expenditures']
411
+ end
412
+
413
+ if attributes.has_key?(:'governmental_fund_revenues_over_under_expenditure')
414
+ self.governmental_fund_revenues_over_under_expenditure = attributes[:'governmental_fund_revenues_over_under_expenditure']
415
+ end
416
+
417
+ end
418
+
419
+ # Show invalid properties with the reasons. Usually used together with valid?
420
+ # @return Array for valid properties with the reasons
421
+ def list_invalid_properties
422
+ invalid_properties = Array.new
423
+ return invalid_properties
424
+ end
425
+
426
+ # Check to see if the all the properties in the model are valid
427
+ # @return true if the model is valid
428
+ def valid?
429
+ return true
430
+ end
431
+
432
+ # Checks equality by comparing each attribute.
433
+ # @param [Object] Object to be compared
434
+ def ==(o)
435
+ return true if self.equal?(o)
436
+ self.class == o.class &&
437
+ fiscal_year == o.fiscal_year &&
438
+ current_assets == o.current_assets &&
439
+ non_current_assets == o.non_current_assets &&
440
+ deferred_outflows == o.deferred_outflows &&
441
+ total_assets == o.total_assets &&
442
+ total_assets_plus_deferred_outflows == o.total_assets_plus_deferred_outflows &&
443
+ current_liabilities == o.current_liabilities &&
444
+ current_portion_of_long_term_debt == o.current_portion_of_long_term_debt &&
445
+ net_pension_liability == o.net_pension_liability &&
446
+ net_opeb_liability == o.net_opeb_liability &&
447
+ all_other_long_term_debt == o.all_other_long_term_debt &&
448
+ total_liabilities == o.total_liabilities &&
449
+ deferred_inflows == o.deferred_inflows &&
450
+ total_liabilities_plus_deferred_inflows == o.total_liabilities_plus_deferred_inflows &&
451
+ total_net_position == o.total_net_position &&
452
+ total_unrestricted_net_position == o.total_unrestricted_net_position &&
453
+ total_expenses == o.total_expenses &&
454
+ charges_for_services == o.charges_for_services &&
455
+ operating_grants_and_contributions == o.operating_grants_and_contributions &&
456
+ capital_grants_and_contributions == o.capital_grants_and_contributions &&
457
+ general_revenues == o.general_revenues &&
458
+ other_revenues == o.other_revenues &&
459
+ total_revenues == o.total_revenues &&
460
+ change_in_net_assets == o.change_in_net_assets &&
461
+ non_spendable_general_fund_balance == o.non_spendable_general_fund_balance &&
462
+ restricted_general_fund_balance == o.restricted_general_fund_balance &&
463
+ committed_general_fund_balance == o.committed_general_fund_balance &&
464
+ unassigned_general_fund_balance == o.unassigned_general_fund_balance &&
465
+ assigned_general_fund_balance == o.assigned_general_fund_balance &&
466
+ total_general_fund_balance == o.total_general_fund_balance &&
467
+ non_spendable_governmental_fund_balance == o.non_spendable_governmental_fund_balance &&
468
+ restricted_governmental_fund_balance == o.restricted_governmental_fund_balance &&
469
+ committed_governmental_fund_balance == o.committed_governmental_fund_balance &&
470
+ unassigned_governmental_fund_balance == o.unassigned_governmental_fund_balance &&
471
+ assigned_governmental_fund_balance == o.assigned_governmental_fund_balance &&
472
+ total_governmental_fund_balance == o.total_governmental_fund_balance &&
473
+ general_fund_revenues == o.general_fund_revenues &&
474
+ general_fund_expenditures == o.general_fund_expenditures &&
475
+ general_fund_revenues_over_under_expenditure == o.general_fund_revenues_over_under_expenditure &&
476
+ governmental_fund_revenues == o.governmental_fund_revenues &&
477
+ governmental_fund_expenditures == o.governmental_fund_expenditures &&
478
+ governmental_fund_revenues_over_under_expenditure == o.governmental_fund_revenues_over_under_expenditure
479
+ end
480
+
481
+ # @see the `==` method
482
+ # @param [Object] Object to be compared
483
+ def eql?(o)
484
+ self == o
485
+ end
486
+
487
+ # Calculates hash code according to all attributes.
488
+ # @return [Fixnum] Hash code
489
+ def hash
490
+ [fiscal_year, current_assets, non_current_assets, deferred_outflows, total_assets, total_assets_plus_deferred_outflows, current_liabilities, current_portion_of_long_term_debt, net_pension_liability, net_opeb_liability, all_other_long_term_debt, total_liabilities, deferred_inflows, total_liabilities_plus_deferred_inflows, total_net_position, total_unrestricted_net_position, total_expenses, charges_for_services, operating_grants_and_contributions, capital_grants_and_contributions, general_revenues, other_revenues, total_revenues, change_in_net_assets, non_spendable_general_fund_balance, restricted_general_fund_balance, committed_general_fund_balance, unassigned_general_fund_balance, assigned_general_fund_balance, total_general_fund_balance, non_spendable_governmental_fund_balance, restricted_governmental_fund_balance, committed_governmental_fund_balance, unassigned_governmental_fund_balance, assigned_governmental_fund_balance, total_governmental_fund_balance, general_fund_revenues, general_fund_expenditures, general_fund_revenues_over_under_expenditure, governmental_fund_revenues, governmental_fund_expenditures, governmental_fund_revenues_over_under_expenditure].hash
491
+ end
492
+
493
+ # Builds the object from hash
494
+ # @param [Hash] attributes Model attributes in the form of hash
495
+ # @return [Object] Returns the model itself
496
+ def build_from_hash(attributes)
497
+ return nil unless attributes.is_a?(Hash)
498
+ self.class.swagger_types.each_pair do |key, type|
499
+ if type =~ /\AArray<(.*)>/i
500
+ # check to ensure the input is an array given that the the attribute
501
+ # is documented as an array but the input is not
502
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
503
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
504
+ end
505
+ elsif !attributes[self.class.attribute_map[key]].nil?
506
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
507
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
508
+ end
509
+
510
+ self
511
+ end
512
+
513
+ # Deserializes the data based on type
514
+ # @param string type Data type
515
+ # @param string value Value to be deserialized
516
+ # @return [Object] Deserialized data
517
+ def _deserialize(type, value)
518
+ case type.to_sym
519
+ when :DateTime
520
+ DateTime.parse(value)
521
+ when :Date
522
+ Date.parse(value)
523
+ when :String
524
+ value.to_s
525
+ when :Integer
526
+ value.to_i
527
+ when :Float
528
+ value.to_f
529
+ when :BOOLEAN
530
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
531
+ true
532
+ else
533
+ false
534
+ end
535
+ when :Object
536
+ # generic object (usually a Hash), return directly
537
+ value
538
+ when /\AArray<(?<inner_type>.+)>\z/
539
+ inner_type = Regexp.last_match[:inner_type]
540
+ value.map { |v| _deserialize(inner_type, v) }
541
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
542
+ k_type = Regexp.last_match[:k_type]
543
+ v_type = Regexp.last_match[:v_type]
544
+ {}.tap do |hash|
545
+ value.each do |k, v|
546
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
547
+ end
548
+ end
549
+ else # model
550
+ temp_model = Intrinio.const_get(type).new
551
+ temp_model.build_from_hash(value)
552
+ end
553
+ end
554
+
555
+ # Returns the string representation of the object
556
+ # @return [String] String presentation of the object
557
+ def to_s
558
+ to_hash.to_s
559
+ end
560
+
561
+ # to_body is an alias to to_hash (backward compatibility)
562
+ # @return [Hash] Returns the object in the form of hash
563
+ def to_body
564
+ to_hash
565
+ end
566
+
567
+ # Returns the object in the form of hash
568
+ # @return [Hash] Returns the object in the form of hash
569
+ def to_hash
570
+ hash = {}
571
+ self.class.attribute_map.each_pair do |attr, param|
572
+ value = self.send(attr)
573
+ next if value.nil?
574
+ hash[param] = _to_hash(value)
575
+ end
576
+ hash
577
+ end
578
+
579
+ # Outputs non-array value in the form of hash
580
+ # For object, use to_hash. Otherwise, just return the value
581
+ # @param [Object] value Any valid value
582
+ # @return [Hash] Returns the value in the form of hash
583
+ def _to_hash(value)
584
+ if value.is_a?(Array)
585
+ value.compact.map{ |v| _to_hash(v) }
586
+ elsif value.is_a?(Hash)
587
+ {}.tap do |hash|
588
+ value.each { |k, v| hash[k] = _to_hash(v) }
589
+ end
590
+ elsif value.respond_to? :to_hash
591
+ value.to_hash
592
+ else
593
+ value
594
+ end
595
+ end
596
+
597
+ end
598
+
599
+ end