vericred_client 0.0.9 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +116 -13
  3. data/docs/Base.md +1 -1
  4. data/docs/Drug.md +1 -0
  5. data/docs/DrugCoverage.md +2 -1
  6. data/docs/DrugCoverageResponse.md +1 -1
  7. data/docs/DrugCoveragesApi.md +69 -0
  8. data/docs/DrugPackage.md +1 -0
  9. data/docs/DrugPackagesApi.md +66 -0
  10. data/docs/DrugSearchResponse.md +1 -1
  11. data/docs/DrugsApi.md +0 -61
  12. data/docs/Formulary.md +9 -0
  13. data/docs/FormularyDrugPackageResponse.md +10 -0
  14. data/docs/FormularyResponse.md +9 -0
  15. data/docs/Network.md +1 -1
  16. data/docs/NetworkDetails.md +10 -0
  17. data/docs/NetworkDetailsResponse.md +8 -0
  18. data/docs/NetworkSearchResponse.md +1 -1
  19. data/docs/NetworkSize.md +10 -0
  20. data/docs/NetworkSizesApi.md +124 -0
  21. data/docs/NetworksApi.md +55 -0
  22. data/docs/Plan.md +6 -4
  23. data/docs/PlanSearchResponse.md +2 -2
  24. data/docs/PlanSearchResponseMeta.md +9 -0
  25. data/docs/PlanSearchResult.md +6 -4
  26. data/docs/PlansApi.md +12 -10
  27. data/docs/Provider.md +1 -6
  28. data/docs/ProviderDetails.md +31 -0
  29. data/docs/ProviderGeocode.md +10 -0
  30. data/docs/ProvidersApi.md +61 -7
  31. data/docs/ProvidersGeocodeResponse.md +9 -0
  32. data/docs/ProvidersSearchResponse.md +1 -1
  33. data/docs/RequestPlanFindApplicant.md +2 -0
  34. data/docs/RequestPlanFindDrugPackage.md +1 -0
  35. data/docs/RequestProvidersSearch.md +5 -2
  36. data/docs/StateNetworkSizeRequest.md +9 -0
  37. data/docs/StateNetworkSizeResponse.md +9 -0
  38. data/docs/ZipCountiesApi.md +56 -1
  39. data/lib/vericred_client.rb +103 -2
  40. data/lib/vericred_client/api/drug_coverages_api.rb +295 -0
  41. data/lib/vericred_client/api/drug_packages_api.rb +289 -0
  42. data/lib/vericred_client/api/drugs_api.rb +88 -68
  43. data/lib/vericred_client/api/network_sizes_api.rb +348 -0
  44. data/lib/vericred_client/api/networks_api.rb +145 -1
  45. data/lib/vericred_client/api/plans_api.rb +108 -15
  46. data/lib/vericred_client/api/providers_api.rb +155 -9
  47. data/lib/vericred_client/api/zip_counties_api.rb +148 -4
  48. data/lib/vericred_client/api_client.rb +110 -21
  49. data/lib/vericred_client/api_error.rb +88 -1
  50. data/lib/vericred_client/configuration.rb +88 -1
  51. data/lib/vericred_client/models/applicant.rb +90 -3
  52. data/lib/vericred_client/models/base.rb +91 -4
  53. data/lib/vericred_client/models/carrier.rb +90 -3
  54. data/lib/vericred_client/models/carrier_subsidiary.rb +90 -3
  55. data/lib/vericred_client/models/county.rb +90 -3
  56. data/lib/vericred_client/models/county_bulk.rb +90 -3
  57. data/lib/vericred_client/models/drug.rb +101 -4
  58. data/lib/vericred_client/models/drug_coverage.rb +111 -14
  59. data/lib/vericred_client/models/drug_coverage_response.rb +91 -4
  60. data/lib/vericred_client/models/drug_package.rb +104 -7
  61. data/lib/vericred_client/models/drug_search_response.rb +91 -4
  62. data/lib/vericred_client/models/formulary.rb +404 -0
  63. data/lib/vericred_client/models/formulary_drug_package_response.rb +414 -0
  64. data/lib/vericred_client/models/formulary_response.rb +406 -0
  65. data/lib/vericred_client/models/meta.rb +90 -3
  66. data/lib/vericred_client/models/network.rb +91 -4
  67. data/lib/vericred_client/models/network_details.rb +416 -0
  68. data/lib/vericred_client/models/{pricing.rb → network_details_response.rb} +99 -112
  69. data/lib/vericred_client/models/network_search_response.rb +91 -4
  70. data/lib/vericred_client/models/network_size.rb +414 -0
  71. data/lib/vericred_client/models/plan.rb +115 -8
  72. data/lib/vericred_client/models/plan_county.rb +90 -3
  73. data/lib/vericred_client/models/plan_county_bulk.rb +90 -3
  74. data/lib/vericred_client/models/plan_search_response.rb +93 -6
  75. data/lib/vericred_client/models/plan_search_response_meta.rb +404 -0
  76. data/lib/vericred_client/models/plan_search_result.rb +115 -8
  77. data/lib/vericred_client/models/plan_show_response.rb +90 -3
  78. data/lib/vericred_client/models/provider.rb +101 -66
  79. data/lib/vericred_client/models/provider_details.rb +628 -0
  80. data/lib/vericred_client/models/provider_geocode.rb +414 -0
  81. data/lib/vericred_client/models/provider_show_response.rb +90 -3
  82. data/lib/vericred_client/models/providers_geocode_response.rb +406 -0
  83. data/lib/vericred_client/models/providers_search_response.rb +91 -4
  84. data/lib/vericred_client/models/rating_area.rb +90 -3
  85. data/lib/vericred_client/models/request_plan_find.rb +90 -3
  86. data/lib/vericred_client/models/request_plan_find_applicant.rb +114 -7
  87. data/lib/vericred_client/models/request_plan_find_drug_package.rb +104 -7
  88. data/lib/vericred_client/models/request_plan_find_provider.rb +90 -3
  89. data/lib/vericred_client/models/request_providers_search.rb +143 -26
  90. data/lib/vericred_client/models/service_area.rb +90 -3
  91. data/lib/vericred_client/models/service_area_zip_county.rb +90 -3
  92. data/lib/vericred_client/models/state.rb +90 -3
  93. data/lib/vericred_client/models/state_network_size_request.rb +408 -0
  94. data/lib/vericred_client/models/state_network_size_response.rb +406 -0
  95. data/lib/vericred_client/models/zip_code.rb +90 -3
  96. data/lib/vericred_client/models/zip_counties_response.rb +90 -3
  97. data/lib/vericred_client/models/zip_county.rb +90 -3
  98. data/lib/vericred_client/models/zip_county_bulk.rb +90 -3
  99. data/lib/vericred_client/models/zip_county_response.rb +90 -3
  100. data/lib/vericred_client/version.rb +89 -2
  101. data/spec/api/drug_coverages_api_spec.rb +254 -0
  102. data/spec/api/drug_packages_api_spec.rb +253 -0
  103. data/spec/api/drugs_api_spec.rb +88 -15
  104. data/spec/api/network_sizes_api_spec.rb +266 -0
  105. data/spec/api/networks_api_spec.rb +100 -1
  106. data/spec/api/plans_api_spec.rb +92 -4
  107. data/spec/api/providers_api_spec.rb +102 -3
  108. data/spec/api/zip_counties_api_spec.rb +101 -2
  109. data/spec/api_client_spec.rb +91 -25
  110. data/spec/configuration_spec.rb +88 -1
  111. data/spec/models/applicant_spec.rb +88 -1
  112. data/spec/models/base_spec.rb +88 -1
  113. data/spec/models/carrier_spec.rb +88 -1
  114. data/spec/models/carrier_subsidiary_spec.rb +88 -1
  115. data/spec/models/county_bulk_spec.rb +88 -1
  116. data/spec/models/county_spec.rb +88 -1
  117. data/spec/models/drug_coverage_response_spec.rb +88 -1
  118. data/spec/models/drug_coverage_spec.rb +95 -2
  119. data/spec/models/drug_package_spec.rb +94 -1
  120. data/spec/models/drug_search_response_spec.rb +88 -1
  121. data/spec/models/drug_spec.rb +94 -1
  122. data/spec/models/formulary_drug_package_response_spec.rb +259 -0
  123. data/spec/models/formulary_response_spec.rb +253 -0
  124. data/spec/models/formulary_spec.rb +253 -0
  125. data/spec/models/meta_spec.rb +88 -1
  126. data/spec/models/network_details_response_spec.rb +247 -0
  127. data/spec/models/network_details_spec.rb +259 -0
  128. data/spec/models/network_search_response_spec.rb +88 -1
  129. data/spec/models/network_size_spec.rb +259 -0
  130. data/spec/models/network_spec.rb +88 -1
  131. data/spec/models/plan_county_bulk_spec.rb +88 -1
  132. data/spec/models/plan_county_spec.rb +88 -1
  133. data/spec/models/plan_search_response_meta_spec.rb +253 -0
  134. data/spec/models/plan_search_response_spec.rb +88 -1
  135. data/spec/models/plan_search_result_spec.rb +100 -1
  136. data/spec/models/plan_show_response_spec.rb +88 -1
  137. data/spec/models/plan_spec.rb +100 -1
  138. data/spec/models/provider_details_spec.rb +385 -0
  139. data/spec/models/provider_geocode_spec.rb +259 -0
  140. data/spec/models/provider_show_response_spec.rb +88 -1
  141. data/spec/models/provider_spec.rb +94 -37
  142. data/spec/models/providers_geocode_response_spec.rb +253 -0
  143. data/spec/models/providers_search_response_spec.rb +88 -1
  144. data/spec/models/rating_area_spec.rb +88 -1
  145. data/spec/models/request_plan_find_applicant_spec.rb +100 -1
  146. data/spec/models/request_plan_find_drug_package_spec.rb +94 -1
  147. data/spec/models/request_plan_find_provider_spec.rb +88 -1
  148. data/spec/models/request_plan_find_spec.rb +88 -1
  149. data/spec/models/request_providers_search_spec.rb +109 -4
  150. data/spec/models/service_area_spec.rb +88 -1
  151. data/spec/models/service_area_zip_county_spec.rb +88 -1
  152. data/spec/models/state_network_size_request_spec.rb +253 -0
  153. data/spec/models/state_network_size_response_spec.rb +253 -0
  154. data/spec/models/state_spec.rb +88 -1
  155. data/spec/models/zip_code_spec.rb +88 -1
  156. data/spec/models/zip_counties_response_spec.rb +88 -1
  157. data/spec/models/zip_county_bulk_spec.rb +88 -1
  158. data/spec/models/zip_county_response_spec.rb +88 -1
  159. data/spec/models/zip_county_spec.rb +88 -1
  160. data/spec/spec_helper.rb +88 -1
  161. data/vericred_client.gemspec +90 -2
  162. metadata +66 -16
  163. data/docs/Pricing.md +0 -18
  164. data/spec/models/pricing_spec.rb +0 -220
@@ -0,0 +1,628 @@
1
+ =begin
2
+ #Vericred API
3
+
4
+ #Vericred's API allows you to search for Health Plans that a specific doctor
5
+ accepts.
6
+
7
+ ## Getting Started
8
+
9
+ Visit our [Developer Portal](https://developers.vericred.com) to
10
+ create an account.
11
+
12
+ Once you have created an account, you can create one Application for
13
+ Production and another for our Sandbox (select the appropriate Plan when
14
+ you create the Application).
15
+
16
+ ## SDKs
17
+
18
+ Our API follows standard REST conventions, so you can use any HTTP client
19
+ to integrate with us. You will likely find it easier to use one of our
20
+ [autogenerated SDKs](https://github.com/vericred/?query=vericred-),
21
+ which we make available for several common programming languages.
22
+
23
+ ## Authentication
24
+
25
+ To authenticate, pass the API Key you created in the Developer Portal as
26
+ a `Vericred-Api-Key` header.
27
+
28
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
29
+
30
+ ## Versioning
31
+
32
+ Vericred's API default to the latest version. However, if you need a specific
33
+ version, you can request it with an `Accept-Version` header.
34
+
35
+ The current version is `v3`. Previous versions are `v1` and `v2`.
36
+
37
+ `curl -H 'Vericred-Api-Key: YOUR_KEY' -H 'Accept-Version: v2' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
38
+
39
+ ## Pagination
40
+
41
+ Endpoints that accept `page` and `per_page` parameters are paginated. They expose
42
+ four additional fields that contain data about your position in the response,
43
+ namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
44
+
45
+ For example, to display 5 results per page and view the second page of a
46
+ `GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
47
+
48
+ ## Sideloading
49
+
50
+ When we return multiple levels of an object graph (e.g. `Provider`s and their `State`s
51
+ we sideload the associated data. In this example, we would provide an Array of
52
+ `State`s and a `state_id` for each provider. This is done primarily to reduce the
53
+ payload size since many of the `Provider`s will share a `State`
54
+
55
+ ```
56
+ {
57
+ providers: [{ id: 1, state_id: 1}, { id: 2, state_id: 1 }],
58
+ states: [{ id: 1, code: 'NY' }]
59
+ }
60
+ ```
61
+
62
+ If you need the second level of the object graph, you can just match the
63
+ corresponding id.
64
+
65
+ ## Selecting specific data
66
+
67
+ All endpoints allow you to specify which fields you would like to return.
68
+ This allows you to limit the response to contain only the data you need.
69
+
70
+ For example, let's take a request that returns the following JSON by default
71
+
72
+ ```
73
+ {
74
+ provider: {
75
+ id: 1,
76
+ name: 'John',
77
+ phone: '1234567890',
78
+ field_we_dont_care_about: 'value_we_dont_care_about'
79
+ },
80
+ states: [{
81
+ id: 1,
82
+ name: 'New York',
83
+ code: 'NY',
84
+ field_we_dont_care_about: 'value_we_dont_care_about'
85
+ }]
86
+ }
87
+ ```
88
+
89
+ To limit our results to only return the fields we care about, we specify the
90
+ `select` query string parameter for the corresponding fields in the JSON
91
+ document.
92
+
93
+ In this case, we want to select `name` and `phone` from the `provider` key,
94
+ so we would add the parameters `select=provider.name,provider.phone`.
95
+ We also want the `name` and `code` from the `states` key, so we would
96
+ add the parameters `select=states.name,staes.code`. The id field of
97
+ each document is always returned whether or not it is requested.
98
+
99
+ Our final request would be `GET /providers/12345?select=provider.name,provider.phone,states.name,states.code`
100
+
101
+ The response would be
102
+
103
+ ```
104
+ {
105
+ provider: {
106
+ id: 1,
107
+ name: 'John',
108
+ phone: '1234567890'
109
+ },
110
+ states: [{
111
+ id: 1,
112
+ name: 'New York',
113
+ code: 'NY'
114
+ }]
115
+ }
116
+ ```
117
+
118
+ ## Benefits summary format
119
+ Benefit cost-share strings are formatted to capture:
120
+ * Network tiers
121
+ * Compound or conditional cost-share
122
+ * Limits on the cost-share
123
+ * Benefit-specific maximum out-of-pocket costs
124
+
125
+ **Example #1**
126
+ As an example, we would represent [this Summary of Benefits & Coverage](https://s3.amazonaws.com/vericred-data/SBC/2017/33602TX0780032.pdf) as:
127
+
128
+ * **Hospital stay facility fees**:
129
+ - Network Provider: `$400 copay/admit plus 20% coinsurance`
130
+ - Out-of-Network Provider: `$1,500 copay/admit plus 50% coinsurance`
131
+ - Vericred's format for this benefit: `In-Network: $400 before deductible then 20% after deductible / Out-of-Network: $1,500 before deductible then 50% after deductible`
132
+
133
+ * **Rehabilitation services:**
134
+ - Network Provider: `20% coinsurance`
135
+ - Out-of-Network Provider: `50% coinsurance`
136
+ - Limitations & Exceptions: `35 visit maximum per benefit period combined with Chiropractic care.`
137
+ - Vericred's format for this benefit: `In-Network: 20% after deductible / Out-of-Network: 50% after deductible | limit: 35 visit(s) per Benefit Period`
138
+
139
+ **Example #2**
140
+ In [this other Summary of Benefits & Coverage](https://s3.amazonaws.com/vericred-data/SBC/2017/40733CA0110568.pdf), the **specialty_drugs** cost-share has a maximum out-of-pocket for in-network pharmacies.
141
+ * **Specialty drugs:**
142
+ - Network Provider: `40% coinsurance up to a $500 maximum for up to a 30 day supply`
143
+ - Out-of-Network Provider `Not covered`
144
+ - Vericred's format for this benefit: `In-Network: 40% after deductible, up to $500 per script / Out-of-Network: 100%`
145
+
146
+ **BNF**
147
+
148
+ Here's a description of the benefits summary string, represented as a context-free grammar:
149
+
150
+ ```
151
+ root ::= coverage
152
+
153
+ coverage ::= (simple_coverage | tiered_coverage) (space pipe space coverage_limitation)?
154
+ tiered_coverage ::= tier (space slash space tier)*
155
+ tier ::= tier_name colon space (tier_coverage | not_applicable)
156
+ tier_coverage ::= simple_coverage (space (then | or | and) space simple_coverage)* tier_limitation?
157
+ simple_coverage ::= (pre_coverage_limitation space)? coverage_amount (space post_coverage_limitation)? (comma? space coverage_condition)?
158
+ coverage_limitation ::= "limit" colon space (((simple_coverage | simple_limitation) (semicolon space see_carrier_documentation)?) | see_carrier_documentation | waived_if_admitted)
159
+ waived_if_admitted ::= ("copay" space)? "waived if admitted"
160
+ simple_limitation ::= pre_coverage_limitation space "copay applies"
161
+ tier_name ::= "In-Network-Tier-2" | "Out-of-Network" | "In-Network"
162
+ tier_limitation ::= comma space "up to" space (currency | (integer space time_unit plural?)) (space post_coverage_limitation)?
163
+ coverage_amount ::= currency | unlimited | included | unknown | percentage | (digits space (treatment_unit | time_unit) plural?)
164
+ pre_coverage_limitation ::= first space digits space time_unit plural?
165
+ post_coverage_limitation ::= (((then space currency) | "per condition") space)? "per" space (treatment_unit | (integer space time_unit) | time_unit) plural?
166
+ coverage_condition ::= ("before deductible" | "after deductible" | "penalty" | allowance | "in-state" | "out-of-state") (space allowance)?
167
+ allowance ::= upto_allowance | after_allowance
168
+ upto_allowance ::= "up to" space (currency space)? "allowance"
169
+ after_allowance ::= "after" space (currency space)? "allowance"
170
+ see_carrier_documentation ::= "see carrier documentation for more information"
171
+ unknown ::= "unknown"
172
+ unlimited ::= /[uU]nlimited/
173
+ included ::= /[iI]ncluded in [mM]edical/
174
+ 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/)
175
+ treatment_unit ::= /[pP]erson/ | /[gG]roup/ | /[cC]ondition/ | /[sS]cript/ | /[vV]isit/ | /[eE]xam/ | /[iI]tem/ | /[sS]tay/ | /[tT]reatment/ | /[aA]dmission/ | /[eE]pisode/
176
+ comma ::= ","
177
+ colon ::= ":"
178
+ semicolon ::= ";"
179
+ pipe ::= "|"
180
+ slash ::= "/"
181
+ plural ::= "(s)" | "s"
182
+ then ::= "then" | ("," space) | space
183
+ or ::= "or"
184
+ and ::= "and"
185
+ not_applicable ::= "Not Applicable" | "N/A" | "NA"
186
+ first ::= "first"
187
+ currency ::= "$" number
188
+ percentage ::= number "%"
189
+ number ::= float | integer
190
+ float ::= digits "." digits
191
+ integer ::= /[0-9]/+ (comma_int | under_int)*
192
+ comma_int ::= ("," /[0-9]/*3) !"_"
193
+ under_int ::= ("_" /[0-9]/*3) !","
194
+ digits ::= /[0-9]/+ ("_" /[0-9]/+)*
195
+ space ::= /[ \t]/+
196
+ ```
197
+
198
+
199
+
200
+ OpenAPI spec version: 1.0.0
201
+
202
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
203
+
204
+ Licensed under the Apache License, Version 2.0 (the "License");
205
+ you may not use this file except in compliance with the License.
206
+ You may obtain a copy of the License at
207
+
208
+ http://www.apache.org/licenses/LICENSE-2.0
209
+
210
+ Unless required by applicable law or agreed to in writing, software
211
+ distributed under the License is distributed on an "AS IS" BASIS,
212
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
213
+ See the License for the specific language governing permissions and
214
+ limitations under the License.
215
+
216
+ =end
217
+
218
+ require 'date'
219
+
220
+ module VericredClient
221
+
222
+ class ProviderDetails
223
+ # City name (e.g. Springfield).
224
+ attr_accessor :city
225
+
226
+ # Primary email address to contact the provider.
227
+ attr_accessor :email
228
+
229
+ # Provider's gender (M or F)
230
+ attr_accessor :gender
231
+
232
+ # Given name for the provider.
233
+ attr_accessor :first_name
234
+
235
+ # National Provider Index (NPI) number
236
+ attr_accessor :id
237
+
238
+ # Family name for the provider.
239
+ attr_accessor :last_name
240
+
241
+ # Latitude of provider
242
+ attr_accessor :latitude
243
+
244
+ # Longitude of provider
245
+ attr_accessor :longitude
246
+
247
+ # Middle name for the provider.
248
+ attr_accessor :middle_name
249
+
250
+ # Array of network ids
251
+ attr_accessor :network_ids
252
+
253
+ # name for the providers of type: organization.
254
+ attr_accessor :organization_name
255
+
256
+ # Personal contact phone for the provider.
257
+ attr_accessor :personal_phone
258
+
259
+ # Office phone for the provider
260
+ attr_accessor :phone
261
+
262
+ # Preferred name for display (e.g. Dr. Francis White may prefer Dr. Frank White)
263
+ attr_accessor :presentation_name
264
+
265
+ # Name of the primary Specialty
266
+ attr_accessor :specialty
267
+
268
+ # State code for the provider's address (e.g. NY).
269
+ attr_accessor :state
270
+
271
+ # Foreign key to States
272
+ attr_accessor :state_id
273
+
274
+ # First line of the provider's street address.
275
+ attr_accessor :street_line_1
276
+
277
+ # Second line of the provider's street address.
278
+ attr_accessor :street_line_2
279
+
280
+ # Suffix for the provider's name (e.g. Jr)
281
+ attr_accessor :suffix
282
+
283
+ # Professional title for the provider (e.g. Dr).
284
+ attr_accessor :title
285
+
286
+ # Type of NPI number (individual provider vs organization).
287
+ attr_accessor :type
288
+
289
+ # Postal code for the provider's address (e.g. 11215)
290
+ attr_accessor :zip_code
291
+
292
+ # List of HIOS ids for this provider
293
+ attr_accessor :hios_ids
294
+
295
+
296
+ # Attribute mapping from ruby-style variable name to JSON key.
297
+ def self.attribute_map
298
+ {
299
+ :'city' => :'city',
300
+ :'email' => :'email',
301
+ :'gender' => :'gender',
302
+ :'first_name' => :'first_name',
303
+ :'id' => :'id',
304
+ :'last_name' => :'last_name',
305
+ :'latitude' => :'latitude',
306
+ :'longitude' => :'longitude',
307
+ :'middle_name' => :'middle_name',
308
+ :'network_ids' => :'network_ids',
309
+ :'organization_name' => :'organization_name',
310
+ :'personal_phone' => :'personal_phone',
311
+ :'phone' => :'phone',
312
+ :'presentation_name' => :'presentation_name',
313
+ :'specialty' => :'specialty',
314
+ :'state' => :'state',
315
+ :'state_id' => :'state_id',
316
+ :'street_line_1' => :'street_line_1',
317
+ :'street_line_2' => :'street_line_2',
318
+ :'suffix' => :'suffix',
319
+ :'title' => :'title',
320
+ :'type' => :'type',
321
+ :'zip_code' => :'zip_code',
322
+ :'hios_ids' => :'hios_ids'
323
+ }
324
+ end
325
+
326
+ # Attribute type mapping.
327
+ def self.swagger_types
328
+ {
329
+ :'city' => :'String',
330
+ :'email' => :'String',
331
+ :'gender' => :'String',
332
+ :'first_name' => :'String',
333
+ :'id' => :'Integer',
334
+ :'last_name' => :'String',
335
+ :'latitude' => :'Float',
336
+ :'longitude' => :'Float',
337
+ :'middle_name' => :'String',
338
+ :'network_ids' => :'Array<Integer>',
339
+ :'organization_name' => :'String',
340
+ :'personal_phone' => :'String',
341
+ :'phone' => :'String',
342
+ :'presentation_name' => :'String',
343
+ :'specialty' => :'String',
344
+ :'state' => :'String',
345
+ :'state_id' => :'Integer',
346
+ :'street_line_1' => :'String',
347
+ :'street_line_2' => :'String',
348
+ :'suffix' => :'String',
349
+ :'title' => :'String',
350
+ :'type' => :'String',
351
+ :'zip_code' => :'String',
352
+ :'hios_ids' => :'Array<String>'
353
+ }
354
+ end
355
+
356
+ # Initializes the object
357
+ # @param [Hash] attributes Model attributes in the form of hash
358
+ def initialize(attributes = {})
359
+ return unless attributes.is_a?(Hash)
360
+
361
+ # convert string to symbol for hash key
362
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
363
+
364
+ if attributes.has_key?(:'city')
365
+ self.city = attributes[:'city']
366
+ end
367
+
368
+ if attributes.has_key?(:'email')
369
+ self.email = attributes[:'email']
370
+ end
371
+
372
+ if attributes.has_key?(:'gender')
373
+ self.gender = attributes[:'gender']
374
+ end
375
+
376
+ if attributes.has_key?(:'first_name')
377
+ self.first_name = attributes[:'first_name']
378
+ end
379
+
380
+ if attributes.has_key?(:'id')
381
+ self.id = attributes[:'id']
382
+ end
383
+
384
+ if attributes.has_key?(:'last_name')
385
+ self.last_name = attributes[:'last_name']
386
+ end
387
+
388
+ if attributes.has_key?(:'latitude')
389
+ self.latitude = attributes[:'latitude']
390
+ end
391
+
392
+ if attributes.has_key?(:'longitude')
393
+ self.longitude = attributes[:'longitude']
394
+ end
395
+
396
+ if attributes.has_key?(:'middle_name')
397
+ self.middle_name = attributes[:'middle_name']
398
+ end
399
+
400
+ if attributes.has_key?(:'network_ids')
401
+ if (value = attributes[:'network_ids']).is_a?(Array)
402
+ self.network_ids = value
403
+ end
404
+ end
405
+
406
+ if attributes.has_key?(:'organization_name')
407
+ self.organization_name = attributes[:'organization_name']
408
+ end
409
+
410
+ if attributes.has_key?(:'personal_phone')
411
+ self.personal_phone = attributes[:'personal_phone']
412
+ end
413
+
414
+ if attributes.has_key?(:'phone')
415
+ self.phone = attributes[:'phone']
416
+ end
417
+
418
+ if attributes.has_key?(:'presentation_name')
419
+ self.presentation_name = attributes[:'presentation_name']
420
+ end
421
+
422
+ if attributes.has_key?(:'specialty')
423
+ self.specialty = attributes[:'specialty']
424
+ end
425
+
426
+ if attributes.has_key?(:'state')
427
+ self.state = attributes[:'state']
428
+ end
429
+
430
+ if attributes.has_key?(:'state_id')
431
+ self.state_id = attributes[:'state_id']
432
+ end
433
+
434
+ if attributes.has_key?(:'street_line_1')
435
+ self.street_line_1 = attributes[:'street_line_1']
436
+ end
437
+
438
+ if attributes.has_key?(:'street_line_2')
439
+ self.street_line_2 = attributes[:'street_line_2']
440
+ end
441
+
442
+ if attributes.has_key?(:'suffix')
443
+ self.suffix = attributes[:'suffix']
444
+ end
445
+
446
+ if attributes.has_key?(:'title')
447
+ self.title = attributes[:'title']
448
+ end
449
+
450
+ if attributes.has_key?(:'type')
451
+ self.type = attributes[:'type']
452
+ end
453
+
454
+ if attributes.has_key?(:'zip_code')
455
+ self.zip_code = attributes[:'zip_code']
456
+ end
457
+
458
+ if attributes.has_key?(:'hios_ids')
459
+ if (value = attributes[:'hios_ids']).is_a?(Array)
460
+ self.hios_ids = value
461
+ end
462
+ end
463
+
464
+ end
465
+
466
+ # Show invalid properties with the reasons. Usually used together with valid?
467
+ # @return Array for valid properies with the reasons
468
+ def list_invalid_properties
469
+ invalid_properties = Array.new
470
+ return invalid_properties
471
+ end
472
+
473
+ # Check to see if the all the properties in the model are valid
474
+ # @return true if the model is valid
475
+ def valid?
476
+ return true
477
+ end
478
+
479
+ # Checks equality by comparing each attribute.
480
+ # @param [Object] Object to be compared
481
+ def ==(o)
482
+ return true if self.equal?(o)
483
+ self.class == o.class &&
484
+ city == o.city &&
485
+ email == o.email &&
486
+ gender == o.gender &&
487
+ first_name == o.first_name &&
488
+ id == o.id &&
489
+ last_name == o.last_name &&
490
+ latitude == o.latitude &&
491
+ longitude == o.longitude &&
492
+ middle_name == o.middle_name &&
493
+ network_ids == o.network_ids &&
494
+ organization_name == o.organization_name &&
495
+ personal_phone == o.personal_phone &&
496
+ phone == o.phone &&
497
+ presentation_name == o.presentation_name &&
498
+ specialty == o.specialty &&
499
+ state == o.state &&
500
+ state_id == o.state_id &&
501
+ street_line_1 == o.street_line_1 &&
502
+ street_line_2 == o.street_line_2 &&
503
+ suffix == o.suffix &&
504
+ title == o.title &&
505
+ type == o.type &&
506
+ zip_code == o.zip_code &&
507
+ hios_ids == o.hios_ids
508
+ end
509
+
510
+ # @see the `==` method
511
+ # @param [Object] Object to be compared
512
+ def eql?(o)
513
+ self == o
514
+ end
515
+
516
+ # Calculates hash code according to all attributes.
517
+ # @return [Fixnum] Hash code
518
+ def hash
519
+ [city, email, gender, first_name, id, last_name, latitude, longitude, middle_name, network_ids, organization_name, personal_phone, phone, presentation_name, specialty, state, state_id, street_line_1, street_line_2, suffix, title, type, zip_code, hios_ids].hash
520
+ end
521
+
522
+ # Builds the object from hash
523
+ # @param [Hash] attributes Model attributes in the form of hash
524
+ # @return [Object] Returns the model itself
525
+ def build_from_hash(attributes)
526
+ return nil unless attributes.is_a?(Hash)
527
+ self.class.swagger_types.each_pair do |key, type|
528
+ if type =~ /\AArray<(.*)>/i
529
+ # check to ensure the input is an array given that the the attribute
530
+ # is documented as an array but the input is not
531
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
532
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
533
+ end
534
+ elsif !attributes[self.class.attribute_map[key]].nil?
535
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
536
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
537
+ end
538
+
539
+ self
540
+ end
541
+
542
+ # Deserializes the data based on type
543
+ # @param string type Data type
544
+ # @param string value Value to be deserialized
545
+ # @return [Object] Deserialized data
546
+ def _deserialize(type, value)
547
+ case type.to_sym
548
+ when :DateTime
549
+ DateTime.parse(value)
550
+ when :Date
551
+ Date.parse(value)
552
+ when :String
553
+ value.to_s
554
+ when :Integer
555
+ value.to_i
556
+ when :Float
557
+ value.to_f
558
+ when :BOOLEAN
559
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
560
+ true
561
+ else
562
+ false
563
+ end
564
+ when :Object
565
+ # generic object (usually a Hash), return directly
566
+ value
567
+ when /\AArray<(?<inner_type>.+)>\z/
568
+ inner_type = Regexp.last_match[:inner_type]
569
+ value.map { |v| _deserialize(inner_type, v) }
570
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
571
+ k_type = Regexp.last_match[:k_type]
572
+ v_type = Regexp.last_match[:v_type]
573
+ {}.tap do |hash|
574
+ value.each do |k, v|
575
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
576
+ end
577
+ end
578
+ else # model
579
+ temp_model = VericredClient.const_get(type).new
580
+ temp_model.build_from_hash(value)
581
+ end
582
+ end
583
+
584
+ # Returns the string representation of the object
585
+ # @return [String] String presentation of the object
586
+ def to_s
587
+ to_hash.to_s
588
+ end
589
+
590
+ # to_body is an alias to to_hash (backward compatibility)
591
+ # @return [Hash] Returns the object in the form of hash
592
+ def to_body
593
+ to_hash
594
+ end
595
+
596
+ # Returns the object in the form of hash
597
+ # @return [Hash] Returns the object in the form of hash
598
+ def to_hash
599
+ hash = {}
600
+ self.class.attribute_map.each_pair do |attr, param|
601
+ value = self.send(attr)
602
+ next if value.nil?
603
+ hash[param] = _to_hash(value)
604
+ end
605
+ hash
606
+ end
607
+
608
+ # Outputs non-array value in the form of hash
609
+ # For object, use to_hash. Otherwise, just return the value
610
+ # @param [Object] value Any valid value
611
+ # @return [Hash] Returns the value in the form of hash
612
+ def _to_hash(value)
613
+ if value.is_a?(Array)
614
+ value.compact.map{ |v| _to_hash(v) }
615
+ elsif value.is_a?(Hash)
616
+ {}.tap do |hash|
617
+ value.each { |k, v| hash[k] = _to_hash(v) }
618
+ end
619
+ elsif value.respond_to? :to_hash
620
+ value.to_hash
621
+ else
622
+ value
623
+ end
624
+ end
625
+
626
+ end
627
+
628
+ end