vericred_client 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -18
  3. data/docs/Applicant.md +3 -3
  4. data/docs/Carrier.md +1 -1
  5. data/docs/County.md +3 -3
  6. data/docs/Drug.md +3 -3
  7. data/docs/DrugCoverage.md +4 -4
  8. data/docs/DrugCoverageResponse.md +3 -1
  9. data/docs/DrugPackage.md +1 -1
  10. data/docs/DrugSearchResponse.md +2 -1
  11. data/docs/DrugsApi.md +71 -10
  12. data/docs/Meta.md +1 -1
  13. data/docs/Network.md +9 -0
  14. data/docs/NetworkSearchResponse.md +9 -0
  15. data/docs/NetworksApi.md +58 -0
  16. data/docs/Plan.md +10 -10
  17. data/docs/PlanCounty.md +1 -1
  18. data/docs/PlanCountyBulk.md +1 -1
  19. data/docs/{PlanFindResponse.md → PlanSearchResponse.md} +2 -1
  20. data/docs/PlanSearchResult.md +14 -14
  21. data/docs/PlansApi.md +69 -6
  22. data/docs/Provider.md +7 -6
  23. data/docs/ProvidersApi.md +39 -30
  24. data/docs/{ProviderResponse.md → ProvidersSearchResponse.md} +1 -1
  25. data/docs/RequestPlanFind.md +3 -2
  26. data/docs/RequestPlanFindApplicant.md +8 -0
  27. data/docs/RequestPlanFindProvider.md +8 -0
  28. data/docs/RequestProvidersSearch.md +17 -0
  29. data/docs/State.md +4 -4
  30. data/docs/ZipCountiesApi.md +11 -4
  31. data/docs/ZipCountiesResponse.md +11 -0
  32. data/docs/ZipCountyBulk.md +1 -1
  33. data/docs/ZipCountyResponse.md +2 -1
  34. data/lib/vericred_client/api/drugs_api.rb +86 -14
  35. data/lib/vericred_client/api/networks_api.rb +198 -0
  36. data/lib/vericred_client/api/plans_api.rb +134 -14
  37. data/lib/vericred_client/api/providers_api.rb +65 -59
  38. data/lib/vericred_client/api/zip_counties_api.rb +8 -5
  39. data/lib/vericred_client/api_client.rb +1 -1
  40. data/lib/vericred_client/api_error.rb +1 -1
  41. data/lib/vericred_client/models/applicant.rb +13 -15
  42. data/lib/vericred_client/models/base.rb +1 -1
  43. data/lib/vericred_client/models/carrier.rb +15 -15
  44. data/lib/vericred_client/models/carrier_subsidiary.rb +1 -1
  45. data/lib/vericred_client/models/county.rb +12 -16
  46. data/lib/vericred_client/models/county_bulk.rb +1 -1
  47. data/lib/vericred_client/models/drug.rb +26 -26
  48. data/lib/vericred_client/models/drug_coverage.rb +32 -38
  49. data/lib/vericred_client/models/drug_coverage_response.rb +40 -16
  50. data/lib/vericred_client/models/drug_package.rb +15 -15
  51. data/lib/vericred_client/models/drug_search_response.rb +21 -9
  52. data/lib/vericred_client/models/meta.rb +8 -8
  53. data/lib/vericred_client/models/network.rb +308 -0
  54. data/lib/vericred_client/models/{plan_find_response.rb → network_search_response.rb} +11 -11
  55. data/lib/vericred_client/models/plan.rb +62 -72
  56. data/lib/vericred_client/models/plan_county.rb +15 -15
  57. data/lib/vericred_client/models/plan_county_bulk.rb +15 -15
  58. data/lib/vericred_client/models/plan_search_response.rb +322 -0
  59. data/lib/vericred_client/models/plan_search_result.rb +102 -112
  60. data/lib/vericred_client/models/pricing.rb +1 -1
  61. data/lib/vericred_client/models/provider.rb +24 -22
  62. data/lib/vericred_client/models/{provider_response.rb → providers_search_response.rb} +2 -2
  63. data/lib/vericred_client/models/rating_area.rb +1 -1
  64. data/lib/vericred_client/models/request_plan_find.rb +16 -4
  65. data/lib/vericred_client/models/request_plan_find_applicant.rb +298 -0
  66. data/lib/vericred_client/models/request_plan_find_provider.rb +298 -0
  67. data/lib/vericred_client/models/request_providers_search.rb +372 -0
  68. data/lib/vericred_client/models/state.rb +25 -29
  69. data/lib/vericred_client/models/zip_code.rb +1 -1
  70. data/lib/vericred_client/models/zip_counties_response.rb +336 -0
  71. data/lib/vericred_client/models/zip_county.rb +1 -1
  72. data/lib/vericred_client/models/zip_county_bulk.rb +12 -12
  73. data/lib/vericred_client/models/zip_county_response.rb +21 -11
  74. data/lib/vericred_client/version.rb +2 -2
  75. data/lib/vericred_client.rb +10 -3
  76. data/spec/api/drugs_api_spec.rb +26 -5
  77. data/spec/api/networks_api_spec.rb +166 -0
  78. data/spec/api/plans_api_spec.rb +66 -6
  79. data/spec/api/providers_api_spec.rb +27 -19
  80. data/spec/api/zip_counties_api_spec.rb +4 -3
  81. metadata +22 -6
@@ -0,0 +1,166 @@
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) 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: 1.0.0
120
+
121
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
122
+
123
+
124
+ =end
125
+
126
+ require 'spec_helper'
127
+ require 'json'
128
+
129
+ # Unit tests for VericredClient::NetworksApi
130
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
131
+ # Please update as you see appropriate
132
+ describe 'NetworksApi' do
133
+ before do
134
+ # run before each test
135
+ @instance = VericredClient::NetworksApi.new
136
+ end
137
+
138
+ after do
139
+ # run after each test
140
+ end
141
+
142
+ describe 'test an instance of NetworksApi' do
143
+ it 'should create an instact of NetworksApi' do
144
+ @instance.should be_a(VericredClient::NetworksApi)
145
+ end
146
+ end
147
+
148
+ # unit tests for list_networks
149
+ # Networks
150
+ # A network is a list of the doctors, other health care providers,
151
+ and hospitals that a plan has contracted with to provide medical care to
152
+ its members.
153
+ # @param carrier_id Carrier HIOS Issuer ID
154
+ # @param [Hash] opts the optional parameters
155
+ # @return [NetworkSearchResponse]
156
+ describe 'list_networks test' do
157
+ it "should work" do
158
+ # assertion here
159
+ # should be_a()
160
+ # should be_nil
161
+ # should ==
162
+ # should_not ==
163
+ end
164
+ end
165
+
166
+ end
@@ -6,7 +6,7 @@ accepts.
6
6
 
7
7
  ## Getting Started
8
8
 
9
- Visit our [Developer Portal](https://vericred.3scale.net/access_code?access_code=vericred&cms_token=3545ca52af07bde85b7c0c3aa9d1985e) to
9
+ Visit our [Developer Portal](https://vericred.3scale.net) to
10
10
  create an account.
11
11
 
12
12
  Once you have created an account, you can create one Application for
@@ -145,13 +145,73 @@ describe 'PlansApi' do
145
145
  end
146
146
  end
147
147
 
148
- # unit tests for post_plans_find
149
- #
150
- #
148
+ # unit tests for find_plans
149
+ # Find Plans
150
+ # ### Location Information
151
+
152
+ Searching for a set of plans requires a `zip_code` and `fips_code`
153
+ code. These are used to determine pricing and availabity
154
+ of health plans.
155
+
156
+ Optionally, you may provide a list of Applicants or Providers
157
+
158
+ ### Applicants
159
+
160
+ This is a list of people who will be covered by the plan. We
161
+ use this list to calculate the premium. You must include `age`
162
+ and can include `smoker`, which also factors into pricing in some
163
+ states.
164
+
165
+ Applicants *must* include an age. If smoker is omitted, its value is assumed
166
+ to be false.
167
+
168
+ #### Multiple Applicants
169
+ To get pricing for multiple applicants, just append multiple sets
170
+ of data to the URL with the age and smoking status of each applicant
171
+ next to each other.
172
+
173
+ For example, given two applicants - one age 32 and a non-smoker and one
174
+ age 29 and a smoker, you could use the following request
175
+
176
+ `GET /plans?zip_code=07451&fips_code=33025&applicants[][age]=32&applicants[][age]=29&applicants[][smoker]=true`
177
+
178
+ It would also be acceptible to include `applicants[][smoker]=false` after the
179
+ first applicant's age.
180
+
181
+ ### Providers
182
+
183
+ We identify Providers (Doctors) by their National Practitioner
184
+ Index number (NPI). If you pass a list of Providers, keyed by
185
+ their NPI number, we will return a list of which Providers are
186
+ in and out of network for each plan returned.
187
+
188
+ For example, if we had two providers with the NPI numbers `12345` and `23456`
189
+ you would make the following request
190
+
191
+ `GET /plans?zip_code=07451&fips_code=33025&providers[][npi]=12345&providers[][npi]=23456`
192
+
193
+ ### Enrollment Date
194
+
195
+ To calculate plan pricing and availability, we default to the current date
196
+ as the enrollment date. To specify a date in the future (or the past), pass
197
+ a string with the format `YYYY-MM-DD` in the `enrollment_date` parameter.
198
+
199
+ `GET /plans?zip_code=07451&fips_code=33025&enrollment_date=2016-01-01`
200
+
201
+ ### Subsidy
202
+
203
+ On-marketplace plans are eligible for a subsidy based on the
204
+ `household_size` and `household_income` of the applicants. If you
205
+ pass those values, we will calculate the `subsidized_premium`
206
+ and return it for each plan. If no values are provided, the
207
+ `subsidized_premium` will be the same as the `premium`
208
+
209
+ `GET /plans?zip_code=07451&fips_code=33025&household_size=4&household_income=40000`
210
+
151
211
  # @param [Hash] opts the optional parameters
152
212
  # @option opts [RequestPlanFind] :body
153
- # @return [PlanFindResponse]
154
- describe 'post_plans_find test' do
213
+ # @return [PlanSearchResponse]
214
+ describe 'find_plans test' do
155
215
  it "should work" do
156
216
  # assertion here
157
217
  # should be_a()
@@ -6,7 +6,7 @@ accepts.
6
6
 
7
7
  ## Getting Started
8
8
 
9
- Visit our [Developer Portal](https://vericred.3scale.net/access_code?access_code=vericred&cms_token=3545ca52af07bde85b7c0c3aa9d1985e) to
9
+ Visit our [Developer Portal](https://vericred.3scale.net) to
10
10
  create an account.
11
11
 
12
12
  Once you have created an account, you can create one Application for
@@ -145,19 +145,14 @@ describe 'ProvidersApi' do
145
145
  end
146
146
  end
147
147
 
148
- # unit tests for get_providers
149
- #
150
- #
151
- # @param search_term String to search by
152
- # @param zip_code Zip Code to search near
148
+ # unit tests for get_provider
149
+ # Find a Provider
150
+ # To retrieve a specific provider, just perform a GET using his NPI number
151
+ # @param npi NPI number
153
152
  # @param [Hash] opts the optional parameters
154
- # @option opts [String] :accepts_insurance Limit results to Providers who accept at least one insurance plan. Note that the inverse of this filter is not supported and any value will evaluate to true
155
- # @option opts [String] :page Page number
156
- # @option opts [String] :per_page Number of records to return per page
157
- # @option opts [String] :radius Radius (in miles) to use to limit results
158
- # @option opts [String] :type Either organization or individual
159
- # @return [ProviderResponse]
160
- describe 'get_providers test' do
153
+ # @option opts [String] :vericred_api_key API Key
154
+ # @return [Provider]
155
+ describe 'get_provider test' do
161
156
  it "should work" do
162
157
  # assertion here
163
158
  # should be_a()
@@ -167,13 +162,26 @@ describe 'ProvidersApi' do
167
162
  end
168
163
  end
169
164
 
170
- # unit tests for get_providers_npi
171
- #
172
- #
173
- # @param npi NPI number
165
+ # unit tests for get_providers
166
+ # Find Providers
167
+ # All `Provider` searches require a `zip_code`, which we use for weighting
168
+ the search results to favor `Provider`s that are near the user. For example,
169
+ we would want "Dr. John Smith" who is 5 miles away to appear before
170
+ "Dr. John Smith" who is 100 miles away.
171
+
172
+ The weighting also allows for non-exact matches. In our prior example, we
173
+ would want "Dr. Jon Smith" who is 2 miles away to appear before the exact
174
+ match "Dr. John Smith" who is 100 miles away because it is more likely that
175
+ the user just entered an incorrect name.
176
+
177
+ The free text search also supports Specialty name search and "body part"
178
+ Specialty name search. So, searching "John Smith nose" would return
179
+ "Dr. John Smith", the ENT Specialist before "Dr. John Smith" the Internist.
180
+
174
181
  # @param [Hash] opts the optional parameters
175
- # @return [ProviderResponse]
176
- describe 'get_providers_npi test' do
182
+ # @option opts [RequestProvidersSearch] :body
183
+ # @return [ProvidersSearchResponse]
184
+ describe 'get_providers test' do
177
185
  it "should work" do
178
186
  # assertion here
179
187
  # should be_a()
@@ -6,7 +6,7 @@ accepts.
6
6
 
7
7
  ## Getting Started
8
8
 
9
- Visit our [Developer Portal](https://vericred.3scale.net/access_code?access_code=vericred&cms_token=3545ca52af07bde85b7c0c3aa9d1985e) to
9
+ Visit our [Developer Portal](https://vericred.3scale.net) to
10
10
  create an account.
11
11
 
12
12
  Once you have created an account, you can create one Application for
@@ -146,10 +146,11 @@ describe 'ZipCountiesApi' do
146
146
  end
147
147
 
148
148
  # unit tests for get_zip_counties
149
- #
150
- #
149
+ # Search for Zip Counties
150
+ # Our `Plan` endpoints require a zip code and a fips (county) code. This is because plan pricing requires both of these elements. Users are unlikely to know their fips code, so we provide this endpoint to look up a `ZipCounty` by zip code and return both the selected zip and fips codes.
151
151
  # @param zip_prefix Partial five-digit Zip
152
152
  # @param [Hash] opts the optional parameters
153
+ # @option opts [String] :vericred_api_key API Key
153
154
  # @return [ZipCountyResponse]
154
155
  describe 'get_zip_counties test' do
155
156
  it "should work" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vericred_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vericred Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-11 00:00:00.000000000 Z
11
+ date: 2016-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -211,26 +211,34 @@ files:
211
211
  - docs/DrugSearchResponse.md
212
212
  - docs/DrugsApi.md
213
213
  - docs/Meta.md
214
+ - docs/Network.md
215
+ - docs/NetworkSearchResponse.md
216
+ - docs/NetworksApi.md
214
217
  - docs/Plan.md
215
218
  - docs/PlanCounty.md
216
219
  - docs/PlanCountyBulk.md
217
- - docs/PlanFindResponse.md
220
+ - docs/PlanSearchResponse.md
218
221
  - docs/PlanSearchResult.md
219
222
  - docs/PlansApi.md
220
223
  - docs/Pricing.md
221
224
  - docs/Provider.md
222
- - docs/ProviderResponse.md
223
225
  - docs/ProvidersApi.md
226
+ - docs/ProvidersSearchResponse.md
224
227
  - docs/RatingArea.md
225
228
  - docs/RequestPlanFind.md
229
+ - docs/RequestPlanFindApplicant.md
230
+ - docs/RequestPlanFindProvider.md
231
+ - docs/RequestProvidersSearch.md
226
232
  - docs/State.md
227
233
  - docs/ZipCode.md
228
234
  - docs/ZipCountiesApi.md
235
+ - docs/ZipCountiesResponse.md
229
236
  - docs/ZipCounty.md
230
237
  - docs/ZipCountyBulk.md
231
238
  - docs/ZipCountyResponse.md
232
239
  - lib/vericred_client.rb
233
240
  - lib/vericred_client/api/drugs_api.rb
241
+ - lib/vericred_client/api/networks_api.rb
234
242
  - lib/vericred_client/api/plans_api.rb
235
243
  - lib/vericred_client/api/providers_api.rb
236
244
  - lib/vericred_client/api/zip_counties_api.rb
@@ -249,23 +257,30 @@ files:
249
257
  - lib/vericred_client/models/drug_package.rb
250
258
  - lib/vericred_client/models/drug_search_response.rb
251
259
  - lib/vericred_client/models/meta.rb
260
+ - lib/vericred_client/models/network.rb
261
+ - lib/vericred_client/models/network_search_response.rb
252
262
  - lib/vericred_client/models/plan.rb
253
263
  - lib/vericred_client/models/plan_county.rb
254
264
  - lib/vericred_client/models/plan_county_bulk.rb
255
- - lib/vericred_client/models/plan_find_response.rb
265
+ - lib/vericred_client/models/plan_search_response.rb
256
266
  - lib/vericred_client/models/plan_search_result.rb
257
267
  - lib/vericred_client/models/pricing.rb
258
268
  - lib/vericred_client/models/provider.rb
259
- - lib/vericred_client/models/provider_response.rb
269
+ - lib/vericred_client/models/providers_search_response.rb
260
270
  - lib/vericred_client/models/rating_area.rb
261
271
  - lib/vericred_client/models/request_plan_find.rb
272
+ - lib/vericred_client/models/request_plan_find_applicant.rb
273
+ - lib/vericred_client/models/request_plan_find_provider.rb
274
+ - lib/vericred_client/models/request_providers_search.rb
262
275
  - lib/vericred_client/models/state.rb
263
276
  - lib/vericred_client/models/zip_code.rb
277
+ - lib/vericred_client/models/zip_counties_response.rb
264
278
  - lib/vericred_client/models/zip_county.rb
265
279
  - lib/vericred_client/models/zip_county_bulk.rb
266
280
  - lib/vericred_client/models/zip_county_response.rb
267
281
  - lib/vericred_client/version.rb
268
282
  - spec/api/drugs_api_spec.rb
283
+ - spec/api/networks_api_spec.rb
269
284
  - spec/api/plans_api_spec.rb
270
285
  - spec/api/providers_api_spec.rb
271
286
  - spec/api/zip_counties_api_spec.rb
@@ -296,6 +311,7 @@ specification_version: 4
296
311
  summary: Vericred API Ruby Gem
297
312
  test_files:
298
313
  - spec/api/drugs_api_spec.rb
314
+ - spec/api/networks_api_spec.rb
299
315
  - spec/api/plans_api_spec.rb
300
316
  - spec/api/providers_api_spec.rb
301
317
  - spec/api/zip_counties_api_spec.rb