candidhealth 1.0.0 → 1.3.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 (66) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/client.rb +7 -7
  3. data/lib/candidhealth/auth/{v_2 → default}/client.rb +39 -13
  4. data/lib/candidhealth/auth/{v_2 → default}/types/auth_get_token_response.rb +3 -3
  5. data/lib/candidhealth/auth/default/types/invalid_content_type_error_type.rb +60 -0
  6. data/lib/candidhealth/auth/{v_2 → default}/types/too_many_requests_error_type.rb +3 -3
  7. data/lib/candidhealth/billing_notes/v_2/types/billing_note_base_optional.rb +62 -0
  8. data/lib/candidhealth/charge_capture/v_1/client.rb +532 -484
  9. data/lib/candidhealth/charge_capture/v_1/types/charge_capture.rb +17 -1
  10. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +173 -173
  11. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb +26 -2
  12. data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +58 -0
  13. data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional.rb +100 -0
  14. data/lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create_optional.rb +101 -0
  15. data/lib/candidhealth/commons/types/next_responsible_party.rb +16 -0
  16. data/lib/candidhealth/commons/types/phone_number_optional.rb +71 -0
  17. data/lib/candidhealth/commons/types/procedure_modifier.rb +2 -0
  18. data/lib/candidhealth/commons/types/street_address_long_zip_optional.rb +107 -0
  19. data/lib/candidhealth/contracts/v_2/client.rb +4 -4
  20. data/lib/candidhealth/custom_schemas/v_1/types/schema_instance_optional.rb +78 -0
  21. data/lib/candidhealth/diagnoses/client.rb +23 -4
  22. data/lib/candidhealth/diagnoses/types/diagnosis.rb +21 -2
  23. data/lib/candidhealth/diagnoses/types/diagnosis_create.rb +25 -2
  24. data/lib/candidhealth/diagnoses/types/diagnosis_create_optional.rb +126 -0
  25. data/lib/candidhealth/diagnoses/types/standalone_diagnosis_create.rb +22 -2
  26. data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider_optional.rb +123 -0
  27. data/lib/candidhealth/encounters/v_4/client.rb +216 -208
  28. data/lib/candidhealth/encounters/v_4/types/claim_supplemental_information_optional.rb +86 -0
  29. data/lib/candidhealth/encounters/v_4/types/clinical_note_category_create_optional.rb +78 -0
  30. data/lib/candidhealth/encounters/v_4/types/clinical_note_optional.rb +93 -0
  31. data/lib/candidhealth/encounters/v_4/types/encounter.rb +27 -4
  32. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +4 -2
  33. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +780 -0
  34. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +1 -139
  35. data/lib/candidhealth/encounters/v_4/types/epsdt_referral_optional.rb +85 -0
  36. data/lib/candidhealth/encounters/v_4/types/intake_question_optional.rb +84 -0
  37. data/lib/candidhealth/encounters/v_4/types/intervention_optional.rb +114 -0
  38. data/lib/candidhealth/encounters/v_4/types/lab_optional.rb +80 -0
  39. data/lib/candidhealth/encounters/v_4/types/medication_optional.rb +108 -0
  40. data/lib/candidhealth/encounters/v_4/types/patient_history_category_optional.rb +78 -0
  41. data/lib/candidhealth/guarantor/v_1/types/guarantor_optional.rb +144 -0
  42. data/lib/candidhealth/individual/types/individual_base_optional.rb +78 -0
  43. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create_optional.rb +89 -0
  44. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +8 -8
  45. data/lib/candidhealth/individual/types/subscriber_base_optional.rb +118 -0
  46. data/lib/candidhealth/individual/types/subscriber_create_optional.rb +132 -0
  47. data/lib/candidhealth/insurance_adjudications/v_1/client.rb +2 -0
  48. data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_create.rb +9 -1
  49. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create_optional.rb +167 -0
  50. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +1 -0
  51. data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +13 -1
  52. data/lib/candidhealth/service_lines/v_2/client.rb +4 -0
  53. data/lib/candidhealth/service_lines/v_2/types/drug_identification_optional.rb +126 -0
  54. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +10 -2
  55. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +10 -2
  56. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +247 -0
  57. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +10 -2
  58. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +10 -2
  59. data/lib/candidhealth/service_lines/v_2/types/test_result_optional.rb +73 -0
  60. data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_reason.rb +1 -0
  61. data/lib/candidhealth/write_offs/v_1/types/patient_write_off_reason.rb +1 -0
  62. data/lib/candidhealth/yes_no_indicator/types/yes_no_indicator.rb +14 -0
  63. data/lib/core/oauth.rb +2 -2
  64. data/lib/requests.rb +2 -2
  65. data/lib/types_export.rb +33 -3
  66. metadata +35 -5
@@ -19,6 +19,12 @@ module CandidApiClient
19
19
  # @return [String] A human readable error explaining why this charge capture Claim Creation failed
20
20
  # to create a claim.
21
21
  attr_reader :message
22
+ # @return [Boolean] Whether or not the error has been resolved as part of user workflows
23
+ attr_reader :resolved
24
+ # @return [String] A string denoting who resolved the error within candid's system.
25
+ attr_reader :resolved_by
26
+ # @return [String] A string denoting how or why an error was resolved.
27
+ attr_reader :resolution_reason
22
28
  # @return [String] The field of the corresponding underlying ChargeCapture that has a field that is
23
29
  # failing validations,
24
30
  # is not present but marked as required, or otherwise in error.
@@ -41,17 +47,23 @@ module CandidApiClient
41
47
  # which case this field will be null.
42
48
  # @param message [String] A human readable error explaining why this charge capture Claim Creation failed
43
49
  # to create a claim.
50
+ # @param resolved [Boolean] Whether or not the error has been resolved as part of user workflows
51
+ # @param resolved_by [String] A string denoting who resolved the error within candid's system.
52
+ # @param resolution_reason [String] A string denoting how or why an error was resolved.
44
53
  # @param field_in_error [String] The field of the corresponding underlying ChargeCapture that has a field that is
45
54
  # failing validations,
46
55
  # is not present but marked as required, or otherwise in error.
47
56
  # @param claim_creation_id [String] The ID of the ChargeCaptureClaimCreation associated with this Error.
48
57
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
49
58
  # @return [CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureError]
50
- def initialize(id:, message:, claim_creation_id:, charge_capture_id: OMIT, field_in_error: OMIT,
51
- additional_properties: nil)
59
+ def initialize(id:, message:, claim_creation_id:, charge_capture_id: OMIT, resolved: OMIT, resolved_by: OMIT,
60
+ resolution_reason: OMIT, field_in_error: OMIT, additional_properties: nil)
52
61
  @id = id
53
62
  @charge_capture_id = charge_capture_id if charge_capture_id != OMIT
54
63
  @message = message
64
+ @resolved = resolved if resolved != OMIT
65
+ @resolved_by = resolved_by if resolved_by != OMIT
66
+ @resolution_reason = resolution_reason if resolution_reason != OMIT
55
67
  @field_in_error = field_in_error if field_in_error != OMIT
56
68
  @claim_creation_id = claim_creation_id
57
69
  @additional_properties = additional_properties
@@ -59,6 +71,9 @@ module CandidApiClient
59
71
  "id": id,
60
72
  "charge_capture_id": charge_capture_id,
61
73
  "message": message,
74
+ "resolved": resolved,
75
+ "resolved_by": resolved_by,
76
+ "resolution_reason": resolution_reason,
62
77
  "field_in_error": field_in_error,
63
78
  "claim_creation_id": claim_creation_id
64
79
  }.reject do |_k, v|
@@ -75,12 +90,18 @@ module CandidApiClient
75
90
  id = struct["id"]
76
91
  charge_capture_id = struct["charge_capture_id"]
77
92
  message = struct["message"]
93
+ resolved = struct["resolved"]
94
+ resolved_by = struct["resolved_by"]
95
+ resolution_reason = struct["resolution_reason"]
78
96
  field_in_error = struct["field_in_error"]
79
97
  claim_creation_id = struct["claim_creation_id"]
80
98
  new(
81
99
  id: id,
82
100
  charge_capture_id: charge_capture_id,
83
101
  message: message,
102
+ resolved: resolved,
103
+ resolved_by: resolved_by,
104
+ resolution_reason: resolution_reason,
84
105
  field_in_error: field_in_error,
85
106
  claim_creation_id: claim_creation_id,
86
107
  additional_properties: struct
@@ -104,6 +125,9 @@ module CandidApiClient
104
125
  obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
105
126
  obj.charge_capture_id&.is_a?(String) != false || raise("Passed value for field obj.charge_capture_id is not the expected type, validation failed.")
106
127
  obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
128
+ obj.resolved&.is_a?(Boolean) != false || raise("Passed value for field obj.resolved is not the expected type, validation failed.")
129
+ obj.resolved_by&.is_a?(String) != false || raise("Passed value for field obj.resolved_by is not the expected type, validation failed.")
130
+ obj.resolution_reason&.is_a?(String) != false || raise("Passed value for field obj.resolution_reason is not the expected type, validation failed.")
107
131
  obj.field_in_error&.is_a?(String) != false || raise("Passed value for field obj.field_in_error is not the expected type, validation failed.")
108
132
  obj.claim_creation_id.is_a?(String) != false || raise("Passed value for field obj.claim_creation_id is not the expected type, validation failed.")
109
133
  end
@@ -65,6 +65,34 @@ module CandidApiClient
65
65
  CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreationSummary.from_json(json_object: response.body)
66
66
  end
67
67
 
68
+ # @param charge_capture_bundle_error_id [String]
69
+ # @param resolved_by [String] A string, denoting who resolved the error for audit trail purposes.
70
+ # @param resolution_reason [String] A string denoting why or how the error was dealt with for audit trail purposes.
71
+ # @param request_options [CandidApiClient::RequestOptions]
72
+ # @return [Void]
73
+ # @example
74
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
75
+ # api.charge_capture_bundles.v_1.resolve_charge_creation_error(charge_capture_bundle_error_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
76
+ def resolve_charge_creation_error(charge_capture_bundle_error_id:, resolved_by: nil, resolution_reason: nil,
77
+ request_options: nil)
78
+ @request_client.conn.patch do |req|
79
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
80
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
81
+ req.headers = {
82
+ **(req.headers || {}),
83
+ **@request_client.get_headers,
84
+ **(request_options&.additional_headers || {})
85
+ }.compact
86
+ req.body = {
87
+ **(request_options&.additional_body_parameters || {}),
88
+ resolved_by: resolved_by,
89
+ resolution_reason: resolution_reason
90
+ }.compact
91
+ req.url "#{@request_client.get_url(environment: CandidApi,
92
+ request_options: request_options)}/api/charge_capture_claim_creation/v1/error/#{charge_capture_bundle_error_id}"
93
+ end
94
+ end
95
+
68
96
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
69
97
  # @param sort [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreationSortField] Defaults to created_at
70
98
  # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Sort direction. Defaults to descending order if not provided.
@@ -206,6 +234,36 @@ module CandidApiClient
206
234
  end
207
235
  end
208
236
 
237
+ # @param charge_capture_bundle_error_id [String]
238
+ # @param resolved_by [String] A string, denoting who resolved the error for audit trail purposes.
239
+ # @param resolution_reason [String] A string denoting why or how the error was dealt with for audit trail purposes.
240
+ # @param request_options [CandidApiClient::RequestOptions]
241
+ # @return [Void]
242
+ # @example
243
+ # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
244
+ # api.charge_capture_bundles.v_1.resolve_charge_creation_error(charge_capture_bundle_error_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
245
+ def resolve_charge_creation_error(charge_capture_bundle_error_id:, resolved_by: nil, resolution_reason: nil,
246
+ request_options: nil)
247
+ Async do
248
+ @request_client.conn.patch do |req|
249
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
250
+ req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
251
+ req.headers = {
252
+ **(req.headers || {}),
253
+ **@request_client.get_headers,
254
+ **(request_options&.additional_headers || {})
255
+ }.compact
256
+ req.body = {
257
+ **(request_options&.additional_body_parameters || {}),
258
+ resolved_by: resolved_by,
259
+ resolution_reason: resolution_reason
260
+ }.compact
261
+ req.url "#{@request_client.get_url(environment: CandidApi,
262
+ request_options: request_options)}/api/charge_capture_claim_creation/v1/error/#{charge_capture_bundle_error_id}"
263
+ end
264
+ end
265
+ end
266
+
209
267
  # @param limit [Integer] Maximum number of entities per page, defaults to 100.
210
268
  # @param sort [CandidApiClient::ChargeCaptureBundles::V1::Types::ChargeCaptureClaimCreationSortField] Defaults to created_at
211
269
  # @param sort_direction [CandidApiClient::Commons::Types::SortDirection] Sort direction. Defaults to descending order if not provided.
@@ -0,0 +1,100 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "date"
4
+ require_relative "claim_frequency_type_code"
5
+ require_relative "../../../commons/types/claim_submission_payer_responsibility_type"
6
+ require_relative "../../../commons/types/intended_submission_medium"
7
+ require "ostruct"
8
+ require "json"
9
+
10
+ module CandidApiClient
11
+ module ClaimSubmission
12
+ module V1
13
+ module Types
14
+ # Data about each external submission.
15
+ class ClaimSubmissionRecordCreateOptional
16
+ # @return [DateTime] When the claim was submitted to the payer.
17
+ attr_reader :submitted_at
18
+ # @return [CandidApiClient::ClaimSubmission::V1::Types::ClaimFrequencyTypeCode]
19
+ attr_reader :claim_frequency_code
20
+ # @return [CandidApiClient::Commons::Types::ClaimSubmissionPayerResponsibilityType]
21
+ attr_reader :payer_responsibility
22
+ # @return [CandidApiClient::Commons::Types::IntendedSubmissionMedium] The medium by which the claim was submitted to the payer: paper or electronic.
23
+ # If omitted, defaults to electronic.
24
+ attr_reader :intended_submission_medium
25
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
26
+ attr_reader :additional_properties
27
+ # @return [Object]
28
+ attr_reader :_field_set
29
+ protected :_field_set
30
+
31
+ OMIT = Object.new
32
+
33
+ # @param submitted_at [DateTime] When the claim was submitted to the payer.
34
+ # @param claim_frequency_code [CandidApiClient::ClaimSubmission::V1::Types::ClaimFrequencyTypeCode]
35
+ # @param payer_responsibility [CandidApiClient::Commons::Types::ClaimSubmissionPayerResponsibilityType]
36
+ # @param intended_submission_medium [CandidApiClient::Commons::Types::IntendedSubmissionMedium] The medium by which the claim was submitted to the payer: paper or electronic.
37
+ # If omitted, defaults to electronic.
38
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
39
+ # @return [CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreateOptional]
40
+ def initialize(submitted_at: OMIT, claim_frequency_code: OMIT, payer_responsibility: OMIT,
41
+ intended_submission_medium: OMIT, additional_properties: nil)
42
+ @submitted_at = submitted_at if submitted_at != OMIT
43
+ @claim_frequency_code = claim_frequency_code if claim_frequency_code != OMIT
44
+ @payer_responsibility = payer_responsibility if payer_responsibility != OMIT
45
+ @intended_submission_medium = intended_submission_medium if intended_submission_medium != OMIT
46
+ @additional_properties = additional_properties
47
+ @_field_set = {
48
+ "submitted_at": submitted_at,
49
+ "claim_frequency_code": claim_frequency_code,
50
+ "payer_responsibility": payer_responsibility,
51
+ "intended_submission_medium": intended_submission_medium
52
+ }.reject do |_k, v|
53
+ v == OMIT
54
+ end
55
+ end
56
+
57
+ # Deserialize a JSON object to an instance of ClaimSubmissionRecordCreateOptional
58
+ #
59
+ # @param json_object [String]
60
+ # @return [CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreateOptional]
61
+ def self.from_json(json_object:)
62
+ struct = JSON.parse(json_object, object_class: OpenStruct)
63
+ parsed_json = JSON.parse(json_object)
64
+ submitted_at = (DateTime.parse(parsed_json["submitted_at"]) unless parsed_json["submitted_at"].nil?)
65
+ claim_frequency_code = struct["claim_frequency_code"]
66
+ payer_responsibility = struct["payer_responsibility"]
67
+ intended_submission_medium = struct["intended_submission_medium"]
68
+ new(
69
+ submitted_at: submitted_at,
70
+ claim_frequency_code: claim_frequency_code,
71
+ payer_responsibility: payer_responsibility,
72
+ intended_submission_medium: intended_submission_medium,
73
+ additional_properties: struct
74
+ )
75
+ end
76
+
77
+ # Serialize an instance of ClaimSubmissionRecordCreateOptional to a JSON object
78
+ #
79
+ # @return [String]
80
+ def to_json(*_args)
81
+ @_field_set&.to_json
82
+ end
83
+
84
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
85
+ # hash and check each fields type against the current object's property
86
+ # definitions.
87
+ #
88
+ # @param obj [Object]
89
+ # @return [Void]
90
+ def self.validate_raw(obj:)
91
+ obj.submitted_at&.is_a?(DateTime) != false || raise("Passed value for field obj.submitted_at is not the expected type, validation failed.")
92
+ obj.claim_frequency_code&.is_a?(CandidApiClient::ClaimSubmission::V1::Types::ClaimFrequencyTypeCode) != false || raise("Passed value for field obj.claim_frequency_code is not the expected type, validation failed.")
93
+ obj.payer_responsibility&.is_a?(CandidApiClient::Commons::Types::ClaimSubmissionPayerResponsibilityType) != false || raise("Passed value for field obj.payer_responsibility is not the expected type, validation failed.")
94
+ obj.intended_submission_medium&.is_a?(CandidApiClient::Commons::Types::IntendedSubmissionMedium) != false || raise("Passed value for field obj.intended_submission_medium is not the expected type, validation failed.")
95
+ end
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,101 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "date"
4
+ require_relative "claim_submission_record_create_optional"
5
+ require "ostruct"
6
+ require "json"
7
+
8
+ module CandidApiClient
9
+ module ClaimSubmission
10
+ module V1
11
+ module Types
12
+ class ExternalClaimSubmissionCreateOptional
13
+ # @return [DateTime] When the claim was created in the external system.
14
+ attr_reader :claim_created_at
15
+ # @return [String] The Patient Control Number sent on the claim to the payer. To guarantee
16
+ # compatibility with all payers, this field must consist
17
+ # only of uppercase letters and numbers and be no more than 14 characters long.
18
+ attr_reader :patient_control_number
19
+ # @return [Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreateOptional>] A successful claim submission record will be created for each value provided.
20
+ # An empty list may be provided for cases where the claim originated in an
21
+ # external system but was never submitted to a payer.
22
+ attr_reader :submission_records
23
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
24
+ attr_reader :additional_properties
25
+ # @return [Object]
26
+ attr_reader :_field_set
27
+ protected :_field_set
28
+
29
+ OMIT = Object.new
30
+
31
+ # @param claim_created_at [DateTime] When the claim was created in the external system.
32
+ # @param patient_control_number [String] The Patient Control Number sent on the claim to the payer. To guarantee
33
+ # compatibility with all payers, this field must consist
34
+ # only of uppercase letters and numbers and be no more than 14 characters long.
35
+ # @param submission_records [Array<CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreateOptional>] A successful claim submission record will be created for each value provided.
36
+ # An empty list may be provided for cases where the claim originated in an
37
+ # external system but was never submitted to a payer.
38
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
39
+ # @return [CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreateOptional]
40
+ def initialize(submission_records:, claim_created_at: OMIT, patient_control_number: OMIT,
41
+ additional_properties: nil)
42
+ @claim_created_at = claim_created_at if claim_created_at != OMIT
43
+ @patient_control_number = patient_control_number if patient_control_number != OMIT
44
+ @submission_records = submission_records
45
+ @additional_properties = additional_properties
46
+ @_field_set = {
47
+ "claim_created_at": claim_created_at,
48
+ "patient_control_number": patient_control_number,
49
+ "submission_records": submission_records
50
+ }.reject do |_k, v|
51
+ v == OMIT
52
+ end
53
+ end
54
+
55
+ # Deserialize a JSON object to an instance of
56
+ # ExternalClaimSubmissionCreateOptional
57
+ #
58
+ # @param json_object [String]
59
+ # @return [CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreateOptional]
60
+ def self.from_json(json_object:)
61
+ struct = JSON.parse(json_object, object_class: OpenStruct)
62
+ parsed_json = JSON.parse(json_object)
63
+ claim_created_at = unless parsed_json["claim_created_at"].nil?
64
+ DateTime.parse(parsed_json["claim_created_at"])
65
+ end
66
+ patient_control_number = struct["patient_control_number"]
67
+ submission_records = parsed_json["submission_records"]&.map do |item|
68
+ item = item.to_json
69
+ CandidApiClient::ClaimSubmission::V1::Types::ClaimSubmissionRecordCreateOptional.from_json(json_object: item)
70
+ end
71
+ new(
72
+ claim_created_at: claim_created_at,
73
+ patient_control_number: patient_control_number,
74
+ submission_records: submission_records,
75
+ additional_properties: struct
76
+ )
77
+ end
78
+
79
+ # Serialize an instance of ExternalClaimSubmissionCreateOptional to a JSON object
80
+ #
81
+ # @return [String]
82
+ def to_json(*_args)
83
+ @_field_set&.to_json
84
+ end
85
+
86
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
87
+ # hash and check each fields type against the current object's property
88
+ # definitions.
89
+ #
90
+ # @param obj [Object]
91
+ # @return [Void]
92
+ def self.validate_raw(obj:)
93
+ obj.claim_created_at&.is_a?(DateTime) != false || raise("Passed value for field obj.claim_created_at is not the expected type, validation failed.")
94
+ obj.patient_control_number&.is_a?(String) != false || raise("Passed value for field obj.patient_control_number is not the expected type, validation failed.")
95
+ obj.submission_records.is_a?(Array) != false || raise("Passed value for field obj.submission_records is not the expected type, validation failed.")
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module Commons
5
+ module Types
6
+ class NextResponsibleParty
7
+ PRIMARY = "primary"
8
+ SECONDARY = "secondary"
9
+ TERTIARY = "tertiary"
10
+ PATIENT = "patient"
11
+ NON_INSURANCE = "non_insurance"
12
+ NONE = "none"
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "phone_number_type"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module Commons
9
+ module Types
10
+ class PhoneNumberOptional
11
+ # @return [String]
12
+ attr_reader :number
13
+ # @return [CandidApiClient::Commons::Types::PhoneNumberType]
14
+ attr_reader :type
15
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
16
+ attr_reader :additional_properties
17
+ # @return [Object]
18
+ attr_reader :_field_set
19
+ protected :_field_set
20
+
21
+ OMIT = Object.new
22
+
23
+ # @param number [String]
24
+ # @param type [CandidApiClient::Commons::Types::PhoneNumberType]
25
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
+ # @return [CandidApiClient::Commons::Types::PhoneNumberOptional]
27
+ def initialize(number: OMIT, type: OMIT, additional_properties: nil)
28
+ @number = number if number != OMIT
29
+ @type = type if type != OMIT
30
+ @additional_properties = additional_properties
31
+ @_field_set = { "number": number, "type": type }.reject do |_k, v|
32
+ v == OMIT
33
+ end
34
+ end
35
+
36
+ # Deserialize a JSON object to an instance of PhoneNumberOptional
37
+ #
38
+ # @param json_object [String]
39
+ # @return [CandidApiClient::Commons::Types::PhoneNumberOptional]
40
+ def self.from_json(json_object:)
41
+ struct = JSON.parse(json_object, object_class: OpenStruct)
42
+ number = struct["number"]
43
+ type = struct["type"]
44
+ new(
45
+ number: number,
46
+ type: type,
47
+ additional_properties: struct
48
+ )
49
+ end
50
+
51
+ # Serialize an instance of PhoneNumberOptional to a JSON object
52
+ #
53
+ # @return [String]
54
+ def to_json(*_args)
55
+ @_field_set&.to_json
56
+ end
57
+
58
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
59
+ # hash and check each fields type against the current object's property
60
+ # definitions.
61
+ #
62
+ # @param obj [Object]
63
+ # @return [Void]
64
+ def self.validate_raw(obj:)
65
+ obj.number&.is_a?(String) != false || raise("Passed value for field obj.number is not the expected type, validation failed.")
66
+ obj.type&.is_a?(CandidApiClient::Commons::Types::PhoneNumberType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -397,10 +397,12 @@ module CandidApiClient
397
397
  W_1 = "W1"
398
398
  W_2 = "W2"
399
399
  W_3 = "W3"
400
+ X_4 = "X4"
400
401
  XE = "XE"
401
402
  XP = "XP"
402
403
  XS = "XS"
403
404
  XU = "XU"
405
+ XY = "XY"
404
406
  end
405
407
  end
406
408
  end
@@ -0,0 +1,107 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "state"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module Commons
9
+ module Types
10
+ class StreetAddressLongZipOptional
11
+ # @return [String] 4-digit zip add-on code https://en.wikipedia.org/wiki/ZIP_Code#ZIP+4
12
+ attr_reader :zip_plus_four_code
13
+ # @return [String]
14
+ attr_reader :address_1
15
+ # @return [String]
16
+ attr_reader :address_2
17
+ # @return [String]
18
+ attr_reader :city
19
+ # @return [CandidApiClient::Commons::Types::State]
20
+ attr_reader :state
21
+ # @return [String] 5-digit zip code
22
+ attr_reader :zip_code
23
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
24
+ attr_reader :additional_properties
25
+ # @return [Object]
26
+ attr_reader :_field_set
27
+ protected :_field_set
28
+
29
+ OMIT = Object.new
30
+
31
+ # @param zip_plus_four_code [String] 4-digit zip add-on code https://en.wikipedia.org/wiki/ZIP_Code#ZIP+4
32
+ # @param address_1 [String]
33
+ # @param address_2 [String]
34
+ # @param city [String]
35
+ # @param state [CandidApiClient::Commons::Types::State]
36
+ # @param zip_code [String] 5-digit zip code
37
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
38
+ # @return [CandidApiClient::Commons::Types::StreetAddressLongZipOptional]
39
+ def initialize(zip_plus_four_code: OMIT, address_1: OMIT, address_2: OMIT, city: OMIT, state: OMIT,
40
+ zip_code: OMIT, additional_properties: nil)
41
+ @zip_plus_four_code = zip_plus_four_code if zip_plus_four_code != OMIT
42
+ @address_1 = address_1 if address_1 != OMIT
43
+ @address_2 = address_2 if address_2 != OMIT
44
+ @city = city if city != OMIT
45
+ @state = state if state != OMIT
46
+ @zip_code = zip_code if zip_code != OMIT
47
+ @additional_properties = additional_properties
48
+ @_field_set = {
49
+ "zip_plus_four_code": zip_plus_four_code,
50
+ "address1": address_1,
51
+ "address2": address_2,
52
+ "city": city,
53
+ "state": state,
54
+ "zip_code": zip_code
55
+ }.reject do |_k, v|
56
+ v == OMIT
57
+ end
58
+ end
59
+
60
+ # Deserialize a JSON object to an instance of StreetAddressLongZipOptional
61
+ #
62
+ # @param json_object [String]
63
+ # @return [CandidApiClient::Commons::Types::StreetAddressLongZipOptional]
64
+ def self.from_json(json_object:)
65
+ struct = JSON.parse(json_object, object_class: OpenStruct)
66
+ zip_plus_four_code = struct["zip_plus_four_code"]
67
+ address_1 = struct["address1"]
68
+ address_2 = struct["address2"]
69
+ city = struct["city"]
70
+ state = struct["state"]
71
+ zip_code = struct["zip_code"]
72
+ new(
73
+ zip_plus_four_code: zip_plus_four_code,
74
+ address_1: address_1,
75
+ address_2: address_2,
76
+ city: city,
77
+ state: state,
78
+ zip_code: zip_code,
79
+ additional_properties: struct
80
+ )
81
+ end
82
+
83
+ # Serialize an instance of StreetAddressLongZipOptional to a JSON object
84
+ #
85
+ # @return [String]
86
+ def to_json(*_args)
87
+ @_field_set&.to_json
88
+ end
89
+
90
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
91
+ # hash and check each fields type against the current object's property
92
+ # definitions.
93
+ #
94
+ # @param obj [Object]
95
+ # @return [Void]
96
+ def self.validate_raw(obj:)
97
+ obj.zip_plus_four_code&.is_a?(String) != false || raise("Passed value for field obj.zip_plus_four_code is not the expected type, validation failed.")
98
+ obj.address_1&.is_a?(String) != false || raise("Passed value for field obj.address_1 is not the expected type, validation failed.")
99
+ obj.address_2&.is_a?(String) != false || raise("Passed value for field obj.address_2 is not the expected type, validation failed.")
100
+ obj.city&.is_a?(String) != false || raise("Passed value for field obj.city is not the expected type, validation failed.")
101
+ obj.state&.is_a?(CandidApiClient::Commons::Types::State) != false || raise("Passed value for field obj.state is not the expected type, validation failed.")
102
+ obj.zip_code&.is_a?(String) != false || raise("Passed value for field obj.zip_code is not the expected type, validation failed.")
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
@@ -115,7 +115,7 @@ module CandidApiClient
115
115
  # @param contracting_provider_id [String] The UUID of the provider under agreement to the contract
116
116
  # @param rendering_provider_ids [Set<String>] A rendering provider isn't contracted directly with the payer but can render
117
117
  # services under the contract held by the contracting provider.
118
- # Max items is 100.
118
+ # Max items is 1000.
119
119
  # @param payer_uuid [String] The UUID of the insurance company under agreement to the contract
120
120
  # @param request_options [CandidApiClient::RequestOptions]
121
121
  # @return [CandidApiClient::Contracts::V2::Types::ContractWithProviders]
@@ -181,7 +181,7 @@ module CandidApiClient
181
181
  # @param contract_id [String]
182
182
  # @param rendering_provider_ids [Set<String>] A rendering provider isn't contracted directly with the payer but can render
183
183
  # services under the contract held by the contracting provider.
184
- # Max items is 100.
184
+ # Max items is 1000.
185
185
  # @param effective_date [String] The starting day upon which the contract is effective
186
186
  # @param expiration_date [CandidApiClient::Contracts::V2::Types::DateUpdate] An optional end day upon which the contract expires
187
187
  # @param regions [CandidApiClient::Contracts::V2::Types::RegionsUpdate] If present, the contract's rendering providers will be patched to this exact
@@ -324,7 +324,7 @@ module CandidApiClient
324
324
  # @param contracting_provider_id [String] The UUID of the provider under agreement to the contract
325
325
  # @param rendering_provider_ids [Set<String>] A rendering provider isn't contracted directly with the payer but can render
326
326
  # services under the contract held by the contracting provider.
327
- # Max items is 100.
327
+ # Max items is 1000.
328
328
  # @param payer_uuid [String] The UUID of the insurance company under agreement to the contract
329
329
  # @param request_options [CandidApiClient::RequestOptions]
330
330
  # @return [CandidApiClient::Contracts::V2::Types::ContractWithProviders]
@@ -394,7 +394,7 @@ module CandidApiClient
394
394
  # @param contract_id [String]
395
395
  # @param rendering_provider_ids [Set<String>] A rendering provider isn't contracted directly with the payer but can render
396
396
  # services under the contract held by the contracting provider.
397
- # Max items is 100.
397
+ # Max items is 1000.
398
398
  # @param effective_date [String] The starting day upon which the contract is effective
399
399
  # @param expiration_date [CandidApiClient::Contracts::V2::Types::DateUpdate] An optional end day upon which the contract expires
400
400
  # @param regions [CandidApiClient::Contracts::V2::Types::RegionsUpdate] If present, the contract's rendering providers will be patched to this exact