Class: VericredClient::DrugsApi
- Inherits:
-
Object
- Object
- VericredClient::DrugsApi
- Defined in:
- lib/vericred_client/api/drugs_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#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.
-
#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.
-
#initialize(api_client = ApiClient.default) ⇒ DrugsApi
constructor
A new instance of DrugsApi.
-
#list_drugs(search_term, opts = {}) ⇒ DrugSearchResponse
Drug Search Search for drugs by proprietary name.
-
#list_drugs_with_http_info(search_term, opts = {}) ⇒ Array<(DrugSearchResponse, Fixnum, Hash)>
Drug Search Search for drugs by proprietary name.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
135 136 137 |
# File 'lib/vericred_client/api/drugs_api.rb', line 135 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
148 149 150 151 |
# File 'lib/vericred_client/api/drugs_api.rb', line 148 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
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/vericred_client/api/drugs_api.rb', line 160 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: DrugsApi.get_drug_coverages ..." end # verify the required parameter 'ndc_package_code' is set fail ArgumentError, "Missing the required parameter 'ndc_package_code' when calling DrugsApi.get_drug_coverages" if ndc_package_code.nil? # verify the required parameter 'audience' is set fail ArgumentError, "Missing the required parameter 'audience' when calling DrugsApi.get_drug_coverages" if audience.nil? # verify the required parameter 'state_code' is set fail ArgumentError, "Missing the required parameter 'state_code' when calling DrugsApi.get_drug_coverages" if state_code.nil? # resource path local_var_path = "/drug_packages/{ndc_package_code}/coverages".sub('{format}','json').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 = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # 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: DrugsApi#get_drug_coverages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_drugs(search_term, opts = {}) ⇒ DrugSearchResponse
Drug Search Search for drugs by proprietary name
213 214 215 216 |
# File 'lib/vericred_client/api/drugs_api.rb', line 213 def list_drugs(search_term, opts = {}) data, _status_code, _headers = list_drugs_with_http_info(search_term, opts) return data end |
#list_drugs_with_http_info(search_term, opts = {}) ⇒ Array<(DrugSearchResponse, Fixnum, Hash)>
Drug Search Search for drugs by proprietary name
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/vericred_client/api/drugs_api.rb', line 223 def list_drugs_with_http_info(search_term, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DrugsApi.list_drugs ..." end # verify the required parameter 'search_term' is set fail ArgumentError, "Missing the required parameter 'search_term' when calling DrugsApi.list_drugs" if search_term.nil? # resource path local_var_path = "/drugs".sub('{format}','json') # query parameters query_params = {} query_params[:'search_term'] = search_term # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # 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 => 'DrugSearchResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DrugsApi#list_drugs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |