Class: CandidApiClient::NonInsurancePayerRefunds::V1::AsyncV1Client
- Inherits:
-
Object
- Object
- CandidApiClient::NonInsurancePayerRefunds::V1::AsyncV1Client
- Defined in:
- lib/candidhealth/non_insurance_payer_refunds/v_1/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#create(request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefund
Creates a new non-insurance payer refund record and returns the newly created ‘NonInsurancePayerRefund` object.
-
#delete(non_insurance_payer_refund_id:, request_options: nil) ⇒ Void
Deletes the non-insurance payer refund record matching the provided ‘non_insurance_payer_refund_id`.
-
#get(non_insurance_payer_refund_id:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefund
Retrieves a previously created non-insurance payer refund by its ‘non_insurance_payer_refund_id`.
-
#get_multi(limit: nil, non_insurance_payer_id: nil, check_number: nil, invoice_id: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefundsPage
Returns all non-insurance payer refunds satisfying the search criteria.
- #initialize(request_client:) ⇒ CandidApiClient::NonInsurancePayerRefunds::V1::AsyncV1Client constructor
-
#update(non_insurance_payer_refund_id:, refund_timestamp: nil, refund_note: nil, refund_reason: nil, invoice_id: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefund
Updates the non-insurance payer refund record matching the provided non_insurance_payer_refund_id.
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::NonInsurancePayerRefunds::V1::AsyncV1Client
202 203 204 |
# File 'lib/candidhealth/non_insurance_payer_refunds/v_1/client.rb', line 202 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
198 199 200 |
# File 'lib/candidhealth/non_insurance_payer_refunds/v_1/client.rb', line 198 def request_client @request_client end |
Instance Method Details
#create(request:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefund
Creates a new non-insurance payer refund record and returns the newly created
`NonInsurancePayerRefund` object.
The allocations can describe whether the refund is being applied toward a
specific service line,
claim, or billing provider.
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/candidhealth/non_insurance_payer_refunds/v_1/client.rb', line 301 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-payer-refunds/v1" end CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefund.from_json(json_object: response.body) end end |
#delete(non_insurance_payer_refund_id:, request_options: nil) ⇒ Void
Deletes the non-insurance payer refund record matching the provided
`non_insurance_payer_refund_id`.
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
# File 'lib/candidhealth/non_insurance_payer_refunds/v_1/client.rb', line 367 def delete(non_insurance_payer_refund_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-payer-refunds/v1/#{non_insurance_payer_refund_id}" end end end |
#get(non_insurance_payer_refund_id:, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefund
Retrieves a previously created non-insurance payer refund by its
`non_insurance_payer_refund_id`.
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/candidhealth/non_insurance_payer_refunds/v_1/client.rb', line 265 def get(non_insurance_payer_refund_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-payer-refunds/v1/#{non_insurance_payer_refund_id}" end CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefund.from_json(json_object: response.body) end end |
#get_multi(limit: nil, non_insurance_payer_id: nil, check_number: nil, invoice_id: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefundsPage
Returns all non-insurance payer refunds satisfying the search criteria
228 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 |
# File 'lib/candidhealth/non_insurance_payer_refunds/v_1/client.rb', line 228 def get_multi(limit: nil, non_insurance_payer_id: nil, check_number: nil, invoice_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, "non_insurance_payer_id": non_insurance_payer_id, "check_number": check_number, "invoice_id": invoice_id, "sort": sort, "sort_direction": sort_direction, "page_token": page_token }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payer-refunds/v1" end CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefundsPage.from_json(json_object: response.body) end end |
#update(non_insurance_payer_refund_id:, refund_timestamp: nil, refund_note: nil, refund_reason: nil, invoice_id: nil, request_options: nil) ⇒ CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefund
Updates the non-insurance payer refund record matching the provided
non_insurance_payer_refund_id. If updating the refund amount,
then the allocations must be appropriately updated as well.
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/candidhealth/non_insurance_payer_refunds/v_1/client.rb', line 333 def update(non_insurance_payer_refund_id:, refund_timestamp: nil, refund_note: nil, refund_reason: nil, invoice_id: nil, 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 = { **(&.additional_body_parameters || {}), refund_timestamp: , refund_note: refund_note, refund_reason: refund_reason, invoice_id: invoice_id }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/non-insurance-payer-refunds/v1/#{non_insurance_payer_refund_id}" end CandidApiClient::NonInsurancePayerRefunds::V1::Types::NonInsurancePayerRefund.from_json(json_object: response.body) end end |