Class: CandidApiClient::InsurancePayments::V1::AsyncV1Client
- Inherits:
-
Object
- Object
- CandidApiClient::InsurancePayments::V1::AsyncV1Client
- Defined in:
- lib/candidhealth/insurance_payments/v_1/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#get(insurance_payment_id:, request_options: nil) ⇒ CandidApiClient::InsurancePayments::V1::Types::InsurancePayment
Retrieves a previously created insurance payment by its ‘insurance_payment_id`.
-
#get_multi(limit: nil, payer_uuid: nil, claim_id: nil, service_line_id: nil, billing_provider_id: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::InsurancePayments::V1::Types::InsurancePaymentsPage
Returns all non-ERA originated insurance payments satisfying the search criteria.
- #initialize(request_client:) ⇒ CandidApiClient::InsurancePayments::V1::AsyncV1Client constructor
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::InsurancePayments::V1::AsyncV1Client
96 97 98 |
# File 'lib/candidhealth/insurance_payments/v_1/client.rb', line 96 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
92 93 94 |
# File 'lib/candidhealth/insurance_payments/v_1/client.rb', line 92 def request_client @request_client end |
Instance Method Details
#get(insurance_payment_id:, request_options: nil) ⇒ CandidApiClient::InsurancePayments::V1::Types::InsurancePayment
Retrieves a previously created insurance payment by its ‘insurance_payment_id`.
If the payment does not exist, a `403` will be thrown.
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/candidhealth/insurance_payments/v_1/client.rb', line 153 def get(insurance_payment_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/insurance-payments/v1/#{insurance_payment_id}" end CandidApiClient::InsurancePayments::V1::Types::InsurancePayment.from_json(json_object: response.body) end end |
#get_multi(limit: nil, payer_uuid: nil, claim_id: nil, service_line_id: nil, billing_provider_id: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::InsurancePayments::V1::Types::InsurancePaymentsPage
Returns all non-ERA originated insurance payments satisfying the search criteria
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/candidhealth/insurance_payments/v_1/client.rb', line 115 def get_multi(limit: nil, payer_uuid: nil, claim_id: nil, service_line_id: nil, billing_provider_id: nil, sort: nil, sort_direction: 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 || {}), "limit": limit, "payer_uuid": payer_uuid, "claim_id": claim_id, "service_line_id": service_line_id, "billing_provider_id": billing_provider_id, "sort": sort, "sort_direction": sort_direction, "page_token": page_token }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/insurance-payments/v1" end CandidApiClient::InsurancePayments::V1::Types::InsurancePaymentsPage.from_json(json_object: response.body) end end |