vericred_client 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +225 -0
  3. data/docs/Applicant.md +14 -0
  4. data/docs/Carrier.md +10 -0
  5. data/docs/CarrierSubsidiary.md +9 -0
  6. data/docs/County.md +16 -0
  7. data/docs/Drug.md +10 -0
  8. data/docs/DrugCoverage.md +13 -0
  9. data/docs/DrugCoverageApi.md +60 -0
  10. data/docs/InlineResponse200.md +9 -0
  11. data/docs/InlineResponse2001.md +8 -0
  12. data/docs/InlineResponse2002.md +10 -0
  13. data/docs/Plan.md +53 -0
  14. data/docs/PlanCounty.md +10 -0
  15. data/docs/PlanSearchResult.md +54 -0
  16. data/docs/PlansApi.md +118 -0
  17. data/docs/Pricing.md +12 -0
  18. data/docs/Provider.md +31 -0
  19. data/docs/ProvidersApi.md +135 -0
  20. data/docs/Query.md +15 -0
  21. data/docs/RatingArea.md +9 -0
  22. data/docs/State.md +15 -0
  23. data/docs/ZipCode.md +9 -0
  24. data/docs/ZipCountiesApi.md +63 -0
  25. data/docs/ZipCounty.md +10 -0
  26. data/lib/vericred_client/api/drug_coverage_api.rb +201 -0
  27. data/lib/vericred_client/api/plans_api.rb +317 -0
  28. data/lib/vericred_client/api/providers_api.rb +303 -0
  29. data/lib/vericred_client/api/zip_counties_api.rb +208 -0
  30. data/lib/vericred_client/api_client.rb +474 -0
  31. data/lib/vericred_client/api_error.rb +149 -0
  32. data/lib/vericred_client/configuration.rb +163 -0
  33. data/lib/vericred_client/models/applicant.rb +358 -0
  34. data/lib/vericred_client/models/carrier.rb +318 -0
  35. data/lib/vericred_client/models/carrier_subsidiary.rb +308 -0
  36. data/lib/vericred_client/models/county.rb +360 -0
  37. data/lib/vericred_client/models/drug.rb +318 -0
  38. data/lib/vericred_client/models/drug_coverage.rb +348 -0
  39. data/lib/vericred_client/models/inline_response_200.rb +308 -0
  40. data/lib/vericred_client/models/inline_response_200_1.rb +297 -0
  41. data/lib/vericred_client/models/inline_response_200_2.rb +321 -0
  42. data/lib/vericred_client/models/plan.rb +748 -0
  43. data/lib/vericred_client/models/plan_county.rb +318 -0
  44. data/lib/vericred_client/models/plan_search_result.rb +758 -0
  45. data/lib/vericred_client/models/pricing.rb +338 -0
  46. data/lib/vericred_client/models/provider.rb +528 -0
  47. data/lib/vericred_client/models/query.rb +364 -0
  48. data/lib/vericred_client/models/rating_area.rb +308 -0
  49. data/lib/vericred_client/models/state.rb +368 -0
  50. data/lib/vericred_client/models/zip_code.rb +308 -0
  51. data/lib/vericred_client/models/zip_county.rb +318 -0
  52. data/lib/vericred_client/version.rb +128 -0
  53. data/lib/vericred_client.rb +175 -0
  54. data/spec/api/drug_coverage_api_spec.rb +168 -0
  55. data/spec/api/plans_api_spec.rb +226 -0
  56. data/spec/api/providers_api_spec.rb +202 -0
  57. data/spec/api/zip_counties_api_spec.rb +171 -0
  58. data/vericred_client.gemspec +31 -0
  59. metadata +285 -0
@@ -0,0 +1,758 @@
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://vericred.3scale.net/access_code?access_code=vericred&cms_token=3545ca52af07bde85b7c0c3aa9d1985e) 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
+ ## Authentication
17
+
18
+ To authenticate, pass the API Key you created in the Developer Portal as
19
+ a `Vericred-Api-Key` header.
20
+
21
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
22
+
23
+ ## Versioning
24
+
25
+ Vericred's API default to the latest version. However, if you need a specific
26
+ version, you can request it with an `Accept-Version` header.
27
+
28
+ The current version is `v3`. Previous versions are `v1` and `v2`.
29
+
30
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' -H 'Accept-Version: v2' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
31
+
32
+ ## Pagination
33
+
34
+ Most endpoints are not paginated. It will be noted in the documentation if/when
35
+ an endpoint is paginated.
36
+
37
+ When pagination is present, a `meta` stanza will be present in the response
38
+ with the total number of records
39
+
40
+ ```
41
+ {
42
+ things: [{ id: 1 }, { id: 2 }],
43
+ meta: { total: 500 }
44
+ }
45
+ ```
46
+
47
+ ## Sideloading
48
+
49
+ When we return multiple levels of an object graph (e.g. `Provider`s and their `State`s
50
+ we sideload the associated data. In this example, we would provide an Array of
51
+ `State`s and a `state_id` for each provider. This is done primarily to reduce the
52
+ payload size since many of the `Provider`s will share a `State`
53
+
54
+ ```
55
+ {
56
+ providers: [{ id: 1, state_id: 1}, { id: 2, state_id: 1 }],
57
+ states: [{ id: 1, code: 'NY' }]
58
+ }
59
+ ```
60
+
61
+ If you need the second level of the object graph, you can just match the
62
+ corresponding id.
63
+
64
+ ## Selecting specific data
65
+
66
+ All endpoints allow you to specify which fields you would like to return.
67
+ This allows you to limit the response to contain only the data you need.
68
+
69
+ For example, let's take a request that returns the following JSON by default
70
+
71
+ ```
72
+ {
73
+ provider: {
74
+ id: 1,
75
+ name: 'John',
76
+ phone: '1234567890',
77
+ field_we_dont_care_about: 'value_we_dont_care_about'
78
+ },
79
+ states: [{
80
+ id: 1,
81
+ name: 'New York',
82
+ code: 'NY',
83
+ field_we_dont_care_about: 'value_we_dont_care_about'
84
+ }]
85
+ }
86
+ ```
87
+
88
+ To limit our results to only return the fields we care about, we specify the
89
+ `select` query string parameter for the corresponding fields in the JSON
90
+ document.
91
+
92
+ In this case, we want to select `name` and `phone` from the `provider` key,
93
+ so we would add the parameters `select=provider.name,provider.phone`.
94
+ We also want the `name` and `code` from the `states` key, so we would
95
+ add the parameters `select=states.name,staes.code`. The id field of
96
+ each document is always returned whether or not it is requested.
97
+
98
+ Our final request would be `GET /providers/12345?select=provider.name,provider.phone,states.name,states.code`
99
+
100
+ The response would be
101
+
102
+ ```
103
+ {
104
+ provider: {
105
+ id: 1,
106
+ name: 'John',
107
+ phone: '1234567890'
108
+ },
109
+ states: [{
110
+ id: 1,
111
+ name: 'New York',
112
+ code: 'NY'
113
+ }]
114
+ }
115
+ ```
116
+
117
+
118
+
119
+ OpenAPI spec version:
120
+
121
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
122
+
123
+
124
+ =end
125
+
126
+ require 'date'
127
+
128
+ module VericredClient
129
+ class PlanSearchResult
130
+ # Does the plan provide dental coverage for adults?
131
+ attr_accessor :adult_dental
132
+
133
+ # Benefits string for ambulance coverage
134
+ attr_accessor :ambulance
135
+
136
+ # Link to the summary of benefits and coverage (SBC) document.
137
+ attr_accessor :benefits_summary_url
138
+
139
+ # Link to a location to purchase the plan.
140
+ attr_accessor :buy_link
141
+
142
+ # Name of the insurance carrier
143
+ attr_accessor :carrier_name
144
+
145
+ # Does the plan provide dental coverage for children?
146
+ attr_accessor :child_dental
147
+
148
+ # Child eyewear benefits summary
149
+ attr_accessor :child_eyewear
150
+
151
+ # Phone number to contact the insurance carrier
152
+ attr_accessor :customer_service_phone_number
153
+
154
+ # Benefits summary for durable medical equipment
155
+ attr_accessor :durable_medical_equipment
156
+
157
+ # Diagnostic tests benefit summary
158
+ attr_accessor :diagnostic_test
159
+
160
+ # Link to the summary of drug benefits for the plan
161
+ attr_accessor :drug_formulary_url
162
+
163
+ # Description of costs when visiting the ER
164
+ attr_accessor :emergency_room
165
+
166
+ # Deductible for drugs when a family is on the plan.
167
+ attr_accessor :family_drug_deductible
168
+
169
+ # Maximum out-of-pocket for drugs when a family is on the plan
170
+ attr_accessor :family_drug_moop
171
+
172
+ # Deductible when a family is on the plan
173
+ attr_accessor :family_medical_deductible
174
+
175
+ # Maximum out-of-pocket when a family is on the plan
176
+ attr_accessor :family_medical_moop
177
+
178
+ # Cost for generic drugs
179
+ attr_accessor :generic_drugs
180
+
181
+ #
182
+ attr_accessor :hios_issuer_id
183
+
184
+ # Government-issued HIOS plan ID
185
+ attr_accessor :id
186
+
187
+ # Benefits summary for imaging coverage
188
+ attr_accessor :imaging
189
+
190
+ # Deductible for drugs when an individual is on the plan
191
+ attr_accessor :individual_drug_deductible
192
+
193
+ # Maximum out-of-pocket for drugs when an individual is on the plan
194
+ attr_accessor :individual_drug_moop
195
+
196
+ # Deductible when an individual is on the plan
197
+ attr_accessor :individual_medical_deductible
198
+
199
+ # Maximum out-of-pocket when an individual is on the plan
200
+ attr_accessor :individual_medical_moop
201
+
202
+ # Cost under the plan for an inpatient facility
203
+ attr_accessor :inpatient_facility
204
+
205
+ # Cost under the plan for an inpatient physician
206
+ attr_accessor :inpatient_physician
207
+
208
+ # Plan metal grouping (e.g. platinum, gold, silver, etc)
209
+ attr_accessor :level
210
+
211
+ # Link to a copy of the insurance carrier's logo
212
+ attr_accessor :logo_url
213
+
214
+ # Marketing name of the plan
215
+ attr_accessor :name
216
+
217
+ # Cost under the plan for non-preferred brand drugs
218
+ attr_accessor :non_preferred_brand_drugs
219
+
220
+ # Is the plan on-market?
221
+ attr_accessor :on_market
222
+
223
+ # Is the plan off-market?
224
+ attr_accessor :off_market
225
+
226
+ # Does this plan provide any out of network coverage?
227
+ attr_accessor :out_of_network_coverage
228
+
229
+ # Benefits summary for outpatient facility coverage
230
+ attr_accessor :outpatient_facility
231
+
232
+ # Benefits summary for outpatient mental health coverage
233
+ attr_accessor :outpatient_mental_health
234
+
235
+ # Benefits summary for outpatient physician coverage
236
+ attr_accessor :outpatient_physician
237
+
238
+ # Market in which the plan is offered (on_marketplace, shop, etc)
239
+ attr_accessor :plan_market
240
+
241
+ # Category of the plan (e.g. EPO, HMO, PPO, POS, Indemnity)
242
+ attr_accessor :plan_type
243
+
244
+ # Cost under the plan for perferred brand drugs
245
+ attr_accessor :preferred_brand_drugs
246
+
247
+ # Benefits summary for preventative care
248
+ attr_accessor :preventative_care
249
+
250
+ # Cost under the plan to visit a Primary Care Physician
251
+ attr_accessor :primary_care_physician
252
+
253
+ # Benefits summary for rehabilitation services
254
+ attr_accessor :rehabilitation_services
255
+
256
+ # Cost under the plan to visit a specialist
257
+ attr_accessor :specialist
258
+
259
+ # Cost under the plan for specialty drugs
260
+ attr_accessor :specialty_drugs
261
+
262
+ # Benefits summary for urgent care
263
+ attr_accessor :urgent_care
264
+
265
+ # Percentage of doctors who matched this Plan
266
+ attr_accessor :match_percentage
267
+
268
+ # Percentage of employees with 100% match
269
+ attr_accessor :perfect_match_percentage
270
+
271
+ # Attribute mapping from ruby-style variable name to JSON key.
272
+ def self.attribute_map
273
+ {
274
+ :'adult_dental' => :'adult_dental',
275
+ :'ambulance' => :'ambulance',
276
+ :'benefits_summary_url' => :'benefits_summary_url',
277
+ :'buy_link' => :'buy_link',
278
+ :'carrier_name' => :'carrier_name',
279
+ :'child_dental' => :'child_dental',
280
+ :'child_eyewear' => :'child_eyewear',
281
+ :'customer_service_phone_number' => :'customer_service_phone_number',
282
+ :'durable_medical_equipment' => :'durable_medical_equipment',
283
+ :'diagnostic_test' => :'diagnostic_test',
284
+ :'drug_formulary_url' => :'drug_formulary_url',
285
+ :'emergency_room' => :'emergency_room',
286
+ :'family_drug_deductible' => :'family_drug_deductible',
287
+ :'family_drug_moop' => :'family_drug_moop',
288
+ :'family_medical_deductible' => :'family_medical_deductible',
289
+ :'family_medical_moop' => :'family_medical_moop',
290
+ :'generic_drugs' => :'generic_drugs',
291
+ :'hios_issuer_id' => :'hios_issuer_id',
292
+ :'id' => :'id',
293
+ :'imaging' => :'imaging',
294
+ :'individual_drug_deductible' => :'individual_drug_deductible',
295
+ :'individual_drug_moop' => :'individual_drug_moop',
296
+ :'individual_medical_deductible' => :'individual_medical_deductible',
297
+ :'individual_medical_moop' => :'individual_medical_moop',
298
+ :'inpatient_facility' => :'inpatient_facility',
299
+ :'inpatient_physician' => :'inpatient_physician',
300
+ :'level' => :'level',
301
+ :'logo_url' => :'logo_url',
302
+ :'name' => :'name',
303
+ :'non_preferred_brand_drugs' => :'non_preferred_brand_drugs',
304
+ :'on_market' => :'on_market',
305
+ :'off_market' => :'off_market',
306
+ :'out_of_network_coverage' => :'out_of_network_coverage',
307
+ :'outpatient_facility' => :'outpatient_facility',
308
+ :'outpatient_mental_health' => :'outpatient_mental_health',
309
+ :'outpatient_physician' => :'outpatient_physician',
310
+ :'plan_market' => :'plan_market',
311
+ :'plan_type' => :'plan_type',
312
+ :'preferred_brand_drugs' => :'preferred_brand_drugs',
313
+ :'preventative_care' => :'preventative_care',
314
+ :'primary_care_physician' => :'primary_care_physician',
315
+ :'rehabilitation_services' => :'rehabilitation_services',
316
+ :'specialist' => :'specialist',
317
+ :'specialty_drugs' => :'specialty_drugs',
318
+ :'urgent_care' => :'urgent_care',
319
+ :'match_percentage' => :'match_percentage',
320
+ :'perfect_match_percentage' => :'perfect_match_percentage'
321
+ }
322
+ end
323
+
324
+ # Attribute type mapping.
325
+ def self.swagger_types
326
+ {
327
+ :'adult_dental' => :'BOOLEAN',
328
+ :'ambulance' => :'String',
329
+ :'benefits_summary_url' => :'String',
330
+ :'buy_link' => :'String',
331
+ :'carrier_name' => :'String',
332
+ :'child_dental' => :'BOOLEAN',
333
+ :'child_eyewear' => :'String',
334
+ :'customer_service_phone_number' => :'String',
335
+ :'durable_medical_equipment' => :'String',
336
+ :'diagnostic_test' => :'String',
337
+ :'drug_formulary_url' => :'String',
338
+ :'emergency_room' => :'String',
339
+ :'family_drug_deductible' => :'String',
340
+ :'family_drug_moop' => :'String',
341
+ :'family_medical_deductible' => :'String',
342
+ :'family_medical_moop' => :'String',
343
+ :'generic_drugs' => :'String',
344
+ :'hios_issuer_id' => :'String',
345
+ :'id' => :'String',
346
+ :'imaging' => :'String',
347
+ :'individual_drug_deductible' => :'String',
348
+ :'individual_drug_moop' => :'String',
349
+ :'individual_medical_deductible' => :'String',
350
+ :'individual_medical_moop' => :'String',
351
+ :'inpatient_facility' => :'String',
352
+ :'inpatient_physician' => :'String',
353
+ :'level' => :'String',
354
+ :'logo_url' => :'String',
355
+ :'name' => :'String',
356
+ :'non_preferred_brand_drugs' => :'String',
357
+ :'on_market' => :'BOOLEAN',
358
+ :'off_market' => :'BOOLEAN',
359
+ :'out_of_network_coverage' => :'BOOLEAN',
360
+ :'outpatient_facility' => :'String',
361
+ :'outpatient_mental_health' => :'String',
362
+ :'outpatient_physician' => :'String',
363
+ :'plan_market' => :'String',
364
+ :'plan_type' => :'String',
365
+ :'preferred_brand_drugs' => :'String',
366
+ :'preventative_care' => :'String',
367
+ :'primary_care_physician' => :'String',
368
+ :'rehabilitation_services' => :'String',
369
+ :'specialist' => :'String',
370
+ :'specialty_drugs' => :'String',
371
+ :'urgent_care' => :'String',
372
+ :'match_percentage' => :'Integer',
373
+ :'perfect_match_percentage' => :'Integer'
374
+ }
375
+ end
376
+
377
+ # Initializes the object
378
+ # @param [Hash] attributes Model attributes in the form of hash
379
+ def initialize(attributes = {})
380
+ return unless attributes.is_a?(Hash)
381
+
382
+ # convert string to symbol for hash key
383
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
384
+
385
+ if attributes.has_key?(:'adult_dental')
386
+ self.adult_dental = attributes[:'adult_dental']
387
+ end
388
+
389
+ if attributes.has_key?(:'ambulance')
390
+ self.ambulance = attributes[:'ambulance']
391
+ end
392
+
393
+ if attributes.has_key?(:'benefits_summary_url')
394
+ self.benefits_summary_url = attributes[:'benefits_summary_url']
395
+ end
396
+
397
+ if attributes.has_key?(:'buy_link')
398
+ self.buy_link = attributes[:'buy_link']
399
+ end
400
+
401
+ if attributes.has_key?(:'carrier_name')
402
+ self.carrier_name = attributes[:'carrier_name']
403
+ end
404
+
405
+ if attributes.has_key?(:'child_dental')
406
+ self.child_dental = attributes[:'child_dental']
407
+ end
408
+
409
+ if attributes.has_key?(:'child_eyewear')
410
+ self.child_eyewear = attributes[:'child_eyewear']
411
+ end
412
+
413
+ if attributes.has_key?(:'customer_service_phone_number')
414
+ self.customer_service_phone_number = attributes[:'customer_service_phone_number']
415
+ end
416
+
417
+ if attributes.has_key?(:'durable_medical_equipment')
418
+ self.durable_medical_equipment = attributes[:'durable_medical_equipment']
419
+ end
420
+
421
+ if attributes.has_key?(:'diagnostic_test')
422
+ self.diagnostic_test = attributes[:'diagnostic_test']
423
+ end
424
+
425
+ if attributes.has_key?(:'drug_formulary_url')
426
+ self.drug_formulary_url = attributes[:'drug_formulary_url']
427
+ end
428
+
429
+ if attributes.has_key?(:'emergency_room')
430
+ self.emergency_room = attributes[:'emergency_room']
431
+ end
432
+
433
+ if attributes.has_key?(:'family_drug_deductible')
434
+ self.family_drug_deductible = attributes[:'family_drug_deductible']
435
+ end
436
+
437
+ if attributes.has_key?(:'family_drug_moop')
438
+ self.family_drug_moop = attributes[:'family_drug_moop']
439
+ end
440
+
441
+ if attributes.has_key?(:'family_medical_deductible')
442
+ self.family_medical_deductible = attributes[:'family_medical_deductible']
443
+ end
444
+
445
+ if attributes.has_key?(:'family_medical_moop')
446
+ self.family_medical_moop = attributes[:'family_medical_moop']
447
+ end
448
+
449
+ if attributes.has_key?(:'generic_drugs')
450
+ self.generic_drugs = attributes[:'generic_drugs']
451
+ end
452
+
453
+ if attributes.has_key?(:'hios_issuer_id')
454
+ self.hios_issuer_id = attributes[:'hios_issuer_id']
455
+ end
456
+
457
+ if attributes.has_key?(:'id')
458
+ self.id = attributes[:'id']
459
+ end
460
+
461
+ if attributes.has_key?(:'imaging')
462
+ self.imaging = attributes[:'imaging']
463
+ end
464
+
465
+ if attributes.has_key?(:'individual_drug_deductible')
466
+ self.individual_drug_deductible = attributes[:'individual_drug_deductible']
467
+ end
468
+
469
+ if attributes.has_key?(:'individual_drug_moop')
470
+ self.individual_drug_moop = attributes[:'individual_drug_moop']
471
+ end
472
+
473
+ if attributes.has_key?(:'individual_medical_deductible')
474
+ self.individual_medical_deductible = attributes[:'individual_medical_deductible']
475
+ end
476
+
477
+ if attributes.has_key?(:'individual_medical_moop')
478
+ self.individual_medical_moop = attributes[:'individual_medical_moop']
479
+ end
480
+
481
+ if attributes.has_key?(:'inpatient_facility')
482
+ self.inpatient_facility = attributes[:'inpatient_facility']
483
+ end
484
+
485
+ if attributes.has_key?(:'inpatient_physician')
486
+ self.inpatient_physician = attributes[:'inpatient_physician']
487
+ end
488
+
489
+ if attributes.has_key?(:'level')
490
+ self.level = attributes[:'level']
491
+ end
492
+
493
+ if attributes.has_key?(:'logo_url')
494
+ self.logo_url = attributes[:'logo_url']
495
+ end
496
+
497
+ if attributes.has_key?(:'name')
498
+ self.name = attributes[:'name']
499
+ end
500
+
501
+ if attributes.has_key?(:'non_preferred_brand_drugs')
502
+ self.non_preferred_brand_drugs = attributes[:'non_preferred_brand_drugs']
503
+ end
504
+
505
+ if attributes.has_key?(:'on_market')
506
+ self.on_market = attributes[:'on_market']
507
+ end
508
+
509
+ if attributes.has_key?(:'off_market')
510
+ self.off_market = attributes[:'off_market']
511
+ end
512
+
513
+ if attributes.has_key?(:'out_of_network_coverage')
514
+ self.out_of_network_coverage = attributes[:'out_of_network_coverage']
515
+ end
516
+
517
+ if attributes.has_key?(:'outpatient_facility')
518
+ self.outpatient_facility = attributes[:'outpatient_facility']
519
+ end
520
+
521
+ if attributes.has_key?(:'outpatient_mental_health')
522
+ self.outpatient_mental_health = attributes[:'outpatient_mental_health']
523
+ end
524
+
525
+ if attributes.has_key?(:'outpatient_physician')
526
+ self.outpatient_physician = attributes[:'outpatient_physician']
527
+ end
528
+
529
+ if attributes.has_key?(:'plan_market')
530
+ self.plan_market = attributes[:'plan_market']
531
+ end
532
+
533
+ if attributes.has_key?(:'plan_type')
534
+ self.plan_type = attributes[:'plan_type']
535
+ end
536
+
537
+ if attributes.has_key?(:'preferred_brand_drugs')
538
+ self.preferred_brand_drugs = attributes[:'preferred_brand_drugs']
539
+ end
540
+
541
+ if attributes.has_key?(:'preventative_care')
542
+ self.preventative_care = attributes[:'preventative_care']
543
+ end
544
+
545
+ if attributes.has_key?(:'primary_care_physician')
546
+ self.primary_care_physician = attributes[:'primary_care_physician']
547
+ end
548
+
549
+ if attributes.has_key?(:'rehabilitation_services')
550
+ self.rehabilitation_services = attributes[:'rehabilitation_services']
551
+ end
552
+
553
+ if attributes.has_key?(:'specialist')
554
+ self.specialist = attributes[:'specialist']
555
+ end
556
+
557
+ if attributes.has_key?(:'specialty_drugs')
558
+ self.specialty_drugs = attributes[:'specialty_drugs']
559
+ end
560
+
561
+ if attributes.has_key?(:'urgent_care')
562
+ self.urgent_care = attributes[:'urgent_care']
563
+ end
564
+
565
+ if attributes.has_key?(:'match_percentage')
566
+ self.match_percentage = attributes[:'match_percentage']
567
+ end
568
+
569
+ if attributes.has_key?(:'perfect_match_percentage')
570
+ self.perfect_match_percentage = attributes[:'perfect_match_percentage']
571
+ end
572
+
573
+ end
574
+
575
+ # Show invalid properties with the reasons. Usually used together with valid?
576
+ # @return Array for valid properies with the reasons
577
+ def list_invalid_properties
578
+ invalid_properties = Array.new
579
+ return invalid_properties
580
+ end
581
+
582
+ # Check to see if the all the properties in the model are valid
583
+ # @return true if the model is valid
584
+ def valid?
585
+ end
586
+
587
+ # Checks equality by comparing each attribute.
588
+ # @param [Object] Object to be compared
589
+ def ==(o)
590
+ return true if self.equal?(o)
591
+ self.class == o.class &&
592
+ adult_dental == o.adult_dental &&
593
+ ambulance == o.ambulance &&
594
+ benefits_summary_url == o.benefits_summary_url &&
595
+ buy_link == o.buy_link &&
596
+ carrier_name == o.carrier_name &&
597
+ child_dental == o.child_dental &&
598
+ child_eyewear == o.child_eyewear &&
599
+ customer_service_phone_number == o.customer_service_phone_number &&
600
+ durable_medical_equipment == o.durable_medical_equipment &&
601
+ diagnostic_test == o.diagnostic_test &&
602
+ drug_formulary_url == o.drug_formulary_url &&
603
+ emergency_room == o.emergency_room &&
604
+ family_drug_deductible == o.family_drug_deductible &&
605
+ family_drug_moop == o.family_drug_moop &&
606
+ family_medical_deductible == o.family_medical_deductible &&
607
+ family_medical_moop == o.family_medical_moop &&
608
+ generic_drugs == o.generic_drugs &&
609
+ hios_issuer_id == o.hios_issuer_id &&
610
+ id == o.id &&
611
+ imaging == o.imaging &&
612
+ individual_drug_deductible == o.individual_drug_deductible &&
613
+ individual_drug_moop == o.individual_drug_moop &&
614
+ individual_medical_deductible == o.individual_medical_deductible &&
615
+ individual_medical_moop == o.individual_medical_moop &&
616
+ inpatient_facility == o.inpatient_facility &&
617
+ inpatient_physician == o.inpatient_physician &&
618
+ level == o.level &&
619
+ logo_url == o.logo_url &&
620
+ name == o.name &&
621
+ non_preferred_brand_drugs == o.non_preferred_brand_drugs &&
622
+ on_market == o.on_market &&
623
+ off_market == o.off_market &&
624
+ out_of_network_coverage == o.out_of_network_coverage &&
625
+ outpatient_facility == o.outpatient_facility &&
626
+ outpatient_mental_health == o.outpatient_mental_health &&
627
+ outpatient_physician == o.outpatient_physician &&
628
+ plan_market == o.plan_market &&
629
+ plan_type == o.plan_type &&
630
+ preferred_brand_drugs == o.preferred_brand_drugs &&
631
+ preventative_care == o.preventative_care &&
632
+ primary_care_physician == o.primary_care_physician &&
633
+ rehabilitation_services == o.rehabilitation_services &&
634
+ specialist == o.specialist &&
635
+ specialty_drugs == o.specialty_drugs &&
636
+ urgent_care == o.urgent_care &&
637
+ match_percentage == o.match_percentage &&
638
+ perfect_match_percentage == o.perfect_match_percentage
639
+ end
640
+
641
+ # @see the `==` method
642
+ # @param [Object] Object to be compared
643
+ def eql?(o)
644
+ self == o
645
+ end
646
+
647
+ # Calculates hash code according to all attributes.
648
+ # @return [Fixnum] Hash code
649
+ def hash
650
+ [adult_dental, ambulance, benefits_summary_url, buy_link, carrier_name, child_dental, child_eyewear, customer_service_phone_number, durable_medical_equipment, diagnostic_test, drug_formulary_url, emergency_room, family_drug_deductible, family_drug_moop, family_medical_deductible, family_medical_moop, generic_drugs, hios_issuer_id, id, imaging, individual_drug_deductible, individual_drug_moop, individual_medical_deductible, individual_medical_moop, inpatient_facility, inpatient_physician, level, logo_url, name, non_preferred_brand_drugs, on_market, off_market, out_of_network_coverage, outpatient_facility, outpatient_mental_health, outpatient_physician, plan_market, plan_type, preferred_brand_drugs, preventative_care, primary_care_physician, rehabilitation_services, specialist, specialty_drugs, urgent_care, match_percentage, perfect_match_percentage].hash
651
+ end
652
+
653
+ # Builds the object from hash
654
+ # @param [Hash] attributes Model attributes in the form of hash
655
+ # @return [Object] Returns the model itself
656
+ def build_from_hash(attributes)
657
+ return nil unless attributes.is_a?(Hash)
658
+ self.class.swagger_types.each_pair do |key, type|
659
+ if type =~ /^Array<(.*)>/i
660
+ # check to ensure the input is an array given that the the attribute
661
+ # is documented as an array but the input is not
662
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
663
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
664
+ end
665
+ elsif !attributes[self.class.attribute_map[key]].nil?
666
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
667
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
668
+ end
669
+
670
+ self
671
+ end
672
+
673
+ # Deserializes the data based on type
674
+ # @param string type Data type
675
+ # @param string value Value to be deserialized
676
+ # @return [Object] Deserialized data
677
+ def _deserialize(type, value)
678
+ case type.to_sym
679
+ when :DateTime
680
+ DateTime.parse(value)
681
+ when :Date
682
+ Date.parse(value)
683
+ when :String
684
+ value.to_s
685
+ when :Integer
686
+ value.to_i
687
+ when :Float
688
+ value.to_f
689
+ when :BOOLEAN
690
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
691
+ true
692
+ else
693
+ false
694
+ end
695
+ when :Object
696
+ # generic object (usually a Hash), return directly
697
+ value
698
+ when /\AArray<(?<inner_type>.+)>\z/
699
+ inner_type = Regexp.last_match[:inner_type]
700
+ value.map { |v| _deserialize(inner_type, v) }
701
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
702
+ k_type = Regexp.last_match[:k_type]
703
+ v_type = Regexp.last_match[:v_type]
704
+ {}.tap do |hash|
705
+ value.each do |k, v|
706
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
707
+ end
708
+ end
709
+ else # model
710
+ temp_model = VericredClient.const_get(type).new
711
+ temp_model.build_from_hash(value)
712
+ end
713
+ end
714
+
715
+ # Returns the string representation of the object
716
+ # @return [String] String presentation of the object
717
+ def to_s
718
+ to_hash.to_s
719
+ end
720
+
721
+ # to_body is an alias to to_hash (backward compatibility)
722
+ # @return [Hash] Returns the object in the form of hash
723
+ def to_body
724
+ to_hash
725
+ end
726
+
727
+ # Returns the object in the form of hash
728
+ # @return [Hash] Returns the object in the form of hash
729
+ def to_hash
730
+ hash = {}
731
+ self.class.attribute_map.each_pair do |attr, param|
732
+ value = self.send(attr)
733
+ next if value.nil?
734
+ hash[param] = _to_hash(value)
735
+ end
736
+ hash
737
+ end
738
+
739
+ # Outputs non-array value in the form of hash
740
+ # For object, use to_hash. Otherwise, just return the value
741
+ # @param [Object] value Any valid value
742
+ # @return [Hash] Returns the value in the form of hash
743
+ def _to_hash(value)
744
+ if value.is_a?(Array)
745
+ value.compact.map{ |v| _to_hash(v) }
746
+ elsif value.is_a?(Hash)
747
+ {}.tap do |hash|
748
+ value.each { |k, v| hash[k] = _to_hash(v) }
749
+ end
750
+ elsif value.respond_to? :to_hash
751
+ value.to_hash
752
+ else
753
+ value
754
+ end
755
+ end
756
+
757
+ end
758
+ end