candidhealth 0.17.5 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create.rb +15 -4
- data/lib/candidhealth/commons/types/entity_conflict_error_message.rb +47 -0
- data/lib/candidhealth/commons/types/intended_submission_medium.rb +11 -0
- data/lib/candidhealth/commons/types/network_type.rb +27 -0
- data/lib/candidhealth/commons/types/rate_id.rb +7 -0
- data/lib/candidhealth/commons/types/source_of_payment_code.rb +1 -0
- data/lib/candidhealth/contracts/v_2/types/contract.rb +2 -2
- data/lib/candidhealth/contracts/v_2/types/contract_with_providers.rb +3 -3
- data/lib/candidhealth/eligibility/v_2/client.rb +10 -2
- data/lib/candidhealth/encounters/v_4/client.rb +22 -10
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +13 -5
- data/lib/candidhealth/fee_schedules/client.rb +28 -0
- data/lib/candidhealth/fee_schedules/v_3/client.rb +499 -0
- data/lib/candidhealth/fee_schedules/v_3/types/dimension_match.rb +157 -0
- data/lib/candidhealth/fee_schedules/v_3/types/dimension_name.rb +14 -0
- data/lib/candidhealth/fee_schedules/v_3/types/dimensions.rb +136 -0
- data/lib/candidhealth/fee_schedules/v_3/types/dimensions_page.rb +69 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_cpt_code.rb +60 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_date.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_facility_type_code.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_geo.rb +66 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_license_type.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_modifiers.rb +66 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_network_types.rb +66 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_payer.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_provider.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_result.rb +61 -0
- data/lib/candidhealth/fee_schedules/v_3/types/match_test_result.rb +66 -0
- data/lib/candidhealth/fee_schedules/v_3/types/new_rate.rb +64 -0
- data/lib/candidhealth/fee_schedules/v_3/types/new_rate_version.rb +64 -0
- data/lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb +136 -0
- data/lib/candidhealth/fee_schedules/v_3/types/overlapping_rate_entries_error.rb +71 -0
- data/lib/candidhealth/fee_schedules/v_3/types/payer_threshold.rb +66 -0
- data/lib/candidhealth/fee_schedules/v_3/types/payer_thresholds_page.rb +68 -0
- data/lib/candidhealth/fee_schedules/v_3/types/rate.rb +96 -0
- data/lib/candidhealth/fee_schedules/v_3/types/rate_entry.rb +72 -0
- data/lib/candidhealth/fee_schedules/v_3/types/rate_upload.rb +94 -0
- data/lib/candidhealth/fee_schedules/v_3/types/rate_upload_with_possible_errors.rb +76 -0
- data/lib/candidhealth/fee_schedules/v_3/types/rates_page.rb +65 -0
- data/lib/candidhealth/fee_schedules/v_3/types/threshold_match.rb +72 -0
- data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +129 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +32 -0
- metadata +36 -2
@@ -0,0 +1,136 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../payers/v_3/types/payer_uuid"
|
4
|
+
require_relative "../../../organization_providers/v_2/types/organization_provider_id"
|
5
|
+
require "set"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module CandidApiClient
|
9
|
+
module FeeSchedules
|
10
|
+
module V3
|
11
|
+
# Dimension values that qualify a rate. For the optional dimensions, a null value signifies "all apply". For set-type dimensions, an empty set signifies "all apply".
|
12
|
+
class Dimensions
|
13
|
+
attr_reader :payer_uuid, :organization_billing_provider_id, :states, :zip_codes, :license_types,
|
14
|
+
:facility_type_codes, :network_types, :cpt_code, :modifiers, :additional_properties
|
15
|
+
|
16
|
+
# @param payer_uuid [Payers::V3::PAYER_UUID]
|
17
|
+
# @param organization_billing_provider_id [OrganizationProviders::V2::ORGANIZATION_PROVIDER_ID]
|
18
|
+
# @param states [Set<Commons::State>]
|
19
|
+
# @param zip_codes [Set<String>]
|
20
|
+
# @param license_types [Set<OrganizationProviders::V2::LicenseType>]
|
21
|
+
# @param facility_type_codes [Set<Commons::FacilityTypeCode>]
|
22
|
+
# @param network_types [Set<Commons::NetworkType>]
|
23
|
+
# @param cpt_code [String]
|
24
|
+
# @param modifiers [Set<Commons::ProcedureModifier>]
|
25
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
# @return [FeeSchedules::V3::Dimensions]
|
27
|
+
def initialize(payer_uuid:, organization_billing_provider_id:, states:, zip_codes:, license_types:,
|
28
|
+
facility_type_codes:, network_types:, cpt_code:, modifiers:, additional_properties: nil)
|
29
|
+
# @type [Payers::V3::PAYER_UUID]
|
30
|
+
@payer_uuid = payer_uuid
|
31
|
+
# @type [OrganizationProviders::V2::ORGANIZATION_PROVIDER_ID]
|
32
|
+
@organization_billing_provider_id = organization_billing_provider_id
|
33
|
+
# @type [Set<Commons::State>]
|
34
|
+
@states = states
|
35
|
+
# @type [Set<String>]
|
36
|
+
@zip_codes = zip_codes
|
37
|
+
# @type [Set<OrganizationProviders::V2::LicenseType>]
|
38
|
+
@license_types = license_types
|
39
|
+
# @type [Set<Commons::FacilityTypeCode>]
|
40
|
+
@facility_type_codes = facility_type_codes
|
41
|
+
# @type [Set<Commons::NetworkType>]
|
42
|
+
@network_types = network_types
|
43
|
+
# @type [String]
|
44
|
+
@cpt_code = cpt_code
|
45
|
+
# @type [Set<Commons::ProcedureModifier>]
|
46
|
+
@modifiers = modifiers
|
47
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
48
|
+
@additional_properties = additional_properties
|
49
|
+
end
|
50
|
+
|
51
|
+
# Deserialize a JSON object to an instance of Dimensions
|
52
|
+
#
|
53
|
+
# @param json_object [JSON]
|
54
|
+
# @return [FeeSchedules::V3::Dimensions]
|
55
|
+
def self.from_json(json_object:)
|
56
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
57
|
+
parsed_json = JSON.parse(json_object)
|
58
|
+
payer_uuid = struct.payer_uuid
|
59
|
+
organization_billing_provider_id = struct.organization_billing_provider_id
|
60
|
+
if parsed_json["states"].nil?
|
61
|
+
states = nil
|
62
|
+
else
|
63
|
+
states = parsed_json["states"].to_json
|
64
|
+
states = Set.new(states)
|
65
|
+
end
|
66
|
+
if parsed_json["zip_codes"].nil?
|
67
|
+
zip_codes = nil
|
68
|
+
else
|
69
|
+
zip_codes = parsed_json["zip_codes"].to_json
|
70
|
+
zip_codes = Set.new(zip_codes)
|
71
|
+
end
|
72
|
+
if parsed_json["license_types"].nil?
|
73
|
+
license_types = nil
|
74
|
+
else
|
75
|
+
license_types = parsed_json["license_types"].to_json
|
76
|
+
license_types = Set.new(license_types)
|
77
|
+
end
|
78
|
+
if parsed_json["facility_type_codes"].nil?
|
79
|
+
facility_type_codes = nil
|
80
|
+
else
|
81
|
+
facility_type_codes = parsed_json["facility_type_codes"].to_json
|
82
|
+
facility_type_codes = Set.new(facility_type_codes)
|
83
|
+
end
|
84
|
+
if parsed_json["network_types"].nil?
|
85
|
+
network_types = nil
|
86
|
+
else
|
87
|
+
network_types = parsed_json["network_types"].to_json
|
88
|
+
network_types = Set.new(network_types)
|
89
|
+
end
|
90
|
+
cpt_code = struct.cpt_code
|
91
|
+
if parsed_json["modifiers"].nil?
|
92
|
+
modifiers = nil
|
93
|
+
else
|
94
|
+
modifiers = parsed_json["modifiers"].to_json
|
95
|
+
modifiers = Set.new(modifiers)
|
96
|
+
end
|
97
|
+
new(payer_uuid: payer_uuid, organization_billing_provider_id: organization_billing_provider_id,
|
98
|
+
states: states, zip_codes: zip_codes, license_types: license_types, facility_type_codes: facility_type_codes, network_types: network_types, cpt_code: cpt_code, modifiers: modifiers, additional_properties: struct)
|
99
|
+
end
|
100
|
+
|
101
|
+
# Serialize an instance of Dimensions to a JSON object
|
102
|
+
#
|
103
|
+
# @return [JSON]
|
104
|
+
def to_json(*_args)
|
105
|
+
{
|
106
|
+
"payer_uuid": @payer_uuid,
|
107
|
+
"organization_billing_provider_id": @organization_billing_provider_id,
|
108
|
+
"states": @states,
|
109
|
+
"zip_codes": @zip_codes,
|
110
|
+
"license_types": @license_types,
|
111
|
+
"facility_type_codes": @facility_type_codes,
|
112
|
+
"network_types": @network_types,
|
113
|
+
"cpt_code": @cpt_code,
|
114
|
+
"modifiers": @modifiers
|
115
|
+
}.to_json
|
116
|
+
end
|
117
|
+
|
118
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
119
|
+
#
|
120
|
+
# @param obj [Object]
|
121
|
+
# @return [Void]
|
122
|
+
def self.validate_raw(obj:)
|
123
|
+
obj.payer_uuid.is_a?(UUID) != false || raise("Passed value for field obj.payer_uuid is not the expected type, validation failed.")
|
124
|
+
obj.organization_billing_provider_id.is_a?(UUID) != false || raise("Passed value for field obj.organization_billing_provider_id is not the expected type, validation failed.")
|
125
|
+
obj.states.is_a?(Set) != false || raise("Passed value for field obj.states is not the expected type, validation failed.")
|
126
|
+
obj.zip_codes.is_a?(Set) != false || raise("Passed value for field obj.zip_codes is not the expected type, validation failed.")
|
127
|
+
obj.license_types.is_a?(Set) != false || raise("Passed value for field obj.license_types is not the expected type, validation failed.")
|
128
|
+
obj.facility_type_codes.is_a?(Set) != false || raise("Passed value for field obj.facility_type_codes is not the expected type, validation failed.")
|
129
|
+
obj.network_types.is_a?(Set) != false || raise("Passed value for field obj.network_types is not the expected type, validation failed.")
|
130
|
+
obj.cpt_code.is_a?(String) != false || raise("Passed value for field obj.cpt_code is not the expected type, validation failed.")
|
131
|
+
obj.modifiers.is_a?(Set) != false || raise("Passed value for field obj.modifiers is not the expected type, validation failed.")
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "optional_dimensions"
|
4
|
+
require_relative "../../../commons/types/page_token"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module FeeSchedules
|
9
|
+
module V3
|
10
|
+
class DimensionsPage
|
11
|
+
attr_reader :dimensions, :prev_page_token, :next_page_token, :additional_properties
|
12
|
+
|
13
|
+
# @param dimensions [Array<FeeSchedules::V3::OptionalDimensions>]
|
14
|
+
# @param prev_page_token [Commons::PAGE_TOKEN]
|
15
|
+
# @param next_page_token [Commons::PAGE_TOKEN]
|
16
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
# @return [FeeSchedules::V3::DimensionsPage]
|
18
|
+
def initialize(dimensions:, prev_page_token: nil, next_page_token: nil, additional_properties: nil)
|
19
|
+
# @type [Array<FeeSchedules::V3::OptionalDimensions>]
|
20
|
+
@dimensions = dimensions
|
21
|
+
# @type [Commons::PAGE_TOKEN]
|
22
|
+
@prev_page_token = prev_page_token
|
23
|
+
# @type [Commons::PAGE_TOKEN]
|
24
|
+
@next_page_token = next_page_token
|
25
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of DimensionsPage
|
30
|
+
#
|
31
|
+
# @param json_object [JSON]
|
32
|
+
# @return [FeeSchedules::V3::DimensionsPage]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
parsed_json = JSON.parse(json_object)
|
36
|
+
dimensions = parsed_json["dimensions"]&.map do |v|
|
37
|
+
v = v.to_json
|
38
|
+
FeeSchedules::V3::OptionalDimensions.from_json(json_object: v)
|
39
|
+
end
|
40
|
+
prev_page_token = struct.prev_page_token
|
41
|
+
next_page_token = struct.next_page_token
|
42
|
+
new(dimensions: dimensions, prev_page_token: prev_page_token, next_page_token: next_page_token,
|
43
|
+
additional_properties: struct)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Serialize an instance of DimensionsPage to a JSON object
|
47
|
+
#
|
48
|
+
# @return [JSON]
|
49
|
+
def to_json(*_args)
|
50
|
+
{
|
51
|
+
"dimensions": @dimensions,
|
52
|
+
"prev_page_token": @prev_page_token,
|
53
|
+
"next_page_token": @next_page_token
|
54
|
+
}.to_json
|
55
|
+
end
|
56
|
+
|
57
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
58
|
+
#
|
59
|
+
# @param obj [Object]
|
60
|
+
# @return [Void]
|
61
|
+
def self.validate_raw(obj:)
|
62
|
+
obj.dimensions.is_a?(Array) != false || raise("Passed value for field obj.dimensions is not the expected type, validation failed.")
|
63
|
+
obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.")
|
64
|
+
obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module CandidApiClient
|
6
|
+
module FeeSchedules
|
7
|
+
module V3
|
8
|
+
# Match information for a CPT code
|
9
|
+
class MatchCptCode
|
10
|
+
attr_reader :value, :match, :explanation, :additional_properties
|
11
|
+
|
12
|
+
# @param value [String]
|
13
|
+
# @param match [Boolean]
|
14
|
+
# @param explanation [String]
|
15
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
# @return [FeeSchedules::V3::MatchCptCode]
|
17
|
+
def initialize(value:, match:, explanation:, additional_properties: nil)
|
18
|
+
# @type [String]
|
19
|
+
@value = value
|
20
|
+
# @type [Boolean]
|
21
|
+
@match = match
|
22
|
+
# @type [String]
|
23
|
+
@explanation = explanation
|
24
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
@additional_properties = additional_properties
|
26
|
+
end
|
27
|
+
|
28
|
+
# Deserialize a JSON object to an instance of MatchCptCode
|
29
|
+
#
|
30
|
+
# @param json_object [JSON]
|
31
|
+
# @return [FeeSchedules::V3::MatchCptCode]
|
32
|
+
def self.from_json(json_object:)
|
33
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
34
|
+
JSON.parse(json_object)
|
35
|
+
value = struct.value
|
36
|
+
match = struct.match
|
37
|
+
explanation = struct.explanation
|
38
|
+
new(value: value, match: match, explanation: explanation, additional_properties: struct)
|
39
|
+
end
|
40
|
+
|
41
|
+
# Serialize an instance of MatchCptCode to a JSON object
|
42
|
+
#
|
43
|
+
# @return [JSON]
|
44
|
+
def to_json(*_args)
|
45
|
+
{ "value": @value, "match": @match, "explanation": @explanation }.to_json
|
46
|
+
end
|
47
|
+
|
48
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
49
|
+
#
|
50
|
+
# @param obj [Object]
|
51
|
+
# @return [Void]
|
52
|
+
def self.validate_raw(obj:)
|
53
|
+
obj.value.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
54
|
+
obj.match.is_a?(Boolean) != false || raise("Passed value for field obj.match is not the expected type, validation failed.")
|
55
|
+
obj.explanation.is_a?(String) != false || raise("Passed value for field obj.explanation is not the expected type, validation failed.")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "date"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module FeeSchedules
|
8
|
+
module V3
|
9
|
+
# Match information for date of service
|
10
|
+
class MatchDate
|
11
|
+
attr_reader :value, :match, :explanation, :additional_properties
|
12
|
+
|
13
|
+
# @param value [Date]
|
14
|
+
# @param match [Boolean]
|
15
|
+
# @param explanation [String]
|
16
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
# @return [FeeSchedules::V3::MatchDate]
|
18
|
+
def initialize(match:, explanation:, value: nil, additional_properties: nil)
|
19
|
+
# @type [Date]
|
20
|
+
@value = value
|
21
|
+
# @type [Boolean]
|
22
|
+
@match = match
|
23
|
+
# @type [String]
|
24
|
+
@explanation = explanation
|
25
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of MatchDate
|
30
|
+
#
|
31
|
+
# @param json_object [JSON]
|
32
|
+
# @return [FeeSchedules::V3::MatchDate]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
parsed_json = JSON.parse(json_object)
|
36
|
+
value = (Date.parse(parsed_json["value"]) unless parsed_json["value"].nil?)
|
37
|
+
match = struct.match
|
38
|
+
explanation = struct.explanation
|
39
|
+
new(value: value, match: match, explanation: explanation, additional_properties: struct)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Serialize an instance of MatchDate to a JSON object
|
43
|
+
#
|
44
|
+
# @return [JSON]
|
45
|
+
def to_json(*_args)
|
46
|
+
{ "value": @value, "match": @match, "explanation": @explanation }.to_json
|
47
|
+
end
|
48
|
+
|
49
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.value&.is_a?(Date) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
55
|
+
obj.match.is_a?(Boolean) != false || raise("Passed value for field obj.match is not the expected type, validation failed.")
|
56
|
+
obj.explanation.is_a?(String) != false || raise("Passed value for field obj.explanation is not the expected type, validation failed.")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/facility_type_code"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module FeeSchedules
|
8
|
+
module V3
|
9
|
+
# Match information for facility type code
|
10
|
+
class MatchFacilityTypeCode
|
11
|
+
attr_reader :value, :match, :explanation, :additional_properties
|
12
|
+
|
13
|
+
# @param value [Commons::FacilityTypeCode]
|
14
|
+
# @param match [Boolean]
|
15
|
+
# @param explanation [String]
|
16
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
# @return [FeeSchedules::V3::MatchFacilityTypeCode]
|
18
|
+
def initialize(match:, explanation:, value: nil, additional_properties: nil)
|
19
|
+
# @type [Commons::FacilityTypeCode]
|
20
|
+
@value = value
|
21
|
+
# @type [Boolean]
|
22
|
+
@match = match
|
23
|
+
# @type [String]
|
24
|
+
@explanation = explanation
|
25
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of MatchFacilityTypeCode
|
30
|
+
#
|
31
|
+
# @param json_object [JSON]
|
32
|
+
# @return [FeeSchedules::V3::MatchFacilityTypeCode]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
JSON.parse(json_object)
|
36
|
+
value = struct.value
|
37
|
+
match = struct.match
|
38
|
+
explanation = struct.explanation
|
39
|
+
new(value: value, match: match, explanation: explanation, additional_properties: struct)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Serialize an instance of MatchFacilityTypeCode to a JSON object
|
43
|
+
#
|
44
|
+
# @return [JSON]
|
45
|
+
def to_json(*_args)
|
46
|
+
{ "value": @value, "match": @match, "explanation": @explanation }.to_json
|
47
|
+
end
|
48
|
+
|
49
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.value&.is_a?(Commons::FacilityTypeCode) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
55
|
+
obj.match.is_a?(Boolean) != false || raise("Passed value for field obj.match is not the expected type, validation failed.")
|
56
|
+
obj.explanation.is_a?(String) != false || raise("Passed value for field obj.explanation is not the expected type, validation failed.")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/state"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module FeeSchedules
|
8
|
+
module V3
|
9
|
+
# Match information for state or zip code
|
10
|
+
class MatchGeo
|
11
|
+
attr_reader :zip_code, :state, :match, :explanation, :additional_properties
|
12
|
+
|
13
|
+
# @param zip_code [String]
|
14
|
+
# @param state [Commons::State]
|
15
|
+
# @param match [Boolean]
|
16
|
+
# @param explanation [String]
|
17
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
18
|
+
# @return [FeeSchedules::V3::MatchGeo]
|
19
|
+
def initialize(match:, explanation:, zip_code: nil, state: nil, additional_properties: nil)
|
20
|
+
# @type [String]
|
21
|
+
@zip_code = zip_code
|
22
|
+
# @type [Commons::State]
|
23
|
+
@state = state
|
24
|
+
# @type [Boolean]
|
25
|
+
@match = match
|
26
|
+
# @type [String]
|
27
|
+
@explanation = explanation
|
28
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
end
|
31
|
+
|
32
|
+
# Deserialize a JSON object to an instance of MatchGeo
|
33
|
+
#
|
34
|
+
# @param json_object [JSON]
|
35
|
+
# @return [FeeSchedules::V3::MatchGeo]
|
36
|
+
def self.from_json(json_object:)
|
37
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
38
|
+
JSON.parse(json_object)
|
39
|
+
zip_code = struct.zip_code
|
40
|
+
state = struct.state
|
41
|
+
match = struct.match
|
42
|
+
explanation = struct.explanation
|
43
|
+
new(zip_code: zip_code, state: state, match: match, explanation: explanation, additional_properties: struct)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Serialize an instance of MatchGeo to a JSON object
|
47
|
+
#
|
48
|
+
# @return [JSON]
|
49
|
+
def to_json(*_args)
|
50
|
+
{ "zip_code": @zip_code, "state": @state, "match": @match, "explanation": @explanation }.to_json
|
51
|
+
end
|
52
|
+
|
53
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
54
|
+
#
|
55
|
+
# @param obj [Object]
|
56
|
+
# @return [Void]
|
57
|
+
def self.validate_raw(obj:)
|
58
|
+
obj.zip_code&.is_a?(String) != false || raise("Passed value for field obj.zip_code is not the expected type, validation failed.")
|
59
|
+
obj.state&.is_a?(Commons::State) != false || raise("Passed value for field obj.state is not the expected type, validation failed.")
|
60
|
+
obj.match.is_a?(Boolean) != false || raise("Passed value for field obj.match is not the expected type, validation failed.")
|
61
|
+
obj.explanation.is_a?(String) != false || raise("Passed value for field obj.explanation is not the expected type, validation failed.")
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../organization_providers/v_2/types/license_type"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module FeeSchedules
|
8
|
+
module V3
|
9
|
+
# Match information for rendering provider license type
|
10
|
+
class MatchLicenseType
|
11
|
+
attr_reader :value, :match, :explanation, :additional_properties
|
12
|
+
|
13
|
+
# @param value [OrganizationProviders::V2::LicenseType]
|
14
|
+
# @param match [Boolean]
|
15
|
+
# @param explanation [String]
|
16
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
# @return [FeeSchedules::V3::MatchLicenseType]
|
18
|
+
def initialize(match:, explanation:, value: nil, additional_properties: nil)
|
19
|
+
# @type [OrganizationProviders::V2::LicenseType]
|
20
|
+
@value = value
|
21
|
+
# @type [Boolean]
|
22
|
+
@match = match
|
23
|
+
# @type [String]
|
24
|
+
@explanation = explanation
|
25
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of MatchLicenseType
|
30
|
+
#
|
31
|
+
# @param json_object [JSON]
|
32
|
+
# @return [FeeSchedules::V3::MatchLicenseType]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
JSON.parse(json_object)
|
36
|
+
value = struct.value
|
37
|
+
match = struct.match
|
38
|
+
explanation = struct.explanation
|
39
|
+
new(value: value, match: match, explanation: explanation, additional_properties: struct)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Serialize an instance of MatchLicenseType to a JSON object
|
43
|
+
#
|
44
|
+
# @return [JSON]
|
45
|
+
def to_json(*_args)
|
46
|
+
{ "value": @value, "match": @match, "explanation": @explanation }.to_json
|
47
|
+
end
|
48
|
+
|
49
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.value&.is_a?(OrganizationProviders::V2::LicenseType) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
55
|
+
obj.match.is_a?(Boolean) != false || raise("Passed value for field obj.match is not the expected type, validation failed.")
|
56
|
+
obj.explanation.is_a?(String) != false || raise("Passed value for field obj.explanation is not the expected type, validation failed.")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "set"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module FeeSchedules
|
8
|
+
module V3
|
9
|
+
# Match information for procedure modifiers
|
10
|
+
class MatchModifiers
|
11
|
+
attr_reader :value, :match, :explanation, :additional_properties
|
12
|
+
|
13
|
+
# @param value [Set<Commons::ProcedureModifier>]
|
14
|
+
# @param match [Boolean]
|
15
|
+
# @param explanation [String]
|
16
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
# @return [FeeSchedules::V3::MatchModifiers]
|
18
|
+
def initialize(value:, match:, explanation:, additional_properties: nil)
|
19
|
+
# @type [Set<Commons::ProcedureModifier>]
|
20
|
+
@value = value
|
21
|
+
# @type [Boolean]
|
22
|
+
@match = match
|
23
|
+
# @type [String]
|
24
|
+
@explanation = explanation
|
25
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of MatchModifiers
|
30
|
+
#
|
31
|
+
# @param json_object [JSON]
|
32
|
+
# @return [FeeSchedules::V3::MatchModifiers]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
parsed_json = JSON.parse(json_object)
|
36
|
+
if parsed_json["value"].nil?
|
37
|
+
value = nil
|
38
|
+
else
|
39
|
+
value = parsed_json["value"].to_json
|
40
|
+
value = Set.new(value)
|
41
|
+
end
|
42
|
+
match = struct.match
|
43
|
+
explanation = struct.explanation
|
44
|
+
new(value: value, match: match, explanation: explanation, additional_properties: struct)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Serialize an instance of MatchModifiers to a JSON object
|
48
|
+
#
|
49
|
+
# @return [JSON]
|
50
|
+
def to_json(*_args)
|
51
|
+
{ "value": @value, "match": @match, "explanation": @explanation }.to_json
|
52
|
+
end
|
53
|
+
|
54
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
55
|
+
#
|
56
|
+
# @param obj [Object]
|
57
|
+
# @return [Void]
|
58
|
+
def self.validate_raw(obj:)
|
59
|
+
obj.value.is_a?(Set) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
60
|
+
obj.match.is_a?(Boolean) != false || raise("Passed value for field obj.match is not the expected type, validation failed.")
|
61
|
+
obj.explanation.is_a?(String) != false || raise("Passed value for field obj.explanation is not the expected type, validation failed.")
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "set"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module FeeSchedules
|
8
|
+
module V3
|
9
|
+
# Match information for network types
|
10
|
+
class MatchNetworkTypes
|
11
|
+
attr_reader :value, :match, :explanation, :additional_properties
|
12
|
+
|
13
|
+
# @param value [Set<Commons::NetworkType>]
|
14
|
+
# @param match [Boolean]
|
15
|
+
# @param explanation [String]
|
16
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
# @return [FeeSchedules::V3::MatchNetworkTypes]
|
18
|
+
def initialize(value:, match:, explanation:, additional_properties: nil)
|
19
|
+
# @type [Set<Commons::NetworkType>]
|
20
|
+
@value = value
|
21
|
+
# @type [Boolean]
|
22
|
+
@match = match
|
23
|
+
# @type [String]
|
24
|
+
@explanation = explanation
|
25
|
+
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of MatchNetworkTypes
|
30
|
+
#
|
31
|
+
# @param json_object [JSON]
|
32
|
+
# @return [FeeSchedules::V3::MatchNetworkTypes]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
parsed_json = JSON.parse(json_object)
|
36
|
+
if parsed_json["value"].nil?
|
37
|
+
value = nil
|
38
|
+
else
|
39
|
+
value = parsed_json["value"].to_json
|
40
|
+
value = Set.new(value)
|
41
|
+
end
|
42
|
+
match = struct.match
|
43
|
+
explanation = struct.explanation
|
44
|
+
new(value: value, match: match, explanation: explanation, additional_properties: struct)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Serialize an instance of MatchNetworkTypes to a JSON object
|
48
|
+
#
|
49
|
+
# @return [JSON]
|
50
|
+
def to_json(*_args)
|
51
|
+
{ "value": @value, "match": @match, "explanation": @explanation }.to_json
|
52
|
+
end
|
53
|
+
|
54
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
|
55
|
+
#
|
56
|
+
# @param obj [Object]
|
57
|
+
# @return [Void]
|
58
|
+
def self.validate_raw(obj:)
|
59
|
+
obj.value.is_a?(Set) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
60
|
+
obj.match.is_a?(Boolean) != false || raise("Passed value for field obj.match is not the expected type, validation failed.")
|
61
|
+
obj.explanation.is_a?(String) != false || raise("Passed value for field obj.explanation is not the expected type, validation failed.")
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|