vericred_client 0.0.37 → 0.0.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -4
  3. data/docs/ACAPlan.md +1 -2
  4. data/docs/ACAPlan2018.md +0 -1
  5. data/docs/ACAPlan2018Bulk.md +100 -0
  6. data/docs/ACAPlan2018Search.md +1 -1
  7. data/docs/ACAPlan2018SearchResult.md +1 -1
  8. data/docs/ACAPlanPre2018.md +1 -2
  9. data/docs/ACAPlanPre2018Bulk.md +93 -0
  10. data/docs/ACAPlanSearch.md +0 -1
  11. data/docs/AdultChildTierComposite.md +10 -0
  12. data/docs/CarrierSubsidiaryDisclaimer.md +13 -0
  13. data/docs/CarrierSubsidiaryDisclaimersApi.md +119 -0
  14. data/docs/DentalPlan.md +0 -1
  15. data/docs/DentalPlanBulk.md +21 -0
  16. data/docs/FourTierComposite.md +1 -1
  17. data/docs/MedicalPlanBenefits.md +0 -1
  18. data/docs/MedicalPlanUpdate.md +1 -0
  19. data/docs/MemberAdultChildTierComposite.md +10 -0
  20. data/docs/MemberPremiums.md +1 -0
  21. data/docs/Plan.md +0 -1
  22. data/docs/PlanMedicare.md +0 -1
  23. data/docs/PlanMedicareBulk.md +0 -1
  24. data/docs/Premiums.md +1 -0
  25. data/docs/VisionPlan.md +0 -1
  26. data/docs/VisionPlanBulk.md +21 -0
  27. data/docs/VisionPlanSearch.md +21 -0
  28. data/docs/VisionPlanSearchResponse.md +1 -1
  29. data/lib/vericred_client/api/carrier_subsidiary_disclaimers_api.rb +1135 -0
  30. data/lib/vericred_client/models/aca_plan.rb +3 -13
  31. data/lib/vericred_client/models/aca_plan2018.rb +1 -11
  32. data/lib/vericred_client/models/aca_plan2018_bulk.rb +2113 -0
  33. data/lib/vericred_client/models/aca_plan2018_search.rb +2 -2
  34. data/lib/vericred_client/models/aca_plan2018_search_result.rb +2 -2
  35. data/lib/vericred_client/models/aca_plan_pre2018.rb +3 -13
  36. data/lib/vericred_client/models/aca_plan_pre2018_bulk.rb +2041 -0
  37. data/lib/vericred_client/models/aca_plan_search.rb +1 -11
  38. data/lib/vericred_client/models/adult_child_tier_composite.rb +1205 -0
  39. data/lib/vericred_client/models/carrier_subsidiary_disclaimer.rb +1235 -0
  40. data/lib/vericred_client/models/dental_plan.rb +1 -11
  41. data/lib/vericred_client/models/dental_plan_bulk.rb +1319 -0
  42. data/lib/vericred_client/models/four_tier_composite.rb +8 -8
  43. data/lib/vericred_client/models/medical_plan_benefits.rb +1 -11
  44. data/lib/vericred_client/models/medical_plan_update.rb +11 -1
  45. data/lib/vericred_client/models/member_adult_child_tier_composite.rb +1205 -0
  46. data/lib/vericred_client/models/member_premiums.rb +11 -1
  47. data/lib/vericred_client/models/plan.rb +1 -11
  48. data/lib/vericred_client/models/plan_medicare.rb +1 -11
  49. data/lib/vericred_client/models/plan_medicare_bulk.rb +1 -11
  50. data/lib/vericred_client/models/premiums.rb +11 -1
  51. data/lib/vericred_client/models/vision_plan.rb +1 -11
  52. data/lib/vericred_client/models/vision_plan_bulk.rb +1317 -0
  53. data/lib/vericred_client/models/vision_plan_search.rb +1317 -0
  54. data/lib/vericred_client/models/vision_plan_search_response.rb +1 -1
  55. data/lib/vericred_client/version.rb +1 -1
  56. data/lib/vericred_client.rb +9 -0
  57. data/spec/api/carrier_subsidiary_disclaimers_api_spec.rb +1056 -0
  58. data/spec/models/aca_plan2018_bulk_spec.rb +1590 -0
  59. data/spec/models/aca_plan2018_spec.rb +0 -6
  60. data/spec/models/aca_plan_pre2018_bulk_spec.rb +1548 -0
  61. data/spec/models/aca_plan_pre2018_spec.rb +0 -6
  62. data/spec/models/aca_plan_search_spec.rb +0 -6
  63. data/spec/models/aca_plan_spec.rb +0 -6
  64. data/spec/models/adult_child_tier_composite_spec.rb +1050 -0
  65. data/spec/models/carrier_subsidiary_disclaimer_spec.rb +1068 -0
  66. data/spec/models/dental_plan_bulk_spec.rb +1116 -0
  67. data/spec/models/dental_plan_spec.rb +0 -6
  68. data/spec/models/four_tier_composite_spec.rb +1 -1
  69. data/spec/models/medical_plan_benefits_spec.rb +0 -6
  70. data/spec/models/medical_plan_update_spec.rb +6 -0
  71. data/spec/models/member_adult_child_tier_composite_spec.rb +1050 -0
  72. data/spec/models/member_premiums_spec.rb +6 -0
  73. data/spec/models/plan_medicare_bulk_spec.rb +0 -6
  74. data/spec/models/plan_medicare_spec.rb +0 -6
  75. data/spec/models/plan_spec.rb +0 -6
  76. data/spec/models/premiums_spec.rb +6 -0
  77. data/spec/models/vision_plan_bulk_spec.rb +1116 -0
  78. data/spec/models/vision_plan_search_spec.rb +1116 -0
  79. data/spec/models/vision_plan_spec.rb +0 -6
  80. metadata +38 -2
@@ -0,0 +1,2113 @@
1
+ =begin
2
+ #Vericred API
3
+
4
+ ## Getting Started
5
+
6
+ ## Signing Up
7
+
8
+ Visit our [Developer Portal](https://developers.vericred.com) to
9
+ create an account.
10
+
11
+ Once you have created an account, you can create one Application for your
12
+ Production environment and another for a Sandbox (select the appropriate Plan when you create the Application).
13
+
14
+ ## SDKs
15
+
16
+ Our API follows standard REST conventions, so you can use any HTTP client
17
+ to integrate with us. You will likely find it easier to use one of our
18
+ [autogenerated SDKs](https://github.com/vericred/?query=vericred-),
19
+ which we make available for several common programming languages.
20
+
21
+ ## Authentication
22
+
23
+ To authenticate, pass the API Key you created in the Developer Portal as
24
+ a `Vericred-Api-Key` header.
25
+
26
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' "https://api.vericred.com/drugs?search_term=Lipitor"`
27
+
28
+ ## Versioning
29
+
30
+ Vericred's API default to the latest version. However, if you need a specific
31
+ version, you can request it with an `Accept-Version` header.
32
+
33
+ The current version is `v6`. We support prior versions. Our latest
34
+ stable version is `v7` and we will indicate in the documentation for an
35
+ endpoint if it's required.
36
+
37
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' -H 'Accept-Version: v6' "https://api.vericred.com/drugs?search_term=Lipitor"`
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
51
+ `State`s we typically the associated data. In this example, we would
52
+ provide an Array of `State`s and a `state_id` for each provider. This is
53
+ done primarily to reduce the payload size since many of the `Provider`s
54
+ will share a `State`
55
+
56
+ ### Simplified Example
57
+ ```
58
+ {
59
+ providers: [{ id: 1, state_id: 1}, { id: 2, state_id: 1 }],
60
+ states: [{ id: 1, code: 'NY' }]
61
+ }
62
+ ```
63
+
64
+ If you need the second level of the object graph, you can just match the
65
+ corresponding id.
66
+
67
+ ## Selecting specific data
68
+
69
+ All endpoints allow you to specify which fields you would like to return.
70
+ This allows you to limit the response to contain only the data you need.
71
+
72
+ For example, let's take a request that returns the following JSON by default
73
+
74
+ ```
75
+ {
76
+ provider: {
77
+ id: 1,
78
+ name: 'John',
79
+ phone: '1234567890',
80
+ field_we_dont_care_about: 'value_we_dont_care_about'
81
+ },
82
+ states: [{
83
+ id: 1,
84
+ name: 'New York',
85
+ code: 'NY',
86
+ field_we_dont_care_about: 'value_we_dont_care_about'
87
+ }]
88
+ }
89
+ ```
90
+
91
+ To limit our results to only return the fields we care about, we specify the
92
+ `select` in the query string for a `GET` or the body for a `POST`.
93
+
94
+ In this case, we want to select `name` and `phone` from the `provider` key,
95
+ so we would add the parameters `select=provider.name,provider.phone`.
96
+ We also want the `name` and `code` from the `states` key, so we would
97
+ add the parameters `select=states.name,states.code`. The id field of
98
+ each document is always returned whether or not it is requested.
99
+
100
+ Our final request would be `GET /providers/1234567898?select=provider.name,provider.phone,states.name,states.code`
101
+
102
+ The response would be
103
+
104
+ ```
105
+ {
106
+ provider: {
107
+ id: 1234567898,
108
+ name: 'John',
109
+ phone: '1234567890'
110
+ },
111
+ states: [{
112
+ id: 1,
113
+ name: 'New York',
114
+ code: 'NY'
115
+ }]
116
+ }
117
+ ```
118
+
119
+ # Plan and Rate Data
120
+
121
+ Vericred's Plan and Rate Data let you search and quote Major Medical and Ancillary Insurance Plans in a given area for a particular family in the Individual Market or a group of families in the Small Group Market. Vericred provides the relevant data via this API and via our Bulk Format (documented [below](#Bulk Plan and Rate Data))
122
+
123
+ ## Plans
124
+
125
+ A Plan defines a set of Benefits available to its purchaser. For example, a Major Medical Plan would specify cost-share Benefits for services like a Primary Care Provider visit, a Specialist visit or an Emergency Room visit. A Dental Plan might specify Benefits for Periodontics and Fluroride Treatments. The Benefits for each Product type ([Major Medical](#header-major-medical), [Dental](#header-dental), and [Vision](#header-vision)) are documented below.
126
+
127
+ ### Benefits Format
128
+
129
+ Benefits for Plans can be quite complex. With the goals of capturing and standardizing the complexity while retaining a human-readable format, we have developed a [Bakus-Naur Form](https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form)(BNF) context-free grammar, with which we present Benefits.
130
+
131
+ Benefit cost-share strings are formatted to capture:
132
+ * Network tiers
133
+ * Compound or conditional cost-share
134
+ * Limits on the cost-share
135
+ * Benefit-specific maximum out-of-pocket costs
136
+
137
+ **Example #1**
138
+ As an example, we would represent [this Summary of Benefits & Coverage](https://s3.amazonaws.com/vericred-data/SBC/2017/33602TX0780032.pdf) as:
139
+
140
+ * **Hospital stay facility fees**:
141
+ - Network Provider: `$400 copay/admit plus 20% coinsurance`
142
+ - Out-of-Network Provider: `$1,500 copay/admit plus 50% coinsurance`
143
+ - 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`
144
+
145
+ * **Rehabilitation services:**
146
+ - Network Provider: `20% coinsurance`
147
+ - Out-of-Network Provider: `50% coinsurance`
148
+ - Limitations & Exceptions: `35 visit maximum per benefit period combined with Chiropractic care.`
149
+ - Vericred's format for this benefit: `In-Network: 20% after deductible / Out-of-Network: 50% after deductible | limit: 35 visit(s) per Benefit Period`
150
+
151
+ **Example #2**
152
+ 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.
153
+ * **Specialty drugs:**
154
+ - Network Provider: `40% coinsurance up to a $500 maximum for up to a 30 day supply`
155
+ - Out-of-Network Provider `Not covered`
156
+ - Vericred's format for this benefit: `In-Network: 40% after deductible, up to $500 per script / Out-of-Network: 100%`
157
+
158
+ **BNF**
159
+
160
+ Here's a description of the benefits summary string, represented as a context-free grammar:
161
+
162
+ ```
163
+ root ::= coverage
164
+
165
+ coverage ::= (simple_coverage | tiered_coverage) (space pipe space coverage_modifier)?
166
+ tiered_coverage ::= tier (space slash space tier)*
167
+ tier ::= tier_name colon space (tier_coverage | not_applicable)
168
+ tier_coverage ::= simple_coverage (space (then | or | and) space simple_coverage)* tier_limitation?
169
+ simple_coverage ::= (pre_coverage_limitation space)? coverage_amount (space post_coverage_limitation)? (comma? space coverage_condition)?
170
+ coverage_modifier ::= limit_condition colon space (((simple_coverage | simple_limitation) (semicolon space see_carrier_documentation)?) | see_carrier_documentation | waived_if_admitted | shared_across_tiers)
171
+ waived_if_admitted ::= ("copay" space)? "waived if admitted"
172
+ simple_limitation ::= pre_coverage_limitation space "copay applies"
173
+ tier_name ::= "In-Network-Tier-2" | "Out-of-Network" | "In-Network"
174
+ limit_condition ::= "limit" | "condition"
175
+ tier_limitation ::= comma space "up to" space (currency | (integer space time_unit plural?)) (space post_coverage_limitation)?
176
+ coverage_amount ::= currency | unlimited | included | unknown | percentage | (digits space (treatment_unit | time_unit) plural?)
177
+ pre_coverage_limitation ::= first space digits space time_unit plural?
178
+ post_coverage_limitation ::= (((then space currency) | "per condition") space)? "per" space (treatment_unit | (integer space time_unit) | time_unit) plural?
179
+ coverage_condition ::= ("before deductible" | "after deductible" | "penalty" | allowance | "in-state" | "out-of-state") (space allowance)?
180
+ allowance ::= upto_allowance | after_allowance
181
+ upto_allowance ::= "up to" space (currency space)? "allowance"
182
+ after_allowance ::= "after" space (currency space)? "allowance"
183
+ see_carrier_documentation ::= "see carrier documentation for more information"
184
+ shared_across_tiers ::= "shared across all tiers"
185
+ unknown ::= "unknown"
186
+ unlimited ::= /[uU]nlimited/
187
+ included ::= /[iI]ncluded in [mM]edical/
188
+ 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/)
189
+ treatment_unit ::= /[pP]erson/ | /[gG]roup/ | /[cC]ondition/ | /[sS]cript/ | /[vV]isit/ | /[eE]xam/ | /[iI]tem/ | /[sS]tay/ | /[tT]reatment/ | /[aA]dmission/ | /[eE]pisode/
190
+ comma ::= ","
191
+ colon ::= ":"
192
+ semicolon ::= ";"
193
+ pipe ::= "|"
194
+ slash ::= "/"
195
+ plural ::= "(s)" | "s"
196
+ then ::= "then" | ("," space) | space
197
+ or ::= "or"
198
+ and ::= "and"
199
+ not_applicable ::= "Not Applicable" | "N/A" | "NA"
200
+ first ::= "first"
201
+ currency ::= "$" number
202
+ percentage ::= number "%"
203
+ number ::= float | integer
204
+ float ::= digits "." digits
205
+ integer ::= /[0-9]/+ (comma_int | under_int)*
206
+ comma_int ::= ("," /[0-9]/*3) !"_"
207
+ under_int ::= ("_" /[0-9]/*3) !","
208
+ digits ::= /[0-9]/+ ("_" /[0-9]/+)*
209
+ space ::= /[ \t]/+
210
+ ```
211
+
212
+
213
+ ### Major Medical
214
+
215
+ Vericred's data covers all Major Medical Plans available in the Individual and Small Groups (2-50 or 2-100) Markets in the US. These Plans are governed by CMS and are ACA-compliant. We do not include certain Plans that fall outside of the ACA, for example, Faith-Based Plans or Short-Term Medical Plans
216
+
217
+ We support the following Benefits Fields for Major Medical Plans. These represent the vast majority of fields available on a [Summary of Benefits and Coverage](https://www.healthcare.gov/health-care-law-protections/summary-of-benefits-and-coverage/)
218
+
219
+ The following are the appropriate Benefit Fields for Major Medical:
220
+
221
+ - ambulance
222
+ - child\_eye\_exam
223
+ - child\_eyewear
224
+ - chiropractic\_services
225
+ - diagnostic\_test
226
+ - durable\_medical\_equipment
227
+ - emergency\_room
228
+ - family\_drug\_deductible
229
+ - family\_drug\_moop
230
+ - family\_medical\_deductible
231
+ - family\_medical\_moop
232
+ - generic\_drugs
233
+ - habilitation\_services
234
+ - home\_health\_care
235
+ - hospice\_service
236
+ - imaging\_center
237
+ - imaging\_physician
238
+ - individual\_drug\_deductible
239
+ - individual\_drug\_moop
240
+ - individual\_medical\_deductible
241
+ - individual\_medical\_moop
242
+ - inpatient\_birth
243
+ - inpatient\_facility
244
+ - inpatient\_mental\_health
245
+ - inpatient\_physician
246
+ - inpatient\_substance
247
+ - lab\_test
248
+ - non\_preferred\_brand\_drugs
249
+ - nonpreferred\_generic\_drug\_share
250
+ - nonpreferred\_specialty\_drug\_share
251
+ - outpatient\_ambulatory\_care\_center
252
+ - outpatient\_facility
253
+ - outpatient\_mental\_health
254
+ - outpatient\_physician
255
+ - outpatient\_substance
256
+ - postnatal\_care
257
+ - preferred\_brand\_drugs
258
+ - prenatal\_care
259
+ - preventative\_care
260
+ - primary\_care\_physician
261
+ - rehabilitation\_services
262
+ - skilled\_nursing
263
+ - specialist
264
+ - specialty\_drugs
265
+ - urgent\_care
266
+
267
+ ### Dental
268
+
269
+ Dental benefits are less standardized than [Major Medical](#header-major-medical). Because of this, we have captured benefits for the most commonly specified services and procedures. If a Plan only specifies cost-share for "Major", "Minor", "Elective", etc, we determine the category for each of the benefits that we support and display the appropriate value for its category.
270
+
271
+ To view the technical documentation, [click here](#dental-plans).
272
+
273
+ The following are the supported Benefit Fields for Dental:
274
+
275
+ - bridges
276
+ - crowns
277
+ - denture\_relines\_rebases
278
+ - denture\_repair\_and\_adjustments
279
+ - dentures
280
+ - emergency\_treatment
281
+ - endodontics
282
+ - family\_annual\_max
283
+ - family\_deductible
284
+ - fluoride\_treatment
285
+ - implants
286
+ - individual\_annual\_max
287
+ - individual\_deductible
288
+ - inlays
289
+ - onlays
290
+ - oral\_exam
291
+ - oral\_surgery
292
+ - orthodontics\_adult
293
+ - orthodontics\_child
294
+ - periodontal\_maintenance
295
+ - periodontics
296
+ - prophylaxis\_cleaning
297
+ - radiograph\_bitewings
298
+ - radiograph\_other
299
+ - restoration\_fillings
300
+ - sealant
301
+ - simple\_extraction
302
+ - space\_maintainers
303
+
304
+ ### Vision
305
+
306
+ Vision benefits are similar in structure to [Dental](#header-dental). Again, when benefits are broken out by category, we determine the appropriate category for each service or procedure and display the approprate value for its category.
307
+
308
+ To view the technical documentation, [click here](#vision-plans).
309
+
310
+ The following are the supported Benefit Fields for Vision:
311
+
312
+ - eye\_exam
313
+ - retinal\_imaging
314
+ - frame
315
+ - eyeglass\_lenses\_single\_vision
316
+ - eyeglass\_lenses\_bifocal
317
+ - eyeglass\_lenses\_trifocal
318
+ - eyeglass\_lenses\_lenticular
319
+ - uv\_coating
320
+ - tint
321
+ - standard\_antireflective\_coating
322
+ - premium\_antireflective\_coating
323
+ - standard\_polycarbonate\_lenses\_child
324
+ - standard\_polycarbonate\_lenses\_adult
325
+ - standard\_progressive\_lenses
326
+ - premium\_progressive\_lenses
327
+ - standard\_scratch\_resistance
328
+ - polarized\_lenses
329
+ - photochromatic\_lenses
330
+ - standard\_contact\_lens\_fit\_and\_follow\_up
331
+ - premium\_contact\_lens\_fit\_and\_follow\_up
332
+ - contact\_lenses\_conventional
333
+ - contact\_lenses\_disposable
334
+ - contact\_lenses\_medically\_necessary
335
+ - laser\_vision\_correction
336
+ - additional\_pairs\_of\_eyeglasses
337
+
338
+ ### Medicare Advantage
339
+
340
+ Medicare Advantage endpoints support MA (Medicare Advantage plans without prescription drug benefits), MAPD (Medicare Advantage plans with prescription drug benefits), and PDP (prescription drug benefits only) plans.
341
+
342
+ Medical and hospital benefits - we support over 4000 individual plans through our API nationwide. At this time, we do not support EGHP (employer group health plans).
343
+
344
+ Prescription drug benefits - drug benefits are categorized into initial coverage phase, coverage gap phase, and catastrophic phase. Each phase is broken down by drug tiers, pharmacy tiers, and length of supply.
345
+
346
+ [Click here](#header-medicare-advantage-quotes) to learn more about quoting Medicare Advantage plans.
347
+
348
+ ## Rates
349
+
350
+ Rates are returned from the API as a part of [Quoting](#header-quoting). We calculate Rates in one of two ways.
351
+
352
+ ### Sheet Rates
353
+ When a Carrier supplies us with Sheet Rates, we display *exactly* the value provided to us. For example, in the Major Medical market, most Carriers provide a single rate for each combination of Applicant age and tobacco status in a given [Rating Area](#header-rating-areas). For example, in Austin, TX, a 21-year-old non-tobacco-user may be $312.41 per month while a 22-year-old tobacco-user may be $401.75 per month. Certain Vision and Dental Carriers supply Sheet Rates as well, though it is less common.
354
+
355
+ ### Rate Factors
356
+ Certain [Major Medical](#header-major-medical) Carriers and most [Vision](#header-vision) and [Dental](#header-dental) Carriers supply Rate Factors. The attributes on which the factors are based are the same as [Sheet Rates](#header-sheet-rates) for the [Major Medical](#header-major-medical) market (due to restrictions on what factors may be used in ACA Plans, which limit the possible factors to age and tobacco status).
357
+
358
+ In [Dental](#header-dental) and [Vision](#header-vision), the types of [Rate Factors](#header-rate-factors) are more varied. For example, SIC Code and Group size in the Group market and Gender in the Individual Market are commonly used [Rate Factors](#header-rate-factors)
359
+
360
+ Other common [Rate Factors](#header-rate-factors) for [Dental](#header-dental) and [Vision](#header-vision) products are Geographic and "Trend" (enrollment date) Factors. In [Major Medical](#header-major-medical), these types of variance are handled by CMS-defined [Rating Areas](#header-rating-areas).
361
+
362
+ In order to calculate a Rate using [Rate Factors](#header-rate-factors), the following methodology is applied:
363
+
364
+ ```
365
+ B = Base Rate
366
+ f = Rate Factor Function 1
367
+ f' = Rate Factor Function 2
368
+
369
+ B * f(x) * f'(y) [* f''(z)] ... = n
370
+ ```
371
+
372
+ ## Rating Areas
373
+ For [Major Medical](#header-major-medical) products, [CMS](https://www.cms.gov/) defines [Rating Areas](https://www.cms.gov/cciio/programs-and-initiatives/health-insurance-market-reforms/state-gra.html). Under the ACA, *all* [Rate Factors](#header-rate-factors) in a Rating Area must be identical for a given time period. E.g. in Arizona, the rate for a 21-year-old non-tobacco user must be identical in all counties contained in Rating Area 1 (Mohave, Coconino, Apache, and Navajo), but *may* be different than the rate for a 21-year-old non-tobacco user in all counties Rating Area 2 (Yavapai county only) for a given year in the Individual Market and a given quartern in the Small Group market.
374
+
375
+ [Rating Areas](#header-rating-areas) are defined either by County, Zip Code or both, depending on the State. Because of this variance, all API endpoints that require a [Location](#header-specifying-the-location) require both `zip_code` and `fips_code` (a county code). [Bulk Data](#bulkplanandratedata) for [Rating Areas](#bulkratingareas) and [Service Areas](#bulkserviceareas) also specifies locations using both `zip_code` and `fips_code`.
376
+
377
+ *Rating Areas do not apply to products other than [Major Medical](#header-major-medical)*
378
+
379
+ ## Service Areas
380
+ CMS mandates that [Major Medical](#header-major-medical) Rates be defined by [Rating Areas](#header-rating-areas), which themselves define a geography in which Plans are offered. Carriers often choose *not* to offer a Plan in and entire [Rating Area](#header-rating-areas) due to network coverage or other factors. Instead, the Carrier would define a [Service Area](#header-service-areas) that specifies where a given Plan is offered.
381
+
382
+ Each Plan is available in a single [Service Area](#header-service-areas) and each [Service Area](#header-service-areas) is defined by either County, Zip Code, or both, depending on the Carrier. Because of this variance, all API endpoints that require a [Location](#header-specifying-the-location) require both `zip_code` and `fips_code` (a county code). [Bulk Data](#bulkplanandratedata) for [Rating Areas](#bulkratingareas) and [Service Areas](#bulkserviceareas) also specifies locations using both `zip_code` and `fips_code`.
383
+
384
+ In [Dental](#header-dental) and [Vision](#header-vision) plans, we use a [Service Area](#header-service-areas) to define availability as well, although it typically mirrors a Geographic [Rate Factor](#header-rate-factors).
385
+
386
+ # Quoting
387
+
388
+ One of the primary use-cases for the Vericred API is to run Quotes to determine the Rate for a given family (in the Individual Market) or group (in the Small Group Market). We support quoting across [Major Medical](#header-major-medical), [Vision](#header-vision), and [Dental](#header-dental). In both cases, the process of generating a Quote is broken out into several steps:
389
+
390
+ 1. Find all available [Plans](#header-plans) in the relevent [Service Areas](#header-service-areas) for the family or group.
391
+ 1. Using [Business Rules](#header-business-rules) for each [Plan](#header-plans), determine if the family or group is eligible for that [Plan](#header-plans).
392
+ 1. Using [Business Rules](#header-business-rules) for each [Plan](#header-plans), determine which members of the family or which members of each family in the group should be considered for Rating.
393
+ 1. Using the [Sheet Rates](#header-sheet-rates) or [Rate Factors](#header-rate-factors) for each [Plan](#header-plans), determine the Rate the family, or for each family in the group.
394
+ 1. If running a [Composite](#compositerates) quote, determine the portion of the total Rate that each family will pay.
395
+
396
+ ## Individual Quotes
397
+ An Individual Quote is one for Plans that are available to a particular family, outside the context of their Employer. In the [Major Medical](#header-major-medical) market, many of these Plans are available on [Healthcare.gov](https://www.healthcare.gov) or the State-Based Exchange for non-Healthcare.gov states. The API supports both on-market and off-market Plans.
398
+
399
+ For details on Major Medical Quoting API calls see [below](#medicalplans-medicalplans-post)
400
+
401
+ ### Specifying the Location
402
+ In order to determine which plans are [available](#header-service-areas) and the [rate](#header-rating-areas) for each Plan, you must specify a location. When creating a [Quote](#header-quoting) for the Individual Market, that information is contained in the `POST` body of the request:
403
+ ```
404
+ POST /plans/medical/search
405
+ {
406
+ ...
407
+ "zip_code": "11201",
408
+ "fips_code": "36047"
409
+ ...
410
+ }
411
+
412
+ ```
413
+
414
+ ### Specifying Applicants
415
+ Applicants are the members of the family being quoted and are specified in the `POST` body of the request.
416
+ ```
417
+ POST /plans/medical/search
418
+ {
419
+ ...
420
+ "applicants": [
421
+ {
422
+ "age": 34,
423
+ "smoker": true,
424
+ "child": false
425
+ },
426
+ {
427
+ "age": 32,
428
+ "smoker": false,
429
+ "child": false
430
+ },
431
+ {
432
+ "age": 4,
433
+ "smoker": false,
434
+ "child": true
435
+ }
436
+ ]
437
+ ...
438
+ }
439
+ ```
440
+
441
+ ### Specifying Enrollment Date
442
+ The `enrollment_date` determines which [Plans](#header-plans) and [Rates](#header-rates) are returned. Specifying an `enrollment_date` in the past allows you to calculate historical data as far back as 2014.
443
+
444
+ ### Plan Benefits
445
+ Plan Benefits are returned in the response for [Individual Quotes](#individualquotes)
446
+ ```
447
+ POST /plans/medical/search
448
+ {
449
+ ...
450
+ }
451
+
452
+ Response:
453
+ {
454
+ "plans": [
455
+ {
456
+ ...
457
+ "individual_medical_deductible": "$5,000",
458
+ "family_medical_deductible": "$10,000"
459
+ ...
460
+ }
461
+
462
+ ]
463
+ }
464
+
465
+ ```
466
+
467
+ ### Premiums
468
+ The value for the family being quoted is returned in the `premium` field. If no [Applicants](#specifyingapplicants) are provided, the `premium` field will be `0`
469
+
470
+ ### Major Medical Quotes
471
+ In order to [Quote](#header-quoting) [Major Medical](#header-major-medical) Plans, send a `POST` to `/plans/medical/search`. In addition, the `age`, `smoker` and `child` attributes of each Applicant must be present.
472
+
473
+ #### Subsidies
474
+ On-market ([Healthcare.gov](https://www.healthcare.gov) and State-Based Exchange) [Major Medical](#header-major-medical) Plans are eligible for government subsidies. The subsidy calculation is based on the percentage of the family's income that the IRS has designated as "affordable" for that family and the Second Lowest-Cost Silver Plan available to that family.
475
+
476
+ In order to calculate subsidies for a family the following parameters must be supplied:
477
+ ```
478
+ POST /plans/medical/search
479
+ {
480
+ ...
481
+ "household_size": 4,
482
+ "household_income": 40000
483
+ ...
484
+ }
485
+ ```
486
+
487
+ The amount that the family will pay after subsidy is returned in the `premium_subsidized` field for each plan.
488
+
489
+ ##### Subsidy Calculation
490
+ Here is how subsidies are calculated. This is fully handled by the Vericred API, but the steps are enumerated below for clarity.
491
+
492
+ 1. Determine the percentage of the [Federal Poverty Level](https://aspe.hhs.gov/poverty-guidelines) for the family based on the household size and income.
493
+ 1. Reference the [CMS table](https://www.irs.gov/pub/irs-drop/rp-17-36.pdf) to determine the appropriate percentage of income for the family to spend on healthcare.
494
+ 1. Multiply that value by the family's income. This is the total amount that the family can spend on healthcare for the year, after the subsidy.
495
+ 1. Find the cost of the Second Least-Expensive Silver Plan available to the family, accounting for the percentage of premium that goes to [Essential Health Benefits](https://www.healthcare.gov/glossary/essential-health-benefits/)
496
+ 1. Calculate the difference in price between the amount the family should spend on healthcare and the Second Least-Expensive Silver Plan's premium. This is the subsidy.
497
+ 1. Apply the subsidy to all on-market Plans available to the family. The subsidized premium can never be below $0 (for example, a low-cost Bronze Plan may be less expensive than the subsidy)
498
+
499
+ #### Cost Sharing Reduction Plans
500
+ [Cost Sharing Reduction (CSR)](https://www.healthcare.gov/glossary/cost-sharing-reduction/) Plans are available to lower income families and offer enhanced benefits for certain Silver Plans at the same cost as the non-CSR Plans available to higher-income families.
501
+
502
+ If a family is eligible for CSR Plans, the Vericred API will return the relevant Plan in place of the non-CSR version.
503
+
504
+ In order to include CSR Plans where applicable, the following parameters must be supplied:
505
+ ```
506
+ POST /plans/medical/search
507
+ {
508
+ ...
509
+ "household_size": 4,
510
+ "household_income": 40000
511
+ ...
512
+ }
513
+ ```
514
+
515
+ #### The Children's Health Insurance Program (CHIP)
516
+ [The Children's Health Insurance Program (CHIP)](https://www.healthcare.gov/medicaid-chip/childrens-health-insurance-program/) provides low-cost health coverage to children in families that earn too much money to qualify for Medicaid.
517
+
518
+ If a family is eligible for CHIP, the Vericred API will include the subsidy in the returned premiums. In order to include CHIP subsidies in premium calculations, the following parameters must be supplied:
519
+ ```
520
+ POST /plans/medical/search
521
+ {
522
+ ...
523
+ "applicants": [
524
+ {
525
+ "age": 34,
526
+ "smoker": true,
527
+ "child": false
528
+ },
529
+ {
530
+ "age": 32,
531
+ "smoker": false,
532
+ "child": false
533
+ },
534
+ {
535
+ "age": 4,
536
+ "smoker": false,
537
+ "child": true
538
+ },
539
+ {
540
+ "age": 4,
541
+ "smoker": false,
542
+ "child": true
543
+ }
544
+ ],
545
+ "household_size": 4,
546
+ "household_income": 40000
547
+ ...
548
+ }
549
+ ```
550
+
551
+ CHIP eligibility is displayed within the meta-tag in the response as `eligible_for_chip_medicaid`:
552
+ ```
553
+ {
554
+ "meta": {
555
+ "total": 150,
556
+ "eligible_for_chip_medicaid": true,
557
+ "premium_tax_credit": 500.20
558
+ },
559
+ "coverages": [],
560
+ "plans": [...]
561
+ }
562
+ ```
563
+
564
+ If you do not want CHIP subsidies to be included in the premiums, simply do not include the `household_income` parameter in the request.
565
+
566
+ ### Dental Quotes
567
+ Quoting [Dental](#header-dental) Plans for a family requires slightly different parameters for [Applicants](#specifyingapplicants), due to the method with which Plans are [rated](#header-rate-factors). The folloiwng example contains the require parameters:
568
+ ```
569
+ POST /plans/dental/search
570
+ {
571
+ ...
572
+ "applicants": [
573
+ {
574
+ "age": 34,
575
+ "gender": "M",
576
+ "child": false
577
+ },
578
+ {
579
+ "age": 32,
580
+ "gender": "F",
581
+ "child": false
582
+ },
583
+ {
584
+ "age": 4,
585
+ "gender": "M",
586
+ "child": true
587
+ }
588
+ ]
589
+ ...
590
+ }
591
+ ```
592
+
593
+ Note that in contrast to [Major Medical Quotes](#majormedicalquotes), [Dental Quotes](#dentalquotes) require `gender`, but *do not* require `smoker`.
594
+
595
+ Also note that [Subsidies](#subsidies) and [Cost Sharing Reduction](#costsharingreductionplans) are *not* relevant for [Dental Quotes](#dentalquotes).
596
+
597
+ ### Vision Quotes
598
+
599
+ Quoting [Vision](#header-vision) Plans for a family requires slightly different parameters for [Applicants](#specifyingapplicants), due to the method with which Plans are [rated](#header-rate-factors). The folloiwng example contains the require parameters:
600
+ ```
601
+ POST /plans/vision/search
602
+ {
603
+ ...
604
+ "applicants": [
605
+ {
606
+ "age": 34,
607
+ "gender": "M",
608
+ "child": false
609
+ },
610
+ {
611
+ "age": 32,
612
+ "gender": "F",
613
+ "child": false
614
+ },
615
+ {
616
+ "age": 4,
617
+ "gender": "M",
618
+ "child": true
619
+ }
620
+ ]
621
+ ...
622
+ }
623
+ ```
624
+
625
+ Note that in contrast to [Major Medical Quotes](#majormedicalquotes), [Vision Quotes](#visionquotes) require `gender`, but *do not* require `smoker`.
626
+
627
+ Also note that [Subsidies](#subsidies) and [Cost Sharing Reduction](#costsharingreductionplans) are *not* relevant for [Vision Quotes](#visionquotes).
628
+
629
+ ### Medicare Advantage quotes
630
+
631
+ Given an enrollment date and location, you can search all plans available at this location using [/plans/medadv/search](#medicare-advantage-plans-medicare-advantage-plans-post); you can also search a specific plan using its plan ID with [/plans/medadv/{plan_id}](#medicare-advantage-plans-medicare-advantage-plans-get) if the plan ID is already known. The following example contains the required parameters:
632
+ ```
633
+ {
634
+ "zip_code": "02880",
635
+ "fips_code": "44009",
636
+ "enrollment_date": "2019-01-01"
637
+ }
638
+ ```
639
+ To view the technical documentation, [click here](#medicare-advantage-plans).
640
+
641
+
642
+ ## Quotes for Groups
643
+ A Group Quote finds [Plans](#header-plans) and [Rates](#header-rates) for a group of employees for a small business. Different [Plans](#header-plans) are available to small groups than are available in [Individual Quoting](#individualquotes). In addition, [Business Rules](#header-business-rules) that apply across multiple families or based upon employer attributes such as [SIC](https://en.wikipedia.org/wiki/Standard_Industrial_Classification) code factor into rates and availability.
644
+
645
+ In addition, due to performance requirements and for enhanced auditing, [Group Quotes](#groupquotes) are persisted across requests. This means that a given [Quote](#groupquotes) can be retrieved after it has been created.
646
+
647
+ ### Identifiers
648
+ In order to make it easier to cross-reference local copies of data with [Quotes](#header-creating-a-quote) and other data in the Vericred API, most entities allow for the specification of an `external_id` field. You can use this to store a primary or natural key from your system in order to easily match records returned from the API with records in your system.
649
+
650
+ ### Specifying the Group
651
+ Creating a group is the first step in [Group Quoting](#groupquoting). The API requires that certain information such as `sic_code`, and `chamber_association` be provided and returns a the attributes and `id` for the newly created `Group`
652
+
653
+ Full documentation is available [below](#groupscreate)
654
+
655
+ ### Specifying the Locations
656
+ When creating a `Group`, you must also specify one or more `Location`s. Of those `Location`s specified, one must be `primary`. That `Location` is used to calculate Plan eligibility using the relevant [Service Areas](#header-service-areas). Some Carriers use secondary `Location`s to determine eligibility as well, which is why those must be specified as well.
657
+
658
+ ```
659
+ POST /groups
660
+ {
661
+ "group": {
662
+ ...
663
+ },
664
+ "locations": [
665
+ {
666
+ ...
667
+ "zip_code": "11201",
668
+ "fips_code": "36047",
669
+ "primary": true
670
+ ...
671
+ }
672
+ ]
673
+ }
674
+ ```
675
+
676
+ ### Specifying the Census
677
+ A Census is the collection of `Member`s contained in the `Group`. The attributes of each `Member` and his or her `Dependent`s determine the [Rate](#header-rates) for the `Group` as a whole. Certain attributes of the `Member` are important for calculating [Rates](#header-rates) and applying [Business Rules](#header-business-rules). For example, the `Member`'s home address and in which office he or she works are relevant for certain [Business Rules](#header-business-rules).
678
+
679
+ #### Dependent Relationships
680
+ The `Dependent`s for a given `Member` also factor into the [Rates](#header-rates) and application of [Business Rules](#header-business-rules). For example, certain [Plans](#header-plans) cover only `Dependent`s of particular types and/or only `Dependent`s of a particular type who live in the same household as the primary `Member`
681
+
682
+ Valid Dependent Relationships:
683
+ - `adopted_child`
684
+ - `child`
685
+ - `court_appointed_guardian`
686
+ - `dependent_of_dependent`
687
+ - `ex_spouse`
688
+ - `foster_child`
689
+ - `grand_child`
690
+ - `guardian`
691
+ - `life_partner`
692
+ - `other`
693
+ - `sibling`
694
+ - `sponsored_dependent`
695
+ - `spouse`
696
+ - `step_child`
697
+ - `ward`
698
+
699
+ ```
700
+ POST
701
+
702
+ /groups/{id}/members
703
+ {
704
+ "members": [
705
+ ...
706
+ {
707
+ "cobra": false,
708
+ "date_of_birth": "1980-01-01",
709
+ "fips_code": "36047"
710
+ "gender": "M",
711
+ "last_used_tobacco": "2017-01-01",
712
+ "location_id": :location_id
713
+ "retiree": false,
714
+ "zip_code": "11201",
715
+ "dependents": [
716
+ ...
717
+ {
718
+ "relationship": "child",
719
+ "same_household": true
720
+ }
721
+ ...
722
+ ]
723
+ }
724
+ ...
725
+ ]
726
+ }
727
+
728
+ ```
729
+
730
+ ### Creating a Quote
731
+ Once the [Census](#header-specifying-the-census) has been created, we can generate a `Quote` for the `Group`.
732
+
733
+ #### Major Medical Quotes
734
+ To generate a [Major Medical](#header-major-medical) Quote, specify the `product_line` of `Quote` as `medical`
735
+
736
+ ```
737
+ POST /groups/{id}/quotes
738
+ {
739
+ ...
740
+ "product_line": "medical"
741
+ ...
742
+ }
743
+ ```
744
+
745
+ #### Dental Quotes
746
+ To generate a [Dental](#header-dental) Quote, specify the `product_line` of `Quote` as `dental`
747
+
748
+ ```
749
+ POST /groups/{id}/quotes
750
+ {
751
+ ...
752
+ "product_line": "dental"
753
+ ...
754
+ }
755
+ ```
756
+
757
+ #### Vision Quotes
758
+ To generate a [Vision](#header-vision) Quote, specify the `product_line` of `Quote` as `vision`
759
+
760
+ ```
761
+ POST /groups/{id}/quotes
762
+ {
763
+ ...
764
+ "product_line": "vision"
765
+ ...
766
+ }
767
+ ```
768
+
769
+ ### Retrieving Aggregate Rates
770
+ Once you have created a [Quote](#header-creating-a-quote), you can retrieve its aggregate [Rates](#header-rates). [Rates](#header-rates) are broken down by `Member` and `Dependent`, so that you can show the final cost in different scenarios where an employer might cover a different percentage of `Member` and `Dependent` costs.
771
+
772
+ ```
773
+ GET /quotes/{id}/rates
774
+
775
+ Response
776
+ {
777
+ "rates": [
778
+ ...
779
+ {
780
+ "id": "123abc",
781
+ "plan_id": "12345NY6789012",
782
+ "total_premium": "2800.00",
783
+ "member_premium": "1000.00",
784
+ "dependent_premium": "1800.00",
785
+ "premiums": {
786
+ "age_banded": {
787
+ "total_member": "1000.00",
788
+ "total_dependent": "1800.00",
789
+ "total": "2800.00"
790
+ },
791
+ "2_tier_composite": {
792
+ "employee_only": "200.00",
793
+ "employee_plus_family": "400.00",
794
+ "total": "2800.00"
795
+ },
796
+ "3_tier_composite": {
797
+ "employee_only": "200.00",
798
+ "employee_plus_one": "250.00",
799
+ "employee_plus_family": "330.00",
800
+ "total": "2800.00"
801
+ },
802
+ "4_tier_composite": {
803
+ "employee_only": "200.00",
804
+ "employee_plus_child": "220.00",
805
+ "employee_plus_spouse": "250.00",
806
+ "employee_plus_family": "330.00",
807
+ "total": "2800.00"
808
+ }
809
+ }
810
+ }
811
+ ...
812
+ ]
813
+ }
814
+ ```
815
+
816
+
817
+ #### Loading Plan Data
818
+ Aggregate [Rates](#header-rates) responses *do not* include [Plan](#header-plans) details in order to keep the payload small. [Plan](#header-plans) data can be retrieved in one of two ways:
819
+
820
+ Loading the [Plan](#header-plans) from the API:
821
+ ```
822
+ GET /plans/{id}
823
+
824
+ Response:
825
+ {
826
+ "plans": [
827
+ ...
828
+ {
829
+ ...
830
+ "individual_medical_deductible": "$5,000",
831
+ "family_medical_deductible": "$10,000",
832
+ ...
833
+ }
834
+ ...
835
+
836
+ ]
837
+ }
838
+ ```
839
+ Pulling in [Bulk Plan Data](#bulkplans) and matching up [Plans](#header-plans) by their `id`.
840
+
841
+ ### Retrieving Member-Level Rates
842
+ In order to retrieve the exact [Rate](#header-rates) for each `Member` and their `Dependents` for given [Plan](#header-plans), you can load Member-Level `Rates`.
843
+
844
+ ```
845
+ GET /rates/{id}/member_rates
846
+
847
+ Response
848
+ {
849
+ "member_rates": [
850
+ ...
851
+ {
852
+ "id": "123abc",
853
+ "member_id": "234def",
854
+ "member_external_id": "externally-supplied-id",
855
+ "member_premium": 500.0,
856
+ "dependent_premium": 600.0,
857
+ "total_premium": 1100.0
858
+ }
859
+ ...
860
+ ]
861
+ }
862
+
863
+ ```
864
+
865
+ Note that *all* `MemberRate`s are for one particular [Plan](#header-plans) - the one referenced by the parent [Rate](#header-rates).
866
+
867
+ ### Business Rules
868
+ Vericred works with our Carrier partners to acquire and apply Business Rules that can affect either [Plan](#header-plans) availability or the way in which `Member`s and `Dependent`s are rated. For example, one Carrier's Business Rules might specify that `Member`s and `Dependent`s who have used tobacco in the past 4 months are considered "tobacco-users", while another's may specify that period to be 1 year.
869
+
870
+ These rules are applied transparently during the [Quoting](#header-quoting) process and *do not* require any additional action or input on your part.
871
+
872
+ For a full accounting of Business Rules and a list of Carriers whose Business Rules are applied, please contact support@vericred.com
873
+
874
+ ### Composite Rates
875
+ Composite Rates are commonly used in [Major Medical](#header-major-medical), [Dental](#header-dental), and [Vision](#header-vision) [Plans](#header-plans) to simplify operations by charging each family the weighted average of the `Group`'s total premium. The most common methodology is as follows:
876
+
877
+ 1. Calculate the [Rates](#header-rates) for the entire `Group` using [Sheet Rates](#header-sheet-rates) or [Rate Factors](#header-rate-factors) as appropriate
878
+ 1. Categorize each Family within the Group. The categorization differs depending on whether the Composite Rate is 2, 3, or 4-tier
879
+ 1. Multiply the number of Families in each category by the constant for that category. These constants are provided to Vericred by the Carrier. This determines the total number of "Rating Units"
880
+ 1. Divide the total premium calculated in Step 1 by the total number of Rating Units to get the price per Rating Unit
881
+ 1. The [Rate](#header-rates) each Family pays is the constant for that Family's category multiplied by the price per Rating Unit.
882
+
883
+ You can request that a [Quote](#header-quoting) be calculated using Composite Rates when creating it:
884
+ ```
885
+ POST /quotes
886
+ {
887
+ ...
888
+ "rating_method": "4_tier_composite"
889
+ ...
890
+ }
891
+ ```
892
+ If no Composite Rates methodology is available, the Vericred API will return standard age-banded Rates.
893
+
894
+ # Network and Provider Data
895
+
896
+ A `Provider` is an individual or organization in the medical profession. For example, an individual doctor is a `Provider` as are certain clinics and hospitals.
897
+
898
+ `Provider`s are related to `Network`s. A `Network` is a collection of `Provider`s that are under a particular contract with a given `Carrier`. A given `Carrier` will often have multiple `Network`s. For example, there may be a large national `Network` as well as several smaller regional `Network`s.
899
+
900
+ Each `Plan` has a `Network`. A consumer who visits a `Provider` typically incurs fewer costs when visiting a `Provider` in the `Network` covered by his or her `Plan`. The `premium` for a `Plan` is often proportional to the size of its `Network`
901
+
902
+ ## Finding Providers
903
+ In order to determine if a particular `Plan` covers a given `Provider`, you must first identify the `Provider`. To do so, use the [Provider Search API endpoint](#providers-providers-post) and specify some search criteria:
904
+
905
+ ```
906
+ POST /providers/search
907
+ {
908
+ "search_term": "foo",
909
+ "zip_code": "11201"
910
+ }
911
+ ```
912
+
913
+ The API will return an ordered list of `Provider`s who match the query along with their names, addresses, and other demographic data. The `id` field returned refers to the `Provider`'s [NPI number](https://www.cms.gov/Regulations-and-Guidance/Administrative-Simplification/NationalProvIdentStand/). This is the key that is used to identify the `Provider` across different API endpoints.
914
+
915
+ ## Finding Networks
916
+
917
+ A `Network` is a collection of `Provider`s that are under a particular contract with a given `Carrier`. A given `Carrier` will often have multiple `Network`s. For example, there may be a large national `Network` as well as several smaller regional `Network`s.
918
+
919
+ The API supports searching for `Networks` by Carrier, market and state. For more details view the [endpoint documentation](#networks-networks-get)
920
+
921
+ ## Matching Providers to Networks
922
+ In order to determine if a `Provider` is covered by a user's `Plan`, you will need to map the `Provider` to a `Network`. There are several methods to do this using the API
923
+
924
+ ### Using Plan Search
925
+ You can specify one or more `npi` values in the [`plan` search](#majormedicalplans-majormedicalplans-post). To do so, include a list of `providers` in the request
926
+ ```
927
+ POST /plans/medical/search
928
+ {
929
+ ...
930
+ "providers": [
931
+ { "npi": 1234567890 },
932
+ { "npi": 2345678901 }
933
+ ]
934
+ ...
935
+ }
936
+
937
+ The response will then return a list of `in_network_ids` and `out_of_network_ids` for each `Plan`
938
+
939
+ ```
940
+ {
941
+ "plans": [
942
+ ...
943
+ {
944
+ ...
945
+ "id": "12345NY1234567",
946
+ "in_network_ids": [1234567890],
947
+ "out_of_network_ids": [1234567890]
948
+ ...
949
+ },
950
+ {
951
+ ...
952
+ "id": "12345NY2345678",
953
+ "in_network_ids": [1234567890, 1234567890],
954
+ "out_of_network_ids": []
955
+ ...
956
+ }
957
+ ...
958
+ ]
959
+ }
960
+
961
+ Simply reference the `Provider` in question by its `id` for each `Plan` to see if that `Provider` is in-network for the `Plan`.
962
+
963
+ ### Matching by Plan ID
964
+ Given a `Provider`'s `id`, you can retrieve all of his or her `hios_ids`
965
+
966
+ For more details see the [endpoint documentation](#providers-providers-get)
967
+
968
+ ```
969
+ GET /providers/1234567890
970
+ {
971
+ "provider": {
972
+ ...
973
+ "hios_ids": [
974
+ ...
975
+ "12345NY1234567"
976
+ ...
977
+ ]
978
+ ...
979
+ }
980
+ }
981
+ ```
982
+
983
+ The returned `hios_ids` can be used to cross-reference a `Plan`
984
+
985
+ ### Matching by Network
986
+ Once you have an ID returned from the [`Network` search endpoint](#networks-networks-get), you can cross-reference it with the `network_ids` returned from both the [`Provider` search](#providers-providers-post) and [`Provider` details](#providers-providers-get) endpoints.
987
+
988
+ This is useful for large group data or when you are not dealing with `Plan`s directly, but rather at the `Network` level.
989
+
990
+
991
+ OpenAPI spec version: 1.0.0
992
+
993
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
994
+
995
+ Licensed under the Apache License, Version 2.0 (the "License");
996
+ you may not use this file except in compliance with the License.
997
+ You may obtain a copy of the License at
998
+
999
+ http://www.apache.org/licenses/LICENSE-2.0
1000
+
1001
+ Unless required by applicable law or agreed to in writing, software
1002
+ distributed under the License is distributed on an "AS IS" BASIS,
1003
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1004
+ See the License for the specific language governing permissions and
1005
+ limitations under the License.
1006
+
1007
+ =end
1008
+
1009
+ require 'date'
1010
+
1011
+ module VericredClient
1012
+
1013
+ class ACAPlan2018Bulk
1014
+ # True if plan covers abortion when there is no public funding available
1015
+ attr_accessor :abortion_rider
1016
+
1017
+ # Percentage of total average costs for covered benefits that a plan will cover.
1018
+ attr_accessor :actuarial_value
1019
+
1020
+ # Does the plan provide dental coverage for adults?
1021
+ attr_accessor :adult_dental
1022
+
1023
+ # True if the plan allows dependents up to age 29
1024
+ attr_accessor :age29_rider
1025
+
1026
+ # Benefits string for ambulance coverage
1027
+ attr_accessor :ambulance
1028
+
1029
+ # Link to the summary of benefits and coverage (SBC) document.
1030
+ attr_accessor :benefits_summary_url
1031
+
1032
+ # Link to a location to purchase the plan.
1033
+ attr_accessor :buy_link
1034
+
1035
+ # Most recent Disclaimer issued for this Plan
1036
+ attr_accessor :carrier_disclaimer
1037
+
1038
+ # Name of the insurance carrier
1039
+ attr_accessor :carrier_name
1040
+
1041
+ # Child Dental benefits string
1042
+ attr_accessor :child_dental
1043
+
1044
+ # Child eye exam benefits summary
1045
+ attr_accessor :child_eye_exam
1046
+
1047
+ # Child eyewear benefits summary
1048
+ attr_accessor :child_eyewear
1049
+
1050
+ # Chiropractic services benefits summary
1051
+ attr_accessor :chiropractic_services
1052
+
1053
+ # Standard cost share for most benefits
1054
+ attr_accessor :coinsurance
1055
+
1056
+ # Phone number to contact the insurance carrier
1057
+ attr_accessor :customer_service_phone_number
1058
+
1059
+ # Diagnostic tests benefit summary
1060
+ attr_accessor :diagnostic_test
1061
+
1062
+ # Alternate name for the Plan
1063
+ attr_accessor :display_name
1064
+
1065
+ # True if plan does not cover domestic partners
1066
+ attr_accessor :dp_rider
1067
+
1068
+ # Link to the summary of drug benefits for the plan
1069
+ attr_accessor :drug_formulary_url
1070
+
1071
+ # Benefits summary for durable medical equipment
1072
+ attr_accessor :durable_medical_equipment
1073
+
1074
+ # Effective date of coverage.
1075
+ attr_accessor :effective_date
1076
+
1077
+ # Is the individual deductible for each covered person, embedded in the family deductible
1078
+ attr_accessor :embedded_deductible
1079
+
1080
+ # Description of costs when visiting the ER
1081
+ attr_accessor :emergency_room
1082
+
1083
+ # Percentage of essential plan benefits
1084
+ attr_accessor :essential_health_benefits_percentage
1085
+
1086
+ # Expiration date of coverage.
1087
+ attr_accessor :expiration_date
1088
+
1089
+ # Deductible for drugs when a family is on the plan.
1090
+ attr_accessor :family_drug_deductible
1091
+
1092
+ # Maximum out-of-pocket for drugs when a family is on the plan
1093
+ attr_accessor :family_drug_moop
1094
+
1095
+ # Deductible when a family is on the plan
1096
+ attr_accessor :family_medical_deductible
1097
+
1098
+ # Maximum out-of-pocket when a family is on the plan
1099
+ attr_accessor :family_medical_moop
1100
+
1101
+ # True if plan does not cover family planning
1102
+ attr_accessor :fp_rider
1103
+
1104
+ # Does the plan's network require a physician referral?
1105
+ attr_accessor :gated
1106
+
1107
+ # Cost for generic drugs
1108
+ attr_accessor :generic_drugs
1109
+
1110
+ # Habilitation services benefits summary
1111
+ attr_accessor :habilitation_services
1112
+
1113
+ #
1114
+ attr_accessor :hios_issuer_id
1115
+
1116
+ # Home health care benefits summary
1117
+ attr_accessor :home_health_care
1118
+
1119
+ # Hospice service benefits summary
1120
+ attr_accessor :hospice_service
1121
+
1122
+ # Is the plan HSA eligible?
1123
+ attr_accessor :hsa_eligible
1124
+
1125
+ # Government-issued HIOS plan ID
1126
+ attr_accessor :id
1127
+
1128
+ # List of identifiers of this Plan
1129
+ attr_accessor :identifiers
1130
+
1131
+ # Benefits summary for imaging coverage
1132
+ attr_accessor :imaging
1133
+
1134
+ # Imaging center benefits summary
1135
+ attr_accessor :imaging_center
1136
+
1137
+ # Imaging physician benefits summary
1138
+ attr_accessor :imaging_physician
1139
+
1140
+ # Deductible for drugs when an individual is on the plan
1141
+ attr_accessor :individual_drug_deductible
1142
+
1143
+ # Maximum out-of-pocket for drugs when an individual is on the plan
1144
+ attr_accessor :individual_drug_moop
1145
+
1146
+ # Deductible when an individual is on the plan
1147
+ attr_accessor :individual_medical_deductible
1148
+
1149
+ # Maximum out-of-pocket when an individual is on the plan
1150
+ attr_accessor :individual_medical_moop
1151
+
1152
+ # True if plan covers infertility treatment
1153
+ attr_accessor :infertility_treatment_rider
1154
+
1155
+ # Inpatient birth benefits summary
1156
+ attr_accessor :inpatient_birth
1157
+
1158
+ # Description of the benefit for inpatient birth physician - this is called “Childbirth/delivery professional services” on an SBC
1159
+ attr_accessor :inpatient_birth_physician
1160
+
1161
+ # Cost under the plan for an inpatient facility
1162
+ attr_accessor :inpatient_facility
1163
+
1164
+ # Inpatient mental helath benefits summary
1165
+ attr_accessor :inpatient_mental_health
1166
+
1167
+ # Cost under the plan for an inpatient physician
1168
+ attr_accessor :inpatient_physician
1169
+
1170
+ # Inpatient substance abuse benefits summary
1171
+ attr_accessor :inpatient_substance
1172
+
1173
+ # Lab test benefits summary
1174
+ attr_accessor :lab_test
1175
+
1176
+ # Plan metal grouping (e.g. platinum, gold, silver, etc)
1177
+ attr_accessor :level
1178
+
1179
+ # Link to a copy of the insurance carrier's logo
1180
+ attr_accessor :logo_url
1181
+
1182
+ # Multiple of the standard Rx cost share for orders filled via mail order
1183
+ attr_accessor :mail_order_rx
1184
+
1185
+ # Marketing name of the plan
1186
+ attr_accessor :name
1187
+
1188
+ # List of Vericred-generated network_ids
1189
+ attr_accessor :network_ids
1190
+
1191
+ # Total number of Providers in network
1192
+ attr_accessor :network_size
1193
+
1194
+ # List of networks associated with the plan
1195
+ attr_accessor :networks
1196
+
1197
+ # Cost under the plan for non-preferred brand drugs
1198
+ attr_accessor :non_preferred_brand_drugs
1199
+
1200
+ # Non-preferred generic drugs benefits summary
1201
+ attr_accessor :nonpreferred_generic_drug_share
1202
+
1203
+ # Non-preferred specialty drugs benefits summary
1204
+ attr_accessor :nonpreferred_specialty_drug_share
1205
+
1206
+ # Is the plan off-market?
1207
+ attr_accessor :off_market
1208
+
1209
+ # Is the plan on-market?
1210
+ attr_accessor :on_market
1211
+
1212
+ # Does this plan provide any out of network coverage?
1213
+ attr_accessor :out_of_network_coverage
1214
+
1215
+ # Outpatient ambulatory care center benefits summary
1216
+ attr_accessor :outpatient_ambulatory_care_center
1217
+
1218
+ # Benefits summary for outpatient facility coverage
1219
+ attr_accessor :outpatient_facility
1220
+
1221
+ # Benefits summary for outpatient mental health coverage
1222
+ attr_accessor :outpatient_mental_health
1223
+
1224
+ # Benefits summary for outpatient physician coverage
1225
+ attr_accessor :outpatient_physician
1226
+
1227
+ # Outpatient substance abuse benefits summary
1228
+ attr_accessor :outpatient_substance
1229
+
1230
+ # A list of plan identifiers and years indicating the previous plans that the plan replaces
1231
+ attr_accessor :plan_ancestors
1232
+
1233
+ # Are deductibles and MOOPs reset on Dec-31 (\"calendar year\"), 365 day(s) after enrollment date (\"plan year\"), or are both options available (\"both\")?
1234
+ attr_accessor :plan_calendar
1235
+
1236
+ # The plan-level standard cost-share for substantially all benefits. It includes in-network, out-of-network, and tiers if applicable
1237
+ attr_accessor :plan_coinsurance
1238
+
1239
+ # Market in which the plan is offered (on_marketplace, shop, etc)
1240
+ attr_accessor :plan_market
1241
+
1242
+ # Category of the plan (e.g. EPO, HMO, PPO, POS, Indemnity, PACE, Medicare-Medicaid, HMO w/POS, Cost, FFS, MSA)
1243
+ attr_accessor :plan_type
1244
+
1245
+ # Post-natal care benefits summary
1246
+ attr_accessor :postnatal_care
1247
+
1248
+ # Cost under the plan for perferred brand drugs
1249
+ attr_accessor :preferred_brand_drugs
1250
+
1251
+ # Prenatal care benefits summary
1252
+ attr_accessor :prenatal_care
1253
+
1254
+ # Inpatient substance abuse benefits summary
1255
+ attr_accessor :prenatal_postnatal_care
1256
+
1257
+ # Benefits summary for preventative care
1258
+ attr_accessor :preventative_care
1259
+
1260
+ # Cost under the plan to visit a Primary Care Physician
1261
+ attr_accessor :primary_care_physician
1262
+
1263
+ # Benefits summary for rehabilitation services
1264
+ attr_accessor :rehabilitation_services
1265
+
1266
+ # Foreign key for service area
1267
+ attr_accessor :service_area_id
1268
+
1269
+ # Benefits summary for skilled nursing services
1270
+ attr_accessor :skilled_nursing
1271
+
1272
+ # Does the plan cover full-time, year-round, nursing facilities?
1273
+ attr_accessor :skilled_nursing_facility_365
1274
+
1275
+ # Source of the plan benefit data
1276
+ attr_accessor :source
1277
+
1278
+ # Cost under the plan to visit a specialist
1279
+ attr_accessor :specialist
1280
+
1281
+ # Cost under the plan for specialty drugs
1282
+ attr_accessor :specialty_drugs
1283
+
1284
+ # Indicates whether there is coverage for the remote delivery of medical benefits
1285
+ attr_accessor :telemedicine
1286
+
1287
+ # The type of the Plan
1288
+ attr_accessor :type
1289
+
1290
+ # Benefits summary for urgent care
1291
+ attr_accessor :urgent_care
1292
+
1293
+
1294
+ # Attribute mapping from ruby-style variable name to JSON key.
1295
+ def self.attribute_map
1296
+ {
1297
+ :'abortion_rider' => :'abortion_rider',
1298
+ :'actuarial_value' => :'actuarial_value',
1299
+ :'adult_dental' => :'adult_dental',
1300
+ :'age29_rider' => :'age29_rider',
1301
+ :'ambulance' => :'ambulance',
1302
+ :'benefits_summary_url' => :'benefits_summary_url',
1303
+ :'buy_link' => :'buy_link',
1304
+ :'carrier_disclaimer' => :'carrier_disclaimer',
1305
+ :'carrier_name' => :'carrier_name',
1306
+ :'child_dental' => :'child_dental',
1307
+ :'child_eye_exam' => :'child_eye_exam',
1308
+ :'child_eyewear' => :'child_eyewear',
1309
+ :'chiropractic_services' => :'chiropractic_services',
1310
+ :'coinsurance' => :'coinsurance',
1311
+ :'customer_service_phone_number' => :'customer_service_phone_number',
1312
+ :'diagnostic_test' => :'diagnostic_test',
1313
+ :'display_name' => :'display_name',
1314
+ :'dp_rider' => :'dp_rider',
1315
+ :'drug_formulary_url' => :'drug_formulary_url',
1316
+ :'durable_medical_equipment' => :'durable_medical_equipment',
1317
+ :'effective_date' => :'effective_date',
1318
+ :'embedded_deductible' => :'embedded_deductible',
1319
+ :'emergency_room' => :'emergency_room',
1320
+ :'essential_health_benefits_percentage' => :'essential_health_benefits_percentage',
1321
+ :'expiration_date' => :'expiration_date',
1322
+ :'family_drug_deductible' => :'family_drug_deductible',
1323
+ :'family_drug_moop' => :'family_drug_moop',
1324
+ :'family_medical_deductible' => :'family_medical_deductible',
1325
+ :'family_medical_moop' => :'family_medical_moop',
1326
+ :'fp_rider' => :'fp_rider',
1327
+ :'gated' => :'gated',
1328
+ :'generic_drugs' => :'generic_drugs',
1329
+ :'habilitation_services' => :'habilitation_services',
1330
+ :'hios_issuer_id' => :'hios_issuer_id',
1331
+ :'home_health_care' => :'home_health_care',
1332
+ :'hospice_service' => :'hospice_service',
1333
+ :'hsa_eligible' => :'hsa_eligible',
1334
+ :'id' => :'id',
1335
+ :'identifiers' => :'identifiers',
1336
+ :'imaging' => :'imaging',
1337
+ :'imaging_center' => :'imaging_center',
1338
+ :'imaging_physician' => :'imaging_physician',
1339
+ :'individual_drug_deductible' => :'individual_drug_deductible',
1340
+ :'individual_drug_moop' => :'individual_drug_moop',
1341
+ :'individual_medical_deductible' => :'individual_medical_deductible',
1342
+ :'individual_medical_moop' => :'individual_medical_moop',
1343
+ :'infertility_treatment_rider' => :'infertility_treatment_rider',
1344
+ :'inpatient_birth' => :'inpatient_birth',
1345
+ :'inpatient_birth_physician' => :'inpatient_birth_physician',
1346
+ :'inpatient_facility' => :'inpatient_facility',
1347
+ :'inpatient_mental_health' => :'inpatient_mental_health',
1348
+ :'inpatient_physician' => :'inpatient_physician',
1349
+ :'inpatient_substance' => :'inpatient_substance',
1350
+ :'lab_test' => :'lab_test',
1351
+ :'level' => :'level',
1352
+ :'logo_url' => :'logo_url',
1353
+ :'mail_order_rx' => :'mail_order_rx',
1354
+ :'name' => :'name',
1355
+ :'network_ids' => :'network_ids',
1356
+ :'network_size' => :'network_size',
1357
+ :'networks' => :'networks',
1358
+ :'non_preferred_brand_drugs' => :'non_preferred_brand_drugs',
1359
+ :'nonpreferred_generic_drug_share' => :'nonpreferred_generic_drug_share',
1360
+ :'nonpreferred_specialty_drug_share' => :'nonpreferred_specialty_drug_share',
1361
+ :'off_market' => :'off_market',
1362
+ :'on_market' => :'on_market',
1363
+ :'out_of_network_coverage' => :'out_of_network_coverage',
1364
+ :'outpatient_ambulatory_care_center' => :'outpatient_ambulatory_care_center',
1365
+ :'outpatient_facility' => :'outpatient_facility',
1366
+ :'outpatient_mental_health' => :'outpatient_mental_health',
1367
+ :'outpatient_physician' => :'outpatient_physician',
1368
+ :'outpatient_substance' => :'outpatient_substance',
1369
+ :'plan_ancestors' => :'plan_ancestors',
1370
+ :'plan_calendar' => :'plan_calendar',
1371
+ :'plan_coinsurance' => :'plan_coinsurance',
1372
+ :'plan_market' => :'plan_market',
1373
+ :'plan_type' => :'plan_type',
1374
+ :'postnatal_care' => :'postnatal_care',
1375
+ :'preferred_brand_drugs' => :'preferred_brand_drugs',
1376
+ :'prenatal_care' => :'prenatal_care',
1377
+ :'prenatal_postnatal_care' => :'prenatal_postnatal_care',
1378
+ :'preventative_care' => :'preventative_care',
1379
+ :'primary_care_physician' => :'primary_care_physician',
1380
+ :'rehabilitation_services' => :'rehabilitation_services',
1381
+ :'service_area_id' => :'service_area_id',
1382
+ :'skilled_nursing' => :'skilled_nursing',
1383
+ :'skilled_nursing_facility_365' => :'skilled_nursing_facility_365',
1384
+ :'source' => :'source',
1385
+ :'specialist' => :'specialist',
1386
+ :'specialty_drugs' => :'specialty_drugs',
1387
+ :'telemedicine' => :'telemedicine',
1388
+ :'type' => :'type',
1389
+ :'urgent_care' => :'urgent_care'
1390
+ }
1391
+ end
1392
+
1393
+ # Attribute type mapping.
1394
+ def self.swagger_types
1395
+ {
1396
+ :'abortion_rider' => :'BOOLEAN',
1397
+ :'actuarial_value' => :'Float',
1398
+ :'adult_dental' => :'BOOLEAN',
1399
+ :'age29_rider' => :'BOOLEAN',
1400
+ :'ambulance' => :'String',
1401
+ :'benefits_summary_url' => :'String',
1402
+ :'buy_link' => :'String',
1403
+ :'carrier_disclaimer' => :'String',
1404
+ :'carrier_name' => :'String',
1405
+ :'child_dental' => :'String',
1406
+ :'child_eye_exam' => :'String',
1407
+ :'child_eyewear' => :'String',
1408
+ :'chiropractic_services' => :'String',
1409
+ :'coinsurance' => :'Float',
1410
+ :'customer_service_phone_number' => :'String',
1411
+ :'diagnostic_test' => :'String',
1412
+ :'display_name' => :'String',
1413
+ :'dp_rider' => :'BOOLEAN',
1414
+ :'drug_formulary_url' => :'String',
1415
+ :'durable_medical_equipment' => :'String',
1416
+ :'effective_date' => :'String',
1417
+ :'embedded_deductible' => :'String',
1418
+ :'emergency_room' => :'String',
1419
+ :'essential_health_benefits_percentage' => :'Float',
1420
+ :'expiration_date' => :'String',
1421
+ :'family_drug_deductible' => :'String',
1422
+ :'family_drug_moop' => :'String',
1423
+ :'family_medical_deductible' => :'String',
1424
+ :'family_medical_moop' => :'String',
1425
+ :'fp_rider' => :'BOOLEAN',
1426
+ :'gated' => :'BOOLEAN',
1427
+ :'generic_drugs' => :'String',
1428
+ :'habilitation_services' => :'String',
1429
+ :'hios_issuer_id' => :'String',
1430
+ :'home_health_care' => :'String',
1431
+ :'hospice_service' => :'String',
1432
+ :'hsa_eligible' => :'BOOLEAN',
1433
+ :'id' => :'String',
1434
+ :'identifiers' => :'Array<PlanIdentifier>',
1435
+ :'imaging' => :'String',
1436
+ :'imaging_center' => :'String',
1437
+ :'imaging_physician' => :'String',
1438
+ :'individual_drug_deductible' => :'String',
1439
+ :'individual_drug_moop' => :'String',
1440
+ :'individual_medical_deductible' => :'String',
1441
+ :'individual_medical_moop' => :'String',
1442
+ :'infertility_treatment_rider' => :'BOOLEAN',
1443
+ :'inpatient_birth' => :'String',
1444
+ :'inpatient_birth_physician' => :'String',
1445
+ :'inpatient_facility' => :'String',
1446
+ :'inpatient_mental_health' => :'String',
1447
+ :'inpatient_physician' => :'String',
1448
+ :'inpatient_substance' => :'String',
1449
+ :'lab_test' => :'String',
1450
+ :'level' => :'String',
1451
+ :'logo_url' => :'String',
1452
+ :'mail_order_rx' => :'Float',
1453
+ :'name' => :'String',
1454
+ :'network_ids' => :'Array<Integer>',
1455
+ :'network_size' => :'Integer',
1456
+ :'networks' => :'Array<PlanNetwork>',
1457
+ :'non_preferred_brand_drugs' => :'String',
1458
+ :'nonpreferred_generic_drug_share' => :'String',
1459
+ :'nonpreferred_specialty_drug_share' => :'String',
1460
+ :'off_market' => :'BOOLEAN',
1461
+ :'on_market' => :'BOOLEAN',
1462
+ :'out_of_network_coverage' => :'BOOLEAN',
1463
+ :'outpatient_ambulatory_care_center' => :'String',
1464
+ :'outpatient_facility' => :'String',
1465
+ :'outpatient_mental_health' => :'String',
1466
+ :'outpatient_physician' => :'String',
1467
+ :'outpatient_substance' => :'String',
1468
+ :'plan_ancestors' => :'Array<PlanAncestor>',
1469
+ :'plan_calendar' => :'String',
1470
+ :'plan_coinsurance' => :'String',
1471
+ :'plan_market' => :'String',
1472
+ :'plan_type' => :'String',
1473
+ :'postnatal_care' => :'String',
1474
+ :'preferred_brand_drugs' => :'String',
1475
+ :'prenatal_care' => :'String',
1476
+ :'prenatal_postnatal_care' => :'String',
1477
+ :'preventative_care' => :'String',
1478
+ :'primary_care_physician' => :'String',
1479
+ :'rehabilitation_services' => :'String',
1480
+ :'service_area_id' => :'String',
1481
+ :'skilled_nursing' => :'String',
1482
+ :'skilled_nursing_facility_365' => :'String',
1483
+ :'source' => :'String',
1484
+ :'specialist' => :'String',
1485
+ :'specialty_drugs' => :'String',
1486
+ :'telemedicine' => :'String',
1487
+ :'type' => :'String',
1488
+ :'urgent_care' => :'String'
1489
+ }
1490
+ end
1491
+
1492
+ # Initializes the object
1493
+ # @param [Hash] attributes Model attributes in the form of hash
1494
+ def initialize(attributes = {})
1495
+ return unless attributes.is_a?(Hash)
1496
+
1497
+ # convert string to symbol for hash key
1498
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
1499
+
1500
+ if attributes.has_key?(:'abortion_rider')
1501
+ self.abortion_rider = attributes[:'abortion_rider']
1502
+ end
1503
+
1504
+ if attributes.has_key?(:'actuarial_value')
1505
+ self.actuarial_value = attributes[:'actuarial_value']
1506
+ end
1507
+
1508
+ if attributes.has_key?(:'adult_dental')
1509
+ self.adult_dental = attributes[:'adult_dental']
1510
+ end
1511
+
1512
+ if attributes.has_key?(:'age29_rider')
1513
+ self.age29_rider = attributes[:'age29_rider']
1514
+ end
1515
+
1516
+ if attributes.has_key?(:'ambulance')
1517
+ self.ambulance = attributes[:'ambulance']
1518
+ end
1519
+
1520
+ if attributes.has_key?(:'benefits_summary_url')
1521
+ self.benefits_summary_url = attributes[:'benefits_summary_url']
1522
+ end
1523
+
1524
+ if attributes.has_key?(:'buy_link')
1525
+ self.buy_link = attributes[:'buy_link']
1526
+ end
1527
+
1528
+ if attributes.has_key?(:'carrier_disclaimer')
1529
+ self.carrier_disclaimer = attributes[:'carrier_disclaimer']
1530
+ end
1531
+
1532
+ if attributes.has_key?(:'carrier_name')
1533
+ self.carrier_name = attributes[:'carrier_name']
1534
+ end
1535
+
1536
+ if attributes.has_key?(:'child_dental')
1537
+ self.child_dental = attributes[:'child_dental']
1538
+ end
1539
+
1540
+ if attributes.has_key?(:'child_eye_exam')
1541
+ self.child_eye_exam = attributes[:'child_eye_exam']
1542
+ end
1543
+
1544
+ if attributes.has_key?(:'child_eyewear')
1545
+ self.child_eyewear = attributes[:'child_eyewear']
1546
+ end
1547
+
1548
+ if attributes.has_key?(:'chiropractic_services')
1549
+ self.chiropractic_services = attributes[:'chiropractic_services']
1550
+ end
1551
+
1552
+ if attributes.has_key?(:'coinsurance')
1553
+ self.coinsurance = attributes[:'coinsurance']
1554
+ end
1555
+
1556
+ if attributes.has_key?(:'customer_service_phone_number')
1557
+ self.customer_service_phone_number = attributes[:'customer_service_phone_number']
1558
+ end
1559
+
1560
+ if attributes.has_key?(:'diagnostic_test')
1561
+ self.diagnostic_test = attributes[:'diagnostic_test']
1562
+ end
1563
+
1564
+ if attributes.has_key?(:'display_name')
1565
+ self.display_name = attributes[:'display_name']
1566
+ end
1567
+
1568
+ if attributes.has_key?(:'dp_rider')
1569
+ self.dp_rider = attributes[:'dp_rider']
1570
+ end
1571
+
1572
+ if attributes.has_key?(:'drug_formulary_url')
1573
+ self.drug_formulary_url = attributes[:'drug_formulary_url']
1574
+ end
1575
+
1576
+ if attributes.has_key?(:'durable_medical_equipment')
1577
+ self.durable_medical_equipment = attributes[:'durable_medical_equipment']
1578
+ end
1579
+
1580
+ if attributes.has_key?(:'effective_date')
1581
+ self.effective_date = attributes[:'effective_date']
1582
+ end
1583
+
1584
+ if attributes.has_key?(:'embedded_deductible')
1585
+ self.embedded_deductible = attributes[:'embedded_deductible']
1586
+ end
1587
+
1588
+ if attributes.has_key?(:'emergency_room')
1589
+ self.emergency_room = attributes[:'emergency_room']
1590
+ end
1591
+
1592
+ if attributes.has_key?(:'essential_health_benefits_percentage')
1593
+ self.essential_health_benefits_percentage = attributes[:'essential_health_benefits_percentage']
1594
+ end
1595
+
1596
+ if attributes.has_key?(:'expiration_date')
1597
+ self.expiration_date = attributes[:'expiration_date']
1598
+ end
1599
+
1600
+ if attributes.has_key?(:'family_drug_deductible')
1601
+ self.family_drug_deductible = attributes[:'family_drug_deductible']
1602
+ end
1603
+
1604
+ if attributes.has_key?(:'family_drug_moop')
1605
+ self.family_drug_moop = attributes[:'family_drug_moop']
1606
+ end
1607
+
1608
+ if attributes.has_key?(:'family_medical_deductible')
1609
+ self.family_medical_deductible = attributes[:'family_medical_deductible']
1610
+ end
1611
+
1612
+ if attributes.has_key?(:'family_medical_moop')
1613
+ self.family_medical_moop = attributes[:'family_medical_moop']
1614
+ end
1615
+
1616
+ if attributes.has_key?(:'fp_rider')
1617
+ self.fp_rider = attributes[:'fp_rider']
1618
+ end
1619
+
1620
+ if attributes.has_key?(:'gated')
1621
+ self.gated = attributes[:'gated']
1622
+ end
1623
+
1624
+ if attributes.has_key?(:'generic_drugs')
1625
+ self.generic_drugs = attributes[:'generic_drugs']
1626
+ end
1627
+
1628
+ if attributes.has_key?(:'habilitation_services')
1629
+ self.habilitation_services = attributes[:'habilitation_services']
1630
+ end
1631
+
1632
+ if attributes.has_key?(:'hios_issuer_id')
1633
+ self.hios_issuer_id = attributes[:'hios_issuer_id']
1634
+ end
1635
+
1636
+ if attributes.has_key?(:'home_health_care')
1637
+ self.home_health_care = attributes[:'home_health_care']
1638
+ end
1639
+
1640
+ if attributes.has_key?(:'hospice_service')
1641
+ self.hospice_service = attributes[:'hospice_service']
1642
+ end
1643
+
1644
+ if attributes.has_key?(:'hsa_eligible')
1645
+ self.hsa_eligible = attributes[:'hsa_eligible']
1646
+ end
1647
+
1648
+ if attributes.has_key?(:'id')
1649
+ self.id = attributes[:'id']
1650
+ end
1651
+
1652
+ if attributes.has_key?(:'identifiers')
1653
+ if (value = attributes[:'identifiers']).is_a?(Array)
1654
+ self.identifiers = value
1655
+ end
1656
+ end
1657
+
1658
+ if attributes.has_key?(:'imaging')
1659
+ self.imaging = attributes[:'imaging']
1660
+ end
1661
+
1662
+ if attributes.has_key?(:'imaging_center')
1663
+ self.imaging_center = attributes[:'imaging_center']
1664
+ end
1665
+
1666
+ if attributes.has_key?(:'imaging_physician')
1667
+ self.imaging_physician = attributes[:'imaging_physician']
1668
+ end
1669
+
1670
+ if attributes.has_key?(:'individual_drug_deductible')
1671
+ self.individual_drug_deductible = attributes[:'individual_drug_deductible']
1672
+ end
1673
+
1674
+ if attributes.has_key?(:'individual_drug_moop')
1675
+ self.individual_drug_moop = attributes[:'individual_drug_moop']
1676
+ end
1677
+
1678
+ if attributes.has_key?(:'individual_medical_deductible')
1679
+ self.individual_medical_deductible = attributes[:'individual_medical_deductible']
1680
+ end
1681
+
1682
+ if attributes.has_key?(:'individual_medical_moop')
1683
+ self.individual_medical_moop = attributes[:'individual_medical_moop']
1684
+ end
1685
+
1686
+ if attributes.has_key?(:'infertility_treatment_rider')
1687
+ self.infertility_treatment_rider = attributes[:'infertility_treatment_rider']
1688
+ end
1689
+
1690
+ if attributes.has_key?(:'inpatient_birth')
1691
+ self.inpatient_birth = attributes[:'inpatient_birth']
1692
+ end
1693
+
1694
+ if attributes.has_key?(:'inpatient_birth_physician')
1695
+ self.inpatient_birth_physician = attributes[:'inpatient_birth_physician']
1696
+ end
1697
+
1698
+ if attributes.has_key?(:'inpatient_facility')
1699
+ self.inpatient_facility = attributes[:'inpatient_facility']
1700
+ end
1701
+
1702
+ if attributes.has_key?(:'inpatient_mental_health')
1703
+ self.inpatient_mental_health = attributes[:'inpatient_mental_health']
1704
+ end
1705
+
1706
+ if attributes.has_key?(:'inpatient_physician')
1707
+ self.inpatient_physician = attributes[:'inpatient_physician']
1708
+ end
1709
+
1710
+ if attributes.has_key?(:'inpatient_substance')
1711
+ self.inpatient_substance = attributes[:'inpatient_substance']
1712
+ end
1713
+
1714
+ if attributes.has_key?(:'lab_test')
1715
+ self.lab_test = attributes[:'lab_test']
1716
+ end
1717
+
1718
+ if attributes.has_key?(:'level')
1719
+ self.level = attributes[:'level']
1720
+ end
1721
+
1722
+ if attributes.has_key?(:'logo_url')
1723
+ self.logo_url = attributes[:'logo_url']
1724
+ end
1725
+
1726
+ if attributes.has_key?(:'mail_order_rx')
1727
+ self.mail_order_rx = attributes[:'mail_order_rx']
1728
+ end
1729
+
1730
+ if attributes.has_key?(:'name')
1731
+ self.name = attributes[:'name']
1732
+ end
1733
+
1734
+ if attributes.has_key?(:'network_ids')
1735
+ if (value = attributes[:'network_ids']).is_a?(Array)
1736
+ self.network_ids = value
1737
+ end
1738
+ end
1739
+
1740
+ if attributes.has_key?(:'network_size')
1741
+ self.network_size = attributes[:'network_size']
1742
+ end
1743
+
1744
+ if attributes.has_key?(:'networks')
1745
+ if (value = attributes[:'networks']).is_a?(Array)
1746
+ self.networks = value
1747
+ end
1748
+ end
1749
+
1750
+ if attributes.has_key?(:'non_preferred_brand_drugs')
1751
+ self.non_preferred_brand_drugs = attributes[:'non_preferred_brand_drugs']
1752
+ end
1753
+
1754
+ if attributes.has_key?(:'nonpreferred_generic_drug_share')
1755
+ self.nonpreferred_generic_drug_share = attributes[:'nonpreferred_generic_drug_share']
1756
+ end
1757
+
1758
+ if attributes.has_key?(:'nonpreferred_specialty_drug_share')
1759
+ self.nonpreferred_specialty_drug_share = attributes[:'nonpreferred_specialty_drug_share']
1760
+ end
1761
+
1762
+ if attributes.has_key?(:'off_market')
1763
+ self.off_market = attributes[:'off_market']
1764
+ end
1765
+
1766
+ if attributes.has_key?(:'on_market')
1767
+ self.on_market = attributes[:'on_market']
1768
+ end
1769
+
1770
+ if attributes.has_key?(:'out_of_network_coverage')
1771
+ self.out_of_network_coverage = attributes[:'out_of_network_coverage']
1772
+ end
1773
+
1774
+ if attributes.has_key?(:'outpatient_ambulatory_care_center')
1775
+ self.outpatient_ambulatory_care_center = attributes[:'outpatient_ambulatory_care_center']
1776
+ end
1777
+
1778
+ if attributes.has_key?(:'outpatient_facility')
1779
+ self.outpatient_facility = attributes[:'outpatient_facility']
1780
+ end
1781
+
1782
+ if attributes.has_key?(:'outpatient_mental_health')
1783
+ self.outpatient_mental_health = attributes[:'outpatient_mental_health']
1784
+ end
1785
+
1786
+ if attributes.has_key?(:'outpatient_physician')
1787
+ self.outpatient_physician = attributes[:'outpatient_physician']
1788
+ end
1789
+
1790
+ if attributes.has_key?(:'outpatient_substance')
1791
+ self.outpatient_substance = attributes[:'outpatient_substance']
1792
+ end
1793
+
1794
+ if attributes.has_key?(:'plan_ancestors')
1795
+ if (value = attributes[:'plan_ancestors']).is_a?(Array)
1796
+ self.plan_ancestors = value
1797
+ end
1798
+ end
1799
+
1800
+ if attributes.has_key?(:'plan_calendar')
1801
+ self.plan_calendar = attributes[:'plan_calendar']
1802
+ end
1803
+
1804
+ if attributes.has_key?(:'plan_coinsurance')
1805
+ self.plan_coinsurance = attributes[:'plan_coinsurance']
1806
+ end
1807
+
1808
+ if attributes.has_key?(:'plan_market')
1809
+ self.plan_market = attributes[:'plan_market']
1810
+ end
1811
+
1812
+ if attributes.has_key?(:'plan_type')
1813
+ self.plan_type = attributes[:'plan_type']
1814
+ end
1815
+
1816
+ if attributes.has_key?(:'postnatal_care')
1817
+ self.postnatal_care = attributes[:'postnatal_care']
1818
+ end
1819
+
1820
+ if attributes.has_key?(:'preferred_brand_drugs')
1821
+ self.preferred_brand_drugs = attributes[:'preferred_brand_drugs']
1822
+ end
1823
+
1824
+ if attributes.has_key?(:'prenatal_care')
1825
+ self.prenatal_care = attributes[:'prenatal_care']
1826
+ end
1827
+
1828
+ if attributes.has_key?(:'prenatal_postnatal_care')
1829
+ self.prenatal_postnatal_care = attributes[:'prenatal_postnatal_care']
1830
+ end
1831
+
1832
+ if attributes.has_key?(:'preventative_care')
1833
+ self.preventative_care = attributes[:'preventative_care']
1834
+ end
1835
+
1836
+ if attributes.has_key?(:'primary_care_physician')
1837
+ self.primary_care_physician = attributes[:'primary_care_physician']
1838
+ end
1839
+
1840
+ if attributes.has_key?(:'rehabilitation_services')
1841
+ self.rehabilitation_services = attributes[:'rehabilitation_services']
1842
+ end
1843
+
1844
+ if attributes.has_key?(:'service_area_id')
1845
+ self.service_area_id = attributes[:'service_area_id']
1846
+ end
1847
+
1848
+ if attributes.has_key?(:'skilled_nursing')
1849
+ self.skilled_nursing = attributes[:'skilled_nursing']
1850
+ end
1851
+
1852
+ if attributes.has_key?(:'skilled_nursing_facility_365')
1853
+ self.skilled_nursing_facility_365 = attributes[:'skilled_nursing_facility_365']
1854
+ end
1855
+
1856
+ if attributes.has_key?(:'source')
1857
+ self.source = attributes[:'source']
1858
+ end
1859
+
1860
+ if attributes.has_key?(:'specialist')
1861
+ self.specialist = attributes[:'specialist']
1862
+ end
1863
+
1864
+ if attributes.has_key?(:'specialty_drugs')
1865
+ self.specialty_drugs = attributes[:'specialty_drugs']
1866
+ end
1867
+
1868
+ if attributes.has_key?(:'telemedicine')
1869
+ self.telemedicine = attributes[:'telemedicine']
1870
+ end
1871
+
1872
+ if attributes.has_key?(:'type')
1873
+ self.type = attributes[:'type']
1874
+ end
1875
+
1876
+ if attributes.has_key?(:'urgent_care')
1877
+ self.urgent_care = attributes[:'urgent_care']
1878
+ end
1879
+
1880
+ end
1881
+
1882
+ # Show invalid properties with the reasons. Usually used together with valid?
1883
+ # @return Array for valid properies with the reasons
1884
+ def list_invalid_properties
1885
+ invalid_properties = Array.new
1886
+ return invalid_properties
1887
+ end
1888
+
1889
+ # Check to see if the all the properties in the model are valid
1890
+ # @return true if the model is valid
1891
+ def valid?
1892
+ return true
1893
+ end
1894
+
1895
+ # Checks equality by comparing each attribute.
1896
+ # @param [Object] Object to be compared
1897
+ def ==(o)
1898
+ return true if self.equal?(o)
1899
+ self.class == o.class &&
1900
+ abortion_rider == o.abortion_rider &&
1901
+ actuarial_value == o.actuarial_value &&
1902
+ adult_dental == o.adult_dental &&
1903
+ age29_rider == o.age29_rider &&
1904
+ ambulance == o.ambulance &&
1905
+ benefits_summary_url == o.benefits_summary_url &&
1906
+ buy_link == o.buy_link &&
1907
+ carrier_disclaimer == o.carrier_disclaimer &&
1908
+ carrier_name == o.carrier_name &&
1909
+ child_dental == o.child_dental &&
1910
+ child_eye_exam == o.child_eye_exam &&
1911
+ child_eyewear == o.child_eyewear &&
1912
+ chiropractic_services == o.chiropractic_services &&
1913
+ coinsurance == o.coinsurance &&
1914
+ customer_service_phone_number == o.customer_service_phone_number &&
1915
+ diagnostic_test == o.diagnostic_test &&
1916
+ display_name == o.display_name &&
1917
+ dp_rider == o.dp_rider &&
1918
+ drug_formulary_url == o.drug_formulary_url &&
1919
+ durable_medical_equipment == o.durable_medical_equipment &&
1920
+ effective_date == o.effective_date &&
1921
+ embedded_deductible == o.embedded_deductible &&
1922
+ emergency_room == o.emergency_room &&
1923
+ essential_health_benefits_percentage == o.essential_health_benefits_percentage &&
1924
+ expiration_date == o.expiration_date &&
1925
+ family_drug_deductible == o.family_drug_deductible &&
1926
+ family_drug_moop == o.family_drug_moop &&
1927
+ family_medical_deductible == o.family_medical_deductible &&
1928
+ family_medical_moop == o.family_medical_moop &&
1929
+ fp_rider == o.fp_rider &&
1930
+ gated == o.gated &&
1931
+ generic_drugs == o.generic_drugs &&
1932
+ habilitation_services == o.habilitation_services &&
1933
+ hios_issuer_id == o.hios_issuer_id &&
1934
+ home_health_care == o.home_health_care &&
1935
+ hospice_service == o.hospice_service &&
1936
+ hsa_eligible == o.hsa_eligible &&
1937
+ id == o.id &&
1938
+ identifiers == o.identifiers &&
1939
+ imaging == o.imaging &&
1940
+ imaging_center == o.imaging_center &&
1941
+ imaging_physician == o.imaging_physician &&
1942
+ individual_drug_deductible == o.individual_drug_deductible &&
1943
+ individual_drug_moop == o.individual_drug_moop &&
1944
+ individual_medical_deductible == o.individual_medical_deductible &&
1945
+ individual_medical_moop == o.individual_medical_moop &&
1946
+ infertility_treatment_rider == o.infertility_treatment_rider &&
1947
+ inpatient_birth == o.inpatient_birth &&
1948
+ inpatient_birth_physician == o.inpatient_birth_physician &&
1949
+ inpatient_facility == o.inpatient_facility &&
1950
+ inpatient_mental_health == o.inpatient_mental_health &&
1951
+ inpatient_physician == o.inpatient_physician &&
1952
+ inpatient_substance == o.inpatient_substance &&
1953
+ lab_test == o.lab_test &&
1954
+ level == o.level &&
1955
+ logo_url == o.logo_url &&
1956
+ mail_order_rx == o.mail_order_rx &&
1957
+ name == o.name &&
1958
+ network_ids == o.network_ids &&
1959
+ network_size == o.network_size &&
1960
+ networks == o.networks &&
1961
+ non_preferred_brand_drugs == o.non_preferred_brand_drugs &&
1962
+ nonpreferred_generic_drug_share == o.nonpreferred_generic_drug_share &&
1963
+ nonpreferred_specialty_drug_share == o.nonpreferred_specialty_drug_share &&
1964
+ off_market == o.off_market &&
1965
+ on_market == o.on_market &&
1966
+ out_of_network_coverage == o.out_of_network_coverage &&
1967
+ outpatient_ambulatory_care_center == o.outpatient_ambulatory_care_center &&
1968
+ outpatient_facility == o.outpatient_facility &&
1969
+ outpatient_mental_health == o.outpatient_mental_health &&
1970
+ outpatient_physician == o.outpatient_physician &&
1971
+ outpatient_substance == o.outpatient_substance &&
1972
+ plan_ancestors == o.plan_ancestors &&
1973
+ plan_calendar == o.plan_calendar &&
1974
+ plan_coinsurance == o.plan_coinsurance &&
1975
+ plan_market == o.plan_market &&
1976
+ plan_type == o.plan_type &&
1977
+ postnatal_care == o.postnatal_care &&
1978
+ preferred_brand_drugs == o.preferred_brand_drugs &&
1979
+ prenatal_care == o.prenatal_care &&
1980
+ prenatal_postnatal_care == o.prenatal_postnatal_care &&
1981
+ preventative_care == o.preventative_care &&
1982
+ primary_care_physician == o.primary_care_physician &&
1983
+ rehabilitation_services == o.rehabilitation_services &&
1984
+ service_area_id == o.service_area_id &&
1985
+ skilled_nursing == o.skilled_nursing &&
1986
+ skilled_nursing_facility_365 == o.skilled_nursing_facility_365 &&
1987
+ source == o.source &&
1988
+ specialist == o.specialist &&
1989
+ specialty_drugs == o.specialty_drugs &&
1990
+ telemedicine == o.telemedicine &&
1991
+ type == o.type &&
1992
+ urgent_care == o.urgent_care
1993
+ end
1994
+
1995
+ # @see the `==` method
1996
+ # @param [Object] Object to be compared
1997
+ def eql?(o)
1998
+ self == o
1999
+ end
2000
+
2001
+ # Calculates hash code according to all attributes.
2002
+ # @return [Fixnum] Hash code
2003
+ def hash
2004
+ [abortion_rider, actuarial_value, adult_dental, age29_rider, ambulance, benefits_summary_url, buy_link, carrier_disclaimer, carrier_name, child_dental, child_eye_exam, child_eyewear, chiropractic_services, coinsurance, customer_service_phone_number, diagnostic_test, display_name, dp_rider, drug_formulary_url, durable_medical_equipment, effective_date, embedded_deductible, emergency_room, essential_health_benefits_percentage, expiration_date, family_drug_deductible, family_drug_moop, family_medical_deductible, family_medical_moop, fp_rider, gated, generic_drugs, habilitation_services, hios_issuer_id, home_health_care, hospice_service, hsa_eligible, id, identifiers, imaging, imaging_center, imaging_physician, individual_drug_deductible, individual_drug_moop, individual_medical_deductible, individual_medical_moop, infertility_treatment_rider, inpatient_birth, inpatient_birth_physician, inpatient_facility, inpatient_mental_health, inpatient_physician, inpatient_substance, lab_test, level, logo_url, mail_order_rx, name, network_ids, network_size, networks, non_preferred_brand_drugs, nonpreferred_generic_drug_share, nonpreferred_specialty_drug_share, off_market, on_market, out_of_network_coverage, outpatient_ambulatory_care_center, outpatient_facility, outpatient_mental_health, outpatient_physician, outpatient_substance, plan_ancestors, plan_calendar, plan_coinsurance, plan_market, plan_type, postnatal_care, preferred_brand_drugs, prenatal_care, prenatal_postnatal_care, preventative_care, primary_care_physician, rehabilitation_services, service_area_id, skilled_nursing, skilled_nursing_facility_365, source, specialist, specialty_drugs, telemedicine, type, urgent_care].hash
2005
+ end
2006
+
2007
+ # Builds the object from hash
2008
+ # @param [Hash] attributes Model attributes in the form of hash
2009
+ # @return [Object] Returns the model itself
2010
+ def build_from_hash(attributes)
2011
+ return nil unless attributes.is_a?(Hash)
2012
+ self.class.swagger_types.each_pair do |key, type|
2013
+ if type =~ /\AArray<(.*)>/i
2014
+ # check to ensure the input is an array given that the the attribute
2015
+ # is documented as an array but the input is not
2016
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
2017
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
2018
+ end
2019
+ elsif !attributes[self.class.attribute_map[key]].nil?
2020
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
2021
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
2022
+ end
2023
+
2024
+ self
2025
+ end
2026
+
2027
+ # Deserializes the data based on type
2028
+ # @param string type Data type
2029
+ # @param string value Value to be deserialized
2030
+ # @return [Object] Deserialized data
2031
+ def _deserialize(type, value)
2032
+ case type.to_sym
2033
+ when :DateTime
2034
+ DateTime.parse(value)
2035
+ when :Date
2036
+ Date.parse(value)
2037
+ when :String
2038
+ value.to_s
2039
+ when :Integer
2040
+ value.to_i
2041
+ when :Float
2042
+ value.to_f
2043
+ when :BOOLEAN
2044
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
2045
+ true
2046
+ else
2047
+ false
2048
+ end
2049
+ when :Object
2050
+ # generic object (usually a Hash), return directly
2051
+ value
2052
+ when /\AArray<(?<inner_type>.+)>\z/
2053
+ inner_type = Regexp.last_match[:inner_type]
2054
+ value.map { |v| _deserialize(inner_type, v) }
2055
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
2056
+ k_type = Regexp.last_match[:k_type]
2057
+ v_type = Regexp.last_match[:v_type]
2058
+ {}.tap do |hash|
2059
+ value.each do |k, v|
2060
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
2061
+ end
2062
+ end
2063
+ else # model
2064
+ temp_model = VericredClient.const_get(type).new
2065
+ temp_model.build_from_hash(value)
2066
+ end
2067
+ end
2068
+
2069
+ # Returns the string representation of the object
2070
+ # @return [String] String presentation of the object
2071
+ def to_s
2072
+ to_hash.to_s
2073
+ end
2074
+
2075
+ # to_body is an alias to to_hash (backward compatibility)
2076
+ # @return [Hash] Returns the object in the form of hash
2077
+ def to_body
2078
+ to_hash
2079
+ end
2080
+
2081
+ # Returns the object in the form of hash
2082
+ # @return [Hash] Returns the object in the form of hash
2083
+ def to_hash
2084
+ hash = {}
2085
+ self.class.attribute_map.each_pair do |attr, param|
2086
+ value = self.send(attr)
2087
+ next if value.nil?
2088
+ hash[param] = _to_hash(value)
2089
+ end
2090
+ hash
2091
+ end
2092
+
2093
+ # Outputs non-array value in the form of hash
2094
+ # For object, use to_hash. Otherwise, just return the value
2095
+ # @param [Object] value Any valid value
2096
+ # @return [Hash] Returns the value in the form of hash
2097
+ def _to_hash(value)
2098
+ if value.is_a?(Array)
2099
+ value.compact.map{ |v| _to_hash(v) }
2100
+ elsif value.is_a?(Hash)
2101
+ {}.tap do |hash|
2102
+ value.each { |k, v| hash[k] = _to_hash(v) }
2103
+ end
2104
+ elsif value.respond_to? :to_hash
2105
+ value.to_hash
2106
+ else
2107
+ value
2108
+ end
2109
+ end
2110
+
2111
+ end
2112
+
2113
+ end