candidhealth 0.34.6 → 0.34.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/encounters/v_4/client.rb +32 -14
  3. data/lib/candidhealth/encounters/v_4/types/encounter.rb +10 -2
  4. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +10 -2
  5. data/lib/candidhealth/individual/types/patient.rb +13 -1
  6. data/lib/candidhealth/individual/types/patient_create.rb +13 -1
  7. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info.rb +77 -0
  8. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create.rb +70 -0
  9. data/lib/candidhealth/individual/types/patient_update.rb +16 -2
  10. data/lib/candidhealth/non_insurance_payers/v_1/client.rb +18 -2
  11. data/lib/candidhealth/non_insurance_payers/v_1/types/create_non_insurance_payer_request.rb +21 -2
  12. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_address_update.rb +98 -0
  13. data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_update_request.rb +20 -2
  14. data/lib/candidhealth/pre_encounter/common/types/canonical_non_insurance_payer_association.rb +73 -0
  15. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +44 -4
  16. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +22 -2
  17. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +12 -4
  18. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
  19. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +24 -2
  20. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +24 -2
  21. data/lib/candidhealth/service_lines/v_2/client.rb +22 -2
  22. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +30 -2
  23. data/lib/requests.rb +2 -2
  24. data/lib/types_export.rb +4 -0
  25. metadata +6 -2
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module CandidApiClient
7
+ module Individual
8
+ module Types
9
+ class PatientNonInsurancePayerInfoCreate
10
+ # @return [String]
11
+ attr_reader :non_insurance_payer_id
12
+ # @return [String]
13
+ attr_reader :member_id
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 non_insurance_payer_id [String]
23
+ # @param member_id [String]
24
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
25
+ # @return [CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate]
26
+ def initialize(non_insurance_payer_id:, member_id: OMIT, additional_properties: nil)
27
+ @non_insurance_payer_id = non_insurance_payer_id
28
+ @member_id = member_id if member_id != OMIT
29
+ @additional_properties = additional_properties
30
+ @_field_set = { "non_insurance_payer_id": non_insurance_payer_id, "member_id": member_id }.reject do |_k, v|
31
+ v == OMIT
32
+ end
33
+ end
34
+
35
+ # Deserialize a JSON object to an instance of PatientNonInsurancePayerInfoCreate
36
+ #
37
+ # @param json_object [String]
38
+ # @return [CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate]
39
+ def self.from_json(json_object:)
40
+ struct = JSON.parse(json_object, object_class: OpenStruct)
41
+ non_insurance_payer_id = struct["non_insurance_payer_id"]
42
+ member_id = struct["member_id"]
43
+ new(
44
+ non_insurance_payer_id: non_insurance_payer_id,
45
+ member_id: member_id,
46
+ additional_properties: struct
47
+ )
48
+ end
49
+
50
+ # Serialize an instance of PatientNonInsurancePayerInfoCreate to a JSON object
51
+ #
52
+ # @return [String]
53
+ def to_json(*_args)
54
+ @_field_set&.to_json
55
+ end
56
+
57
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
58
+ # hash and check each fields type against the current object's property
59
+ # definitions.
60
+ #
61
+ # @param obj [Object]
62
+ # @return [Void]
63
+ def self.validate_raw(obj:)
64
+ obj.non_insurance_payer_id.is_a?(String) != false || raise("Passed value for field obj.non_insurance_payer_id is not the expected type, validation failed.")
65
+ obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
@@ -4,6 +4,7 @@ require_relative "gender"
4
4
  require "date"
5
5
  require_relative "../../commons/types/street_address_short_zip"
6
6
  require_relative "../../commons/types/phone_number"
7
+ require_relative "patient_non_insurance_payer_info_create"
7
8
  require "ostruct"
8
9
  require "json"
9
10
 
@@ -36,6 +37,9 @@ module CandidApiClient
36
37
  # @return [Array<String>] On update, we will replace the existing list of non-insurance payers with the
37
38
  # new list if populated.
38
39
  attr_reader :non_insurance_payers
40
+ # @return [Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>] On update, we will replace the existing list of non-insurance payers with the
41
+ # new list if populated.
42
+ attr_reader :non_insurance_payers_info
39
43
  # @return [OpenStruct] Additional properties unmapped to the current class definition
40
44
  attr_reader :additional_properties
41
45
  # @return [Object]
@@ -58,10 +62,12 @@ module CandidApiClient
58
62
  # @param email_consent [Boolean]
59
63
  # @param non_insurance_payers [Array<String>] On update, we will replace the existing list of non-insurance payers with the
60
64
  # new list if populated.
65
+ # @param non_insurance_payers_info [Array<CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate>] On update, we will replace the existing list of non-insurance payers with the
66
+ # new list if populated.
61
67
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
62
68
  # @return [CandidApiClient::Individual::Types::PatientUpdate]
63
69
  def initialize(first_name: OMIT, last_name: OMIT, gender: OMIT, external_id: OMIT, date_of_birth: OMIT,
64
- address: OMIT, phone_numbers: OMIT, phone_consent: OMIT, email: OMIT, email_consent: OMIT, non_insurance_payers: OMIT, additional_properties: nil)
70
+ address: OMIT, phone_numbers: OMIT, phone_consent: OMIT, email: OMIT, email_consent: OMIT, non_insurance_payers: OMIT, non_insurance_payers_info: OMIT, additional_properties: nil)
65
71
  @first_name = first_name if first_name != OMIT
66
72
  @last_name = last_name if last_name != OMIT
67
73
  @gender = gender if gender != OMIT
@@ -73,6 +79,7 @@ module CandidApiClient
73
79
  @email = email if email != OMIT
74
80
  @email_consent = email_consent if email_consent != OMIT
75
81
  @non_insurance_payers = non_insurance_payers if non_insurance_payers != OMIT
82
+ @non_insurance_payers_info = non_insurance_payers_info if non_insurance_payers_info != OMIT
76
83
  @additional_properties = additional_properties
77
84
  @_field_set = {
78
85
  "first_name": first_name,
@@ -85,7 +92,8 @@ module CandidApiClient
85
92
  "phone_consent": phone_consent,
86
93
  "email": email,
87
94
  "email_consent": email_consent,
88
- "non_insurance_payers": non_insurance_payers
95
+ "non_insurance_payers": non_insurance_payers,
96
+ "non_insurance_payers_info": non_insurance_payers_info
89
97
  }.reject do |_k, v|
90
98
  v == OMIT
91
99
  end
@@ -117,6 +125,10 @@ module CandidApiClient
117
125
  email = struct["email"]
118
126
  email_consent = struct["email_consent"]
119
127
  non_insurance_payers = struct["non_insurance_payers"]
128
+ non_insurance_payers_info = parsed_json["non_insurance_payers_info"]&.map do |item|
129
+ item = item.to_json
130
+ CandidApiClient::Individual::Types::PatientNonInsurancePayerInfoCreate.from_json(json_object: item)
131
+ end
120
132
  new(
121
133
  first_name: first_name,
122
134
  last_name: last_name,
@@ -129,6 +141,7 @@ module CandidApiClient
129
141
  email: email,
130
142
  email_consent: email_consent,
131
143
  non_insurance_payers: non_insurance_payers,
144
+ non_insurance_payers_info: non_insurance_payers_info,
132
145
  additional_properties: struct
133
146
  )
134
147
  end
@@ -158,6 +171,7 @@ module CandidApiClient
158
171
  obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
159
172
  obj.email_consent&.is_a?(Boolean) != false || raise("Passed value for field obj.email_consent is not the expected type, validation failed.")
160
173
  obj.non_insurance_payers&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers is not the expected type, validation failed.")
174
+ obj.non_insurance_payers_info&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers_info is not the expected type, validation failed.")
161
175
  end
162
176
  end
163
177
  end
@@ -27,11 +27,18 @@ module CandidApiClient
27
27
  # * :name (String)
28
28
  # * :description (String)
29
29
  # * :category (String)
30
+ # * :address (Hash)
31
+ # * :zip_plus_four_code (String)
32
+ # * :address_1 (String)
33
+ # * :address_2 (String)
34
+ # * :city (String)
35
+ # * :state (CandidApiClient::Commons::Types::State)
36
+ # * :zip_code (String)
30
37
  # @param request_options [CandidApiClient::RequestOptions]
31
38
  # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer]
32
39
  # @example
33
40
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
34
- # api.non_insurance_payers.v_1.create(request: { name: "string", description: "string", category: "string" })
41
+ # api.non_insurance_payers.v_1.create(request: { name: "string", description: "string", category: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } })
35
42
  def create(request:, request_options: nil)
36
43
  response = @request_client.conn.post do |req|
37
44
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -144,6 +151,7 @@ module CandidApiClient
144
151
  # * :name (String)
145
152
  # * :description (Hash)
146
153
  # * :category (Hash)
154
+ # * :address (Hash)
147
155
  # @param request_options [CandidApiClient::RequestOptions]
148
156
  # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer]
149
157
  # @example
@@ -200,11 +208,18 @@ module CandidApiClient
200
208
  # * :name (String)
201
209
  # * :description (String)
202
210
  # * :category (String)
211
+ # * :address (Hash)
212
+ # * :zip_plus_four_code (String)
213
+ # * :address_1 (String)
214
+ # * :address_2 (String)
215
+ # * :city (String)
216
+ # * :state (CandidApiClient::Commons::Types::State)
217
+ # * :zip_code (String)
203
218
  # @param request_options [CandidApiClient::RequestOptions]
204
219
  # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer]
205
220
  # @example
206
221
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
207
- # api.non_insurance_payers.v_1.create(request: { name: "string", description: "string", category: "string" })
222
+ # api.non_insurance_payers.v_1.create(request: { name: "string", description: "string", category: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } })
208
223
  def create(request:, request_options: nil)
209
224
  Async do
210
225
  response = @request_client.conn.post do |req|
@@ -325,6 +340,7 @@ module CandidApiClient
325
340
  # * :name (String)
326
341
  # * :description (Hash)
327
342
  # * :category (Hash)
343
+ # * :address (Hash)
328
344
  # @param request_options [CandidApiClient::RequestOptions]
329
345
  # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayer]
330
346
  # @example
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "../../../commons/types/street_address_short_zip"
3
4
  require "ostruct"
4
5
  require "json"
5
6
 
@@ -14,6 +15,8 @@ module CandidApiClient
14
15
  attr_reader :description
15
16
  # @return [String] Max 255 characters allowed
16
17
  attr_reader :category
18
+ # @return [CandidApiClient::Commons::Types::StreetAddressShortZip]
19
+ attr_reader :address
17
20
  # @return [OpenStruct] Additional properties unmapped to the current class definition
18
21
  attr_reader :additional_properties
19
22
  # @return [Object]
@@ -25,14 +28,21 @@ module CandidApiClient
25
28
  # @param name [String] Max 50 characters allowed
26
29
  # @param description [String] Max 255 characters allowed
27
30
  # @param category [String] Max 255 characters allowed
31
+ # @param address [CandidApiClient::Commons::Types::StreetAddressShortZip]
28
32
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
29
33
  # @return [CandidApiClient::NonInsurancePayers::V1::Types::CreateNonInsurancePayerRequest]
30
- def initialize(name:, description: OMIT, category: OMIT, additional_properties: nil)
34
+ def initialize(name:, description: OMIT, category: OMIT, address: OMIT, additional_properties: nil)
31
35
  @name = name
32
36
  @description = description if description != OMIT
33
37
  @category = category if category != OMIT
38
+ @address = address if address != OMIT
34
39
  @additional_properties = additional_properties
35
- @_field_set = { "name": name, "description": description, "category": category }.reject do |_k, v|
40
+ @_field_set = {
41
+ "name": name,
42
+ "description": description,
43
+ "category": category,
44
+ "address": address
45
+ }.reject do |_k, v|
36
46
  v == OMIT
37
47
  end
38
48
  end
@@ -43,13 +53,21 @@ module CandidApiClient
43
53
  # @return [CandidApiClient::NonInsurancePayers::V1::Types::CreateNonInsurancePayerRequest]
44
54
  def self.from_json(json_object:)
45
55
  struct = JSON.parse(json_object, object_class: OpenStruct)
56
+ parsed_json = JSON.parse(json_object)
46
57
  name = struct["name"]
47
58
  description = struct["description"]
48
59
  category = struct["category"]
60
+ if parsed_json["address"].nil?
61
+ address = nil
62
+ else
63
+ address = parsed_json["address"].to_json
64
+ address = CandidApiClient::Commons::Types::StreetAddressShortZip.from_json(json_object: address)
65
+ end
49
66
  new(
50
67
  name: name,
51
68
  description: description,
52
69
  category: category,
70
+ address: address,
53
71
  additional_properties: struct
54
72
  )
55
73
  end
@@ -71,6 +89,7 @@ module CandidApiClient
71
89
  obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
72
90
  obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
73
91
  obj.category&.is_a?(String) != false || raise("Passed value for field obj.category is not the expected type, validation failed.")
92
+ obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressShortZip.validate_raw(obj: obj.address)
74
93
  end
75
94
  end
76
95
  end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+ require_relative "../../../commons/types/street_address_short_zip"
5
+
6
+ module CandidApiClient
7
+ module NonInsurancePayers
8
+ module V1
9
+ module Types
10
+ class NonInsurancePayerAddressUpdate
11
+ # @return [Object]
12
+ attr_reader :member
13
+ # @return [String]
14
+ attr_reader :discriminant
15
+
16
+ private_class_method :new
17
+ alias kind_of? is_a?
18
+
19
+ # @param member [Object]
20
+ # @param discriminant [String]
21
+ # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerAddressUpdate]
22
+ def initialize(member:, discriminant:)
23
+ @member = member
24
+ @discriminant = discriminant
25
+ end
26
+
27
+ # Deserialize a JSON object to an instance of NonInsurancePayerAddressUpdate
28
+ #
29
+ # @param json_object [String]
30
+ # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerAddressUpdate]
31
+ def self.from_json(json_object:)
32
+ struct = JSON.parse(json_object, object_class: OpenStruct)
33
+ member = case struct.type
34
+ when "remove"
35
+ nil
36
+ when "set"
37
+ CandidApiClient::Commons::Types::StreetAddressShortZip.from_json(json_object: json_object.value)
38
+ else
39
+ json_object
40
+ end
41
+ new(member: member, discriminant: struct.type)
42
+ end
43
+
44
+ # For Union Types, to_json functionality is delegated to the wrapped member.
45
+ #
46
+ # @return [String]
47
+ def to_json(*_args)
48
+ case @discriminant
49
+ when "remove"
50
+ { type: @discriminant }.to_json
51
+ when "set"
52
+ { "type": @discriminant, "value": @member }.to_json
53
+ else
54
+ { "type": @discriminant, value: @member }.to_json
55
+ end
56
+ @member.to_json
57
+ end
58
+
59
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
60
+ # hash and check each fields type against the current object's property
61
+ # definitions.
62
+ #
63
+ # @param obj [Object]
64
+ # @return [Void]
65
+ def self.validate_raw(obj:)
66
+ case obj.type
67
+ when "remove"
68
+ # noop
69
+ when "set"
70
+ CandidApiClient::Commons::Types::StreetAddressShortZip.validate_raw(obj: obj)
71
+ else
72
+ raise("Passed value matched no type within the union, validation failed.")
73
+ end
74
+ end
75
+
76
+ # For Union Types, is_a? functionality is delegated to the wrapped member.
77
+ #
78
+ # @param obj [Object]
79
+ # @return [Boolean]
80
+ def is_a?(obj)
81
+ @member.is_a?(obj)
82
+ end
83
+
84
+ # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerAddressUpdate]
85
+ def self.remove
86
+ new(member: nil, discriminant: "remove")
87
+ end
88
+
89
+ # @param member [CandidApiClient::Commons::Types::StreetAddressShortZip]
90
+ # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerAddressUpdate]
91
+ def self.set(member:)
92
+ new(member: member, discriminant: "set")
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "non_insurance_payer_description_update"
4
4
  require_relative "non_insurance_payer_category_update"
5
+ require_relative "non_insurance_payer_address_update"
5
6
  require "ostruct"
6
7
  require "json"
7
8
 
@@ -16,6 +17,8 @@ module CandidApiClient
16
17
  attr_reader :description
17
18
  # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerCategoryUpdate]
18
19
  attr_reader :category
20
+ # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerAddressUpdate]
21
+ attr_reader :address
19
22
  # @return [OpenStruct] Additional properties unmapped to the current class definition
20
23
  attr_reader :additional_properties
21
24
  # @return [Object]
@@ -27,14 +30,21 @@ module CandidApiClient
27
30
  # @param name [String] Max 50 characters allowed
28
31
  # @param description [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerDescriptionUpdate]
29
32
  # @param category [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerCategoryUpdate]
33
+ # @param address [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerAddressUpdate]
30
34
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
31
35
  # @return [CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerUpdateRequest]
32
- def initialize(name: OMIT, description: OMIT, category: OMIT, additional_properties: nil)
36
+ def initialize(name: OMIT, description: OMIT, category: OMIT, address: OMIT, additional_properties: nil)
33
37
  @name = name if name != OMIT
34
38
  @description = description if description != OMIT
35
39
  @category = category if category != OMIT
40
+ @address = address if address != OMIT
36
41
  @additional_properties = additional_properties
37
- @_field_set = { "name": name, "description": description, "category": category }.reject do |_k, v|
42
+ @_field_set = {
43
+ "name": name,
44
+ "description": description,
45
+ "category": category,
46
+ "address": address
47
+ }.reject do |_k, v|
38
48
  v == OMIT
39
49
  end
40
50
  end
@@ -59,10 +69,17 @@ module CandidApiClient
59
69
  category = parsed_json["category"].to_json
60
70
  category = CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerCategoryUpdate.from_json(json_object: category)
61
71
  end
72
+ if parsed_json["address"].nil?
73
+ address = nil
74
+ else
75
+ address = parsed_json["address"].to_json
76
+ address = CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerAddressUpdate.from_json(json_object: address)
77
+ end
62
78
  new(
63
79
  name: name,
64
80
  description: description,
65
81
  category: category,
82
+ address: address,
66
83
  additional_properties: struct
67
84
  )
68
85
  end
@@ -84,6 +101,7 @@ module CandidApiClient
84
101
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
85
102
  obj.description.nil? || CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerDescriptionUpdate.validate_raw(obj: obj.description)
86
103
  obj.category.nil? || CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerCategoryUpdate.validate_raw(obj: obj.category)
104
+ obj.address.nil? || CandidApiClient::NonInsurancePayers::V1::Types::NonInsurancePayerAddressUpdate.validate_raw(obj: obj.address)
87
105
  end
88
106
  end
89
107
  end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module CandidApiClient
7
+ module PreEncounter
8
+ module Common
9
+ module Types
10
+ class CanonicalNonInsurancePayerAssociation
11
+ # @return [String]
12
+ attr_reader :id
13
+ # @return [String]
14
+ attr_reader :member_id
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 id [String]
24
+ # @param member_id [String]
25
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
26
+ # @return [CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation]
27
+ def initialize(id:, member_id: OMIT, additional_properties: nil)
28
+ @id = id
29
+ @member_id = member_id if member_id != OMIT
30
+ @additional_properties = additional_properties
31
+ @_field_set = { "id": id, "member_id": member_id }.reject do |_k, v|
32
+ v == OMIT
33
+ end
34
+ end
35
+
36
+ # Deserialize a JSON object to an instance of
37
+ # CanonicalNonInsurancePayerAssociation
38
+ #
39
+ # @param json_object [String]
40
+ # @return [CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation]
41
+ def self.from_json(json_object:)
42
+ struct = JSON.parse(json_object, object_class: OpenStruct)
43
+ id = struct["id"]
44
+ member_id = struct["member_id"]
45
+ new(
46
+ id: id,
47
+ member_id: member_id,
48
+ additional_properties: struct
49
+ )
50
+ end
51
+
52
+ # Serialize an instance of CanonicalNonInsurancePayerAssociation to a JSON object
53
+ #
54
+ # @return [String]
55
+ def to_json(*_args)
56
+ @_field_set&.to_json
57
+ end
58
+
59
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
60
+ # hash and check each fields type against the current object's property
61
+ # definitions.
62
+ #
63
+ # @param obj [Object]
64
+ # @return [Void]
65
+ def self.validate_raw(obj:)
66
+ obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
67
+ obj.member_id&.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.")
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -42,6 +42,16 @@ module CandidApiClient
42
42
  # * :end_ (Date)
43
43
  # * :date_of_birth (Date)
44
44
  # * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
45
+ # * :address (Hash)
46
+ # * :use (CandidApiClient::PreEncounter::Common::Types::AddressUse)
47
+ # * :line (Array<String>)
48
+ # * :city (String)
49
+ # * :state (String)
50
+ # * :postal_code (String)
51
+ # * :country (String)
52
+ # * :period (Hash)
53
+ # * :start (Date)
54
+ # * :end_ (Date)
45
55
  # * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
46
56
  # * :patient (String)
47
57
  # * :insurance_plan (Hash)
@@ -104,7 +114,7 @@ module CandidApiClient
104
114
  # @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
105
115
  # @example
106
116
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
107
- # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { availity_eligibility_id: "string", availity_payer_id: "string", availity_payer_name: "string", availity_remittance_payer_id: "string" }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { start: {"key":"value"}, end_: {"key":"value"} }, insurance_card_image_locator: "string" }, verified: true, eligibility_checks: [{ check_id: "string", service_code: MEDICAL_CARE, status: CREATED, initiated_by: "string", initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }], latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { plan_coverage: {"key":"value"}, service_specific_coverage: {"key":"value"} } })
117
+ # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { availity_eligibility_id: "string", availity_payer_id: "string", availity_payer_name: "string", availity_remittance_payer_id: "string" }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { start: {"key":"value"}, end_: {"key":"value"} }, insurance_card_image_locator: "string" }, verified: true, eligibility_checks: [{ check_id: "string", service_code: MEDICAL_CARE, status: CREATED, initiated_by: "string", initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }], latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { plan_coverage: {"key":"value"}, service_specific_coverage: {"key":"value"} } })
108
118
  def create(request:, request_options: nil)
109
119
  response = @request_client.conn.post do |req|
110
120
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -138,6 +148,16 @@ module CandidApiClient
138
148
  # * :end_ (Date)
139
149
  # * :date_of_birth (Date)
140
150
  # * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
151
+ # * :address (Hash)
152
+ # * :use (CandidApiClient::PreEncounter::Common::Types::AddressUse)
153
+ # * :line (Array<String>)
154
+ # * :city (String)
155
+ # * :state (String)
156
+ # * :postal_code (String)
157
+ # * :country (String)
158
+ # * :period (Hash)
159
+ # * :start (Date)
160
+ # * :end_ (Date)
141
161
  # * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
142
162
  # * :patient (String)
143
163
  # * :insurance_plan (Hash)
@@ -203,7 +223,7 @@ module CandidApiClient
203
223
  # api.pre_encounter.coverages.v_1.update(
204
224
  # id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
205
225
  # version: "string",
206
- # request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { availity_eligibility_id: "string", availity_payer_id: "string", availity_payer_name: "string", availity_remittance_payer_id: "string" }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { start: {"key":"value"}, end_: {"key":"value"} }, insurance_card_image_locator: "string" }, verified: true, eligibility_checks: [{ check_id: "string", service_code: MEDICAL_CARE, status: CREATED, initiated_by: "string", initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }], latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { plan_coverage: {"key":"value"}, service_specific_coverage: {"key":"value"} } }
226
+ # request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { availity_eligibility_id: "string", availity_payer_id: "string", availity_payer_name: "string", availity_remittance_payer_id: "string" }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { start: {"key":"value"}, end_: {"key":"value"} }, insurance_card_image_locator: "string" }, verified: true, eligibility_checks: [{ check_id: "string", service_code: MEDICAL_CARE, status: CREATED, initiated_by: "string", initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }], latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { plan_coverage: {"key":"value"}, service_specific_coverage: {"key":"value"} } }
207
227
  # )
208
228
  def update(id:, version:, request:, request_options: nil)
209
229
  response = @request_client.conn.put do |req|
@@ -420,6 +440,16 @@ module CandidApiClient
420
440
  # * :end_ (Date)
421
441
  # * :date_of_birth (Date)
422
442
  # * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
443
+ # * :address (Hash)
444
+ # * :use (CandidApiClient::PreEncounter::Common::Types::AddressUse)
445
+ # * :line (Array<String>)
446
+ # * :city (String)
447
+ # * :state (String)
448
+ # * :postal_code (String)
449
+ # * :country (String)
450
+ # * :period (Hash)
451
+ # * :start (Date)
452
+ # * :end_ (Date)
423
453
  # * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
424
454
  # * :patient (String)
425
455
  # * :insurance_plan (Hash)
@@ -482,7 +512,7 @@ module CandidApiClient
482
512
  # @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
483
513
  # @example
484
514
  # api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
485
- # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { availity_eligibility_id: "string", availity_payer_id: "string", availity_payer_name: "string", availity_remittance_payer_id: "string" }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { start: {"key":"value"}, end_: {"key":"value"} }, insurance_card_image_locator: "string" }, verified: true, eligibility_checks: [{ check_id: "string", service_code: MEDICAL_CARE, status: CREATED, initiated_by: "string", initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }], latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { plan_coverage: {"key":"value"}, service_specific_coverage: {"key":"value"} } })
515
+ # api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { availity_eligibility_id: "string", availity_payer_id: "string", availity_payer_name: "string", availity_remittance_payer_id: "string" }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { start: {"key":"value"}, end_: {"key":"value"} }, insurance_card_image_locator: "string" }, verified: true, eligibility_checks: [{ check_id: "string", service_code: MEDICAL_CARE, status: CREATED, initiated_by: "string", initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }], latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { plan_coverage: {"key":"value"}, service_specific_coverage: {"key":"value"} } })
486
516
  def create(request:, request_options: nil)
487
517
  Async do
488
518
  response = @request_client.conn.post do |req|
@@ -518,6 +548,16 @@ module CandidApiClient
518
548
  # * :end_ (Date)
519
549
  # * :date_of_birth (Date)
520
550
  # * :biological_sex (CandidApiClient::PreEncounter::Common::Types::Sex)
551
+ # * :address (Hash)
552
+ # * :use (CandidApiClient::PreEncounter::Common::Types::AddressUse)
553
+ # * :line (Array<String>)
554
+ # * :city (String)
555
+ # * :state (String)
556
+ # * :postal_code (String)
557
+ # * :country (String)
558
+ # * :period (Hash)
559
+ # * :start (Date)
560
+ # * :end_ (Date)
521
561
  # * :relationship (CandidApiClient::PreEncounter::Common::Types::Relationship)
522
562
  # * :patient (String)
523
563
  # * :insurance_plan (Hash)
@@ -583,7 +623,7 @@ module CandidApiClient
583
623
  # api.pre_encounter.coverages.v_1.update(
584
624
  # id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
585
625
  # version: "string",
586
- # request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { availity_eligibility_id: "string", availity_payer_id: "string", availity_payer_name: "string", availity_remittance_payer_id: "string" }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { start: {"key":"value"}, end_: {"key":"value"} }, insurance_card_image_locator: "string" }, verified: true, eligibility_checks: [{ check_id: "string", service_code: MEDICAL_CARE, status: CREATED, initiated_by: "string", initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }], latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { plan_coverage: {"key":"value"}, service_specific_coverage: {"key":"value"} } }
626
+ # request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { availity_eligibility_id: "string", availity_payer_id: "string", availity_payer_name: "string", availity_remittance_payer_id: "string" }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { start: {"key":"value"}, end_: {"key":"value"} }, insurance_card_image_locator: "string" }, verified: true, eligibility_checks: [{ check_id: "string", service_code: MEDICAL_CARE, status: CREATED, initiated_by: "string", initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }], latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { plan_coverage: {"key":"value"}, service_specific_coverage: {"key":"value"} } }
587
627
  # )
588
628
  def update(id:, version:, request:, request_options: nil)
589
629
  Async do