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,1284 @@
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 ACAPlan
225
+ # Name of the insurance carrier
226
+ attr_accessor :carrier_name
227
+
228
+ # Alternate name for the Plan
229
+ attr_accessor :display_name
230
+
231
+ # Effective date of coverage.
232
+ attr_accessor :effective_date
233
+
234
+ # Expiration date of coverage.
235
+ attr_accessor :expiration_date
236
+
237
+ # List of identifiers of this Plan
238
+ attr_accessor :identifiers
239
+
240
+ # Marketing name of the plan
241
+ attr_accessor :name
242
+
243
+ # List of Vericred-generated network_ids
244
+ attr_accessor :network_ids
245
+
246
+ # Total number of Providers in network
247
+ attr_accessor :network_size
248
+
249
+ # Category of the plan (e.g. EPO, HMO, PPO, POS, Indemnity, PACE, Medicare-Medicaid, HMO w/POS, Cost, FFS, MSA)
250
+ attr_accessor :plan_type
251
+
252
+ # Foreign key for service area
253
+ attr_accessor :service_area_id
254
+
255
+ # Source of the plan benefit data
256
+ attr_accessor :source
257
+
258
+ # The type of the Plan
259
+ attr_accessor :type
260
+
261
+ # Does the plan provide dental coverage for adults?
262
+ attr_accessor :adult_dental
263
+
264
+ # True if the plan allows dependents up to age 29
265
+ attr_accessor :age29_rider
266
+
267
+ # Benefits string for ambulance coverage
268
+ attr_accessor :ambulance
269
+
270
+ # Link to the summary of benefits and coverage (SBC) document.
271
+ attr_accessor :benefits_summary_url
272
+
273
+ # Link to a location to purchase the plan.
274
+ attr_accessor :buy_link
275
+
276
+ # Does the plan provide dental coverage for children?
277
+ attr_accessor :child_dental
278
+
279
+ # Child eyewear benefits summary
280
+ attr_accessor :child_eyewear
281
+
282
+ # Child eye exam benefits summary
283
+ attr_accessor :child_eye_exam
284
+
285
+ # Phone number to contact the insurance carrier
286
+ attr_accessor :customer_service_phone_number
287
+
288
+ # Benefits summary for durable medical equipment
289
+ attr_accessor :durable_medical_equipment
290
+
291
+ # Diagnostic tests benefit summary
292
+ attr_accessor :diagnostic_test
293
+
294
+ # True if plan does not cover domestic partners
295
+ attr_accessor :dp_rider
296
+
297
+ # Link to the summary of drug benefits for the plan
298
+ attr_accessor :drug_formulary_url
299
+
300
+ # Description of costs when visiting the ER
301
+ attr_accessor :emergency_room
302
+
303
+ # Deductible for drugs when a family is on the plan.
304
+ attr_accessor :family_drug_deductible
305
+
306
+ # Maximum out-of-pocket for drugs when a family is on the plan
307
+ attr_accessor :family_drug_moop
308
+
309
+ # Deductible when a family is on the plan
310
+ attr_accessor :family_medical_deductible
311
+
312
+ # Maximum out-of-pocket when a family is on the plan
313
+ attr_accessor :family_medical_moop
314
+
315
+ # True if plan does not cover family planning
316
+ attr_accessor :fp_rider
317
+
318
+ # Cost for generic drugs
319
+ attr_accessor :generic_drugs
320
+
321
+ # Habilitation services benefits summary
322
+ attr_accessor :habilitation_services
323
+
324
+ #
325
+ attr_accessor :hios_issuer_id
326
+
327
+ # Home health care benefits summary
328
+ attr_accessor :home_health_care
329
+
330
+ # Hospice service benefits summary
331
+ attr_accessor :hospice_service
332
+
333
+ # Is the plan HSA eligible?
334
+ attr_accessor :hsa_eligible
335
+
336
+ # Government-issued HIOS plan ID
337
+ attr_accessor :id
338
+
339
+ # Benefits summary for imaging coverage
340
+ attr_accessor :imaging
341
+
342
+ # Deductible for drugs when an individual is on the plan
343
+ attr_accessor :individual_drug_deductible
344
+
345
+ # Maximum out-of-pocket for drugs when an individual is on the plan
346
+ attr_accessor :individual_drug_moop
347
+
348
+ # Deductible when an individual is on the plan
349
+ attr_accessor :individual_medical_deductible
350
+
351
+ # Maximum out-of-pocket when an individual is on the plan
352
+ attr_accessor :individual_medical_moop
353
+
354
+ # Inpatient birth benefits summary
355
+ attr_accessor :inpatient_birth
356
+
357
+ # Cost under the plan for an inpatient facility
358
+ attr_accessor :inpatient_facility
359
+
360
+ # Inpatient mental helath benefits summary
361
+ attr_accessor :inpatient_mental_health
362
+
363
+ # Cost under the plan for an inpatient physician
364
+ attr_accessor :inpatient_physician
365
+
366
+ # Inpatient substance abuse benefits summary
367
+ attr_accessor :inpatient_substance
368
+
369
+ # List of NPI numbers for Providers passed in who accept this Plan
370
+ attr_accessor :in_network_ids
371
+
372
+ # Plan metal grouping (e.g. platinum, gold, silver, etc)
373
+ attr_accessor :level
374
+
375
+ # Link to a copy of the insurance carrier's logo
376
+ attr_accessor :logo_url
377
+
378
+ # Cost under the plan for non-preferred brand drugs
379
+ attr_accessor :non_preferred_brand_drugs
380
+
381
+ # Is the plan on-market?
382
+ attr_accessor :on_market
383
+
384
+ # Is the plan off-market?
385
+ attr_accessor :off_market
386
+
387
+ # Does this plan provide any out of network coverage?
388
+ attr_accessor :out_of_network_coverage
389
+
390
+ # List of NPI numbers for Providers passed in who do not accept this Plan
391
+ attr_accessor :out_of_network_ids
392
+
393
+ # Benefits summary for outpatient facility coverage
394
+ attr_accessor :outpatient_facility
395
+
396
+ # Benefits summary for outpatient mental health coverage
397
+ attr_accessor :outpatient_mental_health
398
+
399
+ # Benefits summary for outpatient physician coverage
400
+ attr_accessor :outpatient_physician
401
+
402
+ # Outpatient substance abuse benefits summary
403
+ attr_accessor :outpatient_substance
404
+
405
+ # Market in which the plan is offered (on_marketplace, shop, etc)
406
+ attr_accessor :plan_market
407
+
408
+ # Cost under the plan for perferred brand drugs
409
+ attr_accessor :preferred_brand_drugs
410
+
411
+ # Inpatient substance abuse benefits summary
412
+ attr_accessor :prenatal_postnatal_care
413
+
414
+ # Benefits summary for preventative care
415
+ attr_accessor :preventative_care
416
+
417
+ # Cumulative premium amount after subsidy
418
+ attr_accessor :premium_subsidized
419
+
420
+ # Cumulative premium amount
421
+ attr_accessor :premium
422
+
423
+ # Source of the base pricing data
424
+ attr_accessor :premium_source
425
+
426
+ # Cost under the plan to visit a Primary Care Physician
427
+ attr_accessor :primary_care_physician
428
+
429
+ # Benefits summary for rehabilitation services
430
+ attr_accessor :rehabilitation_services
431
+
432
+ # Benefits summary for skilled nursing services
433
+ attr_accessor :skilled_nursing
434
+
435
+ # Cost under the plan to visit a specialist
436
+ attr_accessor :specialist
437
+
438
+ # Cost under the plan for specialty drugs
439
+ attr_accessor :specialty_drugs
440
+
441
+ # Benefits summary for urgent care
442
+ attr_accessor :urgent_care
443
+
444
+ # Percentage of total average costs for covered benefits that a plan will cover.
445
+ attr_accessor :actuarial_value
446
+
447
+ # Chiropractic services benefits summary
448
+ attr_accessor :chiropractic_services
449
+
450
+ # Standard cost share for most benefits
451
+ attr_accessor :coinsurance
452
+
453
+ # Is the individual deductible for each covered person, embedded in the family deductible
454
+ attr_accessor :embedded_deductible
455
+
456
+ # Does the plan's network require a physician referral?
457
+ attr_accessor :gated
458
+
459
+ # Imaging center benefits summary
460
+ attr_accessor :imaging_center
461
+
462
+ # Imaging physician benefits summary
463
+ attr_accessor :imaging_physician
464
+
465
+ # Lab test benefits summary
466
+ attr_accessor :lab_test
467
+
468
+ # Multiple of the standard Rx cost share for orders filled via mail order
469
+ attr_accessor :mail_order_rx
470
+
471
+ # Non-preferred generic drugs benefits summary
472
+ attr_accessor :nonpreferred_generic_drug_share
473
+
474
+ # Non-preferred specialty drugs benefits summary
475
+ attr_accessor :nonpreferred_specialty_drug_share
476
+
477
+ # Outpatient ambulatory care center benefits summary
478
+ attr_accessor :outpatient_ambulatory_care_center
479
+
480
+ # Are deductibles and MOOPs reset on Dec-31 (\"calendar year\"), 365 days after enrollment date (\"plan year\"), or are both options available (\"both\")?
481
+ attr_accessor :plan_calendar
482
+
483
+ # Prenatal care benefits summary
484
+ attr_accessor :prenatal_care
485
+
486
+ # Post-natal care benefits summary
487
+ attr_accessor :postnatal_care
488
+
489
+ # Does the plan cover full-time, year-round, nursing facilities?
490
+ attr_accessor :skilled_nursing_facility_365
491
+
492
+
493
+ # Attribute mapping from ruby-style variable name to JSON key.
494
+ def self.attribute_map
495
+ {
496
+ :'carrier_name' => :'carrier_name',
497
+ :'display_name' => :'display_name',
498
+ :'effective_date' => :'effective_date',
499
+ :'expiration_date' => :'expiration_date',
500
+ :'identifiers' => :'identifiers',
501
+ :'name' => :'name',
502
+ :'network_ids' => :'network_ids',
503
+ :'network_size' => :'network_size',
504
+ :'plan_type' => :'plan_type',
505
+ :'service_area_id' => :'service_area_id',
506
+ :'source' => :'source',
507
+ :'type' => :'type',
508
+ :'adult_dental' => :'adult_dental',
509
+ :'age29_rider' => :'age29_rider',
510
+ :'ambulance' => :'ambulance',
511
+ :'benefits_summary_url' => :'benefits_summary_url',
512
+ :'buy_link' => :'buy_link',
513
+ :'child_dental' => :'child_dental',
514
+ :'child_eyewear' => :'child_eyewear',
515
+ :'child_eye_exam' => :'child_eye_exam',
516
+ :'customer_service_phone_number' => :'customer_service_phone_number',
517
+ :'durable_medical_equipment' => :'durable_medical_equipment',
518
+ :'diagnostic_test' => :'diagnostic_test',
519
+ :'dp_rider' => :'dp_rider',
520
+ :'drug_formulary_url' => :'drug_formulary_url',
521
+ :'emergency_room' => :'emergency_room',
522
+ :'family_drug_deductible' => :'family_drug_deductible',
523
+ :'family_drug_moop' => :'family_drug_moop',
524
+ :'family_medical_deductible' => :'family_medical_deductible',
525
+ :'family_medical_moop' => :'family_medical_moop',
526
+ :'fp_rider' => :'fp_rider',
527
+ :'generic_drugs' => :'generic_drugs',
528
+ :'habilitation_services' => :'habilitation_services',
529
+ :'hios_issuer_id' => :'hios_issuer_id',
530
+ :'home_health_care' => :'home_health_care',
531
+ :'hospice_service' => :'hospice_service',
532
+ :'hsa_eligible' => :'hsa_eligible',
533
+ :'id' => :'id',
534
+ :'imaging' => :'imaging',
535
+ :'individual_drug_deductible' => :'individual_drug_deductible',
536
+ :'individual_drug_moop' => :'individual_drug_moop',
537
+ :'individual_medical_deductible' => :'individual_medical_deductible',
538
+ :'individual_medical_moop' => :'individual_medical_moop',
539
+ :'inpatient_birth' => :'inpatient_birth',
540
+ :'inpatient_facility' => :'inpatient_facility',
541
+ :'inpatient_mental_health' => :'inpatient_mental_health',
542
+ :'inpatient_physician' => :'inpatient_physician',
543
+ :'inpatient_substance' => :'inpatient_substance',
544
+ :'in_network_ids' => :'in_network_ids',
545
+ :'level' => :'level',
546
+ :'logo_url' => :'logo_url',
547
+ :'non_preferred_brand_drugs' => :'non_preferred_brand_drugs',
548
+ :'on_market' => :'on_market',
549
+ :'off_market' => :'off_market',
550
+ :'out_of_network_coverage' => :'out_of_network_coverage',
551
+ :'out_of_network_ids' => :'out_of_network_ids',
552
+ :'outpatient_facility' => :'outpatient_facility',
553
+ :'outpatient_mental_health' => :'outpatient_mental_health',
554
+ :'outpatient_physician' => :'outpatient_physician',
555
+ :'outpatient_substance' => :'outpatient_substance',
556
+ :'plan_market' => :'plan_market',
557
+ :'preferred_brand_drugs' => :'preferred_brand_drugs',
558
+ :'prenatal_postnatal_care' => :'prenatal_postnatal_care',
559
+ :'preventative_care' => :'preventative_care',
560
+ :'premium_subsidized' => :'premium_subsidized',
561
+ :'premium' => :'premium',
562
+ :'premium_source' => :'premium_source',
563
+ :'primary_care_physician' => :'primary_care_physician',
564
+ :'rehabilitation_services' => :'rehabilitation_services',
565
+ :'skilled_nursing' => :'skilled_nursing',
566
+ :'specialist' => :'specialist',
567
+ :'specialty_drugs' => :'specialty_drugs',
568
+ :'urgent_care' => :'urgent_care',
569
+ :'actuarial_value' => :'actuarial_value',
570
+ :'chiropractic_services' => :'chiropractic_services',
571
+ :'coinsurance' => :'coinsurance',
572
+ :'embedded_deductible' => :'embedded_deductible',
573
+ :'gated' => :'gated',
574
+ :'imaging_center' => :'imaging_center',
575
+ :'imaging_physician' => :'imaging_physician',
576
+ :'lab_test' => :'lab_test',
577
+ :'mail_order_rx' => :'mail_order_rx',
578
+ :'nonpreferred_generic_drug_share' => :'nonpreferred_generic_drug_share',
579
+ :'nonpreferred_specialty_drug_share' => :'nonpreferred_specialty_drug_share',
580
+ :'outpatient_ambulatory_care_center' => :'outpatient_ambulatory_care_center',
581
+ :'plan_calendar' => :'plan_calendar',
582
+ :'prenatal_care' => :'prenatal_care',
583
+ :'postnatal_care' => :'postnatal_care',
584
+ :'skilled_nursing_facility_365' => :'skilled_nursing_facility_365'
585
+ }
586
+ end
587
+
588
+ # Attribute type mapping.
589
+ def self.swagger_types
590
+ {
591
+ :'carrier_name' => :'String',
592
+ :'display_name' => :'String',
593
+ :'effective_date' => :'String',
594
+ :'expiration_date' => :'String',
595
+ :'identifiers' => :'Array<PlanIdentifier>',
596
+ :'name' => :'String',
597
+ :'network_ids' => :'Array<Integer>',
598
+ :'network_size' => :'Integer',
599
+ :'plan_type' => :'String',
600
+ :'service_area_id' => :'String',
601
+ :'source' => :'String',
602
+ :'type' => :'String',
603
+ :'adult_dental' => :'BOOLEAN',
604
+ :'age29_rider' => :'BOOLEAN',
605
+ :'ambulance' => :'String',
606
+ :'benefits_summary_url' => :'String',
607
+ :'buy_link' => :'String',
608
+ :'child_dental' => :'BOOLEAN',
609
+ :'child_eyewear' => :'String',
610
+ :'child_eye_exam' => :'String',
611
+ :'customer_service_phone_number' => :'String',
612
+ :'durable_medical_equipment' => :'String',
613
+ :'diagnostic_test' => :'String',
614
+ :'dp_rider' => :'BOOLEAN',
615
+ :'drug_formulary_url' => :'String',
616
+ :'emergency_room' => :'String',
617
+ :'family_drug_deductible' => :'String',
618
+ :'family_drug_moop' => :'String',
619
+ :'family_medical_deductible' => :'String',
620
+ :'family_medical_moop' => :'String',
621
+ :'fp_rider' => :'BOOLEAN',
622
+ :'generic_drugs' => :'String',
623
+ :'habilitation_services' => :'String',
624
+ :'hios_issuer_id' => :'String',
625
+ :'home_health_care' => :'String',
626
+ :'hospice_service' => :'String',
627
+ :'hsa_eligible' => :'BOOLEAN',
628
+ :'id' => :'String',
629
+ :'imaging' => :'String',
630
+ :'individual_drug_deductible' => :'String',
631
+ :'individual_drug_moop' => :'String',
632
+ :'individual_medical_deductible' => :'String',
633
+ :'individual_medical_moop' => :'String',
634
+ :'inpatient_birth' => :'String',
635
+ :'inpatient_facility' => :'String',
636
+ :'inpatient_mental_health' => :'String',
637
+ :'inpatient_physician' => :'String',
638
+ :'inpatient_substance' => :'String',
639
+ :'in_network_ids' => :'Array<Integer>',
640
+ :'level' => :'String',
641
+ :'logo_url' => :'String',
642
+ :'non_preferred_brand_drugs' => :'String',
643
+ :'on_market' => :'BOOLEAN',
644
+ :'off_market' => :'BOOLEAN',
645
+ :'out_of_network_coverage' => :'BOOLEAN',
646
+ :'out_of_network_ids' => :'Array<Integer>',
647
+ :'outpatient_facility' => :'String',
648
+ :'outpatient_mental_health' => :'String',
649
+ :'outpatient_physician' => :'String',
650
+ :'outpatient_substance' => :'String',
651
+ :'plan_market' => :'String',
652
+ :'preferred_brand_drugs' => :'String',
653
+ :'prenatal_postnatal_care' => :'String',
654
+ :'preventative_care' => :'String',
655
+ :'premium_subsidized' => :'Float',
656
+ :'premium' => :'Float',
657
+ :'premium_source' => :'String',
658
+ :'primary_care_physician' => :'String',
659
+ :'rehabilitation_services' => :'String',
660
+ :'skilled_nursing' => :'String',
661
+ :'specialist' => :'String',
662
+ :'specialty_drugs' => :'String',
663
+ :'urgent_care' => :'String',
664
+ :'actuarial_value' => :'Float',
665
+ :'chiropractic_services' => :'String',
666
+ :'coinsurance' => :'Float',
667
+ :'embedded_deductible' => :'String',
668
+ :'gated' => :'BOOLEAN',
669
+ :'imaging_center' => :'String',
670
+ :'imaging_physician' => :'String',
671
+ :'lab_test' => :'String',
672
+ :'mail_order_rx' => :'Float',
673
+ :'nonpreferred_generic_drug_share' => :'String',
674
+ :'nonpreferred_specialty_drug_share' => :'String',
675
+ :'outpatient_ambulatory_care_center' => :'String',
676
+ :'plan_calendar' => :'String',
677
+ :'prenatal_care' => :'String',
678
+ :'postnatal_care' => :'String',
679
+ :'skilled_nursing_facility_365' => :'String'
680
+ }
681
+ end
682
+
683
+ # Initializes the object
684
+ # @param [Hash] attributes Model attributes in the form of hash
685
+ def initialize(attributes = {})
686
+ return unless attributes.is_a?(Hash)
687
+
688
+ # convert string to symbol for hash key
689
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
690
+
691
+ if attributes.has_key?(:'carrier_name')
692
+ self.carrier_name = attributes[:'carrier_name']
693
+ end
694
+
695
+ if attributes.has_key?(:'display_name')
696
+ self.display_name = attributes[:'display_name']
697
+ end
698
+
699
+ if attributes.has_key?(:'effective_date')
700
+ self.effective_date = attributes[:'effective_date']
701
+ end
702
+
703
+ if attributes.has_key?(:'expiration_date')
704
+ self.expiration_date = attributes[:'expiration_date']
705
+ end
706
+
707
+ if attributes.has_key?(:'identifiers')
708
+ if (value = attributes[:'identifiers']).is_a?(Array)
709
+ self.identifiers = value
710
+ end
711
+ end
712
+
713
+ if attributes.has_key?(:'name')
714
+ self.name = attributes[:'name']
715
+ end
716
+
717
+ if attributes.has_key?(:'network_ids')
718
+ if (value = attributes[:'network_ids']).is_a?(Array)
719
+ self.network_ids = value
720
+ end
721
+ end
722
+
723
+ if attributes.has_key?(:'network_size')
724
+ self.network_size = attributes[:'network_size']
725
+ end
726
+
727
+ if attributes.has_key?(:'plan_type')
728
+ self.plan_type = attributes[:'plan_type']
729
+ end
730
+
731
+ if attributes.has_key?(:'service_area_id')
732
+ self.service_area_id = attributes[:'service_area_id']
733
+ end
734
+
735
+ if attributes.has_key?(:'source')
736
+ self.source = attributes[:'source']
737
+ end
738
+
739
+ if attributes.has_key?(:'type')
740
+ self.type = attributes[:'type']
741
+ end
742
+
743
+ if attributes.has_key?(:'adult_dental')
744
+ self.adult_dental = attributes[:'adult_dental']
745
+ end
746
+
747
+ if attributes.has_key?(:'age29_rider')
748
+ self.age29_rider = attributes[:'age29_rider']
749
+ end
750
+
751
+ if attributes.has_key?(:'ambulance')
752
+ self.ambulance = attributes[:'ambulance']
753
+ end
754
+
755
+ if attributes.has_key?(:'benefits_summary_url')
756
+ self.benefits_summary_url = attributes[:'benefits_summary_url']
757
+ end
758
+
759
+ if attributes.has_key?(:'buy_link')
760
+ self.buy_link = attributes[:'buy_link']
761
+ end
762
+
763
+ if attributes.has_key?(:'child_dental')
764
+ self.child_dental = attributes[:'child_dental']
765
+ end
766
+
767
+ if attributes.has_key?(:'child_eyewear')
768
+ self.child_eyewear = attributes[:'child_eyewear']
769
+ end
770
+
771
+ if attributes.has_key?(:'child_eye_exam')
772
+ self.child_eye_exam = attributes[:'child_eye_exam']
773
+ end
774
+
775
+ if attributes.has_key?(:'customer_service_phone_number')
776
+ self.customer_service_phone_number = attributes[:'customer_service_phone_number']
777
+ end
778
+
779
+ if attributes.has_key?(:'durable_medical_equipment')
780
+ self.durable_medical_equipment = attributes[:'durable_medical_equipment']
781
+ end
782
+
783
+ if attributes.has_key?(:'diagnostic_test')
784
+ self.diagnostic_test = attributes[:'diagnostic_test']
785
+ end
786
+
787
+ if attributes.has_key?(:'dp_rider')
788
+ self.dp_rider = attributes[:'dp_rider']
789
+ end
790
+
791
+ if attributes.has_key?(:'drug_formulary_url')
792
+ self.drug_formulary_url = attributes[:'drug_formulary_url']
793
+ end
794
+
795
+ if attributes.has_key?(:'emergency_room')
796
+ self.emergency_room = attributes[:'emergency_room']
797
+ end
798
+
799
+ if attributes.has_key?(:'family_drug_deductible')
800
+ self.family_drug_deductible = attributes[:'family_drug_deductible']
801
+ end
802
+
803
+ if attributes.has_key?(:'family_drug_moop')
804
+ self.family_drug_moop = attributes[:'family_drug_moop']
805
+ end
806
+
807
+ if attributes.has_key?(:'family_medical_deductible')
808
+ self.family_medical_deductible = attributes[:'family_medical_deductible']
809
+ end
810
+
811
+ if attributes.has_key?(:'family_medical_moop')
812
+ self.family_medical_moop = attributes[:'family_medical_moop']
813
+ end
814
+
815
+ if attributes.has_key?(:'fp_rider')
816
+ self.fp_rider = attributes[:'fp_rider']
817
+ end
818
+
819
+ if attributes.has_key?(:'generic_drugs')
820
+ self.generic_drugs = attributes[:'generic_drugs']
821
+ end
822
+
823
+ if attributes.has_key?(:'habilitation_services')
824
+ self.habilitation_services = attributes[:'habilitation_services']
825
+ end
826
+
827
+ if attributes.has_key?(:'hios_issuer_id')
828
+ self.hios_issuer_id = attributes[:'hios_issuer_id']
829
+ end
830
+
831
+ if attributes.has_key?(:'home_health_care')
832
+ self.home_health_care = attributes[:'home_health_care']
833
+ end
834
+
835
+ if attributes.has_key?(:'hospice_service')
836
+ self.hospice_service = attributes[:'hospice_service']
837
+ end
838
+
839
+ if attributes.has_key?(:'hsa_eligible')
840
+ self.hsa_eligible = attributes[:'hsa_eligible']
841
+ end
842
+
843
+ if attributes.has_key?(:'id')
844
+ self.id = attributes[:'id']
845
+ end
846
+
847
+ if attributes.has_key?(:'imaging')
848
+ self.imaging = attributes[:'imaging']
849
+ end
850
+
851
+ if attributes.has_key?(:'individual_drug_deductible')
852
+ self.individual_drug_deductible = attributes[:'individual_drug_deductible']
853
+ end
854
+
855
+ if attributes.has_key?(:'individual_drug_moop')
856
+ self.individual_drug_moop = attributes[:'individual_drug_moop']
857
+ end
858
+
859
+ if attributes.has_key?(:'individual_medical_deductible')
860
+ self.individual_medical_deductible = attributes[:'individual_medical_deductible']
861
+ end
862
+
863
+ if attributes.has_key?(:'individual_medical_moop')
864
+ self.individual_medical_moop = attributes[:'individual_medical_moop']
865
+ end
866
+
867
+ if attributes.has_key?(:'inpatient_birth')
868
+ self.inpatient_birth = attributes[:'inpatient_birth']
869
+ end
870
+
871
+ if attributes.has_key?(:'inpatient_facility')
872
+ self.inpatient_facility = attributes[:'inpatient_facility']
873
+ end
874
+
875
+ if attributes.has_key?(:'inpatient_mental_health')
876
+ self.inpatient_mental_health = attributes[:'inpatient_mental_health']
877
+ end
878
+
879
+ if attributes.has_key?(:'inpatient_physician')
880
+ self.inpatient_physician = attributes[:'inpatient_physician']
881
+ end
882
+
883
+ if attributes.has_key?(:'inpatient_substance')
884
+ self.inpatient_substance = attributes[:'inpatient_substance']
885
+ end
886
+
887
+ if attributes.has_key?(:'in_network_ids')
888
+ if (value = attributes[:'in_network_ids']).is_a?(Array)
889
+ self.in_network_ids = value
890
+ end
891
+ end
892
+
893
+ if attributes.has_key?(:'level')
894
+ self.level = attributes[:'level']
895
+ end
896
+
897
+ if attributes.has_key?(:'logo_url')
898
+ self.logo_url = attributes[:'logo_url']
899
+ end
900
+
901
+ if attributes.has_key?(:'non_preferred_brand_drugs')
902
+ self.non_preferred_brand_drugs = attributes[:'non_preferred_brand_drugs']
903
+ end
904
+
905
+ if attributes.has_key?(:'on_market')
906
+ self.on_market = attributes[:'on_market']
907
+ end
908
+
909
+ if attributes.has_key?(:'off_market')
910
+ self.off_market = attributes[:'off_market']
911
+ end
912
+
913
+ if attributes.has_key?(:'out_of_network_coverage')
914
+ self.out_of_network_coverage = attributes[:'out_of_network_coverage']
915
+ end
916
+
917
+ if attributes.has_key?(:'out_of_network_ids')
918
+ if (value = attributes[:'out_of_network_ids']).is_a?(Array)
919
+ self.out_of_network_ids = value
920
+ end
921
+ end
922
+
923
+ if attributes.has_key?(:'outpatient_facility')
924
+ self.outpatient_facility = attributes[:'outpatient_facility']
925
+ end
926
+
927
+ if attributes.has_key?(:'outpatient_mental_health')
928
+ self.outpatient_mental_health = attributes[:'outpatient_mental_health']
929
+ end
930
+
931
+ if attributes.has_key?(:'outpatient_physician')
932
+ self.outpatient_physician = attributes[:'outpatient_physician']
933
+ end
934
+
935
+ if attributes.has_key?(:'outpatient_substance')
936
+ self.outpatient_substance = attributes[:'outpatient_substance']
937
+ end
938
+
939
+ if attributes.has_key?(:'plan_market')
940
+ self.plan_market = attributes[:'plan_market']
941
+ end
942
+
943
+ if attributes.has_key?(:'preferred_brand_drugs')
944
+ self.preferred_brand_drugs = attributes[:'preferred_brand_drugs']
945
+ end
946
+
947
+ if attributes.has_key?(:'prenatal_postnatal_care')
948
+ self.prenatal_postnatal_care = attributes[:'prenatal_postnatal_care']
949
+ end
950
+
951
+ if attributes.has_key?(:'preventative_care')
952
+ self.preventative_care = attributes[:'preventative_care']
953
+ end
954
+
955
+ if attributes.has_key?(:'premium_subsidized')
956
+ self.premium_subsidized = attributes[:'premium_subsidized']
957
+ end
958
+
959
+ if attributes.has_key?(:'premium')
960
+ self.premium = attributes[:'premium']
961
+ end
962
+
963
+ if attributes.has_key?(:'premium_source')
964
+ self.premium_source = attributes[:'premium_source']
965
+ end
966
+
967
+ if attributes.has_key?(:'primary_care_physician')
968
+ self.primary_care_physician = attributes[:'primary_care_physician']
969
+ end
970
+
971
+ if attributes.has_key?(:'rehabilitation_services')
972
+ self.rehabilitation_services = attributes[:'rehabilitation_services']
973
+ end
974
+
975
+ if attributes.has_key?(:'skilled_nursing')
976
+ self.skilled_nursing = attributes[:'skilled_nursing']
977
+ end
978
+
979
+ if attributes.has_key?(:'specialist')
980
+ self.specialist = attributes[:'specialist']
981
+ end
982
+
983
+ if attributes.has_key?(:'specialty_drugs')
984
+ self.specialty_drugs = attributes[:'specialty_drugs']
985
+ end
986
+
987
+ if attributes.has_key?(:'urgent_care')
988
+ self.urgent_care = attributes[:'urgent_care']
989
+ end
990
+
991
+ if attributes.has_key?(:'actuarial_value')
992
+ self.actuarial_value = attributes[:'actuarial_value']
993
+ end
994
+
995
+ if attributes.has_key?(:'chiropractic_services')
996
+ self.chiropractic_services = attributes[:'chiropractic_services']
997
+ end
998
+
999
+ if attributes.has_key?(:'coinsurance')
1000
+ self.coinsurance = attributes[:'coinsurance']
1001
+ end
1002
+
1003
+ if attributes.has_key?(:'embedded_deductible')
1004
+ self.embedded_deductible = attributes[:'embedded_deductible']
1005
+ end
1006
+
1007
+ if attributes.has_key?(:'gated')
1008
+ self.gated = attributes[:'gated']
1009
+ end
1010
+
1011
+ if attributes.has_key?(:'imaging_center')
1012
+ self.imaging_center = attributes[:'imaging_center']
1013
+ end
1014
+
1015
+ if attributes.has_key?(:'imaging_physician')
1016
+ self.imaging_physician = attributes[:'imaging_physician']
1017
+ end
1018
+
1019
+ if attributes.has_key?(:'lab_test')
1020
+ self.lab_test = attributes[:'lab_test']
1021
+ end
1022
+
1023
+ if attributes.has_key?(:'mail_order_rx')
1024
+ self.mail_order_rx = attributes[:'mail_order_rx']
1025
+ end
1026
+
1027
+ if attributes.has_key?(:'nonpreferred_generic_drug_share')
1028
+ self.nonpreferred_generic_drug_share = attributes[:'nonpreferred_generic_drug_share']
1029
+ end
1030
+
1031
+ if attributes.has_key?(:'nonpreferred_specialty_drug_share')
1032
+ self.nonpreferred_specialty_drug_share = attributes[:'nonpreferred_specialty_drug_share']
1033
+ end
1034
+
1035
+ if attributes.has_key?(:'outpatient_ambulatory_care_center')
1036
+ self.outpatient_ambulatory_care_center = attributes[:'outpatient_ambulatory_care_center']
1037
+ end
1038
+
1039
+ if attributes.has_key?(:'plan_calendar')
1040
+ self.plan_calendar = attributes[:'plan_calendar']
1041
+ end
1042
+
1043
+ if attributes.has_key?(:'prenatal_care')
1044
+ self.prenatal_care = attributes[:'prenatal_care']
1045
+ end
1046
+
1047
+ if attributes.has_key?(:'postnatal_care')
1048
+ self.postnatal_care = attributes[:'postnatal_care']
1049
+ end
1050
+
1051
+ if attributes.has_key?(:'skilled_nursing_facility_365')
1052
+ self.skilled_nursing_facility_365 = attributes[:'skilled_nursing_facility_365']
1053
+ end
1054
+
1055
+ end
1056
+
1057
+ # Show invalid properties with the reasons. Usually used together with valid?
1058
+ # @return Array for valid properies with the reasons
1059
+ def list_invalid_properties
1060
+ invalid_properties = Array.new
1061
+ return invalid_properties
1062
+ end
1063
+
1064
+ # Check to see if the all the properties in the model are valid
1065
+ # @return true if the model is valid
1066
+ def valid?
1067
+ return true
1068
+ end
1069
+
1070
+ # Checks equality by comparing each attribute.
1071
+ # @param [Object] Object to be compared
1072
+ def ==(o)
1073
+ return true if self.equal?(o)
1074
+ self.class == o.class &&
1075
+ carrier_name == o.carrier_name &&
1076
+ display_name == o.display_name &&
1077
+ effective_date == o.effective_date &&
1078
+ expiration_date == o.expiration_date &&
1079
+ identifiers == o.identifiers &&
1080
+ name == o.name &&
1081
+ network_ids == o.network_ids &&
1082
+ network_size == o.network_size &&
1083
+ plan_type == o.plan_type &&
1084
+ service_area_id == o.service_area_id &&
1085
+ source == o.source &&
1086
+ type == o.type &&
1087
+ adult_dental == o.adult_dental &&
1088
+ age29_rider == o.age29_rider &&
1089
+ ambulance == o.ambulance &&
1090
+ benefits_summary_url == o.benefits_summary_url &&
1091
+ buy_link == o.buy_link &&
1092
+ child_dental == o.child_dental &&
1093
+ child_eyewear == o.child_eyewear &&
1094
+ child_eye_exam == o.child_eye_exam &&
1095
+ customer_service_phone_number == o.customer_service_phone_number &&
1096
+ durable_medical_equipment == o.durable_medical_equipment &&
1097
+ diagnostic_test == o.diagnostic_test &&
1098
+ dp_rider == o.dp_rider &&
1099
+ drug_formulary_url == o.drug_formulary_url &&
1100
+ emergency_room == o.emergency_room &&
1101
+ family_drug_deductible == o.family_drug_deductible &&
1102
+ family_drug_moop == o.family_drug_moop &&
1103
+ family_medical_deductible == o.family_medical_deductible &&
1104
+ family_medical_moop == o.family_medical_moop &&
1105
+ fp_rider == o.fp_rider &&
1106
+ generic_drugs == o.generic_drugs &&
1107
+ habilitation_services == o.habilitation_services &&
1108
+ hios_issuer_id == o.hios_issuer_id &&
1109
+ home_health_care == o.home_health_care &&
1110
+ hospice_service == o.hospice_service &&
1111
+ hsa_eligible == o.hsa_eligible &&
1112
+ id == o.id &&
1113
+ imaging == o.imaging &&
1114
+ individual_drug_deductible == o.individual_drug_deductible &&
1115
+ individual_drug_moop == o.individual_drug_moop &&
1116
+ individual_medical_deductible == o.individual_medical_deductible &&
1117
+ individual_medical_moop == o.individual_medical_moop &&
1118
+ inpatient_birth == o.inpatient_birth &&
1119
+ inpatient_facility == o.inpatient_facility &&
1120
+ inpatient_mental_health == o.inpatient_mental_health &&
1121
+ inpatient_physician == o.inpatient_physician &&
1122
+ inpatient_substance == o.inpatient_substance &&
1123
+ in_network_ids == o.in_network_ids &&
1124
+ level == o.level &&
1125
+ logo_url == o.logo_url &&
1126
+ non_preferred_brand_drugs == o.non_preferred_brand_drugs &&
1127
+ on_market == o.on_market &&
1128
+ off_market == o.off_market &&
1129
+ out_of_network_coverage == o.out_of_network_coverage &&
1130
+ out_of_network_ids == o.out_of_network_ids &&
1131
+ outpatient_facility == o.outpatient_facility &&
1132
+ outpatient_mental_health == o.outpatient_mental_health &&
1133
+ outpatient_physician == o.outpatient_physician &&
1134
+ outpatient_substance == o.outpatient_substance &&
1135
+ plan_market == o.plan_market &&
1136
+ preferred_brand_drugs == o.preferred_brand_drugs &&
1137
+ prenatal_postnatal_care == o.prenatal_postnatal_care &&
1138
+ preventative_care == o.preventative_care &&
1139
+ premium_subsidized == o.premium_subsidized &&
1140
+ premium == o.premium &&
1141
+ premium_source == o.premium_source &&
1142
+ primary_care_physician == o.primary_care_physician &&
1143
+ rehabilitation_services == o.rehabilitation_services &&
1144
+ skilled_nursing == o.skilled_nursing &&
1145
+ specialist == o.specialist &&
1146
+ specialty_drugs == o.specialty_drugs &&
1147
+ urgent_care == o.urgent_care &&
1148
+ actuarial_value == o.actuarial_value &&
1149
+ chiropractic_services == o.chiropractic_services &&
1150
+ coinsurance == o.coinsurance &&
1151
+ embedded_deductible == o.embedded_deductible &&
1152
+ gated == o.gated &&
1153
+ imaging_center == o.imaging_center &&
1154
+ imaging_physician == o.imaging_physician &&
1155
+ lab_test == o.lab_test &&
1156
+ mail_order_rx == o.mail_order_rx &&
1157
+ nonpreferred_generic_drug_share == o.nonpreferred_generic_drug_share &&
1158
+ nonpreferred_specialty_drug_share == o.nonpreferred_specialty_drug_share &&
1159
+ outpatient_ambulatory_care_center == o.outpatient_ambulatory_care_center &&
1160
+ plan_calendar == o.plan_calendar &&
1161
+ prenatal_care == o.prenatal_care &&
1162
+ postnatal_care == o.postnatal_care &&
1163
+ skilled_nursing_facility_365 == o.skilled_nursing_facility_365
1164
+ end
1165
+
1166
+ # @see the `==` method
1167
+ # @param [Object] Object to be compared
1168
+ def eql?(o)
1169
+ self == o
1170
+ end
1171
+
1172
+ # Calculates hash code according to all attributes.
1173
+ # @return [Fixnum] Hash code
1174
+ def hash
1175
+ [carrier_name, display_name, effective_date, expiration_date, identifiers, name, network_ids, network_size, plan_type, service_area_id, source, type, adult_dental, age29_rider, ambulance, benefits_summary_url, buy_link, child_dental, child_eyewear, child_eye_exam, customer_service_phone_number, durable_medical_equipment, diagnostic_test, dp_rider, drug_formulary_url, emergency_room, family_drug_deductible, family_drug_moop, family_medical_deductible, family_medical_moop, fp_rider, generic_drugs, habilitation_services, hios_issuer_id, home_health_care, hospice_service, hsa_eligible, id, imaging, individual_drug_deductible, individual_drug_moop, individual_medical_deductible, individual_medical_moop, inpatient_birth, inpatient_facility, inpatient_mental_health, inpatient_physician, inpatient_substance, in_network_ids, level, logo_url, non_preferred_brand_drugs, on_market, off_market, out_of_network_coverage, out_of_network_ids, outpatient_facility, outpatient_mental_health, outpatient_physician, outpatient_substance, plan_market, preferred_brand_drugs, prenatal_postnatal_care, preventative_care, premium_subsidized, premium, premium_source, primary_care_physician, rehabilitation_services, skilled_nursing, specialist, specialty_drugs, urgent_care, actuarial_value, chiropractic_services, coinsurance, embedded_deductible, gated, imaging_center, imaging_physician, lab_test, mail_order_rx, nonpreferred_generic_drug_share, nonpreferred_specialty_drug_share, outpatient_ambulatory_care_center, plan_calendar, prenatal_care, postnatal_care, skilled_nursing_facility_365].hash
1176
+ end
1177
+
1178
+ # Builds the object from hash
1179
+ # @param [Hash] attributes Model attributes in the form of hash
1180
+ # @return [Object] Returns the model itself
1181
+ def build_from_hash(attributes)
1182
+ return nil unless attributes.is_a?(Hash)
1183
+ self.class.swagger_types.each_pair do |key, type|
1184
+ if type =~ /\AArray<(.*)>/i
1185
+ # check to ensure the input is an array given that the the attribute
1186
+ # is documented as an array but the input is not
1187
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
1188
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
1189
+ end
1190
+ elsif !attributes[self.class.attribute_map[key]].nil?
1191
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
1192
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
1193
+ end
1194
+
1195
+ self
1196
+ end
1197
+
1198
+ # Deserializes the data based on type
1199
+ # @param string type Data type
1200
+ # @param string value Value to be deserialized
1201
+ # @return [Object] Deserialized data
1202
+ def _deserialize(type, value)
1203
+ case type.to_sym
1204
+ when :DateTime
1205
+ DateTime.parse(value)
1206
+ when :Date
1207
+ Date.parse(value)
1208
+ when :String
1209
+ value.to_s
1210
+ when :Integer
1211
+ value.to_i
1212
+ when :Float
1213
+ value.to_f
1214
+ when :BOOLEAN
1215
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
1216
+ true
1217
+ else
1218
+ false
1219
+ end
1220
+ when :Object
1221
+ # generic object (usually a Hash), return directly
1222
+ value
1223
+ when /\AArray<(?<inner_type>.+)>\z/
1224
+ inner_type = Regexp.last_match[:inner_type]
1225
+ value.map { |v| _deserialize(inner_type, v) }
1226
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
1227
+ k_type = Regexp.last_match[:k_type]
1228
+ v_type = Regexp.last_match[:v_type]
1229
+ {}.tap do |hash|
1230
+ value.each do |k, v|
1231
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
1232
+ end
1233
+ end
1234
+ else # model
1235
+ temp_model = VericredClient.const_get(type).new
1236
+ temp_model.build_from_hash(value)
1237
+ end
1238
+ end
1239
+
1240
+ # Returns the string representation of the object
1241
+ # @return [String] String presentation of the object
1242
+ def to_s
1243
+ to_hash.to_s
1244
+ end
1245
+
1246
+ # to_body is an alias to to_hash (backward compatibility)
1247
+ # @return [Hash] Returns the object in the form of hash
1248
+ def to_body
1249
+ to_hash
1250
+ end
1251
+
1252
+ # Returns the object in the form of hash
1253
+ # @return [Hash] Returns the object in the form of hash
1254
+ def to_hash
1255
+ hash = {}
1256
+ self.class.attribute_map.each_pair do |attr, param|
1257
+ value = self.send(attr)
1258
+ next if value.nil?
1259
+ hash[param] = _to_hash(value)
1260
+ end
1261
+ hash
1262
+ end
1263
+
1264
+ # Outputs non-array value in the form of hash
1265
+ # For object, use to_hash. Otherwise, just return the value
1266
+ # @param [Object] value Any valid value
1267
+ # @return [Hash] Returns the value in the form of hash
1268
+ def _to_hash(value)
1269
+ if value.is_a?(Array)
1270
+ value.compact.map{ |v| _to_hash(v) }
1271
+ elsif value.is_a?(Hash)
1272
+ {}.tap do |hash|
1273
+ value.each { |k, v| hash[k] = _to_hash(v) }
1274
+ end
1275
+ elsif value.respond_to? :to_hash
1276
+ value.to_hash
1277
+ else
1278
+ value
1279
+ end
1280
+ end
1281
+
1282
+ end
1283
+
1284
+ end