Class: CandidApiClient::ImportInvoice::V1::AsyncV1Client
- Inherits:
-
Object
- Object
- CandidApiClient::ImportInvoice::V1::AsyncV1Client
- Defined in:
- lib/candidhealth/import_invoice/v_1/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#get(invoice_id:, request_options: nil) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoice
Retrieve and view an import invoice.
-
#get_multi(patient_external_id: nil, encounter_external_id: nil, note: nil, due_date_before: nil, due_date_after: nil, status: nil, limit: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoicesPage
Returns all Invoices for the authenticated user’s organziation with all filters applied.
-
#import_invoice(request:, request_options: nil) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoice
Import an existing invoice from a third party service to reflect state in Candid.
- #initialize(request_client:) ⇒ CandidApiClient::ImportInvoice::V1::AsyncV1Client constructor
-
#update(invoice_id:, request:, request_options: nil) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoice
Update the information on the imported invoice.
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::ImportInvoice::V1::AsyncV1Client
181 182 183 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 181 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
177 178 179 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 177 def request_client @request_client end |
Instance Method Details
#get(invoice_id:, request_options: nil) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoice
Retrieve and view an import invoice
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 289 def get(invoice_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/import-invoice/v1/#{invoice_id}" end CandidApiClient::ImportInvoice::V1::Types::ImportInvoice.from_json(json_object: response.body) end end |
#get_multi(patient_external_id: nil, encounter_external_id: nil, note: nil, due_date_before: nil, due_date_after: nil, status: nil, limit: nil, sort: nil, sort_direction: nil, page_token: nil, request_options: nil) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoicesPage
Returns all Invoices for the authenticated user’s organziation with all filters
applied.
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 250 def get_multi(patient_external_id: nil, encounter_external_id: nil, note: nil, due_date_before: nil, due_date_after: nil, status: nil, limit: 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 || {}), "patient_external_id": patient_external_id, "encounter_external_id": encounter_external_id, "note": note, "due_date_before": due_date_before, "due_date_after": due_date_after, "status": status, "limit": limit, "sort": sort, "sort_direction": sort_direction, "page_token": page_token }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/import-invoice/v1" end CandidApiClient::ImportInvoice::V1::Types::ImportInvoicesPage.from_json(json_object: response.body) end end |
#import_invoice(request:, request_options: nil) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoice
Import an existing invoice from a third party service to reflect state in
Candid.
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 203 def import_invoice(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/import-invoice/v1" end CandidApiClient::ImportInvoice::V1::Types::ImportInvoice.from_json(json_object: response.body) end end |
#update(invoice_id:, request:, request_options: nil) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoice
Update the information on the imported invoice
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 322 def update(invoice_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/import-invoice/v1/#{invoice_id}" end CandidApiClient::ImportInvoice::V1::Types::ImportInvoice.from_json(json_object: response.body) end end |