Class: CandidApiClient::InsuranceAdjudications::V1::V1Client
- Inherits:
-
Object
- Object
- CandidApiClient::InsuranceAdjudications::V1::V1Client
- Defined in:
- lib/candidhealth/insurance_adjudications/v_1/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#create(request:, request_options: nil) ⇒ CandidApiClient::InsuranceAdjudications::V1::Types::InsuranceAdjudication
Creates a new insurance adjudication record and returns the newly created InsuranceAdjudication object.
-
#delete(insurance_adjudication_id:, request_options: nil) ⇒ Void
Deletes the insurance adjudication record matching the provided insurance_adjudication_id.
-
#get(insurance_adjudication_id:, request_options: nil) ⇒ CandidApiClient::InsuranceAdjudications::V1::Types::InsuranceAdjudication
Retrieves a previously created insurance adjudication by its ‘insurance_adjudication_id`.
- #initialize(request_client:) ⇒ CandidApiClient::InsuranceAdjudications::V1::V1Client constructor
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::InsuranceAdjudications::V1::V1Client
17 18 19 |
# File 'lib/candidhealth/insurance_adjudications/v_1/client.rb', line 17 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
13 14 15 |
# File 'lib/candidhealth/insurance_adjudications/v_1/client.rb', line 13 def request_client @request_client end |
Instance Method Details
#create(request:, request_options: nil) ⇒ CandidApiClient::InsuranceAdjudications::V1::Types::InsuranceAdjudication
Creates a new insurance adjudication record and returns the newly created
InsuranceAdjudication object.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/candidhealth/insurance_adjudications/v_1/client.rb', line 64 def create(request:, request_options: nil) 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/insurance-adjudications/v1" end CandidApiClient::InsuranceAdjudications::V1::Types::InsuranceAdjudication.from_json(json_object: response.body) end |
#delete(insurance_adjudication_id:, request_options: nil) ⇒ Void
Deletes the insurance adjudication record matching the provided
insurance_adjudication_id.
89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/candidhealth/insurance_adjudications/v_1/client.rb', line 89 def delete(insurance_adjudication_id:, request_options: nil) @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/insurance-adjudications/v1/#{insurance_adjudication_id}" end end |
#get(insurance_adjudication_id:, request_options: nil) ⇒ CandidApiClient::InsuranceAdjudications::V1::Types::InsuranceAdjudication
Retrieves a previously created insurance adjudication by its
`insurance_adjudication_id`.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/candidhealth/insurance_adjudications/v_1/client.rb', line 30 def get(insurance_adjudication_id:, request_options: nil) 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/insurance-adjudications/v1/#{insurance_adjudication_id}" end CandidApiClient::InsuranceAdjudications::V1::Types::InsuranceAdjudication.from_json(json_object: response.body) end |