Class: Candid::PatientAr::V1::Client
- Inherits:
-
Object
- Object
- Candid::PatientAr::V1::Client
- Defined in:
- lib/candid/patient_ar/v_1/client.rb
Instance Method Summary collapse
- #initialize(client:) ⇒ Candid::PatientAr::V1::Client constructor
-
#itemize(request_options: {}, **params) ⇒ Candid::PatientAr::V1::Types::InvoiceItemizationResponse
NOTE: This service is in-development and can only be used by select partners.
-
#list_inventory(request_options: {}, **params) ⇒ Candid::PatientAr::V1::Types::ListInventoryPagedResponse
NOTE: This service is in-development and can only be used by select partners.
Constructor Details
#initialize(client:) ⇒ Candid::PatientAr::V1::Client
8 9 10 |
# File 'lib/candid/patient_ar/v_1/client.rb', line 8 def initialize(client:) @client = client end |
Instance Method Details
#itemize(request_options: {}, **params) ⇒ Candid::PatientAr::V1::Types::InvoiceItemizationResponse
NOTE: This service is in-development and can only be used by select partners. Please contact Candid Health to request access.
Provides detailed itemization of invoice data for a specific claim.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/candid/patient_ar/v_1/client.rb', line 49 def itemize(request_options: {}, **params) _request = Candid::Internal::JSON::Request.new( base_url: [:base_url] || Candid::Environment::PRODUCTION, method: "GET", path: "/api/patient-ar/v1/invoice-itemization/#{params[:claim_id]}" ) begin _response = @client.send(_request) rescue Net::HTTPRequestTimeout raise Candid::Errors::TimeoutError end code = _response.code.to_i if code.between?(200, 299) Candid::PatientAr::V1::Types::InvoiceItemizationResponse.load(_response.body) else error_class = Candid::Errors::ResponseError.subclass_for_code(code) raise error_class.new(_response.body, code: code) end end |
#list_inventory(request_options: {}, **params) ⇒ Candid::PatientAr::V1::Types::ListInventoryPagedResponse
NOTE: This service is in-development and can only be used by select partners. Please contact Candid Health to request access.
Retrieve a list of inventory records based on the provided filters. Each inventory record provides the latest invoiceable status of the associated claim. The response is paginated, and the ‘page_token` can be used to retrieve subsequent pages. Initial requests should not include `page_token`.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/candid/patient_ar/v_1/client.rb', line 18 def list_inventory(request_options: {}, **params) params = Candid::Internal::Types::Utils.symbolize_keys(params) _query_param_names = %i[since limit page_token] _query = params.slice(*_query_param_names) params.except(*_query_param_names) _request = Candid::Internal::JSON::Request.new( base_url: [:base_url] || Candid::Environment::PRODUCTION, method: "GET", path: "/api/patient-ar/v1/inventory", query: _query ) begin _response = @client.send(_request) rescue Net::HTTPRequestTimeout raise Candid::Errors::TimeoutError end code = _response.code.to_i if code.between?(200, 299) Candid::PatientAr::V1::Types::ListInventoryPagedResponse.load(_response.body) else error_class = Candid::Errors::ResponseError.subclass_for_code(code) raise error_class.new(_response.body, code: code) end end |