Class: CandidApiClient::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client_id:, client_secret:, base_url: nil, environment: CandidApiClient::Environment::PRODUCTION, max_retries: nil, timeout_in_seconds: nil) ⇒ CandidApiClient::Client

Parameters:

  • base_url (String) (defaults to: nil)
  • environment (CandidApiClient::Environment) (defaults to: CandidApiClient::Environment::PRODUCTION)
  • max_retries (Long) (defaults to: nil)

    The number of times to retry a failed request, defaults to 2.

  • timeout_in_seconds (Long) (defaults to: nil)
  • client_id (String)
  • client_secret (String)


114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/candidhealth.rb', line 114

def initialize(client_id:, client_secret:, base_url: nil, environment: CandidApiClient::Environment::PRODUCTION, max_retries: nil,
               timeout_in_seconds: nil)
  @oauth_provider = CandidApiClient::OauthTokenProvider.new(
    client_id: client_id,
    client_secret: client_secret,
    request_client: CandidApiClient::RequestClient.new(
      base_url: base_url,
      environment: environment,
      max_retries: max_retries,
      timeout_in_seconds: timeout_in_seconds
    )
  )
  @request_client = CandidApiClient::RequestClient.new(
    base_url: base_url,
    environment: environment,
    max_retries: max_retries,
    timeout_in_seconds: timeout_in_seconds,
    token: @oauth_provider.method(:token)
  )
  @auth = CandidApiClient::Auth::Client.new(request_client: @request_client)
  @billing_notes = CandidApiClient::BillingNotes::Client.new(request_client: @request_client)
  @contracts = CandidApiClient::Contracts::Client.new(request_client: @request_client)
  @credentialing = CandidApiClient::Credentialing::Client.new(request_client: @request_client)
  @custom_schemas = CandidApiClient::CustomSchemas::Client.new(request_client: @request_client)
  @eligibility = CandidApiClient::Eligibility::Client.new(request_client: @request_client)
  @encounter_providers = CandidApiClient::EncounterProviders::Client.new(request_client: @request_client)
  @encounters = CandidApiClient::Encounters::Client.new(request_client: @request_client)
  @expected_network_status = CandidApiClient::ExpectedNetworkStatus::Client.new(request_client: @request_client)
  @exports = CandidApiClient::Exports::Client.new(request_client: @request_client)
  @external_payment_account_config = CandidApiClient::ExternalPaymentAccountConfig::Client.new(request_client: @request_client)
  @fee_schedules = CandidApiClient::FeeSchedules::Client.new(request_client: @request_client)
  @guarantor = CandidApiClient::Guarantor::Client.new(request_client: @request_client)
  @import_invoice = CandidApiClient::ImportInvoice::Client.new(request_client: @request_client)
  @insurance_adjudications = CandidApiClient::InsuranceAdjudications::Client.new(request_client: @request_client)
  @insurance_payments = CandidApiClient::InsurancePayments::Client.new(request_client: @request_client)
  @insurance_refunds = CandidApiClient::InsuranceRefunds::Client.new(request_client: @request_client)
  @medication_dispense = CandidApiClient::MedicationDispense::Client.new(request_client: @request_client)
  @non_insurance_payer_payments = CandidApiClient::NonInsurancePayerPayments::Client.new(request_client: @request_client)
  @non_insurance_payer_refunds = CandidApiClient::NonInsurancePayerRefunds::Client.new(request_client: @request_client)
  @non_insurance_payers = CandidApiClient::NonInsurancePayers::Client.new(request_client: @request_client)
  @organization_service_facilities = CandidApiClient::OrganizationServiceFacilities::Client.new(request_client: @request_client)
  @organization_providers = CandidApiClient::OrganizationProviders::Client.new(request_client: @request_client)
  @patient_payments = CandidApiClient::PatientPayments::Client.new(request_client: @request_client)
  @patient_refunds = CandidApiClient::PatientRefunds::Client.new(request_client: @request_client)
  @payers = CandidApiClient::Payers::Client.new(request_client: @request_client)
  @service_lines = CandidApiClient::ServiceLines::Client.new(request_client: @request_client)
  @tasks = CandidApiClient::Tasks::Client.new(request_client: @request_client)
  @write_offs = CandidApiClient::WriteOffs::Client.new(request_client: @request_client)
  @pre_encounter = CandidApiClient::PreEncounter::Client.new(request_client: @request_client)
  @diagnoses = CandidApiClient::DiagnosesClient.new(request_client: @request_client)
  @service_facility = CandidApiClient::ServiceFacilityClient.new(request_client: @request_client)
end

Instance Attribute Details

#authCandidApiClient::Auth::Client (readonly)



43
44
45
# File 'lib/candidhealth.rb', line 43

def auth
  @auth
end

#billing_notesCandidApiClient::BillingNotes::Client (readonly)



45
46
47
# File 'lib/candidhealth.rb', line 45

def billing_notes
  @billing_notes
end

#contractsCandidApiClient::Contracts::Client (readonly)



47
48
49
# File 'lib/candidhealth.rb', line 47

def contracts
  @contracts
end

#credentialingCandidApiClient::Credentialing::Client (readonly)



49
50
51
# File 'lib/candidhealth.rb', line 49

def credentialing
  @credentialing
end

#custom_schemasCandidApiClient::CustomSchemas::Client (readonly)



51
52
53
# File 'lib/candidhealth.rb', line 51

def custom_schemas
  @custom_schemas
end

#diagnosesCandidApiClient::DiagnosesClient (readonly)



103
104
105
# File 'lib/candidhealth.rb', line 103

def diagnoses
  @diagnoses
end

#eligibilityCandidApiClient::Eligibility::Client (readonly)



53
54
55
# File 'lib/candidhealth.rb', line 53

def eligibility
  @eligibility
end

#encounter_providersCandidApiClient::EncounterProviders::Client (readonly)



55
56
57
# File 'lib/candidhealth.rb', line 55

def encounter_providers
  @encounter_providers
end

#encountersCandidApiClient::Encounters::Client (readonly)



57
58
59
# File 'lib/candidhealth.rb', line 57

def encounters
  @encounters
end

#expected_network_statusCandidApiClient::ExpectedNetworkStatus::Client (readonly)



59
60
61
# File 'lib/candidhealth.rb', line 59

def expected_network_status
  @expected_network_status
end

#exportsCandidApiClient::Exports::Client (readonly)



61
62
63
# File 'lib/candidhealth.rb', line 61

def exports
  @exports
end

#external_payment_account_configCandidApiClient::ExternalPaymentAccountConfig::Client (readonly)



63
64
65
# File 'lib/candidhealth.rb', line 63

def 
  @external_payment_account_config
end

#fee_schedulesCandidApiClient::FeeSchedules::Client (readonly)



65
66
67
# File 'lib/candidhealth.rb', line 65

def fee_schedules
  @fee_schedules
end

#guarantorCandidApiClient::Guarantor::Client (readonly)



67
68
69
# File 'lib/candidhealth.rb', line 67

def guarantor
  @guarantor
end

#import_invoiceCandidApiClient::ImportInvoice::Client (readonly)



69
70
71
# File 'lib/candidhealth.rb', line 69

def import_invoice
  @import_invoice
end

#insurance_adjudicationsCandidApiClient::InsuranceAdjudications::Client (readonly)



71
72
73
# File 'lib/candidhealth.rb', line 71

def insurance_adjudications
  @insurance_adjudications
end

#insurance_paymentsCandidApiClient::InsurancePayments::Client (readonly)



73
74
75
# File 'lib/candidhealth.rb', line 73

def insurance_payments
  @insurance_payments
end

#insurance_refundsCandidApiClient::InsuranceRefunds::Client (readonly)



75
76
77
# File 'lib/candidhealth.rb', line 75

def insurance_refunds
  @insurance_refunds
end

#medication_dispenseCandidApiClient::MedicationDispense::Client (readonly)



77
78
79
# File 'lib/candidhealth.rb', line 77

def medication_dispense
  @medication_dispense
end

#non_insurance_payer_paymentsCandidApiClient::NonInsurancePayerPayments::Client (readonly)



79
80
81
# File 'lib/candidhealth.rb', line 79

def non_insurance_payer_payments
  @non_insurance_payer_payments
end

#non_insurance_payer_refundsCandidApiClient::NonInsurancePayerRefunds::Client (readonly)



81
82
83
# File 'lib/candidhealth.rb', line 81

def non_insurance_payer_refunds
  @non_insurance_payer_refunds
end

#non_insurance_payersCandidApiClient::NonInsurancePayers::Client (readonly)



83
84
85
# File 'lib/candidhealth.rb', line 83

def non_insurance_payers
  @non_insurance_payers
end

#organization_providersCandidApiClient::OrganizationProviders::Client (readonly)



87
88
89
# File 'lib/candidhealth.rb', line 87

def organization_providers
  @organization_providers
end

#organization_service_facilitiesCandidApiClient::OrganizationServiceFacilities::Client (readonly)



85
86
87
# File 'lib/candidhealth.rb', line 85

def organization_service_facilities
  @organization_service_facilities
end

#patient_paymentsCandidApiClient::PatientPayments::Client (readonly)



89
90
91
# File 'lib/candidhealth.rb', line 89

def patient_payments
  @patient_payments
end

#patient_refundsCandidApiClient::PatientRefunds::Client (readonly)



91
92
93
# File 'lib/candidhealth.rb', line 91

def patient_refunds
  @patient_refunds
end

#payersCandidApiClient::Payers::Client (readonly)



93
94
95
# File 'lib/candidhealth.rb', line 93

def payers
  @payers
end

#pre_encounterCandidApiClient::PreEncounter::Client (readonly)



101
102
103
# File 'lib/candidhealth.rb', line 101

def pre_encounter
  @pre_encounter
end

#service_facilityCandidApiClient::ServiceFacilityClient (readonly)



105
106
107
# File 'lib/candidhealth.rb', line 105

def service_facility
  @service_facility
end

#service_linesCandidApiClient::ServiceLines::Client (readonly)



95
96
97
# File 'lib/candidhealth.rb', line 95

def service_lines
  @service_lines
end

#tasksCandidApiClient::Tasks::Client (readonly)



97
98
99
# File 'lib/candidhealth.rb', line 97

def tasks
  @tasks
end

#write_offsCandidApiClient::WriteOffs::Client (readonly)



99
100
101
# File 'lib/candidhealth.rb', line 99

def write_offs
  @write_offs
end