candidhealth 1.0.0 → 1.3.0
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/auth/client.rb +7 -7
- data/lib/candidhealth/auth/{v_2 → default}/client.rb +39 -13
- data/lib/candidhealth/auth/{v_2 → default}/types/auth_get_token_response.rb +3 -3
- data/lib/candidhealth/auth/default/types/invalid_content_type_error_type.rb +60 -0
- data/lib/candidhealth/auth/{v_2 → default}/types/too_many_requests_error_type.rb +3 -3
- data/lib/candidhealth/billing_notes/v_2/types/billing_note_base_optional.rb +62 -0
- data/lib/candidhealth/charge_capture/v_1/client.rb +504 -482
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture.rb +17 -1
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +173 -173
- data/lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb +26 -2
- data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +58 -0
- data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional.rb +100 -0
- data/lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create_optional.rb +101 -0
- data/lib/candidhealth/commons/types/phone_number_optional.rb +71 -0
- data/lib/candidhealth/commons/types/procedure_modifier.rb +2 -0
- data/lib/candidhealth/commons/types/street_address_long_zip_optional.rb +107 -0
- data/lib/candidhealth/custom_schemas/v_1/types/schema_instance_optional.rb +78 -0
- data/lib/candidhealth/diagnoses/client.rb +23 -4
- data/lib/candidhealth/diagnoses/types/diagnosis.rb +21 -2
- data/lib/candidhealth/diagnoses/types/diagnosis_create.rb +25 -2
- data/lib/candidhealth/diagnoses/types/diagnosis_create_optional.rb +126 -0
- data/lib/candidhealth/diagnoses/types/standalone_diagnosis_create.rb +22 -2
- data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider_optional.rb +123 -0
- data/lib/candidhealth/encounters/v_4/client.rb +214 -208
- data/lib/candidhealth/encounters/v_4/types/claim_supplemental_information_optional.rb +86 -0
- data/lib/candidhealth/encounters/v_4/types/clinical_note_category_create_optional.rb +78 -0
- data/lib/candidhealth/encounters/v_4/types/clinical_note_optional.rb +93 -0
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +16 -4
- data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +4 -2
- data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +780 -0
- data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +1 -139
- data/lib/candidhealth/encounters/v_4/types/epsdt_referral_optional.rb +85 -0
- data/lib/candidhealth/encounters/v_4/types/intake_question_optional.rb +84 -0
- data/lib/candidhealth/encounters/v_4/types/intervention_optional.rb +114 -0
- data/lib/candidhealth/encounters/v_4/types/lab_optional.rb +80 -0
- data/lib/candidhealth/encounters/v_4/types/medication_optional.rb +108 -0
- data/lib/candidhealth/encounters/v_4/types/patient_history_category_optional.rb +78 -0
- data/lib/candidhealth/guarantor/v_1/types/guarantor_optional.rb +144 -0
- data/lib/candidhealth/individual/types/individual_base_optional.rb +78 -0
- data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create_optional.rb +89 -0
- data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +8 -8
- data/lib/candidhealth/individual/types/subscriber_base_optional.rb +118 -0
- data/lib/candidhealth/individual/types/subscriber_create_optional.rb +132 -0
- data/lib/candidhealth/insurance_adjudications/v_1/client.rb +2 -0
- data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_create.rb +9 -1
- data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create_optional.rb +167 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +13 -1
- data/lib/candidhealth/service_lines/v_2/types/drug_identification_optional.rb +126 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +239 -0
- data/lib/candidhealth/service_lines/v_2/types/test_result_optional.rb +73 -0
- data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_reason.rb +1 -0
- data/lib/candidhealth/write_offs/v_1/types/patient_write_off_reason.rb +1 -0
- data/lib/candidhealth/yes_no_indicator/types/yes_no_indicator.rb +14 -0
- data/lib/core/oauth.rb +2 -2
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +32 -3
- metadata +34 -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,
|
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,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
|
@@ -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
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module CustomSchemas
|
8
|
+
module V1
|
9
|
+
module Types
|
10
|
+
class SchemaInstanceOptional
|
11
|
+
# @return [String] The schema to which the content must adhere.
|
12
|
+
attr_reader :schema_id
|
13
|
+
# @return [Hash{String => Object}] A set of key-value pairs that adhere to the naming and type convention of the
|
14
|
+
# schema. Not all keys in the schema must be included, but attaching any key that
|
15
|
+
# does not exist in the schema or attaching a key with the incorrect value type
|
16
|
+
# will result in errors.
|
17
|
+
attr_reader :content
|
18
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
19
|
+
attr_reader :additional_properties
|
20
|
+
# @return [Object]
|
21
|
+
attr_reader :_field_set
|
22
|
+
protected :_field_set
|
23
|
+
|
24
|
+
OMIT = Object.new
|
25
|
+
|
26
|
+
# @param schema_id [String] The schema to which the content must adhere.
|
27
|
+
# @param content [Hash{String => Object}] A set of key-value pairs that adhere to the naming and type convention of the
|
28
|
+
# schema. Not all keys in the schema must be included, but attaching any key that
|
29
|
+
# does not exist in the schema or attaching a key with the incorrect value type
|
30
|
+
# will result in errors.
|
31
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
32
|
+
# @return [CandidApiClient::CustomSchemas::V1::Types::SchemaInstanceOptional]
|
33
|
+
def initialize(schema_id: OMIT, content: OMIT, additional_properties: nil)
|
34
|
+
@schema_id = schema_id if schema_id != OMIT
|
35
|
+
@content = content if content != OMIT
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = { "schema_id": schema_id, "content": content }.reject do |_k, v|
|
38
|
+
v == OMIT
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Deserialize a JSON object to an instance of SchemaInstanceOptional
|
43
|
+
#
|
44
|
+
# @param json_object [String]
|
45
|
+
# @return [CandidApiClient::CustomSchemas::V1::Types::SchemaInstanceOptional]
|
46
|
+
def self.from_json(json_object:)
|
47
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
48
|
+
schema_id = struct["schema_id"]
|
49
|
+
content = struct["content"]
|
50
|
+
new(
|
51
|
+
schema_id: schema_id,
|
52
|
+
content: content,
|
53
|
+
additional_properties: struct
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Serialize an instance of SchemaInstanceOptional to a JSON object
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
def to_json(*_args)
|
61
|
+
@_field_set&.to_json
|
62
|
+
end
|
63
|
+
|
64
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
65
|
+
# hash and check each fields type against the current object's property
|
66
|
+
# definitions.
|
67
|
+
#
|
68
|
+
# @param obj [Object]
|
69
|
+
# @return [Void]
|
70
|
+
def self.validate_raw(obj:)
|
71
|
+
obj.schema_id&.is_a?(String) != false || raise("Passed value for field obj.schema_id is not the expected type, validation failed.")
|
72
|
+
obj.content&.is_a?(Hash) != false || raise("Passed value for field obj.content is not the expected type, validation failed.")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|