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
86 87 88 |
# File 'lib/candidhealth/exports/v_3/client.rb', line 86 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ CandidApiClient::AsyncRequestClient (readonly)
82 83 84 |
# File 'lib/candidhealth/exports/v_3/client.rb', line 82 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.
**New Customers:** This endpoint is not enabled by default for new Candid
customers. To have this endpoint enabled for your organization,
please email our [Support team](mailto:[email protected]) with the
request.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/candidhealth/exports/v_3/client.rb', line 128 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: request_options)}/api/exports/v3" end CandidApiClient::Exports::V3::Types::GetExportsResponse.from_json(json_object: response.body) end end |