candidhealth 0.34.1 → 0.34.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider.rb +10 -10
- data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider_update.rb +123 -0
- data/lib/candidhealth/encounters/v_4/client.rb +282 -32
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +11 -11
- data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +11 -1
- data/lib/candidhealth/{third_party_payers/v_1/types/toggle_third_party_payer_enablement_request.rb → encounters/v_4/types/insurance_pay_missing_primary_coverage_error_type.rb} +17 -16
- data/lib/candidhealth/guarantor/v_1/client.rb +39 -89
- data/lib/candidhealth/guarantor/v_1/types/guarantor_update.rb +144 -0
- data/lib/candidhealth/payers/v_3/types/payer.rb +41 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +68 -4
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +17 -1
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +17 -1
- data/lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb +92 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +48 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefit_type.rb +20 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +15 -1
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_details.rb +104 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_level.rb +17 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value_unit.rb +17 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +16 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check.rb +83 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +15 -1
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage.rb +29 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +12 -4
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +148 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization_unit.rb +15 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/referral.rb +106 -0
- data/lib/candidhealth/service_facility/client.rb +27 -51
- data/lib/candidhealth/service_facility/types/encounter_service_facility_update.rb +90 -0
- data/lib/candidhealth.rb +0 -21
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +13 -16
- metadata +15 -24
- data/lib/candidhealth/third_party_payer_payments/client.rb +0 -30
- data/lib/candidhealth/third_party_payer_payments/v_1/client.rb +0 -360
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment.rb +0 -138
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_create.rb +0 -124
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_sort_field.rb +0 -14
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payments_page.rb +0 -88
- data/lib/candidhealth/third_party_payer_refunds/client.rb +0 -30
- data/lib/candidhealth/third_party_payer_refunds/v_1/client.rb +0 -385
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund.rb +0 -139
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_create.rb +0 -125
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_sort_field.rb +0 -14
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refunds_page.rb +0 -88
- data/lib/candidhealth/third_party_payers/client.rb +0 -30
- data/lib/candidhealth/third_party_payers/v_1/client.rb +0 -375
- data/lib/candidhealth/third_party_payers/v_1/types/create_third_party_payer_request.rb +0 -79
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer.rb +0 -100
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_category_update.rb +0 -97
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_description_update.rb +0 -97
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_page.rb +0 -88
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_sort_field.rb +0 -16
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_update_request.rb +0 -92
@@ -94,9 +94,6 @@ module CandidApiClient
|
|
94
94
|
attr_reader :subscriber_secondary
|
95
95
|
# @return [String] Box 23 on the CMS-1500 claim form.
|
96
96
|
attr_reader :prior_authorization_number
|
97
|
-
# @return [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
98
|
-
# Headaches").
|
99
|
-
attr_reader :appointment_type
|
100
97
|
# @return [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
|
101
98
|
attr_reader :responsible_party
|
102
99
|
# @return [String] URL that links directly to the claim created in Candid.
|
@@ -178,6 +175,9 @@ module CandidApiClient
|
|
178
175
|
# to be made to you, not them.
|
179
176
|
# Box 27 on the CMS-1500 claim form.
|
180
177
|
attr_reader :provider_accepts_assignment
|
178
|
+
# @return [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
179
|
+
# Headaches").
|
180
|
+
attr_reader :appointment_type
|
181
181
|
# @return [Array<CandidApiClient::Encounters::V4::Types::Medication>]
|
182
182
|
attr_reader :existing_medications
|
183
183
|
# @return [CandidApiClient::Encounters::V4::Types::Vitals]
|
@@ -286,8 +286,6 @@ module CandidApiClient
|
|
286
286
|
# to define self-pay claims.
|
287
287
|
# @param subscriber_secondary [CandidApiClient::Individual::Types::Subscriber] Contains details of the secondary insurance subscriber.
|
288
288
|
# @param prior_authorization_number [String] Box 23 on the CMS-1500 claim form.
|
289
|
-
# @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
290
|
-
# Headaches").
|
291
289
|
# @param responsible_party [CandidApiClient::Encounters::V4::Types::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim.
|
292
290
|
# @param url [String] URL that links directly to the claim created in Candid.
|
293
291
|
# @param diagnoses [Array<CandidApiClient::Diagnoses::Types::Diagnosis>] Ideally, this field should contain no more than 12 diagnoses. However, more
|
@@ -347,6 +345,8 @@ module CandidApiClient
|
|
347
345
|
# @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
|
348
346
|
# to be made to you, not them.
|
349
347
|
# Box 27 on the CMS-1500 claim form.
|
348
|
+
# @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
349
|
+
# Headaches").
|
350
350
|
# @param existing_medications [Array<CandidApiClient::Encounters::V4::Types::Medication>]
|
351
351
|
# @param vitals [CandidApiClient::Encounters::V4::Types::Vitals]
|
352
352
|
# @param interventions [Array<CandidApiClient::Encounters::V4::Types::Intervention>]
|
@@ -392,7 +392,7 @@ module CandidApiClient
|
|
392
392
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
393
393
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
394
394
|
def initialize(encounter_id:, claims:, patient:, billing_provider:, rendering_provider:, service_facility:,
|
395
|
-
responsible_party:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, schema_instances:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, patient_control_number: OMIT, guarantor: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, prior_authorization_number: OMIT,
|
395
|
+
responsible_party:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, schema_instances:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, patient_control_number: OMIT, guarantor: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, prior_authorization_number: OMIT, billing_notes: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, coding_attribution: OMIT, work_queue_id: OMIT, work_queue_membership_activated_at: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, appointment_type: OMIT, existing_medications: OMIT, vitals: OMIT, interventions: OMIT, pay_to_address: OMIT, synchronicity: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, additional_properties: nil)
|
396
396
|
@patient_control_number = patient_control_number if patient_control_number != OMIT
|
397
397
|
@encounter_id = encounter_id
|
398
398
|
@claims = claims
|
@@ -407,7 +407,6 @@ module CandidApiClient
|
|
407
407
|
@subscriber_primary = subscriber_primary if subscriber_primary != OMIT
|
408
408
|
@subscriber_secondary = subscriber_secondary if subscriber_secondary != OMIT
|
409
409
|
@prior_authorization_number = prior_authorization_number if prior_authorization_number != OMIT
|
410
|
-
@appointment_type = appointment_type if appointment_type != OMIT
|
411
410
|
@responsible_party = responsible_party
|
412
411
|
@url = url
|
413
412
|
@diagnoses = diagnoses
|
@@ -434,6 +433,7 @@ module CandidApiClient
|
|
434
433
|
@patient_authorized_release = patient_authorized_release
|
435
434
|
@benefits_assigned_to_provider = benefits_assigned_to_provider
|
436
435
|
@provider_accepts_assignment = provider_accepts_assignment
|
436
|
+
@appointment_type = appointment_type if appointment_type != OMIT
|
437
437
|
@existing_medications = existing_medications if existing_medications != OMIT
|
438
438
|
@vitals = vitals if vitals != OMIT
|
439
439
|
@interventions = interventions if interventions != OMIT
|
@@ -467,7 +467,6 @@ module CandidApiClient
|
|
467
467
|
"subscriber_primary": subscriber_primary,
|
468
468
|
"subscriber_secondary": subscriber_secondary,
|
469
469
|
"prior_authorization_number": prior_authorization_number,
|
470
|
-
"appointment_type": appointment_type,
|
471
470
|
"responsible_party": responsible_party,
|
472
471
|
"url": url,
|
473
472
|
"diagnoses": diagnoses,
|
@@ -490,6 +489,7 @@ module CandidApiClient
|
|
490
489
|
"patient_authorized_release": patient_authorized_release,
|
491
490
|
"benefits_assigned_to_provider": benefits_assigned_to_provider,
|
492
491
|
"provider_accepts_assignment": provider_accepts_assignment,
|
492
|
+
"appointment_type": appointment_type,
|
493
493
|
"existing_medications": existing_medications,
|
494
494
|
"vitals": vitals,
|
495
495
|
"interventions": interventions,
|
@@ -582,7 +582,6 @@ module CandidApiClient
|
|
582
582
|
subscriber_secondary = CandidApiClient::Individual::Types::Subscriber.from_json(json_object: subscriber_secondary)
|
583
583
|
end
|
584
584
|
prior_authorization_number = struct["prior_authorization_number"]
|
585
|
-
appointment_type = struct["appointment_type"]
|
586
585
|
responsible_party = struct["responsible_party"]
|
587
586
|
url = struct["url"]
|
588
587
|
diagnoses = parsed_json["diagnoses"]&.map do |item|
|
@@ -630,6 +629,7 @@ module CandidApiClient
|
|
630
629
|
patient_authorized_release = struct["patient_authorized_release"]
|
631
630
|
benefits_assigned_to_provider = struct["benefits_assigned_to_provider"]
|
632
631
|
provider_accepts_assignment = struct["provider_accepts_assignment"]
|
632
|
+
appointment_type = struct["appointment_type"]
|
633
633
|
existing_medications = parsed_json["existing_medications"]&.map do |item|
|
634
634
|
item = item.to_json
|
635
635
|
CandidApiClient::Encounters::V4::Types::Medication.from_json(json_object: item)
|
@@ -678,7 +678,6 @@ module CandidApiClient
|
|
678
678
|
subscriber_primary: subscriber_primary,
|
679
679
|
subscriber_secondary: subscriber_secondary,
|
680
680
|
prior_authorization_number: prior_authorization_number,
|
681
|
-
appointment_type: appointment_type,
|
682
681
|
responsible_party: responsible_party,
|
683
682
|
url: url,
|
684
683
|
diagnoses: diagnoses,
|
@@ -701,6 +700,7 @@ module CandidApiClient
|
|
701
700
|
patient_authorized_release: patient_authorized_release,
|
702
701
|
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
703
702
|
provider_accepts_assignment: provider_accepts_assignment,
|
703
|
+
appointment_type: appointment_type,
|
704
704
|
existing_medications: existing_medications,
|
705
705
|
vitals: vitals,
|
706
706
|
interventions: interventions,
|
@@ -746,7 +746,6 @@ module CandidApiClient
|
|
746
746
|
obj.subscriber_primary.nil? || CandidApiClient::Individual::Types::Subscriber.validate_raw(obj: obj.subscriber_primary)
|
747
747
|
obj.subscriber_secondary.nil? || CandidApiClient::Individual::Types::Subscriber.validate_raw(obj: obj.subscriber_secondary)
|
748
748
|
obj.prior_authorization_number&.is_a?(String) != false || raise("Passed value for field obj.prior_authorization_number is not the expected type, validation failed.")
|
749
|
-
obj.appointment_type&.is_a?(String) != false || raise("Passed value for field obj.appointment_type is not the expected type, validation failed.")
|
750
749
|
obj.responsible_party.is_a?(CandidApiClient::Encounters::V4::Types::ResponsiblePartyType) != false || raise("Passed value for field obj.responsible_party is not the expected type, validation failed.")
|
751
750
|
obj.url.is_a?(String) != false || raise("Passed value for field obj.url is not the expected type, validation failed.")
|
752
751
|
obj.diagnoses.is_a?(Array) != false || raise("Passed value for field obj.diagnoses is not the expected type, validation failed.")
|
@@ -769,6 +768,7 @@ module CandidApiClient
|
|
769
768
|
obj.patient_authorized_release.is_a?(Boolean) != false || raise("Passed value for field obj.patient_authorized_release is not the expected type, validation failed.")
|
770
769
|
obj.benefits_assigned_to_provider.is_a?(Boolean) != false || raise("Passed value for field obj.benefits_assigned_to_provider is not the expected type, validation failed.")
|
771
770
|
obj.provider_accepts_assignment.is_a?(Boolean) != false || raise("Passed value for field obj.provider_accepts_assignment is not the expected type, validation failed.")
|
771
|
+
obj.appointment_type&.is_a?(String) != false || raise("Passed value for field obj.appointment_type is not the expected type, validation failed.")
|
772
772
|
obj.existing_medications&.is_a?(Array) != false || raise("Passed value for field obj.existing_medications is not the expected type, validation failed.")
|
773
773
|
obj.vitals.nil? || CandidApiClient::Encounters::V4::Types::Vitals.validate_raw(obj: obj.vitals)
|
774
774
|
obj.interventions&.is_a?(Array) != false || raise("Passed value for field obj.interventions is not the expected type, validation failed.")
|
@@ -51,6 +51,9 @@ module CandidApiClient
|
|
51
51
|
# to be made to you, not them.
|
52
52
|
# Box 27 on the CMS-1500 claim form.
|
53
53
|
attr_reader :provider_accepts_assignment
|
54
|
+
# @return [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
55
|
+
# Headaches").
|
56
|
+
attr_reader :appointment_type
|
54
57
|
# @return [Array<CandidApiClient::Encounters::V4::Types::Medication>]
|
55
58
|
attr_reader :existing_medications
|
56
59
|
# @return [CandidApiClient::Encounters::V4::Types::Vitals]
|
@@ -142,6 +145,8 @@ module CandidApiClient
|
|
142
145
|
# @param provider_accepts_assignment [Boolean] Whether you have accepted the patient's authorization for insurance payments
|
143
146
|
# to be made to you, not them.
|
144
147
|
# Box 27 on the CMS-1500 claim form.
|
148
|
+
# @param appointment_type [String] Human-readable description of the appointment type (ex: "Acupuncture -
|
149
|
+
# Headaches").
|
145
150
|
# @param existing_medications [Array<CandidApiClient::Encounters::V4::Types::Medication>]
|
146
151
|
# @param vitals [CandidApiClient::Encounters::V4::Types::Vitals]
|
147
152
|
# @param interventions [Array<CandidApiClient::Encounters::V4::Types::Intervention>]
|
@@ -187,13 +192,14 @@ module CandidApiClient
|
|
187
192
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
188
193
|
# @return [CandidApiClient::Encounters::V4::Types::EncounterBase]
|
189
194
|
def initialize(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
|
190
|
-
provider_accepts_assignment:, billable_status:, date_of_service: OMIT, end_date_of_service: OMIT, existing_medications: OMIT, vitals: OMIT, interventions: OMIT, pay_to_address: OMIT, synchronicity: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, additional_properties: nil)
|
195
|
+
provider_accepts_assignment:, billable_status:, date_of_service: OMIT, end_date_of_service: OMIT, appointment_type: OMIT, existing_medications: OMIT, vitals: OMIT, interventions: OMIT, pay_to_address: OMIT, synchronicity: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, additional_properties: nil)
|
191
196
|
@external_id = external_id
|
192
197
|
@date_of_service = date_of_service if date_of_service != OMIT
|
193
198
|
@end_date_of_service = end_date_of_service if end_date_of_service != OMIT
|
194
199
|
@patient_authorized_release = patient_authorized_release
|
195
200
|
@benefits_assigned_to_provider = benefits_assigned_to_provider
|
196
201
|
@provider_accepts_assignment = provider_accepts_assignment
|
202
|
+
@appointment_type = appointment_type if appointment_type != OMIT
|
197
203
|
@existing_medications = existing_medications if existing_medications != OMIT
|
198
204
|
@vitals = vitals if vitals != OMIT
|
199
205
|
@interventions = interventions if interventions != OMIT
|
@@ -219,6 +225,7 @@ module CandidApiClient
|
|
219
225
|
"patient_authorized_release": patient_authorized_release,
|
220
226
|
"benefits_assigned_to_provider": benefits_assigned_to_provider,
|
221
227
|
"provider_accepts_assignment": provider_accepts_assignment,
|
228
|
+
"appointment_type": appointment_type,
|
222
229
|
"existing_medications": existing_medications,
|
223
230
|
"vitals": vitals,
|
224
231
|
"interventions": interventions,
|
@@ -252,6 +259,7 @@ module CandidApiClient
|
|
252
259
|
patient_authorized_release = struct["patient_authorized_release"]
|
253
260
|
benefits_assigned_to_provider = struct["benefits_assigned_to_provider"]
|
254
261
|
provider_accepts_assignment = struct["provider_accepts_assignment"]
|
262
|
+
appointment_type = struct["appointment_type"]
|
255
263
|
existing_medications = parsed_json["existing_medications"]&.map do |item|
|
256
264
|
item = item.to_json
|
257
265
|
CandidApiClient::Encounters::V4::Types::Medication.from_json(json_object: item)
|
@@ -292,6 +300,7 @@ module CandidApiClient
|
|
292
300
|
patient_authorized_release: patient_authorized_release,
|
293
301
|
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
294
302
|
provider_accepts_assignment: provider_accepts_assignment,
|
303
|
+
appointment_type: appointment_type,
|
295
304
|
existing_medications: existing_medications,
|
296
305
|
vitals: vitals,
|
297
306
|
interventions: interventions,
|
@@ -329,6 +338,7 @@ module CandidApiClient
|
|
329
338
|
obj.patient_authorized_release.is_a?(Boolean) != false || raise("Passed value for field obj.patient_authorized_release is not the expected type, validation failed.")
|
330
339
|
obj.benefits_assigned_to_provider.is_a?(Boolean) != false || raise("Passed value for field obj.benefits_assigned_to_provider is not the expected type, validation failed.")
|
331
340
|
obj.provider_accepts_assignment.is_a?(Boolean) != false || raise("Passed value for field obj.provider_accepts_assignment is not the expected type, validation failed.")
|
341
|
+
obj.appointment_type&.is_a?(String) != false || raise("Passed value for field obj.appointment_type is not the expected type, validation failed.")
|
332
342
|
obj.existing_medications&.is_a?(Array) != false || raise("Passed value for field obj.existing_medications is not the expected type, validation failed.")
|
333
343
|
obj.vitals.nil? || CandidApiClient::Encounters::V4::Types::Vitals.validate_raw(obj: obj.vitals)
|
334
344
|
obj.interventions&.is_a?(Array) != false || raise("Passed value for field obj.interventions is not the expected type, validation failed.")
|
@@ -4,12 +4,12 @@ require "ostruct"
|
|
4
4
|
require "json"
|
5
5
|
|
6
6
|
module CandidApiClient
|
7
|
-
module
|
8
|
-
module
|
7
|
+
module Encounters
|
8
|
+
module V4
|
9
9
|
module Types
|
10
|
-
class
|
11
|
-
# @return [
|
12
|
-
attr_reader :
|
10
|
+
class InsurancePayMissingPrimaryCoverageErrorType
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :patient_id
|
13
13
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
14
|
attr_reader :additional_properties
|
15
15
|
# @return [Object]
|
@@ -18,27 +18,28 @@ module CandidApiClient
|
|
18
18
|
|
19
19
|
OMIT = Object.new
|
20
20
|
|
21
|
-
# @param
|
21
|
+
# @param patient_id [String]
|
22
22
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
-
# @return [CandidApiClient::
|
24
|
-
def initialize(
|
25
|
-
@
|
23
|
+
# @return [CandidApiClient::Encounters::V4::Types::InsurancePayMissingPrimaryCoverageErrorType]
|
24
|
+
def initialize(patient_id:, additional_properties: nil)
|
25
|
+
@patient_id = patient_id
|
26
26
|
@additional_properties = additional_properties
|
27
|
-
@_field_set = { "
|
27
|
+
@_field_set = { "patient_id": patient_id }
|
28
28
|
end
|
29
29
|
|
30
30
|
# Deserialize a JSON object to an instance of
|
31
|
-
#
|
31
|
+
# InsurancePayMissingPrimaryCoverageErrorType
|
32
32
|
#
|
33
33
|
# @param json_object [String]
|
34
|
-
# @return [CandidApiClient::
|
34
|
+
# @return [CandidApiClient::Encounters::V4::Types::InsurancePayMissingPrimaryCoverageErrorType]
|
35
35
|
def self.from_json(json_object:)
|
36
36
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
37
|
-
|
38
|
-
new(
|
37
|
+
patient_id = struct["patient_id"]
|
38
|
+
new(patient_id: patient_id, additional_properties: struct)
|
39
39
|
end
|
40
40
|
|
41
|
-
# Serialize an instance of
|
41
|
+
# Serialize an instance of InsurancePayMissingPrimaryCoverageErrorType to a JSON
|
42
|
+
# object
|
42
43
|
#
|
43
44
|
# @return [String]
|
44
45
|
def to_json(*_args)
|
@@ -52,7 +53,7 @@ module CandidApiClient
|
|
52
53
|
# @param obj [Object]
|
53
54
|
# @return [Void]
|
54
55
|
def self.validate_raw(obj:)
|
55
|
-
obj.
|
56
|
+
obj.patient_id.is_a?(String) != false || raise("Passed value for field obj.patient_id is not the expected type, validation failed.")
|
56
57
|
end
|
57
58
|
end
|
58
59
|
end
|
@@ -3,9 +3,7 @@
|
|
3
3
|
require_relative "../../../requests"
|
4
4
|
require_relative "types/guarantor_create"
|
5
5
|
require_relative "types/guarantor"
|
6
|
-
|
7
|
-
require_relative "../../commons/types/street_address_short_zip"
|
8
|
-
require_relative "../../commons/types/phone_number"
|
6
|
+
require_relative "types/guarantor_update"
|
9
7
|
require "async"
|
10
8
|
|
11
9
|
module CandidApiClient
|
@@ -87,41 +85,28 @@ module CandidApiClient
|
|
87
85
|
# Updates a guarantor by its `guarantor_id`.
|
88
86
|
#
|
89
87
|
# @param guarantor_id [String]
|
90
|
-
# @param
|
91
|
-
#
|
92
|
-
#
|
93
|
-
#
|
94
|
-
#
|
95
|
-
# * :
|
96
|
-
#
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
# * :
|
103
|
-
# * :
|
104
|
-
#
|
105
|
-
#
|
106
|
-
# @param email_consent [Boolean]
|
88
|
+
# @param request [Hash] Request of type CandidApiClient::Guarantor::V1::Types::GuarantorUpdate, as a Hash
|
89
|
+
# * :first_name (String)
|
90
|
+
# * :last_name (String)
|
91
|
+
# * :external_id (String)
|
92
|
+
# * :date_of_birth (Date)
|
93
|
+
# * :address (Hash)
|
94
|
+
# * :zip_plus_four_code (String)
|
95
|
+
# * :address_1 (String)
|
96
|
+
# * :address_2 (String)
|
97
|
+
# * :city (String)
|
98
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
99
|
+
# * :zip_code (String)
|
100
|
+
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
101
|
+
# * :phone_consent (Boolean)
|
102
|
+
# * :email (String)
|
103
|
+
# * :email_consent (Boolean)
|
107
104
|
# @param request_options [CandidApiClient::RequestOptions]
|
108
105
|
# @return [CandidApiClient::Guarantor::V1::Types::Guarantor]
|
109
106
|
# @example
|
110
107
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
111
|
-
# api.guarantor.v_1.update(
|
112
|
-
|
113
|
-
# first_name: "string",
|
114
|
-
# last_name: "string",
|
115
|
-
# external_id: "string",
|
116
|
-
# date_of_birth: DateTime.parse(2023-01-15),
|
117
|
-
# address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" },
|
118
|
-
# phone_numbers: [{ number: "1234567890", type: HOME }],
|
119
|
-
# phone_consent: true,
|
120
|
-
# email: "johndoe@joincandidhealth.com",
|
121
|
-
# email_consent: true
|
122
|
-
# )
|
123
|
-
def update(guarantor_id:, first_name: nil, last_name: nil, external_id: nil, date_of_birth: nil, address: nil,
|
124
|
-
phone_numbers: nil, phone_consent: nil, email: nil, email_consent: nil, request_options: nil)
|
108
|
+
# api.guarantor.v_1.update(guarantor_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { first_name: "string", last_name: "string", external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true })
|
109
|
+
def update(guarantor_id:, request:, request_options: nil)
|
125
110
|
response = @request_client.conn.patch do |req|
|
126
111
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
127
112
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -130,18 +115,7 @@ module CandidApiClient
|
|
130
115
|
**@request_client.get_headers,
|
131
116
|
**(request_options&.additional_headers || {})
|
132
117
|
}.compact
|
133
|
-
req.body = {
|
134
|
-
**(request_options&.additional_body_parameters || {}),
|
135
|
-
first_name: first_name,
|
136
|
-
last_name: last_name,
|
137
|
-
external_id: external_id,
|
138
|
-
date_of_birth: date_of_birth,
|
139
|
-
address: address,
|
140
|
-
phone_numbers: phone_numbers,
|
141
|
-
phone_consent: phone_consent,
|
142
|
-
email: email,
|
143
|
-
email_consent: email_consent
|
144
|
-
}.compact
|
118
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
145
119
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
146
120
|
request_options: request_options)}/api/guarantors/v1/#{guarantor_id}"
|
147
121
|
end
|
@@ -229,41 +203,28 @@ module CandidApiClient
|
|
229
203
|
# Updates a guarantor by its `guarantor_id`.
|
230
204
|
#
|
231
205
|
# @param guarantor_id [String]
|
232
|
-
# @param
|
233
|
-
#
|
234
|
-
#
|
235
|
-
#
|
236
|
-
#
|
237
|
-
# * :
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
242
|
-
#
|
243
|
-
#
|
244
|
-
# * :
|
245
|
-
# * :
|
246
|
-
#
|
247
|
-
#
|
248
|
-
# @param email_consent [Boolean]
|
206
|
+
# @param request [Hash] Request of type CandidApiClient::Guarantor::V1::Types::GuarantorUpdate, as a Hash
|
207
|
+
# * :first_name (String)
|
208
|
+
# * :last_name (String)
|
209
|
+
# * :external_id (String)
|
210
|
+
# * :date_of_birth (Date)
|
211
|
+
# * :address (Hash)
|
212
|
+
# * :zip_plus_four_code (String)
|
213
|
+
# * :address_1 (String)
|
214
|
+
# * :address_2 (String)
|
215
|
+
# * :city (String)
|
216
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
217
|
+
# * :zip_code (String)
|
218
|
+
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
219
|
+
# * :phone_consent (Boolean)
|
220
|
+
# * :email (String)
|
221
|
+
# * :email_consent (Boolean)
|
249
222
|
# @param request_options [CandidApiClient::RequestOptions]
|
250
223
|
# @return [CandidApiClient::Guarantor::V1::Types::Guarantor]
|
251
224
|
# @example
|
252
225
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
253
|
-
# api.guarantor.v_1.update(
|
254
|
-
|
255
|
-
# first_name: "string",
|
256
|
-
# last_name: "string",
|
257
|
-
# external_id: "string",
|
258
|
-
# date_of_birth: DateTime.parse(2023-01-15),
|
259
|
-
# address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" },
|
260
|
-
# phone_numbers: [{ number: "1234567890", type: HOME }],
|
261
|
-
# phone_consent: true,
|
262
|
-
# email: "johndoe@joincandidhealth.com",
|
263
|
-
# email_consent: true
|
264
|
-
# )
|
265
|
-
def update(guarantor_id:, first_name: nil, last_name: nil, external_id: nil, date_of_birth: nil, address: nil,
|
266
|
-
phone_numbers: nil, phone_consent: nil, email: nil, email_consent: nil, request_options: nil)
|
226
|
+
# api.guarantor.v_1.update(guarantor_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { first_name: "string", last_name: "string", external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true })
|
227
|
+
def update(guarantor_id:, request:, request_options: nil)
|
267
228
|
Async do
|
268
229
|
response = @request_client.conn.patch do |req|
|
269
230
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -273,18 +234,7 @@ module CandidApiClient
|
|
273
234
|
**@request_client.get_headers,
|
274
235
|
**(request_options&.additional_headers || {})
|
275
236
|
}.compact
|
276
|
-
req.body = {
|
277
|
-
**(request_options&.additional_body_parameters || {}),
|
278
|
-
first_name: first_name,
|
279
|
-
last_name: last_name,
|
280
|
-
external_id: external_id,
|
281
|
-
date_of_birth: date_of_birth,
|
282
|
-
address: address,
|
283
|
-
phone_numbers: phone_numbers,
|
284
|
-
phone_consent: phone_consent,
|
285
|
-
email: email,
|
286
|
-
email_consent: email_consent
|
287
|
-
}.compact
|
237
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
288
238
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
289
239
|
request_options: request_options)}/api/guarantors/v1/#{guarantor_id}"
|
290
240
|
end
|
@@ -0,0 +1,144 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "date"
|
4
|
+
require_relative "../../../commons/types/street_address_short_zip"
|
5
|
+
require_relative "../../../commons/types/phone_number"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module Guarantor
|
11
|
+
module V1
|
12
|
+
module Types
|
13
|
+
class GuarantorUpdate
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :first_name
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :last_name
|
18
|
+
# @return [String] A unique identifier for the guarantor assigned by an external system.
|
19
|
+
attr_reader :external_id
|
20
|
+
# @return [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
21
|
+
attr_reader :date_of_birth
|
22
|
+
# @return [CandidApiClient::Commons::Types::StreetAddressShortZip]
|
23
|
+
attr_reader :address
|
24
|
+
# @return [Array<CandidApiClient::Commons::Types::PhoneNumber>]
|
25
|
+
attr_reader :phone_numbers
|
26
|
+
# @return [Boolean]
|
27
|
+
attr_reader :phone_consent
|
28
|
+
# @return [String]
|
29
|
+
attr_reader :email
|
30
|
+
# @return [Boolean]
|
31
|
+
attr_reader :email_consent
|
32
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
33
|
+
attr_reader :additional_properties
|
34
|
+
# @return [Object]
|
35
|
+
attr_reader :_field_set
|
36
|
+
protected :_field_set
|
37
|
+
|
38
|
+
OMIT = Object.new
|
39
|
+
|
40
|
+
# @param first_name [String]
|
41
|
+
# @param last_name [String]
|
42
|
+
# @param external_id [String] A unique identifier for the guarantor assigned by an external system.
|
43
|
+
# @param date_of_birth [Date] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
44
|
+
# @param address [CandidApiClient::Commons::Types::StreetAddressShortZip]
|
45
|
+
# @param phone_numbers [Array<CandidApiClient::Commons::Types::PhoneNumber>]
|
46
|
+
# @param phone_consent [Boolean]
|
47
|
+
# @param email [String]
|
48
|
+
# @param email_consent [Boolean]
|
49
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
50
|
+
# @return [CandidApiClient::Guarantor::V1::Types::GuarantorUpdate]
|
51
|
+
def initialize(first_name: OMIT, last_name: OMIT, external_id: OMIT, date_of_birth: OMIT, address: OMIT,
|
52
|
+
phone_numbers: OMIT, phone_consent: OMIT, email: OMIT, email_consent: OMIT, additional_properties: nil)
|
53
|
+
@first_name = first_name if first_name != OMIT
|
54
|
+
@last_name = last_name if last_name != OMIT
|
55
|
+
@external_id = external_id if external_id != OMIT
|
56
|
+
@date_of_birth = date_of_birth if date_of_birth != OMIT
|
57
|
+
@address = address if address != OMIT
|
58
|
+
@phone_numbers = phone_numbers if phone_numbers != OMIT
|
59
|
+
@phone_consent = phone_consent if phone_consent != OMIT
|
60
|
+
@email = email if email != OMIT
|
61
|
+
@email_consent = email_consent if email_consent != OMIT
|
62
|
+
@additional_properties = additional_properties
|
63
|
+
@_field_set = {
|
64
|
+
"first_name": first_name,
|
65
|
+
"last_name": last_name,
|
66
|
+
"external_id": external_id,
|
67
|
+
"date_of_birth": date_of_birth,
|
68
|
+
"address": address,
|
69
|
+
"phone_numbers": phone_numbers,
|
70
|
+
"phone_consent": phone_consent,
|
71
|
+
"email": email,
|
72
|
+
"email_consent": email_consent
|
73
|
+
}.reject do |_k, v|
|
74
|
+
v == OMIT
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Deserialize a JSON object to an instance of GuarantorUpdate
|
79
|
+
#
|
80
|
+
# @param json_object [String]
|
81
|
+
# @return [CandidApiClient::Guarantor::V1::Types::GuarantorUpdate]
|
82
|
+
def self.from_json(json_object:)
|
83
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
84
|
+
parsed_json = JSON.parse(json_object)
|
85
|
+
first_name = struct["first_name"]
|
86
|
+
last_name = struct["last_name"]
|
87
|
+
external_id = struct["external_id"]
|
88
|
+
date_of_birth = (Date.parse(parsed_json["date_of_birth"]) unless parsed_json["date_of_birth"].nil?)
|
89
|
+
if parsed_json["address"].nil?
|
90
|
+
address = nil
|
91
|
+
else
|
92
|
+
address = parsed_json["address"].to_json
|
93
|
+
address = CandidApiClient::Commons::Types::StreetAddressShortZip.from_json(json_object: address)
|
94
|
+
end
|
95
|
+
phone_numbers = parsed_json["phone_numbers"]&.map do |item|
|
96
|
+
item = item.to_json
|
97
|
+
CandidApiClient::Commons::Types::PhoneNumber.from_json(json_object: item)
|
98
|
+
end
|
99
|
+
phone_consent = struct["phone_consent"]
|
100
|
+
email = struct["email"]
|
101
|
+
email_consent = struct["email_consent"]
|
102
|
+
new(
|
103
|
+
first_name: first_name,
|
104
|
+
last_name: last_name,
|
105
|
+
external_id: external_id,
|
106
|
+
date_of_birth: date_of_birth,
|
107
|
+
address: address,
|
108
|
+
phone_numbers: phone_numbers,
|
109
|
+
phone_consent: phone_consent,
|
110
|
+
email: email,
|
111
|
+
email_consent: email_consent,
|
112
|
+
additional_properties: struct
|
113
|
+
)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Serialize an instance of GuarantorUpdate to a JSON object
|
117
|
+
#
|
118
|
+
# @return [String]
|
119
|
+
def to_json(*_args)
|
120
|
+
@_field_set&.to_json
|
121
|
+
end
|
122
|
+
|
123
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
124
|
+
# hash and check each fields type against the current object's property
|
125
|
+
# definitions.
|
126
|
+
#
|
127
|
+
# @param obj [Object]
|
128
|
+
# @return [Void]
|
129
|
+
def self.validate_raw(obj:)
|
130
|
+
obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
|
131
|
+
obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
|
132
|
+
obj.external_id&.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
|
133
|
+
obj.date_of_birth&.is_a?(Date) != false || raise("Passed value for field obj.date_of_birth is not the expected type, validation failed.")
|
134
|
+
obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressShortZip.validate_raw(obj: obj.address)
|
135
|
+
obj.phone_numbers&.is_a?(Array) != false || raise("Passed value for field obj.phone_numbers is not the expected type, validation failed.")
|
136
|
+
obj.phone_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.phone_consent is not the expected type, validation failed.")
|
137
|
+
obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
|
138
|
+
obj.email_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.email_consent is not the expected type, validation failed.")
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|