Module: VericredClient

Defined in:
lib/vericred_client/version.rb,
lib/vericred_client.rb,
lib/vericred_client/api_error.rb,
lib/vericred_client/api_client.rb,
lib/vericred_client/models/base.rb,
lib/vericred_client/models/drug.rb,
lib/vericred_client/models/meta.rb,
lib/vericred_client/models/plan.rb,
lib/vericred_client/models/state.rb,
lib/vericred_client/api/drugs_api.rb,
lib/vericred_client/api/plans_api.rb,
lib/vericred_client/configuration.rb,
lib/vericred_client/models/county.rb,
lib/vericred_client/models/carrier.rb,
lib/vericred_client/models/network.rb,
lib/vericred_client/models/pricing.rb,
lib/vericred_client/models/provider.rb,
lib/vericred_client/models/zip_code.rb,
lib/vericred_client/api/networks_api.rb,
lib/vericred_client/models/applicant.rb,
lib/vericred_client/api/providers_api.rb,
lib/vericred_client/models/zip_county.rb,
lib/vericred_client/models/county_bulk.rb,
lib/vericred_client/models/plan_county.rb,
lib/vericred_client/models/rating_area.rb,
lib/vericred_client/models/drug_package.rb,
lib/vericred_client/models/service_area.rb,
lib/vericred_client/api/zip_counties_api.rb,
lib/vericred_client/models/drug_coverage.rb,
lib/vericred_client/models/zip_county_bulk.rb,
lib/vericred_client/models/plan_county_bulk.rb,
lib/vericred_client/models/request_plan_find.rb,
lib/vericred_client/models/carrier_subsidiary.rb,
lib/vericred_client/models/plan_search_result.rb,
lib/vericred_client/models/plan_show_response.rb,
lib/vericred_client/models/zip_county_response.rb,
lib/vericred_client/models/drug_search_response.rb,
lib/vericred_client/models/plan_search_response.rb,
lib/vericred_client/models/zip_counties_response.rb,
lib/vericred_client/models/drug_coverage_response.rb,
lib/vericred_client/models/provider_show_response.rb,
lib/vericred_client/models/network_search_response.rb,
lib/vericred_client/models/service_area_zip_county.rb,
lib/vericred_client/models/request_providers_search.rb,
lib/vericred_client/models/providers_search_response.rb,
lib/vericred_client/models/request_plan_find_provider.rb,
lib/vericred_client/models/request_plan_find_applicant.rb,
lib/vericred_client/models/request_plan_find_drug_package.rb

Overview

#Vericred API

#Vericred’s API allows you to search for Health Plans that a specific doctor accepts.

## Getting Started

Visit our [Developer Portal](vericred.3scale.net) to create an account.

Once you have created an account, you can create one Application for Production and another for our Sandbox (select the appropriate Plan when you create the Application).

## Authentication

To authenticate, pass the API Key you created in the Developer Portal as a ‘Vericred-Api-Key` header.

‘curl -H ’Vericred-Api-Key: YOUR_KEY’ “api.vericred.com/providers?search_term=Foo&zip_code=11215”‘

## Versioning

Vericred’s API default to the latest version. However, if you need a specific version, you can request it with an ‘Accept-Version` header.

The current version is ‘v3`. Previous versions are `v1` and `v2`.

‘curl -H ’Vericred-Api-Key: YOUR_KEY’ -H ‘Accept-Version: v2’ “api.vericred.com/providers?search_term=Foo&zip_code=11215”‘

## Pagination

Endpoints that accept ‘page` and `per_page` parameters are paginated. They expose four additional fields that contain data about your position in the response, namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](tools.ietf.org/html/rfc5988).

For example, to display 5 results per page and view the second page of a ‘GET` to `/networks`, your final request would be `GET /networks?.…page=2&per_page=5`.

## Sideloading

When we return multiple levels of an object graph (e.g. ‘Provider`s and their `State`s we sideload the associated data. In this example, we would provide an Array of `State`s and a `state_id` for each provider. This is done primarily to reduce the payload size since many of the `Provider`s will share a `State`

“‘

providers: [{ id: 1, state_id: 1, { id: 2, state_id: 1 }],
states: [{ id: 1, code: 'NY' }]

} “‘

If you need the second level of the object graph, you can just match the corresponding id.

## Selecting specific data

All endpoints allow you to specify which fields you would like to return. This allows you to limit the response to contain only the data you need.

For example, let’s take a request that returns the following JSON by default

“‘ {

provider: {
  id: 1,
  name: 'John',
  phone: '1234567890',
  field_we_dont_care_about: 'value_we_dont_care_about'
},
states: [{
  id: 1,
  name: 'New York',
  code: 'NY',
  field_we_dont_care_about: 'value_we_dont_care_about'
}]

} “‘

To limit our results to only return the fields we care about, we specify the ‘select` query string parameter for the corresponding fields in the JSON document.

In this case, we want to select ‘name` and `phone` from the `provider` key, so we would add the parameters `select=provider.name,provider.phone`. We also want the `name` and `code` from the `states` key, so we would add the parameters `select=states.name,staes.code`. The id field of each document is always returned whether or not it is requested.

Our final request would be ‘GET /providers/12345?select=provider.name,provider.phone,states.name,states.code`

The response would be

“‘ {

provider: {
  id: 1,
  name: 'John',
  phone: '1234567890'
},
states: [{
  id: 1,
  name: 'New York',
  code: 'NY'
}]

} “‘

OpenAPI spec version: 1.0.0

Generated by: github.com/swagger-api/swagger-codegen.git

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Defined Under Namespace

Classes: ApiClient, ApiError, Applicant, Base, Carrier, CarrierSubsidiary, Configuration, County, CountyBulk, Drug, DrugCoverage, DrugCoverageResponse, DrugPackage, DrugSearchResponse, DrugsApi, Meta, Network, NetworkSearchResponse, NetworksApi, Plan, PlanCounty, PlanCountyBulk, PlanSearchResponse, PlanSearchResult, PlanShowResponse, PlansApi, Pricing, Provider, ProviderShowResponse, ProvidersApi, ProvidersSearchResponse, RatingArea, RequestPlanFind, RequestPlanFindApplicant, RequestPlanFindDrugPackage, RequestPlanFindProvider, RequestProvidersSearch, ServiceArea, ServiceAreaZipCounty, State, ZipCode, ZipCountiesApi, ZipCountiesResponse, ZipCounty, ZipCountyBulk, ZipCountyResponse

Constant Summary collapse

VERSION =
"0.0.9"

Class Method Summary collapse

Class Method Details

.configureObject

Customize default settings for the SDK using block.

VericredClient.configure do |config|
  config.username = "xxx"
  config.password = "xxx"
end

If no block given, return the default Configuration object.



192
193
194
195
196
197
198
# File 'lib/vericred_client.rb', line 192

def configure
  if block_given?
    yield(Configuration.default)
  else
    Configuration.default
  end
end