Class: VericredClient::DrugCoveragesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/vericred_client/api/drug_coverages_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DrugCoveragesApi

Returns a new instance of DrugCoveragesApi.



19
20
21
# File 'lib/vericred_client/api/drug_coverages_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/vericred_client/api/drug_coverages_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_drug_coverages(ndc_package_code, audience, state_code, opts = {}) ⇒ DrugCoverageResponse

Search for DrugCoverages Drug Coverages are the specific tier level, quantity limit, prior authorization and step therapy for a given Drug/Plan combination. This endpoint returns all DrugCoverages for a given Drug. #### Tiers Possible values for tier: | Tier | Description | | ———————— | ——————————————————————————————————————————————————————————- | | __generic__ | Unbranded drugs, with the same active ingredients as their brand-name equivalents, and generally available at a lower cost. | | preferred_brand | Brand-name drugs included on the health plan’s formulary. Generally more expensive than generics, and less expensive than non-preferred drugs. | | non_preferred_brand | Brand-name drugs not included on the health plan’s formulary. These generally have a higher coinsurance. | | __specialty__ | Used to treat complex conditions like cancer. May require special handling or monitoring. May be generic or brand-name. Generally the most expensive drugs covered by a plan. | | not_covered | Specifically excluded from the health plan. | | not_listed | Neither included nor excluded from the health plan. Most plans provide some default level of coverage for unlisted drugs. |

Parameters:

  • ndc_package_code

    NDC package code

  • audience

    Plan Audience (individual or small_group)

  • state_code

    Two-character state code

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



30
31
32
33
# File 'lib/vericred_client/api/drug_coverages_api.rb', line 30

def get_drug_coverages(ndc_package_code, audience, state_code, opts = {})
  data, _status_code, _headers = get_drug_coverages_with_http_info(ndc_package_code, audience, state_code, opts)
  return data
end

#get_drug_coverages_with_http_info(ndc_package_code, audience, state_code, opts = {}) ⇒ Array<(DrugCoverageResponse, Fixnum, Hash)>

Search for DrugCoverages Drug Coverages are the specific tier level, quantity limit, prior authorization and step therapy for a given Drug/Plan combination. This endpoint returns all DrugCoverages for a given Drug. #### Tiers Possible values for tier: | Tier | Description | | ———————— | ——————————————————————————————————————————————————————————- | | __generic__ | Unbranded drugs, with the same active ingredients as their brand-name equivalents, and generally available at a lower cost. | | preferred_brand | Brand-name drugs included on the health plan&#39;s formulary. Generally more expensive than generics, and less expensive than non-preferred drugs. | | non_preferred_brand | Brand-name drugs not included on the health plan&#39;s formulary. These generally have a higher coinsurance. | | __specialty__ | Used to treat complex conditions like cancer. May require special handling or monitoring. May be generic or brand-name. Generally the most expensive drugs covered by a plan. | | not_covered | Specifically excluded from the health plan. | | not_listed | Neither included nor excluded from the health plan. Most plans provide some default level of coverage for unlisted drugs. |

Parameters:

  • ndc_package_code

    NDC package code

  • audience

    Plan Audience (individual or small_group)

  • state_code

    Two-character state code

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DrugCoverageResponse, Fixnum, Hash)>)

    DrugCoverageResponse data, response status code and response headers



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/vericred_client/api/drug_coverages_api.rb', line 42

def get_drug_coverages_with_http_info(ndc_package_code, audience, state_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DrugCoveragesApi.get_drug_coverages ..."
  end
  # verify the required parameter 'ndc_package_code' is set
  if @api_client.config.client_side_validation && ndc_package_code.nil?
    fail ArgumentError, "Missing the required parameter 'ndc_package_code' when calling DrugCoveragesApi.get_drug_coverages"
  end
  # verify the required parameter 'audience' is set
  if @api_client.config.client_side_validation && audience.nil?
    fail ArgumentError, "Missing the required parameter 'audience' when calling DrugCoveragesApi.get_drug_coverages"
  end
  # verify the required parameter 'state_code' is set
  if @api_client.config.client_side_validation && state_code.nil?
    fail ArgumentError, "Missing the required parameter 'state_code' when calling DrugCoveragesApi.get_drug_coverages"
  end
  # resource path
  local_var_path = "/drug_packages/{ndc_package_code}/coverages".sub('{' + 'ndc_package_code' + '}', ndc_package_code.to_s)

  # query parameters
  query_params = {}
  query_params[:'audience'] = audience
  query_params[:'state_code'] = state_code

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Vericred-Api-Key']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DrugCoverageResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DrugCoveragesApi#get_drug_coverages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end