Class: CandidApiClient::ImportInvoice::V1::V1Client
- Inherits:
-
Object
- Object
- CandidApiClient::ImportInvoice::V1::V1Client
- 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::V1Client 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::V1Client
23 24 25 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 23 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
19 20 21 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 19 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
127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 127 def get(invoice_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/import-invoice/v1/#{invoice_id}" end CandidApiClient::ImportInvoice::V1::Types::ImportInvoice.from_json(json_object: response.body) 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.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 90 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) 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 |
#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.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 45 def import_invoice(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/import-invoice/v1" end CandidApiClient::ImportInvoice::V1::Types::ImportInvoice.from_json(json_object: response.body) end |
#update(invoice_id:, request:, request_options: nil) ⇒ CandidApiClient::ImportInvoice::V1::Types::ImportInvoice
Update the information on the imported invoice
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/candidhealth/import_invoice/v_1/client.rb', line 158 def update(invoice_id:, request:, request_options: nil) 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 |