Class: VericredClient::ProvidersApi
- Inherits:
-
Object
- Object
- VericredClient::ProvidersApi
- Defined in:
- lib/vericred_client/api/providers_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) ⇒ ProvidersApi
constructor
A new instance of ProvidersApi.
-
#providers_get(search_term, zip_code, opts = {}) ⇒ InlineResponse200
Find providers by term and zip code.
-
#providers_get_with_http_info(search_term, zip_code, opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>
Find providers by term and zip code.
-
#providers_npi_get(npi, opts = {}) ⇒ InlineResponse2001
Find a specific Provider.
-
#providers_npi_get_with_http_info(npi, opts = {}) ⇒ Array<(InlineResponse2001, Fixnum, Hash)>
Find a specific Provider.
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_client ⇒ Object
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
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
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
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
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 |