Class: CandidApiClient::NonInsurancePayers::V1::AsyncV1Client
- Inherits:
-
Object
- Object
- CandidApiClient::NonInsurancePayers::V1::AsyncV1Client
- Defined in:
- lib/candidhealth/non_insurance_payers/v_1/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
- #create(request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
- #delete(non_insurance_payer_id:, request_options: nil) ⇒ Void
- #get(non_insurance_payer_id:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
- #get_multi(name: nil, category: nil, enabled: nil, sort: nil, sort_direction: nil, limit: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerPage
- #initialize(request_client:) ⇒ CandidApiClient::NonInsurancePayers::V1::AsyncV1Client constructor
- #toggle_enablement(non_insurance_payer_id:, request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
- #update(non_insurance_payer_id:, request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::NonInsurancePayers::V1::AsyncV1Client
203 204 205 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 203 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
199 200 201 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 199 def request_client @request_client end |
Instance Method Details
#create(request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 223 def create(request:, request_options: nil) Async do response = @request_client.conn.post do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(request || {}), **(&.additional_body_parameters || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payers/v1" end CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.from_json(json_object: response.body) end end |
#delete(non_insurance_payer_id:, request_options: nil) ⇒ Void
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 373 def delete(non_insurance_payer_id:, request_options: nil) Async do @request_client.conn.delete do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payers/v1/#{non_insurance_payer_id}" end end end |
#get(non_insurance_payer_id:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 321 def get(non_insurance_payer_id:, request_options: nil) Async do response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payers/v1/#{non_insurance_payer_id}" end CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.from_json(json_object: response.body) end end |
#get_multi(name: nil, category: nil, enabled: nil, sort: nil, sort_direction: nil, limit: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerPage
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 287 def get_multi(name: nil, category: nil, enabled: nil, sort: nil, sort_direction: nil, limit: nil, page_token: nil, request_options: nil) Async do response = @request_client.conn.get do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.params = { **(&.additional_query_parameters || {}), "name": name, "category": category, "enabled": enabled, "sort": sort, "sort_direction": sort_direction, "limit": limit, "page_token": page_token }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payers/v1" end CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerPage.from_json(json_object: response.body) end end |
#toggle_enablement(non_insurance_payer_id:, request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 249 def toggle_enablement(non_insurance_payer_id:, request:, request_options: nil) Async do response = @request_client.conn.patch do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(request || {}), **(&.additional_body_parameters || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payers/v1/#{non_insurance_payer_id}/toggle_enablement" end CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.from_json(json_object: response.body) end end |
#update(non_insurance_payer_id:, request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/candidhealth/non_insurance_payers/v_1/client.rb', line 349 def update(non_insurance_payer_id:, request:, request_options: nil) Async do response = @request_client.conn.patch do |req| req..timeout = .timeout_in_seconds unless &.timeout_in_seconds.nil? req.headers["Authorization"] = .token unless &.token.nil? req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.body = { **(request || {}), **(&.additional_body_parameters || {}) }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payers/v1/#{non_insurance_payer_id}" end CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer.from_json(json_object: response.body) end end |