Class: Candid::Eligibility::V2::Client
- Inherits:
-
Object
- Object
- Candid::Eligibility::V2::Client
- Defined in:
- lib/candid/eligibility/v_2/client.rb
Instance Method Summary collapse
- #initialize(client:, base_url: nil, environment: nil) ⇒ void constructor
-
#submit_eligibility_check_availity(request_options: {}, **params) ⇒ Object
<Tip>Candid is deprecating support for this endpoint.
-
#submit_eligibility_check_availity_post(request_options: {}, **params) ⇒ Object
<Tip>Candid is deprecating support for this endpoint.
Constructor Details
#initialize(client:, base_url: nil, environment: nil) ⇒ void
12 13 14 15 16 |
# File 'lib/candid/eligibility/v_2/client.rb', line 12 def initialize(client:, base_url: nil, environment: nil) @client = client @base_url = base_url @environment = environment end |
Instance Method Details
#submit_eligibility_check_availity(request_options: {}, **params) ⇒ Object
<Tip>Candid is deprecating support for this endpoint. It is instead recommended to use [Candid’s Stedi passthrough endpoint](docs.joincandidhealth.com/api-reference/pre-encounter/eligibility-checks/v-1/post). For assistance with the transition, please reference the [Transitioning to Candid’s New Eligibility Endpoint](support.joincandidhealth.com/hc/en-us/articles/34918552872980) document in the Candid Support Center.</Tip>
**Availity has transitioned their GET endpoint to a POST endpoint. Candid has updated their pass-through integration to enable backwards compatibility for the GET endpoint so that customers do not have to immediately update their integrations.**
**Candid recommends integrations with the [POST endpoint](docs.joincandidhealth.com/api-reference/eligibility/v-2/submit-eligibility-check-availity-post) to ensure the best possible integration experience. Given the transition, Availity’s documentation will be out of sync with this endpoint.**
If you’d like access to this endpoint, please reach out to support@joincandidhealth.com with the subject line “Action: Activate Availity Eligibility API Endpoint
This API is a wrapper around Availity’s coverages API. Below are some helpful documentation links:
-
[Availity - Coverages 1.0.0
API](developer.availity.com/partner/documentation#c_coverages_references)
-
[Candid Availity Eligibility Integration
Guide](support.joincandidhealth.com/hc/en-us/articles/24218441631892–Availity-Eligibility-Integration-Guide)
A schema of the response object can be found here: [Availity Docs](developer.availity.com/partner/product/191210/api/190898#/Coverages_100/operation/%2Fcoverages%2Fid/get)
-
Note Availity requires a free developer account to access this documentation.
Check connection status of Availity API and partners here:
-
[Availity Trading Partner Connection Status](www.availity.com/status/)
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/candid/eligibility/v_2/client.rb', line 60 def submit_eligibility_check_availity(request_options: {}, **params) Candid::Internal::Types::Utils.normalize_keys(params) request = Candid::Internal::JSON::Request.new( base_url: [:base_url] || @base_url || @environment&.dig(:candid_api), method: "GET", path: "/api/eligibility/v2/availity", request_options: ) begin response = @client.send(request) rescue Net::HTTPRequestTimeout raise Candid::Errors::TimeoutError end code = response.code.to_i return if code.between?(200, 299) error_class = Candid::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) end |
#submit_eligibility_check_availity_post(request_options: {}, **params) ⇒ Object
<Tip>Candid is deprecating support for this endpoint. It is instead recommended to use [Candid’s Stedi passthrough endpoint](docs.joincandidhealth.com/api-reference/pre-encounter/eligibility-checks/v-1/post). For assistance with the transition, please reference the [Transitioning to Candid’s New Eligibility Endpoint](support.joincandidhealth.com/hc/en-us/articles/34918552872980) document in the Candid Support Center.</Tip>
If you’d like access to this endpoint, please reach out to support@joincandidhealth.com with the subject line “Action: Activate Availity Eligibility API Endpoint
This API is a wrapper around Availity’s coverages API. Below are some helpful documentation links:
-
[Availity - Coverages 1.0.0
API](developer.availity.com/partner/documentation#c_coverages_references)
-
[Candid Availity Eligibility Integration
Guide](support.joincandidhealth.com/hc/en-us/articles/24218441631892–Availity-Eligibility-Integration-Guide)
A schema of the response object can be found here: [Availity Docs](developer.availity.com/partner/product/191210/api/190898#/Coverages_100/operation/%2Fcoverages%2Fid/get)
-
Note Availity requires a free developer account to access this documentation.
Check connection status of Availity API and partners here:
-
[Availity Trading Partner Connection Status](www.availity.com/status/)
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/candid/eligibility/v_2/client.rb', line 113 def submit_eligibility_check_availity_post(request_options: {}, **params) params = Candid::Internal::Types::Utils.normalize_keys(params) request = Candid::Internal::JSON::Request.new( base_url: [:base_url] || @base_url || @environment&.dig(:candid_api), method: "POST", path: "/api/eligibility/v2/availity", body: params, request_options: ) begin response = @client.send(request) rescue Net::HTTPRequestTimeout raise Candid::Errors::TimeoutError end code = response.code.to_i return if code.between?(200, 299) error_class = Candid::Errors::ResponseError.subclass_for_code(code) raise error_class.new(response.body, code: code) end |