Class: CandidApiClient::Exports::V3::AsyncV3Client
- Inherits:
-
Object
- Object
- CandidApiClient::Exports::V3::AsyncV3Client
- 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::AsyncV3Client constructor
Constructor Details
#initialize(request_client:) ⇒ CandidApiClient::Exports::V3::AsyncV3Client
82 83 84 |
# File 'lib/candidhealth/exports/v_3/client.rb', line 82 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
78 79 80 |
# File 'lib/candidhealth/exports/v_3/client.rb', line 78 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.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/candidhealth/exports/v_3/client.rb', line 120 def get_exports(start_date:, end_date:, 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 || {}), "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 end |