vericred_client 0.0.11 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (319) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +92 -21
  3. data/docs/ACAPlan.md +96 -0
  4. data/docs/ACAPlan2018.md +97 -0
  5. data/docs/ACAPlan2018SearchResponse.md +10 -0
  6. data/docs/ACAPlan2018SearchResult.md +100 -0
  7. data/docs/ACAPlan2018ShowResponse.md +8 -0
  8. data/docs/ACAPlanPre2018.md +96 -0
  9. data/docs/ACAPlanPre2018SearchResponse.md +10 -0
  10. data/docs/{PlanSearchResult.md → ACAPlanPre2018SearchResult.md} +30 -11
  11. data/docs/ACAPlanPre2018ShowResponse.md +8 -0
  12. data/docs/BasePlanSearchResponse.md +9 -0
  13. data/docs/Carrier.md +0 -1
  14. data/docs/CarrierGroupRequest.md +10 -0
  15. data/docs/CarrierGroupsApi.md +119 -0
  16. data/docs/CarrierRequest.md +11 -0
  17. data/docs/CarrierSubsidiary.md +1 -0
  18. data/docs/CarrierVerificationPlansApi.md +63 -0
  19. data/docs/CarriersApi.md +119 -0
  20. data/docs/DentalPlan.md +20 -0
  21. data/docs/DentalPlanBenefits.md +30 -0
  22. data/docs/DentalPlanSearchApplicant.md +10 -0
  23. data/docs/DentalPlanSearchRequest.md +15 -0
  24. data/docs/DentalPlanSearchResponse.md +9 -0
  25. data/docs/DentalPlanShowResponse.md +8 -0
  26. data/docs/DentalPlanUpdate.md +16 -0
  27. data/docs/DentalPlanUpdateRequest.md +8 -0
  28. data/docs/DentalPlansApi.md +174 -0
  29. data/docs/DrugCoverage.md +1 -0
  30. data/docs/DrugCoverageResponse.md +1 -2
  31. data/docs/EmbargoRequest.md +13 -0
  32. data/docs/EmbargoesApi.md +119 -0
  33. data/docs/FormulariesApi.md +70 -0
  34. data/docs/IssuerRequest.md +19 -0
  35. data/docs/IssuersApi.md +119 -0
  36. data/docs/MedicalPlansApi.md +122 -0
  37. data/docs/{PlanSearchResponseMeta.md → MetaPlanSearchResponse.md} +2 -1
  38. data/docs/NetworkComparison.md +13 -0
  39. data/docs/NetworkComparisonRequest.md +10 -0
  40. data/docs/NetworkComparisonResponse.md +9 -0
  41. data/docs/NetworksApi.md +58 -0
  42. data/docs/NotificationSubscription.md +8 -0
  43. data/docs/NotificationSubscriptionResponse.md +8 -0
  44. data/docs/Plan.md +2 -61
  45. data/docs/PlanDeleted.md +7 -0
  46. data/docs/PlanIdentifier.md +9 -0
  47. data/docs/PlanMedicare.md +19 -0
  48. data/docs/PlanMedicareBulk.md +21 -0
  49. data/docs/PlanPricingMedicare.md +15 -0
  50. data/docs/PlanSearchResponse.md +1 -1
  51. data/docs/PlanShowResponse.md +1 -1
  52. data/docs/PlansApi.md +111 -1
  53. data/docs/Provider.md +1 -1
  54. data/docs/ProviderDetails.md +1 -1
  55. data/docs/ProviderNetworkEventNotification.md +13 -0
  56. data/docs/ProviderNotificationSubscriptionsApi.md +173 -0
  57. data/docs/ProvidersApi.md +68 -18
  58. data/docs/RateRequest.md +148 -0
  59. data/docs/RateSearch.md +143 -0
  60. data/docs/RatesApi.md +119 -0
  61. data/docs/RequestPlanFind.md +2 -0
  62. data/docs/RequestPlanFindCarrierVerification.md +23 -0
  63. data/docs/RequestProviderNotificationSubscription.md +10 -0
  64. data/docs/RequestProvidersSearch.md +1 -0
  65. data/docs/RequestRatesSearch.md +10 -0
  66. data/docs/ResponseRatesSearch.md +8 -0
  67. data/docs/RxCuiIdentifier.md +11 -0
  68. data/docs/RxCuiIdentifierSearchResponse.md +9 -0
  69. data/docs/VisionPlan.md +20 -0
  70. data/docs/VisionPlanBenefits.md +25 -0
  71. data/docs/VisionPlanSearchApplicant.md +10 -0
  72. data/docs/VisionPlanSearchRequest.md +15 -0
  73. data/docs/VisionPlanSearchResponse.md +9 -0
  74. data/docs/VisionPlanShowResponse.md +8 -0
  75. data/docs/VisionPlanUpdate.md +16 -0
  76. data/docs/VisionPlanUpdateRequest.md +8 -0
  77. data/docs/VisionPlansApi.md +174 -0
  78. data/lib/vericred_client/api/carrier_groups_api.rb +346 -0
  79. data/lib/vericred_client/api/carrier_verification_plans_api.rb +287 -0
  80. data/lib/vericred_client/api/carriers_api.rb +346 -0
  81. data/lib/vericred_client/api/dental_plans_api.rb +403 -0
  82. data/lib/vericred_client/api/drug_coverages_api.rb +5 -3
  83. data/lib/vericred_client/api/drug_packages_api.rb +5 -3
  84. data/lib/vericred_client/api/drugs_api.rb +5 -3
  85. data/lib/vericred_client/api/embargoes_api.rb +346 -0
  86. data/lib/vericred_client/api/formularies_api.rb +295 -0
  87. data/lib/vericred_client/api/issuers_api.rb +346 -0
  88. data/lib/vericred_client/api/medical_plans_api.rb +347 -0
  89. data/lib/vericred_client/api/network_sizes_api.rb +5 -3
  90. data/lib/vericred_client/api/networks_api.rb +66 -3
  91. data/lib/vericred_client/api/plans_api.rb +122 -3
  92. data/lib/vericred_client/api/provider_notification_subscriptions_api.rb +395 -0
  93. data/lib/vericred_client/api/providers_api.rb +82 -27
  94. data/lib/vericred_client/api/rates_api.rb +346 -0
  95. data/lib/vericred_client/api/vision_plans_api.rb +403 -0
  96. data/lib/vericred_client/api/zip_counties_api.rb +5 -3
  97. data/lib/vericred_client/api_client.rb +5 -3
  98. data/lib/vericred_client/api_error.rb +5 -3
  99. data/lib/vericred_client/configuration.rb +5 -3
  100. data/lib/vericred_client/models/aca_plan.rb +1284 -0
  101. data/lib/vericred_client/models/aca_plan2018.rb +1294 -0
  102. data/lib/vericred_client/models/aca_plan2018_search_response.rb +420 -0
  103. data/lib/vericred_client/models/aca_plan2018_search_result.rb +1324 -0
  104. data/lib/vericred_client/models/aca_plan2018_show_response.rb +396 -0
  105. data/lib/vericred_client/models/aca_plan_pre2018.rb +1284 -0
  106. data/lib/vericred_client/models/aca_plan_pre2018_search_response.rb +420 -0
  107. data/lib/vericred_client/models/{plan_search_result.rb → aca_plan_pre2018_search_result.rb} +294 -98
  108. data/lib/vericred_client/models/aca_plan_pre2018_show_response.rb +396 -0
  109. data/lib/vericred_client/models/base.rb +5 -3
  110. data/lib/vericred_client/models/base_plan_search_response.rb +408 -0
  111. data/lib/vericred_client/models/carrier.rb +9 -17
  112. data/lib/vericred_client/models/carrier_group_request.rb +416 -0
  113. data/lib/vericred_client/models/carrier_request.rb +426 -0
  114. data/lib/vericred_client/models/carrier_subsidiary.rb +19 -7
  115. data/lib/vericred_client/models/county.rb +5 -3
  116. data/lib/vericred_client/models/county_bulk.rb +5 -3
  117. data/lib/vericred_client/models/dental_plan.rb +518 -0
  118. data/lib/vericred_client/models/dental_plan_benefits.rb +616 -0
  119. data/lib/vericred_client/models/dental_plan_search_applicant.rb +416 -0
  120. data/lib/vericred_client/models/dental_plan_search_request.rb +468 -0
  121. data/lib/vericred_client/models/dental_plan_search_response.rb +408 -0
  122. data/lib/vericred_client/models/dental_plan_show_response.rb +396 -0
  123. data/lib/vericred_client/models/dental_plan_update.rb +478 -0
  124. data/lib/vericred_client/models/dental_plan_update_request.rb +396 -0
  125. data/lib/vericred_client/models/drug.rb +5 -3
  126. data/lib/vericred_client/models/drug_coverage.rb +18 -4
  127. data/lib/vericred_client/models/drug_coverage_response.rb +12 -24
  128. data/lib/vericred_client/models/drug_package.rb +5 -3
  129. data/lib/vericred_client/models/drug_search_response.rb +5 -3
  130. data/lib/vericred_client/models/embargo_request.rb +446 -0
  131. data/lib/vericred_client/models/formulary.rb +5 -3
  132. data/lib/vericred_client/models/formulary_drug_package_response.rb +5 -3
  133. data/lib/vericred_client/models/formulary_response.rb +5 -3
  134. data/lib/vericred_client/models/issuer_request.rb +506 -0
  135. data/lib/vericred_client/models/meta.rb +5 -3
  136. data/lib/vericred_client/models/{plan_search_response_meta.rb → meta_plan_search_response.rb} +20 -8
  137. data/lib/vericred_client/models/network.rb +5 -3
  138. data/lib/vericred_client/models/network_comparison.rb +446 -0
  139. data/lib/vericred_client/models/network_comparison_request.rb +418 -0
  140. data/lib/vericred_client/models/network_comparison_response.rb +410 -0
  141. data/lib/vericred_client/models/network_details.rb +5 -3
  142. data/lib/vericred_client/models/network_details_response.rb +5 -3
  143. data/lib/vericred_client/models/network_search_response.rb +5 -3
  144. data/lib/vericred_client/models/network_size.rb +5 -3
  145. data/lib/vericred_client/models/notification_subscription.rb +396 -0
  146. data/lib/vericred_client/models/notification_subscription_response.rb +396 -0
  147. data/lib/vericred_client/models/plan.rb +28 -616
  148. data/lib/vericred_client/models/plan_county.rb +5 -3
  149. data/lib/vericred_client/models/plan_county_bulk.rb +5 -3
  150. data/lib/vericred_client/models/plan_deleted.rb +386 -0
  151. data/lib/vericred_client/models/plan_identifier.rb +406 -0
  152. data/lib/vericred_client/models/plan_medicare.rb +510 -0
  153. data/lib/vericred_client/models/plan_medicare_bulk.rb +530 -0
  154. data/lib/vericred_client/models/plan_pricing_medicare.rb +466 -0
  155. data/lib/vericred_client/models/plan_search_response.rb +21 -19
  156. data/lib/vericred_client/models/plan_show_response.rb +6 -4
  157. data/lib/vericred_client/models/provider.rb +21 -17
  158. data/lib/vericred_client/models/provider_details.rb +18 -14
  159. data/lib/vericred_client/models/provider_geocode.rb +5 -3
  160. data/lib/vericred_client/models/provider_network_event_notification.rb +450 -0
  161. data/lib/vericred_client/models/provider_show_response.rb +5 -3
  162. data/lib/vericred_client/models/providers_geocode_response.rb +5 -3
  163. data/lib/vericred_client/models/providers_search_response.rb +5 -3
  164. data/lib/vericred_client/models/rate_request.rb +1796 -0
  165. data/lib/vericred_client/models/rate_search.rb +1746 -0
  166. data/lib/vericred_client/models/rating_area.rb +5 -3
  167. data/lib/vericred_client/models/request_plan_find.rb +26 -4
  168. data/lib/vericred_client/models/request_plan_find_applicant.rb +5 -3
  169. data/lib/vericred_client/models/request_plan_find_carrier_verification.rb +556 -0
  170. data/lib/vericred_client/models/request_plan_find_drug_package.rb +5 -3
  171. data/lib/vericred_client/models/request_plan_find_provider.rb +5 -3
  172. data/lib/vericred_client/models/request_provider_notification_subscription.rb +418 -0
  173. data/lib/vericred_client/models/request_providers_search.rb +18 -4
  174. data/lib/vericred_client/models/request_rates_search.rb +416 -0
  175. data/lib/vericred_client/models/response_rates_search.rb +396 -0
  176. data/lib/vericred_client/models/{applicant.rb → rx_cui_identifier.rb} +23 -51
  177. data/lib/vericred_client/models/rx_cui_identifier_search_response.rb +408 -0
  178. data/lib/vericred_client/models/service_area.rb +5 -3
  179. data/lib/vericred_client/models/service_area_zip_county.rb +5 -3
  180. data/lib/vericred_client/models/state.rb +5 -3
  181. data/lib/vericred_client/models/state_network_size_request.rb +5 -3
  182. data/lib/vericred_client/models/state_network_size_response.rb +5 -3
  183. data/lib/vericred_client/models/vision_plan.rb +518 -0
  184. data/lib/vericred_client/models/vision_plan_benefits.rb +566 -0
  185. data/lib/vericred_client/models/vision_plan_search_applicant.rb +416 -0
  186. data/lib/vericred_client/models/vision_plan_search_request.rb +468 -0
  187. data/lib/vericred_client/models/vision_plan_search_response.rb +408 -0
  188. data/lib/vericred_client/models/vision_plan_show_response.rb +396 -0
  189. data/lib/vericred_client/models/vision_plan_update.rb +478 -0
  190. data/lib/vericred_client/models/vision_plan_update_request.rb +396 -0
  191. data/lib/vericred_client/models/zip_code.rb +5 -3
  192. data/lib/vericred_client/models/zip_counties_response.rb +5 -3
  193. data/lib/vericred_client/models/zip_county.rb +5 -3
  194. data/lib/vericred_client/models/zip_county_bulk.rb +5 -3
  195. data/lib/vericred_client/models/zip_county_response.rb +5 -3
  196. data/lib/vericred_client/version.rb +6 -4
  197. data/lib/vericred_client.rb +66 -6
  198. data/spec/api/carrier_groups_api_spec.rb +267 -0
  199. data/spec/api/carrier_verification_plans_api_spec.rb +254 -0
  200. data/spec/api/carriers_api_spec.rb +267 -0
  201. data/spec/api/dental_plans_api_spec.rb +279 -0
  202. data/spec/api/drug_coverages_api_spec.rb +5 -3
  203. data/spec/api/drug_packages_api_spec.rb +5 -3
  204. data/spec/api/drugs_api_spec.rb +5 -3
  205. data/spec/api/embargoes_api_spec.rb +267 -0
  206. data/spec/api/formularies_api_spec.rb +257 -0
  207. data/spec/api/issuers_api_spec.rb +267 -0
  208. data/spec/api/medical_plans_api_spec.rb +267 -0
  209. data/spec/api/network_sizes_api_spec.rb +5 -3
  210. data/spec/api/networks_api_spec.rb +18 -3
  211. data/spec/api/plans_api_spec.rb +30 -3
  212. data/spec/api/provider_notification_subscriptions_api_spec.rb +278 -0
  213. data/spec/api/providers_api_spec.rb +23 -10
  214. data/spec/api/rates_api_spec.rb +267 -0
  215. data/spec/api/vision_plans_api_spec.rb +279 -0
  216. data/spec/api/zip_counties_api_spec.rb +5 -3
  217. data/spec/api_client_spec.rb +5 -3
  218. data/spec/configuration_spec.rb +5 -3
  219. data/spec/models/aca_plan2018_search_response_spec.rb +261 -0
  220. data/spec/models/aca_plan2018_search_result_spec.rb +801 -0
  221. data/spec/models/aca_plan2018_show_response_spec.rb +249 -0
  222. data/spec/models/aca_plan2018_spec.rb +783 -0
  223. data/spec/models/aca_plan_pre2018_search_response_spec.rb +261 -0
  224. data/spec/models/aca_plan_pre2018_search_result_spec.rb +795 -0
  225. data/spec/models/aca_plan_pre2018_show_response_spec.rb +249 -0
  226. data/spec/models/aca_plan_pre2018_spec.rb +777 -0
  227. data/spec/models/{plan_search_result_spec.rb → aca_plan_spec.rb} +149 -51
  228. data/spec/models/base_plan_search_response_spec.rb +255 -0
  229. data/spec/models/base_spec.rb +5 -3
  230. data/spec/models/carrier_group_request_spec.rb +261 -0
  231. data/spec/models/carrier_request_spec.rb +267 -0
  232. data/spec/models/carrier_spec.rb +5 -9
  233. data/spec/models/carrier_subsidiary_spec.rb +11 -3
  234. data/spec/models/county_bulk_spec.rb +5 -3
  235. data/spec/models/county_spec.rb +5 -3
  236. data/spec/models/dental_plan_benefits_spec.rb +381 -0
  237. data/spec/models/dental_plan_search_applicant_spec.rb +261 -0
  238. data/spec/models/dental_plan_search_request_spec.rb +291 -0
  239. data/spec/models/dental_plan_search_response_spec.rb +255 -0
  240. data/spec/models/dental_plan_show_response_spec.rb +249 -0
  241. data/spec/models/dental_plan_spec.rb +321 -0
  242. data/spec/models/dental_plan_update_request_spec.rb +249 -0
  243. data/spec/models/dental_plan_update_spec.rb +297 -0
  244. data/spec/models/drug_coverage_response_spec.rb +6 -10
  245. data/spec/models/drug_coverage_spec.rb +11 -3
  246. data/spec/models/drug_package_spec.rb +5 -3
  247. data/spec/models/drug_search_response_spec.rb +5 -3
  248. data/spec/models/drug_spec.rb +5 -3
  249. data/spec/models/{applicant_spec.rb → embargo_request_spec.rb} +17 -21
  250. data/spec/models/formulary_drug_package_response_spec.rb +5 -3
  251. data/spec/models/formulary_response_spec.rb +5 -3
  252. data/spec/models/formulary_spec.rb +5 -3
  253. data/spec/models/issuer_request_spec.rb +315 -0
  254. data/spec/models/meta_plan_search_response_spec.rb +261 -0
  255. data/spec/models/meta_spec.rb +5 -3
  256. data/spec/models/network_comparison_request_spec.rb +261 -0
  257. data/spec/models/network_comparison_response_spec.rb +255 -0
  258. data/spec/models/network_comparison_spec.rb +279 -0
  259. data/spec/models/network_details_response_spec.rb +5 -3
  260. data/spec/models/network_details_spec.rb +5 -3
  261. data/spec/models/network_search_response_spec.rb +5 -3
  262. data/spec/models/network_size_spec.rb +5 -3
  263. data/spec/models/network_spec.rb +5 -3
  264. data/spec/models/notification_subscription_response_spec.rb +249 -0
  265. data/spec/models/notification_subscription_spec.rb +249 -0
  266. data/spec/models/plan_county_bulk_spec.rb +5 -3
  267. data/spec/models/plan_county_spec.rb +5 -3
  268. data/spec/models/plan_deleted_spec.rb +243 -0
  269. data/spec/models/{plan_search_response_meta_spec.rb → plan_identifier_spec.rb} +13 -11
  270. data/spec/models/plan_medicare_bulk_spec.rb +327 -0
  271. data/spec/models/plan_medicare_spec.rb +315 -0
  272. data/spec/models/plan_pricing_medicare_spec.rb +291 -0
  273. data/spec/models/plan_search_response_spec.rb +7 -5
  274. data/spec/models/plan_show_response_spec.rb +5 -3
  275. data/spec/models/plan_spec.rb +8 -360
  276. data/spec/models/provider_details_spec.rb +11 -9
  277. data/spec/models/provider_geocode_spec.rb +5 -3
  278. data/spec/models/provider_network_event_notification_spec.rb +279 -0
  279. data/spec/models/provider_show_response_spec.rb +5 -3
  280. data/spec/models/provider_spec.rb +11 -9
  281. data/spec/models/providers_geocode_response_spec.rb +5 -3
  282. data/spec/models/providers_search_response_spec.rb +5 -3
  283. data/spec/models/rate_request_spec.rb +1089 -0
  284. data/spec/models/rate_search_spec.rb +1059 -0
  285. data/spec/models/rating_area_spec.rb +5 -3
  286. data/spec/models/request_plan_find_applicant_spec.rb +5 -3
  287. data/spec/models/request_plan_find_carrier_verification_spec.rb +339 -0
  288. data/spec/models/request_plan_find_drug_package_spec.rb +5 -3
  289. data/spec/models/request_plan_find_provider_spec.rb +5 -3
  290. data/spec/models/request_plan_find_spec.rb +17 -3
  291. data/spec/models/request_provider_notification_subscription_spec.rb +261 -0
  292. data/spec/models/request_providers_search_spec.rb +11 -3
  293. data/spec/models/request_rates_search_spec.rb +261 -0
  294. data/spec/models/response_rates_search_spec.rb +249 -0
  295. data/spec/models/rx_cui_identifier_search_response_spec.rb +255 -0
  296. data/spec/models/rx_cui_identifier_spec.rb +267 -0
  297. data/spec/models/service_area_spec.rb +5 -3
  298. data/spec/models/service_area_zip_county_spec.rb +5 -3
  299. data/spec/models/state_network_size_request_spec.rb +5 -3
  300. data/spec/models/state_network_size_response_spec.rb +5 -3
  301. data/spec/models/state_spec.rb +5 -3
  302. data/spec/models/vision_plan_benefits_spec.rb +351 -0
  303. data/spec/models/vision_plan_search_applicant_spec.rb +261 -0
  304. data/spec/models/vision_plan_search_request_spec.rb +291 -0
  305. data/spec/models/vision_plan_search_response_spec.rb +255 -0
  306. data/spec/models/vision_plan_show_response_spec.rb +249 -0
  307. data/spec/models/vision_plan_spec.rb +321 -0
  308. data/spec/models/vision_plan_update_request_spec.rb +249 -0
  309. data/spec/models/vision_plan_update_spec.rb +297 -0
  310. data/spec/models/zip_code_spec.rb +5 -3
  311. data/spec/models/zip_counties_response_spec.rb +5 -3
  312. data/spec/models/zip_county_bulk_spec.rb +5 -3
  313. data/spec/models/zip_county_response_spec.rb +5 -3
  314. data/spec/models/zip_county_spec.rb +5 -3
  315. data/spec/spec_helper.rb +5 -3
  316. data/vericred_client.gemspec +5 -3
  317. metadata +247 -16
  318. data/docs/Applicant.md +0 -14
  319. data/git_push.sh +0 -67
@@ -0,0 +1,1796 @@
1
+ =begin
2
+ #Vericred API
3
+
4
+ #Vericred's API allows you to search for Health Plans that a specific doctor
5
+ accepts.
6
+
7
+ ## Getting Started
8
+
9
+ Visit our [Developer Portal](https://developers.vericred.com) to
10
+ create an account.
11
+
12
+ Once you have created an account, you can create one Application for
13
+ Production and another for our Sandbox (select the appropriate Plan when
14
+ you create the Application).
15
+
16
+ ## SDKs
17
+
18
+ Our API follows standard REST conventions, so you can use any HTTP client
19
+ to integrate with us. You will likely find it easier to use one of our
20
+ [autogenerated SDKs](https://github.com/vericred/?query=vericred-),
21
+ which we make available for several common programming languages.
22
+
23
+ ## Authentication
24
+
25
+ To authenticate, pass the API Key you created in the Developer Portal as
26
+ a `Vericred-Api-Key` header.
27
+
28
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
29
+
30
+ ## Versioning
31
+
32
+ Vericred's API default to the latest version. However, if you need a specific
33
+ version, you can request it with an `Accept-Version` header.
34
+
35
+ The current version is `v3`. Previous versions are `v1` and `v2`.
36
+
37
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' -H 'Accept-Version: v2' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
38
+
39
+ ## Pagination
40
+
41
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
42
+ four additional fields that contain data about your position in the response,
43
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
44
+
45
+ For example, to display 5 results per page and view the second page of a
46
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
47
+
48
+ ## Sideloading
49
+
50
+ When we return multiple levels of an object graph (e.g. `Provider`s and their `State`s
51
+ we sideload the associated data. In this example, we would provide an Array of
52
+ `State`s and a `state_id` for each provider. This is done primarily to reduce the
53
+ payload size since many of the `Provider`s will share a `State`
54
+
55
+ ```
56
+ {
57
+ providers: [{ id: 1, state_id: 1}, { id: 2, state_id: 1 }],
58
+ states: [{ id: 1, code: 'NY' }]
59
+ }
60
+ ```
61
+
62
+ If you need the second level of the object graph, you can just match the
63
+ corresponding id.
64
+
65
+ ## Selecting specific data
66
+
67
+ All endpoints allow you to specify which fields you would like to return.
68
+ This allows you to limit the response to contain only the data you need.
69
+
70
+ For example, let's take a request that returns the following JSON by default
71
+
72
+ ```
73
+ {
74
+ provider: {
75
+ id: 1,
76
+ name: 'John',
77
+ phone: '1234567890',
78
+ field_we_dont_care_about: 'value_we_dont_care_about'
79
+ },
80
+ states: [{
81
+ id: 1,
82
+ name: 'New York',
83
+ code: 'NY',
84
+ field_we_dont_care_about: 'value_we_dont_care_about'
85
+ }]
86
+ }
87
+ ```
88
+
89
+ To limit our results to only return the fields we care about, we specify the
90
+ `select` query string parameter for the corresponding fields in the JSON
91
+ document.
92
+
93
+ In this case, we want to select `name` and `phone` from the `provider` key,
94
+ so we would add the parameters `select=provider.name,provider.phone`.
95
+ We also want the `name` and `code` from the `states` key, so we would
96
+ add the parameters `select=states.name,states.code`. The id field of
97
+ each document is always returned whether or not it is requested.
98
+
99
+ Our final request would be `GET /providers/12345?select=provider.name,provider.phone,states.name,states.code`
100
+
101
+ The response would be
102
+
103
+ ```
104
+ {
105
+ provider: {
106
+ id: 1,
107
+ name: 'John',
108
+ phone: '1234567890'
109
+ },
110
+ states: [{
111
+ id: 1,
112
+ name: 'New York',
113
+ code: 'NY'
114
+ }]
115
+ }
116
+ ```
117
+
118
+ ## Benefits summary format
119
+ Benefit cost-share strings are formatted to capture:
120
+ * Network tiers
121
+ * Compound or conditional cost-share
122
+ * Limits on the cost-share
123
+ * Benefit-specific maximum out-of-pocket costs
124
+
125
+ **Example #1**
126
+ As an example, we would represent [this Summary of Benefits & Coverage](https://s3.amazonaws.com/vericred-data/SBC/2017/33602TX0780032.pdf) as:
127
+
128
+ * **Hospital stay facility fees**:
129
+ - Network Provider: `$400 copay/admit plus 20% coinsurance`
130
+ - Out-of-Network Provider: `$1,500 copay/admit plus 50% coinsurance`
131
+ - Vericred's format for this benefit: `In-Network: $400 before deductible then 20% after deductible / Out-of-Network: $1,500 before deductible then 50% after deductible`
132
+
133
+ * **Rehabilitation services:**
134
+ - Network Provider: `20% coinsurance`
135
+ - Out-of-Network Provider: `50% coinsurance`
136
+ - Limitations & Exceptions: `35 visit maximum per benefit period combined with Chiropractic care.`
137
+ - Vericred's format for this benefit: `In-Network: 20% after deductible / Out-of-Network: 50% after deductible | limit: 35 visit(s) per Benefit Period`
138
+
139
+ **Example #2**
140
+ In [this other Summary of Benefits & Coverage](https://s3.amazonaws.com/vericred-data/SBC/2017/40733CA0110568.pdf), the **specialty_drugs** cost-share has a maximum out-of-pocket for in-network pharmacies.
141
+ * **Specialty drugs:**
142
+ - Network Provider: `40% coinsurance up to a $500 maximum for up to a 30 day supply`
143
+ - Out-of-Network Provider `Not covered`
144
+ - Vericred's format for this benefit: `In-Network: 40% after deductible, up to $500 per script / Out-of-Network: 100%`
145
+
146
+ **BNF**
147
+
148
+ Here's a description of the benefits summary string, represented as a context-free grammar:
149
+
150
+ ```
151
+ root ::= coverage
152
+
153
+ coverage ::= (simple_coverage | tiered_coverage) (space pipe space coverage_modifier)?
154
+ tiered_coverage ::= tier (space slash space tier)*
155
+ tier ::= tier_name colon space (tier_coverage | not_applicable)
156
+ tier_coverage ::= simple_coverage (space (then | or | and) space simple_coverage)* tier_limitation?
157
+ simple_coverage ::= (pre_coverage_limitation space)? coverage_amount (space post_coverage_limitation)? (comma? space coverage_condition)?
158
+ coverage_modifier ::= limit_condition colon space (((simple_coverage | simple_limitation) (semicolon space see_carrier_documentation)?) | see_carrier_documentation | waived_if_admitted | shared_across_tiers)
159
+ waived_if_admitted ::= ("copay" space)? "waived if admitted"
160
+ simple_limitation ::= pre_coverage_limitation space "copay applies"
161
+ tier_name ::= "In-Network-Tier-2" | "Out-of-Network" | "In-Network"
162
+ limit_condition ::= "limit" | "condition"
163
+ tier_limitation ::= comma space "up to" space (currency | (integer space time_unit plural?)) (space post_coverage_limitation)?
164
+ coverage_amount ::= currency | unlimited | included | unknown | percentage | (digits space (treatment_unit | time_unit) plural?)
165
+ pre_coverage_limitation ::= first space digits space time_unit plural?
166
+ post_coverage_limitation ::= (((then space currency) | "per condition") space)? "per" space (treatment_unit | (integer space time_unit) | time_unit) plural?
167
+ coverage_condition ::= ("before deductible" | "after deductible" | "penalty" | allowance | "in-state" | "out-of-state") (space allowance)?
168
+ allowance ::= upto_allowance | after_allowance
169
+ upto_allowance ::= "up to" space (currency space)? "allowance"
170
+ after_allowance ::= "after" space (currency space)? "allowance"
171
+ see_carrier_documentation ::= "see carrier documentation for more information"
172
+ shared_across_tiers ::= "shared across all tiers"
173
+ unknown ::= "unknown"
174
+ unlimited ::= /[uU]nlimited/
175
+ included ::= /[iI]ncluded in [mM]edical/
176
+ time_unit ::= /[hH]our/ | (((/[cC]alendar/ | /[cC]ontract/) space)? /[yY]ear/) | /[mM]onth/ | /[dD]ay/ | /[wW]eek/ | /[vV]isit/ | /[lL]ifetime/ | ((((/[bB]enefit/ plural?) | /[eE]ligibility/) space)? /[pP]eriod/)
177
+ treatment_unit ::= /[pP]erson/ | /[gG]roup/ | /[cC]ondition/ | /[sS]cript/ | /[vV]isit/ | /[eE]xam/ | /[iI]tem/ | /[sS]tay/ | /[tT]reatment/ | /[aA]dmission/ | /[eE]pisode/
178
+ comma ::= ","
179
+ colon ::= ":"
180
+ semicolon ::= ";"
181
+ pipe ::= "|"
182
+ slash ::= "/"
183
+ plural ::= "(s)" | "s"
184
+ then ::= "then" | ("," space) | space
185
+ or ::= "or"
186
+ and ::= "and"
187
+ not_applicable ::= "Not Applicable" | "N/A" | "NA"
188
+ first ::= "first"
189
+ currency ::= "$" number
190
+ percentage ::= number "%"
191
+ number ::= float | integer
192
+ float ::= digits "." digits
193
+ integer ::= /[0-9]/+ (comma_int | under_int)*
194
+ comma_int ::= ("," /[0-9]/*3) !"_"
195
+ under_int ::= ("_" /[0-9]/*3) !","
196
+ digits ::= /[0-9]/+ ("_" /[0-9]/+)*
197
+ space ::= /[ \t]/+
198
+ ```
199
+
200
+
201
+
202
+ OpenAPI spec version: 1.0.0
203
+
204
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
205
+
206
+ Licensed under the Apache License, Version 2.0 (the "License");
207
+ you may not use this file except in compliance with the License.
208
+ You may obtain a copy of the License at
209
+
210
+ http://www.apache.org/licenses/LICENSE-2.0
211
+
212
+ Unless required by applicable law or agreed to in writing, software
213
+ distributed under the License is distributed on an "AS IS" BASIS,
214
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
215
+ See the License for the specific language governing permissions and
216
+ limitations under the License.
217
+
218
+ =end
219
+
220
+ require 'date'
221
+
222
+ module VericredClient
223
+
224
+ class RateRequest
225
+ # The external id of the plan
226
+ attr_accessor :external_id
227
+
228
+ # The effective date of the rate
229
+ attr_accessor :effective_date
230
+
231
+ # The expiration date of the rate
232
+ attr_accessor :expiration_date
233
+
234
+ # The natural key for the rating area of the rate
235
+ attr_accessor :rating_area_natural_key
236
+
237
+ # The age 0 non-tobacco rate for the plan
238
+ attr_accessor :age_0
239
+
240
+ # The age 0 tobacco rate for the plan
241
+ attr_accessor :age_0_tobacco
242
+
243
+ # The age 1 non-tobacco rate for the plan
244
+ attr_accessor :age_1
245
+
246
+ # The age 1 tobacco rate for the plan
247
+ attr_accessor :age_1_tobacco
248
+
249
+ # The age 2 non-tobacco rate for the plan
250
+ attr_accessor :age_2
251
+
252
+ # The age 2 tobacco rate for the plan
253
+ attr_accessor :age_2_tobacco
254
+
255
+ # The age 3 non-tobacco rate for the plan
256
+ attr_accessor :age_3
257
+
258
+ # The age 3 tobacco rate for the plan
259
+ attr_accessor :age_3_tobacco
260
+
261
+ # The age 4 non-tobacco rate for the plan
262
+ attr_accessor :age_4
263
+
264
+ # The age 4 tobacco rate for the plan
265
+ attr_accessor :age_4_tobacco
266
+
267
+ # The age 5 non-tobacco rate for the plan
268
+ attr_accessor :age_5
269
+
270
+ # The age 5 tobacco rate for the plan
271
+ attr_accessor :age_5_tobacco
272
+
273
+ # The age 6 non-tobacco rate for the plan
274
+ attr_accessor :age_6
275
+
276
+ # The age 6 tobacco rate for the plan
277
+ attr_accessor :age_6_tobacco
278
+
279
+ # The age 7 non-tobacco rate for the plan
280
+ attr_accessor :age_7
281
+
282
+ # The age 7 tobacco rate for the plan
283
+ attr_accessor :age_7_tobacco
284
+
285
+ # The age 8 non-tobacco rate for the plan
286
+ attr_accessor :age_8
287
+
288
+ # The age 8 tobacco rate for the plan
289
+ attr_accessor :age_8_tobacco
290
+
291
+ # The age 9 non-tobacco rate for the plan
292
+ attr_accessor :age_9
293
+
294
+ # The age 9 tobacco rate for the plan
295
+ attr_accessor :age_9_tobacco
296
+
297
+ # The age 10 non-tobacco rate for the plan
298
+ attr_accessor :age_10
299
+
300
+ # The age 10 tobacco rate for the plan
301
+ attr_accessor :age_10_tobacco
302
+
303
+ # The age 11 non-tobacco rate for the plan
304
+ attr_accessor :age_11
305
+
306
+ # The age 11 tobacco rate for the plan
307
+ attr_accessor :age_11_tobacco
308
+
309
+ # The age 12 non-tobacco rate for the plan
310
+ attr_accessor :age_12
311
+
312
+ # The age 12 tobacco rate for the plan
313
+ attr_accessor :age_12_tobacco
314
+
315
+ # The age 13 non-tobacco rate for the plan
316
+ attr_accessor :age_13
317
+
318
+ # The age 13 tobacco rate for the plan
319
+ attr_accessor :age_13_tobacco
320
+
321
+ # The age 14 non-tobacco rate for the plan
322
+ attr_accessor :age_14
323
+
324
+ # The age 14 tobacco rate for the plan
325
+ attr_accessor :age_14_tobacco
326
+
327
+ # The age 15 non-tobacco rate for the plan
328
+ attr_accessor :age_15
329
+
330
+ # The age 15 tobacco rate for the plan
331
+ attr_accessor :age_15_tobacco
332
+
333
+ # The age 16 non-tobacco rate for the plan
334
+ attr_accessor :age_16
335
+
336
+ # The age 16 tobacco rate for the plan
337
+ attr_accessor :age_16_tobacco
338
+
339
+ # The age 17 non-tobacco rate for the plan
340
+ attr_accessor :age_17
341
+
342
+ # The age 17 tobacco rate for the plan
343
+ attr_accessor :age_17_tobacco
344
+
345
+ # The age 18 non-tobacco rate for the plan
346
+ attr_accessor :age_18
347
+
348
+ # The age 18 tobacco rate for the plan
349
+ attr_accessor :age_18_tobacco
350
+
351
+ # The age 19 non-tobacco rate for the plan
352
+ attr_accessor :age_19
353
+
354
+ # The age 19 tobacco rate for the plan
355
+ attr_accessor :age_19_tobacco
356
+
357
+ # The age 20 non-tobacco rate for the plan
358
+ attr_accessor :age_20
359
+
360
+ # The age 20 tobacco rate for the plan
361
+ attr_accessor :age_20_tobacco
362
+
363
+ # The age 21 non-tobacco rate for the plan
364
+ attr_accessor :age_21
365
+
366
+ # The age 21 tobacco rate for the plan
367
+ attr_accessor :age_21_tobacco
368
+
369
+ # The age 22 non-tobacco rate for the plan
370
+ attr_accessor :age_22
371
+
372
+ # The age 22 tobacco rate for the plan
373
+ attr_accessor :age_22_tobacco
374
+
375
+ # The age 23 non-tobacco rate for the plan
376
+ attr_accessor :age_23
377
+
378
+ # The age 23 tobacco rate for the plan
379
+ attr_accessor :age_23_tobacco
380
+
381
+ # The age 24 non-tobacco rate for the plan
382
+ attr_accessor :age_24
383
+
384
+ # The age 24 tobacco rate for the plan
385
+ attr_accessor :age_24_tobacco
386
+
387
+ # The age 25 non-tobacco rate for the plan
388
+ attr_accessor :age_25
389
+
390
+ # The age 25 tobacco rate for the plan
391
+ attr_accessor :age_25_tobacco
392
+
393
+ # The age 26 non-tobacco rate for the plan
394
+ attr_accessor :age_26
395
+
396
+ # The age 26 tobacco rate for the plan
397
+ attr_accessor :age_26_tobacco
398
+
399
+ # The age 27 non-tobacco rate for the plan
400
+ attr_accessor :age_27
401
+
402
+ # The age 27 tobacco rate for the plan
403
+ attr_accessor :age_27_tobacco
404
+
405
+ # The age 28 non-tobacco rate for the plan
406
+ attr_accessor :age_28
407
+
408
+ # The age 28 tobacco rate for the plan
409
+ attr_accessor :age_28_tobacco
410
+
411
+ # The age 29 non-tobacco rate for the plan
412
+ attr_accessor :age_29
413
+
414
+ # The age 29 tobacco rate for the plan
415
+ attr_accessor :age_29_tobacco
416
+
417
+ # The age 30 non-tobacco rate for the plan
418
+ attr_accessor :age_30
419
+
420
+ # The age 30 tobacco rate for the plan
421
+ attr_accessor :age_30_tobacco
422
+
423
+ # The age 31 non-tobacco rate for the plan
424
+ attr_accessor :age_31
425
+
426
+ # The age 31 tobacco rate for the plan
427
+ attr_accessor :age_31_tobacco
428
+
429
+ # The age 32 non-tobacco rate for the plan
430
+ attr_accessor :age_32
431
+
432
+ # The age 32 tobacco rate for the plan
433
+ attr_accessor :age_32_tobacco
434
+
435
+ # The age 33 non-tobacco rate for the plan
436
+ attr_accessor :age_33
437
+
438
+ # The age 33 tobacco rate for the plan
439
+ attr_accessor :age_33_tobacco
440
+
441
+ # The age 34 non-tobacco rate for the plan
442
+ attr_accessor :age_34
443
+
444
+ # The age 34 tobacco rate for the plan
445
+ attr_accessor :age_34_tobacco
446
+
447
+ # The age 35 non-tobacco rate for the plan
448
+ attr_accessor :age_35
449
+
450
+ # The age 35 tobacco rate for the plan
451
+ attr_accessor :age_35_tobacco
452
+
453
+ # The age 36 non-tobacco rate for the plan
454
+ attr_accessor :age_36
455
+
456
+ # The age 36 tobacco rate for the plan
457
+ attr_accessor :age_36_tobacco
458
+
459
+ # The age 37 non-tobacco rate for the plan
460
+ attr_accessor :age_37
461
+
462
+ # The age 37 tobacco rate for the plan
463
+ attr_accessor :age_37_tobacco
464
+
465
+ # The age 38 non-tobacco rate for the plan
466
+ attr_accessor :age_38
467
+
468
+ # The age 38 tobacco rate for the plan
469
+ attr_accessor :age_38_tobacco
470
+
471
+ # The age 39 non-tobacco rate for the plan
472
+ attr_accessor :age_39
473
+
474
+ # The age 39 tobacco rate for the plan
475
+ attr_accessor :age_39_tobacco
476
+
477
+ # The age 40 non-tobacco rate for the plan
478
+ attr_accessor :age_40
479
+
480
+ # The age 40 tobacco rate for the plan
481
+ attr_accessor :age_40_tobacco
482
+
483
+ # The age 41 non-tobacco rate for the plan
484
+ attr_accessor :age_41
485
+
486
+ # The age 41 tobacco rate for the plan
487
+ attr_accessor :age_41_tobacco
488
+
489
+ # The age 42 non-tobacco rate for the plan
490
+ attr_accessor :age_42
491
+
492
+ # The age 42 tobacco rate for the plan
493
+ attr_accessor :age_42_tobacco
494
+
495
+ # The age 43 non-tobacco rate for the plan
496
+ attr_accessor :age_43
497
+
498
+ # The age 43 tobacco rate for the plan
499
+ attr_accessor :age_43_tobacco
500
+
501
+ # The age 44 non-tobacco rate for the plan
502
+ attr_accessor :age_44
503
+
504
+ # The age 44 tobacco rate for the plan
505
+ attr_accessor :age_44_tobacco
506
+
507
+ # The age 45 non-tobacco rate for the plan
508
+ attr_accessor :age_45
509
+
510
+ # The age 45 tobacco rate for the plan
511
+ attr_accessor :age_45_tobacco
512
+
513
+ # The age 46 non-tobacco rate for the plan
514
+ attr_accessor :age_46
515
+
516
+ # The age 46 tobacco rate for the plan
517
+ attr_accessor :age_46_tobacco
518
+
519
+ # The age 47 non-tobacco rate for the plan
520
+ attr_accessor :age_47
521
+
522
+ # The age 47 tobacco rate for the plan
523
+ attr_accessor :age_47_tobacco
524
+
525
+ # The age 48 non-tobacco rate for the plan
526
+ attr_accessor :age_48
527
+
528
+ # The age 48 tobacco rate for the plan
529
+ attr_accessor :age_48_tobacco
530
+
531
+ # The age 49 non-tobacco rate for the plan
532
+ attr_accessor :age_49
533
+
534
+ # The age 49 tobacco rate for the plan
535
+ attr_accessor :age_49_tobacco
536
+
537
+ # The age 50 non-tobacco rate for the plan
538
+ attr_accessor :age_50
539
+
540
+ # The age 50 tobacco rate for the plan
541
+ attr_accessor :age_50_tobacco
542
+
543
+ # The age 51 non-tobacco rate for the plan
544
+ attr_accessor :age_51
545
+
546
+ # The age 51 tobacco rate for the plan
547
+ attr_accessor :age_51_tobacco
548
+
549
+ # The age 52 non-tobacco rate for the plan
550
+ attr_accessor :age_52
551
+
552
+ # The age 52 tobacco rate for the plan
553
+ attr_accessor :age_52_tobacco
554
+
555
+ # The age 53 non-tobacco rate for the plan
556
+ attr_accessor :age_53
557
+
558
+ # The age 53 tobacco rate for the plan
559
+ attr_accessor :age_53_tobacco
560
+
561
+ # The age 54 non-tobacco rate for the plan
562
+ attr_accessor :age_54
563
+
564
+ # The age 54 tobacco rate for the plan
565
+ attr_accessor :age_54_tobacco
566
+
567
+ # The age 55 non-tobacco rate for the plan
568
+ attr_accessor :age_55
569
+
570
+ # The age 55 tobacco rate for the plan
571
+ attr_accessor :age_55_tobacco
572
+
573
+ # The age 56 non-tobacco rate for the plan
574
+ attr_accessor :age_56
575
+
576
+ # The age 56 tobacco rate for the plan
577
+ attr_accessor :age_56_tobacco
578
+
579
+ # The age 57 non-tobacco rate for the plan
580
+ attr_accessor :age_57
581
+
582
+ # The age 57 tobacco rate for the plan
583
+ attr_accessor :age_57_tobacco
584
+
585
+ # The age 58 non-tobacco rate for the plan
586
+ attr_accessor :age_58
587
+
588
+ # The age 58 tobacco rate for the plan
589
+ attr_accessor :age_58_tobacco
590
+
591
+ # The age 59 non-tobacco rate for the plan
592
+ attr_accessor :age_59
593
+
594
+ # The age 59 tobacco rate for the plan
595
+ attr_accessor :age_59_tobacco
596
+
597
+ # The age 60 non-tobacco rate for the plan
598
+ attr_accessor :age_60
599
+
600
+ # The age 60 tobacco rate for the plan
601
+ attr_accessor :age_60_tobacco
602
+
603
+ # The age 61 non-tobacco rate for the plan
604
+ attr_accessor :age_61
605
+
606
+ # The age 61 tobacco rate for the plan
607
+ attr_accessor :age_61_tobacco
608
+
609
+ # The age 62 non-tobacco rate for the plan
610
+ attr_accessor :age_62
611
+
612
+ # The age 62 tobacco rate for the plan
613
+ attr_accessor :age_62_tobacco
614
+
615
+ # The age 63 non-tobacco rate for the plan
616
+ attr_accessor :age_63
617
+
618
+ # The age 63 tobacco rate for the plan
619
+ attr_accessor :age_63_tobacco
620
+
621
+ # The age 64 non-tobacco rate for the plan
622
+ attr_accessor :age_64
623
+
624
+ # The age 64 tobacco rate for the plan
625
+ attr_accessor :age_64_tobacco
626
+
627
+ # The age 65 non-tobacco rate for the plan
628
+ attr_accessor :age_65
629
+
630
+ # The age 65 tobacco rate for the plan
631
+ attr_accessor :age_65_tobacco
632
+
633
+ # The tier single rate for the plan
634
+ attr_accessor :single
635
+
636
+ # The tier single_and_spouse rate for the plan
637
+ attr_accessor :single_and_spouse
638
+
639
+ # The tier single_and_children rate for the plan
640
+ attr_accessor :single_and_children
641
+
642
+ # The tier family rate for the plan
643
+ attr_accessor :family
644
+
645
+ # The tier child_only rate for the plan
646
+ attr_accessor :child_only
647
+
648
+
649
+ # Attribute mapping from ruby-style variable name to JSON key.
650
+ def self.attribute_map
651
+ {
652
+ :'external_id' => :'external_id',
653
+ :'effective_date' => :'effective_date',
654
+ :'expiration_date' => :'expiration_date',
655
+ :'rating_area_natural_key' => :'rating_area_natural_key',
656
+ :'age_0' => :'age_0',
657
+ :'age_0_tobacco' => :'age_0_tobacco',
658
+ :'age_1' => :'age_1',
659
+ :'age_1_tobacco' => :'age_1_tobacco',
660
+ :'age_2' => :'age_2',
661
+ :'age_2_tobacco' => :'age_2_tobacco',
662
+ :'age_3' => :'age_3',
663
+ :'age_3_tobacco' => :'age_3_tobacco',
664
+ :'age_4' => :'age_4',
665
+ :'age_4_tobacco' => :'age_4_tobacco',
666
+ :'age_5' => :'age_5',
667
+ :'age_5_tobacco' => :'age_5_tobacco',
668
+ :'age_6' => :'age_6',
669
+ :'age_6_tobacco' => :'age_6_tobacco',
670
+ :'age_7' => :'age_7',
671
+ :'age_7_tobacco' => :'age_7_tobacco',
672
+ :'age_8' => :'age_8',
673
+ :'age_8_tobacco' => :'age_8_tobacco',
674
+ :'age_9' => :'age_9',
675
+ :'age_9_tobacco' => :'age_9_tobacco',
676
+ :'age_10' => :'age_10',
677
+ :'age_10_tobacco' => :'age_10_tobacco',
678
+ :'age_11' => :'age_11',
679
+ :'age_11_tobacco' => :'age_11_tobacco',
680
+ :'age_12' => :'age_12',
681
+ :'age_12_tobacco' => :'age_12_tobacco',
682
+ :'age_13' => :'age_13',
683
+ :'age_13_tobacco' => :'age_13_tobacco',
684
+ :'age_14' => :'age_14',
685
+ :'age_14_tobacco' => :'age_14_tobacco',
686
+ :'age_15' => :'age_15',
687
+ :'age_15_tobacco' => :'age_15_tobacco',
688
+ :'age_16' => :'age_16',
689
+ :'age_16_tobacco' => :'age_16_tobacco',
690
+ :'age_17' => :'age_17',
691
+ :'age_17_tobacco' => :'age_17_tobacco',
692
+ :'age_18' => :'age_18',
693
+ :'age_18_tobacco' => :'age_18_tobacco',
694
+ :'age_19' => :'age_19',
695
+ :'age_19_tobacco' => :'age_19_tobacco',
696
+ :'age_20' => :'age_20',
697
+ :'age_20_tobacco' => :'age_20_tobacco',
698
+ :'age_21' => :'age_21',
699
+ :'age_21_tobacco' => :'age_21_tobacco',
700
+ :'age_22' => :'age_22',
701
+ :'age_22_tobacco' => :'age_22_tobacco',
702
+ :'age_23' => :'age_23',
703
+ :'age_23_tobacco' => :'age_23_tobacco',
704
+ :'age_24' => :'age_24',
705
+ :'age_24_tobacco' => :'age_24_tobacco',
706
+ :'age_25' => :'age_25',
707
+ :'age_25_tobacco' => :'age_25_tobacco',
708
+ :'age_26' => :'age_26',
709
+ :'age_26_tobacco' => :'age_26_tobacco',
710
+ :'age_27' => :'age_27',
711
+ :'age_27_tobacco' => :'age_27_tobacco',
712
+ :'age_28' => :'age_28',
713
+ :'age_28_tobacco' => :'age_28_tobacco',
714
+ :'age_29' => :'age_29',
715
+ :'age_29_tobacco' => :'age_29_tobacco',
716
+ :'age_30' => :'age_30',
717
+ :'age_30_tobacco' => :'age_30_tobacco',
718
+ :'age_31' => :'age_31',
719
+ :'age_31_tobacco' => :'age_31_tobacco',
720
+ :'age_32' => :'age_32',
721
+ :'age_32_tobacco' => :'age_32_tobacco',
722
+ :'age_33' => :'age_33',
723
+ :'age_33_tobacco' => :'age_33_tobacco',
724
+ :'age_34' => :'age_34',
725
+ :'age_34_tobacco' => :'age_34_tobacco',
726
+ :'age_35' => :'age_35',
727
+ :'age_35_tobacco' => :'age_35_tobacco',
728
+ :'age_36' => :'age_36',
729
+ :'age_36_tobacco' => :'age_36_tobacco',
730
+ :'age_37' => :'age_37',
731
+ :'age_37_tobacco' => :'age_37_tobacco',
732
+ :'age_38' => :'age_38',
733
+ :'age_38_tobacco' => :'age_38_tobacco',
734
+ :'age_39' => :'age_39',
735
+ :'age_39_tobacco' => :'age_39_tobacco',
736
+ :'age_40' => :'age_40',
737
+ :'age_40_tobacco' => :'age_40_tobacco',
738
+ :'age_41' => :'age_41',
739
+ :'age_41_tobacco' => :'age_41_tobacco',
740
+ :'age_42' => :'age_42',
741
+ :'age_42_tobacco' => :'age_42_tobacco',
742
+ :'age_43' => :'age_43',
743
+ :'age_43_tobacco' => :'age_43_tobacco',
744
+ :'age_44' => :'age_44',
745
+ :'age_44_tobacco' => :'age_44_tobacco',
746
+ :'age_45' => :'age_45',
747
+ :'age_45_tobacco' => :'age_45_tobacco',
748
+ :'age_46' => :'age_46',
749
+ :'age_46_tobacco' => :'age_46_tobacco',
750
+ :'age_47' => :'age_47',
751
+ :'age_47_tobacco' => :'age_47_tobacco',
752
+ :'age_48' => :'age_48',
753
+ :'age_48_tobacco' => :'age_48_tobacco',
754
+ :'age_49' => :'age_49',
755
+ :'age_49_tobacco' => :'age_49_tobacco',
756
+ :'age_50' => :'age_50',
757
+ :'age_50_tobacco' => :'age_50_tobacco',
758
+ :'age_51' => :'age_51',
759
+ :'age_51_tobacco' => :'age_51_tobacco',
760
+ :'age_52' => :'age_52',
761
+ :'age_52_tobacco' => :'age_52_tobacco',
762
+ :'age_53' => :'age_53',
763
+ :'age_53_tobacco' => :'age_53_tobacco',
764
+ :'age_54' => :'age_54',
765
+ :'age_54_tobacco' => :'age_54_tobacco',
766
+ :'age_55' => :'age_55',
767
+ :'age_55_tobacco' => :'age_55_tobacco',
768
+ :'age_56' => :'age_56',
769
+ :'age_56_tobacco' => :'age_56_tobacco',
770
+ :'age_57' => :'age_57',
771
+ :'age_57_tobacco' => :'age_57_tobacco',
772
+ :'age_58' => :'age_58',
773
+ :'age_58_tobacco' => :'age_58_tobacco',
774
+ :'age_59' => :'age_59',
775
+ :'age_59_tobacco' => :'age_59_tobacco',
776
+ :'age_60' => :'age_60',
777
+ :'age_60_tobacco' => :'age_60_tobacco',
778
+ :'age_61' => :'age_61',
779
+ :'age_61_tobacco' => :'age_61_tobacco',
780
+ :'age_62' => :'age_62',
781
+ :'age_62_tobacco' => :'age_62_tobacco',
782
+ :'age_63' => :'age_63',
783
+ :'age_63_tobacco' => :'age_63_tobacco',
784
+ :'age_64' => :'age_64',
785
+ :'age_64_tobacco' => :'age_64_tobacco',
786
+ :'age_65' => :'age_65',
787
+ :'age_65_tobacco' => :'age_65_tobacco',
788
+ :'single' => :'single',
789
+ :'single_and_spouse' => :'single_and_spouse',
790
+ :'single_and_children' => :'single_and_children',
791
+ :'family' => :'family',
792
+ :'child_only' => :'child_only'
793
+ }
794
+ end
795
+
796
+ # Attribute type mapping.
797
+ def self.swagger_types
798
+ {
799
+ :'external_id' => :'String',
800
+ :'effective_date' => :'String',
801
+ :'expiration_date' => :'String',
802
+ :'rating_area_natural_key' => :'String',
803
+ :'age_0' => :'Float',
804
+ :'age_0_tobacco' => :'Float',
805
+ :'age_1' => :'Float',
806
+ :'age_1_tobacco' => :'Float',
807
+ :'age_2' => :'Float',
808
+ :'age_2_tobacco' => :'Float',
809
+ :'age_3' => :'Float',
810
+ :'age_3_tobacco' => :'Float',
811
+ :'age_4' => :'Float',
812
+ :'age_4_tobacco' => :'Float',
813
+ :'age_5' => :'Float',
814
+ :'age_5_tobacco' => :'Float',
815
+ :'age_6' => :'Float',
816
+ :'age_6_tobacco' => :'Float',
817
+ :'age_7' => :'Float',
818
+ :'age_7_tobacco' => :'Float',
819
+ :'age_8' => :'Float',
820
+ :'age_8_tobacco' => :'Float',
821
+ :'age_9' => :'Float',
822
+ :'age_9_tobacco' => :'Float',
823
+ :'age_10' => :'Float',
824
+ :'age_10_tobacco' => :'Float',
825
+ :'age_11' => :'Float',
826
+ :'age_11_tobacco' => :'Float',
827
+ :'age_12' => :'Float',
828
+ :'age_12_tobacco' => :'Float',
829
+ :'age_13' => :'Float',
830
+ :'age_13_tobacco' => :'Float',
831
+ :'age_14' => :'Float',
832
+ :'age_14_tobacco' => :'Float',
833
+ :'age_15' => :'Float',
834
+ :'age_15_tobacco' => :'Float',
835
+ :'age_16' => :'Float',
836
+ :'age_16_tobacco' => :'Float',
837
+ :'age_17' => :'Float',
838
+ :'age_17_tobacco' => :'Float',
839
+ :'age_18' => :'Float',
840
+ :'age_18_tobacco' => :'Float',
841
+ :'age_19' => :'Float',
842
+ :'age_19_tobacco' => :'Float',
843
+ :'age_20' => :'Float',
844
+ :'age_20_tobacco' => :'Float',
845
+ :'age_21' => :'Float',
846
+ :'age_21_tobacco' => :'Float',
847
+ :'age_22' => :'Float',
848
+ :'age_22_tobacco' => :'Float',
849
+ :'age_23' => :'Float',
850
+ :'age_23_tobacco' => :'Float',
851
+ :'age_24' => :'Float',
852
+ :'age_24_tobacco' => :'Float',
853
+ :'age_25' => :'Float',
854
+ :'age_25_tobacco' => :'Float',
855
+ :'age_26' => :'Float',
856
+ :'age_26_tobacco' => :'Float',
857
+ :'age_27' => :'Float',
858
+ :'age_27_tobacco' => :'Float',
859
+ :'age_28' => :'Float',
860
+ :'age_28_tobacco' => :'Float',
861
+ :'age_29' => :'Float',
862
+ :'age_29_tobacco' => :'Float',
863
+ :'age_30' => :'Float',
864
+ :'age_30_tobacco' => :'Float',
865
+ :'age_31' => :'Float',
866
+ :'age_31_tobacco' => :'Float',
867
+ :'age_32' => :'Float',
868
+ :'age_32_tobacco' => :'Float',
869
+ :'age_33' => :'Float',
870
+ :'age_33_tobacco' => :'Float',
871
+ :'age_34' => :'Float',
872
+ :'age_34_tobacco' => :'Float',
873
+ :'age_35' => :'Float',
874
+ :'age_35_tobacco' => :'Float',
875
+ :'age_36' => :'Float',
876
+ :'age_36_tobacco' => :'Float',
877
+ :'age_37' => :'Float',
878
+ :'age_37_tobacco' => :'Float',
879
+ :'age_38' => :'Float',
880
+ :'age_38_tobacco' => :'Float',
881
+ :'age_39' => :'Float',
882
+ :'age_39_tobacco' => :'Float',
883
+ :'age_40' => :'Float',
884
+ :'age_40_tobacco' => :'Float',
885
+ :'age_41' => :'Float',
886
+ :'age_41_tobacco' => :'Float',
887
+ :'age_42' => :'Float',
888
+ :'age_42_tobacco' => :'Float',
889
+ :'age_43' => :'Float',
890
+ :'age_43_tobacco' => :'Float',
891
+ :'age_44' => :'Float',
892
+ :'age_44_tobacco' => :'Float',
893
+ :'age_45' => :'Float',
894
+ :'age_45_tobacco' => :'Float',
895
+ :'age_46' => :'Float',
896
+ :'age_46_tobacco' => :'Float',
897
+ :'age_47' => :'Float',
898
+ :'age_47_tobacco' => :'Float',
899
+ :'age_48' => :'Float',
900
+ :'age_48_tobacco' => :'Float',
901
+ :'age_49' => :'Float',
902
+ :'age_49_tobacco' => :'Float',
903
+ :'age_50' => :'Float',
904
+ :'age_50_tobacco' => :'Float',
905
+ :'age_51' => :'Float',
906
+ :'age_51_tobacco' => :'Float',
907
+ :'age_52' => :'Float',
908
+ :'age_52_tobacco' => :'Float',
909
+ :'age_53' => :'Float',
910
+ :'age_53_tobacco' => :'Float',
911
+ :'age_54' => :'Float',
912
+ :'age_54_tobacco' => :'Float',
913
+ :'age_55' => :'Float',
914
+ :'age_55_tobacco' => :'Float',
915
+ :'age_56' => :'Float',
916
+ :'age_56_tobacco' => :'Float',
917
+ :'age_57' => :'Float',
918
+ :'age_57_tobacco' => :'Float',
919
+ :'age_58' => :'Float',
920
+ :'age_58_tobacco' => :'Float',
921
+ :'age_59' => :'Float',
922
+ :'age_59_tobacco' => :'Float',
923
+ :'age_60' => :'Float',
924
+ :'age_60_tobacco' => :'Float',
925
+ :'age_61' => :'Float',
926
+ :'age_61_tobacco' => :'Float',
927
+ :'age_62' => :'Float',
928
+ :'age_62_tobacco' => :'Float',
929
+ :'age_63' => :'Float',
930
+ :'age_63_tobacco' => :'Float',
931
+ :'age_64' => :'Float',
932
+ :'age_64_tobacco' => :'Float',
933
+ :'age_65' => :'Float',
934
+ :'age_65_tobacco' => :'Float',
935
+ :'single' => :'Float',
936
+ :'single_and_spouse' => :'Float',
937
+ :'single_and_children' => :'Float',
938
+ :'family' => :'Float',
939
+ :'child_only' => :'Float'
940
+ }
941
+ end
942
+
943
+ # Initializes the object
944
+ # @param [Hash] attributes Model attributes in the form of hash
945
+ def initialize(attributes = {})
946
+ return unless attributes.is_a?(Hash)
947
+
948
+ # convert string to symbol for hash key
949
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
950
+
951
+ if attributes.has_key?(:'external_id')
952
+ self.external_id = attributes[:'external_id']
953
+ end
954
+
955
+ if attributes.has_key?(:'effective_date')
956
+ self.effective_date = attributes[:'effective_date']
957
+ end
958
+
959
+ if attributes.has_key?(:'expiration_date')
960
+ self.expiration_date = attributes[:'expiration_date']
961
+ end
962
+
963
+ if attributes.has_key?(:'rating_area_natural_key')
964
+ self.rating_area_natural_key = attributes[:'rating_area_natural_key']
965
+ end
966
+
967
+ if attributes.has_key?(:'age_0')
968
+ self.age_0 = attributes[:'age_0']
969
+ end
970
+
971
+ if attributes.has_key?(:'age_0_tobacco')
972
+ self.age_0_tobacco = attributes[:'age_0_tobacco']
973
+ end
974
+
975
+ if attributes.has_key?(:'age_1')
976
+ self.age_1 = attributes[:'age_1']
977
+ end
978
+
979
+ if attributes.has_key?(:'age_1_tobacco')
980
+ self.age_1_tobacco = attributes[:'age_1_tobacco']
981
+ end
982
+
983
+ if attributes.has_key?(:'age_2')
984
+ self.age_2 = attributes[:'age_2']
985
+ end
986
+
987
+ if attributes.has_key?(:'age_2_tobacco')
988
+ self.age_2_tobacco = attributes[:'age_2_tobacco']
989
+ end
990
+
991
+ if attributes.has_key?(:'age_3')
992
+ self.age_3 = attributes[:'age_3']
993
+ end
994
+
995
+ if attributes.has_key?(:'age_3_tobacco')
996
+ self.age_3_tobacco = attributes[:'age_3_tobacco']
997
+ end
998
+
999
+ if attributes.has_key?(:'age_4')
1000
+ self.age_4 = attributes[:'age_4']
1001
+ end
1002
+
1003
+ if attributes.has_key?(:'age_4_tobacco')
1004
+ self.age_4_tobacco = attributes[:'age_4_tobacco']
1005
+ end
1006
+
1007
+ if attributes.has_key?(:'age_5')
1008
+ self.age_5 = attributes[:'age_5']
1009
+ end
1010
+
1011
+ if attributes.has_key?(:'age_5_tobacco')
1012
+ self.age_5_tobacco = attributes[:'age_5_tobacco']
1013
+ end
1014
+
1015
+ if attributes.has_key?(:'age_6')
1016
+ self.age_6 = attributes[:'age_6']
1017
+ end
1018
+
1019
+ if attributes.has_key?(:'age_6_tobacco')
1020
+ self.age_6_tobacco = attributes[:'age_6_tobacco']
1021
+ end
1022
+
1023
+ if attributes.has_key?(:'age_7')
1024
+ self.age_7 = attributes[:'age_7']
1025
+ end
1026
+
1027
+ if attributes.has_key?(:'age_7_tobacco')
1028
+ self.age_7_tobacco = attributes[:'age_7_tobacco']
1029
+ end
1030
+
1031
+ if attributes.has_key?(:'age_8')
1032
+ self.age_8 = attributes[:'age_8']
1033
+ end
1034
+
1035
+ if attributes.has_key?(:'age_8_tobacco')
1036
+ self.age_8_tobacco = attributes[:'age_8_tobacco']
1037
+ end
1038
+
1039
+ if attributes.has_key?(:'age_9')
1040
+ self.age_9 = attributes[:'age_9']
1041
+ end
1042
+
1043
+ if attributes.has_key?(:'age_9_tobacco')
1044
+ self.age_9_tobacco = attributes[:'age_9_tobacco']
1045
+ end
1046
+
1047
+ if attributes.has_key?(:'age_10')
1048
+ self.age_10 = attributes[:'age_10']
1049
+ end
1050
+
1051
+ if attributes.has_key?(:'age_10_tobacco')
1052
+ self.age_10_tobacco = attributes[:'age_10_tobacco']
1053
+ end
1054
+
1055
+ if attributes.has_key?(:'age_11')
1056
+ self.age_11 = attributes[:'age_11']
1057
+ end
1058
+
1059
+ if attributes.has_key?(:'age_11_tobacco')
1060
+ self.age_11_tobacco = attributes[:'age_11_tobacco']
1061
+ end
1062
+
1063
+ if attributes.has_key?(:'age_12')
1064
+ self.age_12 = attributes[:'age_12']
1065
+ end
1066
+
1067
+ if attributes.has_key?(:'age_12_tobacco')
1068
+ self.age_12_tobacco = attributes[:'age_12_tobacco']
1069
+ end
1070
+
1071
+ if attributes.has_key?(:'age_13')
1072
+ self.age_13 = attributes[:'age_13']
1073
+ end
1074
+
1075
+ if attributes.has_key?(:'age_13_tobacco')
1076
+ self.age_13_tobacco = attributes[:'age_13_tobacco']
1077
+ end
1078
+
1079
+ if attributes.has_key?(:'age_14')
1080
+ self.age_14 = attributes[:'age_14']
1081
+ end
1082
+
1083
+ if attributes.has_key?(:'age_14_tobacco')
1084
+ self.age_14_tobacco = attributes[:'age_14_tobacco']
1085
+ end
1086
+
1087
+ if attributes.has_key?(:'age_15')
1088
+ self.age_15 = attributes[:'age_15']
1089
+ end
1090
+
1091
+ if attributes.has_key?(:'age_15_tobacco')
1092
+ self.age_15_tobacco = attributes[:'age_15_tobacco']
1093
+ end
1094
+
1095
+ if attributes.has_key?(:'age_16')
1096
+ self.age_16 = attributes[:'age_16']
1097
+ end
1098
+
1099
+ if attributes.has_key?(:'age_16_tobacco')
1100
+ self.age_16_tobacco = attributes[:'age_16_tobacco']
1101
+ end
1102
+
1103
+ if attributes.has_key?(:'age_17')
1104
+ self.age_17 = attributes[:'age_17']
1105
+ end
1106
+
1107
+ if attributes.has_key?(:'age_17_tobacco')
1108
+ self.age_17_tobacco = attributes[:'age_17_tobacco']
1109
+ end
1110
+
1111
+ if attributes.has_key?(:'age_18')
1112
+ self.age_18 = attributes[:'age_18']
1113
+ end
1114
+
1115
+ if attributes.has_key?(:'age_18_tobacco')
1116
+ self.age_18_tobacco = attributes[:'age_18_tobacco']
1117
+ end
1118
+
1119
+ if attributes.has_key?(:'age_19')
1120
+ self.age_19 = attributes[:'age_19']
1121
+ end
1122
+
1123
+ if attributes.has_key?(:'age_19_tobacco')
1124
+ self.age_19_tobacco = attributes[:'age_19_tobacco']
1125
+ end
1126
+
1127
+ if attributes.has_key?(:'age_20')
1128
+ self.age_20 = attributes[:'age_20']
1129
+ end
1130
+
1131
+ if attributes.has_key?(:'age_20_tobacco')
1132
+ self.age_20_tobacco = attributes[:'age_20_tobacco']
1133
+ end
1134
+
1135
+ if attributes.has_key?(:'age_21')
1136
+ self.age_21 = attributes[:'age_21']
1137
+ end
1138
+
1139
+ if attributes.has_key?(:'age_21_tobacco')
1140
+ self.age_21_tobacco = attributes[:'age_21_tobacco']
1141
+ end
1142
+
1143
+ if attributes.has_key?(:'age_22')
1144
+ self.age_22 = attributes[:'age_22']
1145
+ end
1146
+
1147
+ if attributes.has_key?(:'age_22_tobacco')
1148
+ self.age_22_tobacco = attributes[:'age_22_tobacco']
1149
+ end
1150
+
1151
+ if attributes.has_key?(:'age_23')
1152
+ self.age_23 = attributes[:'age_23']
1153
+ end
1154
+
1155
+ if attributes.has_key?(:'age_23_tobacco')
1156
+ self.age_23_tobacco = attributes[:'age_23_tobacco']
1157
+ end
1158
+
1159
+ if attributes.has_key?(:'age_24')
1160
+ self.age_24 = attributes[:'age_24']
1161
+ end
1162
+
1163
+ if attributes.has_key?(:'age_24_tobacco')
1164
+ self.age_24_tobacco = attributes[:'age_24_tobacco']
1165
+ end
1166
+
1167
+ if attributes.has_key?(:'age_25')
1168
+ self.age_25 = attributes[:'age_25']
1169
+ end
1170
+
1171
+ if attributes.has_key?(:'age_25_tobacco')
1172
+ self.age_25_tobacco = attributes[:'age_25_tobacco']
1173
+ end
1174
+
1175
+ if attributes.has_key?(:'age_26')
1176
+ self.age_26 = attributes[:'age_26']
1177
+ end
1178
+
1179
+ if attributes.has_key?(:'age_26_tobacco')
1180
+ self.age_26_tobacco = attributes[:'age_26_tobacco']
1181
+ end
1182
+
1183
+ if attributes.has_key?(:'age_27')
1184
+ self.age_27 = attributes[:'age_27']
1185
+ end
1186
+
1187
+ if attributes.has_key?(:'age_27_tobacco')
1188
+ self.age_27_tobacco = attributes[:'age_27_tobacco']
1189
+ end
1190
+
1191
+ if attributes.has_key?(:'age_28')
1192
+ self.age_28 = attributes[:'age_28']
1193
+ end
1194
+
1195
+ if attributes.has_key?(:'age_28_tobacco')
1196
+ self.age_28_tobacco = attributes[:'age_28_tobacco']
1197
+ end
1198
+
1199
+ if attributes.has_key?(:'age_29')
1200
+ self.age_29 = attributes[:'age_29']
1201
+ end
1202
+
1203
+ if attributes.has_key?(:'age_29_tobacco')
1204
+ self.age_29_tobacco = attributes[:'age_29_tobacco']
1205
+ end
1206
+
1207
+ if attributes.has_key?(:'age_30')
1208
+ self.age_30 = attributes[:'age_30']
1209
+ end
1210
+
1211
+ if attributes.has_key?(:'age_30_tobacco')
1212
+ self.age_30_tobacco = attributes[:'age_30_tobacco']
1213
+ end
1214
+
1215
+ if attributes.has_key?(:'age_31')
1216
+ self.age_31 = attributes[:'age_31']
1217
+ end
1218
+
1219
+ if attributes.has_key?(:'age_31_tobacco')
1220
+ self.age_31_tobacco = attributes[:'age_31_tobacco']
1221
+ end
1222
+
1223
+ if attributes.has_key?(:'age_32')
1224
+ self.age_32 = attributes[:'age_32']
1225
+ end
1226
+
1227
+ if attributes.has_key?(:'age_32_tobacco')
1228
+ self.age_32_tobacco = attributes[:'age_32_tobacco']
1229
+ end
1230
+
1231
+ if attributes.has_key?(:'age_33')
1232
+ self.age_33 = attributes[:'age_33']
1233
+ end
1234
+
1235
+ if attributes.has_key?(:'age_33_tobacco')
1236
+ self.age_33_tobacco = attributes[:'age_33_tobacco']
1237
+ end
1238
+
1239
+ if attributes.has_key?(:'age_34')
1240
+ self.age_34 = attributes[:'age_34']
1241
+ end
1242
+
1243
+ if attributes.has_key?(:'age_34_tobacco')
1244
+ self.age_34_tobacco = attributes[:'age_34_tobacco']
1245
+ end
1246
+
1247
+ if attributes.has_key?(:'age_35')
1248
+ self.age_35 = attributes[:'age_35']
1249
+ end
1250
+
1251
+ if attributes.has_key?(:'age_35_tobacco')
1252
+ self.age_35_tobacco = attributes[:'age_35_tobacco']
1253
+ end
1254
+
1255
+ if attributes.has_key?(:'age_36')
1256
+ self.age_36 = attributes[:'age_36']
1257
+ end
1258
+
1259
+ if attributes.has_key?(:'age_36_tobacco')
1260
+ self.age_36_tobacco = attributes[:'age_36_tobacco']
1261
+ end
1262
+
1263
+ if attributes.has_key?(:'age_37')
1264
+ self.age_37 = attributes[:'age_37']
1265
+ end
1266
+
1267
+ if attributes.has_key?(:'age_37_tobacco')
1268
+ self.age_37_tobacco = attributes[:'age_37_tobacco']
1269
+ end
1270
+
1271
+ if attributes.has_key?(:'age_38')
1272
+ self.age_38 = attributes[:'age_38']
1273
+ end
1274
+
1275
+ if attributes.has_key?(:'age_38_tobacco')
1276
+ self.age_38_tobacco = attributes[:'age_38_tobacco']
1277
+ end
1278
+
1279
+ if attributes.has_key?(:'age_39')
1280
+ self.age_39 = attributes[:'age_39']
1281
+ end
1282
+
1283
+ if attributes.has_key?(:'age_39_tobacco')
1284
+ self.age_39_tobacco = attributes[:'age_39_tobacco']
1285
+ end
1286
+
1287
+ if attributes.has_key?(:'age_40')
1288
+ self.age_40 = attributes[:'age_40']
1289
+ end
1290
+
1291
+ if attributes.has_key?(:'age_40_tobacco')
1292
+ self.age_40_tobacco = attributes[:'age_40_tobacco']
1293
+ end
1294
+
1295
+ if attributes.has_key?(:'age_41')
1296
+ self.age_41 = attributes[:'age_41']
1297
+ end
1298
+
1299
+ if attributes.has_key?(:'age_41_tobacco')
1300
+ self.age_41_tobacco = attributes[:'age_41_tobacco']
1301
+ end
1302
+
1303
+ if attributes.has_key?(:'age_42')
1304
+ self.age_42 = attributes[:'age_42']
1305
+ end
1306
+
1307
+ if attributes.has_key?(:'age_42_tobacco')
1308
+ self.age_42_tobacco = attributes[:'age_42_tobacco']
1309
+ end
1310
+
1311
+ if attributes.has_key?(:'age_43')
1312
+ self.age_43 = attributes[:'age_43']
1313
+ end
1314
+
1315
+ if attributes.has_key?(:'age_43_tobacco')
1316
+ self.age_43_tobacco = attributes[:'age_43_tobacco']
1317
+ end
1318
+
1319
+ if attributes.has_key?(:'age_44')
1320
+ self.age_44 = attributes[:'age_44']
1321
+ end
1322
+
1323
+ if attributes.has_key?(:'age_44_tobacco')
1324
+ self.age_44_tobacco = attributes[:'age_44_tobacco']
1325
+ end
1326
+
1327
+ if attributes.has_key?(:'age_45')
1328
+ self.age_45 = attributes[:'age_45']
1329
+ end
1330
+
1331
+ if attributes.has_key?(:'age_45_tobacco')
1332
+ self.age_45_tobacco = attributes[:'age_45_tobacco']
1333
+ end
1334
+
1335
+ if attributes.has_key?(:'age_46')
1336
+ self.age_46 = attributes[:'age_46']
1337
+ end
1338
+
1339
+ if attributes.has_key?(:'age_46_tobacco')
1340
+ self.age_46_tobacco = attributes[:'age_46_tobacco']
1341
+ end
1342
+
1343
+ if attributes.has_key?(:'age_47')
1344
+ self.age_47 = attributes[:'age_47']
1345
+ end
1346
+
1347
+ if attributes.has_key?(:'age_47_tobacco')
1348
+ self.age_47_tobacco = attributes[:'age_47_tobacco']
1349
+ end
1350
+
1351
+ if attributes.has_key?(:'age_48')
1352
+ self.age_48 = attributes[:'age_48']
1353
+ end
1354
+
1355
+ if attributes.has_key?(:'age_48_tobacco')
1356
+ self.age_48_tobacco = attributes[:'age_48_tobacco']
1357
+ end
1358
+
1359
+ if attributes.has_key?(:'age_49')
1360
+ self.age_49 = attributes[:'age_49']
1361
+ end
1362
+
1363
+ if attributes.has_key?(:'age_49_tobacco')
1364
+ self.age_49_tobacco = attributes[:'age_49_tobacco']
1365
+ end
1366
+
1367
+ if attributes.has_key?(:'age_50')
1368
+ self.age_50 = attributes[:'age_50']
1369
+ end
1370
+
1371
+ if attributes.has_key?(:'age_50_tobacco')
1372
+ self.age_50_tobacco = attributes[:'age_50_tobacco']
1373
+ end
1374
+
1375
+ if attributes.has_key?(:'age_51')
1376
+ self.age_51 = attributes[:'age_51']
1377
+ end
1378
+
1379
+ if attributes.has_key?(:'age_51_tobacco')
1380
+ self.age_51_tobacco = attributes[:'age_51_tobacco']
1381
+ end
1382
+
1383
+ if attributes.has_key?(:'age_52')
1384
+ self.age_52 = attributes[:'age_52']
1385
+ end
1386
+
1387
+ if attributes.has_key?(:'age_52_tobacco')
1388
+ self.age_52_tobacco = attributes[:'age_52_tobacco']
1389
+ end
1390
+
1391
+ if attributes.has_key?(:'age_53')
1392
+ self.age_53 = attributes[:'age_53']
1393
+ end
1394
+
1395
+ if attributes.has_key?(:'age_53_tobacco')
1396
+ self.age_53_tobacco = attributes[:'age_53_tobacco']
1397
+ end
1398
+
1399
+ if attributes.has_key?(:'age_54')
1400
+ self.age_54 = attributes[:'age_54']
1401
+ end
1402
+
1403
+ if attributes.has_key?(:'age_54_tobacco')
1404
+ self.age_54_tobacco = attributes[:'age_54_tobacco']
1405
+ end
1406
+
1407
+ if attributes.has_key?(:'age_55')
1408
+ self.age_55 = attributes[:'age_55']
1409
+ end
1410
+
1411
+ if attributes.has_key?(:'age_55_tobacco')
1412
+ self.age_55_tobacco = attributes[:'age_55_tobacco']
1413
+ end
1414
+
1415
+ if attributes.has_key?(:'age_56')
1416
+ self.age_56 = attributes[:'age_56']
1417
+ end
1418
+
1419
+ if attributes.has_key?(:'age_56_tobacco')
1420
+ self.age_56_tobacco = attributes[:'age_56_tobacco']
1421
+ end
1422
+
1423
+ if attributes.has_key?(:'age_57')
1424
+ self.age_57 = attributes[:'age_57']
1425
+ end
1426
+
1427
+ if attributes.has_key?(:'age_57_tobacco')
1428
+ self.age_57_tobacco = attributes[:'age_57_tobacco']
1429
+ end
1430
+
1431
+ if attributes.has_key?(:'age_58')
1432
+ self.age_58 = attributes[:'age_58']
1433
+ end
1434
+
1435
+ if attributes.has_key?(:'age_58_tobacco')
1436
+ self.age_58_tobacco = attributes[:'age_58_tobacco']
1437
+ end
1438
+
1439
+ if attributes.has_key?(:'age_59')
1440
+ self.age_59 = attributes[:'age_59']
1441
+ end
1442
+
1443
+ if attributes.has_key?(:'age_59_tobacco')
1444
+ self.age_59_tobacco = attributes[:'age_59_tobacco']
1445
+ end
1446
+
1447
+ if attributes.has_key?(:'age_60')
1448
+ self.age_60 = attributes[:'age_60']
1449
+ end
1450
+
1451
+ if attributes.has_key?(:'age_60_tobacco')
1452
+ self.age_60_tobacco = attributes[:'age_60_tobacco']
1453
+ end
1454
+
1455
+ if attributes.has_key?(:'age_61')
1456
+ self.age_61 = attributes[:'age_61']
1457
+ end
1458
+
1459
+ if attributes.has_key?(:'age_61_tobacco')
1460
+ self.age_61_tobacco = attributes[:'age_61_tobacco']
1461
+ end
1462
+
1463
+ if attributes.has_key?(:'age_62')
1464
+ self.age_62 = attributes[:'age_62']
1465
+ end
1466
+
1467
+ if attributes.has_key?(:'age_62_tobacco')
1468
+ self.age_62_tobacco = attributes[:'age_62_tobacco']
1469
+ end
1470
+
1471
+ if attributes.has_key?(:'age_63')
1472
+ self.age_63 = attributes[:'age_63']
1473
+ end
1474
+
1475
+ if attributes.has_key?(:'age_63_tobacco')
1476
+ self.age_63_tobacco = attributes[:'age_63_tobacco']
1477
+ end
1478
+
1479
+ if attributes.has_key?(:'age_64')
1480
+ self.age_64 = attributes[:'age_64']
1481
+ end
1482
+
1483
+ if attributes.has_key?(:'age_64_tobacco')
1484
+ self.age_64_tobacco = attributes[:'age_64_tobacco']
1485
+ end
1486
+
1487
+ if attributes.has_key?(:'age_65')
1488
+ self.age_65 = attributes[:'age_65']
1489
+ end
1490
+
1491
+ if attributes.has_key?(:'age_65_tobacco')
1492
+ self.age_65_tobacco = attributes[:'age_65_tobacco']
1493
+ end
1494
+
1495
+ if attributes.has_key?(:'single')
1496
+ self.single = attributes[:'single']
1497
+ end
1498
+
1499
+ if attributes.has_key?(:'single_and_spouse')
1500
+ self.single_and_spouse = attributes[:'single_and_spouse']
1501
+ end
1502
+
1503
+ if attributes.has_key?(:'single_and_children')
1504
+ self.single_and_children = attributes[:'single_and_children']
1505
+ end
1506
+
1507
+ if attributes.has_key?(:'family')
1508
+ self.family = attributes[:'family']
1509
+ end
1510
+
1511
+ if attributes.has_key?(:'child_only')
1512
+ self.child_only = attributes[:'child_only']
1513
+ end
1514
+
1515
+ end
1516
+
1517
+ # Show invalid properties with the reasons. Usually used together with valid?
1518
+ # @return Array for valid properies with the reasons
1519
+ def list_invalid_properties
1520
+ invalid_properties = Array.new
1521
+ return invalid_properties
1522
+ end
1523
+
1524
+ # Check to see if the all the properties in the model are valid
1525
+ # @return true if the model is valid
1526
+ def valid?
1527
+ return true
1528
+ end
1529
+
1530
+ # Checks equality by comparing each attribute.
1531
+ # @param [Object] Object to be compared
1532
+ def ==(o)
1533
+ return true if self.equal?(o)
1534
+ self.class == o.class &&
1535
+ external_id == o.external_id &&
1536
+ effective_date == o.effective_date &&
1537
+ expiration_date == o.expiration_date &&
1538
+ rating_area_natural_key == o.rating_area_natural_key &&
1539
+ age_0 == o.age_0 &&
1540
+ age_0_tobacco == o.age_0_tobacco &&
1541
+ age_1 == o.age_1 &&
1542
+ age_1_tobacco == o.age_1_tobacco &&
1543
+ age_2 == o.age_2 &&
1544
+ age_2_tobacco == o.age_2_tobacco &&
1545
+ age_3 == o.age_3 &&
1546
+ age_3_tobacco == o.age_3_tobacco &&
1547
+ age_4 == o.age_4 &&
1548
+ age_4_tobacco == o.age_4_tobacco &&
1549
+ age_5 == o.age_5 &&
1550
+ age_5_tobacco == o.age_5_tobacco &&
1551
+ age_6 == o.age_6 &&
1552
+ age_6_tobacco == o.age_6_tobacco &&
1553
+ age_7 == o.age_7 &&
1554
+ age_7_tobacco == o.age_7_tobacco &&
1555
+ age_8 == o.age_8 &&
1556
+ age_8_tobacco == o.age_8_tobacco &&
1557
+ age_9 == o.age_9 &&
1558
+ age_9_tobacco == o.age_9_tobacco &&
1559
+ age_10 == o.age_10 &&
1560
+ age_10_tobacco == o.age_10_tobacco &&
1561
+ age_11 == o.age_11 &&
1562
+ age_11_tobacco == o.age_11_tobacco &&
1563
+ age_12 == o.age_12 &&
1564
+ age_12_tobacco == o.age_12_tobacco &&
1565
+ age_13 == o.age_13 &&
1566
+ age_13_tobacco == o.age_13_tobacco &&
1567
+ age_14 == o.age_14 &&
1568
+ age_14_tobacco == o.age_14_tobacco &&
1569
+ age_15 == o.age_15 &&
1570
+ age_15_tobacco == o.age_15_tobacco &&
1571
+ age_16 == o.age_16 &&
1572
+ age_16_tobacco == o.age_16_tobacco &&
1573
+ age_17 == o.age_17 &&
1574
+ age_17_tobacco == o.age_17_tobacco &&
1575
+ age_18 == o.age_18 &&
1576
+ age_18_tobacco == o.age_18_tobacco &&
1577
+ age_19 == o.age_19 &&
1578
+ age_19_tobacco == o.age_19_tobacco &&
1579
+ age_20 == o.age_20 &&
1580
+ age_20_tobacco == o.age_20_tobacco &&
1581
+ age_21 == o.age_21 &&
1582
+ age_21_tobacco == o.age_21_tobacco &&
1583
+ age_22 == o.age_22 &&
1584
+ age_22_tobacco == o.age_22_tobacco &&
1585
+ age_23 == o.age_23 &&
1586
+ age_23_tobacco == o.age_23_tobacco &&
1587
+ age_24 == o.age_24 &&
1588
+ age_24_tobacco == o.age_24_tobacco &&
1589
+ age_25 == o.age_25 &&
1590
+ age_25_tobacco == o.age_25_tobacco &&
1591
+ age_26 == o.age_26 &&
1592
+ age_26_tobacco == o.age_26_tobacco &&
1593
+ age_27 == o.age_27 &&
1594
+ age_27_tobacco == o.age_27_tobacco &&
1595
+ age_28 == o.age_28 &&
1596
+ age_28_tobacco == o.age_28_tobacco &&
1597
+ age_29 == o.age_29 &&
1598
+ age_29_tobacco == o.age_29_tobacco &&
1599
+ age_30 == o.age_30 &&
1600
+ age_30_tobacco == o.age_30_tobacco &&
1601
+ age_31 == o.age_31 &&
1602
+ age_31_tobacco == o.age_31_tobacco &&
1603
+ age_32 == o.age_32 &&
1604
+ age_32_tobacco == o.age_32_tobacco &&
1605
+ age_33 == o.age_33 &&
1606
+ age_33_tobacco == o.age_33_tobacco &&
1607
+ age_34 == o.age_34 &&
1608
+ age_34_tobacco == o.age_34_tobacco &&
1609
+ age_35 == o.age_35 &&
1610
+ age_35_tobacco == o.age_35_tobacco &&
1611
+ age_36 == o.age_36 &&
1612
+ age_36_tobacco == o.age_36_tobacco &&
1613
+ age_37 == o.age_37 &&
1614
+ age_37_tobacco == o.age_37_tobacco &&
1615
+ age_38 == o.age_38 &&
1616
+ age_38_tobacco == o.age_38_tobacco &&
1617
+ age_39 == o.age_39 &&
1618
+ age_39_tobacco == o.age_39_tobacco &&
1619
+ age_40 == o.age_40 &&
1620
+ age_40_tobacco == o.age_40_tobacco &&
1621
+ age_41 == o.age_41 &&
1622
+ age_41_tobacco == o.age_41_tobacco &&
1623
+ age_42 == o.age_42 &&
1624
+ age_42_tobacco == o.age_42_tobacco &&
1625
+ age_43 == o.age_43 &&
1626
+ age_43_tobacco == o.age_43_tobacco &&
1627
+ age_44 == o.age_44 &&
1628
+ age_44_tobacco == o.age_44_tobacco &&
1629
+ age_45 == o.age_45 &&
1630
+ age_45_tobacco == o.age_45_tobacco &&
1631
+ age_46 == o.age_46 &&
1632
+ age_46_tobacco == o.age_46_tobacco &&
1633
+ age_47 == o.age_47 &&
1634
+ age_47_tobacco == o.age_47_tobacco &&
1635
+ age_48 == o.age_48 &&
1636
+ age_48_tobacco == o.age_48_tobacco &&
1637
+ age_49 == o.age_49 &&
1638
+ age_49_tobacco == o.age_49_tobacco &&
1639
+ age_50 == o.age_50 &&
1640
+ age_50_tobacco == o.age_50_tobacco &&
1641
+ age_51 == o.age_51 &&
1642
+ age_51_tobacco == o.age_51_tobacco &&
1643
+ age_52 == o.age_52 &&
1644
+ age_52_tobacco == o.age_52_tobacco &&
1645
+ age_53 == o.age_53 &&
1646
+ age_53_tobacco == o.age_53_tobacco &&
1647
+ age_54 == o.age_54 &&
1648
+ age_54_tobacco == o.age_54_tobacco &&
1649
+ age_55 == o.age_55 &&
1650
+ age_55_tobacco == o.age_55_tobacco &&
1651
+ age_56 == o.age_56 &&
1652
+ age_56_tobacco == o.age_56_tobacco &&
1653
+ age_57 == o.age_57 &&
1654
+ age_57_tobacco == o.age_57_tobacco &&
1655
+ age_58 == o.age_58 &&
1656
+ age_58_tobacco == o.age_58_tobacco &&
1657
+ age_59 == o.age_59 &&
1658
+ age_59_tobacco == o.age_59_tobacco &&
1659
+ age_60 == o.age_60 &&
1660
+ age_60_tobacco == o.age_60_tobacco &&
1661
+ age_61 == o.age_61 &&
1662
+ age_61_tobacco == o.age_61_tobacco &&
1663
+ age_62 == o.age_62 &&
1664
+ age_62_tobacco == o.age_62_tobacco &&
1665
+ age_63 == o.age_63 &&
1666
+ age_63_tobacco == o.age_63_tobacco &&
1667
+ age_64 == o.age_64 &&
1668
+ age_64_tobacco == o.age_64_tobacco &&
1669
+ age_65 == o.age_65 &&
1670
+ age_65_tobacco == o.age_65_tobacco &&
1671
+ single == o.single &&
1672
+ single_and_spouse == o.single_and_spouse &&
1673
+ single_and_children == o.single_and_children &&
1674
+ family == o.family &&
1675
+ child_only == o.child_only
1676
+ end
1677
+
1678
+ # @see the `==` method
1679
+ # @param [Object] Object to be compared
1680
+ def eql?(o)
1681
+ self == o
1682
+ end
1683
+
1684
+ # Calculates hash code according to all attributes.
1685
+ # @return [Fixnum] Hash code
1686
+ def hash
1687
+ [external_id, effective_date, expiration_date, rating_area_natural_key, age_0, age_0_tobacco, age_1, age_1_tobacco, age_2, age_2_tobacco, age_3, age_3_tobacco, age_4, age_4_tobacco, age_5, age_5_tobacco, age_6, age_6_tobacco, age_7, age_7_tobacco, age_8, age_8_tobacco, age_9, age_9_tobacco, age_10, age_10_tobacco, age_11, age_11_tobacco, age_12, age_12_tobacco, age_13, age_13_tobacco, age_14, age_14_tobacco, age_15, age_15_tobacco, age_16, age_16_tobacco, age_17, age_17_tobacco, age_18, age_18_tobacco, age_19, age_19_tobacco, age_20, age_20_tobacco, age_21, age_21_tobacco, age_22, age_22_tobacco, age_23, age_23_tobacco, age_24, age_24_tobacco, age_25, age_25_tobacco, age_26, age_26_tobacco, age_27, age_27_tobacco, age_28, age_28_tobacco, age_29, age_29_tobacco, age_30, age_30_tobacco, age_31, age_31_tobacco, age_32, age_32_tobacco, age_33, age_33_tobacco, age_34, age_34_tobacco, age_35, age_35_tobacco, age_36, age_36_tobacco, age_37, age_37_tobacco, age_38, age_38_tobacco, age_39, age_39_tobacco, age_40, age_40_tobacco, age_41, age_41_tobacco, age_42, age_42_tobacco, age_43, age_43_tobacco, age_44, age_44_tobacco, age_45, age_45_tobacco, age_46, age_46_tobacco, age_47, age_47_tobacco, age_48, age_48_tobacco, age_49, age_49_tobacco, age_50, age_50_tobacco, age_51, age_51_tobacco, age_52, age_52_tobacco, age_53, age_53_tobacco, age_54, age_54_tobacco, age_55, age_55_tobacco, age_56, age_56_tobacco, age_57, age_57_tobacco, age_58, age_58_tobacco, age_59, age_59_tobacco, age_60, age_60_tobacco, age_61, age_61_tobacco, age_62, age_62_tobacco, age_63, age_63_tobacco, age_64, age_64_tobacco, age_65, age_65_tobacco, single, single_and_spouse, single_and_children, family, child_only].hash
1688
+ end
1689
+
1690
+ # Builds the object from hash
1691
+ # @param [Hash] attributes Model attributes in the form of hash
1692
+ # @return [Object] Returns the model itself
1693
+ def build_from_hash(attributes)
1694
+ return nil unless attributes.is_a?(Hash)
1695
+ self.class.swagger_types.each_pair do |key, type|
1696
+ if type =~ /\AArray<(.*)>/i
1697
+ # check to ensure the input is an array given that the the attribute
1698
+ # is documented as an array but the input is not
1699
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
1700
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
1701
+ end
1702
+ elsif !attributes[self.class.attribute_map[key]].nil?
1703
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
1704
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
1705
+ end
1706
+
1707
+ self
1708
+ end
1709
+
1710
+ # Deserializes the data based on type
1711
+ # @param string type Data type
1712
+ # @param string value Value to be deserialized
1713
+ # @return [Object] Deserialized data
1714
+ def _deserialize(type, value)
1715
+ case type.to_sym
1716
+ when :DateTime
1717
+ DateTime.parse(value)
1718
+ when :Date
1719
+ Date.parse(value)
1720
+ when :String
1721
+ value.to_s
1722
+ when :Integer
1723
+ value.to_i
1724
+ when :Float
1725
+ value.to_f
1726
+ when :BOOLEAN
1727
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
1728
+ true
1729
+ else
1730
+ false
1731
+ end
1732
+ when :Object
1733
+ # generic object (usually a Hash), return directly
1734
+ value
1735
+ when /\AArray<(?<inner_type>.+)>\z/
1736
+ inner_type = Regexp.last_match[:inner_type]
1737
+ value.map { |v| _deserialize(inner_type, v) }
1738
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
1739
+ k_type = Regexp.last_match[:k_type]
1740
+ v_type = Regexp.last_match[:v_type]
1741
+ {}.tap do |hash|
1742
+ value.each do |k, v|
1743
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
1744
+ end
1745
+ end
1746
+ else # model
1747
+ temp_model = VericredClient.const_get(type).new
1748
+ temp_model.build_from_hash(value)
1749
+ end
1750
+ end
1751
+
1752
+ # Returns the string representation of the object
1753
+ # @return [String] String presentation of the object
1754
+ def to_s
1755
+ to_hash.to_s
1756
+ end
1757
+
1758
+ # to_body is an alias to to_hash (backward compatibility)
1759
+ # @return [Hash] Returns the object in the form of hash
1760
+ def to_body
1761
+ to_hash
1762
+ end
1763
+
1764
+ # Returns the object in the form of hash
1765
+ # @return [Hash] Returns the object in the form of hash
1766
+ def to_hash
1767
+ hash = {}
1768
+ self.class.attribute_map.each_pair do |attr, param|
1769
+ value = self.send(attr)
1770
+ next if value.nil?
1771
+ hash[param] = _to_hash(value)
1772
+ end
1773
+ hash
1774
+ end
1775
+
1776
+ # Outputs non-array value in the form of hash
1777
+ # For object, use to_hash. Otherwise, just return the value
1778
+ # @param [Object] value Any valid value
1779
+ # @return [Hash] Returns the value in the form of hash
1780
+ def _to_hash(value)
1781
+ if value.is_a?(Array)
1782
+ value.compact.map{ |v| _to_hash(v) }
1783
+ elsif value.is_a?(Hash)
1784
+ {}.tap do |hash|
1785
+ value.each { |k, v| hash[k] = _to_hash(v) }
1786
+ end
1787
+ elsif value.respond_to? :to_hash
1788
+ value.to_hash
1789
+ else
1790
+ value
1791
+ end
1792
+ end
1793
+
1794
+ end
1795
+
1796
+ end