Class: VericredClient::ProvidersApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ProvidersApi

Returns a new instance of ProvidersApi.



132
133
134
# File 'lib/vericred_client/api/providers_api.rb', line 132

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



130
131
132
# File 'lib/vericred_client/api/providers_api.rb', line 130

def api_client
  @api_client
end

Instance Method Details

#providers_get(search_term, zip_code, opts = {}) ⇒ InlineResponse200

Find providers by term and zip code

Parameters:

  • search_term

    String to search by

  • zip_code

    Zip Code to search near

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

    the optional parameters

Options Hash (opts):

  • :accepts_insurance (String)

    Limit results to Providers who accept at least one insurance?

  • :hios_ids (Array<String>)

    HIOS id of one or more plans

  • :page (String)

    Page number

  • :per_page (String)

    Number of records to return per page

  • :radius (String)

    Radius (in miles) to use to limit results

Returns:



147
148
149
150
# File 'lib/vericred_client/api/providers_api.rb', line 147

def providers_get(search_term, zip_code, opts = {})
  data, _status_code, _headers = providers_get_with_http_info(search_term, zip_code, opts)
  return data
end

#providers_get_with_http_info(search_term, zip_code, opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>

Find providers by term and zip code

Parameters:

  • search_term

    String to search by

  • zip_code

    Zip Code to search near

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

    the optional parameters

Options Hash (opts):

  • :accepts_insurance (String)

    Limit results to Providers who accept at least one insurance?

  • :hios_ids (Array<String>)

    HIOS id of one or more plans

  • :page (String)

    Page number

  • :per_page (String)

    Number of records to return per page

  • :radius (String)

    Radius (in miles) to use to limit results

Returns:

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

    InlineResponse200 data, response status code and response headers



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
207
208
209
210
211
212
# File 'lib/vericred_client/api/providers_api.rb', line 163

def providers_get_with_http_info(search_term, zip_code, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProvidersApi.providers_get ..."
  end
  # verify the required parameter 'search_term' is set
  fail ArgumentError, "Missing the required parameter 'search_term' when calling ProvidersApi.providers_get" if search_term.nil?
  # verify the required parameter 'zip_code' is set
  fail ArgumentError, "Missing the required parameter 'zip_code' when calling ProvidersApi.providers_get" if zip_code.nil?
  # resource path
  local_var_path = "/providers".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'search_term'] = search_term
  query_params[:'zip_code'] = zip_code
  query_params[:'accepts_insurance'] = opts[:'accepts_insurance'] if opts[:'accepts_insurance']
  query_params[:'hios_ids'] = @api_client.build_collection_param(opts[:'hios_ids'], :csv) if opts[:'hios_ids']
  query_params[:'page'] = opts[:'page'] if opts[:'page']
  query_params[:'per_page'] = opts[:'per_page'] if opts[:'per_page']
  query_params[:'radius'] = opts[:'radius'] if opts[:'radius']

  # 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 = []
  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 => 'InlineResponse200')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProvidersApi#providers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#providers_npi_get(npi, opts = {}) ⇒ InlineResponse2001

Find a specific Provider

Parameters:

  • npi

    NPI number

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

    the optional parameters

Returns:



219
220
221
222
# File 'lib/vericred_client/api/providers_api.rb', line 219

def providers_npi_get(npi, opts = {})
  data, _status_code, _headers = providers_npi_get_with_http_info(npi, opts)
  return data
end

#providers_npi_get_with_http_info(npi, opts = {}) ⇒ Array<(InlineResponse2001, Fixnum, Hash)>

Find a specific Provider

Parameters:

  • npi

    NPI number

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

    the optional parameters

Returns:

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

    InlineResponse2001 data, response status code and response headers



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
265
266
267
268
269
# File 'lib/vericred_client/api/providers_api.rb', line 229

def providers_npi_get_with_http_info(npi, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ProvidersApi.providers_npi_get ..."
  end
  # verify the required parameter 'npi' is set
  fail ArgumentError, "Missing the required parameter 'npi' when calling ProvidersApi.providers_npi_get" if npi.nil?
  # resource path
  local_var_path = "/providers/{npi}".sub('{format}','json').sub('{' + 'npi' + '}', npi.to_s)

  # query parameters
  query_params = {}

  # 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 = []
  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 => 'InlineResponse2001')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ProvidersApi#providers_npi_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end