candidhealth 0.24.1 → 0.24.3
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/commons/types/primitive.rb +17 -0
- data/lib/candidhealth/custom_schemas/client.rb +30 -0
- data/lib/candidhealth/custom_schemas/v_1/client.rb +291 -0
- data/lib/candidhealth/custom_schemas/v_1/types/key_with_name_already_exists_error.rb +71 -0
- data/lib/candidhealth/custom_schemas/v_1/types/schema.rb +91 -0
- data/lib/candidhealth/custom_schemas/v_1/types/schema_field.rb +71 -0
- data/lib/candidhealth/custom_schemas/v_1/types/schema_get_multi_response.rb +65 -0
- data/lib/candidhealth/custom_schemas/v_1/types/schema_instance.rb +76 -0
- data/lib/candidhealth/custom_schemas/v_1/types/schema_validation_error.rb +100 -0
- data/lib/candidhealth/custom_schemas/v_1/types/schema_validation_failure.rb +65 -0
- data/lib/candidhealth/custom_schemas/v_1/types/schema_with_name_already_exists_error.rb +70 -0
- data/lib/candidhealth/encounters/v_4/client.rb +49 -12
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +17 -1
- data/lib/candidhealth/encounters/v_4/types/key_does_not_exist_error.rb +70 -0
- data/lib/candidhealth/encounters/v_4/types/multiple_instances_for_schema_error.rb +60 -0
- data/lib/candidhealth/encounters/v_4/types/schema_does_not_exist_error.rb +60 -0
- data/lib/candidhealth/encounters/v_4/types/schema_instance_validation_error.rb +139 -0
- data/lib/candidhealth/encounters/v_4/types/schema_instance_validation_failure.rb +65 -0
- data/lib/candidhealth/encounters/v_4/types/schema_unauthorized_access_error.rb +60 -0
- data/lib/candidhealth/encounters/v_4/types/value_does_not_match_key_type_error.rb +90 -0
- data/lib/candidhealth.rb +7 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +16 -0
- metadata +20 -2
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module Encounters
|
8
|
+
module V4
|
9
|
+
module Types
|
10
|
+
class MultipleInstancesForSchemaError
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :schema_id
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param schema_id [String]
|
22
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
# @return [CandidApiClient::Encounters::V4::Types::MultipleInstancesForSchemaError]
|
24
|
+
def initialize(schema_id:, additional_properties: nil)
|
25
|
+
@schema_id = schema_id
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
@_field_set = { "schema_id": schema_id }
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of MultipleInstancesForSchemaError
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [CandidApiClient::Encounters::V4::Types::MultipleInstancesForSchemaError]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
schema_id = struct["schema_id"]
|
37
|
+
new(schema_id: schema_id, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of MultipleInstancesForSchemaError to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.schema_id.is_a?(String) != false || raise("Passed value for field obj.schema_id is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module Encounters
|
8
|
+
module V4
|
9
|
+
module Types
|
10
|
+
class SchemaDoesNotExistError
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :schema_id
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param schema_id [String]
|
22
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaDoesNotExistError]
|
24
|
+
def initialize(schema_id:, additional_properties: nil)
|
25
|
+
@schema_id = schema_id
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
@_field_set = { "schema_id": schema_id }
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of SchemaDoesNotExistError
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaDoesNotExistError]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
schema_id = struct["schema_id"]
|
37
|
+
new(schema_id: schema_id, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of SchemaDoesNotExistError to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.schema_id.is_a?(String) != false || raise("Passed value for field obj.schema_id is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,139 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
require_relative "multiple_instances_for_schema_error"
|
5
|
+
require_relative "value_does_not_match_key_type_error"
|
6
|
+
require_relative "key_does_not_exist_error"
|
7
|
+
require_relative "schema_does_not_exist_error"
|
8
|
+
require_relative "schema_unauthorized_access_error"
|
9
|
+
|
10
|
+
module CandidApiClient
|
11
|
+
module Encounters
|
12
|
+
module V4
|
13
|
+
module Types
|
14
|
+
class SchemaInstanceValidationError
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :member
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :discriminant
|
19
|
+
|
20
|
+
private_class_method :new
|
21
|
+
alias kind_of? is_a?
|
22
|
+
|
23
|
+
# @param member [Object]
|
24
|
+
# @param discriminant [String]
|
25
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationError]
|
26
|
+
def initialize(member:, discriminant:)
|
27
|
+
@member = member
|
28
|
+
@discriminant = discriminant
|
29
|
+
end
|
30
|
+
|
31
|
+
# Deserialize a JSON object to an instance of SchemaInstanceValidationError
|
32
|
+
#
|
33
|
+
# @param json_object [String]
|
34
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationError]
|
35
|
+
def self.from_json(json_object:)
|
36
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
37
|
+
member = case struct.type
|
38
|
+
when "multiple_instances_for_schema"
|
39
|
+
CandidApiClient::Encounters::V4::Types::MultipleInstancesForSchemaError.from_json(json_object: json_object)
|
40
|
+
when "value_does_not_match_key_type"
|
41
|
+
CandidApiClient::Encounters::V4::Types::ValueDoesNotMatchKeyTypeError.from_json(json_object: json_object)
|
42
|
+
when "key_does_not_exist"
|
43
|
+
CandidApiClient::Encounters::V4::Types::KeyDoesNotExistError.from_json(json_object: json_object)
|
44
|
+
when "schema_does_not_exist"
|
45
|
+
CandidApiClient::Encounters::V4::Types::SchemaDoesNotExistError.from_json(json_object: json_object)
|
46
|
+
when "schema_unauthorized_access"
|
47
|
+
CandidApiClient::Encounters::V4::Types::SchemaUnauthorizedAccessError.from_json(json_object: json_object)
|
48
|
+
else
|
49
|
+
CandidApiClient::Encounters::V4::Types::MultipleInstancesForSchemaError.from_json(json_object: json_object)
|
50
|
+
end
|
51
|
+
new(member: member, discriminant: struct.type)
|
52
|
+
end
|
53
|
+
|
54
|
+
# For Union Types, to_json functionality is delegated to the wrapped member.
|
55
|
+
#
|
56
|
+
# @return [String]
|
57
|
+
def to_json(*_args)
|
58
|
+
case @discriminant
|
59
|
+
when "multiple_instances_for_schema"
|
60
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
61
|
+
when "value_does_not_match_key_type"
|
62
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
63
|
+
when "key_does_not_exist"
|
64
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
65
|
+
when "schema_does_not_exist"
|
66
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
67
|
+
when "schema_unauthorized_access"
|
68
|
+
{ **@member.to_json, type: @discriminant }.to_json
|
69
|
+
else
|
70
|
+
{ "type": @discriminant, value: @member }.to_json
|
71
|
+
end
|
72
|
+
@member.to_json
|
73
|
+
end
|
74
|
+
|
75
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
76
|
+
# hash and check each fields type against the current object's property
|
77
|
+
# definitions.
|
78
|
+
#
|
79
|
+
# @param obj [Object]
|
80
|
+
# @return [Void]
|
81
|
+
def self.validate_raw(obj:)
|
82
|
+
case obj.type
|
83
|
+
when "multiple_instances_for_schema"
|
84
|
+
CandidApiClient::Encounters::V4::Types::MultipleInstancesForSchemaError.validate_raw(obj: obj)
|
85
|
+
when "value_does_not_match_key_type"
|
86
|
+
CandidApiClient::Encounters::V4::Types::ValueDoesNotMatchKeyTypeError.validate_raw(obj: obj)
|
87
|
+
when "key_does_not_exist"
|
88
|
+
CandidApiClient::Encounters::V4::Types::KeyDoesNotExistError.validate_raw(obj: obj)
|
89
|
+
when "schema_does_not_exist"
|
90
|
+
CandidApiClient::Encounters::V4::Types::SchemaDoesNotExistError.validate_raw(obj: obj)
|
91
|
+
when "schema_unauthorized_access"
|
92
|
+
CandidApiClient::Encounters::V4::Types::SchemaUnauthorizedAccessError.validate_raw(obj: obj)
|
93
|
+
else
|
94
|
+
raise("Passed value matched no type within the union, validation failed.")
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# For Union Types, is_a? functionality is delegated to the wrapped member.
|
99
|
+
#
|
100
|
+
# @param obj [Object]
|
101
|
+
# @return [Boolean]
|
102
|
+
def is_a?(obj)
|
103
|
+
@member.is_a?(obj)
|
104
|
+
end
|
105
|
+
|
106
|
+
# @param member [CandidApiClient::Encounters::V4::Types::MultipleInstancesForSchemaError]
|
107
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationError]
|
108
|
+
def self.multiple_instances_for_schema(member:)
|
109
|
+
new(member: member, discriminant: "multiple_instances_for_schema")
|
110
|
+
end
|
111
|
+
|
112
|
+
# @param member [CandidApiClient::Encounters::V4::Types::ValueDoesNotMatchKeyTypeError]
|
113
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationError]
|
114
|
+
def self.value_does_not_match_key_type(member:)
|
115
|
+
new(member: member, discriminant: "value_does_not_match_key_type")
|
116
|
+
end
|
117
|
+
|
118
|
+
# @param member [CandidApiClient::Encounters::V4::Types::KeyDoesNotExistError]
|
119
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationError]
|
120
|
+
def self.key_does_not_exist(member:)
|
121
|
+
new(member: member, discriminant: "key_does_not_exist")
|
122
|
+
end
|
123
|
+
|
124
|
+
# @param member [CandidApiClient::Encounters::V4::Types::SchemaDoesNotExistError]
|
125
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationError]
|
126
|
+
def self.schema_does_not_exist(member:)
|
127
|
+
new(member: member, discriminant: "schema_does_not_exist")
|
128
|
+
end
|
129
|
+
|
130
|
+
# @param member [CandidApiClient::Encounters::V4::Types::SchemaUnauthorizedAccessError]
|
131
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationError]
|
132
|
+
def self.schema_unauthorized_access(member:)
|
133
|
+
new(member: member, discriminant: "schema_unauthorized_access")
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "schema_instance_validation_error"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module Encounters
|
9
|
+
module V4
|
10
|
+
module Types
|
11
|
+
class SchemaInstanceValidationFailure
|
12
|
+
# @return [Array<CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationError>]
|
13
|
+
attr_reader :errors
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
|
+
attr_reader :additional_properties
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :_field_set
|
18
|
+
protected :_field_set
|
19
|
+
|
20
|
+
OMIT = Object.new
|
21
|
+
|
22
|
+
# @param errors [Array<CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationError>]
|
23
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationFailure]
|
25
|
+
def initialize(errors:, additional_properties: nil)
|
26
|
+
@errors = errors
|
27
|
+
@additional_properties = additional_properties
|
28
|
+
@_field_set = { "errors": errors }
|
29
|
+
end
|
30
|
+
|
31
|
+
# Deserialize a JSON object to an instance of SchemaInstanceValidationFailure
|
32
|
+
#
|
33
|
+
# @param json_object [String]
|
34
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationFailure]
|
35
|
+
def self.from_json(json_object:)
|
36
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
37
|
+
parsed_json = JSON.parse(json_object)
|
38
|
+
errors = parsed_json["errors"]&.map do |item|
|
39
|
+
item = item.to_json
|
40
|
+
CandidApiClient::Encounters::V4::Types::SchemaInstanceValidationError.from_json(json_object: item)
|
41
|
+
end
|
42
|
+
new(errors: errors, additional_properties: struct)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Serialize an instance of SchemaInstanceValidationFailure to a JSON object
|
46
|
+
#
|
47
|
+
# @return [String]
|
48
|
+
def to_json(*_args)
|
49
|
+
@_field_set&.to_json
|
50
|
+
end
|
51
|
+
|
52
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
53
|
+
# hash and check each fields type against the current object's property
|
54
|
+
# definitions.
|
55
|
+
#
|
56
|
+
# @param obj [Object]
|
57
|
+
# @return [Void]
|
58
|
+
def self.validate_raw(obj:)
|
59
|
+
obj.errors.is_a?(Array) != false || raise("Passed value for field obj.errors is not the expected type, validation failed.")
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module Encounters
|
8
|
+
module V4
|
9
|
+
module Types
|
10
|
+
class SchemaUnauthorizedAccessError
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :schema_id
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param schema_id [String]
|
22
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaUnauthorizedAccessError]
|
24
|
+
def initialize(schema_id:, additional_properties: nil)
|
25
|
+
@schema_id = schema_id
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
@_field_set = { "schema_id": schema_id }
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of SchemaUnauthorizedAccessError
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [CandidApiClient::Encounters::V4::Types::SchemaUnauthorizedAccessError]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
schema_id = struct["schema_id"]
|
37
|
+
new(schema_id: schema_id, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of SchemaUnauthorizedAccessError to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.schema_id.is_a?(String) != false || raise("Passed value for field obj.schema_id is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/primitive"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module Encounters
|
9
|
+
module V4
|
10
|
+
module Types
|
11
|
+
class ValueDoesNotMatchKeyTypeError
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :schema_id
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :key
|
16
|
+
# @return [CandidApiClient::Commons::Types::Primitive]
|
17
|
+
attr_reader :expected_value_type
|
18
|
+
# @return [Object]
|
19
|
+
attr_reader :value
|
20
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
21
|
+
attr_reader :additional_properties
|
22
|
+
# @return [Object]
|
23
|
+
attr_reader :_field_set
|
24
|
+
protected :_field_set
|
25
|
+
|
26
|
+
OMIT = Object.new
|
27
|
+
|
28
|
+
# @param schema_id [String]
|
29
|
+
# @param key [String]
|
30
|
+
# @param expected_value_type [CandidApiClient::Commons::Types::Primitive]
|
31
|
+
# @param value [Object]
|
32
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
33
|
+
# @return [CandidApiClient::Encounters::V4::Types::ValueDoesNotMatchKeyTypeError]
|
34
|
+
def initialize(schema_id:, key:, expected_value_type:, value:, additional_properties: nil)
|
35
|
+
@schema_id = schema_id
|
36
|
+
@key = key
|
37
|
+
@expected_value_type = expected_value_type
|
38
|
+
@value = value
|
39
|
+
@additional_properties = additional_properties
|
40
|
+
@_field_set = {
|
41
|
+
"schema_id": schema_id,
|
42
|
+
"key": key,
|
43
|
+
"expected_value_type": expected_value_type,
|
44
|
+
"value": value
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Deserialize a JSON object to an instance of ValueDoesNotMatchKeyTypeError
|
49
|
+
#
|
50
|
+
# @param json_object [String]
|
51
|
+
# @return [CandidApiClient::Encounters::V4::Types::ValueDoesNotMatchKeyTypeError]
|
52
|
+
def self.from_json(json_object:)
|
53
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
54
|
+
schema_id = struct["schema_id"]
|
55
|
+
key = struct["key"]
|
56
|
+
expected_value_type = struct["expected_value_type"]
|
57
|
+
value = struct["value"]
|
58
|
+
new(
|
59
|
+
schema_id: schema_id,
|
60
|
+
key: key,
|
61
|
+
expected_value_type: expected_value_type,
|
62
|
+
value: value,
|
63
|
+
additional_properties: struct
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Serialize an instance of ValueDoesNotMatchKeyTypeError to a JSON object
|
68
|
+
#
|
69
|
+
# @return [String]
|
70
|
+
def to_json(*_args)
|
71
|
+
@_field_set&.to_json
|
72
|
+
end
|
73
|
+
|
74
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
75
|
+
# hash and check each fields type against the current object's property
|
76
|
+
# definitions.
|
77
|
+
#
|
78
|
+
# @param obj [Object]
|
79
|
+
# @return [Void]
|
80
|
+
def self.validate_raw(obj:)
|
81
|
+
obj.schema_id.is_a?(String) != false || raise("Passed value for field obj.schema_id is not the expected type, validation failed.")
|
82
|
+
obj.key.is_a?(String) != false || raise("Passed value for field obj.key is not the expected type, validation failed.")
|
83
|
+
obj.expected_value_type.is_a?(CandidApiClient::Commons::Types::Primitive) != false || raise("Passed value for field obj.expected_value_type is not the expected type, validation failed.")
|
84
|
+
obj.value.is_a?(Object) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
data/lib/candidhealth.rb
CHANGED
@@ -7,6 +7,7 @@ require_relative "requests"
|
|
7
7
|
require_relative "candidhealth/auth/client"
|
8
8
|
require_relative "candidhealth/billing_notes/client"
|
9
9
|
require_relative "candidhealth/contracts/client"
|
10
|
+
require_relative "candidhealth/custom_schemas/client"
|
10
11
|
require_relative "candidhealth/eligibility/client"
|
11
12
|
require_relative "candidhealth/encounters/client"
|
12
13
|
require_relative "candidhealth/expected_network_status/client"
|
@@ -36,6 +37,8 @@ module CandidApiClient
|
|
36
37
|
attr_reader :billing_notes
|
37
38
|
# @return [CandidApiClient::Contracts::Client]
|
38
39
|
attr_reader :contracts
|
40
|
+
# @return [CandidApiClient::CustomSchemas::Client]
|
41
|
+
attr_reader :custom_schemas
|
39
42
|
# @return [CandidApiClient::Eligibility::Client]
|
40
43
|
attr_reader :eligibility
|
41
44
|
# @return [CandidApiClient::Encounters::Client]
|
@@ -106,6 +109,7 @@ module CandidApiClient
|
|
106
109
|
@auth = CandidApiClient::Auth::Client.new(request_client: @request_client)
|
107
110
|
@billing_notes = CandidApiClient::BillingNotes::Client.new(request_client: @request_client)
|
108
111
|
@contracts = CandidApiClient::Contracts::Client.new(request_client: @request_client)
|
112
|
+
@custom_schemas = CandidApiClient::CustomSchemas::Client.new(request_client: @request_client)
|
109
113
|
@eligibility = CandidApiClient::Eligibility::Client.new(request_client: @request_client)
|
110
114
|
@encounters = CandidApiClient::Encounters::Client.new(request_client: @request_client)
|
111
115
|
@expected_network_status = CandidApiClient::ExpectedNetworkStatus::Client.new(request_client: @request_client)
|
@@ -136,6 +140,8 @@ module CandidApiClient
|
|
136
140
|
attr_reader :billing_notes
|
137
141
|
# @return [CandidApiClient::Contracts::AsyncClient]
|
138
142
|
attr_reader :contracts
|
143
|
+
# @return [CandidApiClient::CustomSchemas::AsyncClient]
|
144
|
+
attr_reader :custom_schemas
|
139
145
|
# @return [CandidApiClient::Eligibility::AsyncClient]
|
140
146
|
attr_reader :eligibility
|
141
147
|
# @return [CandidApiClient::Encounters::AsyncClient]
|
@@ -206,6 +212,7 @@ module CandidApiClient
|
|
206
212
|
@auth = CandidApiClient::Auth::AsyncClient.new(request_client: @async_request_client)
|
207
213
|
@billing_notes = CandidApiClient::BillingNotes::AsyncClient.new(request_client: @async_request_client)
|
208
214
|
@contracts = CandidApiClient::Contracts::AsyncClient.new(request_client: @async_request_client)
|
215
|
+
@custom_schemas = CandidApiClient::CustomSchemas::AsyncClient.new(request_client: @async_request_client)
|
209
216
|
@eligibility = CandidApiClient::Eligibility::AsyncClient.new(request_client: @async_request_client)
|
210
217
|
@encounters = CandidApiClient::Encounters::AsyncClient.new(request_client: @async_request_client)
|
211
218
|
@expected_network_status = CandidApiClient::ExpectedNetworkStatus::AsyncClient.new(request_client: @async_request_client)
|
data/lib/requests.rb
CHANGED
@@ -43,7 +43,7 @@ module CandidApiClient
|
|
43
43
|
|
44
44
|
# @return [Hash{String => String}]
|
45
45
|
def get_headers
|
46
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.24.
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.24.3" }
|
47
47
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
48
48
|
headers
|
49
49
|
end
|
@@ -87,7 +87,7 @@ module CandidApiClient
|
|
87
87
|
|
88
88
|
# @return [Hash{String => String}]
|
89
89
|
def get_headers
|
90
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.24.
|
90
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.24.3" }
|
91
91
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
92
92
|
headers
|
93
93
|
end
|
data/lib/types_export.rb
CHANGED
@@ -18,6 +18,14 @@ require_relative "candidhealth/contracts/v_2/types/contract_with_providers"
|
|
18
18
|
require_relative "candidhealth/contracts/v_2/types/contracts_page"
|
19
19
|
require_relative "candidhealth/contracts/v_2/types/contract_status"
|
20
20
|
require_relative "candidhealth/contracts/v_2/types/authorized_signatory"
|
21
|
+
require_relative "candidhealth/custom_schemas/v_1/types/schema"
|
22
|
+
require_relative "candidhealth/custom_schemas/v_1/types/schema_instance"
|
23
|
+
require_relative "candidhealth/custom_schemas/v_1/types/schema_field"
|
24
|
+
require_relative "candidhealth/custom_schemas/v_1/types/schema_get_multi_response"
|
25
|
+
require_relative "candidhealth/custom_schemas/v_1/types/schema_with_name_already_exists_error"
|
26
|
+
require_relative "candidhealth/custom_schemas/v_1/types/key_with_name_already_exists_error"
|
27
|
+
require_relative "candidhealth/custom_schemas/v_1/types/schema_validation_failure"
|
28
|
+
require_relative "candidhealth/custom_schemas/v_1/types/schema_validation_error"
|
21
29
|
require_relative "candidhealth/encounter_providers/v_2/types/encounter_provider_base"
|
22
30
|
require_relative "candidhealth/encounter_providers/v_2/types/rendering_provider"
|
23
31
|
require_relative "candidhealth/encounter_providers/v_2/types/referring_provider"
|
@@ -56,6 +64,13 @@ require_relative "candidhealth/encounters/v_4/types/encounter_patient_control_nu
|
|
56
64
|
require_relative "candidhealth/encounters/v_4/types/encounter_guarantor_missing_contact_info_error_type"
|
57
65
|
require_relative "candidhealth/encounters/v_4/types/cash_pay_payer_error_message"
|
58
66
|
require_relative "candidhealth/encounters/v_4/types/service_authorization_exception_code"
|
67
|
+
require_relative "candidhealth/encounters/v_4/types/schema_instance_validation_failure"
|
68
|
+
require_relative "candidhealth/encounters/v_4/types/key_does_not_exist_error"
|
69
|
+
require_relative "candidhealth/encounters/v_4/types/schema_does_not_exist_error"
|
70
|
+
require_relative "candidhealth/encounters/v_4/types/schema_unauthorized_access_error"
|
71
|
+
require_relative "candidhealth/encounters/v_4/types/value_does_not_match_key_type_error"
|
72
|
+
require_relative "candidhealth/encounters/v_4/types/multiple_instances_for_schema_error"
|
73
|
+
require_relative "candidhealth/encounters/v_4/types/schema_instance_validation_error"
|
59
74
|
require_relative "candidhealth/expected_network_status/v_1/types/expected_network_status"
|
60
75
|
require_relative "candidhealth/expected_network_status/v_1/types/expected_network_status_response"
|
61
76
|
require_relative "candidhealth/expected_network_status/v_2/types/line_of_business"
|
@@ -221,6 +236,7 @@ require_relative "candidhealth/x_12/v_1/types/carc"
|
|
221
236
|
require_relative "candidhealth/x_12/v_1/types/rarc"
|
222
237
|
require_relative "candidhealth/claims/types/claim"
|
223
238
|
require_relative "candidhealth/claims/types/claim_status"
|
239
|
+
require_relative "candidhealth/commons/types/primitive"
|
224
240
|
require_relative "candidhealth/commons/types/sort_direction"
|
225
241
|
require_relative "candidhealth/commons/types/qualifier_code"
|
226
242
|
require_relative "candidhealth/commons/types/date_range_optional_end"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: candidhealth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.24.
|
4
|
+
version: 0.24.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- lib/candidhealth/commons/types/patient_relationship_to_insured_code_all.rb
|
127
127
|
- lib/candidhealth/commons/types/phone_number.rb
|
128
128
|
- lib/candidhealth/commons/types/phone_number_type.rb
|
129
|
+
- lib/candidhealth/commons/types/primitive.rb
|
129
130
|
- lib/candidhealth/commons/types/procedure_modifier.rb
|
130
131
|
- lib/candidhealth/commons/types/qualifier_code.rb
|
131
132
|
- lib/candidhealth/commons/types/region_national.rb
|
@@ -157,6 +158,16 @@ files:
|
|
157
158
|
- lib/candidhealth/contracts/v_2/types/date_update.rb
|
158
159
|
- lib/candidhealth/contracts/v_2/types/insurance_types.rb
|
159
160
|
- lib/candidhealth/contracts/v_2/types/regions_update.rb
|
161
|
+
- lib/candidhealth/custom_schemas/client.rb
|
162
|
+
- lib/candidhealth/custom_schemas/v_1/client.rb
|
163
|
+
- lib/candidhealth/custom_schemas/v_1/types/key_with_name_already_exists_error.rb
|
164
|
+
- lib/candidhealth/custom_schemas/v_1/types/schema.rb
|
165
|
+
- lib/candidhealth/custom_schemas/v_1/types/schema_field.rb
|
166
|
+
- lib/candidhealth/custom_schemas/v_1/types/schema_get_multi_response.rb
|
167
|
+
- lib/candidhealth/custom_schemas/v_1/types/schema_instance.rb
|
168
|
+
- lib/candidhealth/custom_schemas/v_1/types/schema_validation_error.rb
|
169
|
+
- lib/candidhealth/custom_schemas/v_1/types/schema_validation_failure.rb
|
170
|
+
- lib/candidhealth/custom_schemas/v_1/types/schema_with_name_already_exists_error.rb
|
160
171
|
- lib/candidhealth/diagnoses/types/diagnosis.rb
|
161
172
|
- lib/candidhealth/diagnoses/types/diagnosis_create.rb
|
162
173
|
- lib/candidhealth/diagnoses/types/diagnosis_type_code.rb
|
@@ -193,15 +204,22 @@ files:
|
|
193
204
|
- lib/candidhealth/encounters/v_4/types/intake_response_and_follow_ups.rb
|
194
205
|
- lib/candidhealth/encounters/v_4/types/intervention.rb
|
195
206
|
- lib/candidhealth/encounters/v_4/types/intervention_category.rb
|
207
|
+
- lib/candidhealth/encounters/v_4/types/key_does_not_exist_error.rb
|
196
208
|
- lib/candidhealth/encounters/v_4/types/lab.rb
|
197
209
|
- lib/candidhealth/encounters/v_4/types/lab_code_type.rb
|
198
210
|
- lib/candidhealth/encounters/v_4/types/medication.rb
|
211
|
+
- lib/candidhealth/encounters/v_4/types/multiple_instances_for_schema_error.rb
|
199
212
|
- lib/candidhealth/encounters/v_4/types/note_category.rb
|
200
213
|
- lib/candidhealth/encounters/v_4/types/patient_history_category.rb
|
201
214
|
- lib/candidhealth/encounters/v_4/types/patient_history_category_enum.rb
|
202
215
|
- lib/candidhealth/encounters/v_4/types/responsible_party_type.rb
|
216
|
+
- lib/candidhealth/encounters/v_4/types/schema_does_not_exist_error.rb
|
217
|
+
- lib/candidhealth/encounters/v_4/types/schema_instance_validation_error.rb
|
218
|
+
- lib/candidhealth/encounters/v_4/types/schema_instance_validation_failure.rb
|
219
|
+
- lib/candidhealth/encounters/v_4/types/schema_unauthorized_access_error.rb
|
203
220
|
- lib/candidhealth/encounters/v_4/types/service_authorization_exception_code.rb
|
204
221
|
- lib/candidhealth/encounters/v_4/types/synchronicity_type.rb
|
222
|
+
- lib/candidhealth/encounters/v_4/types/value_does_not_match_key_type_error.rb
|
205
223
|
- lib/candidhealth/encounters/v_4/types/vitals.rb
|
206
224
|
- lib/candidhealth/era/types/era.rb
|
207
225
|
- lib/candidhealth/era/types/era_base.rb
|