candidhealth 1.7.0 → 1.8.1

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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +34 -6
  3. data/lib/candidhealth/charge_capture/v_1/client.rb +119 -52
  4. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +70 -56
  5. data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +33 -2
  6. data/lib/candidhealth/commons/types/clearinghouse.rb +18 -0
  7. data/lib/candidhealth/commons/types/procedure_modifier.rb +11 -0
  8. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider.rb +1 -1
  9. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb +1 -1
  10. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +1 -1
  11. data/lib/candidhealth/encounters/v_4/client.rb +3269 -2040
  12. data/lib/candidhealth/encounters/v_4/types/encounter.rb +111 -86
  13. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +39 -33
  14. data/lib/candidhealth/encounters/v_4/types/encounter_create.rb +796 -0
  15. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +131 -117
  16. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +70 -56
  17. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +29 -39
  18. data/lib/candidhealth/encounters/v_4/types/encounter_rendering_or_attending_provider_required_error.rb +55 -0
  19. data/lib/candidhealth/encounters/v_4/types/encounter_update.rb +736 -0
  20. data/lib/candidhealth/encounters_universal/types/universal_encounter_create.rb +944 -0
  21. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_base.rb +691 -0
  22. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter.rb +791 -0
  23. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter_base.rb +572 -0
  24. data/lib/candidhealth/encounters_universal/types/universal_encounter_update.rb +872 -0
  25. data/lib/candidhealth/encounters_universal/types/universal_encounter_update_base.rb +700 -0
  26. data/lib/candidhealth/fee_schedules/v_3/client.rb +57 -0
  27. data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +12 -0
  28. data/lib/candidhealth/financials/types/patient_transaction_source.rb +1 -0
  29. data/lib/candidhealth/guarantor/v_1/client.rb +4 -0
  30. data/lib/candidhealth/guarantor/v_1/types/guarantor.rb +10 -2
  31. data/lib/candidhealth/guarantor/v_1/types/guarantor_create.rb +10 -2
  32. data/lib/candidhealth/guarantor/v_1/types/guarantor_optional.rb +10 -2
  33. data/lib/candidhealth/guarantor/v_1/types/guarantor_update.rb +10 -2
  34. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_new.rb +206 -0
  35. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_new.rb +207 -0
  36. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_new.rb +206 -0
  37. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_new.rb +245 -0
  38. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_create.rb +225 -0
  39. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_new.rb +219 -0
  40. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information_new.rb +222 -0
  41. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_new.rb +215 -0
  42. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_new.rb +218 -0
  43. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_new.rb +206 -0
  44. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_new.rb +215 -0
  45. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_new.rb +216 -0
  46. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information_new.rb +206 -0
  47. data/lib/candidhealth/health_care_code_information/v_1/types/value_information_new.rb +215 -0
  48. data/lib/candidhealth/individual/types/patient.rb +16 -8
  49. data/lib/candidhealth/individual/types/patient_base.rb +6 -6
  50. data/lib/candidhealth/individual/types/patient_create.rb +15 -7
  51. data/lib/candidhealth/individual/types/patient_update.rb +15 -7
  52. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +15 -7
  53. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +2 -0
  54. data/lib/candidhealth/payers/client.rb +7 -0
  55. data/lib/candidhealth/payers/v_4/client.rb +137 -0
  56. data/lib/candidhealth/payers/v_4/types/clearinghouse_payer_info.rb +127 -0
  57. data/lib/candidhealth/payers/v_4/types/payer.rb +116 -0
  58. data/lib/candidhealth/payers/v_4/types/payer_ids.rb +84 -0
  59. data/lib/candidhealth/payers/v_4/types/payer_page.rb +88 -0
  60. data/lib/candidhealth/payers/v_4/types/primary_payer_ids.rb +84 -0
  61. data/lib/candidhealth/payers/v_4/types/support_state.rb +15 -0
  62. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
  63. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +3 -3
  64. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +72 -6
  65. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
  66. data/lib/candidhealth/pre_encounter/patients/v_1/types/inferred_patient_metadata.rb +80 -0
  67. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +19 -5
  68. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +19 -5
  69. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +18 -4
  70. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +1 -0
  71. data/lib/candidhealth/service_lines/v_2/client.rb +252 -10
  72. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +28 -10
  73. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +52 -40
  74. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base.rb +251 -0
  75. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base_base.rb +243 -0
  76. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +48 -24
  77. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +58 -46
  78. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base.rb +273 -0
  79. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base_base.rb +265 -0
  80. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +64 -54
  81. data/lib/candidhealth/service_lines/v_2/types/service_line_update_base.rb +263 -0
  82. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create.rb +271 -0
  83. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create_standalone.rb +317 -0
  84. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_update.rb +307 -0
  85. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +2 -2
  86. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_base.rb +90 -0
  87. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_update.rb +112 -0
  88. data/lib/requests.rb +2 -2
  89. data/lib/types_export.rb +45 -4
  90. metadata +44 -2
@@ -385,6 +385,33 @@ module CandidApiClient
385
385
  end
386
386
  JSON.parse(response.body)
387
387
  end
388
+
389
+ # Hard deletes specific rates from the system by their IDs. This is a destructive
390
+ # operation and cannot be undone. Limited to 100 rate IDs maximum per request. For
391
+ # bulk deletion of more than 100 rates, use the hard_delete_rates endpoint with
392
+ # dimension filters. Returns the number of rates deleted.
393
+ #
394
+ # @param rate_ids [Array<String>]
395
+ # @param request_options [CandidApiClient::RequestOptions]
396
+ # @return [Integer]
397
+ # @example
398
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
399
+ # api.fee_schedules.v_3.hard_delete_rates_by_ids(rate_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"])
400
+ def hard_delete_rates_by_ids(rate_ids:, request_options: nil)
401
+ response = @request_client.conn.post do |req|
402
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
403
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
404
+ req.headers = {
405
+ **(req.headers || {}),
406
+ **@request_client.get_headers,
407
+ **(request_options&.additional_headers || {})
408
+ }.compact
409
+ req.body = { **(request_options&.additional_body_parameters || {}), rate_ids: rate_ids }.compact
410
+ req.url "#{@request_client.get_url(environment: CandidApi,
411
+ request_options: request_options)}/api/fee-schedules/v3/hard-delete-by-ids"
412
+ end
413
+ JSON.parse(response.body)
414
+ end
388
415
  end
389
416
 
390
417
  class AsyncV3Client
@@ -779,6 +806,36 @@ module CandidApiClient
779
806
  parsed_json
780
807
  end
781
808
  end
809
+
810
+ # Hard deletes specific rates from the system by their IDs. This is a destructive
811
+ # operation and cannot be undone. Limited to 100 rate IDs maximum per request. For
812
+ # bulk deletion of more than 100 rates, use the hard_delete_rates endpoint with
813
+ # dimension filters. Returns the number of rates deleted.
814
+ #
815
+ # @param rate_ids [Array<String>]
816
+ # @param request_options [CandidApiClient::RequestOptions]
817
+ # @return [Integer]
818
+ # @example
819
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
820
+ # api.fee_schedules.v_3.hard_delete_rates_by_ids(rate_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"])
821
+ def hard_delete_rates_by_ids(rate_ids:, request_options: nil)
822
+ Async do
823
+ response = @request_client.conn.post do |req|
824
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
825
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
826
+ req.headers = {
827
+ **(req.headers || {}),
828
+ **@request_client.get_headers,
829
+ **(request_options&.additional_headers || {})
830
+ }.compact
831
+ req.body = { **(request_options&.additional_body_parameters || {}), rate_ids: rate_ids }.compact
832
+ req.url "#{@request_client.get_url(environment: CandidApi,
833
+ request_options: request_options)}/api/fee-schedules/v3/hard-delete-by-ids"
834
+ end
835
+ parsed_json = JSON.parse(response.body)
836
+ parsed_json
837
+ end
838
+ end
782
839
  end
783
840
  end
784
841
  end
@@ -48,6 +48,8 @@ module CandidApiClient
48
48
  member = CandidApiClient::Commons::Types::EntityNotFoundErrorMessage.from_json(json_object: json_object)
49
49
  when "payer_plan_group_does_not_match_rate_payer"
50
50
  member = CandidApiClient::FeeSchedules::V3::Types::PayerPlanGroupDoesNotMatchRatePayerError.from_json(json_object: json_object)
51
+ when "payer_plan_group_network_type_mutual_exclusion"
52
+ member = CandidApiClient::Commons::Types::EntityConflictErrorMessage.from_json(json_object: json_object)
51
53
  else
52
54
  member = CandidApiClient::FeeSchedules::V3::Types::OverlappingRateEntriesError.from_json(json_object: json_object)
53
55
  end
@@ -73,6 +75,8 @@ module CandidApiClient
73
75
  { **@member.to_json, type: @discriminant }.to_json
74
76
  when "payer_plan_group_does_not_match_rate_payer"
75
77
  { **@member.to_json, type: @discriminant }.to_json
78
+ when "payer_plan_group_network_type_mutual_exclusion"
79
+ { **@member.to_json, type: @discriminant }.to_json
76
80
  else
77
81
  { "type": @discriminant, value: @member }.to_json
78
82
  end
@@ -101,6 +105,8 @@ module CandidApiClient
101
105
  CandidApiClient::Commons::Types::EntityNotFoundErrorMessage.validate_raw(obj: obj)
102
106
  when "payer_plan_group_does_not_match_rate_payer"
103
107
  CandidApiClient::FeeSchedules::V3::Types::PayerPlanGroupDoesNotMatchRatePayerError.validate_raw(obj: obj)
108
+ when "payer_plan_group_network_type_mutual_exclusion"
109
+ CandidApiClient::Commons::Types::EntityConflictErrorMessage.validate_raw(obj: obj)
104
110
  else
105
111
  raise("Passed value matched no type within the union, validation failed.")
106
112
  end
@@ -153,6 +159,12 @@ module CandidApiClient
153
159
  def self.payer_plan_group_does_not_match_rate_payer(member:)
154
160
  new(member: member, discriminant: "payer_plan_group_does_not_match_rate_payer")
155
161
  end
162
+
163
+ # @param member [CandidApiClient::Commons::Types::EntityConflictErrorMessage]
164
+ # @return [CandidApiClient::FeeSchedules::V3::Types::ValidationError]
165
+ def self.payer_plan_group_network_type_mutual_exclusion(member:)
166
+ new(member: member, discriminant: "payer_plan_group_network_type_mutual_exclusion")
167
+ end
156
168
  end
157
169
  end
158
170
  end
@@ -11,6 +11,7 @@ module CandidApiClient
11
11
  ELATION = "ELATION"
12
12
  CEDAR = "CEDAR"
13
13
  HEALTHIE = "HEALTHIE"
14
+ REALLOCATION = "REALLOCATION"
14
15
  end
15
16
  end
16
17
  end
@@ -27,6 +27,7 @@ module CandidApiClient
27
27
  # * :phone_consent (Boolean)
28
28
  # * :email (String)
29
29
  # * :email_consent (Boolean)
30
+ # * :auto_charge_consent (Boolean)
30
31
  # * :first_name (String)
31
32
  # * :last_name (String)
32
33
  # * :external_id (String)
@@ -101,6 +102,7 @@ module CandidApiClient
101
102
  # * :phone_consent (Boolean)
102
103
  # * :email (String)
103
104
  # * :email_consent (Boolean)
105
+ # * :auto_charge_consent (Boolean)
104
106
  # @param request_options [CandidApiClient::RequestOptions]
105
107
  # @return [CandidApiClient::Guarantor::V1::Types::Guarantor]
106
108
  # @example
@@ -141,6 +143,7 @@ module CandidApiClient
141
143
  # * :phone_consent (Boolean)
142
144
  # * :email (String)
143
145
  # * :email_consent (Boolean)
146
+ # * :auto_charge_consent (Boolean)
144
147
  # * :first_name (String)
145
148
  # * :last_name (String)
146
149
  # * :external_id (String)
@@ -219,6 +222,7 @@ module CandidApiClient
219
222
  # * :phone_consent (Boolean)
220
223
  # * :email (String)
221
224
  # * :email_consent (Boolean)
225
+ # * :auto_charge_consent (Boolean)
222
226
  # @param request_options [CandidApiClient::RequestOptions]
223
227
  # @return [CandidApiClient::Guarantor::V1::Types::Guarantor]
224
228
  # @example
@@ -21,6 +21,8 @@ module CandidApiClient
21
21
  attr_reader :email
22
22
  # @return [Boolean]
23
23
  attr_reader :email_consent
24
+ # @return [Boolean]
25
+ attr_reader :auto_charge_consent
24
26
  # @return [String]
25
27
  attr_reader :first_name
26
28
  # @return [String]
@@ -44,6 +46,7 @@ module CandidApiClient
44
46
  # @param phone_consent [Boolean]
45
47
  # @param email [String]
46
48
  # @param email_consent [Boolean]
49
+ # @param auto_charge_consent [Boolean]
47
50
  # @param first_name [String]
48
51
  # @param last_name [String]
49
52
  # @param external_id [String]
@@ -51,13 +54,14 @@ module CandidApiClient
51
54
  # @param address [CandidApiClient::Commons::Types::StreetAddressShortZip]
52
55
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
53
56
  # @return [CandidApiClient::Guarantor::V1::Types::Guarantor]
54
- def initialize(guarantor_id:, phone_numbers:, phone_consent:, email_consent:, first_name:, last_name:,
55
- external_id:, address:, email: OMIT, date_of_birth: OMIT, additional_properties: nil)
57
+ def initialize(guarantor_id:, phone_numbers:, phone_consent:, email_consent:, first_name:, last_name:, external_id:, address:, email: OMIT,
58
+ auto_charge_consent: OMIT, date_of_birth: OMIT, additional_properties: nil)
56
59
  @guarantor_id = guarantor_id
57
60
  @phone_numbers = phone_numbers
58
61
  @phone_consent = phone_consent
59
62
  @email = email if email != OMIT
60
63
  @email_consent = email_consent
64
+ @auto_charge_consent = auto_charge_consent if auto_charge_consent != OMIT
61
65
  @first_name = first_name
62
66
  @last_name = last_name
63
67
  @external_id = external_id
@@ -70,6 +74,7 @@ module CandidApiClient
70
74
  "phone_consent": phone_consent,
71
75
  "email": email,
72
76
  "email_consent": email_consent,
77
+ "auto_charge_consent": auto_charge_consent,
73
78
  "first_name": first_name,
74
79
  "last_name": last_name,
75
80
  "external_id": external_id,
@@ -95,6 +100,7 @@ module CandidApiClient
95
100
  phone_consent = struct["phone_consent"]
96
101
  email = struct["email"]
97
102
  email_consent = struct["email_consent"]
103
+ auto_charge_consent = struct["auto_charge_consent"]
98
104
  first_name = struct["first_name"]
99
105
  last_name = struct["last_name"]
100
106
  external_id = struct["external_id"]
@@ -111,6 +117,7 @@ module CandidApiClient
111
117
  phone_consent: phone_consent,
112
118
  email: email,
113
119
  email_consent: email_consent,
120
+ auto_charge_consent: auto_charge_consent,
114
121
  first_name: first_name,
115
122
  last_name: last_name,
116
123
  external_id: external_id,
@@ -139,6 +146,7 @@ module CandidApiClient
139
146
  obj.phone_consent.is_a?(Boolean) != false || raise("Passed value for field obj.phone_consent is not the expected type, validation failed.")
140
147
  obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
141
148
  obj.email_consent.is_a?(Boolean) != false || raise("Passed value for field obj.email_consent is not the expected type, validation failed.")
149
+ obj.auto_charge_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.auto_charge_consent is not the expected type, validation failed.")
142
150
  obj.first_name.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
143
151
  obj.last_name.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
144
152
  obj.external_id.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
@@ -19,6 +19,8 @@ module CandidApiClient
19
19
  attr_reader :email
20
20
  # @return [Boolean] Defaults to false
21
21
  attr_reader :email_consent
22
+ # @return [Boolean] Defaults to false
23
+ attr_reader :auto_charge_consent
22
24
  # @return [String]
23
25
  attr_reader :first_name
24
26
  # @return [String]
@@ -41,6 +43,7 @@ module CandidApiClient
41
43
  # @param phone_consent [Boolean] Defaults to false
42
44
  # @param email [String]
43
45
  # @param email_consent [Boolean] Defaults to false
46
+ # @param auto_charge_consent [Boolean] Defaults to false
44
47
  # @param first_name [String]
45
48
  # @param last_name [String]
46
49
  # @param external_id [String]
@@ -48,12 +51,13 @@ module CandidApiClient
48
51
  # @param address [CandidApiClient::Commons::Types::StreetAddressShortZip]
49
52
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
50
53
  # @return [CandidApiClient::Guarantor::V1::Types::GuarantorCreate]
51
- def initialize(first_name:, last_name:, external_id:, address:, phone_numbers: OMIT, phone_consent: OMIT,
52
- email: OMIT, email_consent: OMIT, date_of_birth: OMIT, additional_properties: nil)
54
+ def initialize(first_name:, last_name:, external_id:, address:, phone_numbers: OMIT, phone_consent: OMIT, email: OMIT, email_consent: OMIT,
55
+ auto_charge_consent: OMIT, date_of_birth: OMIT, additional_properties: nil)
53
56
  @phone_numbers = phone_numbers if phone_numbers != OMIT
54
57
  @phone_consent = phone_consent if phone_consent != OMIT
55
58
  @email = email if email != OMIT
56
59
  @email_consent = email_consent if email_consent != OMIT
60
+ @auto_charge_consent = auto_charge_consent if auto_charge_consent != OMIT
57
61
  @first_name = first_name
58
62
  @last_name = last_name
59
63
  @external_id = external_id
@@ -65,6 +69,7 @@ module CandidApiClient
65
69
  "phone_consent": phone_consent,
66
70
  "email": email,
67
71
  "email_consent": email_consent,
72
+ "auto_charge_consent": auto_charge_consent,
68
73
  "first_name": first_name,
69
74
  "last_name": last_name,
70
75
  "external_id": external_id,
@@ -89,6 +94,7 @@ module CandidApiClient
89
94
  phone_consent = struct["phone_consent"]
90
95
  email = struct["email"]
91
96
  email_consent = struct["email_consent"]
97
+ auto_charge_consent = struct["auto_charge_consent"]
92
98
  first_name = struct["first_name"]
93
99
  last_name = struct["last_name"]
94
100
  external_id = struct["external_id"]
@@ -104,6 +110,7 @@ module CandidApiClient
104
110
  phone_consent: phone_consent,
105
111
  email: email,
106
112
  email_consent: email_consent,
113
+ auto_charge_consent: auto_charge_consent,
107
114
  first_name: first_name,
108
115
  last_name: last_name,
109
116
  external_id: external_id,
@@ -131,6 +138,7 @@ module CandidApiClient
131
138
  obj.phone_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.phone_consent is not the expected type, validation failed.")
132
139
  obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
133
140
  obj.email_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.email_consent is not the expected type, validation failed.")
141
+ obj.auto_charge_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.auto_charge_consent is not the expected type, validation failed.")
134
142
  obj.first_name.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
135
143
  obj.last_name.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
136
144
  obj.external_id.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
@@ -29,6 +29,8 @@ module CandidApiClient
29
29
  attr_reader :email
30
30
  # @return [Boolean]
31
31
  attr_reader :email_consent
32
+ # @return [Boolean]
33
+ attr_reader :auto_charge_consent
32
34
  # @return [OpenStruct] Additional properties unmapped to the current class definition
33
35
  attr_reader :additional_properties
34
36
  # @return [Object]
@@ -46,10 +48,11 @@ module CandidApiClient
46
48
  # @param phone_consent [Boolean]
47
49
  # @param email [String]
48
50
  # @param email_consent [Boolean]
51
+ # @param auto_charge_consent [Boolean]
49
52
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
50
53
  # @return [CandidApiClient::Guarantor::V1::Types::GuarantorOptional]
51
54
  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)
55
+ phone_numbers: OMIT, phone_consent: OMIT, email: OMIT, email_consent: OMIT, auto_charge_consent: OMIT, additional_properties: nil)
53
56
  @first_name = first_name if first_name != OMIT
54
57
  @last_name = last_name if last_name != OMIT
55
58
  @external_id = external_id if external_id != OMIT
@@ -59,6 +62,7 @@ module CandidApiClient
59
62
  @phone_consent = phone_consent if phone_consent != OMIT
60
63
  @email = email if email != OMIT
61
64
  @email_consent = email_consent if email_consent != OMIT
65
+ @auto_charge_consent = auto_charge_consent if auto_charge_consent != OMIT
62
66
  @additional_properties = additional_properties
63
67
  @_field_set = {
64
68
  "first_name": first_name,
@@ -69,7 +73,8 @@ module CandidApiClient
69
73
  "phone_numbers": phone_numbers,
70
74
  "phone_consent": phone_consent,
71
75
  "email": email,
72
- "email_consent": email_consent
76
+ "email_consent": email_consent,
77
+ "auto_charge_consent": auto_charge_consent
73
78
  }.reject do |_k, v|
74
79
  v == OMIT
75
80
  end
@@ -99,6 +104,7 @@ module CandidApiClient
99
104
  phone_consent = struct["phone_consent"]
100
105
  email = struct["email"]
101
106
  email_consent = struct["email_consent"]
107
+ auto_charge_consent = struct["auto_charge_consent"]
102
108
  new(
103
109
  first_name: first_name,
104
110
  last_name: last_name,
@@ -109,6 +115,7 @@ module CandidApiClient
109
115
  phone_consent: phone_consent,
110
116
  email: email,
111
117
  email_consent: email_consent,
118
+ auto_charge_consent: auto_charge_consent,
112
119
  additional_properties: struct
113
120
  )
114
121
  end
@@ -136,6 +143,7 @@ module CandidApiClient
136
143
  obj.phone_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.phone_consent is not the expected type, validation failed.")
137
144
  obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
138
145
  obj.email_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.email_consent is not the expected type, validation failed.")
146
+ obj.auto_charge_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.auto_charge_consent is not the expected type, validation failed.")
139
147
  end
140
148
  end
141
149
  end
@@ -29,6 +29,8 @@ module CandidApiClient
29
29
  attr_reader :email
30
30
  # @return [Boolean]
31
31
  attr_reader :email_consent
32
+ # @return [Boolean]
33
+ attr_reader :auto_charge_consent
32
34
  # @return [OpenStruct] Additional properties unmapped to the current class definition
33
35
  attr_reader :additional_properties
34
36
  # @return [Object]
@@ -46,10 +48,11 @@ module CandidApiClient
46
48
  # @param phone_consent [Boolean]
47
49
  # @param email [String]
48
50
  # @param email_consent [Boolean]
51
+ # @param auto_charge_consent [Boolean]
49
52
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
50
53
  # @return [CandidApiClient::Guarantor::V1::Types::GuarantorUpdate]
51
54
  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)
55
+ phone_numbers: OMIT, phone_consent: OMIT, email: OMIT, email_consent: OMIT, auto_charge_consent: OMIT, additional_properties: nil)
53
56
  @first_name = first_name if first_name != OMIT
54
57
  @last_name = last_name if last_name != OMIT
55
58
  @external_id = external_id if external_id != OMIT
@@ -59,6 +62,7 @@ module CandidApiClient
59
62
  @phone_consent = phone_consent if phone_consent != OMIT
60
63
  @email = email if email != OMIT
61
64
  @email_consent = email_consent if email_consent != OMIT
65
+ @auto_charge_consent = auto_charge_consent if auto_charge_consent != OMIT
62
66
  @additional_properties = additional_properties
63
67
  @_field_set = {
64
68
  "first_name": first_name,
@@ -69,7 +73,8 @@ module CandidApiClient
69
73
  "phone_numbers": phone_numbers,
70
74
  "phone_consent": phone_consent,
71
75
  "email": email,
72
- "email_consent": email_consent
76
+ "email_consent": email_consent,
77
+ "auto_charge_consent": auto_charge_consent
73
78
  }.reject do |_k, v|
74
79
  v == OMIT
75
80
  end
@@ -99,6 +104,7 @@ module CandidApiClient
99
104
  phone_consent = struct["phone_consent"]
100
105
  email = struct["email"]
101
106
  email_consent = struct["email_consent"]
107
+ auto_charge_consent = struct["auto_charge_consent"]
102
108
  new(
103
109
  first_name: first_name,
104
110
  last_name: last_name,
@@ -109,6 +115,7 @@ module CandidApiClient
109
115
  phone_consent: phone_consent,
110
116
  email: email,
111
117
  email_consent: email_consent,
118
+ auto_charge_consent: auto_charge_consent,
112
119
  additional_properties: struct
113
120
  )
114
121
  end
@@ -136,6 +143,7 @@ module CandidApiClient
136
143
  obj.phone_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.phone_consent is not the expected type, validation failed.")
137
144
  obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
138
145
  obj.email_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.email_consent is not the expected type, validation failed.")
146
+ obj.auto_charge_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.auto_charge_consent is not the expected type, validation failed.")
139
147
  end
140
148
  end
141
149
  end
@@ -0,0 +1,206 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "admitting_diagnosis_code_qualifier"
4
+ require_relative "code_list_qualifier_code"
5
+ require_relative "date_time_period_format_qualifier"
6
+ require "ostruct"
7
+ require "json"
8
+
9
+ module CandidApiClient
10
+ module HealthCareCodeInformation
11
+ module V1
12
+ module Types
13
+ # This corresponds to BJ or ABJ code qualifier values.
14
+ class AdmittingDiagnosisNew
15
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisCodeQualifier]
16
+ attr_reader :admitting_diagnosis_code_qualifier
17
+ # @return [String]
18
+ attr_reader :admitting_diagnosis_code
19
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
20
+ attr_reader :code_list_qualifier
21
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
22
+ # You do not need to set this field generally, instead it is provided as advisory
23
+ # context on how this HealthCareCodeInformation's data will be available in
24
+ # reporting.
25
+ attr_reader :industry_code_1
26
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
27
+ # You do not need to set this field generally, instead it is provided as advisory
28
+ # context on how this HealthCareCodeInformation's data will be available in
29
+ # reporting.
30
+ attr_reader :industry_code_2
31
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
32
+ # You do not need to set this field generally, instead it is provided as advisory
33
+ # context on how this HealthCareCodeInformation's data will be available in
34
+ # reporting.
35
+ attr_reader :industry_code_3
36
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
37
+ # You do not need to set this field generally, instead it is provided as advisory
38
+ # context on how this HealthCareCodeInformation's data will be available in
39
+ # reporting.
40
+ attr_reader :industry_code_4
41
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
42
+ # as part of claim process.
43
+ # You do not need to set this field generally, instead it is provided as advisory
44
+ # context on how this HealthCareCodeInformation's data will be available in
45
+ # reporting.
46
+ attr_reader :date_time_period_format_qualifier
47
+ # @return [String] A string, formatted according to date_time_period_format_qualifier, which
48
+ # ultimately represents the date time period in which an information object
49
+ # is covering.
50
+ # You do not need to set this field generally, instead it is provided as advisory
51
+ # context on how this HealthCareCodeInformation's data will be available in
52
+ # reporting.
53
+ attr_reader :date_time_period
54
+ # @return [String] A decimal used to represent ValueInformation results.
55
+ # You do not need to set this field generally, instead it is provided as advisory
56
+ # context on how this HealthCareCodeInformation's data will be available in
57
+ # reporting.
58
+ attr_reader :monetary_amount
59
+ # @return [String] You do not need to set this field generally, instead it is provided as advisory
60
+ # context on how this HealthCareCodeInformation's data will be available in
61
+ # reporting.
62
+ attr_reader :quantity
63
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
64
+ attr_reader :additional_properties
65
+ # @return [Object]
66
+ attr_reader :_field_set
67
+ protected :_field_set
68
+
69
+ OMIT = Object.new
70
+
71
+ # @param admitting_diagnosis_code_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisCodeQualifier]
72
+ # @param admitting_diagnosis_code [String]
73
+ # @param code_list_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
74
+ # @param industry_code_1 [String] A code string whose interpretation depends on the code_list_qualifier being set.
75
+ # You do not need to set this field generally, instead it is provided as advisory
76
+ # context on how this HealthCareCodeInformation's data will be available in
77
+ # reporting.
78
+ # @param industry_code_2 [String] A code string whose interpretation depends on the code_list_qualifier being set.
79
+ # You do not need to set this field generally, instead it is provided as advisory
80
+ # context on how this HealthCareCodeInformation's data will be available in
81
+ # reporting.
82
+ # @param industry_code_3 [String] A code string whose interpretation depends on the code_list_qualifier being set.
83
+ # You do not need to set this field generally, instead it is provided as advisory
84
+ # context on how this HealthCareCodeInformation's data will be available in
85
+ # reporting.
86
+ # @param industry_code_4 [String] A code string whose interpretation depends on the code_list_qualifier being set.
87
+ # You do not need to set this field generally, instead it is provided as advisory
88
+ # context on how this HealthCareCodeInformation's data will be available in
89
+ # reporting.
90
+ # @param date_time_period_format_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
91
+ # as part of claim process.
92
+ # You do not need to set this field generally, instead it is provided as advisory
93
+ # context on how this HealthCareCodeInformation's data will be available in
94
+ # reporting.
95
+ # @param date_time_period [String] A string, formatted according to date_time_period_format_qualifier, which
96
+ # ultimately represents the date time period in which an information object
97
+ # is covering.
98
+ # You do not need to set this field generally, instead it is provided as advisory
99
+ # context on how this HealthCareCodeInformation's data will be available in
100
+ # reporting.
101
+ # @param monetary_amount [String] A decimal used to represent ValueInformation results.
102
+ # You do not need to set this field generally, instead it is provided as advisory
103
+ # context on how this HealthCareCodeInformation's data will be available in
104
+ # reporting.
105
+ # @param quantity [String] You do not need to set this field generally, instead it is provided as advisory
106
+ # context on how this HealthCareCodeInformation's data will be available in
107
+ # reporting.
108
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
109
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisNew]
110
+ def initialize(admitting_diagnosis_code_qualifier:, admitting_diagnosis_code:, code_list_qualifier: OMIT,
111
+ industry_code_1: OMIT, industry_code_2: OMIT, industry_code_3: OMIT, industry_code_4: OMIT, date_time_period_format_qualifier: OMIT, date_time_period: OMIT, monetary_amount: OMIT, quantity: OMIT, additional_properties: nil)
112
+ @admitting_diagnosis_code_qualifier = admitting_diagnosis_code_qualifier
113
+ @admitting_diagnosis_code = admitting_diagnosis_code
114
+ @code_list_qualifier = code_list_qualifier if code_list_qualifier != OMIT
115
+ @industry_code_1 = industry_code_1 if industry_code_1 != OMIT
116
+ @industry_code_2 = industry_code_2 if industry_code_2 != OMIT
117
+ @industry_code_3 = industry_code_3 if industry_code_3 != OMIT
118
+ @industry_code_4 = industry_code_4 if industry_code_4 != OMIT
119
+ if date_time_period_format_qualifier != OMIT
120
+ @date_time_period_format_qualifier = date_time_period_format_qualifier
121
+ end
122
+ @date_time_period = date_time_period if date_time_period != OMIT
123
+ @monetary_amount = monetary_amount if monetary_amount != OMIT
124
+ @quantity = quantity if quantity != OMIT
125
+ @additional_properties = additional_properties
126
+ @_field_set = {
127
+ "admitting_diagnosis_code_qualifier": admitting_diagnosis_code_qualifier,
128
+ "admitting_diagnosis_code": admitting_diagnosis_code,
129
+ "code_list_qualifier": code_list_qualifier,
130
+ "industry_code_1": industry_code_1,
131
+ "industry_code_2": industry_code_2,
132
+ "industry_code_3": industry_code_3,
133
+ "industry_code_4": industry_code_4,
134
+ "date_time_period_format_qualifier": date_time_period_format_qualifier,
135
+ "date_time_period": date_time_period,
136
+ "monetary_amount": monetary_amount,
137
+ "quantity": quantity
138
+ }.reject do |_k, v|
139
+ v == OMIT
140
+ end
141
+ end
142
+
143
+ # Deserialize a JSON object to an instance of AdmittingDiagnosisNew
144
+ #
145
+ # @param json_object [String]
146
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisNew]
147
+ def self.from_json(json_object:)
148
+ struct = JSON.parse(json_object, object_class: OpenStruct)
149
+ admitting_diagnosis_code_qualifier = struct["admitting_diagnosis_code_qualifier"]
150
+ admitting_diagnosis_code = struct["admitting_diagnosis_code"]
151
+ code_list_qualifier = struct["code_list_qualifier"]
152
+ industry_code_1 = struct["industry_code_1"]
153
+ industry_code_2 = struct["industry_code_2"]
154
+ industry_code_3 = struct["industry_code_3"]
155
+ industry_code_4 = struct["industry_code_4"]
156
+ date_time_period_format_qualifier = struct["date_time_period_format_qualifier"]
157
+ date_time_period = struct["date_time_period"]
158
+ monetary_amount = struct["monetary_amount"]
159
+ quantity = struct["quantity"]
160
+ new(
161
+ admitting_diagnosis_code_qualifier: admitting_diagnosis_code_qualifier,
162
+ admitting_diagnosis_code: admitting_diagnosis_code,
163
+ code_list_qualifier: code_list_qualifier,
164
+ industry_code_1: industry_code_1,
165
+ industry_code_2: industry_code_2,
166
+ industry_code_3: industry_code_3,
167
+ industry_code_4: industry_code_4,
168
+ date_time_period_format_qualifier: date_time_period_format_qualifier,
169
+ date_time_period: date_time_period,
170
+ monetary_amount: monetary_amount,
171
+ quantity: quantity,
172
+ additional_properties: struct
173
+ )
174
+ end
175
+
176
+ # Serialize an instance of AdmittingDiagnosisNew to a JSON object
177
+ #
178
+ # @return [String]
179
+ def to_json(*_args)
180
+ @_field_set&.to_json
181
+ end
182
+
183
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
184
+ # hash and check each fields type against the current object's property
185
+ # definitions.
186
+ #
187
+ # @param obj [Object]
188
+ # @return [Void]
189
+ def self.validate_raw(obj:)
190
+ obj.admitting_diagnosis_code_qualifier.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisCodeQualifier) != false || raise("Passed value for field obj.admitting_diagnosis_code_qualifier is not the expected type, validation failed.")
191
+ obj.admitting_diagnosis_code.is_a?(String) != false || raise("Passed value for field obj.admitting_diagnosis_code is not the expected type, validation failed.")
192
+ obj.code_list_qualifier&.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode) != false || raise("Passed value for field obj.code_list_qualifier is not the expected type, validation failed.")
193
+ obj.industry_code_1&.is_a?(String) != false || raise("Passed value for field obj.industry_code_1 is not the expected type, validation failed.")
194
+ obj.industry_code_2&.is_a?(String) != false || raise("Passed value for field obj.industry_code_2 is not the expected type, validation failed.")
195
+ obj.industry_code_3&.is_a?(String) != false || raise("Passed value for field obj.industry_code_3 is not the expected type, validation failed.")
196
+ obj.industry_code_4&.is_a?(String) != false || raise("Passed value for field obj.industry_code_4 is not the expected type, validation failed.")
197
+ obj.date_time_period_format_qualifier&.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier) != false || raise("Passed value for field obj.date_time_period_format_qualifier is not the expected type, validation failed.")
198
+ obj.date_time_period&.is_a?(String) != false || raise("Passed value for field obj.date_time_period is not the expected type, validation failed.")
199
+ obj.monetary_amount&.is_a?(String) != false || raise("Passed value for field obj.monetary_amount is not the expected type, validation failed.")
200
+ obj.quantity&.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
201
+ end
202
+ end
203
+ end
204
+ end
205
+ end
206
+ end