Class: VericredClient::FormulariesApi
- Inherits:
-
Object
- Object
- VericredClient::FormulariesApi
- Defined in:
- lib/vericred_client/api/formularies_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ FormulariesApi
constructor
A new instance of FormulariesApi.
-
#list_formularies(opts = {}) ⇒ FormularyResponse
Formulary Search Search for drugs by proprietary name.
-
#list_formularies_with_http_info(opts = {}) ⇒ Array<(FormularyResponse, Fixnum, Hash)>
Formulary Search Search for drugs by proprietary name.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ FormulariesApi
Returns a new instance of FormulariesApi.
19 20 21 |
# File 'lib/vericred_client/api/formularies_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/vericred_client/api/formularies_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#list_formularies(opts = {}) ⇒ FormularyResponse
Formulary Search Search for drugs by proprietary name
31 32 33 34 |
# File 'lib/vericred_client/api/formularies_api.rb', line 31 def list_formularies(opts = {}) data, _status_code, _headers = list_formularies_with_http_info(opts) return data end |
#list_formularies_with_http_info(opts = {}) ⇒ Array<(FormularyResponse, Fixnum, Hash)>
Formulary Search Search for drugs by proprietary name
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 |
# File 'lib/vericred_client/api/formularies_api.rb', line 44 def list_formularies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FormulariesApi.list_formularies ..." end # resource path local_var_path = "/formularies" # query parameters query_params = {} query_params[:'search_term'] = opts[:'search_term'] if !opts[:'search_term'].nil? query_params[:'rx_bin'] = opts[:'rx_bin'] if !opts[:'rx_bin'].nil? query_params[:'rx_group'] = opts[:'rx_group'] if !opts[:'rx_group'].nil? query_params[:'rx_pcn'] = opts[:'rx_pcn'] if !opts[:'rx_pcn'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # 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 => 'FormularyResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: FormulariesApi#list_formularies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |