Class: CandidApiClient::Exports::V3::V3Client
- Inherits:
-
Object
- Object
- CandidApiClient::Exports::V3::V3Client
- Defined in:
- lib/candidhealth/exports/v_3/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#get_exports(start_date:, end_date:, request_options: nil) ⇒ CandidApiClient::Exports::V3::Types::GetExportsResponse
Retrieve CSV-formatted reports on claim submissions and outcomes.
- #initialize(request_client:) ⇒ CandidApiClient::Exports::V3::V3Client constructor
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::Exports::V3::V3Client
17 18 19 |
# File 'lib/candidhealth/exports/v_3/client.rb', line 17 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::RequestClient (readonly)
13 14 15 |
# File 'lib/candidhealth/exports/v_3/client.rb', line 13 def request_client @request_client end |
Instance Method Details
#get_exports(start_date:, end_date:, request_options: nil) ⇒ CandidApiClient::Exports::V3::Types::GetExportsResponse
Retrieve CSV-formatted reports on claim submissions and outcomes. This endpoint
returns Export objects that contain an
authenticated URL to a customer's reports with a 2min TTL. The schema for the
CSV export can be found
[here](https://app.joincandidhealth.com/files/exports_schema.csv).
**Schema changes:** Changing column order, removing columns, or changing the
name of a column is considered a
[Breaking Change](../../../api-principles/breaking-changes). Adding new columns
to the end of the Exports file is not considered a
Breaking Change and happens periodically. For this reason, it is important that
any downstream automation or processes built on top
of Candid Health's export files be resilient to the addition of new columns at
the end of the file.
**SLA guarantees:** Files for a given date are guaranteed to be available after
3 business days. For example, Friday's file will be
available by Wednesday at the latest. If file generation is still in progress
upon request before 3 business days have passed, the
caller will receive a 422 response. If the file has already been generated, it
will be served. Historic files should be available
up to 90 days in the past by default. Please email our [Support
team](mailto:[email protected]) with any data requests
outside of these stated guarantees.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/candidhealth/exports/v_3/client.rb', line 55 def get_exports(start_date:, end_date:, 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 || {}), "start_date": start_date, "end_date": end_date }.compact req.url "#{@request_client.get_url(environment: CandidApi, request_options: )}/api/exports/v3" end CandidApiClient::Exports::V3::Types::GetExportsResponse.from_json(json_object: response.body) end |